Bug 107914 - .uno:RemoveDirectCharFormats command doesnt seem to work
Summary: .uno:RemoveDirectCharFormats command doesnt seem to work
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Main-Menu
  Show dependency treegraph
 
Reported: 2017-05-17 16:09 UTC by Yousuf Philips (jay) (retired)
Modified: 2017-05-18 13:04 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2017-05-17 16:09:11 UTC
Was thinking to add 'Remove Direct Character Formats' to the Styles menu but it didnt work the way that i thought it would and wondered if anyone know what it does.
Comment 1 Xisco Faulí 2017-05-17 17:07:03 UTC
I think the dev mailing list is the proper place to ask such a question.
Comment 2 Maxim Monastirsky 2017-05-17 17:25:32 UTC
From http://opengrok.libreoffice.org/xref/core/sw/source/core/txtnode/ndtxt.cxx#1273 :

// If positioned exactly at the end of a CharStyle or Hyperlink,
// set its DontExpand flag.


So basically if you put the cursor at the end of a text, this command will make the next text you type not follow the formatting of the former. It doesn't work with selected text.
Comment 3 Yousuf Philips (jay) (retired) 2017-05-17 18:26:28 UTC
(In reply to Maxim Monastirsky from comment #2)
> So basically if you put the cursor at the end of a text, this command will
> make the next text you type not follow the formatting of the former. It
> doesn't work with selected text.

Can this be modified to also work with selected text, or should we create a new UNO command for such a feature?
Comment 4 Regina Henschel 2017-05-17 19:46:19 UTC
(In reply to Yousuf Philips (jay) from comment #3)
> (In reply to Maxim Monastirsky from comment #2)
> > So basically if you put the cursor at the end of a text, this command will
> > make the next text you type not follow the formatting of the former. It
> > doesn't work with selected text.

"Remove Direct Character Formats" has shortcut keys Ctrl+Shift+X. It works.

> 
> Can this be modified to also work with selected text, or should we create a
> new UNO command for such a feature?

Neither modify nor new command. There exists already Ctrl+M for selected text, which calls .uno:ResetAttributes, which is command "Clear" from category "Formatting" in the customize dialog.
Comment 5 Yousuf Philips (jay) (retired) 2017-05-17 21:06:41 UTC
(In reply to Regina Henschel from comment #4)
> Neither modify nor new command. There exists already Ctrl+M for selected
> text, which calls .uno:ResetAttributes, which is command "Clear" from
> category "Formatting" in the customize dialog.

That clears both paragraph and character level direct formatting when selecting an entire paragraph, and we do need a UNO command for clearing only character level direct formatting, which this command does but not for selected text.
Comment 6 Maxim Monastirsky 2017-05-18 11:27:06 UTC
(In reply to Yousuf Philips (jay) from comment #5)
> and we do need a UNO command for clearing
> only character level direct formatting, which this command does but not for
> selected text.
This commands also seems to revert to the default character style, so this is not what we want anyway.
Comment 7 Yousuf Philips (jay) (retired) 2017-05-18 13:04:28 UTC
(In reply to Maxim Monastirsky from comment #6)
> This commands also seems to revert to the default character style, so this
> is not what we want anyway.

True. I guess creating new commands is the right option (bug 78371).