diff options
Diffstat (limited to 'sfx2/source/dialog/backingcomp.cxx')
-rw-r--r-- | sfx2/source/dialog/backingcomp.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sfx2/source/dialog/backingcomp.cxx b/sfx2/source/dialog/backingcomp.cxx index e8f49fb42652..f11d9ffac79d 100644 --- a/sfx2/source/dialog/backingcomp.cxx +++ b/sfx2/source/dialog/backingcomp.cxx @@ -403,8 +403,8 @@ void SAL_CALL BackingComp::attachFrame( /*IN*/ const css::uno::Reference< css::f // initialize the component and its parent window css::uno::Reference< css::awt::XWindow > xParentWindow = xFrame->getContainerWindow(); - WorkWindow* pParent = static_cast<WorkWindow*>(VCLUnoHelper::GetWindow(xParentWindow)); - vcl::Window* pWindow = VCLUnoHelper::GetWindow(m_xWindow); + VclPtr< WorkWindow > pParent = static_cast<WorkWindow*>(VCLUnoHelper::GetWindow(xParentWindow).get()); + VclPtr< vcl::Window > pWindow = VCLUnoHelper::GetWindow(m_xWindow); // disable full screen mode of the frame! if (pParent && pParent->IsFullScreenMode()) @@ -431,7 +431,7 @@ void SAL_CALL BackingComp::attachFrame( /*IN*/ const css::uno::Reference< css::f } // inform BackingWindow about frame - BackingWindow* pBack = dynamic_cast<BackingWindow*>(pWindow ); + BackingWindow* pBack = dynamic_cast<BackingWindow*>(pWindow.get()); if( pBack ) pBack->setOwningFrame( m_xFrame ); @@ -719,8 +719,8 @@ void SAL_CALL BackingComp::initialize( /*IN*/ const css::uno::Sequence< css::uno // create the component window vcl::Window* pParent = VCLUnoHelper::GetWindow(xParentWindow); - vcl::Window* pWindow = new BackingWindow(pParent); - m_xWindow = VCLUnoHelper::GetInterface(pWindow); + VclPtr<vcl::Window> pWindow = VclPtr<BackingWindow>::Create(pParent); + m_xWindow = VCLUnoHelper::GetInterface(pWindow); if (!m_xWindow.is()) throw css::uno::RuntimeException( @@ -800,7 +800,7 @@ void SAL_CALL BackingComp::dispatch( const css::util::URL& aURL, const css::uno: // Recalculate minimum width css::uno::Reference< css::awt::XWindow > xParentWindow = m_xFrame->getContainerWindow(); - WorkWindow* pParent = static_cast<WorkWindow*>(VCLUnoHelper::GetWindow(xParentWindow)); + VclPtr< WorkWindow > pParent = static_cast<WorkWindow*>(VCLUnoHelper::GetWindow(xParentWindow).get()); if( pParent ) { pParent->SetMinOutputSizePixel( Size( |