On Tuesday 15 of January 2013, Norbert Thiebaud wrote:
On Tue, Jan 15, 2013 at 12:26 PM, Eike Rathke <erack@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,
What you wrote above is AFAIK not written down anywhere, not in the wiki
page, not in the (non-existent) String class documentation, so any bets on
what the reality is?
Could you please add these cases to the strings wiki page?
--
Lubos Lunak
l.lunak@suse.cz
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.