mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-08 10:51:03 +00:00
- 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
This commit is contained in:
parent
f90d0ca093
commit
8a3a2baf6d
@ -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:
|
||||
|
@ -1326,14 +1326,8 @@ void Tabular::write(ostream & os) const
|
||||
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)
|
||||
@ -1342,8 +1336,14 @@ void Tabular::write(ostream & os) const
|
||||
<< 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)
|
||||
|
@ -207,9 +207,10 @@ public:
|
||||
///
|
||||
LYX_VALIGN_TOP = 0,
|
||||
///
|
||||
LYX_VALIGN_BOTTOM = 1,
|
||||
LYX_VALIGN_MIDDLE = 1,
|
||||
///
|
||||
LYX_VALIGN_MIDDLE = 2
|
||||
LYX_VALIGN_BOTTOM = 2
|
||||
|
||||
};
|
||||
///
|
||||
enum HAlignment {
|
||||
|
Loading…
Reference in New Issue
Block a user