[Libreoffice] [PUSHED] Re: [PATCH] EasyHack RTL_CONSTASCII_USTRINGPARAM in starmath

Caolán McNamara caolanm at redhat.com
Sat Oct 30 14:24:09 PDT 2010


On Sat, 2010-10-30 at 21:01 +0300, Jani Monoses wrote:
> Hello,
> 
> This changes the only occurrence in writer/starmath.

Thanks, Hmm, an empty string. I wonder why it using ::createFromAscii
for the empty string case. I suggest that...

+        _GetNamespaceMap().Add( OUString(), GetXMLToken(XML_N_MATH),
XML_NAMESPACE_MATH );

would be even better really for the edge-case of the empty string. So I
add that change instead.

> The wiki entry does not mention it, but should 
> UNOOUSTRING::createFromAscii (not OUString) be replaced as well?
> There are two of that in starmath

Digging for UNOOUSTRING I see that indeed it is a define for
rtl::OUString, i.e.
(http://opengrok.go-oo.org/xref/libs-core/sfx2/inc/sfx2/sfxuno.hxx#71)
so yes they can be replaced as well. I think I'd prefer to see them
replaced with rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(... instead of 
UNOOUSTRING(RTL_CONSTASCII_USTRINGPARAM to be consistent with the rest
of that module.

C.



More information about the LibreOffice mailing list