Bug 116410 - FILEOPEN DOCX: First paragraph has wrong top margin (space before)
Summary: FILEOPEN DOCX: First paragraph has wrong top margin (space before)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:6.1.0 target:6.0.4 target:5.4....
Keywords: bibisected, bisected, regression
Depends on:
Blocks: DOCX-Paragraph
  Show dependency treegraph
 
Reported: 2018-03-14 21:12 UTC by Regina Henschel
Modified: 2018-05-07 10:39 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Wrong top paragraph margin (48.04 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-03-14 21:12 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2018-03-14 21:12:36 UTC
Created attachment 140645 [details]
Wrong top paragraph margin

Open attached document. It has been created by Word 2016. It has a paragraph with top margin (=Spacing before) of 18pt (=0.635cm). In LibreOffice the margin is 4.75cm. When testing make sure, that your settings have enabled compatibility option "Add paragraph and table spacing at tops of pages".

The file has a screenshot, how it looks in Word 2016

I see the error in Version: 6.1.0.0.alpha0+
Build ID: 32f42d093d4408666151d03f04823e2bb39e46cd
CPU threads: 8; OS: Windows 10.0; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-03-13_23:25:09
Locale: de-DE (de_DE); Calc: CL

and in Version: 6.1.0.0.alpha0+ (x64)
Build ID: 6a9326803c01f4c9bc7da855053ce4e80646fad8
CPU threads: 8; OS: Windows 10.0; UI render: default; 
Locale: de-DE (de_DE); Calc: CL


It is OK in Version: 6.0.1.1 (x64)
Build ID: 60bfb1526849283ce2491346ed2aa51c465abfe6
CPU threads: 8; OS: Windows 10.0; UI render: default; 
Locale: de-DE (de_DE); Calc: CL
Comment 1 Xisco Faulí 2018-03-14 22:08:15 UTC
Regression introduced by:

author	Miklos Vajna <vmiklos@collabora.co.uk>	2018-02-14 15:31:35 +0100
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2018-02-14 20:21:57 +0100
commit 8b73bafbc18acb4dd8911d2f2de8158d98eb6144 (patch)
tree 5bb43213b1c7ef8802d8f6b50bffdf9742117ad2
parent b13678b1e1d6f4cac548ae7e088b6030c31cf081 (diff)
tdf#115719 DOCX import: increase paragraph spacing for anchored objects
... like Word 2013 does, when the version string indicates that the new
layout is wanted.

An alternative to this change would be to add a new sw layout
compatibility flag and handle this at a layout level (somewhere in
SwAnchoredObject::GetObjRectWithSpaces()). The downside of that approach
is that once a layout flag is added, it's not preferred to tweak its
behavior, while doing the same at import time is not a problem.

Also it's better to have a flag for something which has clear behavior
in some spec / implementer notes, which is not the case for this
problem. (I've mailed dochelp@microsoft, no answer so far.)

Bisected with: bibisect-linux64-6.1

Adding Cc: to Miklos Vajna
Comment 2 Commit Notification 2018-03-27 07:18:20 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#116410 DOCX import: restrict increased object spacing to multiple shapes

It will be available in 6.1.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 3 Xisco Faulí 2018-03-28 09:50:11 UTC
Verified in

Version: 6.1.0.0.alpha0+
Build ID: 8329f4541e27402d19729ae1588af8bfe61f7b49
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

Thank you Miklos!
Comment 4 Commit Notification 2018-04-10 09:19:54 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=da01b17379fcb3cb89eddf718c922d1676aa482a&h=libreoffice-6-0

tdf#116410 DOCX import: restrict increased object spacing to multiple shapes

It will be available in 6.0.4.

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 2018-04-30 09:58:42 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=82f6da65acaf02bc3b9d6b2039a4c307d5593423&h=libreoffice-5-4

tdf#116410 DOCX import: restrict increased object spacing to multiple shapes

It will be available in 5.4.8.

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 Commit Notification 2018-05-07 10:39:33 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-5-4-7":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=90d298ba863210ac2ad140c7bf8e426fc39b10ca&h=libreoffice-5-4-7

tdf#116410 DOCX import: restrict increased object spacing to multiple shapes

It will be available in 5.4.7.

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.