Bug 134801 - Attached DOCX with charts generated by older LibreOffice before 7.0 can't be opened in Word 2016
Summary: Attached DOCX with charts generated by older LibreOffice before 7.0 can't be ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, filter:docx, regression
Depends on:
Blocks: OOXML-Chart DOCX-Corrupted
  Show dependency treegraph
 
Reported: 2020-07-14 13:25 UTC by Mike Kaganski
Modified: 2020-12-27 15:15 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
A sample DOCX that can be opened in LO, but not Word 2016 (32.37 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-07-14 13:25 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2020-07-14 13:25:18 UTC
Created attachment 163018 [details]
A sample DOCX that can be opened in LO, but not Word 2016

Opening the attachment in Word 2016, an error is reported:

> Word found unreadable content in file.docx. Do you want to recover the contents
> of this document? If you trust the source of this document, click Yes.

followed by

> Word experienced an error trying to open the file.
> Try these suggestions:
> ...

Opening it in LO succeeds; saving it again as DOCX generates the same problem in Word.

Tested with Version: 7.0.0.1 (x64)
Build ID: 04ba7e3f1e51af6c5d653e543a620e36719083fd
CPU threads: 12; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL

and Version: 7.1.0.0.alpha0+ (x64)
Build ID: 616a47c9570f9ce67b18a124f08f4a342bff3468
CPU threads: 12; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL

Ref: https://ask.libreoffice.org/en/question/255028/
Comment 1 Xisco Faulí 2020-07-14 14:23:10 UTC Comment hidden (obsolete)
Comment 2 Xisco Faulí 2020-07-14 14:24:00 UTC Comment hidden (obsolete)
Comment 3 Mike Kaganski 2020-07-14 14:39:08 UTC
(In reply to Xisco Faulí from comment #1)
> Not reproducible in
> 
> Version: 7.1.0.0.alpha0+

(In reply to Xisco Faulí from comment #2)
> nor in
> 
> Version: 6.4.4.0.0+

Sorry, not reproducible what exactly? Do you mean saving from them, and using

> MSO Word 2010

to open? (which would mean that it's not reproducible with Word 2010; interesting... I can repro with Word 2007 and both the files - from attachment here, and the files re-saved in LO 7.0) :-)
Comment 4 Xisco Faulí 2020-07-14 14:42:07 UTC
yep, I meant roundtripping it with LibreOffice 7.1 and 6.4 and open the generated document with MSO 2010
Comment 5 Regina Henschel 2020-07-14 21:36:11 UTC
I can confirm, that Word 365 does not open it.
OpenXML SDK 2.5 Productivity Tool reports a lot of errors, when I use its validator.

To repair the document, open it in LibreOffice daily, save it in "ODF 1.3" (strict, not extended), reopen the odt-file and then save it as docx.
Comment 6 Xisco Faulí 2020-07-16 10:33:17 UTC Comment hidden (obsolete)
Comment 7 Timur 2020-10-12 14:24:59 UTC
Yes, attached LO-saved DOCX doesn't open in MSO 2016 but this is not proper bug report. There must be source ODT so generation/filesave can be retested later.
Comment 8 Mike Kaganski 2020-10-12 14:27:02 UTC
(In reply to Timur from comment #7)
> but this is not proper
> bug report. There must be source ODT so generation/filesave can be retested
> later.

As noted in comment 0:

> Opening it in LO succeeds; saving it again as DOCX generates the same problem in Word.

So this is the proper bugdoc that can be used to debug where the bad information is exported from our document model.
Comment 9 QA Administrators 2020-10-13 04:47:51 UTC Comment hidden (obsolete)
Comment 10 Timur 2020-10-13 10:53:15 UTC
Problem is with both charts, if no charts then MSO opens. 
LO 4.2 is OK, 4.3 NOK, let's set regression. 
It's all tentative, if we lack source ODT, so we need to create one.

No problem to open in MSO with saving as DOC.
MSo also opens ODT created with this chart.
Comment 11 Timur 2020-10-13 11:51:24 UTC
I tried to bibisect in 43. Of course, there were more changes, 1st convert works and MSO opens, 2nd convert doesn't work, 3rd? no convert (not sure on order of 2 and 3), 4th convert works but MSO doesn't open. 

This is 2nd change when convert starts and stops with temp file (headless and also no save as from GUI)...and it's a revert. 

Commit 38acc9da0ab3d283d10bf6fead7a1a2b01efc782
Date:   Thu May 28 19:03:40 2015 +0800

    source-hash-be7d41a2bed7f424f38e2e7340f9b98c3f4f8fa2
    previous source-hash-4357dd89ca50deddd7cec7bfba87627a8515f62c
    
    commit be7d41a2bed7f424f38e2e7340f9b98c3f4f8fa2
    Author:     Miklos Vajna <vmiklos@collabora.co.uk>
    AuthorDate: Tue Feb 11 09:43:59 2014 +0100
    
        Revert "fdo#72563 : PAGEREF field tag not preserved during Roundtrip"

This reverts commit 138bd3d656c30911d5f45a8b6804e50857f6b30c. See comment 5 in the bugreport, the fix in its current form causes more trouble than it fixes.


There's one more source commit in that bug but seems filesave is still not working: 0fb3bdc5d3aa47a61affc67b20bdbb775808fb66.
It's bibisect commit f449b8edfdf958cf4af031d11e1275f1419c3044.
Comment 12 Timur 2020-10-13 12:49:24 UTC
There were more changes: convert works and MSO opens with chart, convert starts but just creates temp file, convert doesn't work, convert works but MSO opens without chart, convert works but MSO doesn't open. 

Here is a (probably useless) change from "converts not" to "opens not", single commit.

commit 7a64ea5834af805d7d6930b13b3a37eedbf3dfbc
Date:   Thu May 28 19:32:03 2015 +0800

    source-hash-91ff31b6f7c2fd217518f54396bbca6d4bde98a3
    previous source-hash-07c638f9421f0d17078d52c1574e1614262af37f

    commit 91ff31b6f7c2fd217518f54396bbca6d4bde98a3
    Author:     Alexander Wilms <f.alexander.wilms@gmail.com>
    AuthorDate: Tue Feb 25 19:32:26 2014 +0100
    Commit:     Caolán McNamara <caolanm@redhat.com>
    CommitDate: Wed Feb 26 09:55:18 2014 -0600
    
        Remove visual noise from offapi
Comment 13 Timur 2020-10-13 12:51:02 UTC
Here is a change from "opens without chart" to  "opens not", 2 source commits.

commit 8acaddcdf3f1e2b79f8435ffc89e7880a59c6a1d
Date:   Thu May 28 19:50:21 2015 +0800

    source-hash-af523f604df0da28687604d42c24f6dd3765f31a
    previous source-hash-3ef2725a8d9a15b585066e43384788a79fb4aef6
   
    Bibisect: This commit covers the following source commit(s) which failed to build
    f4f2ba8dd15fde198556d37cd0e1577b84985282
    
    commit af523f604df0da28687604d42c24f6dd3765f31a
    Author:     Caolán McNamara <caolanm@redhat.com>
    AuthorDate: Thu Mar 6 17:23:19 2014 +0000
    Commit:     Caolán McNamara <caolanm@redhat.com>
    CommitDate: Fri Mar 7 10:22:17 2014 +0000
    
        convert acceleration config page to .ui

There are 2 commits here: 

author	Caolán McNamara <caolanm@redhat.com>	2014-03-06 17:23:19 +0000
committer	Caolán McNamara <caolanm@redhat.com>	2014-03-07 10:22:17 +0000
commit af523f604df0da28687604d42c24f6dd3765f31a (patch)
tree f5895dee17b39ba1f432c029ec9b7c07e02c5977
parent f4f2ba8dd15fde198556d37cd0e1577b84985282 (diff)
convert acceleration config page to .ui
Change-Id: I0868b635d3aca4d368f32a0035b3f57a0da35ac7

author	Caolán McNamara <caolanm@redhat.com>	2014-03-07 08:52:34 +0000
committer	Caolán McNamara <caolanm@redhat.com>	2014-03-07 10:22:17 +0000
commit f4f2ba8dd15fde198556d37cd0e1577b84985282 (patch)
tree b6e60265ba2441b8cd7a9b46ba2e91ea42b2acae
parent 3ef2725a8d9a15b585066e43384788a79fb4aef6 (diff)
callcatcher: update unused code
Change-Id: I6487e6ede0a50d88a4f8c3d3b07bdad2603aa4b4
Comment 14 Aron Budea 2020-10-13 15:34:13 UTC Comment hidden (obsolete)
Comment 15 Timur 2020-10-13 16:25:28 UTC Comment hidden (obsolete)
Comment 16 Balázs Varga 2020-10-14 11:19:26 UTC
It is the similar problem that was fixed in https://bugs.documentfoundation.org/show_bug.cgi?id=131288.

But it has only been fixed for newly created/saved DOCX files. If a similar file was saved twice with LibreOffice, without this patch (https://cgit.freedesktop.org/libreoffice/core/commit/?id=b115d4899d827f885f7d35ced4cb64d2385e3422) earlier,  the file will be corrupted, because of the 0 Kb embedded spreadsheets.

Maybe we could handle this at DOCX import if we do not store a 0 Kb embedded spreadsheet in the OOXEmbeddings interopgrabbag, so we would not even export this file.