summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-07-07 22:35:46 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-07-08 13:37:37 +0000
commit7079f691a31caffff380610b3c77a2faa0bcf0b3 (patch)
treebf7f348986b3783569083ebccbad5fc780d3022a
parent16626008162545d3caec72fbffc4c19a79326a74 (diff)
tdf#91574 - fix slideshow presenter console lifecycle.
Change-Id: I9748579fed8fd4dcf505bc79e48e40c1255bd22e Reviewed-on: https://gerrit.libreoffice.org/16836 Reviewed-by: David Ostrovsky <david@ostrovsky.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r--sd/source/ui/framework/factories/FullScreenPane.cxx7
-rw-r--r--sd/source/ui/presenter/PresenterHelper.cxx6
2 files changed, 6 insertions, 7 deletions
diff --git a/sd/source/ui/framework/factories/FullScreenPane.cxx b/sd/source/ui/framework/factories/FullScreenPane.cxx
index 746be6603db2..b1540bca15e0 100644
--- a/sd/source/ui/framework/factories/FullScreenPane.cxx
+++ b/sd/source/ui/framework/factories/FullScreenPane.cxx
@@ -42,8 +42,7 @@ FullScreenPane::FullScreenPane (
const Reference<XResourceId>& rxPaneId,
const vcl::Window* pViewShellWindow)
: FrameWindowPane(rxPaneId,NULL),
- mxComponentContext(rxComponentContext),
- mpWorkWindow(NULL)
+ mxComponentContext(rxComponentContext)
{
vcl::Window* pParent = NULL;
mpWorkWindow.reset(VclPtr<WorkWindow>::Create(
@@ -110,7 +109,7 @@ void SAL_CALL FullScreenPane::disposing()
{
Link<> aWindowEventHandler (LINK(this, FullScreenPane, WindowEventHandler));
mpWorkWindow->RemoveEventListener(aWindowEventHandler);
- mpWorkWindow.reset();
+ mpWorkWindow.disposeAndClear();
}
FrameWindowPane::disposing();
@@ -186,7 +185,7 @@ IMPL_LINK(FullScreenPane, WindowEventHandler, VclWindowEvent*, pEvent)
break;
case VCLEVENT_OBJECT_DYING:
- mpWorkWindow.reset();
+ mpWorkWindow.disposeAndClear();
break;
}
return 1;
diff --git a/sd/source/ui/presenter/PresenterHelper.cxx b/sd/source/ui/presenter/PresenterHelper.cxx
index 60b7bcb701de..8b99c0b1f804 100644
--- a/sd/source/ui/presenter/PresenterHelper.cxx
+++ b/sd/source/ui/presenter/PresenterHelper.cxx
@@ -73,10 +73,10 @@ Reference<awt::XWindow> SAL_CALL PresenterHelper::createWindow (
sal_Bool bEnableParentClip)
throw (css::uno::RuntimeException, std::exception)
{
- vcl::Window* pParentWindow = VCLUnoHelper::GetWindow(rxParentWindow);
+ VclPtr<vcl::Window> pParentWindow(VCLUnoHelper::GetWindow(rxParentWindow));
// Create a new window.
- vcl::Window* pWindow = NULL;
+ VclPtr<vcl::Window> pWindow;
if (bCreateSystemChildWindow)
{
pWindow = VclPtr<WorkWindow>::Create(pParentWindow, WB_SYSTEMCHILDWINDOW);
@@ -91,7 +91,7 @@ Reference<awt::XWindow> SAL_CALL PresenterHelper::createWindow (
{
// Make the frame window transparent and make the parent able to
// draw behind it.
- if (pParentWindow != NULL)
+ if (pParentWindow.get() != NULL)
pParentWindow->EnableChildTransparentMode(true);
}