Bug 76710 - FILESAVE: CONDITIONAL FORMATTING is lost after deleting sheet and saving to ODS.
Summary: FILESAVE: CONDITIONAL FORMATTING is lost after deleting sheet and saving to ODS.
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.2.1 release
Hardware: All Linux (All)
: highest major
Assignee: Kohei Yoshida
URL:
Whiteboard: BSA target:4.3.0 target:4.2.5
Keywords: regression
Depends on:
Blocks: mab4.2
  Show dependency treegraph
 
Reported: 2014-03-27 21:36 UTC by kvr2007
Modified: 2014-06-05 03:59 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
A file with two sheets and sample conditional formatting in Sheet2 (10.80 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-03-27 21:36 UTC, kvr2007
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kvr2007 2014-03-27 21:36:46 UTC
Created attachment 96496 [details]
A file with two sheets and sample conditional formatting in Sheet2

Problem description: 

When I create conditional formatting (3 conditions) for the whole column everything works perfectly. However, if there is a preceding sheet, it is deleted and the file is saved and reopened the conditional formatting is lost. This does not happen when I delete any subsequent sheets, or move the sheet to be deleted after the one with conditional formatting.

Steps to reproduce:

1. Create an *.ods file with two sheets
2. Create conditional formatting in the second sheet
3. Delete the first sheet, save the document and close Calc
4. Reopen the spreadsheet

Current behavior:

Upon reopening conditional formatting is lost

Expected behavior:

Upon reopening conditional formatting is preserved
              
Operating System: Ubuntu
Version: 4.2.2.1 release
Comment 1 kvr2007 2014-03-28 13:35:40 UTC
Just checked this issue on Libreoffice 4.1.2.3 for Windows and it did NOT reproduce.
Comment 2 Joel Madero 2014-05-01 04:22:46 UTC
Well - that's pretty nasty ;) 

Thank you for reporting this issue! I have been able to confirm the issue on:
Version: 4.3.0.0.alpha0
Date:   Thu Apr 24 21:43:16 2014 +0300
Platform :Ubuntu 14.04
DE: GNOME3

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
As I've been able to confirm this problem I am marking as:

New (confirmed)
Major - loss of data
Highest - MAB, regression

Keywords - regression

Whiteboard Status -

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
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 and join us on freenode at #libreoffice-qa

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 Jean-Baptiste Faure 2014-05-01 06:47:54 UTC
Reproducible with LO 4.2.5.0.0+ under Ubuntu 14.04 x86-64
Works as expected in LO 4.1.6.

Best regards. JBF
Comment 4 Kohei Yoshida 2014-05-12 14:28:12 UTC
Maybe related to Bug 78402, since the range for conditional formatting is relative.  The same code handles reference ranges both for conditional formatting and validity data range.

I'll look at this later.
Comment 5 Kohei Yoshida 2014-05-13 19:59:02 UTC
(In reply to comment #4)
> Maybe related to Bug 78402, 

Not quite related, though the code in question is in the neighborhood of the code affecting Bug 78402.
Comment 6 Kohei Yoshida 2014-05-13 20:27:47 UTC
I'll take care of this.
Comment 7 Commit Notification 2014-05-14 02:47:59 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#76710: Write test for this.



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-05-14 02:48:13 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#76710: Adjust sheet position of conditional format entries.



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 Kohei Yoshida 2014-05-14 02:48:31 UTC
4.2 backport: https://gerrit.libreoffice.org/9350
Comment 10 Commit Notification 2014-05-16 15:20:58 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

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

fdo#76710: Adjust sheet position of conditional format entries.


It will be available in LibreOffice 4.2.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 11 Kohei Yoshida 2014-05-16 15:22:41 UTC
Fixed in 4.2.
Comment 12 Jean-Baptiste Faure 2014-06-05 03:59:43 UTC
Verified fixed for LO 4.2.6.0+ and 4.3.0.0.beta2 under Ubuntu 14.04 x86-64.
Thank you very much. :-)
JBF