- 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
newpageCB, SLOT(setEnabled(bool)));
connect(longTabularCB, SIGNAL(toggled(bool)),
alignmentGB, SLOT(setEnabled(bool)));
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)),
connect(hAlignCB, SIGNAL(activated(int)),
this, SLOT(hAlign_changed(int)));
connect(vAlignCB, SIGNAL(activated(int)),
hAlignCB->setEnabled(true);
vAlignCB->setEnabled(!pwidth.zero());
hAlignCB->setEnabled(true);
vAlignCB->setEnabled(!pwidth.zero());
switch (tabular_.tabular_valignment) {
case Tabular::LYX_VALIGN_TOP:
tableValign = 0;
switch (tabular_.tabular_valignment) {
case Tabular::LYX_VALIGN_TOP:
tableValign = 0;
captionStatusCB->setChecked(false);
captionStatusCB->blockSignals(false);
return;
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:
switch (tabular_.longtabular_alignment) {
case Tabular::LYX_LONGTABULAR_ALIGN_LEFT:
os << "<features"
<< write_attribute("rotate", rotate)
<< write_attribute("booktabs", use_booktabs)
os << "<features"
<< write_attribute("rotate", rotate)
<< write_attribute("booktabs", use_booktabs)
- << write_attribute("islongtable", is_long_tabular);
- // 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 << write_attribute("firstHeadTopDL", endfirsthead.topDL)
+ << write_attribute("islongtable", is_long_tabular)
+ << write_attribute("firstHeadTopDL", endfirsthead.topDL)
<< write_attribute("firstHeadBottomDL", endfirsthead.bottomDL)
<< write_attribute("firstHeadEmpty", endfirsthead.empty)
<< write_attribute("headTopDL", endhead.topDL)
<< write_attribute("firstHeadBottomDL", endfirsthead.bottomDL)
<< write_attribute("firstHeadEmpty", endfirsthead.empty)
<< write_attribute("headTopDL", endhead.topDL)
<< write_attribute("footBottomDL", endfoot.bottomDL)
<< write_attribute("lastFootTopDL", endlastfoot.topDL)
<< write_attribute("lastFootBottomDL", endlastfoot.bottomDL)
<< write_attribute("footBottomDL", endfoot.bottomDL)
<< write_attribute("lastFootTopDL", endlastfoot.topDL)
<< write_attribute("lastFootBottomDL", endlastfoot.bottomDL)
- << write_attribute("lastFootEmpty", endlastfoot.empty)
- << ">\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 << "<column"
<< write_attribute("alignment", column_info[j].alignment)
for (col_type j = 0; j < column_info.size(); ++j) {
os << "<column"
<< write_attribute("alignment", column_info[j].alignment)
///
LYX_VALIGN_TOP = 0,
///
///
LYX_VALIGN_TOP = 0,
///
+ LYX_VALIGN_BOTTOM = 2
+