diff options
author | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2018-02-07 22:48:03 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2018-02-07 22:48:03 +0100 |
commit | 86ef25b38786b366413221a71b27f227670c1b65 (patch) | |
tree | 2275313ebe2a79ac9cf310d7fffff9f282f4f477 | |
parent | ec0fb10bc8cb01020bf407a342c4a4bf3d1ac2ec (diff) |
a11y SwDepends
Change-Id: Ibe53fcba2c7b3e52b68a50e66c26c559836948d2
-rw-r--r-- | sw/source/core/access/accnotextframe.cxx | 9 | ||||
-rw-r--r-- | sw/source/core/access/accnotextframe.hxx | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx index 4e8c9207a85a..02b022555f4d 100644 --- a/sw/source/core/access/accnotextframe.cxx +++ b/sw/source/core/access/accnotextframe.cxx @@ -60,10 +60,11 @@ SwAccessibleNoTextFrame::SwAccessibleNoTextFrame( sal_Int16 nInitRole, const SwFlyFrame* pFlyFrame ) : SwAccessibleFrameBase( pInitMap, nInitRole, pFlyFrame ), - m_aDepend( this, const_cast < SwNoTextNode * >( GetNoTextNode() ) ), + m_aDepends(*this), msTitle(), msDesc() { + m_aDepends.StartListening(const_cast<SwNoTextNode*>(GetNoTextNode())); const SwNoTextNode* pNd = GetNoTextNode(); // #i73249# // consider new attributes Title and Description @@ -101,8 +102,8 @@ void SwAccessibleNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem if (nWhich != RES_TITLE_CHANGED && nWhich != RES_DESCRIPTION_CHANGED) return; - const SwNoTextNode *pNd = GetNoTextNode(); - OSL_ENSURE( pNd == m_aDepend.GetRegisteredIn(), "invalid frame" ); + const SwNoTextNode* pNd = GetNoTextNode(); + SAL_WARN_IF(!m_aDepends.IsListeningTo(pNd), "sw.a11y", "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_aDepends.EndListeningAll(); SwAccessibleFrameBase::Dispose(bRecursive, bCanSkipInvisible); } diff --git a/sw/source/core/access/accnotextframe.hxx b/sw/source/core/access/accnotextframe.hxx index 431f16f87a3f..f036028ee9dd 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; + SwMultiDepend m_aDepends; OUString msTitle; OUString msDesc; |