Bug 75694 - FILESAVE: Comments lost on export to .docx
Summary: FILESAVE: Comments lost on export to .docx
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1.5.3 release
Hardware: Other All
: highest critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, regression
Depends on:
Blocks: mab4.2
  Show dependency treegraph
 
Reported: 2014-03-03 07:02 UTC by petrelharp
Modified: 2016-12-16 16:24 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
example odt that fails to save as docx (9.50 KB, application/vnd.oasis.opendocument.text)
2014-03-03 07:02 UTC, petrelharp
Details
saved first as odt (broken) (9.51 KB, application/vnd.oasis.opendocument.text)
2014-03-04 13:58 UTC, petrelharp
Details
saved first as odt (broken): subsequent save as docx (4.30 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-03-04 13:59 UTC, petrelharp
Details
saved first as docx (works): docx (4.36 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-03-04 13:59 UTC, petrelharp
Details
saved first as docx (works), subsequent save as odt (9.54 KB, application/vnd.oasis.opendocument.text)
2014-03-04 14:00 UTC, petrelharp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description petrelharp 2014-03-03 07:02:48 UTC
Created attachment 95003 [details]
example odt that fails to save as docx

Problem description: Content of comments deleted when saving to docx (data loss!).  I believe this only happens when the first comment spans a block of text (i.e. select a word and hit alt-ctl-c) rather than a point comment (without a selected word); but it is hard to pin down.

Steps to reproduce:
1. Open LO and begin a new text document.
2. Type "one two three four".
3. Select the word "two", and hit "alt-ctl-c"; type "blah" into the comment box.
4. Save as .odt, and quit.
5. Open the .odt; save out as .docx, and quit.
6. Open the .docx.  The comment is blank, and "blah" does not appear in the source.

If instead of selecting a word in (3), the cursor is placed somewhere, the comment saves properly.

Attached is an example odt.

Confirmed that this persists in 4.2.1.1
              
Operating System: Debian
Version: 4.1.5.3 release
Comment 1 tommy27 2014-03-04 06:36:44 UTC
take a look at Bug 73221 - Last comment text is lost if you save as .docx without shifting the focus to another text area

are you describing the same issue or a different one?
Comment 2 petrelharp 2014-03-04 13:57:54 UTC
(In reply to comment #1)
> take a look at Bug 73221 - Last comment text is lost if you save as .docx
> without shifting the focus to another text area
> 
> are you describing the same issue or a different one?

A different issue.  This bug appears whether or not I move the cursor after creating the comment.

Other notes:

1. it is necessary to close the document, and re-open it before saving out as docx.  if I create a document, save as .odt, and save as .docx; or just save directly as .docx, this does not occur.

2. if I do exactly the same steps, but first save as .docx, then close, and re-open and save as .odt, there is no problem.  I am attaching examples:
  docx-then-odt.{odt,docx}  : WORKS
  odt-then-docx.{odt,docx}  : BROKEN

3. this is serious: I first noticed this because of a document from someone else in which, when I saved as .docx to send back to them, all their comments would become blank.  (major data loss)  this is the minimal reproducible example.

4. this affects .odt: in my testing, I have occasionally seen examples where the file saved *as .odt* has lost the contents of the comments, or the author of some comments.  I haven't been able to make a reproducible example, though.
Comment 3 petrelharp 2014-03-04 13:58:59 UTC
Created attachment 95094 [details]
saved first as odt (broken)
Comment 4 petrelharp 2014-03-04 13:59:27 UTC
Created attachment 95095 [details]
saved first as odt (broken): subsequent save as docx
Comment 5 petrelharp 2014-03-04 13:59:54 UTC
Created attachment 95096 [details]
saved first as docx (works): docx
Comment 6 petrelharp 2014-03-04 14:00:17 UTC
Created attachment 95097 [details]
saved first as docx (works), subsequent save as odt
Comment 7 Joel Madero 2014-03-07 04:31:29 UTC
Ubuntu 13.10
LibreOffice 4.2.2.1 rc

Please reset your user profile - I can confirm on the file you provided but cannot confirm on a new document. 

Marking as WFM since I cannot reproduce from fresh steps provided. Something is strange about that document you provided. 

https://wiki.documentfoundation.org/UserProfile

If resetting your profile does not work - please COMPLETELY purge LibreOffice and then reinstall - preferably from a PPA/repository but if not just install from our site but again, make sure libreoffice is 100% purged, and you are using a fresh profile.

If all of this fails set it back to UNCONFIRMED and we'll see what else we can try. Thanks!
Comment 8 petrelharp 2014-03-07 04:41:09 UTC
Purged (deleted) profile, and it still does exactly as before.
Comment 9 petrelharp 2014-03-07 04:41:53 UTC
(In reply to comment #8)
> Purged (deleted) profile, and it still does exactly as before.

oops.  purging libreoffice, reporting back shortly.
Comment 10 petrelharp 2014-03-07 05:07:39 UTC
OK; I have purged libreoffice (confirmed with `locate libreoffice`) and the profile, and reinstalled 4.2.2.1 (downloaded manually); the issue persists unchanged.
Comment 11 Joel Madero 2014-03-07 05:08:39 UTC
Quite strange! Okay requesting input here.
Comment 12 JM 2014-05-19 15:11:29 UTC
I am able to reproduce this bug in this version and OO 4.2.4.2
(Build ID: 63150712c6d317d27ce2db16eb94c2f3d7b699f8).

Received a document in .doc format and then added comments. Saved to .docx format with comments.

On opening, the comments were blank and with "(no author) (no date)" as their metadata.

(In reply to comment #2)
> 3. this is serious: I first noticed this because of a document from someone
> else in which, when I saved as .docx to send back to them, all their
> comments would become blank.  (major data loss)  this is the minimal
> reproducible example.
Comment 13 Pedro 2014-05-19 15:44:31 UTC
Confirmed with LO 4.2.3.2 under Windows XP. Comment contents are lost when saving an odt as docx.
Comment 14 Marina Latini (SUSE) 2014-05-19 16:17:03 UTC
CONFIRMED following the 6 steps on:

LibreOffice deb X86_64 on Ubuntu 13.04 installed in parallel with fresh user profiles

* Version: 4.1.5.3
* Build ID: 1c1366bba2ba2b554cd2ca4d87c06da81c05d24
* with Italian Langpack and Italian Helppack

* Version: 4.1.6.2
* Build ID: 40ff705089295be5be0aae9b15123f687c05b0a
* with Italian Langpack and Italian Helppack

* Version: 4.2.4.2
* Build ID: 63150712c6d317d27ce2db16eb94c2f3d7b699f8
* with Italian Langpack and Italian Helppack

* Version: 4.2.2.1
* Build ID: 3be8cda0bddd8e430d8cda1ebfd581265cca5a0f
* with Italian Langpack and Italian Helppack

NOT CONFIRMED (the comments are saved correctly) on:

* Version: 4.3.0.0.alpha1+
* Build ID: b5f45a51638901ea679bf238ab460283e41bc622
* TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2014-05-19_06:16:16

* Version: 4.3.0.0.alpha1
* Build ID: 46cfcd5a05aa1d13fecd73f5a25b64b8d8dd6781
Comment 15 Terrence Enger 2014-05-19 17:27:40 UTC
From `git bisect bad`:

    109d2f4e645885b7e8fd7d1922ddbb9edfd303c3 is the first bad commit
    commit 109d2f4e645885b7e8fd7d1922ddbb9edfd303c3
    Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
    Date:   Wed Dec 7 03:30:31 2011 +0100

        source-hash-d419bfc9f7e6114af7461fab17dc0782397e5433
    
        commit d419bfc9f7e6114af7461fab17dc0782397e5433
        Author:     Rene Engelhard <rene@debian.org>
        AuthorDate: Wed Aug 24 00:27:00 2011 +0200
        Commit:     Rene Engelhard <rene@debian.org>
        CommitDate: Wed Aug 24 00:33:30 2011 +0200
    
            <sys/prctl.h> is not available on kFreeBSD

    :100644 100644 327caa244afc01a2c9bb1223bdd14377b7fa714e d9a8780ced0719430dc7a87b690870ffad6519d4 M	autogen.log
    :100644 100644 37b74648fdc021ef7aea0dcea42713086d0f09d7 5b7f0490fcd8febe812f9e40a269618f81a8cf64 M	ccache.log
    :100644 100644 a959327c5b8f6fbb087af82032eccae35182da55 7890d604acd38686a8bdcf84f49898566786ad30 M	commitmsg
    :100644 100644 94a31c5c53fb9828441944314e29a957cd7a7766 32e66fd8088573b6ce0d8996dca1a3a0db48617b M	dev-install.log
    :100644 100644 ef64e110effff2d7895a09dc1089d5e0e4e00b84 f24bb4887a18c1485d0ea061ea763bb4cf5121a8 M	make.log
    :040000 040000 1e21c3169faa1abfbd098944d9c241fdda04b148 83a8b438fbaeac1270ded9e0717e324ec63bb4a4 M	opt

and from `git bisect log`:

    # bad: [793dbf6f80f497dfe587d560d6257f42a24273f6] source-hash-1581b1fc3ac82a7bd62df968226e98604a4ca52d
    # good: [65fd30f5cb4cdd37995a33420ed8273c0a29bf00] source-hash-d6cde02dbce8c28c6af836e2dc1120f8a6ef9932
    git bisect start 'latest' 'oldest'
    # bad: [8092559c5013969ebda017d79200463b9b975038] source-hash-fd84daf696a368c2c7561b5253b32a63ecdeca4a
    git bisect bad 8092559c5013969ebda017d79200463b9b975038
    # bad: [2bdbcaf93e4616633a733de7eb88ba19571929ac] source-hash-cf04745f7a027594fd64a493c276a8280dbccfe1
    git bisect bad 2bdbcaf93e4616633a733de7eb88ba19571929ac
    # bad: [c2d3eb302c01963bb4730f0a35de5a83320bc778] source-hash-03591233c18c90158b3567f24fa332cd7c52a7ee
    git bisect bad c2d3eb302c01963bb4730f0a35de5a83320bc778
    # bad: [f00432157d6f47a8fc098291fd2ac183ec2ec738] source-hash-5a212d501ee1c8ae2b7b9517a4ff486e61cac0fd
    git bisect bad f00432157d6f47a8fc098291fd2ac183ec2ec738
    # bad: [077613cc9e1bb1cd2e38f4648081c14f856dd34f] source-hash-e5f71ca7c27259360a401d94ed6a53038608b941
    git bisect bad 077613cc9e1bb1cd2e38f4648081c14f856dd34f
    # bad: [9ec082498e3baecd8af1cf37f24bc5241a5ee0fe] source-hash-a0a1c3f4fb730ed3614593c3d8ddb50c23204c29
    git bisect bad 9ec082498e3baecd8af1cf37f24bc5241a5ee0fe
    # bad: [7cfa56b115e13355ad4c090239f10cd1d55ab1d8] source-hash-f7d71e379edf2c29d53182458342d7a5ce1446d6
    git bisect bad 7cfa56b115e13355ad4c090239f10cd1d55ab1d8
    # bad: [c4ac84e0f27bd6f6a355eadf14938fab72c1f492] source-hash-01f5362e7982cc1e5b8c9fa7216c892667971737
    git bisect bad c4ac84e0f27bd6f6a355eadf14938fab72c1f492
    # bad: [109d2f4e645885b7e8fd7d1922ddbb9edfd303c3] source-hash-d419bfc9f7e6114af7461fab17dc0782397e5433
    git bisect bad 109d2f4e645885b7e8fd7d1922ddbb9edfd303c3
Comment 16 tommy27 2014-05-21 17:35:33 UTC
confirmed with 4.2.4.2 under Win7x64
Comment 17 Michael Meeks 2014-07-07 13:37:03 UTC
Miklos - sounds odd to me =) you did some work around this - right ?
Comment 18 tommy27 2014-11-19 04:12:42 UTC
reproducible with LibO 4.2.6.2
not reproducible anymore with LibO 4.3.3.2 and 4.4.0.0 alpha2

status RESOLVED WORKSFORME
Comment 19 Robinson Tryon (qubit) 2015-12-17 07:52:14 UTC Comment hidden (obsolete)