diff options
-rw-r--r-- | package/source/xstor/xstorage.cxx | 6 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLDocumentImpl.cxx | 13 |
2 files changed, 16 insertions, 3 deletions
diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index 2d63850312cc..76fbd6ff0f44 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -2136,7 +2136,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 ); diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx index 09ded156e1b5..b64c28a10e4c 100644 --- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx @@ -54,8 +54,17 @@ OOXMLDocumentImpl::~OOXMLDocumentImpl() void OOXMLDocumentImpl::resolveFastSubStream(Stream & rStreamHandler, OOXMLStream::StreamType_t nType) { - OOXMLStream::Pointer_t pStream - (OOXMLDocumentFactory::createStream(mpStream, nType)); + OOXMLStream::Pointer_t pStream; + try + { + pStream = OOXMLDocumentFactory::createStream(mpStream, nType); + } + catch (uno::Exception const& e) + { + SAL_INFO("writerfilter", "resolveFastSubStream: exception while " + "resolving stream " << nType << " : " << e.Message); + return; + } OOXMLStream::Pointer_t savedStream = mpStream; mpStream = pStream; |