[Libreoffice] [PUSHED] Re: [PATCH] nuke obsolete use of String
Caolán McNamara
caolanm at redhat.com
Mon Dec 13 13:12:41 PST 2010
On Mon, 2010-12-13 at 23:52 +0900, Takeshi Abe wrote:
> So I amend my patch as attached
Looks good to me, pushed, thanks for this. Nice to see some UniStrings
and ByteStrings bite the dust.
As an aside, there is plenty of code that started off with char*, got
changed to "String" which was then the 8bit version, then "UniString"
was introduced to get Unicode support, and the original "String" renamed
"ByteString" and "UniString" aliased to String.
Which all means that every now and then you might even find some bugs
where the old pointer logic of e.g. + 2 at the end of a char* got badly
mangled during all the transitions into a String into something like
String+=String::CreateFromInt32(2) !
> which still allows the users to pass
> rather cooler option -psn_is_not_PlayStation_Network than just -psn to
> soffice, both resulting in the same effect ;)
Yeah, it might be a bug in the first place, but best to do an exact
like-for-like change just in case changing from one string type to the
other gets a bad reputation for silenty changing behaviour :-)
> It sounds great, so I created a table at the end of
> http://wiki.documentfoundation.org/Development/String_Classes
> which now contains only some functions but will be added more.
That's great work. I always get somewhat confused when swapping from one
to the other and end up digging into the UniString impl to see what it
*really* does.
C.
More information about the LibreOffice
mailing list