Apache OpenOffice (AOO) Bugzilla – Issue 73229
Inserting a document with a section and a pagebreak at the first paragraph produces an unnecessary empty first page.
Last modified: 2013-08-07 14:38:26 UTC
Attached, there are two files that are nearly similar, but behave different when they are inserted into an empty document via "Insert->File...". Here is how to reproduce: 1) create a new empty writer document 2) Insert->File... and select the attached file pagebreak_noSection.odt The content of pagebreak_noSection.odt is shown at the FIRST page of the result document. Thats correct! The file pagebreak_noSection is very simple: there are only two paragraphs with the content "a" and "b". The first paragraph is formatted with the set formatting option Format->Paragraph/TextFlow/Breaks/Insert (Type Page). When inserting that document into the new empty document, the insert method correctly recognizes that there is no content at the first page of the empty document (so the document already starts with a new page) and DOES NOT produce a pagebreak. NOW: 1) create a new empty writer document 2) Insert->File... and select the attached file pagebreak_WITHSection.odt The content of pagebreak_WITHSection.odt is shown at the SECOND page of the result document. Thats NOT correct! The correct behaviour would be to show the content at the first page. The file pagebreak_WITHSection differs from the first document only in one small point: there is a section around the first paragraph "a". When inserting that document into the new empty document, the insert method wrongly creates a new paragraph before the section. Hence the document is no longer empty and an unwanted pagebreak is produced. I think everything would be OK, if the empty paragraph before the inserted section would not be produced in this case.
Created attachment 41981 [details] Positive example: insert that document into a new document with Insert->File...
Created attachment 41982 [details] negative example: Insert->File... with that file produces an unwanted pagebreak
added cc's
MRU->OS: in case of the attached pagebreak_WITHSection.odt, when inserting this into an empty document, an empty paragraph at the top will be created. This leads to the fact that the real content is moved to second page due to the page break at the first paragraph of the pagebreak_WITHSection.odt.
->ama: something for you?
Created attachment 51229 [details] Another test document without a page break that does not produce the expected behaviour when you insert it into an empty document.