| commit | c07f2a047e9201bbc0c2d55a2dada264b2094846 | [log] |
|---|---|---|
| author | Mike Kaganski <mike.kaganski@collabora.com> | Thu Feb 01 13:35:43 2024 +0600 |
| committer | Michael Stahl <michael.stahl@allotropia.de> | Fri Feb 02 13:19:43 2024 +0100 |
| tree | 2e3bc98cfcb61f9ea3be7739f2f75708aa5dbffb | |
| parent | 0bb20afe3590838ba8aef204033ac95a047ba710 [diff] |
tdf#159496: clear mxObjectContainer in PrepareSecondTryLoad_Impl The problem here is that the object container has own reference to the storage object. In SfxBaseModel::load, when preparing for a second try, the storage gets disposed, and a cleanup is performed; but previously, the reference to the disposed storage was used in the object container, and thus generated a failure when it was used to import the OLE. Clearing it allows to re-create it properly, with the updated storage. Change-Id: I08b7503d79240ccc51b253fe1f4e99a0232995b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162866 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 6bddbe51cee5c4aea023cc68771800f46a4aad2f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162828 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index ea1063e..17ee6bf 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(); }