Bug 127513 - FILESAVE: DOCX: export filter corrupts VML graphic
Summary: FILESAVE: DOCX: export filter corrupts VML graphic
Status: RESOLVED DUPLICATE of bug 118693
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Regress-elim-SvxShapePolyPolygonBezier
  Show dependency treegraph
 
Reported: 2019-09-12 09:29 UTC by christoph_egger
Modified: 2020-12-07 04:13 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Word docx document (36.71 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-09-12 09:29 UTC, christoph_egger
Details
This screenshot shows the correct graphic in step 2 of reproduce (174.83 KB, image/png)
2019-09-13 08:30 UTC, christoph_egger
Details
This screenshot shows the corrupted graphic in step 6 of reproduce (148.32 KB, image/png)
2019-09-13 08:32 UTC, christoph_egger
Details
This screenshot shows the corrupted graphic in step 6 of reproduce from builddev-2019-09-1[234] (125.24 KB, image/png)
2019-09-14 10:00 UTC, christoph_egger
Details
Powerpoint pptx file: For testing vml graphic with nested groupings (41.63 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2019-09-15 18:28 UTC, christoph_egger
Details
Excel XLSX file: For testing vml graphic with nested groupings (37.83 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2019-09-15 18:32 UTC, christoph_egger
Details
Word docx file (page 9 with vml only): For testing vml graphic with nested groupings (32.70 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-09-24 07:46 UTC, christoph_egger
Details
The last docx file saved with Writer master, reopened in Word and Writer (74.61 KB, image/png)
2020-11-30 15:04 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description christoph_egger 2019-09-12 09:29:54 UTC
Created attachment 154128 [details]
Word docx document

Filesave DOCX corrupts the graphic.

Steps to reproduce:
1. Open the word document (please find it in the attachment of this bug report)
2. View the graphic on page 9: It is correct (IMPORTANT: NO EDITING!)
3. Save the document as docx
4. Close the document
5. Open the saved word document from step 3
6. View the graphic on page 9: It is corrupted
Comment 1 Regina Henschel 2019-09-12 22:44:53 UTC
I see no problem in Version: 6.4.0.0.alpha0+ (x64)
Build ID: f76dbe5dc581845996a8bd5f5109c5e2ff5a27b0
CPU threads: 8; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: de-DE (en_US); UI-Language: en-US
Calc: CL

and no problem in Version: 6.2.5.2 (x64)
Build ID: 1ec314fa52f458adc18c4f025c545a4e8b22c159
CPU threads: 8; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: de-DE (en_US); UI-Language: en-US
Calc: threaded
Comment 2 christoph_egger 2019-09-13 08:30:56 UTC
Created attachment 154149 [details]
This screenshot shows the correct graphic in step 2 of reproduce
Comment 3 christoph_egger 2019-09-13 08:32:02 UTC
Created attachment 154150 [details]
This screenshot shows the corrupted graphic in step 6 of reproduce
Comment 4 christoph_egger 2019-09-13 08:34:56 UTC
The Version I use is:

Version: 6.3.1.2
Build ID: b79626edf0065ac373bd1df5c28bd630b4424273
CPU threads: 8; OS: Mac OS X 10.14.6; UI render: default; VCL: osx; 
Locale: en-US (en_DE.UTF-8); UI-Language: en-US
Calc: threaded

I added two screenshots as attachment that shows my results
in step 2: View the graphic on page 9: It is correct
and step 6: View the graphic on page 9: It is corrupted
Comment 5 Regina Henschel 2019-09-13 10:40:22 UTC
Should have read more carefully. The error is in the re-saved document.

Confirm with Version: 6.4.0.0.alpha0+ (x64)
Build ID: f76dbe5dc581845996a8bd5f5109c5e2ff5a27b0
CPU threads: 8; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: de-DE (en_US); UI-Language: en-US
Calc: CL
Comment 6 Regina Henschel 2019-09-13 11:29:29 UTC
The re-saved file has wrong attribute id="_x005F_..." in element <v:shapetype>. That might be fixed with commit
 https://cgit.freedesktop.org/libreoffice/core/commit/?id=c5d37d324cd6d17114c209de1862344ad58a1d93
tdf#117274 XLSX export: fix VML comment shape type id
from this morning.

But I don't know, whether this is the only error.

A developer build containing this fix, will be available in about 2 days. Please test, whether that fix will resolve all problems. You can get developer builds from https://dev-builds.libreoffice.org/daily/master/. They can be installed parallel to your productive version. And as it is no release build, only test it with a copy of your document.

I set the bug to "NEEDINFO", so that it is clear, that a reaction from you is expected. There are so many bugs, that it is necessary, to identify the problems very clearly, before a developer touches it.

(Please, next time you report a bug, reduce the content as far as possible. It is cumbersome to find diagrams in such long document in the source.)
Comment 7 christoph_egger 2019-09-14 10:00:11 UTC
Created attachment 154158 [details]
This screenshot shows the corrupted graphic in step 6 of reproduce from builddev-2019-09-1[234]


I have tested these three versions:

Version: 6.4.0.0.alpha0+
Build ID: 78e369cc261fd83f2259a70b2589b928b59090f0
CPU threads: 8; OS: Mac OS X 10.14.6; UI render: default; VCL: osx; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2019-09-12_07:36:52
Locale: en-US (en_DE.UTF-8); UI-Language: en-US
Calc: threaded

Does not have the patch (according to https://gerrit.libreoffice.org/plugins/gitiles/core/+log/78e369cc261fd83f2259a70b2589b928b59090f0):
https://cgit.freedesktop.org/libreoffice/core/commit/?id=c5d37d324cd6d17114c209de1862344ad58a1d93
tdf#117274 XLSX export: fix VML comment shape type id



Version: 6.4.0.0.alpha0+
Build ID: c5d37d324cd6d17114c209de1862344ad58a1d93
CPU threads: 8; OS: Mac OS X 10.14.6; UI render: default; VCL: osx; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2019-09-13_06:00:35
Locale: en-US (en_DE.UTF-8); UI-Language: en-US
Calc: threaded

Includes the patch (according to https://gerrit.libreoffice.org/plugins/gitiles/core/+log/c5d37d324cd6d17114c209de1862344ad58a1d93):
https://cgit.freedesktop.org/libreoffice/core/commit/?id=c5d37d324cd6d17114c209de1862344ad58a1d93
tdf#117274 XLSX export: fix VML comment shape type id



Version: 6.4.0.0.alpha0+
Build ID: df809481d4fcee0ac51cf056161ee4953ade44bd
CPU threads: 8; OS: Mac OS X 10.14.6; UI render: default; VCL: osx; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2019-09-14_04:52:44
Locale: en-US (en_DE.UTF-8); UI-Language: en-US
Calc: threaded

Includes the patch (according to https://gerrit.libreoffice.org/plugins/gitiles/core/+log/df809481d4fcee0ac51cf056161ee4953ade44bd):

https://cgit.freedesktop.org/libreoffice/core/commit/?id=c5d37d324cd6d17114c209de1862344ad58a1d93
tdf#117274 XLSX export: fix VML comment shape type id


All these show the same result: The square is gone and that is unrelated
to the suggested fix. The graphic is unchanged: see screenshot I added to the attachment.
Comment 8 christoph_egger 2019-09-14 10:01:38 UTC
Set status to unconfirmed as requested.
Comment 9 Regina Henschel 2019-09-14 18:57:47 UTC
Thank you for testing. So now we are sure, that it is not a duplicate of that bug.

It seems to be a problem with grouping with legacy VML format. The drawing has several nested groups. If I use Word and ungroup them all, then opening document in LO, saving and reopening gives a better result. Then there are only wrong styles on the text boxes, but the lines are no longer lost.
Comment 10 christoph_egger 2019-09-15 18:28:56 UTC
Created attachment 154179 [details]
Powerpoint pptx file: For testing vml graphic with nested groupings

Since VML graphic is not DOCX only I have tested this with pptx filesave.

Testing done with Version: 6.4.0.0.alpha0+
Build ID: df809481d4fcee0ac51cf056161ee4953ade44bd
CPU threads: 8; OS: Mac OS X 10.14.6; UI render: default; VCL: osx; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2019-09-14_04:52:44
Locale: en-US (en_DE.UTF-8); UI-Language: en-US
Calc: threaded

Result:
In the resaved pptx there are no (visible) shape errors, no textbox style errors, no grouping errors.

I attached the pptx file for validation purpose.
It might be helpful to implement this.
Comment 11 christoph_egger 2019-09-15 18:32:48 UTC
Created attachment 154180 [details]
Excel XLSX file: For testing vml graphic with nested groupings

Since VML graphic is not DOCX only I have tested this with pptx filesave.

Testing done with Version: 6.4.0.0.alpha0+
Build ID: df809481d4fcee0ac51cf056161ee4953ade44bd
CPU threads: 8; OS: Mac OS X 10.14.6; UI render: default; VCL: osx; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2019-09-14_04:52:44
Locale: en-US (en_DE.UTF-8); UI-Language: en-US
Calc: threaded

Result:
Loading xlsx (BEFORE SAVING) shows a textbox style error in the textbox with the Text "Micah".

In the resaved xlsx all groupings are gone as if this feature has never been
implemented. The resaved xlsx shows textbox style errors.
Comment 12 christoph_egger 2019-09-15 18:36:03 UTC
(In reply to Regina Henschel from comment #9)
> Thank you for testing. So now we are sure, that it is not a duplicate of
> that bug.
> 
> It seems to be a problem with grouping with legacy VML format. The drawing
> has several nested groups. If I use Word and ungroup them all, then opening
> document in LO, saving and reopening gives a better result. Then there are
> only wrong styles on the text boxes, but the lines are no longer lost.

Thank you for this information.

I can confirm this observation in docx.
I also tested VML with tested groupings for pptx and xlsx.
See Comment 10 and 11 for details.

Maybe it makes sense to split this bug report?
Comment 13 christoph_egger 2019-09-24 07:46:38 UTC
Created attachment 154408 [details]
Word docx file (page 9 with vml only): For testing vml graphic with nested groupings

(In reply to Regina Henschel from comment #6)
[...]
> 
> (Please, next time you report a bug, reduce the content as far as possible.
> It is cumbersome to find diagrams in such long document in the source.)

Add word docx document to attachments with related vml graphic only.
It contains page 9 from attachment 154128 [details] with vml graphic only and also has the nested groupings.
Comment 14 christoph_egger 2019-12-11 10:04:09 UTC
Retested with version

Version: 6.4.0.0.beta1
Build ID: 4d7e5b0c40ed843384704eca3ce21981d4e98920
CPU threads: 8; OS: Mac OS X 10.14.6; UI render: default; VCL: osx; 
Locale: en-US (en_DE.UTF-8); UI-Language: en-US
Calc: threaded

Result: Same as reported. No change at all.
Comment 15 christoph_egger 2020-08-14 07:59:57 UTC
(In reply to christoph_egger from comment #14)
> Retested with version
> 
> Version: 6.4.0.0.beta1
> Build ID: 4d7e5b0c40ed843384704eca3ce21981d4e98920
> CPU threads: 8; OS: Mac OS X 10.14.6; UI render: default; VCL: osx; 
> Locale: en-US (en_DE.UTF-8); UI-Language: en-US
> Calc: threaded
> 
> Result: Same as reported. No change at all.

Retested with version

Version: 7.0.0.3
Build ID: 8061b3e9204bef6b321a21033174034a5e2ea88e
CPU threads: 8; OS: Mac OS X 10.14.6; UI render: default; VCL: osx
Locale: en-US (en_DE.UTF-8); UI: en-US
Calc: threaded

This issue is still present
Comment 16 christoph_egger 2020-08-14 09:20:17 UTC
(In reply to christoph_egger from comment #15)
> (In reply to christoph_egger from comment #14)
> > Retested with version
> > 
> > Version: 6.4.0.0.beta1
> > Build ID: 4d7e5b0c40ed843384704eca3ce21981d4e98920
> > CPU threads: 8; OS: Mac OS X 10.14.6; UI render: default; VCL: osx; 
> > Locale: en-US (en_DE.UTF-8); UI-Language: en-US
> > Calc: threaded
> > 
> > Result: Same as reported. No change at all.
> 
> Retested with version
> 
> Version: 7.0.0.3
> Build ID: 8061b3e9204bef6b321a21033174034a5e2ea88e
> CPU threads: 8; OS: Mac OS X 10.14.6; UI render: default; VCL: osx
> Locale: en-US (en_DE.UTF-8); UI: en-US
> Calc: threaded
> 
> This issue is still present

Restested with version

Version: 7.1.0.0.alpha0+
Build ID: <buildversion>
CPU threads: 8; OS: Mac OS X 10.14.6; UI render: default; VCL: osx
Locale: en-US (en_DE.UTF-8); UI: en-US
Calc: threaded

I downloaded it from:

https://dev-builds.libreoffice.org/daily/master/MacOSX-x86_64@tb81-TDF/2020-08-14_07.26.35/LibreOfficeDev_7.1.0.0.alpha0_MacOS_x86-64.dmg

The issue is still present
Comment 17 NISZ LibreOffice Team 2020-11-30 15:04:35 UTC
Created attachment 167684 [details]
The last docx file saved with Writer master, reopened in Word and Writer

This is still a problem with:

Version: 7.2.0.0.alpha0+ (x64)
Build ID: f7e2f5bca938aa916830e07895d2da6820282055
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: CL

attachment #154408 [details] has wrong size/position after save and reload, but it's correct in Word.

This is the same regression as bug #118693 - just checked, the file in this picture looked good in Writer < 6.2 before 

https://cgit.freedesktop.org/libreoffice/core/commit/?id=36bade04d3780bc54c51b46bb0b63e69789658a5
Comment 18 NISZ LibreOffice Team 2020-11-30 15:07:03 UTC
For simplicity, let's just mark this as a duplicate.

The xlsx save problem form comment #11 is tracked in bug #70293 - grouped shapes are saved to xlsx ungrouped.

*** This bug has been marked as a duplicate of bug 118693 ***