Clear direct formatting - one lesson learned

LO 7.4

One lesson I learned in regard of Clear Direct Formatting functionality:
For this function to work the direct formatting has to be - for given formatting scope - on top of whole stack of format modifications.

The view top-bottom translates to time line of formatting modifications.

E.g. following time sequence of user handling

  • modify paragraph formatting from paragraph contextual menu > Paragraph > Paragraph…
  • modify paragraph style used in same paragraph
  • try to clear direct formatting
    Results:
    The function Clear Direct Formatting can’t reach paragraph’s direct formatting in order to clear it as latter one is covered by paragraph style.

Only if direct formatting was conducted as last formatting modification in whole format modifications sequence, the Clear Direct Formatting function can complete its job successfully.

You must have set a character style in your text if Ctrl+M doesn’t clear it. Select text, in the sidebar select Styles > Character Styles and double click No Character Style
Order of control:

  1. Default Paragraph style
  2. Which is modified by applied Paragraph style
  3. Which is modified by applied Character style
  4. Which is modified by Direct Formatting
1 Like

To be more accurate, Default Paragraph Style is just another paragraph style. Consequently the hierarchy contains only your 2-4 items. And you can add another layer (between 3 and 4 or above 4?) for character style Internet Link (and Visited …) when AutoCorrect recognises a URL. This is internally managed and is the only case I know of where you can have two character style son the same sequence.

1 Like

Thanks for your inputs.

Does my post really refer to character style?
Or ist it nothing but character style which Clear Direct Formatting can handle?
If answer to second question is YES the name of that function should reflect this. In the moment it doesn’t.
Also, it’s hard for me to find your feedback be accounting for timeline perspective which my post refers to. I did that reference by good reason. Actually should be visible in post text. Perspective you present might have good reason to not account for timeline. I however don’t know the reason if any.

I aimed to keep my post as generic as possible as myself didn’t see the need to use details.

Well, discussion stepped into talk about details then I am very happy to share with you some, rather my experience example.
For one certain paragraph - of heading style, the page number setting in paragraph style definition was not effective in document view. However according to style navigator there was direct formatting present. Page number setting direct formatting was in deviation with same setting in paragraph style
while former one was effective in document presentation.
All this while carrying out Clear Direct Formatting didn’t deliver any changes. That time style navigator helped me to learn direct formatting was applied in past. Indeed I see that possible. Myself decided to remove assignment of paragraph style - that helped to be able to conduct direct formatting clean successfully. In the end desired paragraph style was assigned back to heading line. That’s how me comes to conclusion formatting layer on which modification was conducted at any point of time covers modifications made at earlier point of time.

This is simply wrong statement, hence the feedback. When there is a direct formatting in the current place, Clear direct formatting function would clear it - no matter what was the sequence of actions (or even if you have saved and reloaded, removing all the memory of the order).

There are specific pieces of direct formatting that are explicitly not cleared by the said function - e.g., language, - but again, this is not specific to any order of actions, and would be the same when you applied DF last, or made paragraph style changes in between.

Note that, when you apply the paragraph style to a paragraph, this action itself clears direct formatting from the paragraph level. Maybe this has confused you?

Attaching a sample document, and providing specific steps to see what you describe could help.

Or ist it nothing but character style which Clear Direct Formatting can handle?
If answer to second question is YES the name of that function should reflect this. In the moment it doesn’t.

The answer is YES, and the name of the function should NOT be changed: Applying a character style is not direct formatting, so should not be cleared. To remove character styles, you have to select “No character style” from the styles dialog.

I cannot reproduce the procedure as you describe. Direct formatting will always take precedence over paragraph formatting. If you later change the paragraph style, the change will not be visible if the same property is already applied through direct formatting.

For one certain paragraph - of heading style, the page number setting

You mean “section number” rather than page number? Indeed, numbering on/off is not anymore something that is “reset” by “Clear direct formatting”. It used to be in (much) older versions of LO. Use F12 to toggle numbering on or off.

A correction: “character style is not direct formatting”

Sorry, I missed to add one detail.
page number in

  • paragraph style definition > Textflow > Breaks > Insert > Type Page, also Page Number

same regarding paragraph direct formatting

This was the case that particular experience.
Clean Direct Formatting didn’t result in any paragraph presentation changes - didn’t result in desired fix in page number presentation - page number in document view was wrong (not as set in paragraph style). Document view page number had value equal to setting in direct formatting layer while a paragraph style with own page number was applied too.

These two page number settings had different values. Document presentation got page number as in direct formatting page number not the paragraph style page number.

The best way to assess what went wrong is to analyse a sample file. So please attach one and describe as precisely as possible the expected result.

That is also something that has changed over previous LO versions. Any manually inserted page break is not reset by the “Clear direct formatting” command. You need to remove the page break first. If there is a setting in the paragraph style related to page break, it will not show when you remove the manual page break. For that, you need to issue “Reset direct formatting”.

So indeed there are formatting aspects (section numbers, page breaks, and possibly others) that are not (anymore) removed by the Clear Direct Formatting command. Probably there were arguments to do this differently, but it can be confusing.

So to have your page number correctly displayed: 1) first turn “Breaks - Insert” off on the Text Flow tab of the Paragraph dialog, 2) then hit Ctrl+M to have the definition from the style take effect.

@Vanadium: the definition of direct formatting is quite confusing. As long as DF involves visual formatting (in paragraph: indents, spacing, alignment, tabs, colour and border; in character: font, position, colour and border), it will be cleared by the command.

However, everything related to text flow (except perhaps hyphenation rules and window/orphan), i.e page breaks, page style chaining, page/list item number reset, live in a different realm and are not affected by Ctrl+M. The same goes for list numbers. I may forget other parameters.

The command then clears what is related to formatting but not to layout. I admit it is sometimes difficult to tell if an action is formatting or layout.

I have always considered entering a page break, manual or by pressing Ctrl+Enter, as the same as entering a paragraph or line break. And those don’t count as direct formatting.

@anon87010807 The case of page breaks is one excellent example of puzzling action. DF? Not DF?
From a general point of view, DF could be defined as any action/directive/formatting which can be achieved through a style but is done “manually” by user. Page break is puzzling because you can provide it through text flow attributes of a paragraph style. However, not all page breaks are “systematic”. Some are really “unique” in the sense they bring a high added-value to the document at a single location. Therefore, this is not DF. But if a specific context should be associated with a page break and this break is manually coded instead of being defined in the context (paragraph style), this is DF.
On the contrary, a line break is never DF. It can be considered a mere character with “format-effector” semantics (as it used to be written in ANSI.X3).
Paragraph “numbering” (with bullet or number) can be done manually with toolbar button or through a list style associated or not with a paragraph style. The former is “logically” DF while the former if not.
However, not of the manual insertions, though qualifying for DF in my mental model, are affected by Format>Clear Direct Formatting. This is why it is not obvious to properly describe DF and explain to users, newcomers or already experts, what will be cleared.