]> git.lyx.org Git - features.git/commitdiff
* src/insets/InsetTabular.cpp:
authorJürgen Spitzmüller <spitz@lyx.org>
Fri, 15 Feb 2008 11:36:05 +0000 (11:36 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Fri, 15 Feb 2008 11:36:05 +0000 (11:36 +0000)
- fix check for top- and bottomlines (rev. 23011).
  topLine and bottomLine take a cell argument, not a row.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23020 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetTabular.cpp

index daa25763fb784a96da123deaa16e47f206078bcf..f89c8211902b1ea976cf87edd2e67193040a92b7 100644 (file)
@@ -1962,8 +1962,9 @@ int Tabular::TeXTopHLine(odocstream & os, row_type row) const
                if (topLine(i))
                        ++tmp;
        }
-       if (use_booktabs && row == 0 && topLine(row)) {
-               os << "\\toprule ";
+       if (use_booktabs && row == 0) {
+               if (topLine(fcell))
+                       os << "\\toprule ";
        } else if (tmp == n - fcell) {
                os << (use_booktabs ? "\\midrule " : "\\hline ");
        } else if (tmp) {
@@ -1999,7 +2000,8 @@ int Tabular::TeXBottomHLine(odocstream & os, row_type row) const
                        ++tmp;
        }
        if (use_booktabs && row == rowCount() - 1) {
-               os << "\\bottomrule";
+               if (bottomLine(fcell))
+                       os << "\\bottomrule";
        } else if (tmp == n - fcell) {
                os << (use_booktabs ? "\\midrule" : "\\hline");
        } else if (tmp) {