Bug Hunting Session
Bug 52351 - EDITING: Remove "conditional formatting" not always successful
Summary: EDITING: Remove "conditional formatting" not always successful
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) rc
Hardware: Other All
: medium normal
Assignee: Markus Mohrhard
Whiteboard: BSA target:3.7.0 target:3.6.1
Depends on:
Reported: 2012-07-22 06:20 UTC by pierre-yves samyn
Modified: 2012-08-28 14:11 UTC (History)
0 users

See Also:
Crash report or crash signature:

Sample document (7.75 KB, application/vnd.oasis.opendocument.spreadsheet)
2012-07-22 06:20 UTC, pierre-yves samyn
Step4BeforeRemove (4.08 KB, image/png)
2012-08-28 12:54 UTC, pierre-yves samyn
AfterStep4 (5.71 KB, image/png)
2012-08-28 12:55 UTC, pierre-yves samyn

Note You need to log in before you can comment on or make changes to this bug.
Description pierre-yves samyn 2012-07-22 06:20:08 UTC
Created attachment 64496 [details]
Sample document


Remove "conditional formatting" not always successful, it depends on the procedure used.

Steps to reproduce:

1. Open attached sample document
2. Format> Conditional formatting> Manage

Dialog opens with 2 lines, respectively B1:B1048576 and B2

3. Select (mouse and <shift> or <Ctrl>) the 2 lines
4. Click Remove then Ok

Expected results : 
- chosen conditional formatting deleted
- "Is modified state" of document to true

Actual result :  "Is modified state" of document to false

5. "Save As", give another name e.g. "a.ods"
6. File> Reload (to be sure)
7. Format> Conditional formatting> Manage

Conditional formattings still there.

Platform : Windows 7 64bits and Version (Build ID: 815c576)

Comment 1 Markus Mohrhard 2012-07-23 21:06:43 UTC
Thanks for the bug report.

I think I understand the problem. The cell property is correctly deleted but the last cell column/row can't be removed from ScRangeList. I'll fix ScRangeList and adjust the caller.
Comment 2 Markus Mohrhard 2012-07-24 06:58:59 UTC
I have finally a fix for master but need a bit time to check that it is safe for the release branch. Will be only in master for now.
Comment 3 Not Assigned 2012-07-25 18:21:08 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":


delete conditional format entries that are removed, fdo#52351
Comment 4 Not Assigned 2012-08-06 16:25:25 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":


delete conditional format entries that are removed, fdo#52351

It will be available in LibreOffice 3.6.1.
Comment 5 pierre-yves samyn 2012-08-25 12:13:57 UTC
Hello Markus

(In reply to comment #4)
> Markus Mohrhard committed a patch related to this issue.
> ...
> It will be available in LibreOffice 3.6.1.

Still occurs with Version (Build ID: e29a214) & Windows 7 64bits

Comment 6 Markus Mohrhard 2012-08-28 11:59:50 UTC
I can't reproduce this with master. Can you please add detailed instructions how you were able to reproduce it?
Comment 7 pierre-yves samyn 2012-08-28 12:54:53 UTC
Created attachment 66220 [details]

Selection of all conditions then click the Remove button
Comment 8 pierre-yves samyn 2012-08-28 12:55:44 UTC
Created attachment 66221 [details]

After deleting the conditional formatting, the file is not considered changed: icon save button is not enabled, you can close without warning.
Comment 9 Markus Mohrhard 2012-08-28 13:45:24 UTC
Ok, this is a known but different problem. The dialog can at the moment only handle one selected element. This will be fixed for 3.7 but most likely not for 3.6

The bug I fixed here is that deleting a row or column with a conditional format, did not result in deleting the conditional format.
Comment 10 Markus Mohrhard 2012-08-28 14:11:23 UTC
Actually this is already fixed in master and can't be backported without problems.

I'm closing this bug for now, if I see a simple solution to fix this in 3.6 I will reopen and fix it.