Bug 75634 - FILESAVE: DOC: Document saved with a bookmark in a footnote is a corrupt file that cannot be opened by MSO (DOCX opens)
Summary: FILESAVE: DOC: Document saved with a bookmark in a footnote is a corrupt file...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: interoperability ww8 NeedsMSO2010
Keywords: filter:doc
Depends on:
Blocks: Footnote-Endnote DOC
  Show dependency treegraph
 
Reported: 2014-03-01 03:44 UTC by aurimas.dev
Modified: 2019-12-11 11:39 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
.doc file created in LO Writer that fails to open in MS Word (9.50 KB, application/msword)
2014-03-01 03:44 UTC, aurimas.dev
Details
.doc fiel created in Word 2007 that opens correctly in Word 2010 (27.00 KB, application/msword)
2014-03-22 15:27 UTC, aurimas.dev
Details
.doc created in LO and re-saved with Word 2007 (22.50 KB, application/msword)
2014-03-22 15:35 UTC, aurimas.dev
Details
ODT file from LO (8.95 KB, application/vnd.oasis.opendocument.text)
2019-12-11 10:32 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description aurimas.dev 2014-03-01 03:44:36 UTC
Created attachment 94927 [details]
.doc file created in LO Writer that fails to open in MS Word

Steps to reproduce:
1. In LibreOffice, open a new Writer document. Insert a footnote with text "12345".
2. Highlight "3" and insert Bookmark. Title it "test".
3. Save document as .doc
4. Close LibreOffice.
5. Open document in Microsoft Word.

Observed result: MS Word displays a message that the file is corrupt and cannot be opened.

Expected result: Document opens

Tested on Microsoft Word 2010 version 14.0.7113.5005 (32-bit). The same document created by MS Word can be opened in both MS Word and LO Writer.
Comment 1 Thomas van der Meulen 2014-03-22 10:45:38 UTC
Thank you for your bug report, 
I cannot reproduce this bug running 
Version: 4.2.3.1
Build ID: 3d4fc3d9dbf8f4c0aeb61498a81f91c5b7922f13
OS: Mac osx 10.9.2

Both the file that was attached as well as the file that I made opened fine in micsoft word 2007 on windows 7
Comment 2 aurimas.dev 2014-03-22 15:27:59 UTC
Created attachment 96202 [details]
.doc fiel created in Word 2007 that opens correctly in Word 2010
Comment 3 aurimas.dev 2014-03-22 15:28:45 UTC
You are right. This does not seem to affect Word 2007, but I have confirmed this on Word 2010 on Windows 7 and Windows XP.

It is possible that this is a bug in Word 2010, or that Word 2007 ignores some errors in the doc file, while Word 2010 does not. Can't say exactly which, but the same document created in Word 2007 (attached) opens correctly in Word 2010
Comment 4 aurimas.dev 2014-03-22 15:35:52 UTC
Created attachment 96203 [details]
.doc created in LO and re-saved with Word 2007

After re-saving the LO document via Word 2007, it opens correctly in Word 2010. Unfortunately, binary diff shows a large amount of changes, but this may be helpful nonetheless.
Comment 5 Yousuf Philips (jay) (retired) 2014-07-13 23:07:44 UTC
Dear Herouth,

Thank you for submitting the bug. I can confirm that attachment 94927 [details] doesnt load in word 2010 or 2013. Also confirmed that the doc created by 4.3.1 and master also doesnt work.

Did some further testing and see if i dont do step 2, word 2013 will load the document but the page will be blank (cant see footnote reference number) and unaccessible, except for the footnote text appearing at the bottom. So then i added a character before creating the footnote and still the page is blank and not accessible. If i did the last bit with step 3, the file again will not open.

Tried to create the test file in 3.3.0 and it froze when i tried to save it. Tried with 3.6.7 in doc 6.0, 95 and 97+ formats and all of them failed to open in word 2013.
Comment 6 QA Administrators 2015-07-18 17:44:05 UTC Comment hidden (obsolete)
Comment 7 Buovjaga 2015-11-06 15:02:03 UTC
Opened attachment 96202 [details] in LibO and saved it. It opens ok in MSO, but the reference number is not visible in the text body.
Should I be seeing corruption according to the original report with my method of reproducing?

Win 8.1 32-bit
MSO 2013
LibO Version: 5.1.0.0.alpha1+
Build ID: db6a928a420868b2a80ba11c8d46151d16c13624-GL
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-11-05_22:13:24
Locale: fi-FI (fi_FI)
Comment 8 Yousuf Philips (jay) (retired) 2016-04-08 21:49:27 UTC
Followed steps in description and Word 2010 opens the .doc file with a "Microsoft Word Security Notice" error dialog saying "Word has detected a problem with this file. Opening it may be dangerous. You should not open this file unless you trust it." Continued to open the file and it showed as if the bookmark was opened after the footnote rather than inside the footnote text.

Version: 5.2.0.0.alpha0+
Build ID: 02fb3fd0533222dfea5b6b9232425a5e28cd340f
CPU Threads: 2; OS Version: Linux 4.2; UI Render: default; 
TinderBox: Linux-rpm_deb-x86@71-TDF, Branch:master, Time: 2016-03-29_06:02:35
Locale: en-US (en_US.UTF-8)
Comment 9 QA Administrators 2017-12-10 16:43:36 UTC Comment hidden (obsolete, spam)
Comment 10 QA Administrators 2019-12-11 03:38:57 UTC Comment hidden (obsolete)
Comment 11 Timur 2019-12-11 10:32:11 UTC
Created attachment 156476 [details]
ODT file from LO

This bug report was not complete because it attached result .doc created in LO, which is not relevant (we can always create it) instead of source .odt (even if you save as .doc, we need first .odt). I attach it now. 

The result is still the same in LO master 6.5+, LO saved DOC cannot be open with MSO 2013 ("..unable to read this document"). And that's this bug.
Further test is with .doc created in Word, like in Comment 7. attachment 96202 [details] claims to be that .doc, but I don't see bookmarks, I added in my test. MSO-saved DOC opens fine in LO, with present both bookmarks from body and footer. 

Note: LO saved DOCX opens fine with MSO 2013, and we see the LO created footer bookmark on inserting another, but we cannot go to it with Ctrl+G. This may be due to bookmarks being in footer, because if bookmark is created in MSO, it also doesn't offer bookmark from footer. But if saved with MSO, it's still there in LO. 
Further test is with .docx created in Word. MSO-saved DOCX opens in LO, with present bookmarks from footer and missing from the body (another bug). 
Normally DOC and DOCX are separate bugs, but it's good to test both, and report other separately.