diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2015-11-14 21:12:49 +1000 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2016-01-05 06:53:09 +0000 |
commit | 26eb0debda788d996d9bd63d72947652a5066087 (patch) | |
tree | 5478aafc4902c5f910ac5aaa73fae25c62c8651a /sw/qa/extras/ooxmlimport/ooxmlimport.cxx | |
parent | fbb00383d82da5ce375f1b034d3fb9ebdd9a8f0e (diff) |
tdf#69640: Treat errors opening OLE stream gracefully
The testcase for tdf#69640 includes links (relations) to external
pptx files. It demonstrates two non-fatal reasons for failure
opening OLE stream:
1. it fails OStorageHelper::IsValidZipEntryFileName check, because
the file path contains ":\";
2. even if that were not the case, the required file can be absent
from user's system.
I suppose that intercepting the failure at the level of
OOXMLOLEHandler::attribute() is the best option, because at the
lower level it's unknown if this failure is fatal or not.
I suppose that it could be also useful to intercept specifically
failures in OStorageHelper::IsValidZipEntryFileName, checking if
the file exist externally, and asking users if they want to update
external links (as MSO does). Possibly it should be discussed
with UX team if that should be done, and if so, do it in separate
commit.
Change-Id: I240a6f69abe236eb790bb406c79f3b761fb4638a
Reviewed-on: https://gerrit.libreoffice.org/19963
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'sw/qa/extras/ooxmlimport/ooxmlimport.cxx')
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
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); |