Bug 124637 - FILEOPEN: Incorrect section margin (comment 5)
Summary: FILEOPEN: Incorrect section margin (comment 5)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 126035 (view as bug list)
Depends on:
Blocks: DOCX-Section
  Show dependency treegraph
 
Reported: 2019-04-09 23:32 UTC by Xisco Faulí
Modified: 2022-08-25 11:25 UTC (History)
6 users (show)

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


Attachments
comparison MSO 2010 and LibreOffice 6.3 Master (14.04 KB, image/png)
2019-04-09 23:32 UTC, Xisco Faulí
Details
endingSectionProps.docx: document showing the need for section indents (6.35 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-04-13 05:48 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2019-04-09 23:32:06 UTC
Created attachment 150636 [details]
comparison MSO 2010 and LibreOffice 6.3 Master

Steps to reproduce:
1. Open attachment 97319 [details] from bug 77411
2. Go to page 2

-> Left section is shifted to the left, making the bullet list to look like it doesn't have indent. See attached screenshot

Reproduced in

Version: 6.3.0.0.alpha0+
Build ID: 040a54d89e8ca33171e86647ced8dc58efd85fbe
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

[Bug found by office-interoperability-tools]
Comment 1 Xisco Faulí 2019-04-09 23:33:19 UTC
Regression introduced by:

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

author	Justin Luth <justin_luth@sil.org>	2019-01-08 18:14:52 +0300
committer	Justin Luth <justin_luth@sil.org>	2019-01-11 04:08:46 +0100
commit 8d4a7b17e60aa889d1a78da47630aae2d1c1513c (patch)
tree 8f49b9cc7537aac12eef4fc42c547078ea6b3756
parent a2d2f0b30b75093b6ab517349f6db0649314495f (diff)
writerfilter: import section margins and writingMode

Bisected with: bibisect-linux64-6.3

Adding Cc: to Justin Luth
Comment 2 Justin L 2019-04-10 18:56:53 UTC
super yuck. This is caused by the footnote creating fake page styles (Converted2 and Converted3) and those fake page styles use default margin values, resulting in a negative margin when there should be a section margin of 0.  I'll bet footnotes mess up lots of page style stuff.
Comment 3 Justin L 2019-04-13 05:48:32 UTC
Created attachment 150725 [details]
endingSectionProps.docx: document showing the need for section indents

It is safe to do a partial revert of the section indent - this never worked before, so it won't be a regression.

The problem is that we don't know what page style underlies this section - and thus can't tell how much to indent.  Because the endnote is interjecting a fake page style, we can't just assume the margins of the last page style seen. Probably endnote sections need to be identified, and the inherit function needs to skip over these.  Preferably, they won't show up as actual page styles either...
Comment 4 Commit Notification 2019-04-13 14:17:22 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/d7e6c898f5ec8fbd142f9d3e1c46dfcf90edfc27%5E%21

tdf#124637 writerfilter: partially revert import section margins

It will be available in 6.3.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 5 Justin L 2019-04-13 14:22:01 UTC
Leaving this issue open since the title is still accurate - section margins still need work.  Use the document in comment 3 instead.  See the patches for code pointers.
Comment 6 Justin L 2019-06-21 10:08:06 UTC
*** Bug 126035 has been marked as a duplicate of this bug. ***
Comment 7 NISZ LibreOffice Team 2021-03-08 14:55:14 UTC
The example file in bug #98480 also suffers from this problem.