Bug 142756 - Fileopen DOCX: wrong margin outside document (weird margin re-defined by continuous section)
Summary: Fileopen DOCX: wrong margin outside document (weird margin re-defined by cont...
Status: RESOLVED DUPLICATE of bug 89297
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisectRequest, filter:docx, regression
Depends on:
Blocks:
 
Reported: 2021-06-10 10:03 UTC by Roman Kuznetsov
Modified: 2022-08-25 10:52 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
DOCX (13.72 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-06-10 10:03 UTC, Roman Kuznetsov
Details
Screenshot with comparise layout LO vs MS Word (280.02 KB, image/png)
2021-06-10 10:04 UTC, Roman Kuznetsov
Details
DOC from DOCX (53.50 KB, application/msword)
2021-06-10 11:46 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Kuznetsov 2021-06-10 10:03:29 UTC
Description:
DOCX: wrong layout in the document

Steps to Reproduce:
1. Open DOCX from attach in LO
2. Look at it and comparize with good view in MS Word (see screenshot in attach)


Actual Results:
wrong layout in the document

Expected Results:
the document looks as in MS Word


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.2.0.0.alpha1+ (x64) / LibreOffice Community
Build ID: 31ed81ea71a20ec119805f66a42f99b3f80d2dc5
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: ru-RU
Calc: CL
Comment 1 Roman Kuznetsov 2021-06-10 10:03:50 UTC
Created attachment 172758 [details]
DOCX
Comment 2 Roman Kuznetsov 2021-06-10 10:04:38 UTC
Created attachment 172759 [details]
Screenshot with comparise layout LO vs MS Word
Comment 3 Timur 2021-06-10 11:46:25 UTC
Created attachment 172764 [details]
DOC from DOCX

Repro 7.2+ for attached 1-page DOCX, also if resaved in MSO.

Adding here MSO saved DOC for reference. Opens text but has 3 pages.
Comment 4 Telesto 2021-06-10 20:16:19 UTC
Probably multiple bugs

Text is still within margin (but 2 pages) with
Versie: 4.4.7.2 
Build ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Locale: nl_NL

but broken in
Versie: 5.2.4.2 
Build ID: 3d5603e1122f0f102b62521720ab13a38a4e0eb0
CPU Threads: 4; Versie besturingssysteem:Windows 6.2; UI Render: GL; 
Locale: nl-NL (nl_NL); Calc: CL

---
Single page (but broken margin) in
LibreOffice 3.5.7.2 
Build ID: 3215f89-f603614-ab984f2-7348103-1225a5b

becoming two pages in:
Versie 4.0.0.3 (Bouw-id: 7545bee9c2a0782548772a21bc84a9dcc583b89)
Comment 5 Telesto 2021-06-10 20:18:30 UTC Comment hidden (obsolete)
Comment 6 Timur 2021-06-11 08:32:49 UTC
So many changes for this DOCX with manual break. 

As noted, 1 page with broken margin in 3.6, becoming 2 pages in 4.0.

Then margin gets better (call it good) around 4.4, still 2 pages. 

Here is change in 50max (not really relevant), from 2 page good margin to 2 page narrow margin:
commit e990d63f8e9c24bae77ce04c10790e23fdcf63fc
Date:   Wed May 27 21:00:43 2015 +0800
    source-hash-9857c6390212e16dd9f26b47b4afc5d33b5242ef
    previous source-hash-debf3ffb87d607704ddea97f6710c3ceaa9a243d
author	Caolán McNamara <caolanm@redhat.com>	2015-03-31 17:14:19 +0100
crashtest: crash on layout of novell622972-2.html

Then in 5.1 (not existing so bibisectable in Linux), from 2 page narrow margin to 2 page good margin. Can be informative if done in Windows.

Then somewhere from 2 page good margin (seen in my 5.2 master) to 2 page bad (seen in 5.3 oldest). So not bibisectable for me but useful.

Then improvement in 5.3, 2 page bad margin to 1 page bad. 
commit bfc79e8d1552cf90c6076a45b8ebdafef968e83a
Date:   Wed Sep 28 09:02:33 2016 +0200
    source a60b2f7c227709d27d6294558fd396557a9ffd20
    previous f8847d3ab4a5ea567f97b05181ed307135ade258
author	Justin Luth <justin_luth@sil.org>	2016-07-04 21:39:37 +0300
tdf#64372 docx import: don't ignore continuous section break

So, key change of good margin > bad margin in 5.2/5.3 wasn't bibisectable for me so I keep bibisectrequest, at least to try in Windows.
Comment 7 Timur 2021-06-11 08:34:21 UTC
Not sure that Roman or Telesto do Windows bibisect, so let's call Buovjaga.
Comment 8 Timur 2021-06-11 09:01:52 UTC
This bug is about DOCX, but here is info on DOC:

(In reply to Telesto from comment #5)
> (In reply to Timur from comment #3)
> > Created attachment 172764 [details]
> > DOC from DOCX
> > Adding here MSO saved DOC for reference. Opens text but has 3 pages.
> 
> This is yet again different, renders fine in:
> Versie 4.0.0.3 (Bouw-id: 7545bee9c2a0782548772a21bc84a9dcc583b89)

DOC attachment 172764 [details] is MSO saved from 1-page DOCX in bug 142756.
Opens 3 pages in LO 7.2+, as in 4.4, but 1 page in 4.3.

Bibisect 44max (1>4>3):
commit 2eb63500efafca6bacf547876546d1bdba451590
Date:   Sat Mar 14 23:33:59 2015 +0800
    source-hash-c5ed52b1cd6f22787c94bec035ceecf9e1da3271
    previous source-hash-2aa6589aa5bbcd7cd74b33b81e431fb6837a2458
author	Luboš Luňák <l.lunak@collabora.com>	2014-07-21 10:56:52 +0200
ww8import create a pagedesc if continuous section changes margins (bnc#875383)

It's very well known commit with many regressions so no more here on DOC.
Comment 9 Telesto 2021-06-11 09:33:07 UTC
Regarding the page margin, this sounds plausible
https://bugs.documentfoundation.org/show_bug.cgi?id=87764#c29
Comment 10 Justin L 2021-11-08 13:56:16 UTC
This is a rather weird document.  The paragraphs have a _negative_ right-indent of 12.64cm, while the section itself has a huge right-margin of 14.26cm. So the balance is a normal-looking 1.5cm right border.

This is tricky because MSWord and LO implement sections very differently. LO imports the margins into a page style - so the margins are set for a whole page. MSWord can have multiple margins on the same page. (LO also has left/right margins for sections - but we can't really know what page style will be active.)
Comment 11 Gabor Kelemen (allotropia) 2022-08-25 10:52:48 UTC
This has a continuous section break at the beginning. Make a duplicate for simplicity.

*** This bug has been marked as a duplicate of bug 89297 ***