summaryrefslogtreecommitdiff
path: root/toolkit/source/awt/vclxwindow.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/source/awt/vclxwindow.cxx')
-rw-r--r--toolkit/source/awt/vclxwindow.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 3d7a22dbeb23..ba8e5b3feb11 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -366,7 +366,7 @@ void VCLXWindow::ImplExecuteAsyncWithoutSolarLock( const Callback& i_callback )
return mpImpl->getAccessibleFactory().getFactory();
}
-void VCLXWindow::SetWindow( vcl::Window* pWindow )
+void VCLXWindow::SetWindow( const VclPtr<vcl::Window> &pWindow )
{
if ( GetWindow() )
{
@@ -922,10 +922,11 @@ void VCLXWindow::dispose( ) throw(::com::sun::star::uno::RuntimeException, std:
if ( GetWindow() )
{
- OutputDevice* pOutDev = GetOutputDevice();
+ VclPtr<OutputDevice> pOutDev = GetOutputDevice();
SetWindow( NULL ); // so that handlers are logged off, if necessary (virtual)
SetOutputDevice( pOutDev );
- DestroyOutputDevice();
+ pOutDev.disposeAndClear();
+ SetOutputDevice( NULL );
}
// #i14103# dispose the accessible context after the window has been destroyed,
@@ -1921,7 +1922,7 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const ::com::sun::st
{
case BASEPROPERTY_REFERENCE_DEVICE:
{
- Control* pControl = dynamic_cast< Control* >( GetWindow() );
+ VclPtr<Control> pControl = GetAsDynamic<Control >();
OSL_ENSURE( pControl, "VCLXWindow::setProperty( RefDevice ): need a Control for this!" );
if ( !pControl )
break;