Bug Hunting Session
Bug 93296 - When opening spreadseet, Currency cells formatting is changed.
Summary: When opening spreadseet, Currency cells formatting is changed.
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.0.0.5 release
Hardware: x86-64 (AMD64) Windows (All)
: medium major
Assignee: Laurent BP
URL:
Whiteboard: target:5.1.0 target:5.0.4
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2015-08-09 11:22 UTC by nj.hutchison
Modified: 2016-10-25 19:19 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Currency formatting bug 93296 (16.37 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-08-09 17:09 UTC, nj.hutchison
Details
Currency formatting bug 93296 (17.63 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-08-15 10:21 UTC, nj.hutchison
Details
Sample file with only to cells (11.35 KB, application/x-vnd.oasis.opendocument.spreadsheet)
2015-08-15 14:47 UTC, m.a.riosv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nj.hutchison 2015-08-09 11:22:44 UTC
When opening a spreadsheet created with a previous version of Libreoffice (v4), cells containing a currency value do not show the numbers after the decimal point. For instance, a cell containing £34.45 will display £34. The number format has been reset to 0 decimal places.
Comment 1 m.a.riosv 2015-08-09 15:02:05 UTC
Please could you attach a minimal sample file. Remember to delete any private information.
Comment 2 nj.hutchison 2015-08-09 17:09:04 UTC
Created attachment 117791 [details]
Currency formatting bug 93296

This file is an extract from a financial planning spreadsheet. The cells originally contained pounds and pence. In 5.0.0.5 they open as pounds only. As a workaround, the cell formatting can be manually changed to show 2 decimal places.
Comment 3 m.a.riosv 2015-08-09 20:59:33 UTC
But your sample open without decimals also with 4.4.
With 4,4 modifying a cell format adding two decimals
[$£-809]#.##0,00;[RED]-[$£-809]#.##0,00
once saved, opens correctly with 4.4 and 5.0,
Comment 4 nj.hutchison 2015-08-15 10:21:40 UTC
Created attachment 117931 [details]
Currency formatting bug 93296
Comment 5 nj.hutchison 2015-08-15 10:27:33 UTC
Comment on attachment 117931 [details]
Currency formatting bug 93296

This is hard to replicate so here is an extract from the spreadsheet that I originally observed the problem on. Hope that this demonstrates the problem OK.
Comment 6 nj.hutchison 2015-08-15 10:53:27 UTC
Comment on attachment 117931 [details]
Currency formatting bug 93296

It appears that when the spreadsheet is openned with 5.0.0.5, currency formats on the first worksheet have the number of decimal places reset to 0.
Comment 7 m.a.riosv 2015-08-15 14:47:03 UTC
Created attachment 117935 [details]
Sample file with only to cells

Reproducible, win7x64
Reproducible, win7x64
Version: 5.0.1.1 (x64) Build ID: 13f702ca819ea5b9f8605782c852d5bb513b3891
Version: 5.1.0.0.alpha1+ Build ID: 7d3fa6bae9f7a755eb2d0ca24bf1afd5f3646bb7
TinderBox: Win-x86@39, Branch:master, Time: 2015-08-09_08:38:08

Last version working.
Version: 4.4.6.0.0+ Build ID: 57e6d5e978e0a70aa036f19bd3328a71dd3a587f

Cell with 
A1:  [$£-809]#.##0,0;[RED]-[$£-809]#.##0,00
is opened properly.

Cell with:
A2:  [$£-809]#.##0,--;[RED]-[$£-809]#.##0,--
opened in LibreOffice as:
A2:  [$£-809]#.##0;[RED]-[$£-809]#.##0

the hyphens in decimal places are not imported.
Comment 8 nj.hutchison 2015-08-28 17:52:36 UTC
Some extra info may help.

I have tried this in LO 5.0.1.2 and compared result with an earlier version of LO. My computer is AMD and OS is Win10 Pro 64 bit.

Opened in LO 4.3.7.2. Currency formats in all sheets are imported as [$£-809]#,##0.--;[RED]-[$£-809]#,##0.--  .

Opened in LO 5.0.1.2. Currency formats in sheet 2 are imported as  [$£-809]#,##0.00;[RED]-[$£-809]#,##0.00 but in sheet 1 is [$£-809]#,##0;[RED]-[$£-809]#,##0 . Decimal places are not imported in sheet 1.

The spreadsheet used was created some years ago (possibly in Excel).
Comment 9 raal 2015-10-27 13:08:58 UTC
This seems to have begun at the below commit.
Adding Cc: to laurent.balland-poirier@laposte.net ; Could you possibly take a look at this one? Thanks

1c858f77fa979727c5674e04ccdcd52677a54d15 is the first bad commit
commit 1c858f77fa979727c5674e04ccdcd52677a54d15
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Mon Jun 1 20:51:34 2015 -0500

    source sha:4fee05e680217e876210b341f904df9441a0b7cd

    source sha:4fee05e680217e876210b341f904df9441a0b7cd

	author	Laurent Balland-Poirier <laurent.balland-poirier@laposte.net>	2015-04-03 09:59:37 (GMT)
committer	Eike Rathke <erack@redhat.com>	2015-04-28 00:19:02 (GMT)
commit	4fee05e680217e876210b341f904df9441a0b7cd (patch)
tdf#90133 Extend ODF: variable decimal in scientific format
Comment 10 Commit Notification 2015-11-04 10:40:59 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=3f970cf247ad96d1663462acb0be7f1c767d1ebf

tdf#93296 dashes in decimal part => 0 min decimal places

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.
Comment 11 Commit Notification 2015-11-04 10:45:29 UTC
Laurent Balland-Poirier committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=18be99af0b2a9ad6d7303ba6e594774b4292c316&h=libreoffice-5-0

tdf#93296 dashes in decimal part => 0 min decimal places

It will be available in 5.0.4.

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 12 raal 2015-11-19 20:57:50 UTC
Than for the fix!

Verified in Version: 5.1.0.0.alpha1+
Build ID: 32d4c03cba399ada807b8ec113a3928aa9e3ff7b
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2015-11-17_00:57:30
Comment 13 Robinson Tryon (qubit) 2015-12-17 10:30:43 UTC Comment hidden (obsolete)