summaryrefslogtreecommitdiff
path: root/writerperfect
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-07-16 15:23:48 +0200
committerDavid Tardon <dtardon@redhat.com>2014-07-16 15:32:07 +0200
commit8b518739e41ead554630777d7cb7bdfcc23f434c (patch)
treeb290b25a90a89e73bbe512d33017300e990affc8 /writerperfect
parentc10390a681a4d4696d45a6d38f7d01829f368daa (diff)
make keynote detection a bit more robust
Change-Id: I947bc5867a6b61a923d47cad48d04ab5fc2769c9
Diffstat (limited to 'writerperfect')
-rw-r--r--writerperfect/source/impress/KeynoteImportFilter.cxx9
1 files changed, 8 insertions, 1 deletions
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();
+ }
}
}
}