X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetLabel.cpp;h=6f006a1288160d508d41bc0f50ed9b66dc68a33c;hb=142caff8336c54627606c09d3ce5bb7de7a8adb6;hp=2393bbc8cffdeee37ee971394414b49ab452d48e;hpb=377cdd5f6cc2dd67fabd0b03703d20722a9ed0ea;p=lyx.git diff --git a/src/insets/InsetLabel.cpp b/src/insets/InsetLabel.cpp index 2393bbc8cf..6f006a1288 100644 --- a/src/insets/InsetLabel.cpp +++ b/src/insets/InsetLabel.cpp @@ -99,8 +99,8 @@ void InsetLabel::updateCommand(docstring const & new_label, bool updaterefs) buffer().undo().endUndoGroup(); // We need an update of the Buffer reference cache. This is achieved by - // updateLabels(). - buffer().updateLabels(); + // updateBuffer(). + buffer().updateBuffer(); } @@ -108,7 +108,8 @@ ParamInfo const & InsetLabel::findInfo(string const & /* cmdName */) { static ParamInfo param_info_; if (param_info_.empty()) - param_info_.add("name", ParamInfo::LATEX_REQUIRED); + param_info_.add("name", ParamInfo::LATEX_REQUIRED, + ParamInfo::HANDLING_ESCAPE); return param_info_; } @@ -119,7 +120,7 @@ docstring InsetLabel::screenLabel() const } -void InsetLabel::updateLabels(ParIterator const & par, UpdateType utype) +void InsetLabel::updateBuffer(ParIterator const & par, UpdateType utype) { docstring const & label = getParam("name"); if (buffer().insetLabel(label)) { @@ -176,7 +177,7 @@ bool InsetLabel::getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & status) const { bool enabled; - switch (cmd.action) { + switch (cmd.action()) { case LFUN_LABEL_INSERT_AS_REF: case LFUN_LABEL_COPY_AS_REF: enabled = true; @@ -192,7 +193,7 @@ bool InsetLabel::getStatus(Cursor & cur, FuncRequest const & cmd, void InsetLabel::doDispatch(Cursor & cur, FuncRequest & cmd) { - switch (cmd.action) { + switch (cmd.action()) { case LFUN_INSET_MODIFY: { InsetCommandParams p(LABEL_CODE); @@ -230,13 +231,6 @@ void InsetLabel::doDispatch(Cursor & cur, FuncRequest & cmd) } -int InsetLabel::latex(odocstream & os, OutputParams const &) const -{ - os << escape(getCommand()); - return 0; -} - - int InsetLabel::plaintext(odocstream & os, OutputParams const &) const { docstring const str = getParam("name");