Can't update style: line spacing

I think I might’ve hit a bug, either that or I’m really missing something.

I use LibreOffice version: (x64), on Windows 10.

I have a long text (about 500 pages), written in different styles, Text Body, Headings and so fort. Most of it is written in Text Body. Today I wanted to update the Text Body style, and it turns out I can’t change the line spacing properly.

I go to styles (on the right panel), right click on Text Body → Modify. I go to the Indents & Spacing tab, I modify the line spacing. It doesn’t matter to what I modify it to, I can change the fixed value, I can change it to 1.5 lines, whatever I want. I click on Apply, then OK. The “AutoUpdate” option in the Organiser tab is checked (but I don’t think it has actually anything to do with this. I tried with it unchecked too. Nothing changes).

What happens: only some paragraphs written in the style Text Body are actually updated. Many others are left with the line spacing they had before, so I have this weird alternation of paragraphs with different line spacings, which is terrible.
Interestingly, if I instead try to update the font, either the size or the type, then it works just fine. The font gets updated on all paragraphs without problems. So the program recognizes those paragraphs as all written in Text Body when I update the font, but apparently not when I edit the line spacing.
If I click on one of the paragraphs which DIDN’T get updated, and then I go to the style selection tool on the top bar and click on Text Body again, even if it is already selected, then it does update the line spacing. So it seems as if the program temporarily forgets that those paragraphs are indeed written in Text Body (but it remembers it when I change just the font).

Workaround I found: I go to Find and Replace, select all text written in Text Body, and then choose Text Body from the style selection tool. Then it works. But I would much prefer if the stlye could be updated the normal way, also because I have indeed some text in the document which has some direct formatting that I would like to keep, for example different alignements, and which disappears if I do this. This would mean going through more than 500 pages (!!!) and change all the instances manually.

I tried changing the style in Safe Mode, with no results. The problem persists.

I would be extremely grateful for any help because I am going nuts. Is this really a bug? Does the fact that I have some direct formatting in the text somehow confuses LibreOffice? Important note: the paragraphs who don’t want to change the line spacing ARE NOT the paragraphs with direct formatting. They’re random paragraphs distributed throughout the whole document.

UPDATE: I created a new document, tried to insert random paragraphs and random headings, using dt + F3. I coulnd’t replicate the problem, the styles updated normally BUT this time the main style was “Default Style” and not Text Body, just because everytime I generated random text with dt it automatically switched to Default Style. So no problem there. I even inserted some direct formatting just to see if that was the cause, but nope, everything fine.
Then I created a new document, I copied all the text from the document which has problems, and indeed just from the copy and paste I could see there is something wrong: the paragraphs in Text Body are kind of random, with different line spacing and different fonts (even if in the original document they are all in Text Body, all with the same style and font and everything). And again if i try to update the style, I can only update the font! So something happened in my original document which messed up all my paragraph. Any idea of what that could be? This is hilarious but I also want to cry a little.

UPDATE: it looks like the paragraphs which don’t want to change are regarded by LibreOffice as directly formatted, even if they aren’t. If I select them and click on “Clear Direct Formatting”, they update as they should. But I didn’t actually directly formatted them. I just typed them like all the others, in Text Body style. Other interesting note: I noted some words don’t change font. They’re the words I changed most recently in the document. Again, they’re regarded as directly formatted even if I just simply typed them in Text Body like the rest of the document, without manually selecting their font or their font size. I’m very confused.

UPDATE: I have typed random text into the paragraphs of the first two pages of the document. I haven’t changed anything, just selected the paragraphs and typed random text. I insterted som punctuation, deleted words and replaced them, as if I was writing normally. Now if you try to update the style, you’ll see that it updates BOTH line spacing and font randomly. Some text gets updated, some doesn’t. Document is attached.experiment.odt

UPDATE: to try and replicate the problem with a brand new document:
Create blank document. Type random things in Text Body style. Type some paragraphs. Wait some minutes. Add a paragraph in Heading style. Do some modifications in the other paragraphs: change words, delete some lines and type in new ones. Do not directly format anything. Now edit the Text Body style (AutoUpdate unchecked), click on apply, and see what happens.

Followed your recipe but no problem here. Have you changed the default template? In which case, it could already contain some direct formatting or badly configured style.

The waiting part seems to be fundamental (strongly wondering whether this has to do with autosave). I tried again with another brand new document and at first I couldn’t replicate the problem either. Then I just kept tiping some random stuff here, replacing some there, and then the problem manifested itself again. I am truly at a loss of what to do here. Also, I found the templates under “File” but it can’t figure out how to modify them so that this DF randomly attaching itself to the text I’m typing stops.

Very strange, there should not be any change triggered by a delay. To make sure, save your user profile and try either to restart in safe mode or to reset your user profile.

Tried with safe mode, same problem. Note: the problem seems to appear following a new modification to the style. That is: type random stuff, random paragraphs, random document (the random paragraphs are important. This seems to happen more if there are several paragraphs). Then modify the style and apply. Things should be normal now, and the style should have been applied correctly. Ok. Then some more random tipying, substitute words and stuff. Then change style again. At the second change, it goes wrong for me.

Never experienced that. I’m short on ideas. Have you reset your profile? But save it before, just in case.

Yeah I resetted everything :frowning: On a side note, OpenOffice doesn’t do this. I just tried. I hope it’s okay to say this on a LibreOffice forum, but I won’t get mad if the comments gets cancelled. Which is a shame by the way because I think LibreOffice is great and look much better than OpenOffice too, but it’s a catatstrophe for me to have a document of several hundred pages with DF randomly sneaking in :frowning:

I mean not that it cannot be fixed with some patience but still, it’s really a problem.

DF didn’t sneak in on its own. You created it at first and now you painfully struggle to get rid of it. DF is evil. It was offered supposedly to ease transition from Word to OO and LO but IMHO it’s a sin against rigorous document design. It took me a long time to discover the benefits of styles. I still have old documents which need to be cleaned but I move backwards to it because of the amount of work on 100+ pages docs. If I finally tackle this task, I’ll also template them so that they get automatically updated when I tune my template.

Of course, if you hand LO to a new user and from scratch require styling, s/he’ll run away as fast as possible because it’s just like trying to enter desktop publishing without knowing what it is.

But how am I creating it? I don’t understand this. If I type new words into a new paragraph, or substitute a word, without changing anything, just typing as I described above, why does it get DF? You said it’s strange right? So it isn’t supposed to happen? And indeed in OO it very much does not happen! Tell you what, I’ll delete the program and try again with a brand new installationa and pray for the best.

I discovered what happens. I uninstalled everything, I dowlonaded the latest version, the one in development, 7.1, and I enabled the experimental mode so I could access the style inspector. I opened a new blank document, I opened the style inspector and I started my random typing around. The DF sneaks in when I double click on a word or when I in any other way select a portion of text and then type new stuff in. The new text now has DF. Fun fact: if I delete the text portion I previously selected, no problem, the DF doesn’t appear.
It’s super weird with extra weird on top but I’m happy that at least now I know how this happens and know how to avoid it.
Is this behaviour meant to be? If not, should I report it somewhere? You could also try do the select and replace thing to see if it happens on your machine too. Do you remember if when you did the test before you selected something and replaced or just deleted?

Thank god it doesn’t do it when you use the Find and Replace tool. Whew. I would’ve started weeping if it did.

Something is broken on your machine. This never happens here. In my test, I selected first and typed to overwrite. No DF sneaks in if there was none at start of selection. Of course, it is kept if it was present.

This is not at all the expected behaviour. Nothing should be added unless you explicitly requested it.

To submit a bug, you must find a reproducible procedure (I mean at least on my machine) otherwise the devs will wave away too easily your complaint. Your OS is not mine but I don’t think it will take the initiative to pollute your typing by sending extra key codes after some inactivity. But as we are just blind in a tunnel during a moonless night, check the keyboard interface (hardware as wall as software) doesn’t play “nice” tricks without warning.

Ok. Could it be that the problem is present only on the LO version for Windows? Because I tried doing the same on OO, selecting a text, typing in new stuff, then modifying the paragraph style, and it works with no problem. To make my test even more sound, I then saved the file in OO, opened it again in LO and checked with the new style inspector tool, and I found no sign of DF. This means that when I use OO, DF doesn’t sneak in unless I say so no matter how I modify my text, either by deleting or replacing. If it’s my keyboard somehow, wouldn’t I notice the same thing in OO too?

How could I get more people with Windows to try? This is bugging me to no end, although now that I found out that it only happens if I don’t delete the text first it’s about 400% times easier to deal with it. I just delete first.
I have another Windows machine here, in fact I have two, completely independent from the first one. I’ll report what happens shortly.

If it doesn’t happen in OO, I think you can rule out electrical problems with the keyboard. I doubt the issue is present only in the W version. This is probably a “high level” function completely abstracted from the hardware and OS. With 2 independent machines this will give more certainties.

Confirmed: it happens to two completely separate machines, both a Windows 64.

Same OS version? Same LO version?

I encourage you to submit a bug report on Developers will then test on various W configurations.

Same everything yes.
Sure thing, I will.
In the meantime, I also managed to fix my document.

First beware of the AutoUpdate option in the Organizer tab of the style definition. I rather strongly recommend to not check this box. It is somehow a poor substitute to real style formatting for people coming from Word and used to its workflow heavily based on direct formatting. When checked, a seemingly innocuous direct change on a paragraph may have unexpected effect everywhere.

If modifying Text Body does not cause the paragraphs to update, it is a sign you have direct formatting on these paragraphs. Any action on toolbar icons is direct formatting, not only bold or italic. You may have used Set Line Spacing button and you don’t remember it. This is enough to “lock” the line spacing and prevent update by the style. Even if you use the button to set line spacing to the exact same value as in the style, this is still a “forcing” value overriding the style setting.

The fact it works with font face and size just says these settings were not overridden by direct formatting.

The only way to recover to normal style behaviour is to get rid of all direct formatting.

You mention you don’t want to lose some of the direct formatting. This is also the sign that you didn’t understand the purpose of styles: they are not intended to mark typographical variations in your text but to give semantic significance to parts of the text. You translate this significance by configuring the styles for typographical attributes as a consequence of the significance. Therefore, if some Text Body paragraph have a different alignment from others, then they have not the same significance and should receive another style (perhaps derived from Text Body so they inherit most of the attributes and changes to Text Body also apply to them).

Don’t neglect character styles. They say that the words within a paragraph have not the same “value” as the others. You should not bold a word with Ctrl+B but mark it with Strong Emphasis or another style whose name will “explain” why it is formatted differently. Note also that bold words, rendered identically, may be styled differently because they don’t belong in the same significance.

Maintaining a 500-page document is impossible if you don’t implement a consistent collection of styles (paragraph, character, page, frame and list – all are equally important and contribute to the “comfort” and ease of formatting).

Forget about typographical attributes to focus your attention, as an author, on the significance and semantic value of paragraphs and words. This is the most important part. The appearance comes later. With an appropriate style markup you should be able to change completely the appearance of your document without the need to re-read it. And in a matter of a very small number of minutes.

Then no bug but a wrong workflow.

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

In case you need clarification, edit your question (not an answer which is reserved for solutions) or comment the relevant answer.


ok, from now on I will not use any type of direct formatting at all.

I still don’t think this solves it though; I created a new document with the first few paragraphs of my original document. It’s in attachment and I just typed random stuff in it. It has all the problems of the original documents and some more (somehow, it appears that if I type new words, or delete a word and type again, it creates more randomization). There’s no direct formatting in it for what concerns font and size.

As for the Set Line Spacing button, I don’t think I’ve ever used it in all my life. I don’t even know where it is. So are there other ways I could’ve directly formatted my line spacing?