Bug 74325 - DATALOSS: Calc loses comments when (changed) file is saved
Summary: DATALOSS: Calc loses comments when (changed) file is saved
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.0.4 release
Hardware: x86-64 (AMD64) All
: highest blocker
Assignee: Kohei Yoshida
URL:
Whiteboard: target:4.3.0 target:4.2.1
Keywords: dataLoss, regression
: 60441 74304 74562 74759 75236 75325 75536 (view as bug list)
Depends on:
Blocks: mab4.2
  Show dependency treegraph
 
Reported: 2014-02-01 15:48 UTC by Stefan_Lange_KA@T-Online.de
Modified: 2015-12-15 22:22 UTC (History)
18 users (show)

See Also:
Crash report or crash signature:


Attachments
see bug description: ods-file with many comments to reproduce the bug (759.57 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-02-01 15:48 UTC, Stefan_Lange_KA@T-Online.de
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan_Lange_KA@T-Online.de 2014-02-01 15:48:19 UTC
Created attachment 93170 [details]
see bug description: ods-file with many comments to reproduce the bug

I have changed an ods file with many comments. I have saved the file and all comments are present before I close it. When I re-open the file some or all comments are lost.
Example, how bug can be reproduced:
- copy "File altix_Nummern_aktuell_bearb_Lange.ods" (attached, file size 777.799) to e.g. "altix_Nummern_aktuell_bearb_Lange - LO_4.2.ods"
- insert in "File altix_Nummern_aktuell_bearb_Lange - LO_4.2.ods" sheet "Alle" a new line before the line 2516 (*** Ende ***)
- Save the file --> comments are still present
- Close it -> file is smaller (new file size on my system is 644.596))
- Open the fiile again --> Comments are lost
Comment 1 Jean-Baptiste Faure 2014-02-01 17:26:04 UTC
Argh!!! Data loss!

Easier steps to reproduce:
1/ create a new empty spreadsheet with LO 4.2.0
2/ type a in cell A1 (or something else)
3/ extend A1 to C16 (or something else)
4/ in B7 (or elsewhere) do ctrl+alt+C to insert a comment; type something in the comment field
5/ save the document and close it
6/ reopen the file, the comment is still there
7/ save the document under another name and close it
8/ reopen the new (second) file

current behavior: the comment is gone. That can be verified in the Navigator.

Tested with LO 4.2.1.0.0+ under Ubuntu. Please confirm with 4.2.0.4.

Best regards. JBF
Comment 2 vulcain 2014-02-01 18:27:26 UTC
Reproduce on LibreOffice 4.2.0.4 Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71 
Ubuntu 12.04.4 x86_64

But,

7/ save the document _in other folders_ under another name and close it
8/ reopen the new (second) file
Comment 3 Joel Madero 2014-02-01 19:32:01 UTC
Confirmed on master built about 30 minutes ago.

@ Markus - thoughts on this one?
Comment 4 Jean-Baptiste Faure 2014-02-01 20:41:00 UTC
*** Bug 74304 has been marked as a duplicate of this bug. ***
Comment 5 tommy27 2014-02-01 21:38:47 UTC
@Stefan_Lange_KA@T-Online.de  

which O/S do you run? Windows, Linux or Mac?
Comment 6 Joel Madero 2014-02-01 21:39:35 UTC
He was running Windows (as it was marked as Windows (all)) but we've confirmed on Linux as well
Comment 7 Commit Notification 2014-02-02 18:24:08 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#74325: Write unit test for cell note export to ods.



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-02-02 18:24: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=018500a73f3b1082b6662b7c123dfe5158ae5752

fdo#74325: Ensure that all note objects have an sdr object before exporting.



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-02-02 18:27:17 UTC
The export code currently relies on the SdrObject note caption objects to see if the note is present or not.  In some cases, a note object may not have an associated SdrObject present at the time of export (e.g. when loading a document with cell comment inside and the comment is not displayed).  In such cases, the export code skips the note.
Comment 10 Kohei Yoshida 2014-02-02 18:44:05 UTC
4.2 backport request: https://gerrit.libreoffice.org/7782
Comment 11 Commit Notification 2014-02-03 09:15:14 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=17593b3e00c4d73a1985dfc1fae976d211aee007&h=libreoffice-4-2

fdo#74325: Ensure that all note objects have an sdr object before exporting.


It will be available in LibreOffice 4.2.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 12 Kohei Yoshida 2014-02-03 12:29:02 UTC
Marking it fixed.
Comment 13 Jean-Baptiste Faure 2014-02-03 13:50:08 UTC
Verified fixed in master (Build ID: 85579b1318bec424c87dde567ac1dee6a52da90c) and LO 4.2.1.0.0+.

Thank you very much, Kohei !

Best regards. JBF
Comment 14 Stefan_Lange_KA@T-Online.de 2014-02-03 19:52:49 UTC
My test with
Version: 4.2.1.0.0+
Build ID: 17593b3e00c4d73a1985dfc1fae976d211aee007
TinderBox: Win-x86@42, Branch:libreoffice-4-2, Time: 2014-02-03_09:29:12
was succesful: Comments were no longer lost - also not after repeated Save. Many thanks!
Comment 15 Kohei Yoshida 2014-02-07 05:25:35 UTC
*** Bug 74562 has been marked as a duplicate of this bug. ***
Comment 16 m.a.riosv 2014-02-09 23:02:09 UTC
*** Bug 74759 has been marked as a duplicate of this bug. ***
Comment 17 m.a.riosv 2014-02-21 23:26:08 UTC
*** Bug 75325 has been marked as a duplicate of this bug. ***
Comment 18 Joel Madero 2014-02-26 17:38:13 UTC
*** Bug 75536 has been marked as a duplicate of this bug. ***
Comment 19 Kohei Yoshida 2014-02-28 13:46:48 UTC
*** Bug 75236 has been marked as a duplicate of this bug. ***
Comment 20 Matthew Francis 2015-04-26 02:34:36 UTC
*** Bug 60441 has been marked as a duplicate of this bug. ***
Comment 21 Robinson Tryon (qubit) 2015-12-15 22:22:20 UTC Comment hidden (obsolete)