diff options
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/tdf95777.docx | bin | 0 -> 19126 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 5 | ||||
-rw-r--r-- | writerfilter/source/ooxml/Handler.cxx | 9 |
3 files changed, 13 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/tdf95777.docx b/sw/qa/extras/ooxmlimport/data/tdf95777.docx Binary files differnew file mode 100644 index 000000000000..e71fdea609b6 --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/tdf95777.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index f5cc1f6fd0ba..ed5c7da0b1a2 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -2901,6 +2901,11 @@ DECLARE_OOXMLIMPORT_TEST(testTdf89165, "tdf89165.docx") // This must not hang in layout } +DECLARE_OOXMLIMPORT_TEST(testTdf95777, "tdf95777.docx") +{ + // This must not fail on open +} + DECLARE_OOXMLIMPORT_TEST(testTdf94374, "hello.docx") { uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); diff --git a/writerfilter/source/ooxml/Handler.cxx b/writerfilter/source/ooxml/Handler.cxx index 89d7cdbfb40a..2010be429d81 100644 --- a/writerfilter/source/ooxml/Handler.cxx +++ b/writerfilter/source/ooxml/Handler.cxx @@ -125,7 +125,14 @@ void OOXMLOLEHandler::attribute(Id name, Value & val) switch (name) { case NS_ooxml::LN_CT_OLEObject_r_id: - mpFastContext->resolveData(val.getString()); + try { + mpFastContext->resolveData(val.getString()); + } + catch (const ::css::uno::Exception&) + { + // Can't resolve OLE stream + SAL_WARN("OOXMLOLEHandler::attribute", "Failed to open OLE stream!"); + } break; default: ; |