Bug 85448 - FILESAVE: Result formatted with 'clear direct formatting' gets re-formatted after .ods save-load roundtrip
Summary: FILESAVE: Result formatted with 'clear direct formatting' gets re-formatted a...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-25 16:49 UTC by clemty
Modified: 2018-01-09 19:31 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Spreadsheet with illustration of problem (15.18 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-10-25 16:49 UTC, clemty
Details

Note You need to log in before you can comment on or make changes to this bug.
Description clemty 2014-10-25 16:49:10 UTC
Created attachment 108408 [details]
Spreadsheet with illustration of problem

Problem description:

When subtracting today() from a date the result is formatted as a date instead of a normal number (of days between dates). The quickest way to change that to a number is to remove the formatting with "clear direct formatting". After saving and loading, the text is re-formatted as a date, instead of looking the way it was when the document was saved.

Steps to reproduce:
1. put date into A1
2. put "=A1-today()" in B1
3. result in B1 should be formatted as date instead of integer
4. change to integer via "Format" -> "Clear direct formatting"
5. save document
6. load document
7. B1 contains the value formatted as a date, instead of integer

Current behavior: result is formatted as a date

Expected behavior: result is formatted the way it appeared when the document was saved
Comment 1 m_a_riosv 2014-10-25 18:02:29 UTC
Hi @clemty, thanks for reporting.

Reproducible.
Win7x64Ultimate
Version: 4.1.6.2
Build ID: 40ff705089295be5be0aae9b15123f687c05b0a
Version: 4.3.4.0.0+
Build ID: 77c6ce66696a997269b9fe4dfed1dc2e51ecd00e
TinderBox: Win-x86@42, Branch:libreoffice-4-3, Time: 2014-10-17_16:12:56
Version: 4.2.8.0.0+
Build ID: da2accb41f902c82436075dc9d0b85a6d7588fa1
TinderBox: Win-x86@42, Branch:libreoffice-4-2, Time: 2014-10-15_23:40:10
Version: 4.4.0.0.alpha1+
Build ID: 0a82645c360158f9cc0fdabe2a52f1ff8f981bed
TinderBox: Win-x86@39, Branch:master, Time: 2014-10-24_06:59:23

With AOO 4.1.1, clear direct formatting does nothing.

Seems that change to date format at opening is inheriting from OOo.
Comment 2 QA Administrators 2015-12-20 16:04:49 UTC Comment hidden (obsolete)
Comment 3 clemty 2015-12-21 21:51:04 UTC
still happens

Version: 5.0.4.2
Build ID: 2b9802c1994aa0b7dc6079e128979269cf95bc78
Comment 4 QA Administrators 2017-01-03 19:54:30 UTC Comment hidden (obsolete)
Comment 5 clemty 2017-01-04 22:08:33 UTC
still happens

Version: 5.2.3.3
Build ID: d54a8868f08a7b39642414cf2c8ef2f228f780cf
Comment 6 QA Administrators 2018-01-05 03:40:41 UTC Comment hidden (obsolete)
Comment 7 clemty 2018-01-09 19:31:05 UTC
works now (can no longer reproduce) because value in B1 is now formatted as an integer instead of a date:

1. put date into A1
2. put "=A1-today()" in B1
3. result in B1 is now correctly formatted as integer

cannot say if this fixes the save-load-roundtrip issue

Version: 5.4.3.2 (x64)
Build ID: 92a7159f7e4af62137622921e809f8546db437e5