diff options
Diffstat (limited to 'sfx2/source/doc')
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 15 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 1 | ||||
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 2 |
3 files changed, 14 insertions, 4 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 422fa98ac3..c961733d85 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -1980,10 +1980,13 @@ uno::Reference<embed::XStorage> SfxMedium::GetScriptingStorageToSign_Impl() SAL_WARN_IF(!pImpl->m_xODFDecryptedInnerPackageStream.is(), "sfx.doc", "no inner package stream?"); if (pImpl->m_xODFDecryptedInnerPackageStream.is()) { + const SfxBoolItem* pRepairItem = GetItemSet().GetItem(SID_REPAIRPACKAGE, false); + const bool bRepairPackage = pRepairItem && pRepairItem->GetValue(); pImpl->m_xODFDecryptedInnerZipStorage = ::comphelper::OStorageHelper::GetStorageOfFormatFromInputStream( ZIP_STORAGE_FORMAT_STRING, - pImpl->m_xODFDecryptedInnerPackageStream->getInputStream()); + pImpl->m_xODFDecryptedInnerPackageStream->getInputStream(), {}, + bRepairPackage); } } return pImpl->m_xODFDecryptedInnerZipStorage; @@ -2004,15 +2007,21 @@ uno::Reference< embed::XStorage > const & SfxMedium::GetZipStorageToSign_Impl( b try { + const SfxBoolItem* pRepairItem = GetItemSet().GetItem(SID_REPAIRPACKAGE, false); + const bool bRepairPackage = pRepairItem && pRepairItem->GetValue(); // we can not sign document if there is no stream // should it be possible at all? if ( !bReadOnly && pImpl->xStream.is() ) { - pImpl->m_xZipStorage = ::comphelper::OStorageHelper::GetStorageOfFormatFromStream( ZIP_STORAGE_FORMAT_STRING, pImpl->xStream ); + pImpl->m_xZipStorage = ::comphelper::OStorageHelper::GetStorageOfFormatFromStream( + ZIP_STORAGE_FORMAT_STRING, pImpl->xStream, css::embed::ElementModes::READWRITE, + {}, bRepairPackage); } else if ( pImpl->xInputStream.is() ) { - pImpl->m_xZipStorage = ::comphelper::OStorageHelper::GetStorageOfFormatFromInputStream( ZIP_STORAGE_FORMAT_STRING, pImpl->xInputStream ); + pImpl->m_xZipStorage + = ::comphelper::OStorageHelper::GetStorageOfFormatFromInputStream( + ZIP_STORAGE_FORMAT_STRING, pImpl->xInputStream, {}, bRepairPackage); } } catch( const uno::Exception& ) diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index ea1063ea81..17ee6bf621 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -400,6 +400,7 @@ void SfxObjectShell::PrepareSecondTryLoad_Impl() { // only for internal use pImpl->m_xDocStorage.clear(); + pImpl->mxObjectContainer.reset(); pImpl->m_bIsInit = false; ResetError(); } diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 985af53135..062c594f2c 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -2510,7 +2510,7 @@ void SAL_CALL SfxBaseModel::removeEventListener( const Reference< document::XEve { SfxModelGuard aGuard( *this ); - m_pData->m_aEventListeners.removeInterface( aListener ); + m_pData->m_aDocumentEventListeners1.removeInterface( aListener ); } // XShapeEventBroadcaster |