Bug 113258

Summary: FILEOPEN: Text in shape in a docx document is misplaced (partially cut) when opening in LO
Product: LibreOffice Reporter: jan.prochaska
Component: LibreOfficeAssignee: Miklos Vajna <vmiklos>
Status: VERIFIED FIXED    
Severity: normal CC: jluth, vmiklos, xiscofauli
Priority: medium Keywords: bibisected, bisected, filter:docx, regression
Version: 5.3.0.0.alpha1+   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=109229
https://bugs.documentfoundation.org/show_bug.cgi?id=84678
Whiteboard: target:6.1.0 target:6.0.2
Crash report or crash signature: Regression By:
Attachments: Sample Hello world
Comparison of MS Word and LibreOffice regarding document display
tdf113258_noBeforeAutospacing.docx: regression example

Description jan.prochaska 2017-10-19 08:23:25 UTC
Description:
In the attached sample document created in MS Word (docx format) a text in shape is displayed misplaced (partially cut) when opening the same (docx) document in LibreOffice.

Using portable version
Version: 5.3.4.2
Build ID: f82d347ccc0be322489bf7da61d7e4ad13fe2ff3
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; Layout Engine: new; 
Locale: en-US (sk_SK); Calc: CL


Steps to Reproduce:
1. Open the document in MS Word and check the text placement
2. Close the document
3. Open the document in Libre Office and check the text placement
4. Close the document

Actual Results:  
The placement in Word is different to the placement in Libre Office.
When looking at the document in Libre Office, the text is misplaced and partially cut.

Expected Results:
The text placement should be more or less the same in both versions and it should not be misplaced to such extent that it's cut.


Reproducible: Always

User Profile Reset: No - and I think it's independent of the user profile. The result is the same on a different machine with different account.

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0
Comment 1 jan.prochaska 2017-10-19 08:24:21 UTC
Created attachment 137101 [details]
Sample Hello world
Comment 2 jan.prochaska 2017-10-19 08:25:26 UTC
Created attachment 137102 [details]
Comparison of MS Word and LibreOffice regarding document display
Comment 3 Xisco FaulĂ­ 2017-10-19 09:40:17 UTC
Regression introduced by:

author	Miklos Vajna <vmiklos@collabora.co.uk>	2016-10-25 07:05:47 (GMT)
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2016-10-25 09:32:01 (GMT)
commit c761df1e42fd11acc5fc05b0baacd803c3788ca6 (patch)
tree 6ed550b92aefe19191fa14b462894714907baa3c
parent fab262f115e5c0e6d43b65e376241152ddff82b3 (diff)
tdf#84678 DOCX import: fix handling of textbox margins
Regression from commit d379d18666aa42031359ca8eb34b0021960347ae (oox:
import WPS shape with text as shape with textbox, 2014-06-18), the
problem for a long time was that in Writer text frames without borders
couldn't have text margins, either.

Recently a compat setting was added in the WW8 filter for this
situation, so use that in the DOCX import as well, and improve
SwTextBoxHelper to handle the margin properties.

Bisected with: bibisect-linux-64-5.3

Adding Cc: to Miklos Vajna
Comment 4 jan.prochaska 2017-12-08 14:16:38 UTC
Hello Team,
just FYI, tried the same document in the version 6.0.0.0 beta1 x64, the result was same.
Comment 5 Commit Notification 2018-02-13 08:58:35 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#113258 DOCX import: fix beforeAutospacing for shape first paragraph

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 6 Xisco FaulĂ­ 2018-02-14 11:09:10 UTC
Verified in

Version: 6.1.0.0.alpha0+
Build ID: 48d3ff5c498f8f186d4ee72871af379010403442
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 7 Commit Notification 2018-02-16 09:24:06 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=3779c742a52d8dde3fa7b74c2a8ca8bc7d071b4e&h=libreoffice-6-0

tdf#113258 DOCX import: fix beforeAutospacing for shape first paragraph

It will be available in 6.0.2.

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 Justin L 2018-08-28 16:14:27 UTC
Created attachment 144517 [details]
tdf113258_noBeforeAutospacing.docx: regression example

proposed fix at https://gerrit.libreoffice.org/59705