Bug 37516 - FILESAVE LibreOffice does not produce valid DOC documents
Summary: FILESAVE LibreOffice does not produce valid DOC documents
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.4.0 RC1
Hardware: Other All
: highest critical
Assignee: Cédric Bosdonnat
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-23 12:58 UTC by Andras Timar
Modified: 2012-07-26 13:25 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Valid DOC saved from LibreOffice 3.3.2 (9.00 KB, application/msword)
2011-05-23 12:59 UTC, Andras Timar
Details
Invalid DOC saved from LibreOffice 3.4 RC1 (9.00 KB, application/msword)
2011-05-23 13:00 UTC, Andras Timar
Details
test file created by 3.3 and resaved by 3.4, valid for MSO 2010 (9.00 KB, application/msword)
2011-06-09 06:27 UTC, Cédric Bosdonnat
Details
same document than attachement 47768, but created from scratch with 3.4 (9.00 KB, application/msword)
2011-06-09 06:27 UTC, Cédric Bosdonnat
Details
My testing document generated by 3.4 (bad one) for reference. (9.00 KB, application/msword)
2011-06-30 17:23 UTC, Jan Holesovsky
Details
Binary dump of test-3.4.doc (got using xxd test-3.4.doc > bad.txt). (37.69 KB, text/plain)
2011-06-30 17:24 UTC, Jan Holesovsky
Details
This makes a working document from the non-working dump of test-3.4.doc. (661 bytes, patch)
2011-06-30 17:26 UTC, Jan Holesovsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andras Timar 2011-05-23 12:58:46 UTC
1. Open LibreOffice 3.4 RC1 Writer.
2. Write a line, e.g. "This is a test."
3. Save as Word 97 DOC format.
4. Open the file in MS Office 2010.
-> Protected View. Office has detected a problem with this file. Editing may harm your computer. Click for more details.

Same sample saved from LibreOffice 3.3 is valid.
Comment 1 Andras Timar 2011-05-23 12:59:37 UTC
Created attachment 47067 [details]
Valid DOC saved from LibreOffice 3.3.2
Comment 2 Andras Timar 2011-05-23 13:00:15 UTC
Created attachment 47068 [details]
Invalid DOC saved from LibreOffice 3.4 RC1
Comment 3 Petr Mladek 2011-05-25 02:58:10 UTC
Cedric, could you please have a look? IMHO, it is very annoying, ugly, and affecting many users :-(
Comment 4 Cédric Bosdonnat 2011-05-25 05:31:34 UTC
This is an annoying bug but has no reason to block 3.4.0. The file can still be edited in MSO 2010 and no warning is shown on other versions of Words. There is furthermore no problem when resaving a file that hasn't been created with LO 3.4.
Comment 5 Cédric Bosdonnat 2011-06-09 06:27:17 UTC
Created attachment 47768 [details]
test file created by 3.3 and resaved by 3.4, valid for MSO 2010
Comment 6 Cédric Bosdonnat 2011-06-09 06:27:53 UTC
Created attachment 47769 [details]
same document than attachement 47768, but created from scratch with 3.4
Comment 7 Petr Mladek 2011-06-09 07:46:30 UTC
It is quite confusing for users. We should do our best to fix it in 3.4.1 => increasing the severity.
Comment 8 tommy27 2011-06-11 10:45:00 UTC
I do not have MSO 2010 to test...

Is Cédric Bosdonnat saying that he cannot reproduce this bug?
Comment 9 Cédric Bosdonnat 2011-06-16 02:24:40 UTC
(In reply to comment #8)
> I do not have MSO 2010 to test...
> 
> Is Cédric Bosdonnat saying that he cannot reproduce this bug?

Surely not. I'm just saying I still haven't found what causes it.
Comment 10 Jan Holesovsky 2011-06-30 17:23:04 UTC
Created attachment 48628 [details]
My testing document generated by 3.4 (bad one) for reference.

So I got to something; I'll attach few files here.
Comment 11 Jan Holesovsky 2011-06-30 17:24:07 UTC
Created attachment 48629 [details]
Binary dump of test-3.4.doc (got using xxd test-3.4.doc > bad.txt).
Comment 12 Jan Holesovsky 2011-06-30 17:26:59 UTC
Created attachment 48630 [details]
This makes a working document from the non-working dump of test-3.4.doc.

Just apply this patch over the bad.txt, and do xxd -r bad.txt > good.doc, and see that good.doc now opens without warning.

So the difference that makes it non-working is newly introduced "ccb4 cc0c" in the WordDocument stream; no idea yet what does it mean, but hopefully we are close ;-)
Comment 13 Jan Holesovsky 2011-07-01 01:20:30 UTC
It is SPRM SDxtCharSpace that has wrong value.  Patch sent to the mailing list for approval & closing the bug :-)