Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3687

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/87/3687/1

fdo#62336 - fix horribly coupled table rendering code to not crash.

Change-Id: Ie0c5f39f6265e38534a6d0c9743877eef79e5954
---
M sw/source/filter/writer/wrtswtbl.cxx
1 file changed, 11 insertions(+), 1 deletion(-)



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 @@
     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 @@
     // 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

-- 
To view, visit https://gerrit.libreoffice.org/3687
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie0c5f39f6265e38534a6d0c9743877eef79e5954
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Michael Meeks <michael.me...@suse.com>

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to