* src/insets/InsetTabular.cpp:

- correct LaTeX output for alignment in fixed width multicolumn cells
	  (bug 1747).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26352 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2008-09-10 12:49:08 +00:00
parent c1fdb12118
commit 623308f1e9

View File

@ -1904,6 +1904,19 @@ int Tabular::TeXCellPreamble(odocstream & os, idx_type cell, bool & ismulticol)
os << cellInfo(cell).align_special; os << cellInfo(cell).align_special;
} else { } else {
if (!getPWidth(cell).zero()) { if (!getPWidth(cell).zero()) {
switch (align) {
case LYX_ALIGN_LEFT:
os << ">{\\raggedright}";
break;
case LYX_ALIGN_RIGHT:
os << ">{\\raggedleft}";
break;
case LYX_ALIGN_CENTER:
os << ">{\\centering}";
break;
default:
break;
}
switch (valign) { switch (valign) {
case LYX_VALIGN_TOP: case LYX_VALIGN_TOP:
os << 'p'; os << 'p';
@ -2680,8 +2693,8 @@ void Tabular::validate(LaTeXFeatures & features) const
if (needRotating()) if (needRotating())
features.require("rotating"); features.require("rotating");
for (idx_type cell = 0; cell < numberofcells; ++cell) { for (idx_type cell = 0; cell < numberofcells; ++cell) {
if (getVAlignment(cell) != LYX_VALIGN_TOP || if (getVAlignment(cell) != LYX_VALIGN_TOP
(!getPWidth(cell).zero() && !isMultiColumn(cell))) || !getPWidth(cell).zero())
features.require("array"); features.require("array");
cellInset(cell)->validate(features); cellInset(cell)->validate(features);
} }