Created attachment 159133 [details] file with altered (bold, big) chars In boldNor.odt, 0. cursor after 'a', hit h: 'h' Bold & big, as expected. 1. cursor after 'b', hit ^m (or Format>Clear Direct Formatting), then y: 'y' Normal (not Bold, size 12) —OK. 2. cursor after 'c', hit ^X (ctrl_shift_x; RemoveDirectCharFormats; Tip № 65), then v: 'v' Bold & big (like 'c'), unexpected; ^X did not work. 3. cursor after 'd', hit ^X (as in step2), then p: 'p' Normal (not Bold) —OK. 4. cursor after 'e', hit ^m (as in step2), then q: 'q' Normal (not Bold) —OK. 5. cursor after 'f', hit ^X: nothing happens; hit 'g': g Bold. Word is now 'fgh'. 6. cursor after 'f', hit ^m: 'fgh' becomes Normal, because cursor is inside a word; OK. Conclusion: ^X works only at the end of a parag —steps 2, 3, 5. ^m (Clear Direct Formatting) apparently does the same thing, but better —steps 1, 4, 6. Function RemoveDirectCharFormats can be eliminated.
Stuart, what do you think?
The function remains valid as implemented for OOo (see also i13592), just being misapplied by OP. Review of the control [1] shows it is intended to be applied when positioned at the end of a Paragraph--to prevent the continuation of the Direct Formatting from that point should additional text be added. See no reason to remove, and its writer shell action DontExpandFormat() might be another tool to solve other paste with/without formatting issues. The tip-of-the-day string for it [2] probably needs a tweak--"Typing new paragraph text in..." =-ref-= [1] https://opengrok.libreoffice.org/xref/core/sw/source/uibase/shells/txtattr.cxx?r=a01a5bd9#192 [2] https://opengrok.libreoffice.org/xref/core/cui/inc/tipoftheday.hrc?r=a504ed78#112 { NC_("RID_CUI_TIPOFTHEDAY", "Typing in bold, italics, or underlined in Writer you can continue with the default attributes using just the shortcut %MOD1+Shift+X (remove direct character formats)."), "", "tipoftheday_w.png"},
(In reply to V Stuart Foote from comment #2) > The tip-of-the-day string for it [2] probably needs a tweak... Let's do this. Seth, a job for you?
Customization of .uno:RemoveDirectCharFormats into the toolbar (menu probably too) is possible but not effective. We should block it in sw/sdi/swriter SfxVoidItem RemoveDirectCharFormats FN_REMOVE_DIRECT_CHAR_FORMATS > MenuConfig, ToolBoxConfig And the TotD needs improvement, search cui/inc/tipoftheday.hrc for "Typing in bold, italics, or underlined in Writer".
Bogdan B committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/3c4ee1f180aed4bc09cf8dab2a1101feb0d95fa6 tdf#131688 Improve one tip of the day It will be available in 7.5.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.
Second part of comment 4 is solved. Remains the first part. Heiko, if this is just a half solved job how I should mark the bug?
{ NC_("RID_CUI_TIPOFTHEDAY", "You can continue writing with the default formatting attributes after manually applying bold, italic or underline by pressing %MOD1+Shift+X."), "", "", swriter}, We should probably change it to %MOD1+M here?
We remove this completely: SfxVoidItem RemoveDirectCharFormats FN_REMOVE_DIRECT_CHAR_FORMATS or do we set: AccelConfig MenuConfig ToolBoxConfig just false?
I see X_SHIFT_MOD1 assigned to .uno:RemoveDirectCharFormats in officecfg/registry/data/org/openoffice/Office/Accelerators.xcu. Why do you think it needs to be changed?
I think I misunderstood, I thought we wanted to remove this function and suggest using MOD1 + M instead. So what is left to do?
According comment 4 only your comment 8 is missing. How do you bring ctrl+M into play here?
As I wrote, I thought that we wanted to use Ctrl + M and remove Ctrl + Shift + X, as it was written in comment no. 1, that it works the same but better, so change it also as a tip of the day for the user. We only change MenuConfig and ToolBoxConfig to false? https://gerrit.libreoffice.org/c/core/+/167164
(In reply to Jakub Kościelak from comment #12) > ...as it was written in comment no. 1 (In reply to TorrAB from comment #0) > Conclusion: ^X works only at the end of a parag —steps 2, 3, 5. ^m (Clear > Direct Formatting) apparently does the same thing, but better... FN_REMOVE_DIRECT_CHAR_FORMATS runs SwTextNode::DontExpandFormat() while FN_FORMAT_RESET boils down to ImpEditEngine::RemoveCharAttribs(). It's a whole chain of processing with the only obvious difference that one keeps the language. I'm afraid of removing one. The ultimate question is whether ctrl+M is easier to use than shift+ctrl+X (I agree) and if we should advertise ctrl+M in the TotD and probably hide the other command from users. If so, you should set all *CONFIG flags to false (see bug 147411) and remove the assignmemt of .uno:RemoveDirectCharFormats to X_SHIFT_MOD1 in officecfg/registry/data/org/openoffice/Office/Accelerators.xcu (but first check if the command in other modules work differently). Is it worth all the effort? (But thanks for taking care anyway, Jakub!)
I think Ctrl + M is easier to use and we should advertise it in TotD. Some people probably use this second, longer command, so I guess we can't remove it. Can we calmly? Hiding is not an option due to the bug, right? The command is either everywhere or nowhere, did I understand correctly?
(In reply to Jakub Kościelak from comment #14) > I think Ctrl + M is easier to use and we should advertise it in TotD. Some > people probably use this second, longer command, so I guess we can't remove > it. Can we calmly? Hiding is not an option due to the bug, right? The > command is either everywhere or nowhere, did I understand correctly? Don't know what happens if a command is assigned to a shortcut and the customization is removed later. Guess it still works. Easy to test :-)
No more comments, let's remove the shift+ctrl+x accelerator, and update the TotD. Do you still want to volunteer, Jakub?
With pleasure. I will deal with it within 2-3 days.
kubak committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/2769feccbf026dd318c4afa08ba3692f287d7c5d tdf#131688 - RemoveDirectCharFormats <Ctrl>+<Shift>+X usage tip 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.
kubak committed a patch related to this issue. It has been pushed to "libreoffice-24-8": https://git.libreoffice.org/core/commit/c4db8f604306bd526c2564baef65bcfe03d27a2b tdf#131688 - RemoveDirectCharFormats <Ctrl>+<Shift>+X usage tip It will be available in 24.8.0.0.beta2. 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.