]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetcommand.C
ws changes only
[lyx.git] / src / insets / insetcommand.C
index d22818b62a5184dcc7dd2441f2444431d7326761..6eff3dc6a5941a8e09f4711f28b5747cd45ca1e8 100644 (file)
@@ -20,6 +20,8 @@
 
 #include "support/std_sstream.h"
 
+
+using std::string;
 using std::istringstream;
 using std::ostream;
 using std::ostringstream;
@@ -31,12 +33,6 @@ InsetCommand::InsetCommand(InsetCommandParams const & p)
 {}
 
 
-BufferView * InsetCommand::view() const
-{
-       return button_.view();
-}
-
-
 void InsetCommand::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        if (!set_label_) {
@@ -57,9 +53,7 @@ void InsetCommand::draw(PainterInfo & pi, int x, int y) const
 
 void InsetCommand::setParams(InsetCommandParams const & p)
 {
-       p_.setCmdName(p.getCmdName());
-       p_.setContents(p.getContents());
-       p_.setOptions(p.getOptions());
+       p_ = p;
        set_label_ = false;
 }
 
@@ -112,7 +106,7 @@ dispatch_result InsetCommand::localDispatch(FuncRequest const & cmd)
                return localDispatch(FuncRequest(cmd.view(), LFUN_INSET_EDIT));
 
        default:
-               return InsetOld::localDispatch(cmd);
+               return UNDISPATCHED;
        }
 
 }
@@ -133,9 +127,7 @@ string const InsetCommandMailer::inset2string(Buffer const &) const
 void InsetCommandMailer::string2params(string const & in,
                                       InsetCommandParams & params)
 {
-       params.setCmdName(string());
-       params.setContents(string());
-       params.setOptions(string());
+       params = InsetCommandParams();
 
        if (in.empty())
                return;