Bug 103961 - FILEOPEN: DOCX: paragraph spacing not imported
Summary: FILEOPEN: DOCX: paragraph spacing not imported
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.0.6.3 release
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:6.2.0
Keywords: bibisected, bisected, regression
: 103980 112503 (view as bug list)
Depends on:
Blocks: DOCX-Paragraph
  Show dependency treegraph
 
Reported: 2016-11-16 19:48 UTC by Xisco Faulí
Modified: 2022-12-20 11:21 UTC (History)
4 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-16 19:48:15 UTC
Steps:
1. Open attachment 108988 [details]
2. Right Click - Edit Style - Indents & Spacing

Observed behaviour: Below paragraph spacing is 0.0
Expected behaviour: Below paragraph spacing is 0.35

Reproduced in 

Version: 5.3.0.0.alpha1+
Build ID: 757a60d01dd152aadab2ba3c8224252481ce8a88
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

but not in

Version: 4.3.0.0.alpha1+
Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e
Comment 1 Xisco Faulí 2016-11-16 22:22:05 UTC
Another file affected: attachment 67982 [details]
Comment 2 MM 2016-11-16 22:35:04 UTC
Unconfirmed with v4.4.7.2 under mint 17.3 x64.
Unconfirmed with v5.0.0.0.beta3 under mint 17.3 x64.
Confirmed with v5.0.6.3 under mint 17.3 x64.
Comment 3 raal 2016-11-18 21:21:46 UTC
This seems to have begun at the below commit.
Adding Cc: to Miklos Vajna; Could you possibly take a look at this one? Thanks

author	Miklos Vajna <vmiklos@collabora.co.uk>	2016-03-29 12:03:00 (GMT)
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2016-03-29 13:26:57 (GMT)
commit eae2331f83bd58bacccd898d60f6c5f54856c036 (patch)
tree f73e187dfc7d8673b15a0bee475ccdb98270a85c
parent dde79dd5044f6b5d6d9973f8f335956bfcb6fb4c (diff)
tdf#98882 DOCX import: set default para properties on the Standard para style
That's what the DOC import does, and that's the reason e.g. the strange
unwanted crop of the as-char anchored picture doesn't happen there.

This also needs the "reset all existing style properties back to
default" logic to be adapted: the Standard style has to be reset before
the default are set, and later it should be left alone, otherwise the
defaults are lost.
 5c14252fb0be0d2e8f8afdfc2e63525a947adce6 is the first bad commit
commit 5c14252fb0be0d2e8f8afdfc2e63525a947adce6
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Sat Apr 2 17:02:56 2016 -0700

    source eae2331f83bd58bacccd898d60f6c5f54856c036

	 git bisect log
# bad: [6380ca07b05f68dedcaa379302cfe1fa478571c4] source 60b74fe1775e647545d2da1fcc58a4c63ec18aa5
# good: [1f670510f08cb800cbae2a1dd6ea70d3542e4721] source 49c2b9808df8a6b197dec666dfc0cda6321a4306
git bisect start 'origin/master' 'oldest'
# good: [38f37b8ec1a2d199bb957cfd2581df7d1b273b74] source c0da1080b61a1d51654fc34fdaeba373226065ff
git bisect good 38f37b8ec1a2d199bb957cfd2581df7d1b273b74
# bad: [11ae494d8c566f23e0ef84ba0cc25fb1388b67f7] source 470cfa9860232ab70e017e6084d80f80d469555c
git bisect bad 11ae494d8c566f23e0ef84ba0cc25fb1388b67f7
# good: [d247d25062e6cc4afccdc3c4be84a2b98523b36a] source 150c1dcab007dd8acc1551791f42eef692f9e531
git bisect good d247d25062e6cc4afccdc3c4be84a2b98523b36a
# bad: [812f064e57b17d51c4e0804fb39e13f0e0661ff2] source 8d123bf1491bcc7415f4dde3ddd397a11146bb38
git bisect bad 812f064e57b17d51c4e0804fb39e13f0e0661ff2
# good: [c649da763f4116e21b0cef91c706ea7bb73c25bc] source 402572e25c0c9eb1f01c928f2ae422ab62a55ba1
git bisect good c649da763f4116e21b0cef91c706ea7bb73c25bc
# good: [d16c94f250b69c07168c9c677ae39f5b4f7044c1] source 82510829d5be4321166ae80679b43b376f41ae9e
git bisect good d16c94f250b69c07168c9c677ae39f5b4f7044c1
# bad: [3f29a604df78a6d7b5a0fd4f0794b196431f0a34] source a9a9f694089505c5fbbf5e099d5e185e1a46ab29
git bisect bad 3f29a604df78a6d7b5a0fd4f0794b196431f0a34
# good: [e892c24b9cca10f4d3f4b5c2ca30d5744537a21a] source ed7ad21acf35ffdad8656b25e664131bcf38b331
git bisect good e892c24b9cca10f4d3f4b5c2ca30d5744537a21a
# good: [25132308ede791e4e967b1429f8602ed6fcfb5e7] source d739811038c54081ea4039a939af8f320b31378b
git bisect good 25132308ede791e4e967b1429f8602ed6fcfb5e7
# bad: [5c14252fb0be0d2e8f8afdfc2e63525a947adce6] source eae2331f83bd58bacccd898d60f6c5f54856c036
git bisect bad 5c14252fb0be0d2e8f8afdfc2e63525a947adce6
# good: [13d81a7d0fd3bf11073832a936b4e993c86b05f8] source 0f2e6f1fbb42fe33bee3ffd5b5200b17be3382d9
git bisect good 13d81a7d0fd3bf11073832a936b4e993c86b05f8
# good: [1a12505420c113393b0bef425c930ce5a81db8e2] source a91272a6a423e911b832b2f103a77521b4106ed1
git bisect good 1a12505420c113393b0bef425c930ce5a81db8e2
# good: [0ab0b76861fe450ae3ae246d85ff56425cf94384] source dde79dd5044f6b5d6d9973f8f335956bfcb6fb4c
git bisect good 0ab0b76861fe450ae3ae246d85ff56425cf94384
# first bad commit: [5c14252fb0be0d2e8f8afdfc2e63525a947adce6] source eae2331f83bd58bacccd898d60f6c5f54856c036
Comment 4 Xisco Faulí 2017-09-20 08:03:25 UTC
*** Bug 112503 has been marked as a duplicate of this bug. ***
Comment 5 Xisco Faulí 2018-03-01 13:20:37 UTC
Still reproducible in

Version: 6.1.0.0.alpha0+
Build ID: e2cb154195fdc2ffccdb6f5e87cae8b29640b3eb
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 6 Justin L 2018-07-12 20:48:18 UTC
proposed fix https://gerrit.libreoffice.org/57371
Comment 7 Commit Notification 2018-07-20 13:26:38 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#103961 writerfilter: parentless styles need pPrDefault(s)

It will be available in 6.2.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 8 Miklos Vajna 2018-07-20 13:27:04 UTC
Thanks Justin for fixing this.
Comment 9 Justin L 2018-07-23 13:09:57 UTC
This patch might need to be revised (so not backporting) because now we cannot distinguish which settings have come because of DocDefaults, and which have been specified by the style.

One use for this distinction is TableStyles.  TableStyles override DocDefaults, but not Style properties.  If DocDefaults get mixed into Style Properties, then we don't know if it can be overridden or not.

So that suggests that on import, we need to map DocDefaults to LibreOffice's internal defaults. Export support might not be necessary (since we probably hard-code everything at a paragraph level anyway - yuck).
Comment 10 Justin L 2018-07-24 08:11:06 UTC
*** Bug 103980 has been marked as a duplicate of this bug. ***
Comment 11 Xisco Faulí 2018-07-24 10:18:41 UTC
Verified in

Version: 6.2.0.0.alpha0+
Build ID: dcbb65f2a4a3ee70ccd4896d7a5e975dbd9e6509
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: x11; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded

@Justin, Thanks for fixing this!!!!
Comment 12 Justin L 2018-07-24 18:56:42 UTC
(In reply to Justin L from comment #9)
> So that suggests that on import, we need to map DocDefaults to LibreOffice's
> internal defaults.
https://gerrit.libreoffice.org/57932 related tdf#103961 writerfilter: DocDefaults -> defaults
>. Export support might not be necessary (since we probably
> hard-code everything at a paragraph level anyway - yuck).
No, export support is needed. If the style only inherits the property, then there will be nothing to trigger the code to output that property. see ooxmlexport fdo77716.docx (and tdf97090 also complained).
Comment 13 Commit Notification 2018-08-06 05:30:14 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

related tdf#103961 writerfilter: DocDefaults -> defaults

It will be available in 6.2.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 14 Commit Notification 2018-08-08 10:34:15 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#103961: delay merge of default props until export

It will be available in 6.2.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 15 Commit Notification 2018-09-12 18:12:47 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

~revert tdf#103961: delay merge of default props until export

It will be available in 6.2.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 16 Xisco Faulí 2018-09-13 14:40:44 UTC Comment hidden (obsolete)
Comment 17 Justin L 2018-09-13 15:36:22 UTC
fixed by commit in comment 7. The reverted fix from comment 14 was an enhancement.
Comment 18 Xisco Faulí 2018-09-14 08:54:11 UTC Comment hidden (obsolete)