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


Hi Oliver,

right. But I wanted to remove the macro only.

There were 1663 cases like foo = [::rtl::]OUString("..") in the source before my commit. Now there are 2885. Huge increase, I know, but the other ones could be improved, too. Maybe with some script foo. Regardless how this is done it will be easier to review in comparison to removing the macro and the explicit OUString at once.

Thomas

On 19.03.2013 10:37, Olivier Hallot wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello

since you have

- -    aMap[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("YES"));
- -    aMap[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NO"));
+    aMap[0] = ::rtl::OUString("YES");
+    aMap[1] = ::rtl::OUString("NO");

in the same way, you can push further

- -    aMap[0] = ::rtl::OUString("YES");
- -    aMap[1] = ::rtl::OUString("NO");
+    aMap[0] = "YES";
+    aMap[1] = "NO";

and AFAIK, explicit OUString is necessary only with return and ? such as

return OUString("bla bla bla");

and

aOUString = bCond ? OUString("String_true") : OUString("String_false");

Olivier


Em 19-03-2013 05:26, Thomas Arnhold (via Code Review) escreveu:
Hi,

I have submitted a patch for review:

     https://gerrit.libreoffice.org/2832

To pull it, you can do:

     git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/32/2832/1

automated removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings

Done with a perl regex:

s/OUString\s*\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/OUString\($1\)/gms


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.