Created attachment 101297 [details]
The sample files demonstrating the bug
I am using LibreOffice Writer to review a document which I'm storing in .odt format and all is working fine. As part of this, I am creating comments in the right-hand margin.
However I've come accross two issues which combined are preventing me from doing my job. One of them is clearly a fault in LibreOffice Writer, and hence the topic of this bug report. (I mention the second later as an aside, as it makes the discussed issue more serious).
When exporting my .odt file as an MS Word .docx file, the content of all comments is removed.
The fact that comments themselves exist is still kept - it is just the content of the comments that has completely vanished.
I have reproduced this bug both on the Windows build 184.108.40.206 - downloaded from your website, AND on the current (as of today) Arch Linux build 220.127.116.11 - downloaded via Arch's "pacman" tool.
I have attached files which demonstrate this erroneous behaviour; and this has been reproduced by a user of the #libreoffice IRC room on FreeNode. The files I have attached are both the source .odt file, and the exported files both from the Windows 18.104.22.168 and the Arch Linux 22.214.171.124.
(This shows that the bug was not introduced in the recent changes to the docx code).
Now the aside: MS Office on the computer of the person for whom I'm reviewing the document also will not open these .odt files. The MS Office software claims that the .odt files are corrupt.
While I'm happy to accept that this is a bug in the handling of .odt files by MS Office, when combined with this issue it removes any hope of compatibility between the two products for performing document reviews. I am, in fact, as to a loss of how I am now going to do this review.
Created attachment 101298 [details]
The sample files demonstrating the bug
Can confirm with the attached documents on Ubuntu 14.04 with LO 126.96.36.199. Creating an empty document with a comment and saving it as DOCX preserves the comment. But saving the attached ODT as DOCX and opening it again shows the comment content has disappeared. Looking at the DOCX's comments.xml, there is no comment content present.
Changed version to 188.8.131.52 since it is the earliest confirmed.
If it helps, the .odt document attached was created by the following process:
1. I went and found some source text on wikipedia.
2. Selected and copied the text to the clipboard.
3. Opened LibreOffice Writer and pasted the text.
4. Selected a word to comment on, and used the "post-it" icon in the toolbar to add a comment.
5. Wrote my comment.
6. Saved the document as .odt file.
7. Saved the document again, this time as a .docx file.
8. Closed the document, re-loaded the .docx to confirm errant behaviour.
Unfortunately nothing even moderately complex in there. It does appear to be a simple bug.
To confirm on the second build of LibreOffice, I just loaded the .odt documend and repeated steps 7-8.
The original document I discovered this bug on is a large (but only text content) .rtf document, opened in LibreOffice and then re-saved as .odt to allow me to make the comments in the first place.
(I don't think any of this is particularly relevant; the bug seems to appear regardless of the way the document is constructed.. but it's better to have more information than risk missing something important that I might not consider relevant, I suppose!)
Checked (as requested in IRC):
When a document is created in LibreOffice and only plain text (no formatting etc) is added, Writer does seem to save the comments, including in the exported .docx.
Confirmed this on Linux Mint with 4.0.6, 4.1.6, 4.2.5 and 4.2.6. It doesnt happen in 3.6, 4.3 beta 2, or master. Seems as though the fix was added to 4.3 but not ported back to 4.2.
Miklos - I believe the commit below resolved this but wasn't put in 4.2, any way that we can squeeze it into 4.2.6? It's a pretty nasty bug.
I'm also experiencing this bug (or a variant) in Version: 184.108.40.206 (Mint 13 LTS + Ubuntu 14.04, both) -
The DOCX document was half commented on and saved. Next day completed job (rest of document commented), saved (all in LibO Writer to DOCX format) but ONLY the comments saved in the first editing session will display; those from the second appear to be empty boxes.
Also, trying to open in Word 2010 in Win7 gives a "corrupt file" message, giving as the "detail": "No attribute name may appear more than once in the same start tag or empty element tag." > in `comments.xml`.
Since the xml is all one "line", trying to sort errors is problematic for me (tried to parse syntax using XML tools in Notepad++), and my skills don't go any farther.
Fortunately, all the *content* of my comments is still preserved in Word's `comments.xml` file, although they cannot be displayed owing to the xml errors.
I haven't experienced any problems with the comment feature sticking to ODT filetypes (not possible in this particular case).
wondering if this is the same as https://bugs.freedesktop.org/show_bug.cgi?id=73221
(In reply to Yousuf (Jay) Philips from comment #5)
> Confirmed this on Linux Mint with 4.0.6, 4.1.6, 4.2.5 and 4.2.6. It doesnt
> happen in 3.6, 4.3 beta 2, or master. Seems as though the fix was added to
> 4.3 but not ported back to 4.2.
I also fail to reproduce, tested using Linux Mint x64 with LibreOffice Version: 220.127.116.11.alpha1+
Build ID: f3070563c3071e05e9c448e261fec1e397bffb48
Locale: nl-BE (nl_BE.UTF-8)
(In reply to David from comment #7)
> I'm also experiencing this bug (or a variant) in Version: 18.104.22.168 (Mint 13
> LTS + Ubuntu 14.04, both) -
> Since the xml is all one "line", trying to sort errors is problematic for me
> (tried to parse syntax using XML tools in Notepad++), and my skills don't go
> any farther.
> Fortunately, all the *content* of my comments is still preserved in Word's
> `comments.xml` file, although they cannot be displayed owing to the xml
Can you please create a new bug report and attach the ODT and .docx file?
Marking this bug as RESOLVED WORKSFORME since we can't reproduce this particular case anymore.
Migrating Whiteboard tags to Keywords: (DataLoss, bibisectRequest)