merge the formfield patch from ooo-build
[ooovba.git] / applied_patches / 0544-timely-canvas-disposing.diff
blob614af46317c8bbbf6aeb538bfd7d6aff856a29ca
1 --- sd/source/ui/slideshow/slideshow.cxx.old 2009-04-02 10:45:55.000000000 +0000
2 +++ sd/source/ui/slideshow/slideshow.cxx 2009-04-06 16:42:19.000000000 +0000
3 @@ -701,6 +701,13 @@ void SAL_CALL SlideShow::end() throw(Run
4 ViewShellBase* pFullScreenViewShellBase = mpFullScreenViewShellBase;
5 mpFullScreenViewShellBase = 0;
7 + // dispose before fullscreen window changes screens
8 + // (potentially). If this needs to be moved behind
9 + // pWorkWindow->StartPresentationMode() again, read issue
10 + // pWorkWindow->i94007 & implement the solution outlined
11 + // there.
12 + xController->dispose();
14 if( pFullScreenViewShellBase )
16 PresentationViewShell* pShell = dynamic_cast<PresentationViewShell*>(pFullScreenViewShellBase->GetMainViewShell().get());
17 @@ -715,8 +722,6 @@ void SAL_CALL SlideShow::end() throw(Run
21 - xController->dispose();
23 if( pFullScreenViewShellBase )
25 PresentationViewShell* pShell = NULL;
26 --- vcl/source/window/wrkwin.cxx.old 2009-04-02 10:44:21.000000000 +0000
27 +++ vcl/source/window/wrkwin.cxx 2009-04-06 16:42:19.000000000 +0000
28 @@ -46,6 +46,8 @@
29 #include <vcl/window.h>
30 #include <vcl/wrkwin.hxx>
31 #include <vcl/sysdata.hxx>
32 +#include <com/sun/star/lang/XComponent.hpp>
33 +#include <com/sun/star/rendering/XCanvas.hpp>
35 // =======================================================================
37 @@ -195,6 +197,18 @@ void WorkWindow::ShowFullScreenMode( BOO
38 mbFullScreenMode = bFullScreenMode != 0;
39 if ( !mbSysChild )
41 + // Dispose of the canvas implementation, which might rely on
42 + // screen-specific system data.
43 + com::sun::star::uno::Reference< com::sun::star::rendering::XCanvas > xCanvas( mpWindowImpl->mxCanvas );
44 + if( xCanvas.is() )
45 + {
46 + com::sun::star::uno::Reference< com::sun::star::lang::XComponent >
47 + xCanvasComponent( xCanvas,
48 + com::sun::star::uno::UNO_QUERY );
49 + if( xCanvasComponent.is() )
50 + xCanvasComponent->dispose();
51 + }
53 mpWindowImpl->mpFrameWindow->mpWindowImpl->mbWaitSystemResize = TRUE;
54 ImplGetFrame()->ShowFullScreen( bFullScreenMode, nDisplay );