Bug 152722 - NatNum12 number format (spell out): add/delete decimal places is losing format
Summary: NatNum12 number format (spell out): add/delete decimal places is losing format
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.5.0.0 beta1+
Hardware: All All
: medium normal
Assignee: Laurent Balland
URL:
Whiteboard: target:7.5.1
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-29 19:18 UTC by Laurent Balland
Modified: 2023-02-15 10:26 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Balland 2022-12-29 19:18:17 UTC
When changing the number of decimal places with add/delete buttons or with sidebar or with cell number format dialog, of a number format based on NatNum12 (spell out), number format looses NatNum12 flag.

Steps to reproduce:
1. In Calc, open dialog Format > Cells > Numbers
2. Select Category: Number, Format: "one hundred"
Number format code is now:
[NatNum12 cardinal]0
3. Increment Decimal places

Actual behavior:
NatNum12 flag is lost and number format code is now
0.0

Expected behavior:
NatNum12 flag should be kept with expected number format code:
[NatNum12 cardinal]0.0

Same behavior with Add or Delete decimal places buttons, and with side bar panel.

Workaround:
Manually modify number format code in dialog. Display is then correct.

Version: 7.5.0.0.beta1 (X86_64) / LibreOffice Community
Build ID: 3aca23eec42e9d6fbe57071d7633ae1fc4bc5fcc
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win
Locale: fr-FR (fr_FR); UI: fr-FR
Calc: CL threaded

Confirmed with 7.5.0.1
Comment 1 Laurent Balland 2022-12-29 19:39:09 UTC
Entry point:
https://opengrok.libreoffice.org/s?defs=ChangeNumFmtDecimals&project=core
Comment 2 m_a_riosv 2022-12-29 20:13:33 UTC
Reproducible.
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 376152fbd110cdc0a2cde1fa9758f36c016d9352
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded Jumbo

But works by adding the decimals by hand.
Comment 3 Laurent Balland 2022-12-31 14:03:07 UTC
Similar problem when checking
- "Negative numbers red"
- "Thousands separator"
in Format > Cells > Numbers dialog or sidebar UI

Same bug occurs with Currency category
Comment 4 Commit Notification 2023-01-30 15:20:12 UTC
Laurent Balland committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8ba7657a9653f8ae5d1b865356d11138df7b2093

tdf#152722 Number Format: keep NatNum modifiers

It will be available in 7.6.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 5 m_a_riosv 2023-02-01 17:32:09 UTC
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: d8e6b488ceaff7c88856ebcfcfec14d2d8cd7652
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded Jumbo
Comment 6 Commit Notification 2023-02-03 16:07:02 UTC
Laurent Balland committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

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

tdf#152722 Number Format: keep NatNum modifiers

It will be available in 7.5.1.

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 7 Commit Notification 2023-02-13 09:21:55 UTC
Laurent Balland committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/69b9f50ee8c76fa6193165369ab8235cd125247e

tdf#152722 tdf#153023 Add UITest

It will be available in 7.6.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.