[Libreoffice] [PUSHED] Re: [PATCH] RTL_CONSTASCII_USTRINGPARAM for framework properties

David Tardon dtardon at redhat.com
Sun Dec 19 00:55:19 PST 2010


On Sun, Dec 19, 2010 at 09:40:19AM +0100, Julien Nabet wrote:
> Le 18/12/2010 13:47, Caolán McNamara a écrit :
> >On Sat, 2010-12-18 at 02:41 +0100, Julien Nabet wrote:
> >>Hello,
> >>
> >>Here is a patch for properties.h of framework
> >>framework compiles ok.
> >Looks good, thanks for this. Pushed.
> >
> >C.
> >
> >
> Hello,
> 
> I made a global fgrep for searching the remaining createFromAscii we
> could remove.
> I manually removed the cases where I thought createFromAscii must stay.
> 
> But I saw 2 cases in this searching where I don't know if we can
> replace createFromAscii :
> - e.g. in components/forms/source/misc/services.cxx :
> aServices.getArray()[0] = rtl::OUString::createFromAscii(
> "com.sun.star.xforms." #name );

Yes. The '#' is preprocessor concatenation, so name must be literal.

> - e.g. in ure/sal/workben/measure_oustrings.cxx:    std::cout <<
> "rtl::OUString::createFromAscii(\"XXXXXXXX\") " << nEndTime -
> nStartTime << "ms" << std::endl;

Uh huh. This is a benchmark that measures performance of
rtl::OUString::createFromAscii("literal") against
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("literal")), so obviously the
previous change here was wrong .-) I have fixed that.

D.


More information about the LibreOffice mailing list