diff options
author | Jan Holesovsky <kendy@collabora.com> | 2013-11-12 13:35:56 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2013-11-13 09:19:48 +0100 |
commit | 238e528ea4f58c045dc3d2241f1d2c04cd7b549b (patch) | |
tree | c70d727ed2051db5f0341f96c1a4e62b26f78d83 | |
parent | ad938851739b77ca50c9796810059c217cfd1327 (diff) |
bnc#830205: Stop-gap solution to avoid crash.
This improves the situation, because previously, the document would just crash
due to infinite recursion.
Deeper checking why do we end up with an invalid range would be good; but it
was impossible to check with the bugdoc, as it was too complex, and trying to
cut it down was crashing MSO :-) Hopefully we'll get a better document at
some stage.
Conflicts:
sw/qa/extras/ooxmlimport/ooxmlimport.cxx
Change-Id: I4cd639e02aebe9027f06e8468c14969c506327b2
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/n830205.docx | bin | 0 -> 33186 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/doc/docredln.cxx | 2 |
3 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/n830205.docx b/sw/qa/extras/ooxmlimport/data/n830205.docx Binary files differnew file mode 100644 index 000000000000..89cf1d8434a1 --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/n830205.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 33c0ecebceac..262968471b8c 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -128,6 +128,7 @@ public: void testN816593(); void testN820509(); void testN820788(); + void testN830205(); void testTableAutoColumnFixedSize(); void testFdo66474(); void testBnc780044Spacing(); @@ -215,6 +216,7 @@ void Test::run() {"n816593.docx", &Test::testN816593}, {"n820509.docx", &Test::testN820509}, {"n820788.docx", &Test::testN820788}, + {"n830205.docx", &Test::testN830205}, {"table-auto-column-fixed-size.docx", &Test::testTableAutoColumnFixedSize}, {"fdo66474.docx", &Test::testFdo66474}, {"bnc780044_spacing.docx", &Test::testBnc780044Spacing}, @@ -1293,6 +1295,12 @@ void Test::testN820788() CPPUNIT_ASSERT_EQUAL(text::SizeType::MIN, getProperty<sal_Int16>(xFrame, "SizeType")); } +void Test::testN830205() +{ + // Previously import just crashed (due to infinite recursion). + getParagraph(1, "XXX"); +} + void Test::testTableAutoColumnFixedSize() { uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY); diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index eed72a6dfddf..729d144d6ba8 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -2694,7 +2694,9 @@ bool SwRedlineTbl::InsertWithValidRanges( SwRedline* p, sal_uInt16* pInsPos ) #if OSL_DEBUG_LEVEL > 0 CheckPosition( pNew->GetPoint(), pNew->GetMark() ); #endif + if( *pNew->GetPoint() != *pNew->GetMark() && + pNew->HasValidRange() && Insert( pNew, nInsPos ) ) { pNew->CallDisplayFunc(); |