]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetcommand.C
Enable the external inset to handle unknown templates gracefully.
[lyx.git] / src / insets / insetcommand.C
index 37d321b6206be8479f7b0d2e12db65d1243560e9..9b2e873ee470ddc7c84728cdfaddc728e083bb2c 100644 (file)
 using std::ostream;
 
 
-InsetCommand::InsetCommand(InsetCommandParams const & p, bool)
+InsetCommand::InsetCommand(InsetCommandParams const & p)
        : p_(p.getCmdName(), p.getContents(), p.getOptions())
 {}
 
 
+InsetCommand::InsetCommand(InsetCommand const & ic)
+       : p_(ic.p_)
+{
+}
+
+
 void InsetCommand::setParams(InsetCommandParams const & p)
 {
        p_.setCmdName(p.getCmdName());
@@ -39,8 +45,8 @@ void InsetCommand::setParams(InsetCommandParams const & p)
 }
 
 
-int InsetCommand::latex(Buffer const *, ostream & os, LatexRunParams const &,
-                       bool /*fragile*/, bool/*fs*/) const
+int InsetCommand::latex(Buffer const *, ostream & os,
+                       LatexRunParams const &) const
 {
        os << getCommand();
        return 0;
@@ -67,7 +73,6 @@ int InsetCommand::docbook(Buffer const *, ostream &, bool) const
 
 dispatch_result InsetCommand::localDispatch(FuncRequest const & cmd)
 {
-       lyxerr << "InsetCommand::localDispatch: " << cmd.action << "\n";
        switch (cmd.action) {
        case LFUN_INSET_MODIFY: {
                InsetCommandParams p;
@@ -115,7 +120,7 @@ void InsetCommandMailer::string2params(string const & in,
 
        if (in.empty())
                return;
-       
+
        istringstream data(STRCONV(in));
        LyXLex lex(0,0);
        lex.setStream(data);