Bug 106195 - Change docs to explain how to handle and remove direct formatting
Summary: Change docs to explain how to handle and remove direct formatting
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
(earliest affected)
Hardware: All All
: high normal
Assignee: Not Assigned
Whiteboard: target:7.2.0
: 112872 115910 (view as bug list)
Depends on:
Blocks: Clear-Formatting Help-Changes-Features
  Show dependency treegraph
Reported: 2017-02-26 03:00 UTC by Jim Avera
Modified: 2021-05-16 20:44 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:

demo.odt (9.78 KB, application/vnd.oasis.opendocument.text)
2017-02-26 03:01 UTC, Jim Avera

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Avera 2017-02-26 03:00:56 UTC
The docs say:  
"Removing all Direct Formatting in a LibreOfficeDev Writer Document
1. Press Ctrl+A to select the whole text.
2. Choose Format - Clear Direct Formatting." 

But of course it doesn't actually remove _all_ direct formatting.  For example, a paragraph with an un-named direct paragraph format will continue to use that format, rather than starting to obey the style applied to the paragraph (as I and many other users might expect).

There are several detailed discussions about direct formats and how and when to remove them.  See https://bugs.documentfoundation.org//show_bug.cgi?id=89960
for example.

But meanwhile, _please_ change the documentation to actually explain what "Clear Direct Formatting" does and doesn't do; and how to make a paragraph which currently uses a private (unnamed) paragraph style stop doing that and obey its style or any subsequent style applied to it.

The current simplistic documentation of direct styles, and the blank statement that Control+A, Format->Clear Direct Formattring removed all direct formatting just does not provide enough information for a user to know what to do.

Steps to Reproduce:
1. Open attached demo.odt
2. Help->LibreOfficeHelp, ->Index
Search for "direct formatting", click "undoing all"
3. Follow the instructions
4. Open Styles and Formatting, and apply 'Default Style' to the paragraph

Actual Results:  
The paragraph continues to obey a direct paragraph style (which specifies a negative indent).  The documentation gives no hint of how to get rid of the direct paragraph formatting.

Expected Results:
Docs should explain fully how Direct Formatting works, sufficient for a user to know how to get rid of it when they want to

Reproducible: Always

User Profile Reset: No

Additional Info:

User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0
Comment 1 Jim Avera 2017-02-26 03:01:22 UTC
Created attachment 131472 [details]
Comment 2 Buovjaga 2017-03-04 18:18:15 UTC
Olivier: you are an expert on cleaning up formatting. What do you think about this?
Comment 3 Olivier Hallot 2017-04-06 15:12:23 UTC

Clear Direct Formatting applies to some properties but not to all of them. A more precise description is needed *or* a specific bug open for the properties not cleared, *if* that constitutes a valid bug.

For example, a § direct formatting property "Alignment" is cleared but not "Indenting".
Comment 4 Octavio Alvarez 2017-10-03 03:42:55 UTC
Bullets and numbering overrides paragraph styles. Also, B & N are not Direct Formatting.

Exporting to Flat and reviewing the .fodt:

     <text:p>Why does this paragraph have a negativew first-line indent when the Style does not specify any indenting and “Clear Direct Formatting” has been applied?</text:p>

This means this paragraph is also a list item even if we don't notice. It effectively it does *not* have any direct formatting applied.

If you switch to List Styles, the paragraph is set to the WW8Num1 list style, which has a 0.30 inch indent. If hit Enter at the end of the paragraph and hit Tab before typing, the cursor won't move but the indent will be set to 0.40, consistenyl with the WW8Num1 definition for level 2 items. Paragraph formatting will be set accordingly.

Being a WW8Num1 style, this file was imported from Word.

If I click twice on the "bullets" toolbar icon, the paragraph loses its List-Item status, behaving as expected. (Sometimes this works, sometimes this doesn't work)

So far, this seems to be the culprit and behavior is working as expected because the indents come from the list style. That said:

 * Compared with the native List 1 list style, a paragraph with List 1 *has* its visual indication set on the toolbar, but WW8Num1 does not.

* If I edit List 1 and set Customize » Number: None (instead of Bullet) then a List 1 item won't have the toolbar shown as pressed anymore! This is a bug, as the paragraph is a list item even if it has a None numbering type.
Comment 5 Jim Avera 2017-10-03 18:57:56 UTC
> B & N are not Direct Formatting.
Ok, that may be true internally, but must users be forced to know that? 

Bullets & Numbering are in the *Format* menu, I think for obvious reasons (they change the "format" of how paragraphs are displayed).

"Clear All Direct Formatting" should mean "Remove the effects of all formatting  applied directly to a paragraph rather than to a style".  Intuitively this means everything in the *Format* menu. 

If this is impractical (to make "All Direct Formatting" mean undo everything in the Format menu including B&N), then please please write clearly in the docs how to remove all other things which can override a paragraph's style.
Comment 6 Timur 2020-03-24 07:56:36 UTC
*** Bug 112872 has been marked as a duplicate of this bug. ***
Comment 7 Timur 2020-03-24 07:57:01 UTC
*** Bug 115910 has been marked as a duplicate of this bug. ***
Comment 8 Timur 2020-03-24 07:58:42 UTC
Very important, many bugs on this.
It's not just to remove but also to handle char and paragraph formatting.

And add sth. like this: 
"If text without character formatting is format cloned to text with character formatting, destination formatting will not be changed because it takes priority. 
It will be changed though with paragraph formatting, hold down Ctrl when you click."
Comment 9 Timur 2020-07-15 07:41:26 UTC
*** Bug 132702 has been marked as a duplicate of this bug. ***
Comment 10 Dieter 2020-08-30 10:20:28 UTC
There are some improvements in LO Help now:


Jim, Is there still a lack of information?
Comment 11 Commit Notification 2021-04-27 10:55:27 UTC
Olivier Hallot committed a patch related to this issue.
It has been pushed to "master":


tdf#106195 - clarify direct formatting removal
Comment 12 Dieter 2021-05-16 13:12:25 UTC
(In reply to Commit Notification from comment #11)
> Olivier Hallot committed a patch related to this issue.
> It has been pushed to "master":
> https://git.libreoffice.org/help/commit/
> b4b146ad3d84dcf45136a7b89cab453f3afc6674
> tdf#106195 - clarify direct formatting removal

Change made in general glossary: https://help.libreoffice.org/7.2/en-GB/text/shared/00/00000005.html?&DbPAR=WRITER&System=WIN
Comment 13 Jim Avera 2021-05-16 20:44:25 UTC
@Dieter - thanks for improving the help text at (your link) https://help.libreoffice.org/7.1/en-GB/text/shared/01/05010000.html?&DbPAR=WRITER&System=WIN

That might be hard to decode for all but the most advanced users, because it gives clicking the "Bold" button as an example of direct formatting but then says that "applied character styles" are not affected, which sounds like the same thing.   

Suggestion: Add a few words to disambiguate a named character style from the unnamed styles generated by clicking "Bold" and similar (in ODF jargon: "common" styles and "automatic" styles, respectively).