From 8b518739e41ead554630777d7cb7bdfcc23f434c Mon Sep 17 00:00:00 2001 From: David Tardon Date: Wed, 16 Jul 2014 15:23:48 +0200 Subject: make keynote detection a bit more robust Change-Id: I947bc5867a6b61a923d47cad48d04ab5fc2769c9 --- writerperfect/source/impress/KeynoteImportFilter.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'writerperfect') diff --git a/writerperfect/source/impress/KeynoteImportFilter.cxx b/writerperfect/source/impress/KeynoteImportFilter.cxx index 4b7b0296079a..f324a1f94c3f 100644 --- a/writerperfect/source/impress/KeynoteImportFilter.cxx +++ b/writerperfect/source/impress/KeynoteImportFilter.cxx @@ -256,7 +256,8 @@ throw( com::sun::star::uno::RuntimeException, std::exception ) if ( confidence == libetonyek::EtonyekDocument::CONFIDENCE_SUPPORTED_PART ) { - assert( !bIsPackage ); + if ( bIsPackage ) // we passed a directory stream, but the filter claims it's APXL file? + return OUString(); const Reference < container::XChild > xChild( xContent, UNO_QUERY ); if ( xChild.is() ) @@ -271,6 +272,12 @@ throw( com::sun::star::uno::RuntimeException, std::exception ) bUCBContentChanged = true; bIsPackage = true; } + else + { + // The passed stream has been detected as APXL file, but its parent dir is not a valid Keynote + // package? Something is wrong here... + return OUString(); + } } } } -- cgit