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 84f7dafe89)
This commit is contained in:
Juergen Spitzmueller 2017-11-19 14:32:53 +01:00
parent 90d87ec235
commit 7920a12065
2 changed files with 9 additions and 3 deletions

View File

@ -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...

View File

@ -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<string>(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))