Bug 81086 - Conditional formatting issue
Summary: Conditional formatting issue
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.5.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-09 07:45 UTC by helplibreoffice
Modified: 2014-07-16 20:11 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description helplibreoffice 2014-07-09 07:45:24 UTC
When copying a row with conditional formatting, a new rule is created.  If you use a row as a template, which is common practice, you wind up with thousands of rules.  If LO Calc could be "smart" and combine rules when appropriate that would be useful.
Comment 1 ign_christian 2014-07-09 07:54:55 UTC
Ah..it's been discussed few moments ago. Please reopen if you don't agree, and provide more explanation about your purpose.

*** This bug has been marked as a duplicate of bug 80768 ***
Comment 2 helplibreoffice 2014-07-10 01:31:27 UTC
(In reply to comment #1)
> Ah..it's been discussed few moments ago. Please reopen if you don't agree,
> and provide more explanation about your purpose.
> 
> *** This bug has been marked as a duplicate of bug 80768 ***

Thanks for finding that.  From what I can tell it is a different bug.

Reasons:
1) It happens on not just extended selection but using cut and paste as well.
2) The result is that the conditional formatting gets a new rule for each row.

I'll try to explain #2 a little more because it warrants a better explanation.

If you have rows 1-10, with column E having conditional formatting.  The rule is set up for E1:E10.  Nice and clean.

Now you copy rows 4-5 and insert the copies into rows 7-8.  Now you have Rows 1-12 in total.

Instead of LO Calc extending the conditional formatting rule to E1:E12, it will create multiple rules.

After doing this hundreds (or thousands of time), many features of LO Calc will start to fail, especially Sort.
Comment 3 Aprax 2014-07-14 13:22:24 UTC
I agree, the current process is wrong, fragmentation shouldn't occur.
I commonly use ranges that start at row 2 and extend 'forever' or at least until row 1048576  :)

I want those rules to apply for the entire range regardless of what I paste, whether or not I insert new rows or columns. And yes, the columns may need to be changed depending on where I insert a new column, but without fragmentation.

Having complained about this before, I received an explanation which wasn't really satisfactory but it works:

Insert a row, the CF rules haven't been fragmented.
Copy an existing row
Paste Special with the Formats option unticked (this is the one that screws things up).

and lo and behold, the CF rules haven't been fragmented.

BUT:
If you make a mistake and click Paste, the rules become fragmented.
If you press Undo once to revert the Paste the rules remain fragmented.
If you press Undo again to delete the row, the rules are no longer fragmented.

Truly, the process to Paste into a range containing CF should not fragment the rules and leave it to the user to create new rules for the new row if that's appropriate (but it likely never going to happen).
If you have a range that's less than infinite and you insert a row (or column) into the middle, then the range should be extended.
J
Comment 4 ign_christian 2014-07-14 13:43:52 UTC
Looks like same root with Bug 80768. But..I'm not a dev so I can't answer that :)

Let status UNCONFIRMED, waiting for experts to review this enhancement request
Comment 5 Joel Madero 2014-07-16 20:11:23 UTC
So - it seems like 4.3 might include this! Can you check it and confirm?

http://www.libreoffice.org/download/libreoffice-fresh/

On the bottom you'll see 4.3.0 under pre-release.

Setting as WFM at least for now. If you can try with 4.3.0 and see if it also works for you and then mark as Verified -> WFM. if you can still confirm the issue please set back to UNCONFIRMED and I'll try again.

Repro Steps:
1. New Spreadsheet
2. Select E1:E10
3. Click Format -> Conditional Formatting -> Condition
4. Set Cell Value Is Equal To 10, apply style "Result"
5. Select Row5 and Row6
6. Right click and copy the rows
7. Select Rows 7 & 8
8. Right Click -> Insert Rows Above

Result: One clean rule "E1:E12    Cell Value is = 0"

:)