diff options
Diffstat (limited to 'writerfilter/source/ooxml/OOXMLStreamImpl.cxx')
-rw-r--r-- | writerfilter/source/ooxml/OOXMLStreamImpl.cxx | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx index 73e527a5543e..7d48f1c08fce 100644 --- a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx @@ -348,25 +348,25 @@ void OOXMLStreamImpl::init() bool bFound = lcl_getTarget(mxRelationshipAccess, mnStreamType, msId, msTarget); - if (bFound) - { - sal_Int32 nLastIndex = msTarget.lastIndexOf('/'); - if (nLastIndex >= 0) - msPath = msTarget.copy(0, nLastIndex + 1); + if (!bFound) + return; - uno::Reference<embed::XHierarchicalStorageAccess> - xHierarchicalStorageAccess(mxStorage, uno::UNO_QUERY); + sal_Int32 nLastIndex = msTarget.lastIndexOf('/'); + if (nLastIndex >= 0) + msPath = msTarget.copy(0, nLastIndex + 1); - if (xHierarchicalStorageAccess.is()) - { - uno::Any aAny(xHierarchicalStorageAccess-> - openStreamElementByHierarchicalName - (msTarget, embed::ElementModes::SEEKABLEREAD)); - aAny >>= mxDocumentStream; - // Non-cached ID lookup works by accessing mxDocumentStream as an embed::XRelationshipAccess. - // So when it changes, we should empty the cache. - maIdCache.clear(); - } + uno::Reference<embed::XHierarchicalStorageAccess> + xHierarchicalStorageAccess(mxStorage, uno::UNO_QUERY); + + if (xHierarchicalStorageAccess.is()) + { + uno::Any aAny(xHierarchicalStorageAccess-> + openStreamElementByHierarchicalName + (msTarget, embed::ElementModes::SEEKABLEREAD)); + aAny >>= mxDocumentStream; + // Non-cached ID lookup works by accessing mxDocumentStream as an embed::XRelationshipAccess. + // So when it changes, we should empty the cache. + maIdCache.clear(); } } |