Bug 133470 - Filesave DOCX: Page layout change - different margins
Summary: Filesave DOCX: Page layout change - different margins
Status: RESOLVED DUPLICATE of bug 89297
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
4.4.7.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx
Depends on:
Blocks:
 
Reported: 2020-05-28 08:48 UTC by Telesto
Modified: 2020-06-09 09:04 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (46.17 KB, application/vnd.oasis.opendocument.text)
2020-05-28 08:51 UTC, Telesto
Details
Example compared LO MSO (149.87 KB, image/png)
2020-06-08 14:23 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-05-28 08:48:11 UTC
Description:
Page layout change after export to DOCX

Steps to Reproduce:
1. Open the attached file
2. Export the file to DOCX -> File reload
3. "The flowers were gone." should be at the bottom of the page prologue

Actual Results:
On the next page

Expected Results:
"The flowers were gone." should be at the bottom of the page prologue


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.1.0.0.alpha0+ (x64)
Build ID: 41d8b41767032681a9897b7551f011d450e3725e
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 1 Telesto 2020-05-28 08:50:40 UTC
The layout changed after:
 ~/bibisect_win_44
$ git bisect bad
There are only 'skip'ped commits left to test.
The first bad commit could be any of: 8b43cdd02bc73764631a433352a378ea88da9625 77a3896f4b1faf8139dfca71b5170952cfdaf34a
We cannot bisect more!

Has never worked properly
Comment 2 Telesto 2020-05-28 08:51:00 UTC
Created attachment 161358 [details]
Example file
Comment 3 Timur 2020-06-08 14:23:20 UTC
Created attachment 161767 [details]
Example compared LO MSO

"Page layout change after export to DOCX" is a layman's description aka "this document doesn't look nice". 
Telesto, you are expected to give more technical description and find the cause.

Margins are different in LO ODT, LO DOCX (RT from ODT) and MSO DOCX.
I'm not sure about the duplicate.
Comment 4 Timur 2020-06-08 14:31:33 UTC
Telesto, you bibisected meaning you suspected regression. Why? Where exactly? 
LO 3.3 saved DOCX wouldn't reproduce in LO but it can't be open in MSO.
Comment 5 Timur 2020-06-08 14:54:38 UTC
Hi Justin, please see if already known, you had a lot of these.
Comment 6 Justin L 2020-06-08 17:06:54 UTC
This one is an impossible situation. If you fix this document, you will break others.

Writer has a unique concept of one page style following another.
Word doesn't. It knows about first/next on a single style. So that is how it gets emulated - but then the margins have to match.

Since there is no "page break", it is difficult (and probably problematic) to insert one at a specific point on export.

Word does have something similar - a continuous section break. However, those cause tons of import problems - so attempting to use one of those to emulate this concept will not help you at import time.

Almost everything I said here is also said in bug 89297, so that makes it a good duplicate match.

*** This bug has been marked as a duplicate of bug 89297 ***
Comment 7 Telesto 2020-06-08 17:42:22 UTC
(In reply to Justin L from comment #6)
> This one is an impossible situation. If you fix this document, you will
> break others.
> 
> Writer has a unique concept of one page style following another.
> Word doesn't. It knows about first/next on a single style. So that is how it
> gets emulated - but then the margins have to match.
> 
> Since there is no "page break", it is difficult (and probably problematic)
> to insert one at a specific point on export.
> 
> Word does have something similar - a continuous section break. However,
> those cause tons of import problems - so attempting to use one of those to
> emulate this concept will not help you at import time.
> 
> Almost everything I said here is also said in bug 89297, so that makes it a
> good duplicate match.
> 
> *** This bug has been marked as a duplicate of bug 89297 ***

Thanks for explaining. Are these types of developer wisdom regarding file type difference (limitations) documented at a central place (internal/external) or only scattered in bug tracker.. I would be helpful explaining the differences. 

[And I would love 'doc/docx' (or any other foreign format) being advertised as a 'export' function and not a direct save option, because of the silent conversions done when saving doc/docx. However a whole different story, not relevant here]
Comment 8 Justin L 2020-06-09 09:04:00 UTC
(In reply to Telesto from comment #7)
> Are these types of developer wisdom regarding file
> type difference (limitations) documented at a central place
I'm not aware of anything.


For the record, this one passes the IsPlausableSingleWordSection because the LR margins are the same, and so is the framesize. The only difference is that one has headers/footers enabled, and the other doesn't (and thus passes StrictEqualTopBottom).

complication example: It works nicely for this document if StrictEqualTopBottom returns false (which would make good sense since one has a header and one doesn't). However, this would break ooxmlexport's plausable-border.docx unit test - which wants very badly to keep the page break, and not use a section break - even at the risk of losing the border on the first page style...