summaryrefslogtreecommitdiff
path: root/sw/source/core/bastyp
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2019-04-29 17:14:42 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2019-04-30 15:27:47 +0200
commit31ae7509003b1e650463ee1468c0b315ba13efe6 (patch)
tree8f52291bb86067feca1bd10dec5e5d8fe6848d06 /sw/source/core/bastyp
parentf6f53f76e15f5eecc5b6ce56e471c53cebfea8ad (diff)
tdf#122607 sw: remove deleted SwTextFrame's cache entry
Apparently nothing else would remove the entry, and without SwTextFrame it's not accessible any more. If the entry was recently used, then the SwSaveSetLRUOfst usage in SwViewShell::CalcLayout() will preserve it instead of giving the cache entry to a new frame. Change-Id: Id43fdbad2ac006853928e30a7b6768c3e3dc1667 Reviewed-on: https://gerrit.libreoffice.org/71541 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Diffstat (limited to 'sw/source/core/bastyp')
-rw-r--r--sw/source/core/bastyp/swcache.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/sw/source/core/bastyp/swcache.cxx b/sw/source/core/bastyp/swcache.cxx
index 705c49accd79..ff6d568b8e83 100644
--- a/sw/source/core/bastyp/swcache.cxx
+++ b/sw/source/core/bastyp/swcache.cxx
@@ -323,6 +323,15 @@ void SwCache::DeleteObj( SwCacheObj *pObj )
CHECK;
}
+void SwCache::Delete(void const*const pOwner, sal_uInt16 const nIndex)
+{
+ INCREMENT( m_nDelete );
+ if (SwCacheObj *const pObj = Get(pOwner, nIndex, false))
+ {
+ DeleteObj(pObj);
+ }
+}
+
void SwCache::Delete( const void *pOwner )
{
INCREMENT( m_nDelete );