From 26d56470e6af28b9f537690e1f97ec827b1a4737 Mon Sep 17 00:00:00 2001 From: Noel Date: Fri, 26 Feb 2021 15:22:28 +0200 Subject: loplugin:refcounting in accessibility Change-Id: I0a17e149487cf05fb5e6d004a6402a2a5215a79b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111632 Tested-by: Jenkins Reviewed-by: Noel Grandin --- accessibility/inc/extended/AccessibleBrowseBox.hxx | 2 +- accessibility/inc/extended/AccessibleGridControl.hxx | 2 +- accessibility/inc/extended/accessibletablistbox.hxx | 2 +- accessibility/source/extended/AccessibleBrowseBox.cxx | 2 +- accessibility/source/extended/AccessibleGridControl.cxx | 2 +- accessibility/source/extended/accessibletablistbox.cxx | 2 +- accessibility/source/standard/vclxaccessibletoolbox.cxx | 4 ++-- comphelper/source/misc/accessiblewrapper.cxx | 2 +- include/comphelper/accessiblewrapper.hxx | 2 +- 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 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 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 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 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 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 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 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 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 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 createAccessibleContext( const css::uno::Reference< css::accessibility::XAccessibleContext >& _rxInnerContext ); -- cgit