Bug 71098 - PAGE-BREAK: sub-documents force a page-break when inserted in the master document
Summary: PAGE-BREAK: sub-documents force a page-break when inserted in the master docu...
Status: CLOSED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1.2.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-31 16:52 UTC by gui
Modified: 2017-05-03 23:29 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
A sub-doc that forces page-breaks when inserted in any master (19.74 KB, application/zip)
2013-10-31 16:52 UTC, gui
Details
ZIP archive with master document and sub-document (15.56 KB, application/zip)
2017-03-12 21:06 UTC, Thomas Lendo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gui 2013-10-31 16:52:40 UTC
Created attachment 88414 [details]
A sub-doc that forces page-breaks when inserted in any master

Many sub-documents, without any apparent format that could force it, generate a page-break when inserted in the master-document.

Sometimes it can be corrected clearing formats in the begining of the sub-document, but it's not allways succesfull.

It's not a desired behavior, when you keep headings in the master document, and attach the sub-documents just beneath them.

Googling, I found a comment about misterious auto-styles defined in the sub-document content.xml file ("P1" till "P22" in the attached doc) ; if you manually edit them, the sub-document will insert continuous, but will miss the format of many parts (maybe image legends, some heads, etc.)

I've attached a little sub-doc made from a problematic sub-document, with the described behavior.
Comment 1 Owen Genat (retired) 2013-11-17 12:15:19 UTC
Confirmed under Ubuntu 10.04 running v4.1.3.2, however I believe it has always been this way. A sub-document is included in a master document using a section i.e., a typical pair of content.xml entries are:

<style:style style:name="Sect1" style:family="section">
   <style:section-properties style:editable="false">
      <style:columns fo:column-count="1" fo:column-gap="0pt"/>
   </style:section-properties>
</style:style>
[...]
<text:section text:style-name="Sect1" text:name="sub-doc.odt" text:protected="true">
   <text:section-source xlink:href="../sub-doc.odt" text:filter-name="writer8"/>
</text:section>

A section always commences on a new page. It is not a styles issue but rather a predefined rendering of some sort built into LO. Removing the leading page break will simply see it re-inserted next time Writer opens the master document. 

I have had a look at ODF v1.2 and cannot find anything that would suggest this page break is essential, however it would be good if someone else could confirm this.

Setting platform to All and severity to enhancement.
Comment 2 gui 2013-11-26 19:22:05 UTC
Well, I can't say how it should act, but I'm sure I've been inserting sub-documents in the same page than master document text (and suffering erratic results).

 I would search for examples if you consider it useful.
Comment 3 gui 2013-11-26 19:22:43 UTC Comment hidden (no-value, obsolete)
Comment 4 gui 2014-02-03 23:03:11 UTC
Updated version: behavior persists in LO 4.2.0.4

NOTE: detected a hidden paràgraph in the sub-document; nevertheless, deleting it dosen't change the behavior.
Comment 5 sm8ps 2015-09-23 12:38:05 UTC
Confirmed in LO 5.0.0.5 running on Ubuntu 14.04.

My test case: create two text-only documents and include them into a master-documents. The test case of 'LOpage-breakBUG.zip' produces the same unexpected behavior.

This problem renders master-documents almost useless for people that do not want to have page breaks between the sub-documents.

Thanks for considering this case!
Comment 6 sm8ps 2015-09-23 14:06:41 UTC
Just had the chance to test things on LO 3.5.7.2 and the situation does get confusing.

1. Creating a master document and inserting new documents from therein does work as expected, i.e. without automatic page breaks.

2. 'LOpage-breakBUG.zip', however, does NOT work as expected, i.e. page breaks are inserted.
Comment 7 QA Administrators 2016-11-08 10:33:46 UTC Comment hidden (obsolete)
Comment 8 Thomas Lendo 2017-03-12 20:52:55 UTC
I tested this bug with LibO 5.3.0.3.

The files in the attachment from 2013-10-31 behave as described from the bug reporter: a page break is automatically inserted before the sub-document is shown.

But I created a new file and there is no page break. Therefore I would suggest to close this bug as RESOLVED WORKSFORME.

Can someone else conform this?
Comment 9 Thomas Lendo 2017-03-12 21:06:25 UTC
Created attachment 131837 [details]
ZIP archive with master document and sub-document

Created with LibO version: 5.3.0.3
Build ID: 1:5.3.0~rc3-0ubuntu1~trusty1.1
CPU Threads: 2; OS Version: Linux 3.13; UI Render: default; VCL: gtk2; Layout Engine: new; Locale: de-AT (de_DE.UTF-8); Calc: group
Comment 10 sm8ps 2017-04-03 15:52:58 UTC
I do not have access to a newer version than LO 5.1.6. The sample document that you have uploaded does also work well without inserting page breaks. However, with some fiddling around on my own, I could create master documents with unwanted page breaks automatically inserted between sub-documents. Unfortunately, LO eventually crashed on them every time before I could take a closer look.

Anyways, this does IMHO not support the predicate RESOLVED WORKSFORME, because your sample does work for me as well whereas the problem is not resolved here. May I ask you to recreate my own test by using several bigger sub-documents used multiple times and occasionally interspersed with some text blocks? Sorry to be of no big help but I will not have access to LO 5.3+ any time soon.
Comment 11 Thomas Lendo 2017-04-05 14:42:28 UTC
sm8ps, my reasons asking for a RESOLVED WORKSFORME are 1) that new documents have no page-break (at least on my installations). If it's not reproducible with current versions, then it's not a bug anymore. And 2) if it's only reproducible with your installation, than maybe a new user profile could help. Did you test all steps to ensure that's no problem with your installation? And 3) if the bug is only reproducible with the old attachment of 2013 (and not with new files), then for me it needs not necessarily to be a bug because maybe the page-break is inserted hard-coded in the xml files and can't disappear also with current LibO versions.

I'm working with master and sub documents for 10 years and I haven't seen that bug in my documents (master documents including over a dozen sub documents with about 200 pages in total). I can't confirm the bug, maybe another one can.

sm8ps, maybe it helps if you give us a step-by-step description how you create the master and sub documents and how you do link these files in the master document. Please do this with a fresh user profile and with new templates/files (not old one because old files could be the reason for that behavior).
Comment 12 Thomas Lendo 2017-04-05 14:44:09 UTC
Additional information: Only linked MSO Word files enforces a page-break in my tests, no OpenDocument files.
Comment 13 sm8ps 2017-04-06 14:14:28 UTC
(In reply to Thomas Lendo from comment #11)
> sm8ps, my reasons asking for a RESOLVED WORKSFORME are 1) that new documents
> have no page-break (at least on my installations). If it's not reproducible
> with current versions, then it's not a bug anymore. And 2) if it's only
> reproducible with your installation, than maybe a new user profile could
> help. Did you test all steps to ensure that's no problem with your
> installation? And 3) if the bug is only reproducible with the old attachment
> of 2013 (and not with new files), then for me it needs not necessarily to be
> a bug because maybe the page-break is inserted hard-coded in the xml files
> and can't disappear also with current LibO versions.
> 
> I'm working with master and sub documents for 10 years and I haven't seen
> that bug in my documents (master documents including over a dozen sub
> documents with about 200 pages in total). I can't confirm the bug, maybe
> another one can.
> 
> sm8ps, maybe it helps if you give us a step-by-step description how you
> create the master and sub documents and how you do link these files in the
> master document. Please do this with a fresh user profile and with new
> templates/files (not old one because old files could be the reason for that
> behavior).

I did some more thorough testing but could not reproduce my previous results; I must have done something inadvertent last time. So please go ahead changing the status of this bug report. Thanks for taking the time to consider this all!
Comment 14 gui 2017-04-17 23:30:22 UTC
Well I'm not familiar with bug classifying protocol, and only want to drop more info: in current version 5.3 (cannot access the subversion now) the problems continues, in an erratic way but for sure related with text formats: having a sub-doc that inserts a page-break when inserted in a master document, it continues acting this way even if I copy-paste the content of the document in a document that originally didn't force a page-break when inserted.
Repeating the process but inserting the problematic content in the clean sub-document as HTML purges the bad behaviour at the cost of missing the specific LO styles.
That's the way we solve it from the beginning. Apologies for not to share...
Comment 15 Thomas Lendo 2017-04-19 07:50:56 UTC
Set this bug back to UNCONFIRMED so that a QA guy can have a look ...

I said my two cents in comment 8 and comment 11.
Comment 16 Buovjaga 2017-04-28 14:01:45 UTC
(In reply to gui from comment #14)
> Well I'm not familiar with bug classifying protocol, and only want to drop
> more info: in current version 5.3 (cannot access the subversion now) the
> problems continues, in an erratic way but for sure related with text
> formats: having a sub-doc that inserts a page-break when inserted in a
> master document, it continues acting this way even if I copy-paste the
> content of the document in a document that originally didn't force a
> page-break when inserted.
> Repeating the process but inserting the problematic content in the clean
> sub-document as HTML purges the bad behaviour at the cost of missing the
> specific LO styles.
> That's the way we solve it from the beginning. Apologies for not to share...

Are you talking about documents created from scratch in version 5.3?
Comment 17 Regina Henschel 2017-04-28 18:55:57 UTC
The sub-document has a paragraph with style "Invisible" at the beginning. Uncheck the property "Hidden" in the tab "Font Effects" in the style. Now the paragraph is visible. Open its properties (of the paragraph, not of the style). Go to tab "Text flow". There you can see, that "page break before" is set. Therefore the page break in the master document is correct. Remove this page break in the sub-document and there will be no page break in the master document.
Comment 18 Regina Henschel 2017-04-28 18:57:41 UTC
No bug.
Comment 19 gui 2017-05-03 23:29:24 UTC
Wait! Wait! For sure you are right, but let me search for more damned files; I'm sure I'm having the same behavior without having that hidden paragraph... And apologies for the lapsus with hidden text...