diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-02-26 15:22:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-02-27 17:19:15 +0100 |
commit | 26d56470e6af28b9f537690e1f97ec827b1a4737 (patch) | |
tree | 65cd9113a82b4951de4c6809a1277f89414eebe0 | |
parent | 6e6f098cb20924becebb11f56fb310b0fb6a7ced (diff) |
loplugin:refcounting in accessibility
Change-Id: I0a17e149487cf05fb5e6d004a6402a2a5215a79b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111632
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
9 files changed, 10 insertions, 10 deletions
diff --git a/accessibility/inc/extended/AccessibleBrowseBox.hxx b/accessibility/inc/extended/AccessibleBrowseBox.hxx index ebaf71991992..5b676ecf5bd3 100644 --- a/accessibility/inc/extended/AccessibleBrowseBox.hxx +++ b/accessibility/inc/extended/AccessibleBrowseBox.hxx @@ -169,7 +169,7 @@ protected: /** This method creates and returns an accessible table. @return An AccessibleBrowseBoxTable. */ - virtual AccessibleBrowseBoxTable* createAccessibleTable(); + virtual rtl::Reference<AccessibleBrowseBoxTable> createAccessibleTable(); private: /// the css::accessibility::XAccessible which created the AccessibleBrowseBox diff --git a/accessibility/inc/extended/AccessibleGridControl.hxx b/accessibility/inc/extended/AccessibleGridControl.hxx index 5584fe5ed01b..34d0d0ffaf1c 100644 --- a/accessibility/inc/extended/AccessibleGridControl.hxx +++ b/accessibility/inc/extended/AccessibleGridControl.hxx @@ -135,7 +135,7 @@ private: /** This method creates and returns an accessible table. @return An AccessibleGridControlTable. */ - AccessibleGridControlTable* createAccessibleTable(); + rtl::Reference<AccessibleGridControlTable> createAccessibleTable(); /// the css::accessibility::XAccessible which created the AccessibleGridControl css::uno::WeakReference< css::accessibility::XAccessible > m_aCreator; diff --git a/accessibility/inc/extended/accessibletablistbox.hxx b/accessibility/inc/extended/accessibletablistbox.hxx index c7ae77b03c77..02704ea872c2 100644 --- a/accessibility/inc/extended/accessibletablistbox.hxx +++ b/accessibility/inc/extended/accessibletablistbox.hxx @@ -86,7 +86,7 @@ private: /** This method creates and returns an accessible table. @return An AccessibleBrowseBoxTable. */ - virtual AccessibleBrowseBoxTable* createAccessibleTable() override; + virtual rtl::Reference<AccessibleBrowseBoxTable> createAccessibleTable() override; }; diff --git a/accessibility/source/extended/AccessibleBrowseBox.cxx b/accessibility/source/extended/AccessibleBrowseBox.cxx index c6fb251b849e..5500397b70c6 100644 --- a/accessibility/source/extended/AccessibleBrowseBox.cxx +++ b/accessibility/source/extended/AccessibleBrowseBox.cxx @@ -240,7 +240,7 @@ AccessibleBrowseBox::implGetFixedChild( sal_Int32 nChildIndex ) return xRet; } -AccessibleBrowseBoxTable* AccessibleBrowseBox::createAccessibleTable() +rtl::Reference<AccessibleBrowseBoxTable> AccessibleBrowseBox::createAccessibleTable() { css::uno::Reference< css::accessibility::XAccessible > xCreator(m_aCreator); OSL_ENSURE( xCreator.is(), "extended/AccessibleBrowseBox::createAccessibleTable: my creator died - how this?" ); diff --git a/accessibility/source/extended/AccessibleGridControl.cxx b/accessibility/source/extended/AccessibleGridControl.cxx index 124ef5d4f69f..22e6539b8afd 100644 --- a/accessibility/source/extended/AccessibleGridControl.cxx +++ b/accessibility/source/extended/AccessibleGridControl.cxx @@ -260,7 +260,7 @@ AccessibleGridControl::implGetFixedChild( sal_Int32 nChildIndex ) return xRet; } -AccessibleGridControlTable* AccessibleGridControl::createAccessibleTable() +rtl::Reference<AccessibleGridControlTable> AccessibleGridControl::createAccessibleTable() { css::uno::Reference< css::accessibility::XAccessible > xCreator(m_aCreator); OSL_ENSURE( xCreator.is(), "extended/AccessibleGridControl::createAccessibleTable: my creator died - how this?" ); diff --git a/accessibility/source/extended/accessibletablistbox.cxx b/accessibility/source/extended/accessibletablistbox.cxx index 4bcfa92f7378..f5cdfc75837b 100644 --- a/accessibility/source/extended/accessibletablistbox.cxx +++ b/accessibility/source/extended/accessibletablistbox.cxx @@ -58,7 +58,7 @@ namespace accessibility } } - AccessibleBrowseBoxTable* AccessibleTabListBox::createAccessibleTable() + rtl::Reference<AccessibleBrowseBoxTable> AccessibleTabListBox::createAccessibleTable() { return new AccessibleTabListBoxTable( this, *m_pTabListBox ); } diff --git a/accessibility/source/standard/vclxaccessibletoolbox.cxx b/accessibility/source/standard/vclxaccessibletoolbox.cxx index b04f2a7417de..acd2c4f18899 100644 --- a/accessibility/source/standard/vclxaccessibletoolbox.cxx +++ b/accessibility/source/standard/vclxaccessibletoolbox.cxx @@ -116,7 +116,7 @@ namespace DECLARE_XTYPEPROVIDER( ) // OAccessibleWrapper - virtual OAccessibleContextWrapper* createAccessibleContext( + virtual rtl::Reference<OAccessibleContextWrapper> createAccessibleContext( const css::uno::Reference< css::accessibility::XAccessibleContext >& _rxInnerContext ) override; @@ -127,7 +127,7 @@ namespace IMPLEMENT_FORWARD_XINTERFACE2( OToolBoxWindowItem, OAccessibleWrapper, OToolBoxWindowItem_Base ) IMPLEMENT_FORWARD_XTYPEPROVIDER2( OToolBoxWindowItem, OAccessibleWrapper, OToolBoxWindowItem_Base ) - OAccessibleContextWrapper* OToolBoxWindowItem::createAccessibleContext( + rtl::Reference<OAccessibleContextWrapper> OToolBoxWindowItem::createAccessibleContext( const Reference< XAccessibleContext >& _rxInnerContext ) { return new OToolBoxWindowItemContext( m_nIndexInParent, getComponentContext(), _rxInnerContext, this, getParent() ); diff --git a/comphelper/source/misc/accessiblewrapper.cxx b/comphelper/source/misc/accessiblewrapper.cxx index 19a118fd4bf9..9aa1b48e2f1e 100644 --- a/comphelper/source/misc/accessiblewrapper.cxx +++ b/comphelper/source/misc/accessiblewrapper.cxx @@ -306,7 +306,7 @@ namespace comphelper } - OAccessibleContextWrapper* OAccessibleWrapper::createAccessibleContext( const Reference< XAccessibleContext >& _rxInnerContext ) + rtl::Reference<OAccessibleContextWrapper> OAccessibleWrapper::createAccessibleContext( const Reference< XAccessibleContext >& _rxInnerContext ) { return new OAccessibleContextWrapper( getComponentContext(), _rxInnerContext, this, m_xParentAccessible ); } diff --git a/include/comphelper/accessiblewrapper.hxx b/include/comphelper/accessiblewrapper.hxx index dd7da31a0c46..ea9a0af0209b 100644 --- a/include/comphelper/accessiblewrapper.hxx +++ b/include/comphelper/accessiblewrapper.hxx @@ -107,7 +107,7 @@ namespace comphelper getParent() const { return m_xParentAccessible; } // own overridables - virtual OAccessibleContextWrapper* createAccessibleContext( + virtual rtl::Reference<OAccessibleContextWrapper> createAccessibleContext( const css::uno::Reference< css::accessibility::XAccessibleContext >& _rxInnerContext ); |