[Libreoffice] [PATCH] String::CompareIngoreCaseToAscii
August Sodora
augsod at gmail.com
Tue Oct 4 12:48:31 PDT 2011
I've attached a revised patch that should fix the pLine issue. The
assignment to pLine is now redundant and all the checks in pLine can
probably be more appropriately expressed in terms of aLine anyway. I'm
not sure how ToUpperAscii affects this patch, do you mind explaining a
little further?
August Sodora
augsod at gmail.com
(201) 280-8138
On Tue, Oct 4, 2011 at 6:27 AM, Caolán McNamara <caolanm at redhat.com> wrote:
> On Tue, 2011-10-04 at 10:57 +0200, Jan Holesovsky wrote:
>> BTW, another horror in the original code is:
>>
>> > ch1 = aSym.ToUpperAscii().GetBuffer()[0];
>>
>> ie. we convert the entire string to upper case, and then throw all that
>> away but the first char.
>
> [Byte]String::ToUpperAscii, see tools/source/string/strimp.cxx, modifies
> the string it operates on and returns a reference to *this, i.e.
>
> aSym = "hello";
> aSym.ToUpperAscii();;
> //aSym contains "HELLO" now
>
> I mean, it doesn't return an uppercased copy, but returns itself, which
> has been uppercased.
>
> C.
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: oustring.patch
Type: text/x-patch
Size: 14439 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20111004/552e80c9/attachment.bin>
More information about the LibreOffice
mailing list