Bug 43780 - FILESAVE: Text lost after saving and closing .docx-file
Summary: FILESAVE: Text lost after saving and closing .docx-file
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.3.4 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-12 21:57 UTC by bugzilla
Modified: 2017-02-14 15:33 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Test Kit (48.99 KB, application/x-zip-compressed)
2012-01-23 08:25 UTC, Rainer Bielefeld Retired
Details
Copy of the origin closed doc (78.31 KB, text/plain)
2017-02-14 15:28 UTC, Ooker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bugzilla 2011-12-12 21:57:00 UTC
Problem description: After editing, saving and closing a .docx-file, most of the text was gone when I reopened the file a few minutes later. 

I had received a Word 2007 .docx file. I opened it, saved it under a differnt file name, edited for about an hour (review mode, also adding some comments) while frequently saving the file. Finally, I saved it one more time and closed it on my local harddrive. When I reopened the file, all text beyond the first two pages was gone. The paragraphs where still there, but not text. (The second page contains the Table of Contents, which is still there.) The word count shows me that the text is probably gone.

Steps to reproduce:
I was not able to reproduce the error. However, I remember a similar problem with Open Office several months ago (same machine, then running Ubuntu 10.xx).

Current behavior: Text was lost.

Expected behavior: The text should not be lost.

Platform (if different from the browser): 
              
Browser: Mozilla/5.0 (Ubuntu; X11; Linux x86_64; rv:8.0) Gecko/20100101 Firefox/8.0
Comment 1 Rainer Bielefeld Retired 2011-12-12 22:36:31 UTC
@bugzilla@sokolov.eu.org 
We need your document!
What other reports did you check (for example "Bug 36982 - Writer ignores text after Equation in docx"?
Please try with a more current version!
Comment 2 Rainer Bielefeld Retired 2012-01-22 10:59:18 UTC
No document, so CLOSED
Comment 3 bugzilla 2012-01-22 17:48:18 UTC
Due to privacy reasons I can not upload the document at the moment. However, I have sent it to Rainer Bielefeld.

I don't believe that it is a duplicate of Bug 36982, as I could initially open the document, work on it and save it several times without losing data.

The now missing data is not simply hidden, but lost. The file size has shrunk considerably from 44 to 17 KByte. Since I added comments I would have expected the file size to increase.
Comment 4 Rainer Bielefeld Retired 2012-01-23 08:23:08 UTC
I got a document that can't be opened by MS WORD VIEWER (damaged document), and LibO / OOo only show first page, TOC and lots of empty pages. 

That's not a useful sampled document. What we need is an intact document and a step by step instruction how to get the damages (missing contents).

Fortunately I was able to create a test kit from an own document.

My steps to reproduce with "LibreOffice 3.5.0 RC1 German UI/Locale [Build-ID: b6c8ba5-8c0b455-0b5e650-d7f0dd3-b100c87] on German WIN7 Home Premium (64bit):

0. Download / Unzip attached test kit
1. Open mysample1.odt from LibO Start Center File menu
2. LibO dialog Menu 'File -> Save as - document type "Word 2007 /2010 XML" -> 
   mysample1.docx'
3. Close document
4. reopen document
   Expected: Same contents as "mysample1.odt"
   Actual: most contents behind table of contents missing, TOC looks "readonly"

MS WORD Viewer will not be able to open the document.

@Cédric:
Please excuse me for the voluminous sample document. Please feel free to reassign (or reset Assignee to default) if it’s not your area or if provided information is not sufficient. Please set Status to ASSIGNED if you accept this Bug.

- Reported with Bug Submission Assistant -
Comment 5 Rainer Bielefeld Retired 2012-01-23 08:25:32 UTC
Created attachment 56042 [details]
Test Kit

See Comment 4
Comment 6 bugzilla 2012-01-23 08:29:24 UTC
(In reply to comment #4)
> I got a document that can't be opened by MS WORD VIEWER (damaged document), and
> LibO / OOo only show first page, TOC and lots of empty pages. 
> 
> That's not a useful sampled document. 

It is not a useful document...yes, one could say that. :-) This is why I attempted to file a bug report. :-)

> What we need is an intact document and a
> step by step instruction how to get the damages (missing contents).

Sorry, I'm not experienced in filing bug reports with software like this.

> Fortunately I was able to create a test kit from an own document.

Very good, thank you for that extra work!
Comment 7 sasha.libreoffice 2012-02-14 02:04:50 UTC
I have created separate bugreport for problem with Content:
Bug 46025 - Writer FILESAVE, FILEOPEN: docx files with "Content" field processed worng
Comment 8 Jorendc 2014-02-14 12:45:01 UTC
I can not reproduce this behavior, tested using Mac OSX 10.9 with LibreOffice Version: 4.3.0.0.alpha0+
Build ID: a315454f349469923490e4116806ee19263849b8

Exporting as .docx and reopen the same document using LibreOffice -> content behind TOC is preserved.

Word for Mac 2011 also can import the saved .docx file.

Another "problem" is that LibreOffice doesn't export the 2-column TOC right. It is exported as a 1-column TOC. Looks like an enhancement request to me (just not implemented yet).

Marking as RESOLVED WORKSFORME

Kind regards,
Joren
Comment 9 Ooker 2017-02-14 15:28:53 UTC
Created attachment 131207 [details]
Copy of the origin closed doc
Comment 10 Ooker 2017-02-14 15:33:20 UTC
Today is 2017, and this happens to me too. The file has recorded changes. This has happened twice in two days in a row after I updated to 5.2.5.1 because of this similar bug:https://bugs.documentfoundation.org/show_bug.cgi?id=104181, but this time there is no error. I always edit it in web view. I have check the path too but there is no recent backup.