summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-08-30 12:29:48 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-08-30 17:49:35 +0200
commit129e395935bf7330a1fe84986dd78502af36e07e (patch)
tree9f56e052b6a88eb425c578a44b2f69c3ec87b202 /svtools
parent3c58ea89f4bbf7ec9a0ea88a8b753209ff68af64 (diff)
make IAccessibleBrowseBox extend cppu::WeakImplHelper
i.e. push this up from the implementation class AccessibleBrowseBoxAccess to the interface class. Which means we don't need the getMyself helper method, and make the memory management simpler. Change-Id: Icecb83834bb3f5304908bbd3682b3d2ea06dbfe0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156285 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/brwbox/brwbox3.cxx8
-rw-r--r--svtools/source/brwbox/brwimpl.hxx4
2 files changed, 4 insertions, 8 deletions
diff --git a/svtools/source/brwbox/brwbox3.cxx b/svtools/source/brwbox/brwbox3.cxx
index 4a5a8531e6ac..32ab1807ac69 100644
--- a/svtools/source/brwbox/brwbox3.cxx
+++ b/svtools/source/brwbox/brwbox3.cxx
@@ -97,11 +97,7 @@ Reference< XAccessible > BrowseBox::CreateAccessible()
}
}
- Reference< XAccessible > xAccessible;
- if ( m_pImpl->m_pAccessible )
- xAccessible = m_pImpl->m_pAccessible->getMyself();
-
- return xAccessible;
+ return m_pImpl->m_pAccessible;
}
@@ -427,7 +423,7 @@ void BrowseBox::commitBrowseBoxEvent( sal_Int16 _nEventId, const Any& _rNewValue
bool BrowseBox::isAccessibleAlive( ) const
{
- return ( nullptr != m_pImpl->m_pAccessible ) && m_pImpl->m_pAccessible->isAlive();
+ return m_pImpl->m_pAccessible && m_pImpl->m_pAccessible->isAlive();
}
// IAccessibleTableProvider
diff --git a/svtools/source/brwbox/brwimpl.hxx b/svtools/source/brwbox/brwimpl.hxx
index e822d7ef52c2..8c7017675a3f 100644
--- a/svtools/source/brwbox/brwimpl.hxx
+++ b/svtools/source/brwbox/brwimpl.hxx
@@ -55,12 +55,12 @@ namespace svt
public:
vcl::AccessibleFactoryAccess m_aFactoryAccess;
- vcl::IAccessibleBrowseBox* m_pAccessible;
+ rtl::Reference<vcl::IAccessibleBrowseBox> m_pAccessible;
THeaderCellMap m_aColHeaderCellMap;
THeaderCellMap m_aRowHeaderCellMap;
public:
- BrowseBoxImpl() : m_pAccessible(nullptr)
+ BrowseBoxImpl()
{
}