[Libreoffice-commits] core.git: sw/source
Michael Meeks
michael.meeks at suse.com
Mon Apr 29 10:05:08 PDT 2013
sw/source/filter/writer/wrtswtbl.cxx | 10 ++++++++++
1 file changed, 10 insertions(+)
New commits:
commit 61dc0d2c9d79fd9ce32cd9591fad4daead0ebade
Author: Michael Meeks <michael.meeks at suse.com>
Date: Mon Apr 29 18:01:25 2013 +0100
fdo#62336 - fix horribly coupled table rendering code to not crash.
Change-Id: I7a6ee4dce338b7529fa7500bb0c8341a4f2ebc22
diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx
index 7a1123d..12c3539 100644
--- a/sw/source/filter/writer/wrtswtbl.cxx
+++ b/sw/source/filter/writer/wrtswtbl.cxx
@@ -396,6 +396,10 @@ sal_Bool SwWriteTable::ShouldExpandSub(const SwTableBox *pBox, sal_Bool /*bExpan
return !pBox->GetSttNd() && nDepth > 0;
}
+// FIXME: the degree of coupling between this method and
+// FillTableRowsCols which is called immediately afterwards
+// is -extremely- unpleasant and potentially problematic.
+
void SwWriteTable::CollectTableRowsCols( long nStartRPos,
sal_uInt32 nStartCPos,
long nParentLineHeight,
@@ -740,8 +744,14 @@ SwWriteTable::SwWriteTable(const SwTableLines& rLines, long nWidth,
// case the end of a column
SwWriteTableCol *pCol = new SwWriteTableCol( nParentWidth );
aCols.insert( pCol );
+ bUseLayoutHeights = true;
CollectTableRowsCols( 0, 0, 0, nParentWidth, rLines, nMaxDepth - 1 );
+ // FIXME: awfully GetLineHeight writes to this in its first call
+ // and proceeds to return a rather odd number fdo#62336, we have to
+ // behave identically since the code in FillTableRowsCols duplicates
+ // and is highly coupled to CollectTableRowsCols - sadly.
+ bUseLayoutHeights = true;
// And now fill with life
FillTableRowsCols( 0, 0, 0, 0, 0, nParentWidth, rLines, 0, nMaxDepth - 1, static_cast< sal_uInt16 >(nNumOfRowsToRepeat) );
More information about the Libreoffice-commits
mailing list