InsetTabular.cpp: check for top and bottom lines, fixes http://bugzilla.lyx.org/show_bug.cgi?id=4554

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23011 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2008-02-15 00:28:42 +00:00
parent f647ae9e8a
commit c9329d272b

View File

@ -1962,7 +1962,7 @@ int Tabular::TeXTopHLine(odocstream & os, row_type row) const
if (topLine(i))
++tmp;
}
if (use_booktabs && row == 0) {
if (use_booktabs && row == 0 && topLine(row)) {
os << "\\toprule ";
} else if (tmp == n - fcell) {
os << (use_booktabs ? "\\midrule " : "\\hline ");
@ -1998,7 +1998,7 @@ int Tabular::TeXBottomHLine(odocstream & os, row_type row) const
if (bottomLine(i))
++tmp;
}
if (use_booktabs && row == rowCount() - 1) {
if (use_booktabs && row == rowCount() - 1 && bottomLine(row)) {
os << "\\bottomrule";
} else if (tmp == n - fcell) {
os << (use_booktabs ? "\\midrule" : "\\hline");