[Libreoffice] [PUSHED] Re: [PATCH 02/12] RTL_CONSTASCII_USTRINGPARAM in components cui options

Jan Holesovsky kendy at suse.cz
Tue Nov 23 11:00:55 PST 2010


Hi Wol, Kevin, all,

On 2010-11-21 at 23:48 -0500, Kevin Hunter wrote:

> > Forgive what might be a stupid question, but I've seen
> >
> > String::createFromAscii
> >
> > Will version 2 find those, and should they be replaced?
> 
> Not a stupid question at all.  Regular expressions aren't the most 
> transparent of creatures.
> 
> As I wrote the regex, round 2 /will/ find those.  Since I don't know if 
> those should be replaced, I assume that they shouldn't be, making this 
> "an edge case".  The correct procedure then would be a "Replace and 
> Find" as opposed to "Replace All".  This way one inspects every change 
> rather than blindly updating every occurrence.

Yes, even String::createFromAscii() usage should be replaced the similar
way, the UniString class (that is the class aliased as String) has the
appropriate constructor, ie.

 String aFoo = String::createFromAscii( "Something" )

should be replaced, with

 String aFoo( RTL_CONSTASCII_USTRINGPARAM( "Something" ) )

Regards,
Kendy



More information about the LibreOffice mailing list