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


On Sun, 2010-10-31 at 15:37 +0100, Joost Eekhoorn wrote:
MPL 1.1 / GPLv3+ / LGPLv3+

All good, committed and pushed, thanks :-)

In ./cui/source/tabpages/numpages.cxx (line 2852):
    String sMsg( RTL_CONSTASCII_USTRINGPARAM( "Preview") );

Should that not be RTL_CONSTASCII_STRINGPARAM, because sMsg is a
String and not a OUString?

That's ok, if you look a the String class (UniString in
tools/inc/tools/string.hxx) you can see that it has a constructor which
takes as arguments, a char pointer, length and text encoding and a
default fourth argument, so RTL_CONSTASCII_USTRINGPARAM is compatible
with that constructor and its ok.

Of course having another String class as well as rtl::OUString is
annoying, and there's another "Easy" hack to remove the String/UniString
class in favour of OUString, but it's a little bit tricky given the
different APIs they have. e.g. in many cases a rtl::OUStringBuffer might
be called for, and in others using OUString can be quite clumsy so
extension/addition to e.g. the comphelper/inc/comphelper/string.hxx
helper class might be called for to make it easy to replace UniString
with rtl::OUString.

C.


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.