diff options
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 533650751d75..adcea5aaf752 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -1680,7 +1680,16 @@ void SAL_CALL SfxBaseModel::storeAsURL( const OUString& rURL SfxSaveGuard aSaveGuard(this, m_pData.get()); - impl_store( rURL, rArgs, false ); + utl::MediaDescriptor aDescriptor(rArgs); + bool bOnMainThread = aDescriptor.getUnpackedValueOrDefault("OnMainThread", false); + if (bOnMainThread) + { + vcl::solarthread::syncExecute([this, rURL, rArgs]() { impl_store(rURL, rArgs, false); }); + } + else + { + impl_store(rURL, rArgs, false); + } Sequence< beans::PropertyValue > aSequence ; TransformItems( SID_OPENDOC, *m_pData->m_pObjectShell->GetMedium()->GetItemSet(), aSequence ); |