Footer disappears in document on update of template in LO-5

Hello -

On Ubuntu 15.10 / LibreOffice

Been using LibreOffice for a while but a little new to managing Styles and Templates.

I searched through the forum but did not find answer to what I am looking for.

A description of my particular situation is as below.

I created a template to be used in different documents with similar content. Thus the template contains quite a few styles. I created the styles hierarchically such as Footer.Style and then Footer.Style.DocA and Footer.Style.DocB such that DocA and DocB can apply the style referred to by its respective name.

All that the child style changes, eg. by DocA or DocB is the color. Font, borders etc. are stored in the parent style Footer.Style.

Thus main body of template is blank. Has no information and the template is mainly used as a storage for styles.

Footer of the template has 2 lines:
2nd line has page number/count and applies the style Footer.Style.PageNumber.
Ist line of footer in template is blank. And applies the style Footer.Style.

In the document using the template, whether DocA or DocB, on this 1st line, I apply the style Footer.Style.DocA or Footer.Style.DocB, which only changes the color, from parent Footer.Style.

For the footer in the document it is not working (loses the line) when I Update Styles after changing the template. When I update style, the footer line that has a blank line in template (the 1st line) disappears in document, and I am left with a blank line that has style Footer.Style.

Thus, to recap, the 1st line in document DocA or even DocB which should have the style Footer.Style.DocA or Footer.Style.DocB,is no more, when I Update Styles. Content is gone also. Left with blank line as in template. The 2nd line is fine and the page number/count displays.

Also, another thing I can’t figure out - whenever I open either the document or the template, it wants to Update Styles, even if I have not changed the template. It also asks this question for the template also when I open the template. I always agree to this and click on Update Styles.

My final related question. I want to combine these documents DocA and DocB in a Master Document. I create a Master Document Template to work from. But again there when the documents are combined the footers from both documents completely disappears. No footer.

My Master Document has a footer that is empty, nothing in it. So not sure if that is the problem and what I can do about it.

Thank you much for your help in resolving these matters.


Template: where are Footer.Style.DocA and Footer.Style.DocB defined? Not clear if it is in the template or in the documents

ALL styles are in template. Footer.Style.DocA and Footer.Style.DocB are in template and children of Footer.Style. All that …DocA or and …DocB changes is the color. Footer.Style defines font and border. Hope that helps. Thank you.

Also, please note - the only thing in terms of content that is in template - is the 2nd line of footer. That has the page number / count and imposes its own style - Footer.Style.PageNumber. Rest of document is empty. My problem is when I make modifications to style in template, even not related to footer, I need to update style in documents - and I lose footer line 1.

It seems to be even worse than what you describe: after creating document A, I changed Footer.Style in the template. After update, content of first line disappeared and its style was changed to Footer.Style instead of Footer.Style.DocA.

I’ll test that on one of my documents which has a very complex header.

From experiments, it looks like headers/footers are replaced when they are modified in the template, effectively causing any user text to be lost. I do not know if this is intentional. Chapter 10 of the Writer Guide for 4.2 (Guide has not been released for 5.0) tells nothing about template behaviour regarding header/footer.

Document body text is left untouched when styles are updated. Note message says “style update”, so this may be a bug.

Thanks again for your help. Yes it seems they get replaced. I tried different approaches to no avail. Perhaps there is a place I can post / request this for LO to address?

I have solved this in interim by keeping a copy of footer in last line of document which I paste back in footer after import in master.

I have asked here to check for a bug. After confirmation, one can be filed.

From my experience with master documents, header/footer are not transferred from included documents to the master. This seems logical as header/footer are a property of the page style. In the combined document, the page style comes from the master, not from the icluded documents. In my case, every chapter was made of a single included document and I had to create (in the combined doc) one page style for every chapter, so that I could have a different header/footer. I did not find a way to retrieve the original header/footer (I could not use fields as the header content was not related to any Heading x paragraph) to avoid a manual procedure.

EDIT: word “not” was missing in last sentence above.

Thanks for your comment. So it seems you are saying I have to create a new footer in Master to have what I need? Which would be the combined footers of all documents, line by line? I would be ok with that if it does not delete footer when I update the child documents in Master. Would that work?

Also, in footer in each document, I have cross-references to topics in the document I created by Set Reference. If I copy and paste footer in Master, after importing documents, will the cross references work? I will try it out. Thank you again.

The cross-references work provided all names are different, i.e. you cannot have a “here” name (this is an example) in two included documents. The master document will be confused (either one of the names hides the other or nothing works at all). I have not tested this error case.

Thanks here also. So the cross-ref work for me. They are named differently and they are fine.