]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetLabel.cpp
InsetBox.cpp: only shaded boxes can have multiple paragraphs when there is no inner box
[lyx.git] / src / insets / InsetLabel.cpp
index 2393bbc8cffdeee37ee971394414b49ab452d48e..6f006a1288160d508d41bc0f50ed9b66dc68a33c 100644 (file)
@@ -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");