Bug 59056 - Charts are moved between sheets when saving a spreadsheet created with 3.6
Summary: Charts are moved between sheets when saving a spreadsheet created with 3.6
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.0.0.1 rc
Hardware: x86-64 (AMD64) Linux (All)
: highest major
Assignee: Kohei Yoshida
URL:
Whiteboard: target:4.1.0 target:4.0.0
Keywords: regression
Depends on:
Blocks: 59335
  Show dependency treegraph
 
Reported: 2013-01-05 14:11 UTC by Graham P Davis
Modified: 2013-02-24 11:03 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Multiple-sheet calc document. Final page (12-month) contains two charts moved from other pages. (544.85 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-01-05 14:37 UTC, Graham P Davis
Details
Earlier version of spreadsheets that have not been opened with 4.0 b-2. (547.56 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-01-05 14:41 UTC, Graham P Davis
Details
spreadsheet to be used for test (621.10 KB, application/x-vnd.oasis.opendocument.spreadsheet)
2013-01-12 09:06 UTC, Michel Rudelle
Details
what you get when saving the previous file with LibO 4.0.0.1 (620.01 KB, application/x-vnd.oasis.opendocument.spreadsheet)
2013-01-12 09:10 UTC, Michel Rudelle
Details
Error message when reopening (14.63 KB, image/jpeg)
2013-01-21 16:29 UTC, Michel Rudelle
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Graham P Davis 2013-01-05 14:11:54 UTC

    
Comment 1 Graham P Davis 2013-01-05 14:37:01 UTC
Created attachment 72543 [details]
Multiple-sheet calc document. Final page (12-month) contains two charts moved from other pages.

Calc documents with multiple pages and more than one graph per page will, when reopened, have only one graph per page; all subsequent graphs will be displayed on the final page. 

This example was originally created with earlier versions of LibreOffice up to and including 3.5. After editing with 4.0 b-2, graphs were found to have been moved when the document was opened for a second time.
Comment 2 Graham P Davis 2013-01-05 14:41:19 UTC
Created attachment 72544 [details]
Earlier version of spreadsheets that have not been opened with 4.0 b-2.

This attachment shows how the original document looked before 4.0 shifted the graphs.
Comment 3 Joel Madero 2013-01-09 19:25:56 UTC
For this one:

Unfortunately without reproducible steps the QA team had to guess at how to reproduce the problem and were unable to do so. Marking as WORKSFORME as 2 of us can't reproduce. 

What we tried:

1. Open "Earlier version of spreadsheets that have not been opened with 4.0 b-2" with 4.1 Master build

2. View document, everything looks fine

3. Save document as a new name

4. Open new saved document with both 4.1 master and 3.6.4.3 release, both look fine. 

Compared with "Multiple-sheet calc document. Final page (12-month) contains two charts moved from other pages", we see the problem in that attachment but cannot reproduce.

When RC1 comes out this week, please retest the problem, maybe it was fixed in the mean time. If not, please reopen and give specific steps on how we can reproduce the problem (vs. just view the issue in an attachment). Also reopen as REOPENED if this is still an issue for you by RC1. 

Thanks for reporting!
Comment 4 Michel Rudelle 2013-01-11 12:10:00 UTC
Hi,
I reproduce on my own files. I prepared a spreadsheet more simple and I checked on French QA list that the example is reproducible.
I was about to report but I will do that after testing with RC1
Comment 5 Michel Rudelle 2013-01-12 09:06:20 UTC
Created attachment 72891 [details]
spreadsheet to be used for test
Comment 6 Michel Rudelle 2013-01-12 09:10:17 UTC
Created attachment 72892 [details]
what you get when saving the previous file with LibO 4.0.0.1
Comment 7 Michel Rudelle 2013-01-12 09:12:23 UTC
Hi,
The bug is still present on RC1

I created 2 ods files (see Comment #5 and Comment #6):
 - created_with_3.6 : original file created with 3.6.4 used to perform the test
 - created_with_3.6-saved_with_4.0rc1 : to show the result

1) load the original file "created_with_3.6"
2) open it with LO 4.0.0.1 - Sheet 3 (section) is presented
3) move to Sheet 2 (pleine section) without changing anything
4) "Save As" with a new name
5) reopen this new file

Current behaviour (you can see it with the second attached file):
charts were moved:
 1st sheet: nothing
 2nd sheet: charts 3-4-5
 3rd sheet: chart 2
 Chart 1 has disappeared

Expected behaviour:
charts are in the same position as the original:
 1st sheet: charts 1-2
 2nd sheet: charts 3-4
 3rd sheet: chart 5

Important: Notice that the result is different if at point 3 you move to another sheet than Sheet2

Version 4.0.0.1 (Build ID: 527dba6f6e0cfbbc71bd6e7b88a52699bb48799)on Vista and W7
Comment 8 Graham P Davis 2013-01-12 11:51:49 UTC
As has been pointed, this problem continues with 4.0.0 rc1, however, I've found a fix! Actually, it's more a get-around than a fix.

The default for anchoring charts is "to cell" and, with that setting, charts get shunted around willy-nilly after closing and re-opening the document. However, when I changed all the charts to be anchored "to page" and shut and re-opened the book, the charts stayed on the original pages.
Comment 9 Joel Madero 2013-01-14 16:05:01 UTC
Since there are two users confirming this problem independently I'm going to mark as NEW:

New (Confirmed)
Major (charts is a major component of LibreOffice, having version 4 break a bunch of files made in 3.6 would not be good upon release)
Highest (default for Major is high, this is a regression which can affect a lot of users, marking as HIGHEST)

Regression
Comment 10 Michel Rudelle 2013-01-21 16:29:51 UTC
Created attachment 73390 [details]
Error message when reopening

Hi,
Maybe this can give a hint:
1/ Open the file "spreadsheet to be used for test" with LiBO 4
2/ Without doing nothing,  save it with a new name
3/ Reopen it with LiBO 4 => the file is corrupt (see attached screenshot)

Systematic behaviour confirmed on the French list qa.fr:
Version 4.0.0.1 (Build ID: 527dba6f6e0cfbbc71bd6e7b88a52699bb48799)
Vista
LO 4.0.0.1+ (Build ID: baa9a119dabfc5e5dbb5c174cebf8c24298bad6)
Windows 7 Home Premium
Comment 11 Kohei Yoshida 2013-01-25 15:30:11 UTC
I got it.

To reproduce this one, it's important to NOT touch or move the chart after it's been pasted onto the new sheet.  You can see that right after it's pasted, the anchor icon is at the top-left corner regardless of where the chart has landed.

The chart is actually underneath those two other ones.
Comment 12 Kohei Yoshida 2013-01-25 15:36:28 UTC
I'll take a look at this.
Comment 13 Not Assigned 2013-01-25 18:04:23 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#59056: Re-calculate cell anchor position of a pasted drawing object.



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 14 Kohei Yoshida 2013-01-25 18:45:14 UTC
I think the fix for Bug 59325 resolved the issue of drawing objects jumping from one sheet to another.  What I fixed is the problem of incorrect cell anchoring position within the sheet right after the paste.
Comment 15 Not Assigned 2013-01-27 01:00:57 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

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

fdo#59056: Re-calculate cell anchor position of a pasted drawing object.


It will be available in LibreOffice 4.0.1.

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 Graham P Davis 2013-01-28 09:57:13 UTC
(In reply to comment #15)
> Kohei Yoshida committed a patch related to this issue.
> It has been pushed to "libreoffice-4-0":

> 
> It will be available in LibreOffice 4.0.1.

I hope I'm misunderstanding the implication of this statement and that this fix will be included in the final release of 4.0.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.

I downloaded http://dev-builds.libreoffice.org/daily/libreoffice-4-0/Linux-x86_10-Release-Configuration/current/libreoffice-4-0~2013-01-27_12.55.41_LibO-Dev_4.0.1.0_Linux_x86_rpm.tar.gz and tried to install but got some error messages:
error: Failed dependencies:
        libfreetype.so.6 is needed by lodevbasis4.0-core04-4.0.1.0-0.i586
        libgnomevfs-2.so.0 is needed by lodevbasis4.0-gnome-integration-4.0.1.0-0.i586
        libgconf-2.so.4 is needed by lodevbasis4.0-gnome-integration-4.0.1.0-0.i586

I managed to find a module that satisfied the first dependency but the ones I tried for the remaining two were unsuccessful.
Comment 17 Kohei Yoshida 2013-01-28 14:44:53 UTC
(In reply to comment #16)
> (In reply to comment #15)
> > Kohei Yoshida committed a patch related to this issue.
> > It has been pushed to "libreoffice-4-0":
> 
> > 
> > It will be available in LibreOffice 4.0.1.
> 
> I hope I'm misunderstanding the implication of this statement and that this
> fix will be included in the final release of 4.0.0.

Nope. That message means what it says: it'll be available in 4.0.1, not 4.0.0.
Comment 18 Kohei Yoshida 2013-01-28 14:54:04 UTC
I just sent a review request for 4.0.0 inclusion, but I'm not sure if we can make it in.  It's rather late for 4.0.0...

https://gerrit.libreoffice.org/#/c/1899/

It needs 2 more reviews and sign-offs for this to be included into 4.0.0 final.
Comment 19 Not Assigned 2013-01-28 16:19:33 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-4-0-0":

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

fdo#59056: Re-calculate cell anchor position of a pasted drawing object.


It will be available already in LibreOffice 4.0.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 20 Graham P Davis 2013-01-28 16:23:28 UTC
I'm sorry I wasn't able to bring this fault to your attention any earlier but I generally use openSUSE version of LibreOffice. It was when I was having trouble with losing graphs in Calc in their implementation of LO 3.6.3 (https://bugzilla.novell.com/show_bug.cgi?id=794698) that I experimented with the version of 3.6.4 from your site and thence to 4.0.0 where I found more graphs going walkabout, but in a different way.
Comment 21 Kohei Yoshida 2013-01-28 17:29:06 UTC
Graham, no problem at all.
Comment 22 Kohei Yoshida 2013-01-28 17:29:28 UTC
This is now in the 4.0.0. branch.  I'll mark this fixed.
Comment 23 Graham P Davis 2013-01-28 19:40:24 UTC
(In reply to comment #22)
> This is now in the 4.0.0. branch.  I'll mark this fixed.

That's great. Just tested http://dev-builds.libreoffice.org/daily/libreoffice-4-0/Linux-x86_64_11-Release-Configuration/2013-01-28_08.35.05/libreoffice-4-0~2013-01-28_08.35.05_LibO-Dev_4.0.1.0_Linux_x86-64_rpm.tar.gz and it looks fine to me. My failure to install referred to in comment #16 was all my fault.
Comment 24 Kohei Yoshida 2013-01-29 00:47:30 UTC
I guess the status was changed in error?  Marking it fixed once again.
Comment 25 Graham P Davis 2013-02-02 19:17:33 UTC
Hmm, I didn't change the status - at least, not deliberately. Anyway, I've just tested 4.0.0 rc3 and the fix is working OK there too.