[Libreoffice] [PUSHED] Re: [PATCH 02/12] RTL_CONSTASCII_USTRINGPARAM in components cui options
Wols Lists
antlists at youngman.org.uk
Sun Nov 21 13:58:26 PST 2010
On 18/11/10 13:36, Kevin Hunter wrote:
> As I assume you're using a regex, you might consider catching this by
> doing the search and replace in series. Here's an example:
>
> 1. Catch the 'OUString +?= ...createFromAscii...' case and replace
> with 'OUString var( RTL...)'
>
> search: OUString\s*\w+\s*\+?=\s*\S*createFromAscii\(\s*"([^"]*)"\s*\)
> replace: $1 $2( RTL_CONSTASCII_USTRINGPARAM( "$4" ))
>
> 2. Then go back for a second pass with something like this:
>
> search: ::createFromAscii\(\s*"([^"]*)"\s*\)
> replace: $1 $2( RTL_CONSTASCII_USTRINGPARAM( "$4" ))
>
> The solution isn't perfect, as it still misses certain edge cases, but
> should at least help a little bit.
>
Forgive what might be a stupid question, but I've seen
String::createFromAscii
Will version 2 find those, and should they be replaced?
Cheers,
Wol
More information about the LibreOffice
mailing list