Issue 91121 - Basic Currency type imposes its own formatting
Summary: Basic Currency type imposes its own formatting
Status: ACCEPTED
Alias: None
Product: App Dev
Classification: Unclassified
Component: scripting (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All Windows XP
: P3 Trivial
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-27 07:49 UTC by bmarcelly
Modified: 2017-05-20 11:29 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bmarcelly 2008-06-27 07:49:57 UTC
These results have been found in fr-FR and de-DE linguistic environment.
Write this short macro:

dim v as currency
dim a as string, b as string, c as string, d as string
v = 12345.6
a = Str(v)
b = CStr(v)
c = Format(v, "Currency")
d = Format(v, "# ##0.0000 \€")
MsgBox(a & chr(13) & b & chr(13) & c & chr(13) & d)

With fr-FR environment we get this (correct) result:
 12345.6
12345,6
12 345,60 €
12 345,6000 €

Change the first line of the macro: declare v as Currency instead of Double.
With fr-FR environment we now get this result:
 12345.6000
12345.6000
12345.6000
12345.6000

As you can see, CStr does not obey the decimal separator, Format does not obey the 
formatting strings.
Comment 1 kay.ramme 2008-06-27 14:51:40 UTC
Andreas, please take care of this ...
Comment 2 ab 2008-07-03 13:29:13 UTC
STARTED, 3.x
Comment 3 Marcus 2017-05-20 11:29:56 UTC
Reset assigne to the default "issues@openoffice.apache.org".