Bug 121318 - FILEOPEN: DOCX Page Formatting Bug with Compatibility Mode
Summary: FILEOPEN: DOCX Page Formatting Bug with Compatibility Mode
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: DOCX-Tables DOC-Tables DOCX-compatibilityMode-15
  Show dependency treegraph
 
Reported: 2018-11-09 18:22 UTC by Luke
Modified: 2020-03-30 10:06 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Stripped down version of attachment 146414 (64.50 KB, application/msword)
2018-11-09 18:22 UTC, Luke
Details
Same file saved in "compatibility mode" .docx (25.24 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-11-09 18:24 UTC, Luke
Details
Same file upgraded to new OOXML format (25.11 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-11-09 18:26 UTC, Luke
Details
PDF exported from DOC in Word 2013 (37.42 KB, application/pdf)
2018-11-09 21:44 UTC, Aron Budea
Details
Word 2013 on Windows 10 and Linux/Wine 4 render DOCX compatibility as 1 page (54.06 KB, image/png)
2019-04-25 04:23 UTC, Luke
Details
DOCX compared MSO LO (55.82 KB, image/png)
2020-03-30 10:05 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luke 2018-11-09 18:22:24 UTC
Created attachment 146504 [details]
Stripped down version of attachment 146414 [details]

This is a spinoff of the 4th issue described in Bug 80635. When in compatibility mode, we are not properly fitting all of the content on to 1 page. 

Steps to reproduce:
1. Open PageBug-old.docx or PageBug.doc in Writer
2. Compare with Word

Expected:
Content takes up 1 page 
Actual:
Content takes 2 pages
Comment 1 Luke 2018-11-09 18:24:26 UTC
Created attachment 146506 [details]
Same file saved in "compatibility mode" .docx

The "compatibility mode" .docx has the same issue as .doc
Comment 2 Luke 2018-11-09 18:26:56 UTC
Created attachment 146507 [details]
Same file upgraded to new OOXML format

When compatibility mode is disabled, the document correctly imports to 2 pages. Word also takes up 2 pages.
Comment 3 Aron Budea 2018-11-09 21:44:10 UTC
Created attachment 146514 [details]
PDF exported from DOC in Word 2013

Interestingly both the DOC and the old DOCX show as two pages in Word 2013 for me, the new DOCX even shows as 3 pages.

PDF export of the DOC is only a single page, though.

I can confirm that in Writer it's two pages in a recent daily build, though I'm more concerned about the table spilling over to the right, which seems to be a regression between 4.0 and 4.4, and could be bibisected (at this point the top table isn't imported).
Comment 4 Aron Budea 2018-11-11 00:41:07 UTC
Scratch the final paragraph of my previous comment, that's bug 80635.

As I can see the layout change is due to floating table -> regular table conversion. If you change 'Text wrapping' of the table in Word to None, it'll show exactly like in Writer. It still feels like the layout is a corner case in Word, as I'd expect it to stay stable between display and export/printing.
Comment 5 Timur 2018-11-12 09:19:20 UTC
I'm not in favor of keeping this bug open. 
Because, as Aron noted, DOC shows as two pages in Word 2013 and 2016. File is not a good example, rather it's problematic. 
Report is not clear why content should take 1 page and how it takes 2 pages. It's about single row on page 2? We have some bugs about differences in table height, especially with Microsoft fonts. 
We already have 2 bugs for the same wrong DOC: bug 80635 and bug 80717.
Please consider to close.
Comment 6 Timur 2019-04-24 13:58:40 UTC
Please elaborate on ma previous comment. Until then, I set NeedInfo.
Comment 7 Luke 2019-04-25 04:23:33 UTC
Created attachment 150994 [details]
Word 2013 on Windows 10 and Linux/Wine 4 render DOCX compatibility as 1 page
Comment 8 Luke 2019-04-25 04:53:51 UTC
>  DOC shows as two pages in Word 2013 and 2016.

I've retested Word 2013 in both Windows 10 and Wine and Word 2016 on Windows 10. In every case, the .doc and compatibility .docx render on 1 page. 

> We have some bugs about differences in table height, especially with Microsoft fonts. 

No evidence this is a font issue. As all characters have been removed from the tables and fonts LO/MSO are using the same pool fonts. 

> We already have 2 bugs for the same wrong DOC

This bug report is primarily about the .docx
Comment 9 Aron Budea 2019-04-25 08:57:26 UTC
(In reply to Luke from comment #8)
> >  DOC shows as two pages in Word 2013 and 2016.
> 
> I've retested Word 2013 in both Windows 10 and Wine and Word 2016 on Windows
> 10. In every case, the .doc and compatibility .docx render on 1 page. 
Both DOC and compatibility mode DOCX only render on 1 page in protected view for me, as soon as I switch to edit view, they split to two pages. (Word 2013 / Windows 7)
Comment 10 Timur 2020-03-30 10:05:41 UTC
Created attachment 159141 [details]
DOCX compared MSO LO

This bug makes no sense.
MSO 2016 opens differently old and new DOCX, 2 and 3 pages, with table differently split. And such bugs are mostly NotOutBug.
LO is at least consistent, with 2 pages.
Vertical position is I guess bug 80717.
Si I'll close this one.