sw/source/filter/writer/wrtswtbl.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
New commits: commit 0a115d48057867c60bfcd527e90433b2dca1f28a Author: Michael Meeks <michael.me...@suse.com> Date: Mon Apr 29 18:06:27 2013 +0100 fdo#62336 - fix horribly coupled table rendering code to not crash. Change-Id: Ie0c5f39f6265e38534a6d0c9743877eef79e5954 Reviewed-on: https://gerrit.libreoffice.org/3687 Reviewed-by: Fridrich Strba <fridr...@documentfoundation.org> Tested-by: Fridrich Strba <fridr...@documentfoundation.org> diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx index 55afa3c..4699005 100644 --- a/sw/source/filter/writer/wrtswtbl.cxx +++ b/sw/source/filter/writer/wrtswtbl.cxx @@ -404,6 +404,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, @@ -747,10 +751,16 @@ SwWriteTable::SwWriteTable(const SwTableLines& rLines, long nWidth, // Erstmal die Tabellen-Struktur festlegen. Hinter der Tabelle ist in // jedem Fall eine Spalte zu Ende SwWriteTableCol *pCol = new SwWriteTableCol( nParentWidth ); + bUseLayoutHeights = true; aCols.insert( pCol ); CollectTableRowsCols( 0, 0, 0, nParentWidth, rLines, nMaxDepth - 1 ); - // Und jetzt mit leben fuellen + // 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) ); // Einige Twip-Werte an Pixel-Grenzen anpassen _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits