]> git.lyx.org Git - features.git/commitdiff
mathed37.diff
authorLars Gullik Bjønnes <larsbj@gullik.org>
Thu, 1 Mar 2001 15:33:22 +0000 (15:33 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Thu, 1 Mar 2001 15:33:22 +0000 (15:33 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1652 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/math_macro.C
src/mathed/math_macro.h
src/mathed/math_macroarg.C
src/mathed/math_macroarg.h
src/mathed/math_macrotemplate.C

index ca40c21d96a648f3aa34a61e8003f8c43a1a85be..b05140d470ca6903cb311f56a1b9bbc1c8e6c946 100644 (file)
@@ -56,28 +56,6 @@ MathMacro::MathMacro(boost::shared_ptr<MathMacroTemplate> 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<MacroArgumentBase>::const_iterator cit = m.args_.begin();
-       std::vector<MacroArgumentBase>::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);
index 0e8429eebc4af946196a8285ff9b3529de93ef8f..d5d519123b02407db00abfeeda331b4a444a2b48 100644 (file)
@@ -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<MathMacroTemplate> const &);
-       /// or from another macro.
-       explicit
-       MathMacro(MathMacro const &);
        ///
        void draw(Painter &, int, int);
        ///
index 87670660746fa44c82aaf1ccdaad534706921c3d..b8d4c8b927da19bb485a71c2d5ad86364b7dd91e 100644 (file)
@@ -29,12 +29,6 @@ MathedInset * MathMacroArgument::Clone()
 }
 
 
-void MathMacroArgument::setNumber(int n)
-{
-       number_ = n;
-}
-
-
 void MathMacroArgument::setExpand(bool e)
 {
        expnd_mode_ = e;
index 83a830f1ba10408bb5dc1ac40be16a74625ed6a4..b12e9e85035f068d4b183a379db2971e1d476527 100644 (file)
@@ -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
index 5f03561647d7158cecd0a6739b6db697f6da7ed7..418fca2b7a90fc3f0929a27c97c70dc16477f52b 100644 (file)
@@ -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;