Document created and saved in docx format. Comments inserted via menu item Insert/Comment. Comments all appear correctly when typed and edited. Document re-saved and then re-opened. The last comment is blank. The comment box appears but the text area is blank. Tested on both Writer 4.1.1.? and 184.108.40.206. Involves data loss so can be major problem, especially since the comments are usually written to be read by someone else sharing the document, who may not recognise the error. Bug doesn't occur when saving in doc format.
Previous bug fix ID 33463 seems to be imperfect.
not reproducible in Win7 64bit with LibO 220.127.116.11
please try attaching an .odt with comments and the same file saved in .docx
edited summary notes.
Created attachment 91441 [details]
Example of docx file that will not save last comment.
Further testing shows problem only arises for file originally created by someone else (in this case a student), presumably on a Windows machine. When I try to add comments to this file on my Linux machine, the text of the last comment is lost. If I create a file from scratch on my own machine, no problems.
Created attachment 91442 [details]
odt version of problem file that shows correct output
Student's file saved on my machine as odt document. It shows correct output of comments. Problems also found on other students' files, so not limited to one system.
(In reply to comment #2)
> Created attachment 91441 [details]
> Example of docx file that will not save last comment.
> Further testing shows problem only arises for file originally created by
> someone else (in this case a student), presumably on a Windows machine.
is this person using LibO 18.104.22.168 or another LibO release or MS Word?(In reply to comment #2)
> When I try to add comments to this file on my Linux machine, the text of the
> last comment is lost. If I create a file from scratch on my own machine,
> no problems.
these observations makes me think that the root of the bug is in the source .docx file.
Created attachment 91445 [details]
test .docx with comments created in Win7
try my file. it's a .docx with dummy text and 2 comments inside it.
it was created with LibO 22.214.171.124 under Win7 64bit.
can you add comments in your Linux machine? do you still experience issue?
OK. I think I've narrowed it down. Different sources of files were a coincidence. I think this replicates the behaviour for any docx file.
1. Create a file and save it as a docx file using any software. If using LO and file includes comments, they will work correctly.
2. Close file and then re-open it in LO.
3. Insert comments. When you write the last comment, without moving the cursor from the comment, click save button. (This is how you would interact when commenting someone else's document).
4. The save button will grey out and disable, but in fact the last comment is not saved. You can close the file (without getting any warning about saving) and re-open it and the last comment will be blank.
If in step 3, you move the cursor to the body of the document or to another comment before clicking save, the last comment will be saved correctly. "ENTER-ing" comments seems to depend on shifting the focus to another text area, which may not happen naturally for the last comment.
The behaviour above is different from LO saving odt docs and MSWord saving docx files with comments added.
Confirm error behaviour described occurs with your attachment 91445 [details].
> OK. I think I've narrowed it down. Different sources of files were a
> coincidence. I think this replicates the behaviour for any docx file.
> "ENTER-ing" comments seems to depend on shifting the focus to another text
> area, which may not happen naturally for the last comment.
great!!! now I'm able to reproduce your bug on Windows!!!
the key is to save without moving the cursor outside the comment window.
set status to NEW and platform to ALL.
reproduced issue with older releases up to 3.5.0 (tested with 3.4.3 too but it looses all comments after saving and reloading) with issue still present in 126.96.36.199rc
the bug is specific to .docx format and does not affect .odt and .doc
edited summary notes, changed version field and added Writer expert to CC list.
still reproducible with 188.8.131.52 and 184.108.40.206.alpha0+
Build ID: b9dca968c6fd0ab5ca140c65b0e54d153cd34986
TinderBox: Win-x86@42, Branch:master, Time: 2014-07-18_22:51:20
I think I am experiencing this bug (lost a whole bunch of grading this week as a result!). I have LO 220.127.116.11 from Arch Linux repos; some macro customization which I am reluctant to lose so haven't tried purging my install yet. Please let me know if there's some work I can do to help debug.
I am finding that the content of comments created with a macro are also not being saved to docx. So it is not dependent just on the final state of the document -- it seems to have to do with whether the comment was ever manually exited.
Here's the macro I'm using:
rem create the annotation object
oAnno = ThisComponent.createInstance("com.sun.star.text.textfield.Annotation")
rem Chr 10004 is the decimal for hex code 2714, "heavy checkmark"
oAnno.Content = Chr(10004)
oAnno.Author = "Matt Price"
oText = ThisComponent.Text
rem check to see if anything is selected
oSels = ThisComponent.getCurrentSelection()
If Not IsNull(oSels) Then
oVC = ThisComponent.CurrentController.ViewCursor
oText.insertTextContent(oVC, oAnno, True)
oVC = ThisComponent.CurrentController.ViewCursor
oText.insertTextContent(oVC.Start, oAnno, False)
I'm guessing that using "insertTextContent" is the only line that really matters here
Created attachment 109769 [details]
.odt demonstrating correct function
.odt file saves attachments properly, even if cursor remains in final annotation, and even though first annotation was input via macro with no manual intervention.
Created attachment 109770 [details]
.docx shows auto-inserted annotation doesn't show up.
Shows auto-inserted annotation is not saved to .docx, despite being saved to .odt.
Since this bug appears to persist in recent builds would it be permissible to change the version to 4.3.2 or similar?
no, this is not how the version field should be edited.
try to change it to a later version and you will see this message:
"You are changing the version of the bug to a later version. As the version field of the bug should show the earliest version manifesting the bug, please reconsider, if you really want to do this. Please do not change a version, because it also manifests in a later version. for details, please see the guidelines"
thanks for the clarification, Tommy.
This only happens if Tools -> Options -> Load/Save -> General -> Warn when not saving in ODF or default format is unchecked, otherwise the warning dialogue takes focus and the comment saves.
Build ID: 2c39ebcf046445232b798108aa8a7e7d89552ea8
Build ID: 89b5967658392d27fb3147e85abb2b5c1c34b101
TinderBox: Win-x86@39, Branch:master, Time: 2015-06-24_04:10:17
I got hit by a combination of Bug 85523 and this one - my last comment was empty - just contained an "X" letter.
Version: 18.104.22.168 on ~AMD64 Gentoo
There are two more bugs on saving comments in docx - blank lines or "X" letters being appended on save (Bug 85523 and Bug 92312). Would be nice if someone could take a look at comment saving in docx, as they might be related.
(In reply to Peter Robinson from comment #6)
> 4. The save button will grey out and disable, but in fact the last comment
> is not saved. You can close the file (without getting any warning about
> saving) and re-open it and the last comment will be blank.
I was running LO under valgrind and observed a difference in this last step:
if LO is run in a normal way, original description holds (save; close; comment lost).
if LO is run under valgrind, LO after clicking "save" icon for once, LO still considers that there are unsaved changes and a) "save" button is active b) it offers to save changes if closing the document. After second save, comment text is really saved and no data loss is observable. Also second click on "save" button disables it, LO doesn't ask to save changes on close.
Unfortunately valgrind wasn't complaining about anything on adding comments, docx open/save (still it was run on a stock version from official RPMs not a debug one).
Version: 22.214.171.124 ~AMD64 Gentoo.
I was not able to reproduce this issue any more with:
Build ID: 066b007f5ebcc236395c7d282ba488bca6720265
CPU Threads: 2; OS Version: Linux 4.7; UI Render: default;
Looks similar to Bug 68604 and I'll mark so. Please feel free to reopen if proved otherwise.
Tommy and I both reproduced that one with Save icon. Seems like not happening with Save menu and it was always OK with Save As.
*** This bug has been marked as a duplicate of bug 68604 ***