[Libreoffice-commits] core.git: sw/source
Bjoern Michaelsen
bjoern.michaelsen at libreoffice.org
Sat Apr 14 20:16:01 UTC 2018
sw/source/core/access/accnotextframe.cxx | 7 ++++---
sw/source/core/access/accnotextframe.hxx | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
New commits:
commit 3fb48f0b6a542bb6d91cc35c0dbd3454758ffb2d
Author: Bjoern Michaelsen <bjoern.michaelsen at libreoffice.org>
Date: Sat Apr 14 08:34:18 2018 +0200
SwAccessibleNoTextFrame: use WriterMultiListener instead of SwDepend
Change-Id: I3cdccfbba8198934beb3a03b80dc2ea94448ed6f
Reviewed-on: https://gerrit.libreoffice.org/52866
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen at libreoffice.org>
diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx
index 4e8c9207a85a..8abe5e18208c 100644
--- a/sw/source/core/access/accnotextframe.cxx
+++ b/sw/source/core/access/accnotextframe.cxx
@@ -60,11 +60,12 @@ SwAccessibleNoTextFrame::SwAccessibleNoTextFrame(
sal_Int16 nInitRole,
const SwFlyFrame* pFlyFrame ) :
SwAccessibleFrameBase( pInitMap, nInitRole, pFlyFrame ),
- m_aDepend( this, const_cast < SwNoTextNode * >( GetNoTextNode() ) ),
+ m_aListener(*this),
msTitle(),
msDesc()
{
const SwNoTextNode* pNd = GetNoTextNode();
+ m_aListener.StartListening(const_cast<SwNoTextNode*>(pNd));
// #i73249#
// consider new attributes Title and Description
if( pNd )
@@ -102,7 +103,7 @@ void SwAccessibleNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem
return;
const SwNoTextNode *pNd = GetNoTextNode();
- OSL_ENSURE( pNd == m_aDepend.GetRegisteredIn(), "invalid frame" );
+ assert( m_aListener.IsListeningTo(pNd) && "invalid frame" );
switch( nWhich )
{
// #i73249#
@@ -163,7 +164,7 @@ void SwAccessibleNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem
void SwAccessibleNoTextFrame::Dispose(bool bRecursive, bool bCanSkipInvisible)
{
SolarMutexGuard aGuard;
- m_aDepend.EndListeningAll();
+ m_aListener.EndListeningAll();
SwAccessibleFrameBase::Dispose(bRecursive, bCanSkipInvisible);
}
diff --git a/sw/source/core/access/accnotextframe.hxx b/sw/source/core/access/accnotextframe.hxx
index 431f16f87a3f..e5bf0818a5d1 100644
--- a/sw/source/core/access/accnotextframe.hxx
+++ b/sw/source/core/access/accnotextframe.hxx
@@ -39,7 +39,7 @@ class SwAccessibleNoTextFrame : public SwAccessibleFrameBase,
{
friend class SwAccessibleNoTextHyperlink;
css::uno::Reference< css::accessibility::XAccessibleHyperlink > m_xHyperlink;
- SwDepend m_aDepend;
+ sw::WriterMultiListener m_aListener;
OUString msTitle;
OUString msDesc;
More information about the Libreoffice-commits
mailing list