]> git.lyx.org Git - features.git/commitdiff
Revert "Fix the display of column spacing in AMS environments"
authorUwe Stöhr <uwestoehr@lyx.org>
Tue, 19 Jan 2016 22:01:44 +0000 (23:01 +0100)
committerUwe Stöhr <uwestoehr@lyx.org>
Tue, 19 Jan 2016 22:01:44 +0000 (23:01 +0100)
This reverts commit 1676b69cf782112cab7463b4086055f8cf9fe9d2.

src/mathed/InsetMathGrid.cpp
src/mathed/InsetMathGrid.h
src/mathed/InsetMathHull.cpp
src/mathed/InsetMathHull.h
src/mathed/InsetMathSplit.cpp
src/mathed/InsetMathSplit.h

index d8e5925b623cc4266c3a12016bc06384a5f3fee7..00d9a6f20fbf2b2369a976d01edf49a00ef1b9a6 100644 (file)
@@ -486,7 +486,7 @@ void InsetMathGrid::metrics(MetricsInfo & mi, Dimension & dim) const
                colinfo_[col].offset_ =
                        colinfo_[col - 1].offset_ +
                        colinfo_[col - 1].width_ +
-                       displayColSpace(col - 1) +\r
+                       colinfo_[col - 1].skip_ +
                        colsep() +
                        colinfo_[col].lines_ * vlinesep();
        }
@@ -508,7 +508,7 @@ void InsetMathGrid::metrics(MetricsInfo & mi, Dimension & dim) const
                        int const nextoffset =
                                colinfo_[first].offset_ +
                                wid +
-                               displayColSpace(last) +\r
+                               colinfo_[last].skip_ +
                                colsep() +
                                colinfo_[last+1].lines_ * vlinesep();
                        int const dx = nextoffset - colinfo_[last+1].offset_;
@@ -741,7 +741,7 @@ void InsetMathGrid::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
                colinfo_[col].offset_ =
                        colinfo_[col - 1].offset_ +
                        colinfo_[col - 1].width_ +
-                       displayColSpace(col - 1) +\r
+                       colinfo_[col - 1].skip_ +
                        1 ; //colsep() +
                        //colinfo_[col].lines_ * vlinesep();
        }
@@ -953,7 +953,7 @@ int InsetMathGrid::cellWidth(idx_type idx) const
                col_type c2 = c1 + ncellcols(idx);
                return colinfo_[c2].offset_
                        - colinfo_[c1].offset_
-                       - displayColSpace(c2)\r
+                       - colinfo_[c2].skip_
                        - colsep()
                        - colinfo_[c2].lines_ * vlinesep();
        }
@@ -1378,11 +1378,6 @@ char InsetMathGrid::displayColAlign(idx_type idx) const
 }
 
 
-int InsetMathGrid::displayColSpace(col_type col) const\r
-{\r
-       return colinfo_[col].skip_;\r
-}\r
-\r
 void InsetMathGrid::doDispatch(Cursor & cur, FuncRequest & cmd)
 {
        //lyxerr << "*** InsetMathGrid: request: " << cmd << endl;
@@ -1867,32 +1862,5 @@ char InsetMathGrid::colAlign(HullType type, col_type col)
 }\r
 \r
 \r
-//static\r
-int InsetMathGrid::colSpace(HullType type, col_type col)\r
-{\r
-       int alignInterSpace;\r
-       switch (type) {\r
-       case hullEqnArray:\r
-               return 5;\r
-       \r
-       case hullAlign:\r
-               alignInterSpace = 20;\r
-               break;\r
-       case hullAlignAt:\r
-               alignInterSpace = 0;\r
-               break;\r
-       case hullXAlignAt:\r
-               alignInterSpace = 40;\r
-               break;\r
-       case hullXXAlignAt:\r
-       case hullFlAlign:\r
-               alignInterSpace = 60;\r
-               break;\r
-       default:\r
-               return 0;\r
-       }\r
-       return (col % 2) ? alignInterSpace : 0;\r
-}\r
-\r
 \r
 } // namespace lyx
index e99431083eaad9703e35c9929831e94e1d1904d6..6199b7dafc8fef516acaa7934f8e8298dab0ce79 100644 (file)
@@ -261,16 +261,8 @@ protected:
        /// Column alignment for display of cell \p idx.\r
        /// Must not be written to file!
        virtual char displayColAlign(idx_type idx) const;
-       /// Column spacing for display of column \p col.\r
-       /// Must not be written to file!\r
-       virtual int displayColSpace(col_type col) const;\r
-\r
-       // The following two functions are used in InsetMathHull and\r
-       // InsetMathSplit.\r
        /// The value of a fixed col align for a certain hull type \r
        static char colAlign(HullType type, col_type col);\r
-       /// The value of a fixed col spacing for a certain hull type\r
-       static int colSpace(HullType type, col_type col);\r
 
        /// row info.
        /// rowinfo_[nrows()] is a dummy row used only for hlines.
index b6cf474d306791e43058187bf9b7bc775acd68a7..cce029f6cedf25f98b3f3293ac45ea8cb8476974 100644 (file)
@@ -382,13 +382,6 @@ char InsetMathHull::displayColAlign(idx_type idx) const
 }
 
 
-int InsetMathHull::displayColSpace(col_type col) const\r
-{\r
-       return colSpace(type_, col);\r
-}\r
-\r
-\r
-//FIXME: This has probably no effect and can be removed.\r
 int InsetMathHull::defaultColSpace(col_type col)
 {
        if (type_ == hullAlign || type_ == hullAlignAt)
index 084fff67c0590c7daf216c0ecf06b92bf45f06d6..9598ad4281d092497f92acbdb7053e8ed72540b5 100644 (file)
@@ -111,8 +111,6 @@ public:
        ///
        int defaultColSpace(col_type col);
        ///
-       int displayColSpace(col_type col) const;\r
-       ///\r
        char defaultColAlign(col_type col);
        ///
        char displayColAlign(idx_type idx) const;
index 07e78f41a2472713b92225d576e4b459fc79171f..f85e664eefee0647053320b9329cb4c7cf387fe9 100644 (file)
@@ -83,17 +83,6 @@ char InsetMathSplit::displayColAlign(idx_type idx) const
 }\r
 \r
 \r
-int InsetMathSplit::displayColSpace(col_type col) const\r
-{\r
-       if (name_ == "split" || name_ == "aligned" || name_ == "align")\r
-               return colSpace(hullAlign, col);\r
-       if (name_ == "alignedat")\r
-               return colSpace(hullAlignAt, col);\r
-       return 0;\r
-}\r
-\r
-\r
-\r
 void InsetMathSplit::draw(PainterInfo & pi, int x, int y) const
 {
        InsetMathGrid::draw(pi, x, y);
index 0f47e38bf3e41d76b40d13e2c54f53d445f6047c..6136b6faf6806aeb62f7020ed3d098d232018afc 100644 (file)
@@ -41,8 +41,6 @@ public:
        ///
        int defaultColSpace(col_type) { return 0; }
        ///
-       int displayColSpace(col_type col) const;\r
-       ///\r
        char defaultColAlign(col_type);
        ///
        char displayColAlign(idx_type idx) const;\r