From: Juergen Spitzmueller Date: Tue, 13 Aug 2019 17:29:39 +0000 (+0200) Subject: fix midrule calculation X-Git-Tag: lyx-2.4.0dev-acb2ca7b~1611 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=5621c121357bb055499234fd91207b7ea6deda51;p=features.git fix midrule calculation --- diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index 19a0498f4e..4adfce8bc5 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -2448,7 +2448,7 @@ void Tabular::TeXTopHLine(otexstream & os, row_type row, string const & lang, trim = "l"; string const firstcol = convert(c + 1 + offset); col_type cstart = c; - for ( ; c < ncols() - 1 && topline.find(c)->second ; ++c) { + for ( ; c < ncols() && topline.find(c)->second ; ++c) { if (isMultiColumn(cellIndex(row, c)) && c < ncols() - 1 && isPartOfMultiColumn(row, c + 1)) continue; @@ -2465,7 +2465,7 @@ void Tabular::TeXTopHLine(otexstream & os, row_type row, string const & lang, for (col_type j = cstart ; j < c ; ++j) if (column_info[j].alignment == LYX_ALIGN_DECIMAL) ++offset; - col_type const lastcol = c + 1 + offset; + col_type const lastcol = c + offset; if (toprtrims.find(c) != toprtrims.end() && toprtrims.find(c)->second) trim += "r"; @@ -2577,7 +2577,7 @@ void Tabular::TeXBottomHLine(otexstream & os, row_type row, string const & lang, trim = "l"; string const firstcol = convert(c + 1 + offset); col_type cstart = c; - for ( ; c < ncols() - 1 && bottomline.find(c)->second ; ++c) { + for ( ; c < ncols() && bottomline.find(c)->second ; ++c) { if (isMultiColumn(cellIndex(row, c)) && c < ncols() - 1 && isPartOfMultiColumn(row, c + 1)) @@ -2595,7 +2595,7 @@ void Tabular::TeXBottomHLine(otexstream & os, row_type row, string const & lang, for (col_type j = cstart ; j < c ; ++j) if (column_info[j].alignment == LYX_ALIGN_DECIMAL) ++offset; - col_type const lastcol = c + 1 + offset; + col_type const lastcol = c + offset; if (bottomrtrims.find(c) != bottomrtrims.end() && bottomrtrims.find(c)->second) trim += "r";