summaryrefslogtreecommitdiff
path: root/include/toolkit
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-01-25 20:25:51 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-01-25 20:21:48 +0100
commit1aa31294b2d3fb562ba33d5d873da62439944f07 (patch)
tree79a604d51b0c54768c07ed8c4643cf43b29d8fca /include/toolkit
parent2dbc9266ec2207c2719c0104168cfcad9f6948da (diff)
avoid some ref-counting
can just return a pointer here, instead of VclPtr. Change-Id: I9ab8962cbbe84ed4dfcfd658a6d758112914cb89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109923 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/toolkit')
-rw-r--r--include/toolkit/awt/vclxaccessiblecomponent.hxx10
-rw-r--r--include/toolkit/awt/vclxwindow.hxx10
-rw-r--r--include/toolkit/helper/vclunohelper.hxx6
3 files changed, 13 insertions, 13 deletions
diff --git a/include/toolkit/awt/vclxaccessiblecomponent.hxx b/include/toolkit/awt/vclxaccessiblecomponent.hxx
index b9cf5ec6bacc..bacaa941e96a 100644
--- a/include/toolkit/awt/vclxaccessiblecomponent.hxx
+++ b/include/toolkit/awt/vclxaccessiblecomponent.hxx
@@ -72,11 +72,11 @@ public:
virtual ~VCLXAccessibleComponent() override;
VCLXWindow* GetVCLXWindow() const;
- 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() ) ); }
+ vcl::Window* GetWindow() const;
+ template< class derived_type > derived_type* GetAs() const {
+ return static_cast< derived_type * >( GetWindow() ); }
+ template< class derived_type > derived_type* GetAsDynamic() const {
+ return dynamic_cast< derived_type * >( GetWindow() ); }
virtual void SAL_CALL disposing() override;
diff --git a/include/toolkit/awt/vclxwindow.hxx b/include/toolkit/awt/vclxwindow.hxx
index bc93f391f8ce..090a52cde8d4 100644
--- a/include/toolkit/awt/vclxwindow.hxx
+++ b/include/toolkit/awt/vclxwindow.hxx
@@ -122,11 +122,11 @@ public:
virtual ~VCLXWindow() override;
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 {
- return VclPtr< derived_type >( dynamic_cast< derived_type * >( GetOutputDevice().get() ) ); }
- VclPtr<vcl::Window> GetWindow() const { return GetAs<vcl::Window>(); }
+ template< class derived_type > derived_type* GetAs() const {
+ return static_cast< derived_type * >( GetOutputDevice().get() ); }
+ template< class derived_type > derived_type* GetAsDynamic() const {
+ return dynamic_cast< derived_type * >( GetOutputDevice().get() ); }
+ vcl::Window* GetWindow() const { return GetAs<vcl::Window>(); }
void suspendVclEventListening( );
void resumeVclEventListening( );
diff --git a/include/toolkit/helper/vclunohelper.hxx b/include/toolkit/helper/vclunohelper.hxx
index 6bdffe9f1fec..75af557dc801 100644
--- a/include/toolkit/helper/vclunohelper.hxx
+++ b/include/toolkit/helper/vclunohelper.hxx
@@ -79,9 +79,9 @@ public:
static css::uno::Reference< css::awt::XBitmap> CreateVCLXBitmap( const BitmapEx& rBitmap );
// Window
- static VclPtr< vcl::Window > GetWindow( const css::uno::Reference< css::awt::XWindow>& rxWindow );
- static VclPtr< vcl::Window > GetWindow( const css::uno::Reference< css::awt::XWindow2>& rxWindow2 );
- static VclPtr< vcl::Window > GetWindow( const css::uno::Reference< css::awt::XWindowPeer>& rxWindowPeer );
+ static vcl::Window* GetWindow( const css::uno::Reference< css::awt::XWindow>& rxWindow );
+ static vcl::Window* GetWindow( const css::uno::Reference< css::awt::XWindow2>& rxWindow2 );
+ static vcl::Window* GetWindow( const css::uno::Reference< css::awt::XWindowPeer>& rxWindowPeer );
static css::uno::Reference< css::awt::XWindow> GetInterface( vcl::Window* pWindow );
// OutputDevice