Bug 168943 - FORMATTING - Conditional formatting range incorrectly applied before restart
Summary: FORMATTING - Conditional formatting range incorrectly applied before restart
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
25.8.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:26.2.0 target:25.8.4
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Conditional-Formatting
  Show dependency treegraph
 
Reported: 2025-10-18 14:57 UTC by arli
Modified: 2025-11-27 15:35 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
example file, to reproduce delete all conditional formatting and follow the steps in the bug report (9.76 KB, application/vnd.oasis.opendocument.spreadsheet)
2025-10-18 14:57 UTC, arli
Details

Note You need to log in before you can comment on or make changes to this bug.
Description arli 2025-10-18 14:57:45 UTC
Created attachment 203413 [details]
example file, to reproduce delete all conditional formatting and follow the steps in the bug report

I am on Arch Linux with Hyprland, LibreOffice installed from the official Arch repos.
Haven't tested elsewhere, I can provide any configuration needed.

Some conditional formattings incorrectly apply to previously selected ranges after changing the range, until the sheet is closed and re-opened, or until direct formatting is manually cleared on the previous range. Example attached won't glitch when opened, but steps to reproduce are below.

Steps to reproduce:
- start with a simple multi-column table
- apply conditional formatting on D2:D100, stating to apply a style if formula "D2=C2" is true.
- all works as espected
- Go to Conditional -> Manage
- edit the existing conditional formatting by:
   - changing the range from D2:D100 to A2:A100
   - changing the formula from "D2=C2" to "$D2=$C2"
   - OK, OK

Result: Style is applied to both D2:D100 and A2:A100
Expected result: Style should be applied to A2:A100 only

Workaround: Save, Close, Reopen, all is fixed. No amount of fiddling without closing and reopening fixes the issue (including deleting and recreating the rule).

LibreOffice information:
Version: 25.8.2.2 (X86_64) / LibreOffice Community
Build ID: 580(Build:2)
CPU threads: 12; OS: Linux 6.17; UI render: default; VCL: gtk3
Locale: fr-FR (en_US.UTF-8); UI: en-US
25.8.2-3
Calc: threaded
Comment 1 tkakar 2025-11-09 23:48:27 UTC
COnfirmed. After changing the range of the conditional format, the old range (D2:D100) incorrectly keeps its formatting until the file is closed and reopened. The bug is present if both:

Version: 25.8.2.2 (X86_64)
Build ID: d401f2107ccab8f924a8e2df40f573aab7605b6f
CPU threads: 16; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 620(Build:0)
CPU threads: 16; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 2 tkakar 2025-11-09 23:51:53 UTC
Forgot to mention, this bug is not Linux specific. I was able to reproduce it on Windows 11.
Comment 3 Buovjaga 2025-11-11 20:01:30 UTC
No need to go through steps from scratch.

1. Open attachment 203413 [details]
2. Format - Conditional - Manage
3. Edit
4. Change range to B2:B3, OK, OK

Colour should jump to the right, not extend.

Bibisected with win64-25.8 to b5da114b67b29c91d16f2cb618cf30e7aa1b068d
Move code applying functor to selection from ScColumnData to ScTable
Comment 4 Mike Kaganski 2025-11-23 09:19:27 UTC
https://gerrit.libreoffice.org/c/core/+/194386
Comment 5 Commit Notification 2025-11-23 10:48:00 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/74f18755cf5230b950ff94749b1c3fa91516b899

tdf#168943: Handle non-multimarked mark data

It will be available in 26.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 Buovjaga 2025-11-23 16:30:03 UTC
Verified, thanks.

Arch Linux 64-bit
Version: 26.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 0390401c518e38367b71cefa1d7a64313fd005b8
CPU threads: 8; OS: Linux 6.17; UI render: default; VCL: gtk3
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: CL threaded
Built on 23 November 2025
Comment 7 Commit Notification 2025-11-27 15:35:44 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/7ff5692e8e0cf95a17d9e8d88a2f89af52c086e6

tdf#168943: Handle non-multimarked mark data

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