Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hi Caolan and Stephan,

Am 17.01.2012 13:40, schrieb Caolán McNamara:
On Tue, 2012-01-17 at 11:06 +0100, Chr. Rossmanith wrote:
an excursion from vcl to unotools was necessary. Could someone please
review this little patch? xub_StrLen is replaced as well with sal_Int32.
You'll have to change the callers of RecodeString
(http://opengrok.libreoffice.org/xref/core/vcl/source/gdi/outdev3.cxx#6009) to use an rtl::OUString 
as well.
That is where my excursion started :-) i.e. the reason why I had to modify RecodeString()
On this patch in isolation, you could make one stringbuffer before the
loop, and set the returned string from that at the end, and just use one
stringbuffer in the loop, something like...

rtl::OUStringBuffer aTmpStr(rStr);
for(; nIndex<  nLastIndex; ++nIndex )
{
     sal_Unicode cOrig = aTmpStr[nIndex];
...
     if( cOrig != cNew )
         aTmpStr[nIndex] = cNew;
...
}
rStr = aTmpStr.makeStringAndClear();
I'll add this to my patch and Stephan Bergmanns improvements as well.

Thank you,
Christina


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.