Ask Your Question
0

[Writer] Expected behaviour for template header/footer?

asked 2016-04-21 08:38:09 +0100

ajlittoz gravatar image

updated 2016-04-24 14:30:50 +0100

Writer template documents contain styles and default text content, which help maintain a consistent look across documents. When styles are modified in the template, the dependent documents can be updated when they are next opened.

The dialog which pops up asks if styles should be updated. From this wording, user expects only the styles to be changed, not text content.

This is what happens, but for header/footer styles. If Header x and Footer x (predefined or hierarchically dependent) is changed, contents of the header/footer paragraphs which reference this style either directly or through a chain of dependencies are wiped out. This is not consistent with what happens to body text paragraph.

LO Writer Guide does not mention this strange behaviour, which was discovered from experiments trying to address this question.

Is this the intended behaviour from the developers' point of view or a bug?

In the first case, it should be mentioned somewhere as a caveat.

EDIT 2016-04-24

This is how I understand current behaviour. Please correct me if my assumptions are wrong.

Header/footer area belongs in the page format and are therefore controlled by page style. Since header/footer contents are repeated on every physical page, header/footer components (text, frames, tables, ...) are stored with the page style. This assumption could explain why two independent non-connected (topologically speaking) parts of a document using the same page style cannot have different header/footer titles.

I do not understand why modifying Header or Footer paragraph styles should have an impact on page style: Header and Footer styles are certainly special since they are not "called for" in the page style definition dialog; they are implicitly referenced by the process handling the header/footer, though they can also be used in the main body text for their visual effect. The only style customisation is the drop-down menu in the Page tab for Left & Right, Mirror Pages, Left only or Right only which will cause different variants of Header and Footer styles to be used for this page.

Managing headers and footers is surely a difficult task (from the developer's point of view) since it breaks data flow: main body must be interrupted temporarily to build these areas and then be restarted as transparently as possible. But I do not see the necessity to consider header/footer contents as style side-property.

In a template, text (or more generally typographical items) written in the main body flow is not part of any style and, consequently, is used only on initial reference to the template. Even if template styles are modified or template main body text changed, the document main body text will not be updated, erased, merged or replaced in any way with the new template text.

There are cases where this is desirable but that would complicate LO going a lot beyond the base principles (among other features, this requires splitting text both in the template and the document into corresponding "sections" and marking them as "will override ...

(more)
edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2017-03-18 14:15:26 +0100

m.a.riosv gravatar image

'I do not understand why modifying Header or Footer paragraph styles should have an impact on page style:'

Maybe the impact comes with the use of the options 'Use dynamic spacing' and/or 'AutoFit Height', so changes on the styles used for the text in the header/footer, could imply changes on the used space by header/footer.

edit flag offensive delete link more

Comments

These options change the "geometry" of the page and are selected ad hoc when needed. I am concerned by unexpected changes of header contents when the corresponding element is modified in the template.

ajlittoz gravatar imageajlittoz ( 2017-03-18 16:59:30 +0100 )edit

What are those unexpected changes, and what was changed in header/footer styles?

m.a.riosv gravatar imagem.a.riosv ( 2017-03-18 17:25:57 +0100 )edit

@m.a.riosv: If user changed header's text (e.g., added static text, or a new field to indicate current chapter), and later changed underlying template and updated the document's styles in response to suggestion on next opening, then the added text will disappear, and be replaced with template's header contents.

Mike Kaganski gravatar imageMike Kaganski ( 2017-03-18 20:08:43 +0100 )edit

Ok, but my answer is about the impact from changing paragraph styles, on the page style. I think no the same that change header content.

m.a.riosv gravatar imagem.a.riosv ( 2017-03-19 00:13:04 +0100 )edit
0

answered 2017-03-18 08:59:18 +0100

Mike Kaganski gravatar image

You are correct in your assumptions about header contents being part of page style definition.

The process of detection if the template has changed consists of getting the template information from document's metadata (from meta.xml; template filepath and modification date is taken); finding the template in filesystem; and comparing the modification date.

The process of updating is simple: just copy all styles from current template file into document, overwriting existing styles with same names.

Clearly, header/footer contents should be managed under the same rules as main body text: it is perfectly normal that template header contents provide the initial titling of a document, but once this titling has been set to document needs it should not be changed by template update.

I disagree with this statement. Rather, I suppose, two things may need improvement:

  1. Only update those parts that have changed in template. This requires to have version information in styles definitions. So, if a style in template would have newer current version than initial version in document which was used when file created, only then update it. Updating a style in document wouldn't update initial style version, only current version.
  2. Allow user to choose what is updated.

However, it's an enhancement that would need to be implemented. Current state isn't a bug. And anyway, headers/footers are just styles' content, they aren't something like page body. Their visual representation makes you believe they are similar, but they aren't conceptually. The representation is an artifact of WYSIWYG. In another implementation, they could be defined in a special dialog (cf. e.g. Calc).

edit flag offensive delete link more

Comments

I agree there is room for enhancement here. Templates are really a very powerful tool and they ease document management (at least where common "look-and'feel" is concerned). Though their design is not for the beginner or the faint of heart, more detailed information is needed in the relevant guide chapter. Amongst other, a caveat about header/footer content being part of the page style. This would avoid the surprise and puzzling of discoverinf it through document design.

ajlittoz gravatar imageajlittoz ( 2017-03-18 16:54:19 +0100 )edit

I agree. And It would be awesome if someone made the documentation enhancement as the first step; if possible, please participate (you already devoted much your time to LO on Ask site, and your contribution is much appreciated; my words shouldn't be taken as offence; I just hope to succeed in recruiting a new documentation team member :) )

Mike Kaganski gravatar imageMike Kaganski ( 2017-03-18 20:05:44 +0100 )edit

Rest assured, no offence.

I'd be glad to participate to documentation, but 1) I really master only Writer and to a lesser extent Draw (I'm only a casual user of Calc and Impress, never used Base), 2) my knowledge comes from experience and I have no idea of what happens behind the scene (i.e. developper-wise)

ajlittoz gravatar imageajlittoz ( 2017-03-19 08:03:20 +0100 )edit

Our documentation team consists of users, not of developers. Writing documentation is iterative process (one writes; other review; mistakes are corrected) - so it's good to have something to improve upon, then to have nothing at all;

also, no developer can write a good user documentation unless developer is also a user - and very often it's not the case. Users seem to be better in documentation.

Even if you have only a limited area, you may improve only that.

Mike Kaganski gravatar imageMike Kaganski ( 2017-03-19 08:16:35 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-04-21 08:38:09 +0100

Seen: 449 times

Last updated: Mar 18 '17