Bug 52351 - EDITING: Remove "conditional formatting" not always successful
Summary: EDITING: Remove "conditional formatting" not always successful
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.6.0.2 rc
Hardware: Other All
: medium normal
Assignee: Markus Mohrhard
URL:
Whiteboard: BSA target:3.7.0 target:3.6.1
Keywords:
Depends on:
Blocks:
 
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:


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

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

Hello

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 3.6.0.2 (Build ID: 815c576)

Regards
Pierre-Yves
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":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=76f56b5e8d4abf17682aa75b7cf183b883809234

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":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=73a465ed443e820974600ee291e21ed6413ecb9d&g=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 3.6.1.2 (Build ID: e29a214) & Windows 7 64bits

Regards
Pierre-Yves
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]
Step4BeforeRemove

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]
AfterStep4

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.