[Libreoffice] [PATCH] Replace (Byte)String with O(U)String in sw

Caolán McNamara caolanm at redhat.com
Mon Oct 3 02:20:49 PDT 2011


On Mon, 2011-10-03 at 10:07 +0100, Michael Meeks wrote:
> Hi Christina,
> 
> On Sun, 2011-10-02 at 20:52 +0200, Chr. Rossmanith wrote:
> > could someone please review this small patch. I'll extend the 
> > replacement (and push on my own) but want to be sure that there are no 
> > mistakes. At least it seems to build  :-)
> 
> 	Looks great to me :-)

yup, fine, no errors there.

FWIW, personally, I've tended towards...

rtl::OStringBuffer aError(RTL_CONSTASCII_STRINGPARAM("foo"));
aError.append(::rtl::OUStringToOString(r.Message,
    osl_getThreadTextEncoding());
OSL_FAIL(aError.getStr());

But its just an OSL_FAIL, so whatever titchy (if any) difference using a
OStringBuffer and RTL_CONSTASCII_STRINGPARAM makes is irrelevant there,
and the same goes for the output encoding really, its going to be ascii,
so ASCII, UTF-8, system encoding for the error message will all be
equivalent in the real world.

C.



More information about the LibreOffice mailing list