Bug 125800 - Properties .ConditionalFormat, .ConditionalFormatXML, .ConditionalFormatLocal of a SheetCellRange wrongly show .Count=0
Summary: Properties .ConditionalFormat, .ConditionalFormatXML, .ConditionalFormatLocal...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
6.3.0.0.beta1+
Hardware: All All
: medium normal
Assignee: Aron Budea
URL:
Whiteboard: target:6.4.0 target:6.3.1 target:6.3....
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2019-06-08 13:20 UTC by Wolfgang Jäger
Modified: 2022-03-29 19:07 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
The demo annonced in the report (18.14 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-06-08 13:20 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 2019-06-08 13:20:03 UTC
Created attachment 152048 [details]
The demo annonced in the report

There are (at least?) 3 properties (see subject) of any SheetCellRange in Calc representing in different ways the conditional formatting set for the range.
The mentioned properties have a .Count property each. 

Using code that worked as expected in V 6.2.3.2 release, the 6.3.0.0.beta1 wrongly shows .Count=0 in a case where one CF is defined and correctly working. 
Trying to access one of the CF properties by index 0 nontheless, throws an error.

A Sub creating a CF for another range anew is correctly processed, the CF is working, but the same Sub does neither show it (.Count=0) nor allow to access it. 

(I experienced this bug in pursuit of this question in the "official" askbot site:
https://ask.libreoffice.org/en/question/196788/ . The attached example also was created as an attachment to my answer there.)

Steps to verify the bug:
1. Load the attachment with V 67.2.2.2 or older.
2. Run the Sub 'look' stepwise and check the mentioned properties in the watch panel of the Basic IDE.
3. Run thge Sub 'doItForThisSheetindexThisRange' and inspect the results in the sheet and in the IDE again.
4. Quit without saving.
5. Load the attachment with V 6.3.0.0.beta1.
6. Try to run both Sub as before and verify my claims insofar.
Comment 1 Xisco Faulí 2019-06-11 08:58:31 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=8c637b47d9de4b3a64c33a9c2ffe7ed220be2467

author	Gülşah Köse <gulsah.kose@collabora.com>	2019-03-25 21:08:22 +0300
committer	Andras Timar <andras.timar@collabora.com>	2019-05-04 10:21:44 +0200
commit 8c637b47d9de4b3a64c33a9c2ffe7ed220be2467 (patch)
tree 1657f72af2c99ebd0cdc027730fbb31e81eeefe7
parent c2ebd00b653c77985af36accde4b647b5279cb28 (diff)
tdf#122590 Import and export xlsx x14:cfRule element for type = cellis.

Bisected with: bibisect-linux64-6.3

Adding Cc: to Gülşah Köse
Comment 2 Commit Notification 2019-07-30 16:04:53 UTC
Aron Budea committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/9ad8f83912e6cf14d7b3b3e1cb2a79d819247c82%5E%21

tdf#125800: accessing cond format props in UNO throws error

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 3 Aron Budea 2019-07-31 02:25:56 UTC
This should be fixed now. Backports to 6.3 and 6.3.0 are in gerrit, let's hope they arrive in time for 6.3.0.3.

There's no unit test for now, I might add one sometimes, we'll see. Nevertheless, let's close this now.
Comment 4 Commit Notification 2019-07-31 09:44:22 UTC
Aron Budea committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/+/d9957993160b8775e3f763fa7239dd82086e19ef%5E%21

tdf#125800: accessing cond format props in UNO throws error

It will be available in 6.3.1.

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 5 Commit Notification 2019-07-31 14:05:47 UTC
Aron Budea committed a patch related to this issue.
It has been pushed to "libreoffice-6-3-0":

https://git.libreoffice.org/core/+/058c48ced89aa9068654767d88019512e54d047c%5E%21

tdf#125800: accessing cond format props in UNO throws error

It will be available in 6.3.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 Xisco Faulí 2019-08-02 15:22:03 UTC
Verified in

Version: 6.4.0.0.alpha0+
Build ID: 620fff54ca9cd04459cc5d963ef94d4438129fe4
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Aron Budea, thanks for fixing this issue!
Comment 7 Commit Notification 2022-03-29 19:07:15 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2fa01ae540e174452bf5cd763c1464cfe37af076

tdf#125800: sc_macros: Add unittest

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