Bug 60775 - FORMATTING division of currency values is not a currency value
Summary: FORMATTING division of currency values is not a currency value
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.6.5.2 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 63446 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-02-13 09:24 UTC by Lionel Elie Mamane
Modified: 2017-10-22 17:59 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
reproduction example (7.97 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-02-13 09:24 UTC, Lionel Elie Mamane
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lionel Elie Mamane 2013-02-13 09:24:08 UTC
Created attachment 74736 [details]
reproduction example

Only cells A2 and B2 have currency format. *ALL* other cells have "Number / Standard" format.

Cell C2, formula "=B2*2" displays as currency. Nice feature, do the right thing by default.

Cell E2, formula "=A2/C2" displays as scalar (unitless, not currency). Nice, still does the right thing by default: it recognises that division of currency values is not a currency value.

Cell D2, formula "=A2/(2*B2)", that is take the formula in E2 and expand the formula of C2 in it. It displays as currency! This is wrong. It should display the same as E2, that is unitless.

A similar situation arises with cells F2, H2 and G2.
Comment 1 Joel Madero 2013-03-21 16:53:16 UTC
I have been able to confirm the issue on:
Version 3.6.5.2 
Platform: Bodhi Linux 2.2 x64
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 
As I've been able to confirm this problem on an earlier release I am changing the version number as version is the earliest version that we can confirm the bug, we use comments to say that the bug exists in newer versions as well.

Marking as:

New (confirmed)
Minor - workaround to just set format again
Medium - inconsistent behavior is pretty annoying and could reflect poorly on Libreoffice


Also note that if you right click on D2 and go to format-> cell you'll see that it's actually set as "number" but it shows as currency, if you increase decimals to 2 (ie. don't touch format at all, just increase decials), it formats correctly.
Comment 2 Joel Madero 2013-04-18 02:53:21 UTC
*** Bug 63446 has been marked as a duplicate of this bug. ***
Comment 3 QA Administrators 2015-04-19 03:19:44 UTC Comment hidden (obsolete)
Comment 4 Buovjaga 2015-06-15 05:57:58 UTC
(In reply to Lionel Elie Mamane from comment #0)
> Cell D2, formula "=A2/(2*B2)", that is take the formula in E2 and expand the
> formula of C2 in it. It displays as currency! This is wrong. It should
> display the same as E2, that is unitless.

Confirmed.

Win 7 Pro 64-bit Version: 5.1.0.0.alpha1+
Build ID: 01a189abcd9a4ca472a74b3b2c000c9338fc2c91
TinderBox: Win-x86@39, Branch:master, Time: 2015-06-14_07:46:28
Locale: fi-FI (fi_FI)
Comment 5 QA Administrators 2016-11-08 10:25:18 UTC Comment hidden (obsolete)
Comment 6 Lionel Elie Mamane 2016-11-08 10:34:38 UTC
Still there in libreoffice-5-2 branch as of 2016-10-31
Comment 7 cvaliant 2016-12-24 15:59:46 UTC
This bug is still present in 5.2.3.3
Comment 8 Laurent Balland 2017-10-09 21:08:33 UTC
I do NOT reproduce with Version: 5.4.2.2
Build ID: 22b09f6418e8c2d508a9eaf86b2399209b0990f4
Threads CPU : 8; OS : Linux 4.10; UI Render : par défaut; VCL : gtk2; 
Locale : fr-FR (fr_FR.UTF-8); Calc: group
Comment 9 Buovjaga 2017-10-22 16:15:35 UTC
(In reply to Laurent BP from comment #8)
> I do NOT reproduce with Version: 5.4.2.2
> Build ID: 22b09f6418e8c2d508a9eaf86b2399209b0990f4
> Threads CPU : 8; OS : Linux 4.10; UI Render : par défaut; VCL : gtk2; 
> Locale : fr-FR (fr_FR.UTF-8); Calc: group

What about cell F2, with =B2*B$1 ? For me it is still formatted as currency.

Arch Linux 64-bit, KDE Plasma 5
Version: 6.0.0.0.alpha1+
Build ID: 2460e7637f635727f4596f3e3d799eed434df082
CPU threads: 8; OS: Linux 4.13; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on October 22nd 2017
Comment 10 Laurent Balland 2017-10-22 17:38:02 UTC
(In reply to Buovjaga from comment #9)
> What about cell F2, with =B2*B$1 ? For me it is still formatted as currency.

Yes, F2 is formatted as currency, and it is what I would expect. 2 * 2$ = 4$
Don't you?
Comment 11 Buovjaga 2017-10-22 17:59:28 UTC
Ok, you are right: this was about division. It seems Lionel was a bit unclear in the original desc re: F2. Let's close, then.