Bug 138282 - FILEOPEN DOCX Textbox is partially displayed at the bottom of first page instead of top of the second
Summary: FILEOPEN DOCX Textbox is partially displayed at the bottom of first page inst...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2.3.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: DOCX-Textbox
  Show dependency treegraph
 
Reported: 2020-11-17 11:20 UTC by id012c3076@blueyonder.co.uk
Modified: 2022-01-27 14:34 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
DOCX file displaying problem (39.83 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-11-17 11:21 UTC, id012c3076@blueyonder.co.uk
Details
Screenshot showing badly formatted document (228.73 KB, image/png)
2020-11-17 11:22 UTC, id012c3076@blueyonder.co.uk
Details
PDF file created by Microsoft Word (604.93 KB, application/pdf)
2020-11-17 11:25 UTC, id012c3076@blueyonder.co.uk
Details
The problem in Writer 7.4 (155.28 KB, image/jpeg)
2022-01-27 13:35 UTC, Attila Bakos (NISZ)
Details
DOCX compared in MSO LO (280.08 KB, image/png)
2022-01-27 14:34 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description id012c3076@blueyonder.co.uk 2020-11-17 11:20:12 UTC
Description:
Attached are 3 files:
A docx file
A Screenshot showing the file opened in Writer
A pdf of the same file created by Microsoft Office

You will see in the pdf that page 2 begins with a section in a box.  However, the screenshot shows that writer has attempted to put the box at the foot of page 1 and all of the text appears to be in one line.

Steps to Reproduce:
1.Open the attached docx file in Writer
2.
3.

Actual Results:
Examine the bottom of page 1
The box, with all its contained text is 'squashed' at the bottom of page 1



Expected Results:
There should be a box containing text on page 2 (as shown in the attached pdf file


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.4.7.2
Build ID: 6.4.7.2-3.fc32
Comment 1 id012c3076@blueyonder.co.uk 2020-11-17 11:21:33 UTC
Created attachment 167355 [details]
DOCX file displaying problem
Comment 2 id012c3076@blueyonder.co.uk 2020-11-17 11:22:42 UTC
Created attachment 167356 [details]
Screenshot showing badly formatted document
Comment 3 id012c3076@blueyonder.co.uk 2020-11-17 11:25:30 UTC
Created attachment 167357 [details]
PDF file created by Microsoft Word

This PDF shows what the document should look like.
Comment 4 Telesto 2020-11-17 18:31:47 UTC
Found in
7.1


Also in
Version: 6.2.9.0.0+ (x86)
Build ID: 5f01fe15eb2661f1f9ce12d1d99dc2a705b462ee
CPU threads: 4; OS: Windows 6.3; UI render: GL; VCL: win; 
Locale: nl-NL (nl_NL); UI-Language: en-US
Calc: CL

and in
Version: 6.0.6.0.0+
Build ID: c30963b8b4bbbe42a24b97aafa161eff9d7ccdd4
CPU threads: 4; OS: Windows 6.3; UI render: default; 
Locale: nl-NL (nl_NL); Calc: CL

and in (bit slightly different)
Versie: 5.2.2.1 
Build ID: 3c2231d4aa4c68281f28ad35a100c092cff84f5d
CPU Threads: 4; Versie besturingssysteem:Windows 6.2; UI Render: standaard; 
Locale: nl-NL (nl_NL); Calc: CL

but looks fine in
Versie: 4.4.7.2 
Build ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Locale: nl_NL
Comment 5 Usha 2020-11-18 13:24:04 UTC
i was able to reproduce this issue,I will try to bibisect this later.
Comment 6 NISZ LibreOffice Team 2020-12-08 15:34:28 UTC
Seems like this started in 5.0 with:

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

author	László Németh <laszlo.nemeth@collabora.com>	2015-05-13 17:47:36 +0200
committer	László Németh <laszlo.nemeth@collabora.com>	2015-05-13 18:10:45 +0200

tdf#91260: allow textboxes extending beyond the page bottom

@Attila, Daniel: maybe one more for you?
Comment 7 Dániel Arató (NISZ) 2020-12-08 16:11:02 UTC
(In reply to NISZ LibreOffice Team from comment #6)
> @Attila, Daniel: maybe one more for you?

We'll see when we can get to it. Probably no sooner than next year though.

By the way, can someone make a Writer vs Word comparison screenshot to make the bug more obvious? Thank you!
Comment 8 NISZ LibreOffice Team 2021-05-31 09:11:00 UTC
*** Bug 142542 has been marked as a duplicate of this bug. ***
Comment 9 Justin L 2021-08-04 10:24:53 UTC
(In reply to Dániel Arató (NISZ) from comment #7)
> By the way, can someone make a Writer vs Word comparison screenshot to make
> the bug more obvious? Thank you!

Comment 2 and comment 3 together fairly clearly show the problem I think.
Comment 10 Dániel Arató (NISZ) 2021-10-04 14:15:15 UTC
It looks like the docx file in the original description was created with an old version of MS Word. If you open the document in the current version of Word and save it to docx again, then open the new document in Writer, you'll find that the layout is correct.
Comment 11 Attila Bakos (NISZ) 2022-01-27 13:35:32 UTC
Created attachment 177837 [details]
The problem in Writer 7.4

As my attachment shows the only problem is that, the anchor (from where the position is calculated) is on the first page, and that is why the textbox positioned to the bottom of the first page. Both program (Word, and Writer) has anchors and the rendering is depends on its position. The difference is only with the method of calculating spaces in the two program, and that will be different surely in the future too. Not really think it is a regression, and sure this is not from me.
Comment 12 Timur 2022-01-27 14:34:17 UTC
Created attachment 177840 [details]
DOCX compared in MSO LO

(In reply to Dániel Arató (NISZ) from comment #10)
> It looks like the docx file in the original description was created with an
> old version of MS Word. 

If unzipped it says in LO 6.4.7. Normally, we need to have ODT that we can save as DOCX, it's wrong to report with LO DOCX. 
But in this case MSO opens it properly and behavior is the same with MSO saved DOCX, so we can use it. 

> If you open the document in the current version of
> Word and save it to docx again, then open the new document in Writer, you'll
> find that the layout is correct.
I don't confirm this. It's still wrong. Yes, difference became obvious because text height is not the same, so anchor in LO is on the 1st page. But that's irrelevant. 

Issue is: should text box at the bottom of page be shown on that page, as is in LO now, or go to the following page, as MSO does. 
*But* LO also moves it to the following page if anchor type is changed in the dialog box, even if reverted to "To character" before clicking OK. 

So maybe a layout issue, not a regression, but not sure here.