summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-03-25 21:26:43 +0000
committerMichael Stahl <michael.stahl@allotropia.de>2022-05-16 12:43:39 +0200
commit8507e90efd6dbe2787016c78ec8319091483d06b (patch)
tree0d82eef7151989c13580d0014313ab412a902324
parentforcepoint#99 SwTextFormatter unaware that FirstOfBorderMerge was deleted (diff)
downloadcore-8507e90efd6dbe2787016c78ec8319091483d06b.tar.gz
core-8507e90efd6dbe2787016c78ec8319091483d06b.zip
forcepoint#91 fix crash on layout of specific html
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132129 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit be04a8072e4af30ca6ead36aa92d5f380cd9feb9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132483 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 4abce69fca83f5c98bb1fc0678cc1ce9cedd4750) Change-Id: I145649e18f382c67ea34290f44fa219b7926127f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133952 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
-rw-r--r--sw/qa/extras/layout/data/forcepoint89.htmlbin0 -> 3321 bytes
-rw-r--r--sw/qa/extras/layout/data/forcepoint91.htmlbin0 -> 49256 bytes
-rw-r--r--sw/qa/extras/layout/data/tdf147485-forcepoint.docbin0 -> 62544 bytes
-rw-r--r--sw/qa/extras/layout/layout.cxx29
-rw-r--r--sw/source/core/layout/tabfrm.cxx2
5 files changed, 29 insertions, 2 deletions
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
--- /dev/null
+++ b/sw/qa/extras/layout/data/forcepoint89.html
Binary files 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
--- /dev/null
+++ b/sw/qa/extras/layout/data/forcepoint91.html
Binary files 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
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf147485-forcepoint.doc
Binary files differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 537e00e4404f..ce9c3387f28b 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -3050,8 +3050,19 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepointFootnoteFrame)
createDoc("forcepoint-swfootnoteframe-1.rtf");
}
-//FIXME: disabled after failing again with fixed layout
-//CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint76) { createDoc("forcepoint76-1.rtf"); }
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint76)
+{
+ createDoc("forcepoint76-1.rtf");
+}
+
+//just care it doesn't crash/assert
+#if 0 // no createSwWebDoc
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint89)
+{
+ createSwWebDoc(DATA_DIRECTORY, "forcepoint89.html");
+}
+#endif
//just care it doesn't crash/assert
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testN4LA0OHZ) { createDoc("LIBREOFFICE-N4LA0OHZ.rtf"); }
@@ -3062,6 +3073,14 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint90)
}
//just care it doesn't crash/assert
+#if 0 // no createSwWebDoc
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint91)
+{
+ createSwWebDoc(DATA_DIRECTORY, "forcepoint91.html");
+}
+#endif
+
+//just care it doesn't crash/assert
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint92) { createDoc("forcepoint92.doc"); }
//just care it doesn't crash/assert
@@ -3079,6 +3098,12 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint94)
}
#endif
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf147485Forcepoint)
+{
+ createDoc("tdf147485-forcepoint.doc");
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf118058)
{
SwDoc* pDoc = createDoc("tdf118058.fodt");
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 697bbe5a85b7..4489142e8e56 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -1596,6 +1596,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.