[Libreoffice-bugs] [Bug 125137] Concatenating formatted numbers should respect the language formatting and not change it to user default

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Jul 17 13:42:09 UTC 2020


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

--- Comment #7 from csongor at halmai.hu ---
(In reply to Xisco Faulí from comment #6)

> > Example
> > 
> > =TEXT(12.34567;"###.##") returns the text 12.35
> > 
> > =TEXT(12.34567;"000.00") returns the text 012.35
> 
> Hello csongor at halmai.hu,
> Does it fulfill your expectations ?

My answer has two parts.

Part #1.

No, it doesn't work this way. The following formula produces 3,14, not 3.14
("SZÖVEG" means "TEXT" in Hungarian):

=SZÖVEG(PI();"###.##")

More precisely, it works... weird... I attach a new file pi_text.ods. Both A1
and A2 have the same formula:

=SZÖVEG(PI();"###.##")

but in A1 there is 3,14 displayed (with comma) while in A2 there is 3.14 (with
decimal point). I cannot see any difference between the two cells, even the
formatting seems to be the same. If I am right and there is no difference
between the cells then it seems to be a bug in my LO which is:

Verzió: 6.3.3.2 (x64)
Build az.: a64200df03143b798afd1ec74a12ab50359878ed 




Part #2:

Even if it would work as expected, the sample spreadsheet should be changed a
lot. For example, instead of 

="<circle cx='"&A5&"' cy='"&B5&"' r='"&C5&"' stroke='black' stroke-width='3'
fill='red' />"

in D4, the following formula should be used:

="<circle cx='"&TEXT(A5;"###.##")&"' cy='"&TEXT(B5;"###.##")&"'
r='"&TEXT(C5;"###.##")&"' stroke='black' stroke-width='3' fill='red' />"

I am not saying it is an impossible change but it requires a deep understanding
about the calculations in the spread sheet and also requires a lot of cells to
modify. 

The following solutions would be better:

a) 
There was a document-wide setting how the numbers should be converted to
string. If the ODS file contains that the original author used English (USA)
then I can decide if I want to use their setting or use my own default.

b)
The cells that contain concatenation (like D5), should respect the formatting
setting. For example, if I format the cell this way:

in the Format -> Cells -> Cells dialog
- Category = Number
- Format = General
- Language = English (USA)

then the concatenation should display the numbers with English formatting, not
Hungarian. It should be "<circle cx='4.5'...>", not "<circle cx='4,5'...>"

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200717/a22544b1/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list