summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsd/source/ui/slideshow/slideshow.cxx8
-rwxr-xr-xvcl/source/window/wrkwin.cxx14
2 files changed, 20 insertions, 2 deletions
diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx
index 7bee71e35014..9a8e5f9749a5 100755
--- a/sd/source/ui/slideshow/slideshow.cxx
+++ b/sd/source/ui/slideshow/slideshow.cxx
@@ -735,6 +735,12 @@ void SAL_CALL SlideShow::end() throw(RuntimeException)
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(RuntimeException)
}
}
- xController->dispose();
-
if( pFullScreenViewShellBase )
{
PresentationViewShell* pShell = NULL;
diff --git a/vcl/source/window/wrkwin.cxx b/vcl/source/window/wrkwin.cxx
index 5c50652afbe5..df5fdcd47c06 100755
--- a/vcl/source/window/wrkwin.cxx
+++ b/vcl/source/window/wrkwin.cxx
@@ -36,6 +36,8 @@
// 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>
@@ -190,6 +192,18 @@ void WorkWindow::ShowFullScreenMode( sal_Bool bFullScreenMode, sal_Int32 nDispla
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 );
}