Bug 61946 - FORMATTING: multiple conditional formatting lost after copy, save, reopen file
Summary: FORMATTING: multiple conditional formatting lost after copy, save, reopen file
Status: REOPENED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.6.5.2 release
Hardware: All All
: high major
Assignee: Eike Rathke
URL:
Whiteboard: target:4.3.0 target:4.2.0.0.beta2 tar...
Keywords:
: 57849 71707 (view as bug list)
Depends on:
Blocks: Conditional-Formatting
  Show dependency treegraph
 
Reported: 2013-03-07 08:29 UTC by mondane.woodworker
Modified: 2022-11-30 10:50 UTC (History)
12 users (show)

See Also:
Crash report or crash signature:


Attachments
Example spreadsheet (205.94 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-03-07 08:29 UTC, mondane.woodworker
Details
Expected result after re-opening (186.33 KB, image/png)
2013-03-07 08:30 UTC, mondane.woodworker
Details
test file coditional format (13.45 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-06-21 12:14 UTC, VLB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mondane.woodworker 2013-03-07 08:29:24 UTC
Created attachment 76082 [details]
Example spreadsheet

This bug looks like a duplicate of 54464, 57050 and 59288 . Because I don't use autofill and have multiple conditional formatting per cell, I think it's a differrent bug.

How to reproduce:

- open the attachment 'urenregistrate_2013.ods
- go to sheet 'Februari'
- select D1:D30
- copy
- go to sheet 'Januari'
- select B1:AF30
- special paste, uncheck all but 'Formatting' in 'Selection'
- save file
- close file
- open file

Now, the conditional formatting for cells Januari.B1:AF30 aren't there anymore. 

NB Information in LibreOffice about:

Version 4.0.1.1 (Bouw-id: 400m0(Build:1))

Installed from PPA: https://launchpad.net/~libreoffice/+archive/libreoffice-4-0
Comment 1 mondane.woodworker 2013-03-07 08:30:36 UTC
Created attachment 76083 [details]
Expected result after re-opening

In attachment urenregistratie_2013-expected_result.png, you can see what I expect to see after re-opening the spreadsheet.
Comment 2 Joel Madero 2013-03-07 18:15:46 UTC
Thank you for reporting this issue! I have been able to confirm the issue on:
Version 3.6.5.2 
Platform: Bodhi Linux 2.2 x64
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

As I've been able to confirm this problem on an earlier release I am changing the version number as version is the earliest version that we can confirm the bug, we use comments to say that the bug exists in newer versions as well.

Marking as:

New (confirmed)
Major - Loss of Data
High - default

Keywords - possibly regression (or at least worse in 4.0 release)

Additional Notes: As stated in keywords it seems like the problem is substantially worse in 4.0.0.3 release. The reason I say this is because in 3.6.5.2 upon pasting I see the correct behavior, in 4.0.0.3 release I never see the formatting correct at all. When I close the document in 3.6.5.2 and then reopen it, the formatting is applies to row one but nothing else, in 4.0.0.3 it's just not applied at all.

Markus - yours? 

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



LibreOffice is powered by a team of volunteers, every bug is confirmed (triaged) by human beings who mostly give their time for free. We invite you to join our triaging by checking out this link:
https://wiki.documentfoundation.org/QA/BugTriage

There are also other ways to get involved including with marketing, UX, documentation, and of course developing -  http://www.libreoffice.org/get-help/mailing-lists/. 

Lastly, good bug reports help tremendously in making the process go smoother, please always provide reproducible steps (even if it seems easy) and attach any and all relevant material
Comment 3 mondane.woodworker 2013-03-08 10:08:36 UTC
My Ubuntu LibreOffice was just updated from the PPA, the problem got worse;

- copying the formatting on sheet 'Januari' now even doesn't show the expected behavior after copying it from sheet 'Februari' and applying it.

In the about:

Versie 4.0.1.2 .1.2 (Bouw-id: 400m0(Build:2))
Comment 4 Mark12547 2013-04-17 05:08:46 UTC
Same bug (copy a sheet with conditional formatting, save, but on opening that file the copied sheet has none of the conditional formatting) also exists in:

LibreOffice Calc 4.0.2.2 (Build ID: 4c82dcdd6efcd48b1d8bba66bfe1989deee49c3)
running on Windows 7 Home Premium SP1 64bit (AMD A6-3620).
Comment 5 Jim 2013-06-11 21:36:35 UTC
I confirmed that this is still a bug on windoze versions 4.0.3.3 and development version 4.1.0.0 beta 2.  Also happens on 3.6.5.2 on my BSD unix box.  When I go into Formatting->Conditional Formatting->Edit, the strings to compare to are gone, so that might be a clue of where to start looking.

I'd like to add that it's very annoying to spend hours creating a spreadsheet for one's boss replete with colors that shift according to the status entered and then have it not work when saving/reopening!
Comment 6 Jim 2013-06-11 22:03:33 UTC
The bug does not exist on LibreOffice 3.4.3 or OpenOffice 3.2.0.  These both have the old style conditional formatting interface though with a hard limit of 3 conditions.
Comment 7 Joel Madero 2013-06-11 22:31:32 UTC
Markus is already cc'ed on this bug and he's likely to be the one to fix it but I know he's got a ton on his plate right now so ETA is hard to get to. But know that the appropriate people know about the bug
Comment 8 Mark12547 2013-06-24 00:30:02 UTC
Bug still exists in LibreOffice Calc 4.0.4.2 running on Windows 7 Home Premium SP1 (64-bit).
Comment 9 Joel Madero 2013-06-24 00:32:21 UTC
Please don't change any of the top info without knowing the QA workflow. Version is the oldest version where the problem exists, not the latest tested on, thanks!
Comment 10 rh_libre 2013-07-06 13:32:43 UTC
In bugs such as 57176, which is similar, the main problem was fixed in the nightly builds recently, so it might be worth reviewing this to see if it can be marked as FIXED (if it's fixed in the Dev Build) albeit awaiting roll-out to the Stable build.
Comment 11 Russe 2013-10-21 19:26:34 UTC
Same bug (copy a sheet with conditional formatting, save, but on opening that file the copied sheet has none of the conditional formatting) also exists in:

Version: 4.1.2.3
Mac OS X 10.6.8
Comment 12 Jacques Guilleron 2013-11-06 10:46:14 UTC
Hi all,

I reproduce too on LO 4.1.3.2 with Windows 7 Home Premium.
Now, before saving, if I edit the Conditional Formatting and write the sheet name in front of each range, the CF will be saved.
In the Example spreadsheet:
$Januari.AD1:AD30
$Januari.B1:AC30
I don't tried if only one range referenced works.

Jacques
Comment 13 Russe 2013-11-07 21:58:08 UTC
Still same bahaviour (copy a sheet with conditional formatting, save, but on opening that file the copied sheet has none of the conditional formatting) in:

Version: 4.1.3.2
Mac OS X 10.6.8
Comment 14 Russe 2013-11-17 11:15:01 UTC
(In reply to comment #13)
> Still same bahaviour (copy a sheet with conditional formatting, save, but on
> opening that file the copied sheet has none of the conditional formatting)
> in:
> 
> Version: 4.1.3.2
> Mac OS X 10.6.8

As well the same behavior in:
Version: 4.1.3.2
Mac OS X 10.8.5
Comment 15 Commit Notification 2013-11-23 11:47:50 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

resolved fdo#61946 use correct TabDelta for UpdateReference



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 16 Commit Notification 2013-11-23 12:00:53 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7c1aa21e95e9eae2fbac78c3061ed1be3c70d103&h=libreoffice-4-2

resolved fdo#61946 use correct TabDelta for UpdateReference


It will be available in LibreOffice 4.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 17 Eike Rathke 2013-11-23 12:11:12 UTC
Pending review for 4-1 as  https://gerrit.libreoffice.org/6768
Comment 18 Eike Rathke 2013-11-23 12:18:21 UTC
*** Bug 71707 has been marked as a duplicate of this bug. ***
Comment 19 Eike Rathke 2013-11-23 12:23:51 UTC
*** Bug 57849 has been marked as a duplicate of this bug. ***
Comment 20 Commit Notification 2013-12-01 00:41:43 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

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

resolved fdo#61946 use correct TabDelta for UpdateReference


It will be available in LibreOffice 4.1.5.

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 21 Tom V 2013-12-19 15:29:03 UTC
I just tried out the patch and it seems to work, but only when following the steps described by the OP. When you duplicate a worksheet, the bug still persists.

I'm using LibreOfficeDev version 4.1.5.0.0+ (Build ID: eb08e967a134d650a56c7c13f37cb254d46ecfe)
Comment 22 Tom V 2014-02-04 15:56:23 UTC
I just tried out the latest release (Version: 4.2.0.4, Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71), and in this version duplicating a sheet works (everything is copied over, conditional formatting included). After saving, closing and reopening the file, the conditional formatting is still there.

Manually creating a sheet and copying over the contents of another sheet does not work as expected. Conditional formatting is lost in this case, just as described by the OP. 

Is it possible the official 4.2 release does not include this patch?
Comment 23 Rob Kerth 2015-03-31 22:27:48 UTC
I have had this bug come out in version 4.4.0.3 using Win 7 64 bit pro.

Slight differences from above.

I have several hundred cells with formats based on one single condition determined by formula.

All works well when first entered.

When I save then re-open the file, the formating is preserved on the first few hundred cells but lost on all the remaining cells.
Comment 24 VLB 2015-06-21 12:14:06 UTC
Created attachment 116704 [details]
test file coditional format
Comment 25 VLB 2015-06-21 15:10:28 UTC
I have the same problem in LO 4.4.3.2 and LO 5.0.0.0 beta 3.

I have a test file "test-voorwaardelijke opmaak.ods" included.
Steps to reproduce:
1) open file "test-voorwaardelijke opmaak.ods"
2) Copy A1 to b1..r1 with "paste special" only use "styles"
3) Copy B1 to b2..r2 with "paste spcial" only use "styles"
4) save file
5) reopen file and the conditinal format is not in all cell
Comment 26 Martin Jungowski 2018-02-26 22:05:25 UTC
I have the same problem with LibreOffice 6.0.1 running under Linux (CentOS 7), MacOS X 10.13, and Windows 10. It is still not fixed yet.
Comment 27 groseth 2019-01-04 18:17:41 UTC
Not sure if this is the same bug, but still problematic with 6.1.4.2

When I save the file as excel (That originally was excel) it occasionally strips all the conditional formatting. 

Or so it seems. It appears to be just a visual bug. When I edit another field it updates itself and the one that should have been updated. It's just not redrawing in the correct order.
Comment 28 ChrisITSCM 2021-04-28 09:40:01 UTC
This also affects me on Version: 6.0.7.3, Build-ID: 1:6.0.7-0ubuntu0.18.04.10

I haven't found out what exactly has to happen to reproduce, but any time I restart my computer, all conditional formatting is gone, which is a real pain.

I save as Excel xlsx / Excel 2007-2013 format, since I need to exchange the document with a customer.
Comment 29 jwieczorek@velicante.eu 2022-11-30 10:50:55 UTC
Helou from Poland

I had the same problem, workbook .ods with many many formating sheets (colors, formulas etc), with macros!

I solved this problem with the following steps: 
- save the .ods like .xls format 97-2003
- open the saved .xls with LibreOffice (comeback formating ;)
- save as .ods 
- copy macros from old .ods to new .ods
- copy objects (buttons etc.) form old to new

with my workbook its worked, and I spent not a lot time fixed it.

write to me via mail if You'll find better way, and if You tested my solve

Jacek
jwieczorek@velicante.eu