summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-03-24 16:28:36 +0100
committerMichael Stahl <mstahl@redhat.com>2017-03-24 18:00:43 +0100
commit8cae63caf04e4ba555af13c022dab9dfe9c79dcf (patch)
tree6a650519ab91105ee0e7dc865734659c1396a44e /sw
parentd7ebb703427a17d12e22101a1277e9a824c18123 (diff)
sw: remove unnecessary ClearMapPointer calls from ~SwAccessibleMap
These are unnecessary with the fix for tdf#58624, because now SwAccessibleContext dtor will check that the map is still alive. Anything that's still alive at that point should have been disposed by the recursive Dispose call. Change-Id: I39102a6b222b2121987d92077d4b9548281d9973
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/access/acccontext.cxx8
-rw-r--r--sw/source/core/access/acccontext.hxx4
-rw-r--r--sw/source/core/access/accmap.cxx5
3 files changed, 6 insertions, 11 deletions
diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx
index f2288a51a3b6..c125729c0bec 100644
--- a/sw/source/core/access/acccontext.cxx
+++ b/sw/source/core/access/acccontext.cxx
@@ -1429,14 +1429,6 @@ OUString SwAccessibleContext::GetResource( sal_uInt16 nResId,
return sStr;
}
-
-void SwAccessibleContext::ClearMapPointer()
-{
- DBG_TESTSOLARMUTEX();
- m_pMap = nullptr;
- m_wMap.reset();
-}
-
void SwAccessibleContext::RemoveFrameFromAccessibleMap()
{
assert(m_refCount > 0); // must be alive to do this without using m_wMap
diff --git a/sw/source/core/access/acccontext.hxx b/sw/source/core/access/acccontext.hxx
index d37bb8e7768d..b87f00ae6f00 100644
--- a/sw/source/core/access/acccontext.hxx
+++ b/sw/source/core/access/acccontext.hxx
@@ -59,6 +59,9 @@ class SwAccessibleContext :
// 'externalized' and wants access to the protected members like
// GetMap, GetChild, GetParent, and GetFrame.
friend class SwAccessibleSelectionHelper;
+#if OSL_DEBUG_LEVEL > 0
+ friend class SwAccessibleMap;
+#endif
protected:
mutable ::osl::Mutex m_Mutex;
@@ -167,7 +170,6 @@ protected:
virtual void InvalidateFocus_();
public:
- void ClearMapPointer();
void FireAccessibleEvent( css::accessibility::AccessibleEventObject& rEvent );
protected:
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 5acee3a62889..1c51ac6fbc05 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -1671,6 +1671,7 @@ SwAccessibleMap::~SwAccessibleMap()
SwAccessibleDocument *pAcc = static_cast< SwAccessibleDocument * >( xAcc.get() );
pAcc->Dispose( true );
}
+#if OSL_DEBUG_LEVEL > 0
if( mpFrameMap )
{
SwAccessibleContextMap_Impl::iterator aIter = mpFrameMap->begin();
@@ -1680,12 +1681,12 @@ SwAccessibleMap::~SwAccessibleMap()
if( xTmp.is() )
{
SwAccessibleContext *pTmp = static_cast< SwAccessibleContext * >( xTmp.get() );
- // TODO is this still needed
- pTmp->ClearMapPointer();
+ assert(pTmp->GetMap() == nullptr); // must be disposed
}
++aIter;
}
}
+#endif
{
osl::MutexGuard aGuard( maMutex );
#if OSL_DEBUG_LEVEL > 0