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: pgp3IygMkDADP.pgp
Description: PGP signature

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to