Unintentionally inserting direct formatting

Please see my response to Zizi64.

I think, there is indeed direct formatting involved here. the string “Setting up” is not formatted in style Heading2! And it reverts to normal when Ctrl+M is applied. How would you explain that?

I rechecked a second time. I confirm that here (Fedora Linux 34, LO 7.1.6.2.0, KDE Plasma desktop) at open time, with cursor in first position, paragraph style menu in toolbar reports Heading 2. Ctrl+M does nothing.

This is not incompatible with @Zizi64’s analysis because Writer always uses short internal styles instead of the human-readable name. You must then look for “T3” in the style dictionary to recover the human-meaningful name.

It is very easy to style Heading 2: just press Ctrl+2. You might have done inadvertently.

After saving as .fodt and opening with a text editor, I see “Setting up …” is styled “Heading_20_2” which is an encoding for Heading 2. But I also see several “__RefHeading__Toc…”. Has your document ever been handled by some Micro$oft application? Or perhaps the 000 TaskTemplate.ott?

From the Content.xml file of your attached document (from the .zip archive). The expression “Setting up” located in the text body is formatted by an unknown text style named “T3”:

</text:span><text:span text:style-name=“T3”>Setting up</text:span>

The settings of the style T3:
<style:style style:name=“T3” style:family=“text”><style:text-properties style:font-name=“Arial1” fo:font-size=“9pt” officeooo:rsid=“0136b527” style:font-size-asian=“11pt” style:font-size-complex=“11pt”/></style:style>

Beacause it is NOT a direct formatting property, but it is a Style, the Ctrl-M will not reset it.
Maybe it is come from a foreign source.
NEVER paste preformatted texts into you documents.

All of the ODF documents are .zip archives really. Just rename (a copy) it to .zip extension, and you will able to look inside the archive.

1 Like

Beacause it is NOT a direct formatting property, but it is a Style, the Ctrl-M will not reset it.

Well, just try it out. It does reset by Ctrl+M. And it did not come from a foreign source, but was simply typed in from the keyboard. I guess, LibreOffice internally assigns some unnamed styles for direct formatting. But thanks for trying to help.

All of the ODF documents are .zip archives really. Just rename (a copy) it to .zip extension, and you will able to look inside the archive.

Yes, that’s what it tried. But from the fact that LibreOffice did put in my keyboard input as direct formatting I still cannot find out, why it is doing that and how I can stop doing it. As I said, the replacement text was simply input by keyboard. Either my document must contain something very weird, which LibreOffice is stumbling about, or this is a bug in LibreOffice. I would not be surprised about the latter, because this behavior is hard to catch from a user standpoint. You only notice problem after changing one of your styles drastically enough that the direct formatting islands stick out.

Sorry. Yes, it resetted by Ctrl-M, but it not changed by modifying the applied paragraph style. Because it is an another style. But what type of the styles it is??? It is not appeared in the “ALL STYLES” list at paragraph styles, not at character styles, nor at any other styles.

Well, I though that is what “direct formatting” is. It looks to me as if I had set font of this string manually to "Arial 9pt, … " and hence it doesn’t change with the paragraph style. Isn’t that the definition of “direct formatting”?

Yes. Direct formatting is any action outside styles. The formatting order of precedence is from lowest to highest priority: paragraph style, character style, direct formatting. When you change a style, it is changed in its layer, the others being unaltered. When you take into consideration precedence, you understand the mask effects direct > character > paragraph.

Thank you @ajlittoz That’s what I thought so far. But see my newest comment above. I have been able to reproduce the problem in a simple matter and perhaps we can now get to the core of it. Your help is highly appreciated.