summaryrefslogtreecommitdiff
path: root/sw/source/core/attr/format.cxx
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2021-01-03 23:27:49 +0100
committerBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2021-01-09 03:59:46 +0100
commitd656da9bc4f2df0bb99c65a288847e3fdd43a37c (patch)
tree9a39ad3b93e02af6a5944c8fecc5455d9cdb3b2d /sw/source/core/attr/format.cxx
parent3e6c27ac7c42668152b8a636ab875bbf0b9994b2 (diff)
~SwModify: do not silently tolerate clients registered past death
- Make SwFormat/SwContentNode explicitly resetting the page desc. before death instead of SwFormatPageDesc trying to do that on the dying hint: * the dying hints is send _after_ the SwFormat/SwContentNode dtor are completed, so the RTTI magic did not work anyway * simply resetting the attribute in a final dtor and make SwFormatPageDesc just check to never get a dying hint (because it should have been destructed by reset) is a lot less errorprone. Change-Id: I231f1729729491ba7544e5ba93d81192b212e2ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108648 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
Diffstat (limited to 'sw/source/core/attr/format.cxx')
-rw-r--r--sw/source/core/attr/format.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx
index 4b0529d2f253..1f83d913be38 100644
--- a/sw/source/core/attr/format.cxx
+++ b/sw/source/core/attr/format.cxx
@@ -219,9 +219,10 @@ SwFormat::~SwFormat()
return;
m_bFormatInDTOR = true;
-
+
if(!DerivedFrom())
{
+ SwFormat::ResetFormatAttr(RES_PAGEDESC);
SAL_WARN("sw.core", "~SwFormat: format still has clients on death, but parent format is missing: " << GetName());
return;
}