X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetTabular.cpp;h=f69da2b74bf8f967929aea94691a48bce380343d;hb=2c357c1d23b7b83839a9beb8225d4f1ae4f793b4;hp=daa25763fb784a96da123deaa16e47f206078bcf;hpb=82984ec711e923bd108589a1c28a964fc0e58113;p=lyx.git diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index daa25763fb..f69da2b74b 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -28,11 +28,9 @@ #include "Counters.h" #include "Cursor.h" #include "CutAndPaste.h" -#include "support/debug.h" #include "DispatchResult.h" #include "FuncRequest.h" #include "FuncStatus.h" -#include "support/gettext.h" #include "Language.h" #include "LaTeXFeatures.h" #include "Lexer.h" @@ -46,16 +44,19 @@ #include "TextClass.h" #include "TextMetrics.h" -#include "support/convert.h" -#include "support/docstream.h" -#include "support/FileName.h" -#include "support/lstrings.h" - #include "frontends/alert.h" #include "frontends/Clipboard.h" #include "frontends/Painter.h" #include "frontends/Selection.h" + +#include "support/convert.h" +#include "support/debug.h" +#include "support/docstream.h" +#include "support/FileName.h" +#include "support/gettext.h" +#include "support/lstrings.h" + #include #include @@ -1962,8 +1963,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 +2001,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) {