Writer 7.0.x Global Document Formatting Appears Unreliable

It appears as though the 7.0.x formatting for global documents has regressed or otherwise is just not behaving for me. If I am using the same template throughout all of my documents, I expect WISIWIG in the subdocuments, is what will appear in the global document. I have no template or formatting overrides in place and yet LO7.0 will insist in putting in blank pages where none should exist and other strange formatting anomalies. I have tried all three sub-versions and they all appear to have the same issue, when will this be stabilized? The issues I am seeing occur most frequently around pictures in frames that are anchored to a paragraph.

Update 1:
I have re-installed 7.0.3 since 6.4 had issues of its own and I would rather stay current. Here is an example of the visual difference (WISIWIG) viewing the global document and the subdocument. One would think, given they are using the same template, that without any overriding formatting they would appear the same, but the word wrap to the next page appears to have some strange algorithm I cannot figure out.

In the screenshot above, the global document is to the left, subdocument right. I have formatting characters turned on and I do not see anything special that would cause the strange sentence bleed to the next page, when there are clearly two lines still available in the global document example (not very economical). Is there a global setting or something I am missing?! Is the strange behavior dictated by the images and how they are anchored?! Again, I have tried everything. I have even cut and pasted the files into a clean template version of the file and re-saved and that makes no difference. I have changed the anchor points from paragraph to character for some images, that seems to be a hit or miss thing, at least why would the behavior differ between the two document types?

Update 2:
I will also add an observation, it seems that when you start a new document it will grab the template that you have designated as the default template, as one would expect. Apparently this is not the case for global documents. Why is there a difference?

Update 3:
I have reproduced the main issue, with the unpredictable formatting, in a smaller odm/odt combination. The files were zipped up after I was able to demonstrate in my environment that the global document had injected an entire blank page for no apparent reason, at least that I can see (format characters set to visible).

In the above, the global document is on the right, the subdocument on the left. Both, to my knowledge, are using the same template, which is attached in the compressed file added as a comment below. The release of LO and Win10 I am using is below.

Any help appreciated.

image description

What do you call “global documents”?

Existing documents reference for ever the template they were created with.

The following link contains the example global and sub documents: link text

@ajlittoz a global document is a document with an odm extension.

@doktoroblivion: OK, in LO parlance this is a master document.

@ajlittoz sorry for the confusion, a hold over in my brain from the German desktop version of LO: DateiNeuGlobaldokument I guess.

You didn’t mention your OS, this could make a difference.

I just switched to LO (under Fedora Linux 33) and noticed Default Style style names changed for Default Paragraph Style, Default Character Style and Default Page Style. Also Tools>Options, LibreOffice Writer>Basic Fonts (Western) now hard-code Windows default fonts as Times New Roman instead of retrieving the OS font set by user global configuration. Of course, this font is substituted by another one available in the system but the metrics is not guaranteed to be the same which could account for the progressive offset of page breaks.

If your master and subdocuments are not styled very rigorously (strict usage of styles without direct formatting), you may stumble on these differences.

Without much information about your documents structure and styling, I can’t help you more. For a better diagnostic, edit your question to attach a short master and an anonymised subdoc still exhibiting the same problem.

EDIT 2020-10-31

First, congratulation: you use of styles is very systematic and rigorous. I’ve rarely seen such good usage of the feature (with perhaps a doubt about character styles).

The first discrepancy occurs in My First Home with paragraph starting as I was baptized. The end of the paragraph after “my sister” is flushed to next page in the merged master while it continues normally in the subdoc. I tried to see whether there was some invisible control character following the word but there was none.

Tools>Update>Update All seemed to correct the situation. But this is not satisfactory.

I saved the subdoc as .fodt to have a look at the XML. The strange thing in your subdoc is that every sentence is followed by a <test:s/> tag (with empty content) which to the best of my knowledge is not handled by Writer. I wonder if your document has been processed by some semantic parser or if it comes from another application.

Anyway, this tag cannot be the cause of the problem, I assume, because it does not appear after “my sister” but as expected at the end of the sentence.

Apparently, Tools>Update>Update All solves this first discrepancy and the next. I didn’t check further down because your fonts are not installed on my system and next discrepancies could be not significant to the cumulative effect of differences.

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

In case you need clarification, edit your question (not an answer which is reserved for solutions) or comment the relevant answer.

I have updated the issue with more information and am attaching a zip file.

In case you meet difficulty attaching a .zip file, change extension to .odt. I’ll do the reverse change when downloading.

@ajlittoz a few questions. First, the subdocument was cut and pasted from the original into a ctrl-N new document that used the standard (desired) template. So I am not sure that such a procedure would drag any XML tags into the new doc, unless of course they are part of the template that I created from an old LO6.x release(?)
I will try your other suggestion on the global document and see if my issues persist, assuming of course, the above is meant as a fix?

Tools>Update>Update All did not work for me. In my master document I am still seeing empty pages being injected.

I didn’t work on (full?) empty pages. I focused on the unexpected page breaks, i.e. where there was ample space for the end of a paragraph. Describe the position where you see an empty page (remember I have not the same fonts and this offsets the page numbers): the name of a Heading 3/4/5 starting the part where you have this empty page and perhaps a few words at the start of a paragraph. I found such an empty page after “Photo 19” (but it becomes “Photo 22” after Tools>Update>Update All) – the frame in the Navigator is Rahmen34.

The problem may be related to frame positioning. Unfortunately you manually tuned all of them instead of applying a common frame style: they are all Frame + some direct formatting on Position. This direct formatting cannot be removed with Ctrl+M. You also anchored To character and I can’t see exactly to which character. Is there any specific reason to chose this one instead of more common To paragraph?

(to be continued)


To character adds alignment possibilities but I don’t see the point here.

Keep inside text boundaries is not checked. It improves the situation but not for all cases.

I could not find any subtle difference in the Beide Seite page style between the master and the subdoc.

@ajlittoz Okay, I created an entire new global document, installed the template changer extension and rebuilt the document fresh. It appears to be behaving better. So, my question is, are template based master documents re-usable between LO6.x and LO7.x? If not, this would seem to be my problem, I was under the assumption I could just reopen the old master and continue, but apparently there are issues when doing this. Can you confirm my suspicions?
Also, I think it was VERY important for me to install the Template Changer extension just after creating the master document and before including the subdocument structure. I am not sure why I think this, but when I did this is started behaving more like I expected. I still see strange behavior though if I make subdocument changes and then do an Update All on the master. But a fresh start of LO7.x on the master seems to be better.

I checked one of my old template-based master+subdocs (last time I updated it was in October 2012; I don’t remember the LO version). I don’t experience any formatting mishap. I also created a fresh doc to see if the XML contained new < > elements. There was no <text:s /> tag in it. I think that part of your problems comes from the history of your file. It might have been created outside LO and the extra XML elements carry over from edits to edits.

Since I am no developer, I can’t tell what Writer does with unknown XML elements. XML standard says unknown elements should be ignored but left in the stream. LO is a very specific XML-based application: if follows the ODF standard which may state specific rules for unspecified tags.

When you copy/paste a text fragment, all its formatting is also copied. This will likely also include “alien” XML tags.

Installing the Template Changer extension should not change anything. It just gives you the possibility to rebase your docs.

Though creating a new master document seems to work, I am going to mark this issue solved, even though I think there is still an underlying problem here. Thanks for your help again.

Sure, there is an underlying problem but I can’t spot it. The XML contains unusual elements and there should be a reason for it.

Your main issues occur when you have a frame anchored to a paragraph. Look on this side.