Bug Hunting Session
Bug 45983 - FILESAVE: .doc with Custom Styles Corrupted on Roundtrip
Summary: FILESAVE: .doc with Custom Styles Corrupted on Roundtrip
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
3.4.5 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
Whiteboard: target:6.4.0 target:6.3.3
Keywords: filter:doc
Depends on:
Blocks: DOC-Corrupted DOC-Styles
  Show dependency treegraph
Reported: 2012-02-13 01:56 UTC by Sebastian@SSpaeth.de
Modified: 2019-10-11 09:38 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:

Original .doc as received (386.00 KB, application/msword)
2012-02-13 01:56 UTC, Sebastian@SSpaeth.de
Saved with LibO3.4.5, failing to open in some WinWord versions under MacOSX and Win7 (427.00 KB, application/msword)
2012-02-13 01:57 UTC, Sebastian@SSpaeth.de
Reduced .doc shows problem with Styles (59.50 KB, application/msword)
2017-03-26 04:56 UTC, Luke

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian@SSpaeth.de 2012-02-13 01:56:22 UTC
Created attachment 56949 [details]
Original .doc as received

I will attach 2 .doc files. One that has been received from a Windows users. It has been modified in LibO 3.4.5 and saved as .doc. WinWord subsequently refuses to open the document (both under MacOSX and Windows 7 I hear)

I can open the documents on a WinXP with Office2010 without problems. However, given that the file format is a WinWord2003-7 one, it should also be "openable" there.
Comment 1 Sebastian@SSpaeth.de 2012-02-13 01:57:04 UTC
Created attachment 56950 [details]
Saved with LibO3.4.5, failing to open in some WinWord versions under MacOSX and Win7
Comment 2 Sebastian@SSpaeth.de 2012-02-13 02:37:18 UTC
Comment on attachment 56950 [details]
Saved with LibO3.4.5, failing to open in some WinWord versions under MacOSX and Win7

*sigh*, Thorsten Berens managed to open in Office 2007, but I *know* for sure that many people complain about the inability to open the .doc. I blame WinWord here...
Comment 3 sasha.libreoffice 2012-05-17 07:22:21 UTC
Thanks for bugreport
Second attachment opens correctly in msWord 2003 and 2007 in Windows 32 bit, another not tested. May be problem is only on one certain version of Word.
Comment 4 bfoman (inactive) 2012-07-18 09:06:11 UTC
Confirmed with:
Build ID: own W7 debug build
Windows 7 Professional SP1 64 bit

Original attached file - Word 2010 opens it without problems.
Second attached file - Word 2010 refuses to open.
Original file downloaded and resaved as doc by LO - Word 2010 refuses to open.
Comment 5 Boudewijn 2013-01-22 07:09:45 UTC
I have the same problem now with documents saved in the rc candidate of LO4.0 on Linux while I thry to open the file in Word2010 running on Windows7 64bit.
Comment 6 Jorendc 2014-04-26 17:05:53 UTC
Tested using Windows 8.1 with LibreOffice Version:
Build ID: f4a6837025a293312cbc43b9c527851362f11030
TinderBox: Win-x86@47-TDF, Branch:MASTER, Time: 2014-04-26_09:21:18 and Word 2013

Resaving original .doc as .doc -> corruption message
using .docx extension -> opens fine.

So only .doc is the problem here.

Kind regards,
Comment 7 QA Administrators 2015-06-08 14:42:35 UTC Comment hidden (obsolete)
Comment 8 Buovjaga 2015-08-03 14:44:13 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2016-09-20 10:21:30 UTC Comment hidden (obsolete)
Comment 10 Sebastian@SSpaeth.de 2016-09-20 12:16:01 UTC
I just opened the first attachment with LO Version: on a Windows 7 machine, added a space, and saved it.

Opening with Word 2013, Word complains that it detected file corruption which it was able to repair. It specifically showed the numbering format templates ("Nummerierungsformatvorlagen" in German) as broken. The original .doc file can be opened without problems by Word. So LO is still saving things in a way that breaks Word. Sorry for not being more helpful in debugging the specifics.
Comment 11 Timur 2016-09-20 14:51:37 UTC
Bug 90438 seems related, probably a duplicate. But, it's about DOC created from ODT and not about RT so problem looks related saving as DOC. And with that ODT attachment 105190 [details] is same with this DOC  attachment 56949 [details], I can open with Office 2010 but it shows errors/repairs when open with MS Office 2013. Not tested whether those are some real repairs.
Comment 12 Xisco Faulí 2016-12-21 15:52:52 UTC
attachment 56950 [details] is open correctly in MSO Word 2010
Comment 13 Buovjaga 2016-12-29 15:24:09 UTC
Still repairing.

Win 8.1 32-bit
MSO 2013
LibO Version:
Build ID: 7b3f5a9c939c6976f6cf58bf0acfce3b8d8ae793
CPU Threads: 4; OS Version: Windows 6.29; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2016-12-28_23:10:06
Locale: fi-FI (fi_FI); Calc: group
Comment 14 Luke 2017-03-26 04:56:23 UTC
Created attachment 132145 [details]
Reduced .doc shows problem with Styles

By reducing the .doc, I discovered that the problem here is with the styles. If I further reduce the .doc by stripping out all of the custom document styles, the error goes away in Word.
Comment 15 QA Administrators 2018-10-06 02:50:05 UTC Comment hidden (obsolete)
Comment 16 Luke 2018-10-07 02:22:59 UTC
Still producing a damaged .doc in Version:
Build ID: 692c4f4d2c5995660baf747f2d15929896f6e992
Comment 17 Xisco Faulí 2019-09-03 15:58:13 UTC Comment hidden (obsolete)
Comment 18 Xisco Faulí 2019-09-03 16:08:36 UTC
(In reply to Xisco Faulí from comment #17)
> Issue no longer reproducible in
> Version:
> Build ID: 41cd3e8e817c8c33a13608e62eeb06ce2c6977e4
> CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
> Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
> Calc: threaded
> [Improvement found by office-interoperability-tools]

For the test, I used MSO 2010
@Buovjaga, @Luke, Could you please test it on your side ?
Comment 19 Buovjaga 2019-09-04 05:46:18 UTC
MSO 365 still offers to repair a ton of stuff.
Tested with attachment 56949 [details]

Version: (x64)
Build ID: fd67c89e52441387dffab1c788007271e717571b
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-09-03_06:15:20
Locale: fi-FI (fi_FI); UI-Language: en-US
Calc: threaded
Comment 20 Commit Notification 2019-10-11 09:38:50 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":


sw: WW8: fix crashtesting asserts on fdo45983-1.doc export to ODT

It will be available in 6.3.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:

Affected users are encouraged to test the fix and report feedback.