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


Hi Michael,

On Thursday, 2012-11-29 20:26:29 +0000, Michael Meeks wrote:

nIndex needs to be initialized for IsNumberFormat(), usually 0 for
current locale and general number format, if it isn't the method assumes
an arbitrary number format it tries to match against if general
detection fails.

      It'd be nice to catch that and/or improve the calling convention to use
a pointer value which defaults to NULL or something (?) ;-) perhaps an
easy hack ?

A pointer wouldn't change much, defaulting to NULL wouldn't make sense
anyway as then the caller wouldn't know what number type was detected
and what format index to apply.

I don't see much difference between

bar(int&);
int foo;
bar(foo);

and

bar(int*);
int foo;
bar(&foo);

if foo is not initialized.


However, header file documentation of that function should explicitly
mention how things work and instead of  sal_uInt32& F_Index  naming it
io_rFormatIndex  or some such might help as well.

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
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: pgpOza8O0HOCS.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.