Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > cd8ce32c919af60229fca1d7f792c60e > files > 60

openoffice.org-3.2.0-12.35.fc13.src.rpm

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();
 			}