From: Juergen Spitzmueller Date: Sun, 19 Nov 2017 13:32:53 +0000 (+0100) Subject: Disable non-functional table rotation for longtables X-Git-Tag: 2.3.0rc2~244 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=7920a12065458b4106d893cafd41afc53efd1b3c;p=features.git Disable non-functional table rotation for longtables In the long run, proper longtable rotation via [pdf]lscape should be implemented. See #9194 (cherry picked from commit 84f7dafe891483e0314e2a08c0ddd8cf0063902d) --- diff --git a/src/frontends/qt4/GuiTabular.cpp b/src/frontends/qt4/GuiTabular.cpp index 2741a3715e..151a714ae9 100644 --- a/src/frontends/qt4/GuiTabular.cpp +++ b/src/frontends/qt4/GuiTabular.cpp @@ -258,6 +258,12 @@ void GuiTabular::enableWidgets() const // longtables and tabular* cannot have a vertical alignment TableAlignLA->setDisabled(is_tabular_star || longtabular); TableAlignCO->setDisabled(is_tabular_star || longtabular); + // longtable cannot be rotated (with rotating package) + // FIXME: Add support for [pdf]lscape + rotateTabularCB->setDisabled(longtabular); + rotateTabularLA->setDisabled(longtabular); + // this one would also be disabled with [pdf]lscape + rotateTabularAngleSB->setDisabled(longtabular); // FIXME: This Dialog is really horrible, disabling/enabling a checkbox // depending on the cursor position is very very unintuitive... diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index b209053f45..788858e189 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -1860,7 +1860,7 @@ int Tabular::getRotateCell(idx_type cell) const bool Tabular::needRotating() const { - if (rotate) + if (rotate && !is_long_tabular) return true; for (row_type r = 0; r < nrows(); ++r) for (col_type c = 0; c < ncols(); ++c) @@ -2719,7 +2719,7 @@ void Tabular::latex(otexstream & os, OutputParams const & runparams) const if (!TexRow::isNone(pos)) os.texrow().start(pos); - if (rotate != 0) + if (rotate != 0 && !is_long_tabular) os << "\\begin{turn}{" << convert(rotate) << "}\n"; if (is_long_tabular) { @@ -2870,7 +2870,7 @@ void Tabular::latex(otexstream & os, OutputParams const & runparams) const os << "\\end{tabular}"; } - if (rotate != 0) + if (rotate != 0 && !is_long_tabular) os << breakln << "\\end{turn}"; if (!TexRow::isNone(pos))