Bug 82503 - FORMATTING: Conditional formatting not copied
Summary: FORMATTING: Conditional formatting not copied
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3.0.0.beta1
Hardware: Other All
: highest major
Assignee: Markus Mohrhard
URL:
Whiteboard: BSA target:4.4.0 target:4.3.2
Keywords: bibisectRequest, regression
: 84276 (view as bug list)
Depends on:
Blocks: mab4.3
  Show dependency treegraph
 
Reported: 2014-08-12 10:18 UTC by Russell Nile
Modified: 2015-12-17 10:40 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Russell Nile 2014-08-12 10:18:46 UTC
Problem description: 

Steps to reproduce:
1. Set a single cell with a conditional format
2. Try to copy and paste that to a group of subsequent cells
3. The success of the operation appears to be OK, but when you save/exit/restart/reload the document the conditional formatting is gone most of the time

Current behavior:
Copy/paste of conditional formats to a group of cells does not work properly

Expected behavior:
Expected the conditional format

NOTE: The management of the conditional format is also pretty ugly.  It doesn't seem to group like or near cells together as I'd expect.

              
Operating System: Windows 7
Version: 4.3.0.4 release
Comment 1 ign_christian 2014-08-12 10:29:48 UTC
(In reply to comment #0)
> 3. The success of the operation appears to be OK, but when you
> save/exit/restart/reload the document the conditional formatting is gone
> most of the time
Could you define what you did most of the time to reproduce the problem?
What file format (xls/xlsx/ods)?

> NOTE: The management of the conditional format is also pretty ugly.  It
> doesn't seem to group like or near cells together as I'd expect.
If you talked about CF manage after such operations like copy/cut-paste, I feel it's been accomodated in another bug report. You can do searching in this Bugzilla to find intended bug report.
Comment 2 Russell Nile 2014-08-12 10:59:29 UTC
What I did was to define a condition where if CM62 was less than the value of CM61 it used a style I defined as "Negative performance" (which just showed the cell in a red color).  This works OK, but if I copied the cell and did a paste special/format to the subsequent set of cells (CN62:CT62) the effect would show at the moment but if I save/exit and come back in the pasted formatting would be gone.

The document was stored as .ods.  

The note about the CF management was kind of an extra thought (but potentially germane to the issue).
Comment 3 sophie 2014-08-12 12:55:21 UTC
Changing Component to Spreadsheet - Sophie
Comment 4 ign_christian 2014-08-12 14:46:23 UTC
I understand what you meant. Not filesave problem, already a problem while we do copy-paste cell containing the CF. 

It looks ok after pasting, but we can verify that pasted cells not contain CF. What is displayed in pasted cells is incorrect.

Simple steps to verify the problem:
1. In new sheet, select cell A1 
2. Tab: Format > Conditional Formatting > Condition > OK
3. Verify in tab Format > Conditional Formatting > Manage : we have 1 CF with Range A1 > OK
4. Copy cell A1 and paste to cell B1
5. Still in cell B1, verify in tab Format > Conditional Formatting > Manage : no CF with Range B1

Reproduced with LO 4.3.1.1, 4.3.0.3, 4.3.0.1, 4.3.0.0.beta1

Not reproduced with LO 4.2.6.2

Tested on Ubuntu 12.04 x86
Comment 5 Dominik 2014-08-13 16:06:59 UTC
This has been driving me crazy for a while now. It seems this bug has evolved over the recent months, as I think I first noticed problems with copying/pasting conditional formatting sometime in the 4.2 series but it behaved somewhat different then.

I was very happy to see it was apparently fixed in 4.3 only to discover the changes weren't there after save/close/reload.

I tested this both in Linux and OS X.
Comment 6 Markus Mohrhard 2014-08-16 01:17:24 UTC
I have a fix. A new copy method for single cells was missing the handling for conditional formatting.

The whole bug only happens for single cell copy&paste.
Comment 7 Commit Notification 2014-08-16 01:26:20 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8c9014cc6e5a502f5719f17c111c29448d4d6f6b

copy conditional formatting for single cells, fdo#82503



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2014-08-16 01:26:34 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=17f6f60c1c20782fb1cde69b949b97c2f3b0d830

add test case for fdo#82503



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 9 Markus Mohrhard 2014-08-16 01:28:34 UTC
review request for 4-3 at https://gerrit.libreoffice.org/#/c/10942/
Comment 10 Markus Mohrhard 2014-08-18 06:13:46 UTC
*** Bug 81611 has been marked as a duplicate of this bug. ***
Comment 11 Commit Notification 2014-08-18 06:38:46 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3dc5743ad17fed7cc05a90457e6c0b92eb9cb460&h=libreoffice-4-3

copy conditional formatting for single cells, fdo#82503


It will be available in LibreOffice 4.3.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 12 ign_christian 2014-08-31 03:03:26 UTC
Thanks Markus. I can verify fixed with:

Version: 4.3.2.0.0+
Build ID: 266a9536b5abf4c36fed1785ae657da923bbbb8d
TinderBox: Linux-rpm_deb-x86@45-TDF, Branch:libreoffice-4-3, Time: 2014-08-29_03:57:12

Btw Bug 81611, which is marked as dupe, still not fixed. The CF on cell A1 in 'Sheet1_2' not copied.
Comment 13 Lionel 2014-09-24 17:10:13 UTC
*** Bug 84276 has been marked as a duplicate of this bug. ***
Comment 14 m_a_riosv 2014-11-01 00:59:51 UTC
*** Bug 85701 has been marked as a duplicate of this bug. ***
Comment 15 Robinson Tryon (qubit) 2015-12-17 10:40:54 UTC Comment hidden (obsolete)