]> git.lyx.org Git - features.git/commitdiff
make 'swap row' swap labels, too.
authorAndré Pönitz <poenitz@gmx.net>
Mon, 6 Oct 2003 09:57:03 +0000 (09:57 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Mon, 6 Oct 2003 09:57:03 +0000 (09:57 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7859 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/math_charinset.C
src/mathed/math_gridinset.C
src/mathed/math_hullinset.C
src/mathed/math_hullinset.h
src/mathed/math_support.C

index b8aa90f030cec6ce639b90538a8e77c8ffdbc985..50263400310b087d760266dbaa6187f7bc304832 100644 (file)
 #include <config.h>
 
 #include "math_charinset.h"
-#include "dimension.h"
 #include "math_support.h"
 #include "math_mathmlstream.h"
+
+#include "debug.h"
+#include "dimension.h"
 #include "textpainter.h"
 
 using std::auto_ptr;
index 1b9e34db05464e00b0ee2b473178c187528a0050..04435c235acd2ed0f78b8ca08ea75353f00289a4 100644 (file)
@@ -1169,7 +1169,7 @@ dispatch_result MathGridInset::dispatch
                                for (row_type r = 0; r < numrows; ++r) {
                                        for (col_type c = 0; c < numcols; ++c) {
                                                idx_type i = index(r + row(idx), c + col(idx));
-                                               cell(i).append(grid.cell(grid.index(r, c)));
+                                               cell(i).insert(0, grid.cell(grid.index(r, c)));
                                        }
                                        // append the left over horizontal cells to the last column
                                        idx_type i = index(r + row(idx), ncols() - 1);
index 05427f6554ee21ca8b9470c9cec934b3dabd590d..5c376e051cd86f9c1f25f75adf46bb28d2af8fe1 100644 (file)
@@ -175,7 +175,6 @@ char const * MathHullInset::standardFont() const
 {
        if (type_ == "none")
                return "lyxnochange";
-       lyxerr << "standard font: mathnormal\n";
        return "mathnormal";
 }
 
@@ -433,6 +432,18 @@ void MathHullInset::addRow(row_type row)
 }
 
 
+void MathHullInset::swapRow(row_type row)
+{
+       if (nrows() == 1)
+               return;
+       if (row + 1 == nrows())
+               --row;
+       std::swap(nonum_[row], nonum_[row + 1]);
+       std::swap(label_[row], label_[row + 1]);
+       MathGridInset::swapRow(row);
+}
+
+
 void MathHullInset::delRow(row_type row)
 {
        if (nrows() <= 1)
index 4de81929c1c8ad77a469654b17683f4a356f99c1..22b108da3380e7d7258d1e53b47c8c085c14bdcd 100644 (file)
@@ -66,6 +66,8 @@ public:
        void addRow(row_type row);
        /// delete a row
        void delRow(row_type row);
+       ///
+       void swapRow(row_type row);
        /// add a column
        void addCol(col_type col);
        /// delete a column
index b1844f1c3040c47ee4c27ab2a4f515b864fc452a..e8291db742112efb3c1f425f947ff5994650df24 100644 (file)
@@ -533,7 +533,7 @@ LyXFont::FONT_SHAPE  const inh_shape  = LyXFont::INHERIT_SHAPE;
 // does not work
 fontinfo fontinfos[] = {
        // math fonts
-       {"mathnormal",    inh_family, LyXFont::MEDIUM_SERIES,
+       {"mathnormal",    LyXFont::ROMAN_FAMILY, LyXFont::MEDIUM_SERIES,
                          LyXFont::ITALIC_SHAPE, LColor::math},
        {"mathbf",        inh_family, LyXFont::BOLD_SERIES,
                          inh_shape, LColor::math},
@@ -542,7 +542,7 @@ fontinfo fontinfos[] = {
        {"mathfrak",      LyXFont::EUFRAK_FAMILY, inh_series,
                          inh_shape, LColor::math},
        {"mathrm",        LyXFont::ROMAN_FAMILY, inh_series,
-                         inh_shape, LColor::math},
+                         LyXFont::UP_SHAPE, LColor::math},
        {"mathsf",        LyXFont::SANS_FAMILY, inh_series,
                          inh_shape, LColor::math},
        {"mathbb",        LyXFont::MSB_FAMILY, inh_series,
@@ -598,15 +598,13 @@ fontinfo fontinfos[] = {
 
        // LyX internal usage
        {"lyxtex",        inh_family, inh_series,
-                         inh_shape, LColor::latex},
+                         LyXFont::UP_SHAPE, LColor::latex},
        {"lyxert",        LyXFont::TYPEWRITER_FAMILY, inh_series,
-                         inh_shape, LColor::latex},
+                         LyXFont::UP_SHAPE, LColor::latex},
        {"lyxsymbol",     LyXFont::SYMBOL_FAMILY, inh_series,
                          inh_shape, LColor::math},
        {"lyxboldsymbol", LyXFont::SYMBOL_FAMILY, LyXFont::BOLD_SERIES,
                          inh_shape, LColor::math},
-       {"lyxitsymbol",   LyXFont::SYMBOL_FAMILY, inh_series,
-                    LyXFont::ITALIC_SHAPE, LColor::math},
        {"lyxblacktext",  LyXFont::ROMAN_FAMILY, LyXFont::MEDIUM_SERIES,
                     LyXFont::UP_SHAPE, LColor::foreground},
        {"lyxnochange",   inh_family, inh_series,