Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi Christina,

On Tuesday, 2013-03-19 15:31:55 +0100, Christina Roßmanith wrote:

GetTextBreak() returns STRING_LENGTH if text breaking isn't
necessary (if I get it right). indexOf() returns -1 if searching
failed. Would that be a choice for GetTextBreak() as well?

Sounds sensible.

What would be a useful return value? sal_Int16, sal_Int32?

sal_Int32 then.

In GenericSalLayout int is chosen as return type.

That can easily be changed to sal_Int32, consumers of that method should
get the type of the variable holding the return value adapted, if
needed, that should be all that's necessary.


In OutputDevice xub_StrLen is chosen...

With a horrible cast from int to xub_StrLen ...

Which is a tad more difficult. Callers may again check for the special
STRING_... values or pass it to their callers or other consumers, care
has to be taken to catch all places where not only the type needs to be
changed to sal_Int32 but also the use adapted, maybe even in functions
that are called with these values and maybe even worse if those
functions expect a sal_Int32 but get called with the
xub_StrLen/sal_uInt16 value that so far was a value pointing behind the
end of a string but after the change would be negative instead.

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
New GnuPG key 0x65632D3A : 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Old GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD
Support the FSFE, care about Free Software! https://fsfe.org/support/?erack

Attachment: pgptNssOh7Q4K.pgp
Description: PGP signature


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.