Bug 115007 - Add a number formatting option (for using in Format() BASIC function, and in Calc number format) to spell number, like in NUMBERTEXT extension
Summary: Add a number formatting option (for using in Format() BASIC function, and in ...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Mike Kaganski
URL:
Whiteboard: target:6.1.0 target:6.2.0 target:6.1....
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-14 20:32 UTC by Mike Kaganski
Modified: 2022-12-05 21:54 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Draft of ODF enhacement "number:transliteration-spellout" (6.18 KB, text/plain)
2018-06-05 13:33 UTC, László Németh
Details
text doc. example using a single text variable formatted two ways (plain and with NatNum12 modifier) (8.97 KB, application/vnd.oasis.opendocument.text)
2018-07-17 13:22 UTC, László Németh
Details
Layout of the previous document in Writer (8.50 KB, image/png)
2018-07-17 13:23 UTC, László Németh
Details
and its setting "[NatNum12 title USD]0" in Format Number dialog (61.44 KB, image/png)
2018-07-17 13:26 UTC, László Németh
Details
NatNum12 not working in the Format Number dialog in LO 6.1 under Windows 10 (11.94 KB, image/png)
2018-08-09 23:53 UTC, Mihail Balabanov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2018-01-14 20:32:46 UTC
We have a great NUMBERTEXT extension by László Németh (https://extensions.libreoffice.org/extensions/numbertext-1; http://numbertext.org/) which allows to spell a number (works for many languages). However, it works with document language by default (not with cell language; it's natural that a function's result doesn't normally depend on its cell's formatting); it requires a separate column if one wants to continue using the number in calculations; it isn't available outside of Calc.

The proposal is to add a new formatting code to number formatter, which would spell its number. This would allow to use it in Basic; in Writer; allow to apply to numeric cells and continue using it in calculations; allow to depend on cell's language. The textual representation of a number is, actually, just a formatting.
Comment 1 Buovjaga 2018-01-31 17:36:45 UTC
OK -> NEW
Comment 2 Eike Rathke 2018-05-07 09:58:49 UTC
A dedicated format code only if there's an equivalent in Excel format codes to express such thing, which I doubt there is.

Apart from that, it probably would already be possible using the [NatNum#] mechanism and use a so far unallocated number to "spell out" in any language. This mechanism is already used.

See
offapi/com/sun/star/i18n/NativeNumberMode.idl
offapi/com/sun/star/i18n/XNativeNumberSupplier.idl
i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
Comment 3 Mike Kaganski 2018-05-13 00:14:52 UTC
https://gerrit.libreoffice.org/54186
Comment 4 Commit Notification 2018-05-15 09:43:41 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=56a7f308cf57f87d9e2cdeb77f48b570f81de85e

tdf#115007: add NatNum codes for cardinal/ordinal number names/indicators

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2018-05-15 12:37:33 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=fb345397694258d87746879e4c530cc11c777843

Guard static variables, tdf#115007 tdf#117171 follow-up

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 László Németh 2018-06-05 13:33:50 UTC
Created attachment 142540 [details]
Draft of ODF enhacement "number:transliteration-spellout"
Comment 7 Commit Notification 2018-06-08 13:09:31 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=90d233b0311a208967a3e264820e00395bf057fb

tdf#115007: Use [NatNum12 params...] syntax

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2018-06-08 16:01:02 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=32f1c56d8ff5e6f87dbcf086fd3743d6d36182bc

tdf#115007: add import/export to NatNum12 (spell out numbers,

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2018-06-11 11:06:22 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=807d4382cb021d2ac3ea99d6757a7b368a32941d

Derive NativeNumberXmlAttributes2 from NativeNumberXmlAttributes, tdf#115007 follow-up

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2018-06-11 21:00:05 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=90385c35cc6bea312eedeea2de33529e76cd6f2a&h=libreoffice-6-1

tdf#115007: Use [NatNum12 params...] syntax

It will be available in 6.1.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2018-06-11 21:00:13 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ecad621f6889e8af23baa4faee62d10f580ec074&h=libreoffice-6-1

tdf#115007: add import/export to NatNum12 (spell out numbers,

It will be available in 6.1.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2018-06-11 21:00:20 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e2a39848fa11dfc082ca9142266cbfe8adb586f2&h=libreoffice-6-1

Derive NativeNumberXmlAttributes2 from NativeNumberXmlAttributes, tdf#115007 follow-up

It will be available in 6.1.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Commit Notification 2018-06-13 17:50:45 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=958c23246a3606f2cb33ad5c136127f951bbbc69

tdf#115007 NatNum12 "spell out" formats in dates

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 14 Commit Notification 2018-06-20 18:25:16 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=261ff0cdf0e89a80f5d2af7ba5a331bc237a0ceb

NatNum12: fix and add capitalization prefixes, tdf#115007 follow-up

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 15 Commit Notification 2018-06-21 07:21:35 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1d48e998ae038263b092e0de71da97fceee299f4&h=libreoffice-6-1

NatNum12: fix and add capitalization prefixes, tdf#115007 follow-up

It will be available in 6.1.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 16 Commit Notification 2018-06-27 15:29:56 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b435767f8953702bb5fe01edae3ad0abfbd2cacc&h=libreoffice-6-1

tdf#115007 add NatNum12 formatting to dates

It will be available in 6.1.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 17 Commit Notification 2018-06-27 18:08:37 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d9388ab070ff99055650bf54b0e683a4be9bcdc9

Check string length before copying, tdf#115007 follow-up

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 18 Commit Notification 2018-06-28 09:08:22 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e87b6121c5c26bf9d6fd0e29ac7d8480b24d1870&h=libreoffice-6-1

Check string length before copying, tdf#115007 follow-up

It will be available in 6.1.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 19 Commit Notification 2018-07-02 15:06:45 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/help/commit/?id=a88deb16532bf8d35e1d92486c84ecfc304ddc1a

tdf#115007 add NatNum12 help and ask translators for extending
Comment 20 Commit Notification 2018-07-03 15:56:46 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/help/commit/?id=d37a847e3ea2560371f4b97d6c52122137c108eb&h=libreoffice-6-1

tdf#115007 add NatNum12 help and ask translators for extending
Comment 21 László Németh 2018-07-17 13:22:10 UTC
Created attachment 143595 [details]
text doc. example using a single text variable formatted two ways (plain and with NatNum12 modifier)

to show a money amount with numeric and spell out formats.
Comment 22 László Németh 2018-07-17 13:23:24 UTC
Created attachment 143596 [details]
Layout of the previous document in Writer
Comment 23 László Németh 2018-07-17 13:26:15 UTC
Created attachment 143597 [details]
and its setting "[NatNum12 title USD]0" in Format Number dialog
Comment 24 Mihail Balabanov 2018-08-09 23:51:42 UTC
From the help text updates I gather that the feature is supposed to work in the newly released LO 6.1.0 but it does not (at least for me, on 64-bit Windows 10).
The document attached to this thread loads and shows the field correctly but when I update it (F9 key), the spelled out number disappears and its result changes to "USD -1235". The NatNum12 modifier does not work in the Format Number dialog both in Writer and in Calc, and the "First, Second..." numbering style in Writer shows as "Ordinal 1. ... Ordinal 2. ..." in the document. I'm attaching a screenshot of the dialog.
Comment 25 Mihail Balabanov 2018-08-09 23:53:41 UTC
Created attachment 144077 [details]
NatNum12 not working in the Format Number dialog in LO 6.1 under Windows 10
Comment 26 László Németh 2018-08-10 07:30:21 UTC
(In reply to Mihail Balabanov from comment #25)
> Created attachment 144077 [details]
> NatNum12 not working in the Format Number dialog in LO 6.1 under Windows 10

Many thanks for the feedback! If there is no reason to switch off libnumbertext/NatNum12 on Windows, I hope, that will be fixed soon. (Maybe it would be fine to use Boost regex as a workaround for Linux, too, but I hope, that Linux distributions haven't had problems with C++11.)
Comment 27 Xisco Faulí 2018-11-12 12:41:53 UTC
A polite ping to Mike Kaganski and László Németh:
Is this bug fixed? if so, could you please close it as RESOLVED FIXED ? Otherwise, Could you please explain what's missing?
Thanks
Comment 28 Xisco Faulí 2018-12-18 15:38:50 UTC
(In reply to Xisco Faulí from comment #27)
> A polite ping to Mike Kaganski and László Németh:
> Is this bug fixed? if so, could you please close it as RESOLVED FIXED ?
> Otherwise, Could you please explain what's missing?
> Thanks

ping ?
Comment 29 Commit Notification 2022-11-03 21:21:20 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2a1d2d42af7f365330479f4032ddfdd9eeba7c1d

tdf#115007 add NatNum12 number format list items, fix title case

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 30 Commit Notification 2022-11-03 21:22:30 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b7d53247eb2fab04f5f6d82d405f1ac0c73542b2

tdf#115007 i18npool: add NatNum12 formats to locales

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 31 Commit Notification 2022-11-04 13:30:29 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/21c6547302580c3fd77b85fda68bb0239b8c560a

tdf#115007 svl: clean-up "add NatNum12 number format list items"

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 32 Commit Notification 2022-11-14 08:26:38 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6064b3382102bcbc153156f5874fbc8dfde97b98

tdf#115007 tdf#148672 bump libnumbertext 1.0.11

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 33 Commit Notification 2022-11-14 08:29:00 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/099d5d22b38bb0ea91faaed14ecc0edfa010ff11

tdf#115007 i18npool: add NatNum12 support to Persian, fix Hebrew

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 34 Commit Notification 2022-11-14 12:36:38 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/914c9743c6de1366ba4c58621988d694fbccb39e

tdf#115007 tdf#148672 bump libnumbertext 1.0.11

It will be available in 7.4.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 35 Stéphane Guillou (stragu) 2022-12-05 21:54:24 UTC
Verified fixed in:

Version: 7.5.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 6d6a2343b1d45695f3ea02818d317a022a7b259f
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Thank you Eike, Mike and László!