Bug 58677 - CONDITIONAL FORMATTING lost after sheet has been copied to new document
Summary: CONDITIONAL FORMATTING lost after sheet has been copied to new document
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Master old -3.6
Hardware: Other All
: medium normal
Assignee: Markus Mohrhard
URL:
Whiteboard: target:4.0.0.1 target:4.1.0
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-23 10:21 UTC by Rainer Bielefeld Retired
Modified: 2013-01-08 17:01 UTC (History)
3 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 Rainer Bielefeld Retired 2012-12-23 10:21:48 UTC
This problem has been observed by john.pratt@cantab.net in "Bug 55032 - CONDITIONAL FORMATTING lost in copied sheet in same document after close / reopen"

Steps how to reproduce with Server Installation of  "LibreOffice  3.6.5.0+  English UI/ German Locale [Build-ID: 62b950d],{tinderbox: Win-x86_9-Voreppe pull time 2012-12-19 14:06:00}  on German WIN7 Home Premium (64bit), own User-Profile and Attachment 71072 [details] for Bug 55032

1. Open document from LibO Start Center
2. Click the "+" Sheet tab to create a new sheet
3. Click back to Sheet1 tab
4. Right click Sheet1 tab
   > Context menu
5. 'Move/Copy Sheet -> Copy -> To Document = New Document -> <OK>'
   > New document with seeht contents created
   Expected: A1 with yellow background
   Actual: No background, No CF at all
Comment 1 Rainer Bielefeld Retired 2012-12-23 10:41:42 UTC
Already [Reproducible] with 
* Server Installation of  "LibreOffice 3.6.1.0+  English UI/ German Locale [Build-ID:  b0aac2a] on German WIN7 Home Premium (64bit)  {tinderbox: Win-x86@9, pull time 2012-08-11 00:16:39}  /NEW CF dialog design/
* [Reproducible] with Server installation of Master "LOdev 3.6.0alpha0+  – WIN7 Home Premium (64bit) ENGLISH UI [Build ID: a502549]" (tinderbox: Win-x86@6-fast, pull time 2012-05-31 07:33:55) /old CF dialog design/

Still worked fine with 
*  Server installation of  Master "LOdev 3.6.0alpha0+  – WIN7 Home Premium (64bit) ENGLISH UI [Build ID: 475d0c5-829fc92-39746e8-206648e-fefd87]" (2012-02-14)
* server installation of "LibreOffice 3.5.7.2 rc German UI/Locale [Build-ID: 3215f89-f603614-ab984f2-7348103-1225a5b] on German WIN7 Home Premium (64bit) 

NEW due to Bug 55032 Comment #14

OS All because original reporter john.pratt@cantab.net seems to use Ubuntu. So we have good chance for a bibisect.
Comment 2 john.pratt 2012-12-23 12:13:43 UTC
@Rainer Bielefeld
I am using Windows XP when I have this problem (I use Ubuntu too, but am stuck on 3.5.x on there as I need to use this function for work).  I haven't checked 4.0beta2 on Ubuntu as I only have dongle internet on it.
Comment 3 Markus Mohrhard 2012-12-23 23:28:52 UTC
No bibisect needed.
Comment 4 Not Assigned 2012-12-25 20:09:27 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=350ae8294a8df78403fd8cdce56b9aeb8178e130&h=libreoffice-4-0

simplify cond format copy&paste code, fdo#58677


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 5 Not Assigned 2012-12-25 20:10:03 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

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

simplify cond format copy&paste code, fdo#58677



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 6 Markus Mohrhard 2012-12-25 20:37:56 UTC
The new copy&paste code should be able to handle copy&paste between different docs, Copy a sheet to a new doc, and fix some bugs that I noticed on the way.

Additionally it should be a lot faster than the old code.
Comment 7 john.pratt 2013-01-04 17:35:36 UTC
I have just tried this in the master and have not got it to work (Version 4.1.0.0.alpha0+ (Build ID: 6a393297ce6d99bbc4edefbf01ab9c5c6f0eff8)
TinderBox: Win-x86@6, Branch:master, Time: 2013-01-04_01:06:01).

Actual: no background, however, the conditional formatting does now exist in the new file.

The problem now is that the custom style ('john' in the example) is lost, so the conditional format doesn't do anything.

Shall I open a new bug?
Comment 8 Rainer Bielefeld Retired 2013-01-04 18:37:01 UTC
Indeed, still [Reproducible] with server  installation of  "4.1.0.0.alpha0+ (Build ID: c97a46ad210c4747af2309d0c75d9a0bdb642ed) TinderBox: Win-x86@6, Branch:master, Time: 2012-12-31_22:40:07  -  ENGLISH UI / German Locale  on German WIN7 Home Premium (64bit) with LO41 Masters User Profile.

In new document sheet copied due to original report still background still is missing

@john.pratt:
Please wait for Markus' comment

@Markus:
Any Idea what went wrong here?
Comment 9 Markus Mohrhard 2013-01-04 18:49:47 UTC
> @Markus:
> Any Idea what went wrong here?

Sounds not like a conditional format problem. I fear this might be a problem deeper down in the copy&paste code between different documents. Sadly the copy&paste between documents is a bit fragile and tends to break in obscure ways when we change something in the core.

Please open a new bug report and put me in CC.