Bug 162326 - Clear direct formatting PLUS Clear character level formatting
Summary: Clear direct formatting PLUS Clear character level formatting
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.2.0.0 alpha0+
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:25.2.0
Keywords:
Depends on:
Blocks: Writer-Styles-Paragraph
  Show dependency treegraph
 
Reported: 2024-08-03 08:52 UTC by peter josvai
Modified: 2024-11-12 20:49 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Writer (15.74 KB, application/vnd.oasis.opendocument.text)
2024-08-14 15:16 UTC, Gabor Kelemen (allotropia)
Details
The example file before applying the prepared paragraph style (89.85 KB, image/png)
2024-08-14 15:17 UTC, Gabor Kelemen (allotropia)
Details
The example file after applying the prepared paragraph style (94.36 KB, image/png)
2024-08-14 15:24 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description peter josvai 2024-08-03 08:52:37 UTC
hi, 


It would be incredibly great if you could clear not only direct formatting but also character level formatting (based on styles).

Once you applied this to the text or a section, you'd know that only the paragraph-level formatting (styles) are active. This would be so ever great to have.

Sure enough, quirks mode workaround are possible, starting with copy-pasting the text into a plain text editor and back...
But once you have images in the text, this is no longer a go.

Imagine in the menu: Format / Clear character formatting (styles)...

PLUS: "spotlight character level formatting"



- - - thank you for developing Libreoffice and Writer - - -
Comment 1 peter josvai 2024-08-03 09:04:57 UTC
hm,

I'll  turn off tool tips...
So, the BIG "A" next to Emphasis and Strong didn't come to my mind...

But that's exactly what I was wishing for....

But if this functionality could get an "alias", in the Format menu, as I described, it would make (a lot of) sense, still...
Comment 2 Gabor Kelemen (allotropia) 2024-08-14 15:16:47 UTC
Created attachment 195823 [details]
Example file from Writer

Hm, we got a customer request about something like this, so please let me hijack and elaborate this request a bit :).

Attached document contains a paragraph style named "Signature-indented" which has some character level formatting defined.

Other paragraphs show some direct formatting applied to their words to show what happens when this "Signature-indented" is applied to them:

example #1 has character style „Source Text” set, 12pt, bold,  Liberation Mono, Hungarian language, orange color, striketrough, underline, lime highlight.
Applying „Signature-indented” paragraph style does not override the character style to „No Character Style”, despite overriding some settings from the character style with those set in the paragraph style, thereby mixing them.

example #2: paragraph alignment is Justified, tab is at 9 cm, list stlye –,  0.4 cm before-after spacing, all this is DF.
Applying „Signature-indented” DOES override these.
Similar behavior for all character DF would be desirable.

example #3 has character bold, italic, underline, highlight, color, vertical green border formatting as DF.
Applying „Signature-indented” does not override these.
Comment 3 Gabor Kelemen (allotropia) 2024-08-14 15:17:16 UTC
Created attachment 195824 [details]
The example file before applying the prepared paragraph style
Comment 4 Gabor Kelemen (allotropia) 2024-08-14 15:24:05 UTC
Created attachment 195825 [details]
The example file after applying the prepared paragraph style
Comment 5 Commit Notification 2024-09-23 18:21:05 UTC
Oliver Specht committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a593c27e8897280871dc310184ff568bf34a6ebe

tdf#162326 remove character formats and styles on style apply

It will be available in 25.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Gabor Kelemen (allotropia) 2024-09-27 11:20:24 UTC
One more thing to consider after the patch:

The third paragraph has bullet and numbering set, using an en-dash as custom bullet symbol.

This is not reset to "no bullet and numbering" if I Ctrl-Click on some random paragraph style that has no bullet and numbering style set.

Also if I change the bullet and numbering to something from the dropdown button, like (1), and Ctrl-Click on the Signature-indented style, this is not unset and displayed with the en-dash list style defined in the Signature-indented style.

In Word, the list style from Signature-indented overrides custom bullet&number setting, also applying a style without list setting removes all existing bullet&numbering.
Comment 7 Buovjaga 2024-10-11 11:50:48 UTC
This seems worth it to add to release notes: https://wiki.documentfoundation.org/ReleaseNotes/25.2