Re: [PATCH] typo in abi\src\wp\impexp\xp\ie_imp_RTF.cpp

From: Dom Lachowicz (domlachowicz@yahoo.com)
Date: Fri Feb 14 2003 - 10:28:27 EST

  • Next message: F J Franklin: "commit: abi: build "fix""

    Both this patch and your Win32 printing patch have
    been applied to HEAD. Hub, please apply to STABLE as
    well.

    Johnny, you might've honestly single-handedly cleared
    out 20+ bugzilla bugs with 3 lines of code... You f'in
    rock. Please keep up the good work. I'll try to go
    through bugzilla and see which bugs these sort out. In
    the mean time, please close your printing bug.

    Dom

    --- Johnny Lee <typo_pl@hotmail.com> wrote:
    > Found with the typo.pl script from
    > <http://www.cpan.org> against the abiword
    > 1.0.4 source code.
    >
    > <ShamelessPlug>
    > Info on typo.pl can be found at
    > <http://www.geocities.com/typopl/> and
    > <http://www.geocities.com/typopl/typo.htm>.
    > </ShamelessPlug>
    >
    > I assume the contents of tempBuffer are supposed to
    > be appended to
    > propBuffer. You need "+=" to append tempBuffer to
    > propBuffer.
    >
    > As it stands, a temporary UT_String object is
    > created, gets set to the union
    > of propBuffer and tempBuffer and then immediately
    > destroyed - at least in
    > the Debug version.
    >
    > Also why is szStartValue needed? Couldn't you skip
    > the szStartValue sprintf
    > and use startValue in the following
    > sprintf-tempBuffer line with "%d"
    > instead of "%s"?
    >
    > --- ie_imp_rtf.cpp.old Fri Feb 14 02:00:02 2003
    > +++ ie_imp_RTF.cpp Fri Feb 14 01:59:19 2003
    > @@ -4450,11 +4450,11 @@
    > UT_String_sprintf(tempBuffer, "field-font:%s;
    > ",m_currentRTFState.m_paraProps.m_pszFieldFont);
    > propBuffer += tempBuffer;
    > startValue =
    > m_currentRTFState.m_paraProps.m_startValue;
    > UT_String_sprintf(szStartValue,"%d",startValue);
    > UT_String_sprintf(tempBuffer, "start-value:%s
    > ",szStartValue.c_str());
    > - propBuffer + tempBuffer;
    > + propBuffer += tempBuffer;
    > }
    > // Style name
    > if( (UT_uint32)
    > m_currentRTFState.m_paraProps.m_styleNumber <
    > m_styleTable.size()
    > &&(m_currentRTFState.m_paraProps.m_styleNumber >= 0)
    > )
    > {
    > UT_uint32 styleNumber =
    > m_currentRTFState.m_paraProps.m_styleNumber;
    >
    >
    >
    >
    _________________________________________________________________
    > The new MSN 8: advanced junk mail protection and 2
    > months FREE*
    > http://join.msn.com/?page=features/junkmail
    >

    __________________________________________________
    Do you Yahoo!?
    Yahoo! Shopping - Send Flowers for Valentine's Day
    http://shopping.yahoo.com



    This archive was generated by hypermail 2.1.4 : Fri Feb 14 2003 - 10:32:46 EST