Hi everyone, this is the first time I report a bug. Please don't hesitate to ask for clarification in case I don't express myself with the proper terms. I found the bug on several versions of LibreOffice, specifically 6.4.4.2, 7.0.4.2 and also 7.1.0 which by the way I used to understand how the bug worked. I could replicate the bug on two completely independent machines, both running Windows 10 x64. I don't know whether the bug is present also in other OS. I also tried to do the same with OpenOffice on my machine, but OpenOffice worked fine, so I think we can totally exclude coincidences or some peculiar fault of my machine. It works this way: when you select a portion of text that you have written in a certain style, be it just a word or a whole paragraph, and then directly type in the new text you want to have without deleting the old one first, LibreOffice applies direct formatting to the new text. Meaning: the new text appears to be in the same style as the old one, but all its characteristics (ok to be fair I tried with only some characteristics, like font and line spacing, but I think it's fair to assume it works for everything) are registered as direct formatting rather than simply paragraph style or character style. How to replicate: type a text. Any text, in a certain paragraph style, for example you could have a paragraph style with font Times New Roman bold. Now select a part of the text, type in something else WITHOUT DELETING THE OLD ONE FIRST, then change the paragraph style. For example, try changing the font style to italic instead. Now you'll see that the new text you typed in keeps the bold, registered as direct formatting and not style formatting. This can wreak absolute havoc on a document, especially if it's a long one, and especially if you relied on styles to format it, and I love LibreOffice and I would love to see it fixed. :) I would attach a document, and I can do it if somebody thinks it's necessary, but it's a bug that I believe is best "seen in action"; if I send you a document with some direct formatting in it I don't think it would be very helpful for you to understand how the direct formatting got there. As for version 7.1.0: it's very helpful to see what's going on! Download the version, go to Tools-->Options-->Advanced and check "Enable experimental features". Now you'll have the style inspector enabled (right bar, under Navigator. Same bar where you can access the styles). This means you can see the bug happening in real time. Have the style inspector open, and do the text substitution as I described: where first there were only Paragraph Styles or Character Styles, you'll suddenly see Direct Formatting too! Workaround for the bug: delete the text first, then type in the new one. Still bothersome though, especially if you have no idea that the bug exists in the first place.
It's always better to attach minimal sample, where issue can be visually seen, just put all steps inside. And please search for existing bugs, both closed and open.
Created attachment 169917 [details] testcase of the bug, with instructions to reproduce it Follow the instructions in the document to see the bug in action for yourself. You can also see the effects of the bug in the document itself.
Ok I just created a sample. I tried looking for the bug yes, but it doesn't seem anybody reported this before. I did find somebody though on the forum who seemed to be dealing with the same problem, probably without realizing. https://superuser.com/questions/1591427/disable-direct-formatting-in-libreoffice-writer
Yes, I can confirm this problem. It is very irritating if you re-type something and then later change a style setting, only to find out after you sent the document that not everything got changed according to the style because what you re-typed was set to direct formatting!
No repro OO and 6.2.8, repro 6.4.0 and 7.2+ so it can be called regression. Reproduced somewhat different (previous italic remains, new bold added), for typing and after space, not after delete and type. <style:style style:name="T2" style:family="text"> <style:text-properties fo:font-style="italic" fo:font-weight="normal"/> <text:p text:style-name="P4">7) text text <text:span text:style-name="T2">new text</text:span>
This started in 6.3. Looks duplicate. *** This bug has been marked as a duplicate of bug 134426 ***