]> git.lyx.org Git - lyx.git/blobdiff - src/tabular.C
more code in the menu backend == less code in the menu frontends; add support for...
[lyx.git] / src / tabular.C
index ef80cf2c7a248b391a75e0ea3ea2919b37686dd8..00dbed5f197745582287b880a90cb3f13eab7901 100644 (file)
 
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
 // temporary until verified (08/08/2001 Jug)
 #define SPECIAL_COLUM_HANDLING 1
 
@@ -101,7 +97,7 @@ LyXTabular::columnstruct::columnstruct()
 }
 
 
-LyXTabular::lttype::lttype()
+LyXTabular::ltType::ltType()
 {
        topDL = false;
        bottomDL = false;
@@ -157,7 +153,7 @@ LyXTabular::LyXTabular(Buffer const * buf, InsetTabular * inset, LyXLex & lex)
 LyXTabular & LyXTabular::operator=(LyXTabular const & lt)
 {
 #if 0
-#warning This while method should look like this: (Lgb)
+#warning This whole method should look like this: (Lgb)
 
                LyXTabular tmp(lt);
                tmp.swap(*this);
@@ -270,7 +266,9 @@ void LyXTabular::AppendRow(BufferParams const & bp, int cell)
        cell_info = c_info;
        ++row;
        for (int j = 0; j < columns_; ++j) {
-               cell_info[row][j].inset.clear();
+               cell_info[row][j].inset.clear(false);
+               if (bp.tracking_changes)
+                       cell_info[row][j].inset.markNew(true);
        }
 #endif
        Reinit();
@@ -321,8 +319,9 @@ void LyXTabular::AppendColumn(BufferParams const & bp, int cell)
        cell_info = c_info;
        //++column;
        for (int i = 0; i < rows_; ++i) {
-               //cell_info[i][column].inset.clear();
-               cell_info[i][column + 1].inset.clear();
+               cell_info[i][column + 1].inset.clear(false);
+               if (bp.tracking_changes)
+                       cell_info[i][column + 1].inset.markNew(true);
        }
        Reinit();
 }
@@ -510,7 +509,7 @@ bool LyXTabular::RightLine(int cell, bool onlycolumn) const
 }
 
 
-bool LyXTabular::TopAlreadyDrawed(int cell) const
+bool LyXTabular::topAlreadyDrawn(int cell) const
 {
        int row = row_of_cell(cell);
        if ((row > 0) && !GetAdditionalHeight(row)) {
@@ -529,7 +528,7 @@ bool LyXTabular::TopAlreadyDrawed(int cell) const
 }
 
 
-bool LyXTabular::LeftAlreadyDrawed(int cell) const
+bool LyXTabular::leftAlreadyDrawn(int cell) const
 {
        int column = column_of_cell(cell);
        if (column > 0) {
@@ -1555,7 +1554,7 @@ void LyXTabular::SetMultiColumn(Buffer const * buffer, int cell, int number)
                cellinfo_of_cell(cell+i)->multicolumn = CELL_PART_OF_MULTICOLUMN;
                cellinfo_of_cell(cell)->inset.appendParagraphs(buffer->params,
                        cellinfo_of_cell(cell+i)->inset.paragraph());
-               cellinfo_of_cell(cell+i)->inset.clear();
+               cellinfo_of_cell(cell+i)->inset.clear(false);
        }
 #else
        for (number--; number > 0; --number) {
@@ -2246,17 +2245,22 @@ int LyXTabular::latex(Buffer const * buf,
                        if (column_info[i].left_line)
                                os << '|';
                        if (!column_info[i].p_width.zero()) {
-                         switch (column_info[i].alignment) {
-                         case LYX_ALIGN_LEFT:
-                           os << ">{\\raggedright}";
-                           break;
-                         case LYX_ALIGN_RIGHT:
-                           os << ">{\\raggedleft}";
-                           break;
-                         case LYX_ALIGN_CENTER:
-                           os << ">{\\centering}";
-                           break;
-                         }
+                               switch (column_info[i].alignment) {
+                               case LYX_ALIGN_LEFT:
+                                       os << ">{\\raggedright}";
+                                       break;
+                               case LYX_ALIGN_RIGHT:
+                                       os << ">{\\raggedleft}";
+                                       break;
+                               case LYX_ALIGN_CENTER:
+                                       os << ">{\\centering}";
+                                       break;
+                               case LYX_ALIGN_NONE:
+                               case LYX_ALIGN_BLOCK:
+                               case LYX_ALIGN_LAYOUT:
+                               case LYX_ALIGN_SPECIAL:
+                                       break;
+                               }
 
                                switch (column_info[i].valignment) {
                                case LYX_VALIGN_TOP: