From 3b416a7f845e7fda384951c1ac37ac9d47fe9354 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Sat, 14 Mar 2015 23:48:14 +0000 Subject: svtools: switch UNO pieces to use VclPtr enabled toolkit. Change-Id: Ib243b14e3476d3a65ad1414e3843511420201c7c --- include/toolkit/awt/vclxaccessiblecomponent.hxx | 4 ++++ include/toolkit/awt/vclxdevice.hxx | 2 +- include/toolkit/awt/vclxwindow.hxx | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/toolkit/awt/vclxaccessiblecomponent.hxx b/include/toolkit/awt/vclxaccessiblecomponent.hxx index d168ee133199..0fdc2a8f083f 100644 --- a/include/toolkit/awt/vclxaccessiblecomponent.hxx +++ b/include/toolkit/awt/vclxaccessiblecomponent.hxx @@ -85,6 +85,10 @@ public: VCLXWindow* GetVCLXWindow() const { return mpVCLXindow; } VclPtr GetWindow() const; + template< class derived_type > VclPtr< derived_type > GetAs() const { + return VclPtr< derived_type >( static_cast< derived_type * >( GetWindow().get() ) ); } + template< class derived_type > VclPtr< derived_type > GetAsDynamic() const { + return VclPtr< derived_type >( dynamic_cast< derived_type * >( GetWindow().get() ) ); } virtual void SAL_CALL disposing() SAL_OVERRIDE; diff --git a/include/toolkit/awt/vclxdevice.hxx b/include/toolkit/awt/vclxdevice.hxx index 751ffd8280b1..47a99ea1995e 100644 --- a/include/toolkit/awt/vclxdevice.hxx +++ b/include/toolkit/awt/vclxdevice.hxx @@ -59,7 +59,7 @@ public: VCLXDevice(); virtual ~VCLXDevice(); - void SetOutputDevice( VclPtr pOutDev ) { mpOutputDevice = pOutDev; } + void SetOutputDevice( const VclPtr &pOutDev ) { mpOutputDevice = pOutDev; } VclPtr GetOutputDevice() const { return mpOutputDevice; } void SetCreatedWithToolkit( bool bCreatedWithToolkit ); diff --git a/include/toolkit/awt/vclxwindow.hxx b/include/toolkit/awt/vclxwindow.hxx index dfc42aa54f99..1ab1f9e8a8d2 100644 --- a/include/toolkit/awt/vclxwindow.hxx +++ b/include/toolkit/awt/vclxwindow.hxx @@ -128,7 +128,7 @@ public: VCLXWindow( bool bWithDefaultProps = false ); virtual ~VCLXWindow(); - virtual void SetWindow( VclPtr pWindow ); + virtual void SetWindow( const VclPtr< vcl::Window > &pWindow ); template< class derived_type > VclPtr< derived_type > GetAs() const { return VclPtr< derived_type >( static_cast< derived_type * >( GetOutputDevice().get() ) ); } template< class derived_type > VclPtr< derived_type > GetAsDynamic() const { -- cgit