Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | Don't offer automatic currency format in list of format codes if not used. | ||
---|---|---|---|
Product: | Calc | Reporter: | benzman1981 <webmaster> |
Component: | formatting | Assignee: | AOO issues mailing list <issues> |
Status: | CONFIRMED --- | QA Contact: | |
Severity: | Trivial | ||
Priority: | P3 | CC: | issues, rb.henschel |
Version: | OOo 2.2.1 | Keywords: | oooqa |
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Latest Confirmation in: | --- |
Developer Difficulty: | --- |
Description
benzman1981
2007-07-25 18:19:56 UTC
No P1 issue, you can easily select the language and currency format in that dialog and need not use "automatic". At least there is a documentation issue because the purpose of format "automatic" is not explained in the help. But I think too, that DM cannot be right. hi, as far as I know this is for compatibility reason to the old binary formats (.sdc) if we remove this or change the currency to Euro these documents or better it's owner becomes twice as rich as before or has to pay nearly the double price as expected. @er Please close if the former comment is correct. Frank Correct. The automatic currency format is needed for compatibility with legacy documents and should not be used for new attributions. I take this issue as an enhancement though to hide these entries in the list of offered format codes if the format is not already used in the current context. Hi, this is not only solved by hiding this entry for real openoffice.org users. The problem also occurs if I use API. I have a Java program that creates a new openoffice.org variable in a writer document. For this variable I need to set the currency format. Now if I set the number format for it (kex index 20, for example), then the currency "DM" is used and not "EUR" as it seems to choose the automatic one. I retrive the indexes with the XNumberFormats interface and the call: xNumberFormats.queryKeys(NumberFormat.ALL,new Locale("de","DE",""),false); Maybe I do something wrong, but this is what the documentation says. Regards, Markus Hi Markus, So then the queryKeys() method should also not offer it. In fact both places use the same subroutine. And no, you don't do anything wrong, you'd "just" had to refrain from using the nasty automatic format. Unfortunately that isn't straight forward using the API. For each format returned by queryKeys() call getByKey() and inspect the util::NumberFormatProperties returned. If the Type is util::NumberFormat::CURRENCY check whether FormatString contains "[$", if it doesn't it is an automatic format. But why do you query for all formats if you want only currency formats? If you just want to apply some currency format matching the locale use util::XNumberFormatTypes::getStandardFormat(util::NumberFormat::CURRENCY,locale) instead. That never returns an automatic currency format. Eike Hello Eike, I actually need to provide a liste of all available formats and the only one that returns a wrong format string is the currency. The problem is, that I don't get any euro specific currency using the way I descibed early with the method queryKeys(). I just get the "DM" currencies. Otherwise I could just filter it. Thank you, Markus *** Issue 81277 has been marked as a duplicate of this issue. *** Reset assigne to the default "issues@openoffice.apache.org". |