diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-03-14 23:48:14 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-10 11:04:23 +0100 |
commit | 3b416a7f845e7fda384951c1ac37ac9d47fe9354 (patch) | |
tree | 1846950c88f424f5bdca03bfa2c8f62ae8988607 /include/toolkit | |
parent | 60fcbc1af412b56f95561e26aff2cc63dd81b2aa (diff) |
svtools: switch UNO pieces to use VclPtr enabled toolkit.
Change-Id: Ib243b14e3476d3a65ad1414e3843511420201c7c
Diffstat (limited to 'include/toolkit')
-rw-r--r-- | include/toolkit/awt/vclxaccessiblecomponent.hxx | 4 | ||||
-rw-r--r-- | include/toolkit/awt/vclxdevice.hxx | 2 | ||||
-rw-r--r-- | include/toolkit/awt/vclxwindow.hxx | 2 |
3 files changed, 6 insertions, 2 deletions
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<vcl::Window> 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<OutputDevice> pOutDev ) { mpOutputDevice = pOutDev; } + void SetOutputDevice( const VclPtr<OutputDevice> &pOutDev ) { mpOutputDevice = pOutDev; } VclPtr<OutputDevice> 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<vcl::Window> 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 { |