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


On Sun, 2010-10-31 at 13:41 +0100, Gert Faller wrote:
Hi,

I'am not sure of my previous mail...

This looks good. I pushed this patch as well.

I see (again this was already there and not added by your patch) a few
rather odd rtl::OUString sEmpty(OUString::createFromAscii("")) in there
to create an empty string. Clearly rtl::OUString sEmpty; is sufficient
to do that.

And places that have

if (sSomething == OUString::createFromAscii(""))
   ... if sSomething was empty

is a bit of a long-way-around, 

if (!sSomething.getLength())
  ... if sSomething was empty

would be sufficient when sSomething is an rtl::OUString and knock a few
cycles off that test.

while where sSomething is an old-style "String" then

if (sSomething == String(OUString::createFromAscii("")))
   ... if sSomething was empty

could just become

if (!sSomething.Len())
   ... if sSomething was empty

C.


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.