Created attachment 158183 [details]
.odt file to illustrate the problem.
The attached document has a default font 'Liberation Serif' but some characters also have the 'Times New Roman' font super-imposed.
The question is "how to remove this super-imposed 'Times New Roman' font?"
The only way I found was to use 'Remove direct formatting' with CTRL-M, but this also remove other formatting like bold, grey shading or superscript.
So you have to re-apply these formatting afterwards.
My suggestion is therefore to allow to remove one specific direct formatting.
Trivial to do using Find & Replace dialog setting a 'Format' value for the Direct Formatting needing a change. Set the replacement with 'Format' value to match the default font & size.
Carefull to only find/replace the formatting, use the Find Next/Previous to be sure you are matching the targets correctly.
QA, this was an enhancement--so status instead => WORKSFORME
I disagree this solves the problem.
It only _replaces_ the font property, but it does not remove it.
To realize it, after you have replaced your font formatting, just replace the font in the default style with another one (e.g. Comic Sans MS).
You will see that the font you have replaced do not follow the new style but follow the font style you have used for replacing.
Moreover, imagine you have a lot of different fonts to replace with the default font. You have to do the exercise for each font. And you have to scan all your document to see which fonts are used in there. If there was a way to remove a font property, you could select all your text with CTRL-A and you do that in e few seconds.
No, you asked for means to remove a single DF. That exists now in GUI (or you can edit the XML content of the ODF directly).
If you have that much work to do to clean up Direct Formatting (DF), it is much better to copy and paste as unformatted text, picking up the assigned paragraph style for the target. And apply text DF or better Character style.
Issues of trying to identify all DF applied to a selection, a paragraph, or to a full document make it very unlikely targeted removal of DF could be implemented effectively.
And this would be an immediate => WF
I am sorry but I am not sure I understand you.
"No, you asked for means to remove a single DF. That exists now in GUI (or you can edit the XML content of the ODF directly)."
Where does it exist in GUI?
For me, "Find and Replace" replaces a direct formatting, but it does not remove it.
I agree there is a bit work to understand what is the best UI to do it and to implement it. But for me this is a needed feature.
To unconfirmed. For UX-advise
I have not issue directly editing the XML (content.xml, styles.xml) from an ODF archive (easier in Flat ODF .fodt).
As noted, the Find/Replace dialog 'Format' will do a replacement 1-1 of font/effect/size-- but there is no replacement Format to revert the found selection's span to a non-DF span.
Would need a 'Format' replace action to actually clear the DF applied to the found span, merging it into the current Paragraph's run. And if the style:name/style:family 'T' direct formatting becomes unused, to clear it from the content XML.
So, guess there is potential to implement.
Thank you for your understanding.
(In reply to V Stuart Foote from comment #6)
> So, guess there is potential to implement.
Question is rather if we want to support single DF removal. The recommended workflow is still to clean up per Remove Direct Formatting and to use character styles (where we have the same problem, see bug 89826).
Guess the issue is mostly related to font names. Why not remove the DF when it fits the PS/CS? Without any UI. Don't we have a request on this?
> The recommended workflow is still to clean up per Remove Direct Formatting and to use character styles
Yes, thank you for bringing this workaround solution.
The 'Format' mode of Find & Replace... dialog seems a reasonable location to accomplish this.
It currently provides a means to find Direct Formatting recorded to text style:name / style:family (the 'T' code) applied to text runs of paragraphs.
It currently provides direct replacement to change the DF of the text run.
What is missing is ability for replacement 'Format' to be 'unformatted', and to simply clear that DF. And to allow the text run to pick up the style assigned to the paragraph (the applied 'P' code).
Same approach, using the Format mode for Find & Replace, might also solve bug 89826 - Allow removal/reset of individual style attributes.
I'm not sure it's a good idea to provide this feature. It may be too much of an encouragement of using complex manual formatting. Frederic, you can just change the font manually to whatever you like. Why should LO "legitimize" a non-style combination of manual formatting? ... or create a style from your multiple manual formatting, and revert to that.
Yes, I agree a way to solve my problem is to use styles instead of any direct formatting.
On the other hand, when you have a big document that uses direct formattings, and you don't want to change all of that to styles, it might be a quicker solution to remove a particular direct formatting.
It happens to me in particular with fonts, it often happens that my document mixes different fonts and that I want to clean that.
It is possible right now to remove all direct formatting, so why not allowing to remove a specific one?
I believe that implementing the proposal published by design team about fine-grained formatting display/control would automatically solve this...
We should implement this per context menu item "Remove" on the Styles Inspector, see bug 135110.
Could be an interesting easy hack. What do you think, Mike?
(In reply to Heiko Tietze from comment #14)
I agree :-)
(In reply to Mike Kaganski from comment #15)
> I agree :-)
Was in hope for code pointer