Bug 44418 - FORMATTING: Headline spacing after page break
Summary: FORMATTING: Headline spacing after page break
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.4.4 release
Hardware: Other All
: low minor
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks: Document-Options Writer-Styles-Heading Writer-Page-Break
  Show dependency treegraph
 
Reported: 2012-01-03 03:55 UTC by André Rebentisch
Modified: 2023-02-16 09:20 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Demonstration test case (23.51 KB, application/vnd.oasis.opendocument.text)
2012-01-03 03:55 UTC, André Rebentisch
Details
Test case PDF output (79.16 KB, application/pdf)
2012-01-03 04:01 UTC, André Rebentisch
Details
H2 without top space (35.83 KB, image/png)
2012-10-22 13:09 UTC, André Rebentisch
Details
H2 with top space (19.18 KB, image/png)
2012-10-22 13:10 UTC, André Rebentisch
Details
Sections and manual column break (81.57 KB, image/jpeg)
2018-01-09 13:41 UTC, RafaU
Details
the inconsistency does not appear in this file (9.17 KB, application/vnd.oasis.opendocument.text)
2021-02-15 03:30 UTC, Safeer Pasha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description André Rebentisch 2012-01-03 03:55:14 UTC
Created attachment 55075 [details]
Demonstration test case

Problem description: 

Steps to reproduce:
1. Insert Headline 1st
2. Insert Text
3. Insert Manual page break
4. Insert Headline 1st
(see attached file)

Current behavior:
On the first page headlines 1st order (Test Case H1) do not anchor at the page top but add extra space. The same occurs after a manual page break.

It does not occur with headlines of second order. When changing a headline formatting after a manual break from first to second order that doesn't change the 1st order "false" anchoring. (Test Case headline 3)

In an ordinary text flow no extra space is added for 1st order headlines. (test case headline 2)

Expected behavior:
Headline first order anchoring as second order anchoring or a headline in the normal page flow. Check anchoring after manual page break and First order anchoring at first page.
Comment 1 André Rebentisch 2012-01-03 04:01:00 UTC
Created attachment 55076 [details]
Test case PDF output
Comment 2 sasha.libreoffice 2012-05-03 08:34:07 UTC
Thanks for bugreport
It is because settings inside of "Heading 1" style. Change this style if needed another spacing.
If such behaviour needed each time, create new document template and set it as default.
Comment 3 Joel Madero 2012-10-19 20:50:25 UTC
I am unable to reproduce this. When I do INSERT HEADING 1, Manual Break, INSERT HEADING 1, put text on each page, both seem to have the same spacing.

LibO: 3.6.1.2

Marking as WORKSFORME. If this is still an issue please reopen this as UNCONFIRMED and let us know what version of LibO you're using.
Comment 4 André Rebentisch 2012-10-22 13:08:08 UTC
"It is because settings inside of "Heading 1" style."

Then the default H1 style settings have to be changed. Does not explain the issue after manual page break though, and the change from H1 to H2.

Pls check again. The rendering of the test document is still the same in 3.6.2 but the behaviour changed. Second order H2 now also adds space, but it is still possible to generate a document where Hx on the top has top space and where Hx hasn't space added, depending on how you make the edits.

I will add a screenshot showing a H2 w/o top space while in the same document other H2 headline does have top space.
Comment 5 André Rebentisch 2012-10-22 13:09:34 UTC
Created attachment 68914 [details]
H2 without top space
Comment 6 André Rebentisch 2012-10-22 13:10:22 UTC
Created attachment 68915 [details]
H2 with top space
Comment 7 sasha.libreoffice 2012-10-23 10:40:08 UTC
Thanks for additional testing.
Sorry for not understand problem from first attempt.
It reproduced in 3.5.7 on RFR 64 bit (from Fedora repo)

Steps for create test case:
1. Open or create text document with more then one page of unformatted text
2. Assign to first line and to line near of bottom of page style "Heading 1"
3. Enter some new lines into page so that second heading appears on beginning of second page
Expected: distance from top of page for both headings is equal about 0.5 cm
Actually: first header have proper distance, but second - no distance

Please, tell if I understand problem properly
Comment 8 Joel Madero 2013-05-15 05:24:32 UTC
Based on comment 7 I have been able to confirm the issue on:
Version: 4.1.0.0.alpha1+Build ID: ed8f9ec2caa8485691999e5565a79e451e1dcb
Date:   Wed May 8 18:48:38 2013 +0200 
Platform: Bodhi Linux 2.2 x64

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
As I've been able to confirm this problem I am marking as:

New (confirmed)
Minor - there is an easy workaround so it doesn't prevent high quality work, just slightly slows it down
Low - default, seems appropriate

Workaround: you can insert a manual page break and the problem is solved - not ideal but it seems like this is very particular and not affecting many users (see lack of dupes as well as lack of any comments outside of QA and OP)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LibreOffice is powered by a team of volunteers, every bug is confirmed (triaged) by human beings who mostly give their time for free. We invite you to join our triaging by checking out this link:
https://wiki.documentfoundation.org/QA/BugTriage and join us on freenode at #libreoffice-qa

There are also other ways to get involved including with marketing, UX, documentation, and of course developing -  http://www.libreoffice.org/get-help/mailing-lists/. 

Lastly, good bug reports help tremendously in making the process go smoother, please always provide reproducible steps (even if it seems easy) and attach any and all relevant material
Comment 9 Jose Gómez 2013-06-30 23:01:29 UTC
I have also observed this problem sometimes, when I have a "heading 1" right after a page break (either manually inserted, or defined in the "text flow" tab of the style.

The space indicated in the style (spacing "above paragraph" in the "indents & spacing" tab), appears at the beginning of the page, so this line does not start at the beginning of the page.

That is exactly what we see in pages 1 and 3 of the test case.

The only existing workarounds would be:

- Not use page breaks at all. Only break to the next page inserting as many line feeds as required. I don't think this is a valid workaround at all, as the layout will keep breaking every time a new line is inserted in the document.

- Set in the style of the heading, the spacing above paragraph to 0. Which is fine unless you want to have a page break before some headings, and not before others.

I have only seen this issue with heading 1, which is before which I tend to use page breaks. But if it also happens with other styles, it could be a bigger issue.
Comment 10 Ivo Smelhaus 2014-01-28 10:07:25 UTC
I suffer with it as well and for me it is one of 10 most annoying bugs making LO and second class product. Affecting probably more a reputation of LO at other people receiving docs created in LO than LO users, who forgive it as less important bug. 
Otherwise I use another workaround: Direct formatting of space above par. (-> 0) after page-break. What is manageable after manual page-break but more probably left after automatic one.
Comment 11 HansPL 2014-05-08 11:58:41 UTC
Confirmed with LO 4.1.3.2/ Linux x64.  

I see this wrong behaviour not confined to Heading1 but with any paragraph which has spacing above (even Standard with manually set spacing):  this spacing should always be omitted if at top of page.  

Spacing above is correctly omitted when an automatic page break occurs. 

Spacing above is wrongly NOT omitted when at top of first page or after a manual page break.  

Very annoying for me while it shouldn't be too difficult to fix, isn't it? 

Hans
Comment 12 Joel Madero 2014-05-08 14:35:15 UTC
It is quite difficult to fix - we have over 15 million lines of code, just finding where it's going wrong can be quite difficult
Comment 13 Gordo 2015-05-23 13:49:05 UTC
This happens because of Tools → Options → LibreOffice Writer → Compatibility → Add paragraph and table spacing at tops of pages (in current document).  With it unchecked there is no space before the first paragraph on the first page and after manual page breaks.

The option to remove the space by changing spacing above a paragraph is always available but there is no option to have spacing above a paragraph after an automatic page break. I think a use case exists for wanting a page border and borders around headings with space between (heresy, shout the naysayers) without using page spacing to contents.  With no space between the different borders it does not look aesthicatelly pleasing.

I suppose, in the future, an enhancement could be made to the ODF specification to have in the Paragraph → Indents & Spacing → Spacing dialogue a checkbox below "Above paragraph" to "Include spacing at tops of pages".  The default could be to have it off.  I don't know how that would tie in to compatibility though.

I suspect the way it is coded now is that the top page margin for the first page and manual page breaks act like the last paragraph for purpose of spacing.  Paragraphs after an automatic page break use the last paragraph on the previous page.  Or it could be that paragraphs after an automatic page break are told to ignore spacing above altogether.

Windows Vista 64
Version: 4.4.3.2
Build ID: 88805f81e9fe61362df02b9941de8e38a9b5fd16
Comment 14 QA Administrators 2016-09-20 09:42:13 UTC Comment hidden (obsolete)
Comment 15 Thomas Lendo 2017-06-21 22:22:49 UTC
Reproduced with Version: 6.0.0.0.alpha0+
Build ID: 6ef59d7ace7e4db52caea601a384ed016365bcaf
CPU threads: 4; OS: Linux 4.8; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-06-20_01:21:33
Locale: de-DE (de_DE.UTF-8); Calc: group
Comment 16 RafaU 2018-01-09 13:41:08 UTC
Created attachment 138996 [details]
Sections and manual column break

Similar issue is in the manual column break case. Header in second column has multiplyfied space above. Please see attachment.

Wersja: 5.4.4.2
Build ID: 1:5.4.4~rc2-0ubuntu0.16.04.1~lo1
CPU threads: 4; OS: Linux 4.10; UI render: domyślny; VCL: gtk3; 
Ustawienia regionalne: pl-PL (pl_PL.UTF-8); Calc: group
Comment 17 QA Administrators 2019-04-21 02:52:53 UTC Comment hidden (obsolete)
Comment 18 Safeer Pasha 2021-02-15 03:30:02 UTC
Created attachment 169745 [details]
the inconsistency does not appear in this file
Comment 19 Safeer Pasha 2021-02-15 03:31:10 UTC
the issue is no longer present.
i think the issue is SOLVED.
check the attachment "the inconsistency does not appear in this file"

Version: 7.1.0.3 / LibreOffice Community
Build ID: 10(Build:3)
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: kf5
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 20 QA Administrators 2023-02-16 03:25:57 UTC Comment hidden (obsolete)
Comment 21 HansPL 2023-02-16 09:20:53 UTC
Still confirmed with LO 7.0.4.2 / Linux x64 !  

Fresh observation though:  if in  Extras / Options / Writer / Compatibility  »Absatz- und Tabellenabstände an Seitenanfängen addieren«  [ ≈ Add spacing at page starts ? ]  is DISABLED, all spacings at top of page are omitted.  
If enabled, only spacings after manual page breaks are omitted.  

(In reply to HansPL from comment #11)
> Confirmed with LO 4.1.3.2/ Linux x64.  
> 
> I see this wrong behaviour not confined to Heading1 but with any paragraph
> which has spacing above (even Standard with manually set spacing):  this
> spacing should always be omitted if at top of page.  
> 
> Spacing above is correctly omitted when an automatic page break occurs. 
> 
> Spacing above is wrongly NOT omitted when at top of first page or after a
> manual page break.  
> 
> Very annoying for me while it shouldn't be too difficult to fix, isn't it? 
> 
> Hans