Bug 104115 - FILESAVE: File corrupted after DOCX roundtrip (charSpace)(followup)
Summary: FILESAVE: File corrupted after DOCX roundtrip (charSpace)(followup)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.5.0.0.alpha0+ Master
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:5.4.0 target:5.3.0.1
Keywords: bibisected, bisected, filter:docx, regression
Depends on:
Blocks:
 
Reported: 2016-11-22 15:10 UTC by Xisco Faulí
Modified: 2016-12-09 18:17 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2016-11-22 15:10:37 UTC
This is a follow-up of bug 103982

1. Open attachment 46282 [details]
2. Save as a new .DOCX file
3. Open then new file in MSOffice

Observed behaviour: file is corrupted

Reproduced in

Version: 5.3.0.0.alpha1+
Build ID: 4ebf1ea7cb66fc3e6b94cd38dd233aaead69f3d5
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk3; Layout Engine: new; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 1 Xisco Faulí 2016-11-22 15:11:33 UTC
Regression introduced by:

author	Miklos Vajna <vmiklos@collabora.co.uk>	2014-12-04 09:42:40 (GMT)
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2014-12-04 10:25:38 (GMT)
commit a5a836d8c43dc9cebbbf8af39bf0142de603a7c6 (patch)
tree 5211f53b880421d89cfbcf36688d6ea29dcbb7be
parent 5f0f3d4e91e9eb1d1f60b0cd073e7bbd8ea38c29 (diff)

DOCX filter: effect extent should be part of the margin

OOXML has an object size (extent) a size including effects like shadow (effect
extent) and the margin (top/bottom/left/right distance). Our doc model doesn't
have an explicit "effect extent", but to have the intended layout, we at least
need the spacing of the effect around flys (even if a number of effects are not
rendered). Fix this by adding the effect extent to the margin; if we still have
the effect extent grab-bag around, then this can be undone during export.

Adding CC: to Miklos Vajna
Comment 2 Xisco Faulí 2016-11-22 15:12:46 UTC
This document is also affected: attachment 68219 [details]
Comment 3 Commit Notification 2016-11-29 10:53:48 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a5cc8993dceb61c63caf26ae995d9d62905291e5

tdf#104115 DOCX export: ClosedBezierShape should always result in <a:custGeom>

It will be available in 5.4.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 4 Xisco Faulí 2016-11-29 16:50:00 UTC
Verified in

Version: 5.4.0.0.alpha0+
Build ID: ef0e1c05c32a5a69502e0f0d1d97789c125345a2
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 5 Commit Notification 2016-11-30 08:06:47 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c3d124254a3097163aae127e2fe3e34980417f20&h=libreoffice-5-3

tdf#104115 DOCX export: ClosedBezierShape should always result in <a:custGeom>

It will be available in 5.3.0.1.

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

Affected users are encouraged to test the fix and report feedback.
Comment 6 Timur 2016-12-09 18:17:02 UTC
I guess Xisco verified opening in MSO.
But Open XML Productivity Tools still gives the same 2 errors for attachment 46282 [details]: 1 "unexpected child element" and 1 "charSpace has invalid value".