Kaydet (Commit) 5679c31c authored tarafından Michael Meeks's avatar Michael Meeks Kaydeden (comit) Andras Timar

tdf#91574 - fix slideshow presenter console lifecycle.

Change-Id: I9748579fed8fd4dcf505bc79e48e40c1255bd22e
Reviewed-on: https://gerrit.libreoffice.org/16836Reviewed-by: 's avatarDavid Ostrovsky <david@ostrovsky.org>
Reviewed-by: 's avatarMichael Meeks <michael.meeks@collabora.com>
Tested-by: 's avatarMichael Meeks <michael.meeks@collabora.com>
üst c20a76a0
...@@ -42,8 +42,7 @@ FullScreenPane::FullScreenPane ( ...@@ -42,8 +42,7 @@ FullScreenPane::FullScreenPane (
const Reference<XResourceId>& rxPaneId, const Reference<XResourceId>& rxPaneId,
const vcl::Window* pViewShellWindow) const vcl::Window* pViewShellWindow)
: FrameWindowPane(rxPaneId,NULL), : FrameWindowPane(rxPaneId,NULL),
mxComponentContext(rxComponentContext), mxComponentContext(rxComponentContext)
mpWorkWindow(NULL)
{ {
vcl::Window* pParent = NULL; vcl::Window* pParent = NULL;
mpWorkWindow.reset(VclPtr<WorkWindow>::Create( mpWorkWindow.reset(VclPtr<WorkWindow>::Create(
...@@ -110,7 +109,7 @@ void SAL_CALL FullScreenPane::disposing() ...@@ -110,7 +109,7 @@ void SAL_CALL FullScreenPane::disposing()
{ {
Link<> aWindowEventHandler (LINK(this, FullScreenPane, WindowEventHandler)); Link<> aWindowEventHandler (LINK(this, FullScreenPane, WindowEventHandler));
mpWorkWindow->RemoveEventListener(aWindowEventHandler); mpWorkWindow->RemoveEventListener(aWindowEventHandler);
mpWorkWindow.reset(); mpWorkWindow.disposeAndClear();
} }
FrameWindowPane::disposing(); FrameWindowPane::disposing();
...@@ -186,7 +185,7 @@ IMPL_LINK(FullScreenPane, WindowEventHandler, VclWindowEvent*, pEvent) ...@@ -186,7 +185,7 @@ IMPL_LINK(FullScreenPane, WindowEventHandler, VclWindowEvent*, pEvent)
break; break;
case VCLEVENT_OBJECT_DYING: case VCLEVENT_OBJECT_DYING:
mpWorkWindow.reset(); mpWorkWindow.disposeAndClear();
break; break;
} }
return 1; return 1;
......
...@@ -73,10 +73,10 @@ Reference<awt::XWindow> SAL_CALL PresenterHelper::createWindow ( ...@@ -73,10 +73,10 @@ Reference<awt::XWindow> SAL_CALL PresenterHelper::createWindow (
sal_Bool bEnableParentClip) sal_Bool bEnableParentClip)
throw (css::uno::RuntimeException, std::exception) throw (css::uno::RuntimeException, std::exception)
{ {
vcl::Window* pParentWindow = VCLUnoHelper::GetWindow(rxParentWindow); VclPtr<vcl::Window> pParentWindow(VCLUnoHelper::GetWindow(rxParentWindow));
// Create a new window. // Create a new window.
vcl::Window* pWindow = NULL; VclPtr<vcl::Window> pWindow;
if (bCreateSystemChildWindow) if (bCreateSystemChildWindow)
{ {
pWindow = VclPtr<WorkWindow>::Create(pParentWindow, WB_SYSTEMCHILDWINDOW); pWindow = VclPtr<WorkWindow>::Create(pParentWindow, WB_SYSTEMCHILDWINDOW);
...@@ -91,7 +91,7 @@ Reference<awt::XWindow> SAL_CALL PresenterHelper::createWindow ( ...@@ -91,7 +91,7 @@ Reference<awt::XWindow> SAL_CALL PresenterHelper::createWindow (
{ {
// Make the frame window transparent and make the parent able to // Make the frame window transparent and make the parent able to
// draw behind it. // draw behind it.
if (pParentWindow != NULL) if (pParentWindow.get() != NULL)
pParentWindow->EnableChildTransparentMode(true); pParentWindow->EnableChildTransparentMode(true);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment