From: Lars Gullik Bjønnes Date: Thu, 1 Mar 2001 15:33:22 +0000 (+0000) Subject: mathed37.diff X-Git-Tag: 1.6.10~21538 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=b4298493067753feab3737264ee76cd0cfe16598;p=features.git mathed37.diff git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1652 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/math_macro.C b/src/mathed/math_macro.C index ca40c21d96..b05140d470 100644 --- a/src/mathed/math_macro.C +++ b/src/mathed/math_macro.C @@ -56,28 +56,6 @@ MathMacro::MathMacro(boost::shared_ptr const & t) } -MathMacro::MathMacro(MathMacro const & m) - : MathParInset(LM_ST_TEXT, m.GetName(), LM_OT_MACRO), - tmplate_(m.tmplate_), idx_(0) -{ - nargs_ = tmplate_->getNoArgs(); - tcode_ = tmplate_->getTCode(); - SetName(tmplate_->GetName()); - - std::vector::const_iterator cit = m.args_.begin(); - std::vector::const_iterator end = m.args_.end(); - - //args_.resize(nargs_); - //for (int i = 0; i < tmplate_->getNoArgs(); ++i) { - // args_[i].row = m->args_[i].row; - // args_[i].array = m->args_[i].array; - //} - for (; cit != end; ++cit) { - args_.push_back(*cit); - } -} - - MathedInset * MathMacro::Clone() { return new MathMacro(*this); diff --git a/src/mathed/math_macro.h b/src/mathed/math_macro.h index 0e8429eebc..d5d519123b 100644 --- a/src/mathed/math_macro.h +++ b/src/mathed/math_macro.h @@ -35,12 +35,9 @@ class MathMacroTemplate; */ class MathMacro : public MathParInset { public: - /// A macro can only be builded from an existing template + /// A macro can only be built from an existing template explicit MathMacro(boost::shared_ptr const &); - /// or from another macro. - explicit - MathMacro(MathMacro const &); /// void draw(Painter &, int, int); /// diff --git a/src/mathed/math_macroarg.C b/src/mathed/math_macroarg.C index 8767066074..b8d4c8b927 100644 --- a/src/mathed/math_macroarg.C +++ b/src/mathed/math_macroarg.C @@ -29,12 +29,6 @@ MathedInset * MathMacroArgument::Clone() } -void MathMacroArgument::setNumber(int n) -{ - number_ = n; -} - - void MathMacroArgument::setExpand(bool e) { expnd_mode_ = e; diff --git a/src/mathed/math_macroarg.h b/src/mathed/math_macroarg.h index 83a830f1ba..b12e9e8503 100644 --- a/src/mathed/math_macroarg.h +++ b/src/mathed/math_macroarg.h @@ -26,8 +26,6 @@ public: void draw(Painter &, int x, int baseline); /// void Write(std::ostream &, bool fragile); - /// - void setNumber(int n); /// Is expanded or not void setExpand(bool e); /// Is expanded or not diff --git a/src/mathed/math_macrotemplate.C b/src/mathed/math_macrotemplate.C index 5f03561647..418fca2b7a 100644 --- a/src/mathed/math_macrotemplate.C +++ b/src/mathed/math_macrotemplate.C @@ -20,9 +20,8 @@ MathMacroTemplate::MathMacroTemplate(string const & nm, int na): { if (nargs_ > 0) { tcode_ = LM_TC_ACTIVE_INSET; - args_.resize(nargs_); for (int i = 0; i < nargs_; ++i) { - args_[i].setNumber(i + 1); + args_.push_back(MathMacroArgument(i + 1)); } } else { tcode_ = LM_TC_INSET;