incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p..@apache.org
Subject svn commit: r1195527 - in /incubator/ooo/trunk/main: sd/source/ui/slideshow/slideshow.cxx vcl/source/window/wrkwin.cxx
Date Mon, 31 Oct 2011 15:43:32 GMT
Author: pfg
Date: Mon Oct 31 15:43:32 2011
New Revision: 1195527

URL: http://svn.apache.org/viewvc?rev=1195527&view=rev
Log:
i94007 - Multiscreen slideshow crashes on exit. Thanks to Andre for the review.

Modified:
    incubator/ooo/trunk/main/sd/source/ui/slideshow/slideshow.cxx
    incubator/ooo/trunk/main/vcl/source/window/wrkwin.cxx

Modified: incubator/ooo/trunk/main/sd/source/ui/slideshow/slideshow.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/ui/slideshow/slideshow.cxx?rev=1195527&r1=1195526&r2=1195527&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/ui/slideshow/slideshow.cxx (original)
+++ incubator/ooo/trunk/main/sd/source/ui/slideshow/slideshow.cxx Mon Oct 31 15:43:32 2011
@@ -735,6 +735,12 @@ void SAL_CALL SlideShow::end() throw(Run
 		ViewShellBase* pFullScreenViewShellBase = mpFullScreenViewShellBase;
 		mpFullScreenViewShellBase = 0;
 
+        // dispose before fullscreen window changes screens
+        // (potentially). If this needs to be moved behind
+        // pWorkWindow->StartPresentationMode() again, read issue
+        // i94007 & implement the solution outlined there.
+		xController->dispose();
+        
 		if( pFullScreenViewShellBase )
 		{
 			PresentationViewShell* pShell = dynamic_cast<PresentationViewShell*>(pFullScreenViewShellBase->GetMainViewShell().get());
@@ -749,8 +755,6 @@ void SAL_CALL SlideShow::end() throw(Run
 			}
 		}
 
-		xController->dispose();
-
 		if( pFullScreenViewShellBase )
 		{
 			PresentationViewShell* pShell = NULL;

Modified: incubator/ooo/trunk/main/vcl/source/window/wrkwin.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/vcl/source/window/wrkwin.cxx?rev=1195527&r1=1195526&r2=1195527&view=diff
==============================================================================
--- incubator/ooo/trunk/main/vcl/source/window/wrkwin.cxx (original)
+++ incubator/ooo/trunk/main/vcl/source/window/wrkwin.cxx Mon Oct 31 15:43:32 2011
@@ -36,7 +36,9 @@
 // declare system types in sysdata.hxx
 #include <svsys.h>
 #include <vcl/sysdata.hxx>
-
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/rendering/XCanvas.hpp>
+    
 #include <svdata.hxx>
 #include <salframe.hxx>
 #include <brdwin.hxx>
@@ -190,6 +192,18 @@ void WorkWindow::ShowFullScreenMode( sal
     mbFullScreenMode = bFullScreenMode != 0;
     if ( !mbSysChild )
     {
+        // Dispose of the canvas implementation, which might rely on
+        // screen-specific system data.
+        com::sun::star::uno::Reference< com::sun::star::rendering::XCanvas > xCanvas(
mpWindowImpl->mxCanvas );
+        if( xCanvas.is() )
+        {
+            com::sun::star::uno::Reference< com::sun::star::lang::XComponent > 
+                xCanvasComponent( xCanvas,
+                                  com::sun::star::uno::UNO_QUERY );
+            if( xCanvasComponent.is() )
+                xCanvasComponent->dispose();
+        }
+        
         mpWindowImpl->mpFrameWindow->mpWindowImpl->mbWaitSystemResize = sal_True;
         ImplGetFrame()->ShowFullScreen( bFullScreenMode, nDisplay );
     }



Mime
View raw message