Bug 136439 - There is an Offset with the title in the master that should not be
Summary: There is an Offset with the title in the master that should not be
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: preBibisect
Depends on:
Blocks:
 
Reported: 2020-09-03 15:23 UTC by Pierre C
Modified: 2020-12-17 16:42 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Master doc (14.70 KB, application/vnd.oasis.opendocument.text-master)
2020-09-03 15:23 UTC, Pierre C
Details
Child doc (14.90 KB, application/vnd.oasis.opendocument.text)
2020-09-03 15:23 UTC, Pierre C
Details
PDF of master doc with LO (22.31 KB, application/pdf)
2020-09-03 15:24 UTC, Pierre C
Details
PDF of child doc with LO (22.36 KB, application/pdf)
2020-09-03 15:24 UTC, Pierre C
Details
PDF of master doc with AOO (25.92 KB, application/pdf)
2020-09-03 15:25 UTC, Pierre C
Details
PDF of child doc with AOO (25.96 KB, application/pdf)
2020-09-03 15:26 UTC, Pierre C
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre C 2020-09-03 15:23:18 UTC
Created attachment 165100 [details]
Master doc

Step to reproduce :
1 Open Master doc
2 Export as PDF

3 Open Child doc
4 Export as PDF

PDF should be the same

Works fine with AOO (even if the rendering is not the same, both PDF are the same
Comment 1 Pierre C 2020-09-03 15:23:52 UTC
Created attachment 165101 [details]
Child doc
Comment 2 Pierre C 2020-09-03 15:24:26 UTC
Created attachment 165102 [details]
PDF of master doc with LO
Comment 3 Pierre C 2020-09-03 15:24:54 UTC
Created attachment 165103 [details]
PDF of child doc with LO
Comment 4 Pierre C 2020-09-03 15:25:23 UTC
Created attachment 165104 [details]
PDF of master doc with AOO
Comment 5 Pierre C 2020-09-03 15:26:03 UTC
Created attachment 165105 [details]
PDF of child doc with AOO
Comment 6 Justin L 2020-12-15 18:41:27 UTC
No need to go through the whole rigmarole of comparing PDFs. It can easily be seen just by loading up the document and seeing a gap above the gray title shading.

Bibisected to LO 5.3 author	Justin Luth on 2016-11-03 19:02:41 +0000
commit	5d9d0f3c979732ade57b9c4c4960dd030ffdc9f9
there is a function for that: CalcLineSpace(xx, bEvenIfNoLine)

which is a dud commit that really points to bug 41542, which is about using the border spacing even when border lines are not enabled - as per ODF specs.

It looks to me like the master document is copying the border padding from the first paragraph of the child document. So you will likely see the same thing in AOO if you add a border to child.odt's title.  (I see that in LO 3.5 - as far back as I can test.)

So for this particular document, you can "fix" it by removing the paragraph's borderless padding of .44cm.

It seems strange to me that the border padding would be copied, because it doesn't seem to copy the borders themselves. I'll make this bug report NEW to investigate that question.
Comment 7 Justin L 2020-12-17 16:42:32 UTC
So I found the source of the problem. It is a layout issue. Yuck.

In calcmove.cxx's  SwLayoutFrame::MakeAll the sectionfrm somehow acquires the border padding from what seems to be a random cache, with
   pAccess = std::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), this);

This looks like a really generic piece of code, so I don't have high hopes of being able to fix it.