diff options
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 02a4b9a0beff..b3792d9ca034 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -1198,7 +1198,10 @@ void SAL_CALL SfxBaseModel::connectController( const uno::Reference< frame::XCon { SfxViewFrame* pViewFrame = SfxViewFrame::Get( xController, GetObjectShell() ); ENSURE_OR_THROW( pViewFrame, "SFX document without SFX view!?" ); + bool bOldLock = pViewFrame->GetDispatcher()->IsLocked(); + pViewFrame->GetDispatcher()->Lock(sal_True); pViewFrame->UpdateDocument_Impl(); + pViewFrame->GetDispatcher()->Lock(bOldLock); const String sDocumentURL = GetObjectShell()->GetMedium()->GetName(); if ( sDocumentURL.Len() ) SFX_APP()->Broadcast( SfxStringHint( SID_OPENURL, sDocumentURL ) ); |