]> git.lyx.org Git - features.git/commitdiff
fix for recent 'column shift' bug
authorAndré Pönitz <poenitz@gmx.net>
Fri, 10 Aug 2001 13:50:42 +0000 (13:50 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Fri, 10 Aug 2001 13:50:42 +0000 (13:50 +0000)
perhaps fix for g++3.0 compile problem

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2486 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/math_accentinset.C [deleted file]
src/mathed/math_accentinset.h [deleted file]
src/mathed/math_gridinset.C
src/mathed/math_matrixinset.C
src/mathed/math_sizeinset.C
src/mathed/math_sizeinset.h

diff --git a/src/mathed/math_accentinset.C b/src/mathed/math_accentinset.C
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/src/mathed/math_accentinset.h b/src/mathed/math_accentinset.h
deleted file mode 100644 (file)
index e69de29..0000000
index 1e2b6a158ea8958fdda1582231f4c15d346ba5d2..4f86b4be7af4a9491466791d56923f85bfd12642 100644 (file)
@@ -251,7 +251,7 @@ string MathGridInset::eolString(int row) const
        if (row == nrows() - 1) 
                return "";
 
-       if (rowinfo_[row].skip_ != LyXLength())
+       if (rowinfo_[row].skip_.value() != 0)
                return "\\\\[" + rowinfo_[row].skip_.asLatexString() + "]\n";
 
        // make sure an upcoming '[' does not break anything
index 30b38627c6e7393a4e4eb1a4826a46777f3e96eb..d0f082e8f3da908780b3c7505ec0ea773f098b0e 100644 (file)
@@ -142,8 +142,8 @@ void MathMatrixInset::write(std::ostream & os, bool fragile) const
 
        for (int row = 0; row < nrows(); ++row) {
                for (int col = 0; col < ncols(); ++col) {
-                       os << eocString(col);
                        cell(index(row, col)).write(os, fragile);
+                       os << eocString(col);
                }
                if (n) {
                        if (!label_[row].empty())
index 37a19b2aec5e03a3f46a94c57c5b77ed91f5d64b..8587e570479198cd474c7dce735cfe57e29a9308 100644 (file)
@@ -3,30 +3,15 @@
 #endif
 
 #include "math_sizeinset.h"
+#include "math_parser.h"
 #include "support/LOstream.h"
 
 
-MathSizeInset::MathSizeInset(MathStyles st)
-       : MathNestInset(1), style_(st)
+MathSizeInset::MathSizeInset(latexkeys const * l)
+       : MathNestInset(1), key_(l)
 {}
 
 
-char const * MathSizeInset::name() const
-{
-       switch (style_) {
-               case LM_ST_DISPLAY:
-                       return "displaystyle";
-               case LM_ST_TEXT:
-                       return "textstyle";
-               case LM_ST_SCRIPT:
-                       return "scriptstyle";
-               case LM_ST_SCRIPTSCRIPT:
-                       return "scriptscriptstyle";
-       }
-       return "unknownstyle";
-}
-
-
 MathInset * MathSizeInset::clone() const
 {
        return new MathSizeInset(*this);
@@ -43,7 +28,7 @@ void MathSizeInset::draw(Painter & pain, int x, int y) const
 
 void MathSizeInset::metrics(MathStyles /* st */) const
 {
-       xcell(0).metrics(style_);
+       xcell(0).metrics(MathStyles(key_->id));
        ascent_   = xcell(0).ascent_;
        descent_  = xcell(0).descent_;
        width_    = xcell(0).width_;
@@ -52,7 +37,7 @@ void MathSizeInset::metrics(MathStyles /* st */) const
 
 void MathSizeInset::write(std::ostream & os, bool fragile) const
 {
-       os << "{\\" << name() << " ";
+       os << "{\\" << key_->name << " ";
        cell(0).write(os, fragile);
        os << "}";
 }
@@ -60,7 +45,7 @@ void MathSizeInset::write(std::ostream & os, bool fragile) const
 
 void MathSizeInset::writeNormal(std::ostream & os) const
 {
-       os << "[" << name() << " ";
+       os << "[" << key_->name << " ";
        cell(0).writeNormal(os);
        os << "]";
 }
index 15f2b1d031fca6c4a39dc64c4f8123249e7f74f6..c72ce5e64e1f88124fce95bb8132d0278c38c9ad 100644 (file)
 #endif
 
 /** An inset for \scriptsize etc
-    \author André Poenitz
+    \author André Pönitz
 */
 
+class latexkeys;
+
 class MathSizeInset : public MathNestInset {
 public:
        ///
-       explicit MathSizeInset(MathStyles st);
+       explicit MathSizeInset(latexkeys const * l);
        ///
        MathInset * clone() const;
        ///
@@ -29,10 +31,8 @@ public:
        void writeNormal(std::ostream &) const;
 
 private:
-       ///
-       char const * name() const;
        /// 
-       MathStyles style_;
+       latexkeys const * key_;
 };
 
 #endif