Bug 113183 - FILEOPEN DOCX: Text box alignment "right" from "page" too far right (due to another text box?)
Summary: FILEOPEN DOCX: Text box alignment "right" from "page" too far right (due to a...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.0 all versions
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:6.1.0 target:6.0.0.1
Keywords: bibisected, bisected, filter:docx, regression
Depends on:
Blocks: DOCX-Textbox
  Show dependency treegraph
 
Reported: 2017-10-17 12:15 UTC by Patrick Jaap
Modified: 2019-09-23 19:48 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
file that triggers the bug (70.13 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-10-17 12:16 UTC, Patrick Jaap
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Jaap 2017-10-17 12:15:34 UTC
Description:
The attached file contains a text box in the footer with the page number. Alignment is set to "right" relative from the "page". LO renders the box on the very right edge, MSO 2013 renders it more left (there is about 1-2 cm free space to the right).

Steps to Reproduce:
1. Open bspPageNumber.docx in Writer


Actual Results:  
Page number rendered on the very right edge.

Expected Results:
There is a small space on the right side of the page number, like in MSO 2013.


Reproducible: Always

User Profile Reset: No

Additional Info:
I have a clue, what causes the bug: There is a suspicious small empty text box on the right side of the document. If I remove this box, the position of the page number is correct! It looks like this text box manipulates the valid horizontal region of the page.


User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0
Comment 1 Patrick Jaap 2017-10-17 12:16:38 UTC
Created attachment 137049 [details]
file that triggers the bug
Comment 2 Xisco Faulí 2017-10-17 20:53:04 UTC
Regression introduced by:

author	Miklos Vajna <vmiklos@collabora.co.uk>	2014-12-21 10:12:40 (GMT)
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2014-12-21 18:13:47 (GMT)
commit 44ea0b3a2550a79148fb86f3e7175fffe77674b4 (patch)
tree 5c0207c67758e888f6a4ce8a49c62f1285600da8
parent 8870e068cc7368ffa14a6938836b370d2a188b64 (diff)
writerfilter: refactor to get rid of savedPositionOffset{V,H} statics
Which are extremely scary, allowing a shape position from one doc to
appear in an other if two writerfilter import is in progress at the same
time.

This partially reverts 8fa1a0874765ea7db57e496f1d92731b9ab09280 (read
wp:positionOffset, wp:alignV and wp:alignH properly (bnc#513579),
2011-05-04).

Bisected with bibisect-50max

Adding Cc: to Miklos Vajna
Comment 3 Commit Notification 2017-12-12 12:58:19 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#113183 DOCX import: fix not independent text box alignments

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 4 Patrick Jaap 2017-12-12 16:35:50 UTC
I can confirm that this bug is fixed in current master with Miklos's patch. Thanks!
Comment 5 Oliver Sander 2017-12-13 04:45:40 UTC
Thanks Miklos, Xisco, Patrick!  Any chance to get this backported to the 6.0 branch?
Comment 6 Commit Notification 2017-12-13 08:27:53 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=134898e42ac6c455d5df0c2de3842d1bd7309f5f&h=libreoffice-6-0

tdf#113183 DOCX import: fix not independent text box alignments

It will be available in 6.0.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 7 Miklos Vajna 2017-12-13 08:50:41 UTC
Done. :-)