[Libreoffice-bugs] [Bug 150464] calc macro using uno:numberformatvalue displays different formats in cell on different spreadsheets and computers for the same value

2022-08-18 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=150464

Eike Rathke  changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 150464] calc macro using uno:numberformatvalue displays different formats in cell on different spreadsheets and computers for the same value

2022-08-18 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=150464

Eike Rathke  changed:

   What|Removed |Added

 Resolution|--- |NOTABUG
 Status|UNCONFIRMED |RESOLVED

--- Comment #2 from Eike Rathke  ---
Internal enumeration of user-defined number formats is almost arbitrary and
only consistent within one session within one document, it merely depends on
the order the formats were created when reading the document or the user added
them. For Calc, the only fixed enumeration values are the pre-defined number
formats of the default locale that was effective when the number formatter of a
document was created, see
https://opengrok.libreoffice.org/xref/core/include/svl/zforlist.hxx?r=fbe169fa#122

See also the UNO API reference
https://api.libreoffice.org/docs/idl/ref/namespacecom_1_1sun_1_1star_1_1i18n_1_1NumberFormatIndex.html
https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1i18n_1_1XNumberFormatCode.html

Using the dispatcher with NumberFormatValue instead relies on implementation
details.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 150464] calc macro using uno:numberformatvalue displays different formats in cell on different spreadsheets and computers for the same value

2022-08-17 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=150464

Mike Kaganski  changed:

   What|Removed |Added

 CC||er...@redhat.com

--- Comment #1 from Mike Kaganski  ---
I don't think that format codes are hard-coded. They may change per version,
locale, and per document IIUC. So relying on specific numeric values is a user
error.

Here it is shown how to get a number format ID from NumberFormats for a
specified format string:

https://ask.libreoffice.org/t/how-to-create-a-macro-to-insert-the-current-date-in-the-current-language/28707/7

Eike: should this be marked NOTABUG?

-- 
You are receiving this mail because:
You are the assignee for the bug.