Ask Your Question
0

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

asked 2016-04-15 07:56:21 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hello -

On Ubuntu 15.10 / LibreOffice 5.0.5.2.

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.

Monosij

edit retag flag offensive close merge delete

Comments

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

ajlittoz gravatar imageajlittoz ( 2016-04-16 08:23:29 +0200 )edit

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.

monosij gravatar imagemonosij ( 2016-04-16 18:00:02 +0200 )edit

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.

monosij gravatar imagemonosij ( 2016-04-16 18:07:57 +0200 )edit

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.

ajlittoz gravatar imageajlittoz ( 2016-04-17 08:36:00 +0200 )edit

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.

ajlittoz gravatar imageajlittoz ( 2016-04-17 09:32:06 +0200 )edit

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.

monosij gravatar imagemonosij ( 2016-04-20 15:34:23 +0200 )edit

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

ajlittoz gravatar imageajlittoz ( 2016-04-21 08:40:35 +0200 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2016-04-16 08:17:26 +0200

ajlittoz gravatar image

updated 2016-04-17 07:58:04 +0200

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.

edit flag offensive delete link more

Comments

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?

monosij gravatar imagemonosij ( 2016-04-16 18:34:01 +0200 )edit

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.

monosij gravatar imagemonosij ( 2016-04-16 18:36:41 +0200 )edit

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.

ajlittoz gravatar imageajlittoz ( 2016-04-17 09:42:02 +0200 )edit

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

monosij gravatar imagemonosij ( 2016-04-20 15:35:31 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-04-15 07:56:21 +0200

Seen: 117 times

Last updated: Apr 17 '16