Master document style interprets borders padding differently by adding white space

On a master document I imported a text document. I also imported my styles.
The styles all look good expect one style.

I have a paragraph style which uses borders and within borders a padding which is synchronised for all sides: 0.70 cm. The background is gray. The style looks exactly as designed BUT when the paragraph goes over one page and continuous on the next page the padding is additionally added as an outside padding, hence there is first 0.70 cm of white space before the gray box.

Where does that whitespace come from?

  • Version is 7.5.4.2 on Windows
  • The master is an ODM file
  • Import of ODT via Navigator into ODM
  • In my ODT file I created a template which I then loaded in the ODM → Load Styles from Template → ticked “Paragraph and Character, List, Frame, Overwrite, Page”

Here are two test files. Same problem. The box is ok in the ODT but with whitespace in the ODM.

test.odm (36.8 KB)
test.odt (40.8 KB)

We can absolutely no explanation to this behaviour for at least two reasons: you provided a screenshot (which is very poorly informative as we have no access to the formatting configuration and you didn’t enable View>Formatting Marks) and to make things worse you fancied to blur the image.

Improve you question by editing it (= modify it). Provide general information on your environment: OS name, LO version, save format. Then:

  • You mention a master document. Is this really the case, i.e. extension .odm?
  • You “import” a text document. How? Insert>Text from File or with the dedicated tool of the Navigator (where you list the files and can reorder them)?
  • You “imported your styles”. What did you do exactly? In which files?
    In master/sub-documents context, a style in master overrides the style with the same name in the sub-doc. The best way to avoid conflicts is to base all documents on the same template.

For best diagnostic, attach a sample file (or files if master + sub) at most 2-pages long. If you consider your contents confidential, replace it with garbage (such as the one generated witj “lorem” (without quotes) followed by F3. Make sure you have the same formatting, applied the same (styles), and problem persists.

Thank you. I added the documents and the workflow explanation.

Remark: you didn’t mention OS name nor LO version but I think I can manage without.

Congratulations ! You discovered a non-trivial bug.

This is a summary of my experiments.

In Text Box paragraph style, Borders tab, you defined a border with padding… Top and bottom paddings seem to be used twice:

  • for “normal” geometry computation, like in the sub-document
  • erroneously a second time around the page break, only in the master

You should file a bug report otherwise developers won’t be aware of it.

I already noticed double indents (see tdf#125336, but this is not related to master/subdoc) and bad interpretation of distances when a border is present (see tdf#154133, again not master/subdoc).

PS:

  • Don’t tick AutoUpdate in your style definition (see The Box Organizer tab) for your peace of mind to avoid unintended style modification. Prefer explicit updates rather than contextual ones.
  • Why is The Box not a descendant of some other style, be it Default Paragraph Style? With a consistent inheritance tree, formatting tuning becomes a real treat.
  • You probably retrieved part of your text from Internet and pasted it into your document. When you do this, always paste as Unformatted Text to get rid of all the web formatting garbage. In your case, font ends up as Open Sans;Arial;sans-serif which is an incorrect specification . Writer can’t interpret it and font substitution comes into play.
  • Also you have some direct formatting in the master.

I think it can. But indeed, this “font name” won’t be found as such, hence will be italicized; and font substitution code will indeed run - but it will parse the name, and try to find the parts; and only will have to find anything beyond this spec, if none of the three is found.

Hi Mike,
Ten+ years ago, I used such a font specification because I found HTML has a “good” idea about fallback when a preferred font is not found. Unfortunately it doesn’t work in Writer. So, I stepped back. And should it work, it would cause serious layout/formatting problems that present style machinery can’t handle because it has no notion of context conditions. This would require too deep a re-engineering. When you consider most users don’t use styles, this would be a loss of time.
In addition, I fear a possible conflict with the “feature syntax” ( : = & separators). As far as I can remember the semicolon was considered a valid character for the name, therefore failure. At that time, LO version was probably in the 4.x series, possibly even the 3.x series.

@ajlittoz indeed, you are correct about problems with (possible) use of this feature (I wrote by memory, and could be wrong). Anyway, I don’t advertise and promote its use - I just commented on what I think was not exactly correct :slight_smile:

Thanks for testing and confirmation. I opened a bug report: 156384 – Master document style interprets borders padding differently by adding white space