diff -ru sd.orig/source/ui/view/drviews1.cxx sd/source/ui/view/drviews1.cxx --- sd.orig/source/ui/view/drviews1.cxx 2009-12-15 12:17:56.000000000 +0000 +++ sd/source/ui/view/drviews1.cxx 2009-12-15 12:19:47.000000000 +0000 @@ -157,12 +157,32 @@ ViewShell::Deactivate(bIsMDIActivate); } +namespace +{ + class LockUI + { + private: + void Lock(bool bLock); + SfxViewFrame *mpFrame; + public: + LockUI(SfxViewFrame *pFrame) : mpFrame(pFrame) { Lock(true); } + ~LockUI() { Lock(false); } + + }; + + void LockUI::Lock(bool bLock) + { + if (!mpFrame) + return; + mpFrame->Enable( !bLock ); + } +} + /************************************************************************* |* |* Wird gerufen, wenn sich der Selektionszustand der View aendert |* \************************************************************************/ - void DrawViewShell::SelectionHasChanged (void) { Invalidate(); @@ -216,6 +236,8 @@ // we need to deselect it now if (!pOleObj) { + //#i47279# disable frame until after object has completed unload + LockUI aUILock(GetViewFrame()); pIPClient->DeactivateObject(); //HMHmpDrView->ShowMarkHdl(); }