Bug 128403 - Inconsistent display and refresh of date formats FORMATTING / UI
Summary: Inconsistent display and refresh of date formats FORMATTING / UI
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.1.3.2 release
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:6.4.0
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-26 14:00 UTC by Douglas Crooke
Modified: 2019-10-27 09:59 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
New calc file with example copy/pasted into cells to demonstrate issue (on my machine at least) (11.96 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-10-26 14:05 UTC, Douglas Crooke
Details
Screen recording opening and viewing issue in test file (383.82 KB, video/mp4)
2019-10-26 14:17 UTC, Douglas Crooke
Details
result after fix (138.69 KB, image/png)
2019-10-27 09:59 UTC, Oliver Brinzing
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Douglas Crooke 2019-10-26 14:00:10 UTC
Description:
Observed using file with conditional formatting applied based on date in Column A.  The date should appear in a date format, but sometimes displays as a financial format.  This is not consistently displayed, and can change if the display of the cells is refreshed by scrolling off/on screen, or by a file save.
I also observe that the incorrect financial format seems to 'stick' to cells with a thick lower border defined on them.  Should be visible in attached spreadsheet, which was created by copy/pasting ing a small section of my personal accounts spreadsheet into a new file and removing all data except dates.
  The conditional format setup may be ambiguous as its is applied across multiple columns with date, test and number (financial) entries.

Steps to Reproduce:
1.Apply formatting combination to new spreadsheet
2.Open and / or save and dates are reformatted as financial numbers
3.Displayed format changes on refresh of screen (scroll on and off screen and displayed format changes
4. On save, some formats displayed change
5. Cells with border formatting seem to 'stick' at the financial format


Actual Results:
Copy existing format to new spreadsheet.  Dates shown in column display inconsistently, and can change when refeshed by scrolling them on and off screen.

Expected Results:
All entries in column A display as a Date format (e.g. Fri 2 Aug 19)


Reproducible: Sometimes


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
Version: 6.3.2.2
Build ID: 1:6.3.2-0ubuntu2
CPU threads: 4; OS: Linux 5.3; UI render: default; VCL: gtk3; 
Locale: en-GB (en_GB.UTF-8); UI-Language: en-US
Calc: threaded

OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Sandybridge Mobile 
OpenGL core profile version string: 3.3 (Core Profile) Mesa 19.2.1
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 19.2.1
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 19.2.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:
Comment 1 Douglas Crooke 2019-10-26 14:05:20 UTC
Created attachment 155326 [details]
New calc file with example copy/pasted into cells to demonstrate issue (on my machine at least)

When I open this file (after closing all Calc windows), first 4 date entries show as expected, the remaining entries show as cinancial/currency formatted numbers.
If I scroll down and then up, rows change displayed format except for row 6 whch remains in currency/financial format.
Comment 2 Douglas Crooke 2019-10-26 14:06:57 UTC
Note, I have been living with this issue for a while, only finally decided to report it after Ubuntu upgrade to 19.10 made no difference.
Comment 3 Douglas Crooke 2019-10-26 14:17:20 UTC
Created attachment 155327 [details]
Screen recording opening and viewing issue in test file

Screen recording to illustrate observed behaviour on the test / example file.  File opened, scrolled (when diplayed format changes), saved, entry changed which changes preceding formats.
Comment 4 Eike Rathke 2019-10-26 15:15:06 UTC

*** This bug has been marked as a duplicate of bug 117715 ***
Comment 5 Eike Rathke 2019-10-26 16:36:18 UTC
Or rather, this is not exactly a duplicate and can be fixed independently.
Comment 6 Eike Rathke 2019-10-26 18:43:47 UTC
Best: do not apply the conditional formatting on column A. It might even be that conditional formatting's number format should always take precedence over manual/hard number format. See bug 117715#c10
The current "sometimes does, sometimes not" in this test case is of course wrong.
Comment 7 Commit Notification 2019-10-26 19:49:38 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4dfb22acfe30f9322ecc0ad9d01b17a3814c87a2

Related: tdf#117715 tdf#128403 Couple ATTR_LANGUAGE_FORMAT ATTR_VALUE_FORMAT

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2019-10-26 19:53:30 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/f357831478ca063190eedeef12635117b8360277

Resolves: tdf#128403 Use ScPatternAttr::GetNumberFormat()

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Eike Rathke 2019-10-26 19:59:05 UTC
So far fixed, but the actual behaviour what will take precedence will depend on the outcome of bug 117715.
Comment 10 Oliver Brinzing 2019-10-27 09:59:41 UTC
Created attachment 155338 [details]
result after fix

checked with:

Version: 6.4.0.0.alpha1+ (x64)
Build ID: b7735d9c705bdec53ddb0077b93ae70ce4c2df48
CPU threads: 12; OS: Windows 10.0 Build 18362; UI render: GL; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-US
Calc: CL