[Libreoffice] Replace (Byte|Uni|Xub_)String with O(U)String: Fill() method is missing

Caolán McNamara caolanm at redhat.com
Tue Nov 1 05:28:35 PDT 2011


On Tue, 2011-11-01 at 11:58 +0000, Michael Meeks wrote:
> 	Which makes me wonder whether we should be moving comphelper's
> string.hxx methods into sal/ anyway - they look reasonably sensible
> seemingly

case-by-case basis generally. e.g. methinks now that NaturalStringSorter
should go into i18nutil or there abouts, definitely not sal anyway. Some
of them are just bridges for the old string class, like the pad stuff
and getToken so they probably can stay out. matchL and search/replace
are possible contenders.

> (though the rtl_uString_alloc stuff looks like it should be
> done with a StringBuffer instead in each instance).

The foo_alloc stuff is moved in there from a somewhat confused-in-usage
family of overlapping stuff found in i18npool/i18nutil. StringBuffer's
ctor calls rtl_string_new_WithLength, comment on rtl_string_alloc
describes how it differ's from that, e.g. no memset on contents. Using a
StringBuffer puts you at something of an extra remove over the private
pData in order to tweak its length. Didn't really fancy fighting the
i18npool/i18nutil usages.

C.



More information about the LibreOffice mailing list