From: Uwe Stöhr Date: Sat, 11 Jul 2009 14:33:05 +0000 (+0000) Subject: - GuiTabular.cpp: longtables cannot have a vertical alignment X-Git-Tag: 2.0.0~6086 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=8a3a2baf6db40aeb5f123577896e80455901a4f7;p=features.git - GuiTabular.cpp: longtables cannot have a vertical alignment - InsetTabular.cpp: write the alignment as last features (to match the existing tex2lyx routines) - InsetTabular.h: fix indexes git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30482 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt4/GuiTabular.cpp b/src/frontends/qt4/GuiTabular.cpp index c162f1fa0c..91b68678a6 100644 --- a/src/frontends/qt4/GuiTabular.cpp +++ b/src/frontends/qt4/GuiTabular.cpp @@ -84,6 +84,9 @@ GuiTabular::GuiTabular(GuiView & lv) newpageCB, SLOT(setEnabled(bool))); connect(longTabularCB, SIGNAL(toggled(bool)), alignmentGB, SLOT(setEnabled(bool))); + // longtables cannot have a vertical alignment + connect(longTabularCB, SIGNAL(toggled(bool)), + TableAlignCB, SLOT(setDisabled(bool))); connect(hAlignCB, SIGNAL(activated(int)), this, SLOT(hAlign_changed(int))); connect(vAlignCB, SIGNAL(activated(int)), @@ -826,7 +829,7 @@ void GuiTabular::updateContents() hAlignCB->setEnabled(true); vAlignCB->setEnabled(!pwidth.zero()); - int tableValign = 0; + int tableValign = 1; switch (tabular_.tabular_valignment) { case Tabular::LYX_VALIGN_TOP: tableValign = 0; @@ -864,7 +867,9 @@ void GuiTabular::updateContents() captionStatusCB->setChecked(false); captionStatusCB->blockSignals(false); return; - } + } else + // longtables cannot have a vertical alignment + TableAlignCB->setCurrentIndex(Tabular::LYX_VALIGN_MIDDLE); switch (tabular_.longtabular_alignment) { case Tabular::LYX_LONGTABULAR_ALIGN_LEFT: diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index 3511dd4693..842f9cc1d4 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -1326,14 +1326,8 @@ void Tabular::write(ostream & os) const os << "\n"; + << write_attribute("lastFootEmpty", endlastfoot.empty); + // longtables cannot be aligned vertically + if (!is_long_tabular) + os << write_attribute("tabularvalignment", tabular_valignment); + if (is_long_tabular) + os << write_attribute("longtabularalignment", + longtabular_alignment); + os << ">\n"; for (col_type j = 0; j < column_info.size(); ++j) { os << "