Bug 81939 - FORMATTING: Opening xlsx alters number format code 00\.00\.00\.000\.0 to 00.00.00.000.0
Summary: FORMATTING: Opening xlsx alters number format code 00\.00\.00\.000\.0 to 00.0...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.4.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Laurent Balland
URL:
Whiteboard: target:5.3.0
Keywords: regression
: 81222 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-07-31 04:48 UTC by w.a.rummler
Modified: 2016-10-25 18:55 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Small example where cell format string is not preserved on LO re-open. (4.10 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2014-07-31 04:48 UTC, w.a.rummler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description w.a.rummler 2014-07-31 04:48:59 UTC
Created attachment 103715 [details]
Small example where cell format string is not preserved on LO re-open.

Lubuntu 14.04 with up-to-date repo LO.

The attached file was created by entering 202100083 in A1 and setting the cell format string to "00\.00\.00\.000\.0" (without quotes) then saving as xlsx.

When it's reopened in LO, the format string is changed to "00.00.00.000.0" (without quotes).

I'm pretty sure that whatever's happening is happening during the LO open operation, since the format string looks fine in the XML and e.g. is imported fine by EPPlus.

Also tested on a separate Windows 7 Excel 2013 installation, and the format was preserved there on reopening.

Does not occur with ods.
Comment 1 Owen Genat (retired) 2014-08-01 05:56:44 UTC
Confirmed under GNU/Linux x86_64 using v4.2.5.2. Status set to NEW. Platform to All. Minor amendment to summary.
Comment 2 tommy27 2016-04-16 07:24:05 UTC Comment hidden (obsolete)
Comment 3 w.a.rummler 2016-04-17 04:50:20 UTC
Still present in 5.1.2 on Windows 10 Pro 64-bit. No changes in behavior.

Not present in 3.3.0 on Windows 10 Pro 64-bit.
Comment 4 Laurent Balland 2016-06-18 17:42:07 UTC
*** Bug 81222 has been marked as a duplicate of this bug. ***
Comment 5 Laurent Balland 2016-06-18 20:19:08 UTC
Escape character is intentionally removed here:
http://opengrok.libreoffice.org/xref/core/sc/source/filter/oox/numberformatsbuffer.cxx#1885
Comment 6 Laurent Balland 2016-06-26 11:09:49 UTC
Add a test file to test the commit: attachment 125912 [details]
Comment 7 Commit Notification 2016-06-29 18:15:41 UTC
Laurent Balland-Poirier committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7c6a8f404bad90fb4d96dbf75e8824f673e16899

tdf#81939 Remove escape char only for fraction

It will be available in 5.3.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.
Comment 8 Commit Notification 2016-07-03 16:52:39 UTC
Laurent Balland-Poirier committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e364e52b9a551f78ff477939abbc555a47eb02ce

tdf#81939 Add qa unit test

It will be available in 5.3.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.