summaryrefslogtreecommitdiff
path: root/sw/inc
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/inc
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/inc')
-rw-r--r--sw/inc/ndgrf.hxx2
-rw-r--r--sw/inc/ndole.hxx2
-rw-r--r--sw/inc/ndtxt.hxx6
3 files changed, 4 insertions, 6 deletions
diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx
index 82be71429780..d9fd29e5c2eb 100644
--- a/sw/inc/ndgrf.hxx
+++ b/sw/inc/ndgrf.hxx
@@ -31,7 +31,7 @@ class SwGrfFormatColl;
class SwDoc;
// SwGrfNode
-class SW_DLLPUBLIC SwGrfNode: public SwNoTextNode
+class SW_DLLPUBLIC SwGrfNode final: public SwNoTextNode
{
friend class SwNodes;
diff --git a/sw/inc/ndole.hxx b/sw/inc/ndole.hxx
index e54be15a22dd..39060d62501b 100644
--- a/sw/inc/ndole.hxx
+++ b/sw/inc/ndole.hxx
@@ -82,7 +82,7 @@ public:
// SwOLENode
-class SW_DLLPUBLIC SwOLENode: public SwNoTextNode
+class SW_DLLPUBLIC SwOLENode final: public SwNoTextNode
{
friend class SwNodes;
mutable SwOLEObj maOLEObj;
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index 7692dc5b6470..f83bab3cebba 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -77,7 +77,7 @@ namespace com::sun::star {
typedef o3tl::sorted_vector< sal_Int32 > SwSoftPageBreakList;
/// SwTextNode is a paragraph in the document model.
-class SW_DLLPUBLIC SwTextNode
+class SW_DLLPUBLIC SwTextNode final
: public SwContentNode
, public ::sfx2::Metadatable
, public sw::FormatDropDefiner
@@ -127,7 +127,7 @@ class SW_DLLPUBLIC SwTextNode
SAL_DLLPRIVATE SwTextNode( const SwNodeIndex &rWhere, SwTextFormatColl *pTextColl,
const SfxItemSet* pAutoAttr = nullptr );
-
+ virtual void SwClientNotify( const SwModify&, const SfxHint& ) override;
/// Copies the attributes at nStart to pDest.
SAL_DLLPRIVATE void CopyAttr( SwTextNode *pDest, const sal_Int32 nStart, const sal_Int32 nOldPos);
@@ -202,8 +202,6 @@ public:
/// End: Data collected during idle time
-protected:
- virtual void SwClientNotify( const SwModify&, const SfxHint& ) override;
public:
using SwContentNode::GetAttr;