]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetTabular.cpp
Fix multicolumn output.
[lyx.git] / src / insets / InsetTabular.cpp
index 9d2bc33fd1de1374c7a185384bb3abf97389b4ac..eaa2f94e19a797bbf626e0f21246c67cd0b29c0e 100644 (file)
@@ -2636,26 +2636,6 @@ int Tabular::docbook(odocstream & os, OutputParams const & runparams) const
 docstring Tabular::xhtmlRow(XHTMLStream & xs, row_type row,
                           OutputParams const & runparams) const
 {
-       /* for (col_type i = 0; i < column_info.size(); ++i) {
-               os << "<colspec colname=\"col" << i << "\" align=\"";
-               switch (column_info[i].alignment) {
-               case LYX_ALIGN_LEFT:
-                       os << "left";
-                       break;
-               case LYX_ALIGN_RIGHT:
-                       os << "right";
-                       break;
-               default:
-                       os << "center";
-                       break;
-               }
-               os << '"';
-               if (runparams.flavor == OutputParams::XML)
-                       os << '/';
-               os << ">\n";
-               ++ret;
-       } */
-       
        docstring ret;
        idx_type cell = getFirstCellInRow(row);
 
@@ -2692,7 +2672,7 @@ docstring Tabular::xhtmlRow(XHTMLStream & xs, row_type row,
                attr << "'";
 
                if (isMultiColumn(cell))
-                       attr << " colspan='" << j + columnSpan(cell) - 1<< "'";
+                       attr << " colspan='" << columnSpan(cell) << "'";
 
                xs << StartTag("td", attr.str());
                ret += cellInset(cell)->xhtml(xs, runparams);