mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 08:28:25 +00:00
Dissolve CharStyle initial implementation.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20944 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
589170bd4b
commit
1ecd2189f2
@ -140,6 +140,7 @@ Menuset
|
|||||||
End
|
End
|
||||||
|
|
||||||
Menu "edit_textstyles"
|
Menu "edit_textstyles"
|
||||||
|
Item "Dissolve CharStyle" "inset-dissolve charstyle"
|
||||||
CharStyles
|
CharStyles
|
||||||
Elements
|
Elements
|
||||||
Separator
|
Separator
|
||||||
|
@ -1840,7 +1840,13 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case LFUN_INSET_DISSOLVE:
|
case LFUN_INSET_DISSOLVE:
|
||||||
enable = !isMainText(cur.bv().buffer()) && cur.inset().nargs() == 1;
|
if (!cmd.argument().empty()) {
|
||||||
|
InsetLayout il = cur.inset().getLayout(cur.buffer().params());
|
||||||
|
enable = (cur.inset().lyxCode() == FLEX_CODE)
|
||||||
|
&& (il.lyxtype == to_utf8(cmd.argument()));
|
||||||
|
} else
|
||||||
|
enable = !isMainText(cur.bv().buffer())
|
||||||
|
&& cur.inset().nargs() == 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LFUN_CHANGE_ACCEPT:
|
case LFUN_CHANGE_ACCEPT:
|
||||||
|
@ -40,6 +40,8 @@ public:
|
|||||||
InsetFlex(BufferParams const &, InsetLayout);
|
InsetFlex(BufferParams const &, InsetLayout);
|
||||||
///
|
///
|
||||||
docstring name() const { return from_ascii("Flex"); }
|
docstring name() const { return from_ascii("Flex"); }
|
||||||
|
///
|
||||||
|
InsetLayout const & getLayout(BufferParams const &) const { return layout_; }
|
||||||
/// Is this character style defined in the document's textclass?
|
/// Is this character style defined in the document's textclass?
|
||||||
/// May be wrong after textclass change or paste from another document
|
/// May be wrong after textclass change or paste from another document
|
||||||
bool undefined() const;
|
bool undefined() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user