sw/qa/extras/layout/data/forcepoint89.html        |binary
 sw/qa/extras/layout/data/forcepoint91.html        |binary
 sw/qa/extras/layout/data/tdf147485-forcepoint.doc |binary
 sw/qa/extras/layout/layout.cxx                    |   25 ++++++++++++++++++++--
 sw/source/core/layout/tabfrm.cxx                  |    2 +
 5 files changed, 25 insertions(+), 2 deletions(-)

New commits:
commit 4abce69fca83f5c98bb1fc0678cc1ce9cedd4750
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Fri Mar 25 21:26:43 2022 +0000
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Mon Apr 4 19:14:34 2022 +0200

    forcepoint#91 fix crash on layout of specific html
    
    Change-Id: I145649e18f382c67ea34290f44fa219b7926127f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132129
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    (cherry picked from commit be04a8072e4af30ca6ead36aa92d5f380cd9feb9)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132483
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/sw/qa/extras/layout/data/forcepoint89.html 
b/sw/qa/extras/layout/data/forcepoint89.html
new file mode 100644
index 000000000000..7998a2b0b979
Binary files /dev/null and b/sw/qa/extras/layout/data/forcepoint89.html differ
diff --git a/sw/qa/extras/layout/data/forcepoint91.html 
b/sw/qa/extras/layout/data/forcepoint91.html
new file mode 100644
index 000000000000..eacbd2e05ab8
Binary files /dev/null and b/sw/qa/extras/layout/data/forcepoint91.html differ
diff --git a/sw/qa/extras/layout/data/tdf147485-forcepoint.doc 
b/sw/qa/extras/layout/data/tdf147485-forcepoint.doc
new file mode 100644
index 000000000000..cb630efb8717
Binary files /dev/null and b/sw/qa/extras/layout/data/tdf147485-forcepoint.doc 
differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 72db33e49b7c..489518c693ef 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -2493,8 +2493,17 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, 
testForcepointFootnoteFrame)
     createSwDoc(DATA_DIRECTORY, "forcepoint-swfootnoteframe-1.rtf");
 }
 
-//FIXME: disabled after failing again with fixed layout
-//CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint76) { 
createSwDoc(DATA_DIRECTORY, "forcepoint76-1.rtf"); }
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint76)
+{
+    createSwDoc(DATA_DIRECTORY, "forcepoint76-1.rtf");
+}
+
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint89)
+{
+    createSwWebDoc(DATA_DIRECTORY, "forcepoint89.html");
+}
 
 //just care it doesn't crash/assert
 CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint90)
@@ -2502,6 +2511,12 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint90)
     createSwDoc(DATA_DIRECTORY, "forcepoint90.rtf");
 }
 
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint91)
+{
+    createSwWebDoc(DATA_DIRECTORY, "forcepoint91.html");
+}
+
 //just care it doesn't crash/assert
 CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint92)
 {
@@ -2514,6 +2529,12 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint94)
     createSwWebDoc(DATA_DIRECTORY, "forcepoint94.html");
 }
 
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf147485Forcepoint)
+{
+    createSwDoc(DATA_DIRECTORY, "tdf147485-forcepoint.doc");
+}
+
 CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf118058)
 {
     SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf118058.fodt");
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 7ee960a5684c..98f5229d4ba5 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -1616,6 +1616,8 @@ static bool lcl_InnerCalcLayout( SwFrame *pFrame,
         if ( pFrame->IsLayoutFrame() &&
              ( !_bOnlyRowsAndCells || pFrame->IsRowFrame() || 
pFrame->IsCellFrame() ) )
         {
+            SwFrameDeleteGuard aDeleteGuard(pFrame);
+
             // #130744# An invalid locked table frame will
             // not be calculated => It will not become valid =>
             // Loop in lcl_RecalcRow(). Therefore we do not consider them for 
bRet.

Reply via email to