InsetTabular.cpp: fix the logic when \linebreaks are allowed in table cells, fixes http://bugzilla.lyx.org/show_bug.cgi?id=4839

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24938 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2008-05-25 21:14:36 +00:00
parent 5a67cddfe8
commit 06e0a5df20

View File

@ -1568,10 +1568,12 @@ void Tabular::setUsebox(idx_type cell, BoxType type)
}
// FIXME: Remove this routine because we cannot insert \parboxes when the user
// adds line breaks, see bug 4886.
Tabular::BoxType Tabular::getUsebox(idx_type cell) const
{
if (column_info[cellColumn(cell)].p_width.zero() &&
!(isMultiColumn(cell) && !cellInfo(cell).p_width.zero()))
if ((!column_info[cellColumn(cell)].p_width.zero() && !isMultiColumn(cell)) ||
(isMultiColumn(cell) && !cellInfo(cell).p_width.zero()))
return BOX_NONE;
if (cellInfo(cell).usebox > 1)
return cellInfo(cell).usebox;