summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-02-01 13:35:43 +0600
committerMike Kaganski <mike.kaganski@collabora.com>2024-02-01 12:19:20 +0100
commit6bddbe51cee5c4aea023cc68771800f46a4aad2f (patch)
tree688b17f520697eaa1cf86b3070826a094604bae0
parentFix typo (diff)
downloadcore-6bddbe51cee5c4aea023cc68771800f46a4aad2f.tar.gz
core-6bddbe51cee5c4aea023cc68771800f46a4aad2f.zip
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>
-rw-r--r--sfx2/source/doc/objstor.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 1d9401714acf..5a300dd164ad 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -399,6 +399,7 @@ void SfxObjectShell::PrepareSecondTryLoad_Impl()
{
// only for internal use
pImpl->m_xDocStorage.clear();
+ pImpl->mxObjectContainer.reset();
pImpl->m_bIsInit = false;
ResetError();
}