]> git.lyx.org Git - lyx.git/blobdiff - src/tabular.C
Fix #1736
[lyx.git] / src / tabular.C
index 73850324109eef5ec9a14a0a2617bbb53fd6f509..34f3e1927379452a96c06c1901b22a470dd5a9e2 100644 (file)
@@ -1126,7 +1126,7 @@ void LyXTabular::write(Buffer const & buf, ostream & os) const
                           << ">\n";
                        os << "\\begin_inset ";
                        cell_info[i][j].inset.write(buf, os);
-                       os << "\n\\end_inset \n"
+                       os << "\n\\end_inset\n"
                           << "</cell>\n";
                }
                os << "</row>\n";
@@ -2215,9 +2215,7 @@ int LyXTabular::docbookRow(Buffer const & buf, ostream & os, int row,
                }
 
                os << '>';
-               OutputParams runp = runparams;
-               runp.mixed_content = true;
-               ret += getCellInset(cell).docbook(buf, os, runp);
+               ret += getCellInset(cell).docbook(buf, os, runparams);
                os << "</entry>\n";
                ++cell;
        }
@@ -2341,7 +2339,8 @@ int LyXTabular::asciiTopHLine(ostream & os, int row,
                }
                int column = column_of_cell(i);
                int len = clen[column];
-               while (isPartOfMultiColumn(row, ++column))
+               while (column < columns_ - 1
+                      && isPartOfMultiColumn(row, ++column))
                        len += clen[column] + 4;
                os << string(len, ch);
                if (topLine(i)) {
@@ -2388,7 +2387,8 @@ int LyXTabular::asciiBottomHLine(ostream & os, int row,
                }
                int column = column_of_cell(i);
                int len = clen[column];
-               while (isPartOfMultiColumn(row, ++column))
+               while (column < columns_ -1
+                      && isPartOfMultiColumn(row, ++column))
                        len += clen[column] + 4;
                os << string(len, ch);
                if (bottomLine(i)) {
@@ -2426,7 +2426,8 @@ int LyXTabular::asciiPrintCell(Buffer const & buf, ostream & os,
 
        unsigned int len1 = sstr.str().length();
        unsigned int len2 = clen[column];
-       while (isPartOfMultiColumn(row, ++column))
+       while (column < columns_ -1
+              && isPartOfMultiColumn(row, ++column))
                len2 += clen[column] + 4;
        len2 -= len1;