Bug 163831 - Changed number format of a named CellStyle is not applied correctly
Summary: Changed number format of a named CellStyle is not applied correctly
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
24.8.2.1 release
Hardware: All All
: medium major
Assignee: Caolán McNamara
URL:
Whiteboard: target:25.2.0 target:24.8.4
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Calc-Styles Number-Format
  Show dependency treegraph
 
Reported: 2024-11-09 20:55 UTC by Wolfgang Jäger
Modified: 2024-11-20 03:28 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
example showing the reported bug and containing additional information (75.42 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-11-09 20:55 UTC, Wolfgang Jäger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfgang Jäger 2024-11-09 20:55:45 UTC
Created attachment 197505 [details]
example showing the reported bug and containing additional information

Cells which got assigned a named style should show numbers using that style.
Generally this is done.
But if you change the number format for that style the new format is not used for the preexisting cells using that style.
The situation is paradox: The new style is shown in the format dialog for such cells, but the actually displayed format is the old one.
Next paradox: After save/reload the new setting works as expected.
Comment 1 m_a_riosv 2024-11-09 22:53:19 UTC
Reproducible
Version: 24.8.3.1 (X86_64) / LibreOffice Community
Build ID: 65412f067af443213e726c93f137ccc85c9a1e06
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 665dce4442e48b133b9fe1a2eb792ed3ef81d90c
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded

Latest version that works on the ones I have installed.
Version: 24.2.6.2 (X86_64) / LibreOffice Community
Build ID: ef66aa7e36a1bb8e65bfbc63aba53045a14d0871
CPU threads: 16; OS: Windows 10.0 Build 26100; UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Comment 2 raal 2024-11-11 15:58:24 UTC
This seems to have begun at the below commit in bibisect repository/OS linux-64-24.8.
Adding Cc: to Caolán McNamara ; Could you possibly take a look at this one?
Thanks
 1f51c4735f250781a934772b559f606ba64e4424 is the first bad commit
commit 1f51c4735f250781a934772b559f606ba64e4424
Author: Jenkins Build User <tdf@maggie.tdf>
Date:   Sun Apr 21 22:01:18 2024 +0200

    source 79daf83584c6faab641b3d73999871b5c235d222

166387: Related: tdf#160056 add number format info to ScPatternAttr cache | https://gerrit.libreoffice.org/c/core/+/166387
Comment 3 Caolán McNamara 2024-11-15 12:34:00 UTC
reproducible, at worst we can revert, it was a relatively small speed up in the overall work for that task. But probably just missing a place where we should invalidate this cache.
Comment 4 Caolán McNamara 2024-11-18 17:29:28 UTC
https://gerrit.libreoffice.org/c/core/+/176727 for this
Comment 5 Commit Notification 2024-11-18 19:23:34 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2261734d88fa3bcfbaa037b0a2bc18cf582c3cf5

Resolves: tdf#163831 Invalidate cache if the style is modified

It will be available in 25.2.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 6 Caolán McNamara 2024-11-18 19:29:15 UTC
that works for me, backport to 24-8 in gerrit
Comment 7 Commit Notification 2024-11-19 09:40:23 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/0f1228ea0e66f90d8cbe1c58d85a9d05a0e3a598

Resolves: tdf#163831 Invalidate cache if the style is modified

It will be available in 24.8.4.

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 m_a_riosv 2024-11-20 03:28:21 UTC
Verified
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 03b2f4afc57973fa61284782f7e3d45be99f5eec
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded