As explained in LO's Community thread at https://ask.libreoffice.org/t/conditional-formatting-possible-bug-in-calc-24-2/103079 Calc 24.2.1.2 (and the previous 24.2) is handling the conditional formatting conditions in a different way that 7.6.x used to handle them. The thread contains screenshots and test files. The issue appears when there is set of conditions that apply to different but overlapping cell ranges. It would be no issue if there was a way to set priorities between ranges in the main Conditional formatting "Manage..." window, but the priorities are only settable inside the set of conditions of each separate range.
(In reply to barruel from comment #0) > The thread contains screenshots and test files. No test files there.
changed to »resolved…NOTOURBUG« because https://ask.libreoffice.org/t/conditional-formatting-possible-bug-in-calc-24-2/103079 bug on Layer8
(In reply to Werner Tietz from comment #2) > changed to »resolved…NOTOURBUG« Sorry but that makes no sense. We still need a spreadsheet sample with the problematic conditional formatting that shows a different result between LO 7.6 and 24.2 in order to try to replicate the problem.
Created attachment 193041 [details] Test file showing the reported issue
Comments about the test file attached: Two styles which apply white and gray backgrounds to every other row are applied to cells A4:I12;A13:I20 through formulas "MOD(ROW();2)=1" (for gray background) and "MOD(ROW();2)=0" (for white background). Then two separate sets of identical conditions apply styles to make text italic with formulas "AND(MOD(ROW();2)=1;OR($C4="NP";$C4="EB";$C4="CP")" (for grey background italic text) and "AND(MOD(ROW();2)=0;OR($C4="NP";$C4="EB";$C4="CP")". These are applied to cell ranges A4:I12 and A13:I20. Calc 7.6.x shows italic text when "NP", "EB" or "CP" is present in the $C4 or $C13 columns, as set in the Conditional formatting formulas. Calc 24.2.+ does not.
(In reply to Werner Tietz from comment #2) > changed to »resolved…NOTOURBUG« because > https://ask.libreoffice.org/t/conditional-formatting-possible-bug-in-calc-24- > 2/103079 bug on Layer8 No bug on layer 8. You can check it yourself with the test file attached. 7.6.x and 24.2+ display different things.
[Automated Action] NeedInfo-To-Unconfirmed
There seems to be some priority difference between LO 7.6 and 24.2, in the way different conditional format rules are applied on overlapping ranges. I am not sure whether this change is intentional or not. In Manage Conditional Format: * the first range is A4:I12, which has 2 conditional rules; both rules have a style that includes the italic format. * the second range, A4:I12;A13:I20, partially overlaps with the first one, and this second range also has 2 conditional rules; both of these rules do _not_ include the italic format in their respective styles. * there is a third range, A13:I20, which has 2 conditional rules; both rules have a style that includes the italic format. The rules for this third range are equivalent to the rules used for the first range, A4:I12. The resulting render in LO 7.6 shows the italic format, whereas in LO 24.8 alpha it does not. We could be tempted to criticize the way these ranges were originally formed, or whether these should be automatically and forcefully combined – to which I have expressed my opposition in other reports – but that would be off-topic. The main point here is that the resulting render is different, suggesting that the priority regarding the overlapping ranges is different in LO 24.2 than in LO 7.6. Please note that the priority regarding the conditions themselves, within each set of ranges, might or might not be the problem; we would need a different example in order to test this. The difference between LO 7.6 and 24.2 seems to be in how the overlapping ranges are combined; which exact set of conditions takes priority. Please also note that, in this sample file, the set of ranges are not necessarily equal; the overlapping is "partial" (A4:I12 vs A4:I12;A13:I20), but it could had been even more fragmented (say, A4:I14;A6:J20 or whatever). Again: I'm not suggesting to force the unification of ranges, and IDK whether this difference in priority was intentional; this sample case might just be a consequence of an intentional change in Calc.
This seems to have begun at the below commit in bibisect repository/OS linux-64-24.2. Adding Cc: to Paris Oplopoios ; Could you possibly take a look at this one? Thanks 9eca2989fd8c53037b0f95d7d8b715f16ee1d2a0 is the first bad commit commit 9eca2989fd8c53037b0f95d7d8b715f16ee1d2a0 Author: Jenkins Build User <tdf@maggie.tdf> Date: Wed Nov 1 20:18:46 2023 +0100 source edbc3a09edcf58a4738b4648811a065f3f55bc7c 158702: sc: Don't end handleConditionalFormat early | https://gerrit.libreoffice.org/c/core/+/158702
https://gerrit.libreoffice.org/c/core/+/164687
Mike Kaganski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/61580fcbd10bad2e0aab663d4c8fe43c1e01f92c tdf#160117: check bAnyCondition It will be available in 24.8.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.
Mike Kaganski committed a patch related to this issue. It has been pushed to "libreoffice-24-2": https://git.libreoffice.org/core/commit/53b8a4c687df83a91e584fb6afa6729d9669f454 tdf#160117: check bAnyCondition It will be available in 24.2.3. 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.
Tested both the test file posted here and my original .ods file showing the issue on March 14th build. Both files display correctly, just as LO 7.6 and Excel 2016 do. Great work. Thanks, Mike Kaganski.
Mike Kaganski committed a patch related to this issue. It has been pushed to "libreoffice-24-2-2": https://git.libreoffice.org/core/commit/a541f33b30e4c95ef69128e60ba4cc86ba8d585e tdf#160117: check bAnyCondition It will be available in 24.2.2. 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.
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/c6518dc58f76ad9b59a61dd3736abd62acc5fc57 tdf#160117: vcl_pdfexport2: Add unittest It will be available in 24.8.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.