https://bugs.freedesktop.org/show_bug.cgi?id=60777

          Priority: medium
            Bug ID: 60777
          Assignee: [email protected]
           Summary: FORMATTING sum of different currencies should not be
                    one of these currencies
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: [email protected]
          Hardware: All
            Status: UNCONFIRMED
           Version: 4.0.0.3 release
         Component: Spreadsheet
           Product: LibreOffice

Created attachment 74738
  --> https://bugs.freedesktop.org/attachment.cgi?id=74738&action=edit
reproduction example

Cells A1 and B2 are Currency/EUR/fr_LU.
Cells B1 and A1 are Currency/GBP/en_GB.
Cells C1 and C2 are Number/Standard

C1 is displayed as euros. Should not be. Since you cannot automatically guess
which conversion rate to apply, just give up and display as a scalar (unitless,
no currency).

Similarly, C2 is displayed as pounds, should not.

When fixing this, consider the cases in the other lines:

Line 3: A difference of EUR of different languages/countries is EUR; display it
as €.

Line 4: A difference of GPB of different languages (same country) is still GPB;
display it as £.

Line 5: A difference of USD and AUD of same language (different country) is NOT
any kind of dollars; do not display as $.

In other words: the operative criterion is the three letter CURRENCY CODE.
Ignore country and language and currency symbol when deciding whether the sum
is any particular currency value. Decide *only* based on currency code: If the
currency code of *all* values in the sum is the same, then the sum is in that
currency, irrespective of language and country. Else, abandon and display as
scalar (unless the cell has a particular format, obviously).

Lines 6 and 7 show a cornercase: LUF and BEF were at par and interchangeably
used, so a sum of both could be either one. This is a very special case, I
don't think it is worth recognising it and doing anything special with it.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to