Description: Selecting the "CAD $ English (Canada)" as a Currency format results in the number being displayed as if the user selected the "BZD $ English (Belize)" option. Menu options above and below the "CAD $ English (Canada)" option produce the expected results. Actual Results: Select a cell containing a number; Display the Format Cell dialog (Ctrl-1); Select: Category = Currency; Format = "CAD $ English (Canada)"; Language = English (Canada) Click "OK" Expected Results: Result displays as "BZ$nnn.nn" Expected "$nnn.nn" Reproducible: Always User Profile Reset: No Additional Info: Preferences (Options) Locale setting: "English (Canada)" Default currency: "Default - CAD"
On pc Debian x86-64 with LO 7.3.0.2, I don't reproduce this. 1) Do you reproduce this in a brand new ods file or just a specific file? 2) Could you rename your LO directory profile (see https://wiki.documentfoundation.org/QA/FirstSteps#Corrupted_user_profile) and give a new try?
(In reply to Julien Nabet from comment #1) > On pc Debian x86-64 with LO 7.3.0.2, I don't reproduce this. > > 1) Do you reproduce this in a brand new ods file or just a specific file? > 2) Could you rename your LO directory profile (see > https://wiki.documentfoundation.org/QA/FirstSteps#Corrupted_user_profile) > and give a new try? Thanks for your questions. 1. I've confirmed that the problem persists when I attempt to format a numeric cell in a new ods file. 2. I can also confirm that the problem persists after I rename my LO profile directory.
[Automated Action] NeedInfo-To-Unconfirmed
Thank you for your feedback. No more question/idea for me but certainly someone may help you.
On pc Debian x86-64 with master sources updated today, I could reproduce this. I couldn't reproduce this with French (France) locale setting but could once I selected "English (Canada)" for locale setting.
*** Bug 149613 has been marked as a duplicate of this bug. ***
Eike: thought you might be interested in this one. It can be reproduced only with the right locale setting.
If I use "English (Belize)" for locale setting then restart LO and choose "BZD BZ$ English (Belize)" for currency, I got the currency just above "BYR. Belarusian". So again as if the entry corresponding to the locale was removed. Perhaps it's related with first default entry which corresponds to the locale.
It seems related with this part of code SvxCurrencyToolBoxControl::GetCurrencySymbols (see https://opengrok.libreoffice.org/xref/core/svx/source/tbxctrls/tbcontrl.cxx?r=1d2b6b70#3872) but I don't understand the whole mechanism.
Regression introduced by: author Eike Rathke <erack@redhat.com> 2021-10-25 15:39:46 +0200 committer Eike Rathke <erack@redhat.com> 2021-10-25 18:15:40 +0200 commit 97e63ff5375d9d80d6fe5d4bd68883e35bd56d91 (patch) tree ac70a5d79526e56a505375bb6f85921c6487108c parent 02bd6074b00c3e4420f67ad67566c217d9341c03 (diff) Fix toolbar button's currency list's number format for default locale Bisected with: bibisect-linux64-7.3
Oh great, both the toolbar control and the Numbers dialog use SvxCurrencyToolBoxControl::GetCurrencySymbols() but under different preconditions.. Since https://git.libreoffice.org/core/commit/f9cf53a082f1d99b313ebd09c8791541859eac40
Which doesn't explain the regression by the mentioned change though, that affects code used only in the toolbar control.
And I can't even reproduce the reported failure. To be sure we talk about the same thing: Tools -> Options -> Language Settings -> Languages: Locale setting: English (Canada) (*not* Default - English (Canada)) Default currency: Default - CAD Unformatted cell. Ctrl+1 dialog, Numbers: Category: Currency Format: CAD $ English (Canada) Language: English (Canada) (*not* Default - English (Canada)) Selected is the 4th format with Format Code [$$-1009]#,##0.00;[RED]-[$$-1009]#,##0.00 (Fwiw, I get the same correct result for Language Default - English (Canada)) However, I *can* reproduce in the toolbar control's list, picking CAD $ English (Canada) there applies format code [$BZ$-2809]#,##0.--;[RED]-[$BZ$-2809]#,##0.-- Is this a misunderstanding? Incorrect report? Manifestation of the same/similar bug depending on whatever circumstances?
So, I don't know why I can reproduce it only differently, but I know why it is happening..
In fact this happens with any locale if one picks the corresponding full entry from the currency control instead of the first default; which results in the same format code and that actually is the problem, a wrong default offset into currency format codes is returned for such, which might also happen in the Numbers tab dialog if there are duplicates but under different constellations.
Eike Rathke committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/36cf12d449c892e6bbacb7da5f4b008f7762232b Resolves: tdf#147265 Return correct default if currency format is duplicate 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.
Pending review https://gerrit.libreoffice.org/c/core/+/136166 for 7-3
On pc Debian x86-64 with master sources updated today (including Eike's patch), I confirm I don't reproduce the pb anymore. I gave a try with English Canada locale + Japanese locale (to test tdf#149613). Thank you Eike!
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-7-4": https://git.libreoffice.org/core/commit/37b30be41d24c3659dbf64b46c490e94869fca7f Resolves: tdf#147265 Return correct default if currency format is duplicate It will be available in 7.4.0.0.beta2. 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.
Thank you Eike. Thank you Julien for verifying my post. I am surprised at the speed of correspondence. Thank you again.
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-7-3": https://git.libreoffice.org/core/commit/3e24263d6174cd1e33c4216acbd0130b4ffa2dce Resolves: tdf#147265 Return correct default if currency format is duplicate It will be available in 7.3.5. 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.