#include "support/convert.h"
#include "support/debug.h"
+#include "support/lstrings.h"
#include <QCheckBox>
#include <QPushButton>
else if (!multicolumnCB->isChecked() && !multirowCB->isChecked()
&& hAlignCO->findData(toqstr("decimal")) == -1)
hAlignCO->addItem(qt_("At Decimal Separator"), toqstr("decimal"));
- bool const dalign =
+ bool const dalign =
hAlignCO->itemData(hAlignCO->currentIndex()).toString() == QString("decimal");
decimalPointED->setEnabled(dalign);
decimalLA->setEnabled(dalign);
tabularWidthED->setEnabled(setwidth);
tabularWidthUnitLC->setEnabled(setwidth);
- rotateTabularAngleSB->setEnabled(rotateTabularCB->isChecked());
+ rotateTabularAngleSB->setEnabled(rotateTabularCB->isChecked()
+ && !longTabularCB->isChecked());
rotateCellAngleSB->setEnabled(rotateCellCB->isChecked());
bool const enable_valign =
// 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, only
+ // with [pdf]lscape, which only supports 90 deg.
+ rotateTabularAngleSB->setDisabled(longtabular);
// FIXME: This Dialog is really horrible, disabling/enabling a checkbox
// depending on the cursor position is very very unintuitive...
// apply the special alignment
string special = fromqstr(specialAlignmentED->text());
- if (special.empty())
+ if (support::trim(special).empty())
special = "none";
if (multicolumnCB->isChecked())
setParam(param_str, Tabular::SET_SPECIAL_MULTICOLUMN, special);
rotateCellAngleSB->setValue(90);
}
- rotateTabularCB->setChecked(tabular.rotate != 0);
- if (rotateTabularCB->isChecked())
- rotateTabularAngleSB->setValue(tabular.rotate != 0 ? tabular.rotate : 90);
-
longTabularCB->setChecked(tabular.is_long_tabular);
+ rotateTabularCB->setChecked(tabular.rotate != 0);
+ if (rotateTabularCB->isChecked()) {
+ if (longTabularCB->isChecked())
+ rotateTabularAngleSB->setValue(90);
+ else
+ rotateTabularAngleSB->setValue(tabular.rotate != 0 ? tabular.rotate : 90);
+ }
+
borders->setTop(tabular.topLine(cell));
borders->setBottom(tabular.bottomLine(cell));
borders->setLeft(tabular.leftLine(cell));