]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCommand.cpp
Fix use of std::regex_match
[lyx.git] / src / insets / InsetCommand.cpp
index 1d67ad97d95d527aec7907d618b4e6ed01b8c5a2..6d15c6886abf65e5f7b2b7a6176e687ce0e58208 100644 (file)
@@ -60,14 +60,14 @@ namespace lyx {
 // FIXME Would it now be possible to use the InsetCode in
 // place of the mailer name and recover that information?
 InsetCommand::InsetCommand(Buffer * buf, InsetCommandParams const & p)
-       : Inset(buf), p_(p)
+       : Inset(buf), p_(p), broken_(false)
 {}
 
 
 // The sole purpose of this copy constructor is to make sure
 // that the mouse_hover_ map is not copied and remains empty.
 InsetCommand::InsetCommand(InsetCommand const & rhs)
-       : Inset(rhs), p_(rhs.p_)
+       : Inset(rhs), p_(rhs.p_), broken_(false)
 {}
 
 
@@ -80,6 +80,7 @@ InsetCommand & InsetCommand::operator=(InsetCommand const & rhs)
        p_ = rhs.p_;
        mouse_hover_.clear();
        button_ = RenderButton();
+       broken_ = false;
 
        return *this;
 }
@@ -101,7 +102,7 @@ InsetCommand::~InsetCommand()
 void InsetCommand::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        button_.update(screenLabel(), editable() || clickable(*mi.base.bv, 0, 0),
-                      inheritFont());
+                      inheritFont(), broken_);
        button_.metrics(mi, dim);
 }
 
@@ -161,9 +162,9 @@ int InsetCommand::plaintext(odocstringstream & os,
 }
 
 
-int InsetCommand::docbook(odocstream &, OutputParams const &) const
+void InsetCommand::docbook(XMLStream &, OutputParams const &) const
 {
-       return 0;
+       return;
 }
 
 
@@ -345,7 +346,8 @@ bool decodeInsetParam(string const & name, string & data,
        case NOMENCL_PRINT_CODE:
        case REF_CODE:
        case TOC_CODE:
-       case HYPERLINK_CODE: {
+       case HYPERLINK_CODE:
+       case COUNTER_CODE: {
                InsetCommandParams p(code);
                data = InsetCommand::params2string(p);
                break;