diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-08-16 12:35:26 +0200 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2013-08-16 13:40:45 +0000 |
commit | b697e302c1eb31afdcc3bbc916bd929ec96a6c70 (patch) | |
tree | 640935ebff15f6b1bb0d0ec8cb0b44a3b35fa1ff /package | |
parent | 9c0b035c617b0ee4095e673e756d0a93df7864a3 (diff) |
fdo#68084: OOXML import: handle exceptions if stream is missing
The bugdoc does not have a styles.xml but a stylesWithEffects.xml,
whatever that may mean. (the app.xml contains "Microsoft Macintosh Word")
Change-Id: If3d11c5d166dcaf3d94129339559787c20e6db46
(cherry picked from commit 6e3ac01f850228afb5c6cb1a33b101693aea8712)
Reviewed-on: https://gerrit.libreoffice.org/5449
Reviewed-by: Petr Mladek <pmladek@suse.cz>
Tested-by: Petr Mladek <pmladek@suse.cz>
Diffstat (limited to 'package')
-rw-r--r-- | package/source/xstor/xstorage.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index 073f1d1a73e4..d95e41867512 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -2192,7 +2192,11 @@ SotElement_Impl* OStorage::OpenStreamElement_Impl( const OUString& aStreamName, if ( !( m_pImpl->m_nStorageMode & embed::ElementModes::WRITE ) || (( nOpenMode & embed::ElementModes::WRITE ) != embed::ElementModes::WRITE ) || ( nOpenMode & embed::ElementModes::NOCREATE ) == embed::ElementModes::NOCREATE ) - throw io::IOException( OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // TODO: access_denied + { + throw io::IOException("Element does not exist and cannot be " + "created: \"" + aStreamName + "\"", + uno::Reference< uno::XInterface >()); // TODO: access_denied + } // create a new StreamElement and insert it into the list pElement = m_pImpl->InsertStream( aStreamName, bEncr ); |