fdo#38838 - Removal/Replacement of the String/UniString with OUString once and for all.
Jean-Noël Rouvignac
jn.rouvignac at gmail.com
Wed Jan 16 04:34:05 PST 2013
Thanks for all your relevant answers and wiki updates.
I understand the goal is to replace String and its variants by OUString.
My last remaining question is "what is the use of OString? Where/when is it
used in the application?"
Thanks,
Jean-Noël
2013/1/15 Norbert Thiebaud <nthiebaud at gmail.com>
> On Tue, Jan 15, 2013 at 12:26 PM, Eike Rathke <erack at redhat.com> wrote:
> >
> > For example, a
> >
> > if (String.Search(...) == STRING_NOTFOUND)
> >
> > replaced with
> >
> > if (OUString.indexOf(...) == STRING_NOTFOUND)
> >
> > will not work.
>
> A even more tricky case is this:
>
> String's functions usually deal silently with out-of-buffer
> stituations, like asking to delete a part that overflow or even is
> entirely outside a string.
> and Search return as indicated above STRING_NOTFOUND that is 0xffff
> i.e the max unsigned value of Xub_StrLen
>
> so some code use this 'feature' to code something like:
>
> pos=String.Search('#')
> String.Erase(pos)
>
> IOW: automated conversion is _not_ an option. String => OUString
> convertion have to be carefully audited by hand, even if 99% of these
> are trivial.
>
>
> Norbert
> _______________________________________________
> LibreOffice mailing list
> LibreOffice at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20130116/919802e4/attachment-0001.html>
More information about the LibreOffice
mailing list