Bug 56742

Summary: conditional formatings got lost in copyed spreadsheet after fileclose
Product: LibreOffice Reporter: uwe.spyker
Component: CalcAssignee: Markus Mohrhard <markus.mohrhard>
Status: RESOLVED FIXED    
Severity: normal CC: davidoverend, scno, signup, skiani, ste_raab
Priority: high    
Version: 3.6.2.2 release   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard: target:4.0.0.0.beta0 target:3.6.5
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 44446    
Attachments: background color is related on cell C respectively F if contains letter F,S,N

Description uwe.spyker 2012-11-04 15:53:59 UTC
Created attachment 69521 [details]
background color is related on cell C respectively F if contains letter F,S,N

1. copying spreadsheet in same file (seems ok)
2. save file and close file
3. open the file again, conditional formatings in copyed spreadsheet ist gone

(in version 3.5.xx this don't happen)
Comment 1 Markus Mohrhard 2012-11-04 18:40:57 UTC
I need more details what you are doing. Please write a step by step instruction where you explain exactly what you're doing.
Comment 2 uwe.spyker 2012-11-15 16:51:44 UTC
copying the sheet1 in the file (right mouse on sheet1 Move/Copy Sheet; Copy and OK)
it seems, sheet1 and sheet2 have the same conditional formatings
save the file
close the file
open the file
the conditional formatings in sheet2 habe lost, in sheet1 it's still ok
Comment 3 france.lipuzic 2012-11-22 23:21:20 UTC
Any new about this bug? I have same problem...
Comment 4 Norbert Scheibner 2012-11-28 19:19:34 UTC
Copy and paste with conditional formattings is broken too here with 3.6.3.
To reproduce:

0. Configure a conditional formatting for a cell, for instance
   if cell value equals 1 choose cell style Heading.
1. Copy that cell by pressing CTRL-C.
2. Paste it anywhere else by pressing CTRL-V.
3. Conditional formatting is lost, which should not happen.
4. Paste special with CTRL-SHIFT-V only with the "Formats" selected.
5. Conditional formattings are back.

Uwe reports the same problem just for whole sheets. The difference is,
he copys his sheets without using the clipboard.

So I can confirm this really annoying bug.
Comment 5 Markus Mohrhard 2012-11-29 14:35:03 UTC
(In reply to comment #4)
> Copy and paste with conditional formattings is broken too here with 3.6.3.
> To reproduce:
> 
> 0. Configure a conditional formatting for a cell, for instance
>    if cell value equals 1 choose cell style Heading.
> 1. Copy that cell by pressing CTRL-C.
> 2. Paste it anywhere else by pressing CTRL-V.
> 3. Conditional formatting is lost, which should not happen.
> 4. Paste special with CTRL-SHIFT-V only with the "Formats" selected.
> 5. Conditional formattings are back.
> 
> Uwe reports the same problem just for whole sheets. The difference is,
> he copys his sheets without using the clipboard.
> 
> So I can confirm this really annoying bug.

This bug is fixed in 3.6.4. Please never hijack a bug report because it makes it harder to track the problems of the original reporter.
Comment 6 Markus Mohrhard 2012-11-29 14:39:10 UTC
(In reply to comment #2)
> copying the sheet1 in the file (right mouse on sheet1 Move/Copy Sheet; Copy
> and OK)
> it seems, sheet1 and sheet2 have the same conditional formatings
> save the file
> close the file
> open the file
> the conditional formatings in sheet2 habe lost, in sheet1 it's still ok

Ok I can reproduce this one. It is a nasty reference update problem.

Somehow I have missed a UpdateMoveTab in the copy sheet case. I'll look into it.
Comment 7 Markus Mohrhard 2012-12-05 01:29:45 UTC
*** Bug 57796 has been marked as a duplicate of this bug. ***
Comment 8 Not Assigned 2012-12-05 02:01:02 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f81676d11fc9e2ee86c60dafd6201663b6ee202f&g=libreoffice-4-0

adapt cond format range when copying sheets, fdo#56742


It will be available in LibreOffice 4.0.

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 Not Assigned 2012-12-05 02:01:21 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

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

adapt cond format range when copying sheets, fdo#56742



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 10 Stephan Raab 2012-12-09 14:43:59 UTC
Hello Markus,

i have seen you patch the bug in libreoffice-4-0 and the master branch, can you fix it also in libreoffice-3-6?
The bug is also available in libreoffice 3.6.4.3.

Thanks,
Stephan
Comment 11 Markus Mohrhard 2012-12-17 19:32:37 UTC
*** Bug 58414 has been marked as a duplicate of this bug. ***
Comment 12 Not Assigned 2012-12-18 17:08:18 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=664baba931bafd4e36fb822291b1d42c4554b88b&g=libreoffice-3-6

adapt cond format range when copying sheets, fdo#56742


It will be available in LibreOffice 3.6.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 13 skiani 2013-05-06 04:07:37 UTC
I'm still not able to copy cell(s) with conditional formatting from one sheet to another or within a sheet. It is not totally consistant, but appears to be most problematic if copying blank cells which have conditional associated. Formatting rules do not follow. I'm running 4.0.2.2 Windows.