Bug 104713 - FILEOPEN: DOCX Paragraph spacing is set to 0
Summary: FILEOPEN: DOCX Paragraph spacing is set to 0
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.3.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:5.4.0 target:5.3.0.1
Keywords: bibisected, bisected, filter:docx, regression
Depends on:
Blocks: DOCX-Paragraph
  Show dependency treegraph
 
Reported: 2016-12-16 12:02 UTC by Xisco Faulí
Modified: 2018-07-04 15:37 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
sample (2.28 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2016-12-16 12:02 UTC, Xisco Faulí
Details
comparison MSO Writer 2010 and LibreOffice 5.4 (14.74 KB, image/png)
2016-12-16 12:05 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2016-12-16 12:02:39 UTC
Created attachment 129690 [details]
sample

Steps:
1. Open attached document

Observed behaviour: Paragraph spacing in Heading 1 is 0. it should be 0.42 above and 0.21 below

Reproduced in

Version: 5.4.0.0.alpha0+
Build ID: 634589b340316ba64b731b4d923c1056be415494
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 1 Xisco Faulí 2016-12-16 12:03:57 UTC
Regression introduced by:

author	Justin Luth <justin_luth@sil.org>	2016-09-14 11:34:29 (GMT)
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2016-09-15 08:40:43 (GMT)
commit b79b5e0df6dc5a0ba18054b0503d6fa804b69f02 (patch)
tree 8c262f579fc3cdbb280eb845c2b7d5c49039c374
parent 7f0a219c9ad38ae33b51ff69d545f69659691c1e (diff)
tdf#53856 writerfilter set parentless style based on default
docx import of base-less style "Text" was conflicting with
LibreOffice's builtin "Caption"->"Text" paragraph style.

This only worked when the parent .isEmpty(). Style names can
use localization, so forcing the imported parent-name will not
match between different language versions.

Adding Cc: to Justin Luth
Comment 2 Xisco Faulí 2016-12-16 12:05:51 UTC
Created attachment 129691 [details]
comparison MSO Writer 2010 and LibreOffice 5.4
Comment 3 Justin L 2016-12-16 17:37:45 UTC
It looks like this sample document (trial.docx) is a bit of a mess, and that LO's default settings are significantly different from MSWord(^1).  If sample.docx is round-tripped by MSWord 2007 first, then it looks fine (the styles now actually contain the settings as seen in Word). The styles.xml file in trial.docx does not define normal, nor does it contain significant heading1 definitions.

^1: Specifically, Word indicates that the default style has LineSpacing=1.15 and below=10pt, while LO has LineSpacing=1, and below=0.

Proposed fix requires that the standard paragraph style be defined and imported before allowing conflicting styles to be re-assigned to inherit from the default.  https://gerrit.libreoffice.org/32103
Comment 4 Commit Notification 2016-12-19 08:45:07 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#104713 writerfilter: parentless styles - only if default defined

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 5 Commit Notification 2016-12-19 11:36:27 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

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

tdf#104713 writerfilter: parentless styles - only if default defined

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.