Kaydet (Commit) a460cf68 authored tarafından Miklos Vajna's avatar Miklos Vajna

xmloff: avoid unhandled exception warning

Happened e.g. when copy&pasting editeng content in Impress tables,
document::XStorageBasedDocument is not implemented by SvxSimpleUnoModel,
so it's not exceptional that the queryInterface() for mxModel fails.

Change-Id: Iaed53941bb47ff8a0553896f18a553cf64e2224a
Reviewed-on: https://gerrit.libreoffice.org/49747Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst 2affa16c
......@@ -988,10 +988,9 @@ void SAL_CALL SvXMLImport::setTargetDocument( const uno::Reference< lang::XCompo
try
{
uno::Reference<document::XStorageBasedDocument> const xSBDoc(mxModel,
uno::UNO_QUERY_THROW);
uno::Reference<embed::XStorage> const xStor(
xSBDoc->getDocumentStorage());
uno::Reference<document::XStorageBasedDocument> const xSBDoc(mxModel, uno::UNO_QUERY);
uno::Reference<embed::XStorage> const xStor(xSBDoc.is() ? xSBDoc->getDocumentStorage()
: nullptr);
if (xStor.is())
{
mpImpl->mbIsOOoXML =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment