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

Wols Lists antlists at youngman.org.uk
Tue Nov 23 12:49:10 PST 2010

On 23/11/10 19:00, Jan Holesovsky wrote:
> 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
Fine. Fixes in base will appear as I spot them :-) Just one important
little point - the reason I asked is that I think the strings might
actually be being passed to a non-OOo library - will this break a
third-party library? (My C++-foo isn't good enough to answer this
question for myself :-)


More information about the LibreOffice mailing list