[Libreoffice-ux-advise] [Bug 106058] EDITING: Make Calc understand currency

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat Feb 18 08:22:23 UTC 2017


https://bugs.documentfoundation.org/show_bug.cgi?id=106058

--- Comment #11 from V Stuart Foote <vstuart.foote at utsa.edu> ---
Hmm, so scratch what I said about needing to extend ODF to hold currency cell
values. Its already there -- at least as the tuple(pair) of fp value and string
for assigned currency.

Poked at the OASIS ODF 1.2 docs and seems we actually do have table:table-cell
(9.14) and office:value-type "currency" (19.385) with values of office:currency
(19.369) defined by a "string" (18.2) [1][2].

Then tested a bit with a calc session in 5.3.0.3, and in LO we provide the
string value used for the office:currency cell values from the i18n localedata
as XML data [2][3]

That is, rather than for just style/formatting as I'd believed, each currency
formatted cell of fp data office:value will also have an associated
office:currency annotated with its currency string. Looked in the ODF output
from a calc session, and the XML is present in the content.xml for the archive.

The default currency for a cell with currency format will be set by locale, but
every currency format cell could have a non-default currency assigned--manually
or programmatically. The GUI even has the "Format as currency" split button
with drop list of all the currencies that a cell could be assigned--it will
indicate what currency is assigned to the active cell.

Meaning can search by cells for a specific currency string. And since it could
be found by its currency format the fp value could be directly converted using
a retrieved exchange rate, and the cell reassigned a new currency format.

Bit of a rub at the moment as I can not figure out how to search against what
becomes the office:currency string on save to .ODS--some of the localizations
do not use the currency on canvas and the Find & Replace dialog will only find
the value in the "formatted display". 

Probably something simple, but seems like there should be some way to search
for office:currency while in the document and not in the ODF.

=-ref-=
[1]
http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#attribute-office_currency
[2]
http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#refTable13

[3] http://opengrok.libreoffice.org/xref/core/i18npool/source/localedata/data/

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Libreoffice-ux-advise mailing list