InsetTabular.cpp:

- longtables cannot have a valignment, tables not a longtablealignment

- squash a compiler warning

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30478 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2009-07-11 13:41:34 +00:00
parent 424943af89
commit 6776598761

View File

@ -1326,10 +1326,14 @@ void Tabular::write(ostream & os) const
os << "<features" os << "<features"
<< write_attribute("rotate", rotate) << write_attribute("rotate", rotate)
<< write_attribute("booktabs", use_booktabs) << write_attribute("booktabs", use_booktabs)
<< write_attribute("islongtable", is_long_tabular) << write_attribute("islongtable", is_long_tabular);
<< write_attribute("tabularvalignment", tabular_valignment) // longtables cannot be aligned vertically
<< write_attribute("longtabularalignment", longtabular_alignment) if (!is_long_tabular)
<< write_attribute("firstHeadTopDL", endfirsthead.topDL) os << write_attribute("tabularvalignment", tabular_valignment);
if (is_long_tabular)
os << write_attribute("longtabularalignment",
longtabular_alignment);
os << write_attribute("firstHeadTopDL", endfirsthead.topDL)
<< write_attribute("firstHeadBottomDL", endfirsthead.bottomDL) << write_attribute("firstHeadBottomDL", endfirsthead.bottomDL)
<< write_attribute("firstHeadEmpty", endfirsthead.empty) << write_attribute("firstHeadEmpty", endfirsthead.empty)
<< write_attribute("headTopDL", endhead.topDL) << write_attribute("headTopDL", endhead.topDL)
@ -4166,6 +4170,8 @@ Inset::DisplayType InsetTabular::display() const
return AlignCenter; return AlignCenter;
case Tabular::LYX_LONGTABULAR_ALIGN_RIGHT: case Tabular::LYX_LONGTABULAR_ALIGN_RIGHT:
return AlignRight; return AlignRight;
default:
return AlignCenter;
} }
} else } else
return Inline; return Inline;