Bug 106153

Summary: FILEOPEN: DOCX: Text boxes overlapping the page borders are handled wrong
Product: LibreOffice Reporter: Jan-Marek Glogowski <glogow>
Component: WriterAssignee: Attila Bakos (NISZ) <bakos.attilakaroly>
Status: VERIFIED FIXED    
Severity: normal CC: aron.budea, cesar.izq, jdien07, jluth, kelemeng, libreoffice, libreoffice, telesto, xiscofauli
Priority: medium    
Version: Inherited From OOo   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=91260
https://bugs.documentfoundation.org/show_bug.cgi?id=108932
https://bugs.documentfoundation.org/show_bug.cgi?id=67339
https://bugs.documentfoundation.org/show_bug.cgi?id=123621
https://bugs.documentfoundation.org/show_bug.cgi?id=136613
https://bugs.documentfoundation.org/show_bug.cgi?id=135714
https://bugs.documentfoundation.org/show_bug.cgi?id=122888
Whiteboard: target:7.1.0
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 104449    
Attachments: Overlapping page border text boxes produced with Word 2016
Example document exported as PDF
Comparison MSO 2010 and LibreOffice 7.1 master
Side by side LibreOffice 7.1 and 7.0

Description Jan-Marek Glogowski 2017-02-23 11:21:14 UTC
Created attachment 131428 [details]
Overlapping page border text boxes produced with Word 2016

This bug is about a more general handling of text boxes overlapping the page borders. A partial fix - for a text box overlapping the bottom - was developed to fix bug 91260. It doesn't seem to work with the attached document generated by Word 2016.

The attached document has four text boxes, all overlapping one of the page borders. The placement of the text part of the boxes is wrong, as they seem to be forced completely inside the page frame. But the associated shapes seem to be correctly placed.

This also results in UX bugs:
 * if you try to select the frame of a text box, it "correctly" selects the shape.
 * if you try to move the frame, the whole text box is forced inside the page borders

In MS Word 2016 I actually had to change the layout options to move the text box out of the frame borders, when generating the test document.

So my guess is the logic of commit a4dee94afed9ade6ac50237c8d99a6e49d3bebc1 is wrong, as it breaks the synchronization of the text and shape frame. Probably this really has to be handled separately.
Comment 1 Jan-Marek Glogowski 2017-02-23 11:22:21 UTC
Created attachment 131429 [details]
Example document exported as PDF
Comment 2 Xisco Faulí 2017-02-23 12:12:30 UTC
Confirmed in

Version: 5.4.0.0.alpha0+
Build ID: 880033edde516fc30225005245253293a6a58ba4
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk2; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 3 Luke 2017-02-23 22:20:43 UTC
> So my guess is the logic of commit a4dee94afed9ade6ac50237c8d99a6e49d3bebc1
> is wrong, as it breaks the synchronization of the text and shape frame.
> Probably this really has to be handled separately.

The issue of imported TextBoxes not moving with the shape is likely an implementation bug. See Comment 14 on Bug 84678#c14

"And when you move [our TextBoxes] the text doesn't stay in the Text Box, which kind of defeats the whole point of Text Boxes."
Comment 4 QA Administrators 2018-07-05 02:48:52 UTC Comment hidden (obsolete)
Comment 5 Luke 2018-07-06 21:46:01 UTC
Still not working in Version: 6.2.0.0.alpha0+
Build ID: 61a7a43e3a37e1b1fb764f7be2dc1b5504162ec0
Comment 6 Xisco Faulí 2020-08-03 11:34:58 UTC
Created attachment 163898 [details]
Comparison MSO 2010 and LibreOffice 7.1 master
Comment 7 Xisco Faulí 2020-08-03 11:36:10 UTC
The situation has improved in the master branch after

https://cgit.freedesktop.org/libreoffice/core/commit/?id=ee6cd34eb3a2bd1f1340063ee4b90a72ff0c9532

author	Tibor Nagy <nagy.tibor2@nisz.hu>	2020-07-09 09:54:15 +0200
committer	László Németh <nemeth@numbertext.org>	2020-07-15 16:22:38 +0200
commit ee6cd34eb3a2bd1f1340063ee4b90a72ff0c9532 (patch)
tree 218888235b4bbf7f3b32fd1edd3d018ae33c0eeb
parent ac90bb44f53e099bd8743662b20d0e5ae1752fa2 (diff)
tdf#123621 sw: fix textbox position according to DOCX
Comment 8 Commit Notification 2020-08-21 21:49:35 UTC
Attila Bakos committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b6850bbe95418ecfde404be1696548f18d200c9b

tdf#106153 sw compatibility: fix textboxes exceeding the page

It will be available in 7.1.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Attila Bakos (NISZ) 2020-08-27 13:18:40 UTC
Created attachment 164751 [details]
Side by side LibreOffice 7.1 and 7.0
Comment 10 NISZ LibreOffice Team 2020-09-09 12:47:41 UTC
*** Bug 104465 has been marked as a duplicate of this bug. ***
Comment 11 NISZ LibreOffice Team 2020-09-09 14:11:48 UTC
*** Bug 108932 has been marked as a duplicate of this bug. ***
Comment 12 NISZ LibreOffice Team 2020-09-14 07:38:22 UTC
Version: 7.1.0.0.alpha0+ (x64)
Build ID: 34a09c9c61bff30e8c4d16132bb47b2b1b16e422
CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: threaded
Comment 13 NISZ LibreOffice Team 2020-12-02 16:58:27 UTC
*** Bug 135177 has been marked as a duplicate of this bug. ***
Comment 14 NISZ LibreOffice Team 2020-12-11 07:53:07 UTC
*** Bug 122829 has been marked as a duplicate of this bug. ***
Comment 15 Timur 2021-05-25 11:44:55 UTC
*** Bug 142473 has been marked as a duplicate of this bug. ***