LibreOffice 3.4.3 under Windows vista. (French UI) Step to reproduce : 1. In cells A1 to A3, enter decimal number like 1,1 1,12 1,123 (comma is decimal separator in french) 2. Format > Cell > Numbers, format code : 0,??? Police : Courier New Numbers are aligned with comma. 3. Save. Re-open the file, format is loss. replaced by 0,000
Can confirm the behavior with "0,???" in German and "0.000" with US English. But why don't you use "#,###" which is the right placeholder? With this it works. I don't know what the exact intention of the question mark is here.
Question mark is used for alignment at decimal separator.
Confirmed with Version: 4.4.0.1.0+ Build ID: 4774b2f0e6a0e895d1e63256147eaff59efd0eda TinderBox: Win-x86@51-TDF, Branch:libreoffice-4-4, Time: 2014-12-28_16:31:35 Locale: fr_FR
The problem is that ODF don't know how to save this format. If you save in XLS, format 0,??? is preserved. This bug requires first to enhance ODF. Change title accordingly.
Would it be possible to use number:decimal-replacement=" " to code '?' instead of '#'?
Reproducible with LO 5.1.0.1, Win 8.1 saved as xls the format is kept saved as ods the format is changed Remark: In my case the three numbers from step 1 are not fully "aligned" with the comma. The comma is horizontally not at the same position in the three cells. It is more right aligned the shorter the number. Should it be that way?
(In reply to A (Andy) from comment #6) > Remark: In my case the three numbers from step 1 are not fully "aligned" > with the comma. The comma is horizontally not at the same position in the > three cells. It is more right aligned the shorter the number. Should it be > that way? You need to use a "Monospaced" / "Fixed-Width" font in order to have a good alignment. With Proportional font, numbers and spaces don't have the same width, so alignment is not correct.
*** Bug 93469 has been marked as a duplicate of this bug. ***
Laurent Balland-Poirier committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=3ee66e306cf0ca9c2b56de26c28e8130d7b72f64 tdf#40517 Export/Import in ODF decimal replacement with space It will be available in 5.2.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Confirmed saving attachment 117948 [details] to ODS works now on reopen. It would be good to push the fix to 5.1 and 5.0. Version: 5.2.0.0.alpha0+ Build ID: d95d9d7f908419f397941ef60ac6ced3261c9b87 CPU Threads: 2; OS Version: Linux 4.2; UI Render: default; TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-01-19_00:40:21 Locale: en-US (en_US.UTF-8)
(In reply to Yousuf (Jay) Philips from comment #10) > Confirmed saving attachment 117948 [details] to ODS works now on reopen. It > would be good to push the fix to 5.1 and 5.0. This modification of ODF is not supported by previous versions: they are treating "0.???" as "0.--", so making more confusion than "0.000". So I think it can not be backported to 5.0. It may be possible for 5.1 if not too late.
(In reply to Laurent BP from comment #11) > This modification of ODF is not supported by previous versions: they are > treating "0.???" as "0.--", so making more confusion than "0.000". So I > think it can not be backported to 5.0. It may be possible for 5.1 if not too > late. Definitely not to late to backport into 5.1 through gerrit. :D
Proposed commit for 5.1 branch https://gerrit.libreoffice.org/21613/
Laurent Balland-Poirier committed a patch related to this issue. It has been pushed to "libreoffice-5-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=50a3c6b2f3b849885580b304929eabe4a71b9162&h=libreoffice-5-1 tdf#40517 Export/Import in ODF decimal replacement with space It will be available in 5.1.1. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Laurent Balland-Poirier committed a patch related to this issue. It has been pushed to "libreoffice-5-1-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=f3a1b5ef1d5d8995156092dcbd8ebc39608ff3bd&h=libreoffice-5-1-0 tdf#40517 Export/Import in ODF decimal replacement with space It will be available in 5.1.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
(In reply to Laurent BP from comment #11) > This modification of ODF is not supported by previous versions: they are > treating "0.???" as "0.--", so making more confusion than "0.000". So I > think it can not be backported to 5.0. It may be possible for 5.1 if not too > late. Just to make sure i got what you meant here. You modified LO's reading and writing of valid ODF with regards to questions marks in a custom format, which makes this change incompatible with older versions of LO.
(In reply to Yousuf (Jay) Philips from comment #16) > (In reply to Laurent BP from comment #11) > > This modification of ODF is not supported by previous versions: they are > > treating "0.???" as "0.--", so making more confusion than "0.000". So I > > think it can not be backported to 5.0. It may be possible for 5.1 if not too > > late. > > Just to make sure i got what you meant here. You modified LO's reading and > writing of valid ODF with regards to questions marks in a custom format, > which makes this change incompatible with older versions of LO. No. Valid ODF are opened and saved in the same way. I just wanted to emphasise that this modification of ODF can not be correctly interpreted with previous versions. So I think it is not a good idea to introduce such a modification in the middle of a branch.
I agree, this should not be backported to 5-0 To clarify, version 5.0.x (and some earlier) store a number format code of "0.??" in ODF as <number:number number:decimal-places="2" loext:min-decimal-places="2" number:min-integer-digits="1"/> which when reading the file results in a number format code of "0.00" instead, not preserving the original meaning. A number format code of "0.--" is stored in ODF as <number:number number:decimal-places="2" loext:min-decimal-places="0" number:min-integer-digits="1" number:decimal-replacement="--"/> and preserved when reading. With the change 5.1 will store "0.??" in ODF as <number:number number:decimal-places="2" loext:min-decimal-places="0" number:min-integer-digits="1" number:decimal-replacement=" "/> However, 5.0.x and earlier ignore the decimal-replacement character here and still produce a wrong "0.--" number format code.
Laurent Balland-Poirier committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/help/commit/?id=ed8d3d936d9008a34a1f59baee2c241157588dba tdf#40517 Update for '?' in decimal number format
Laurent Balland-Poirier committed a patch related to this issue. It has been pushed to "libreoffice-5-1": http://cgit.freedesktop.org/libreoffice/help/commit/?id=0caa881976b2213448b33fa5c31741759a5e4458&h=libreoffice-5-1 tdf#40517 Update for '?' in decimal number format
Laurent Balland-Poirier committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=d977a49ef0fb5377379dbb7516cad3ee8ecead41 tdf#40517 Unit test for question marks in number format It will be available in 5.2.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.