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


On 09/04/2012 02:33 AM, Ricardo Montania wrote:
Hi everyone. I've received a suggestion about the change from my patch:

(...)
Remove "RTL_CONSTASCII_USTRINGPARAM". Like this:

- -    binaryUno_(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO))),
+    binaryUno_(OUString(UNO_LB_UNO)),

or

+    binaryUno_(UNO_LB_UNO),
if UNO_LB_UNO is a valid type to OUString (check)
(...)


How can I check? Just recompile the module or dbg is necessary?

There is a non-explicit rtl::OUString ctor taking a string literal now, and since UNO_LB_UNO is defined as a string literal (in cppu/inc/uno/lbnames.h, cf. "git grep -Fw UNO_LB_UNO") the explicit mention of the rtl::OUString ctor can (and arguably should) be dropped.

Would you like to go over your patch and remove the unnecessary occurrences of "OUString(...)"? (One minor gotcha is that some compilers still require the OUString(...) in return statements.)

Stephan

(PS: Another minor nit with your patch is that it spoils indentation in some places, like with

@@ -197,12 +197,10 @@ Bridge::Bridge(
             css::uno::Reference< css::bridge::XProtocolProperties > >::get()),
     protPropRequest_(
         OUString(
-            RTL_CONSTASCII_USTRINGPARAM(
-                "com.sun.star.bridge.XProtocolProperties::requestChange"))),
+                "com.sun.star.bridge.XProtocolProperties::requestChange")),

where the string literal should only be indented 4-deep relative to the "OUString(" now -- or rather the "propPropRequest_(" when the unnecessary "OUString(...)" is removed.)

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.