Writer: text layout not updated in tables after style change

I changed a paragraph style attribute (justified → left align) because justification inserted too much space between words in rather narrow table columns. Though my text is formatted only through styles (no manual overriding styling), text layout in the tables was not updated as expected. I had to change the paragraph to some other style and restyle it to see the intended layout.

Have I missed something? Is there something special with the tables which prevents the usual auto-update when a style is changed? Is there a configuration parameter locking auto-update?

Which LO version are you using? Can you create an example document that exhibits the problem and attach it for others to test?

I can’t duplicate this behaviour here under GNU/Linux running LO v4.1.0.4 however it may relate to custom styles, rather than the default Table Contents and Table Heading paragraph styles.

EDIT: Thanks for providing the example. It appears the tables have had direct formatting applied at some point. The content.xml shows this:

<style:style style:name="P3" style:family="paragraph" style:parent-style-name="Table_20_Contents">
    <style:paragraph-properties fo:text-align="justify" style:justify-single-word="false"/>
</style:style>

While styles.xml shows:

<style:style style:name="Table_20_Contents" style:display-name="Table Contents" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
    <style:paragraph-properties text:number-lines="false" text:line-number="0"/>
    <style:text-properties fo:font-size="10pt"/>
</style:style>

The first table is using the Table_20_Contents style (i.e., left-aligned), while the second table is using the P3 style (i.e., justified). If I highlight the second table contents and select “Clear formatting” from the Apply Style toolbar pull-down and then re-apply the Table Contents paragraph style, the table contents align as expected.

LO_noupdate.png

Behavior is the same under LO 3.5.7.2 and 4.1. Change attachment extension to .odt before opening it. This is an extract of a long document, which prohibits manual update on all paragraphs.

Offending style is customised Table Contents. In first table, layout is correct because style has been manually reapplied after Default styling. Second table is left as is after style update without manual fiddling. Matter may be complicated by the fact that the document is template-based.

Thanks for the expertise.

There has been a lot of revisions on the document lately and some of the editors did not follow the rules ;-(

Most of the tables were created with copy-and-paste to guarantee they all look the same. I supose then some direct formatting was applied to the “master” table and trouble cascaded from there on.

Is there any easy way (apart from dumping XML) to detect direct formatting?

Would the following procedure restore everything without losing the decoration brought by the character styles?

  1. Select all (from the Edit menu)
  2. Right click and choose Clear direct formatting (contextual menu)

Or is it necessary, as you suggest in your answer, to reapply the style in the table cells?

There is no method I know of visually determining which pieces of content have direct formatting applied (which I find a dreaded nuisance). Using “Clear formatting” from the Apply Style toolbar pull-down does not appear to remove character styles, but you do have to re-apply the paragraph style. You will need to do this to each table contents area i.e., each table without the header row.

I feared your answer but I was expecting it. There is a proof-reading step anyway. Reformatting will be done (slowly) during this stage.

Thanks again.

Apparently, Clear direct formatting is all there is to do. With a well-behaved document, no need to re-apply the paragraph style: everything reverts to the intended layout as soon as direct formatting is cleared.