summaryrefslogtreecommitdiff
path: root/sw/source/core/graphic
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2020-10-31 16:18:35 +0100
committerBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2020-11-01 10:35:40 +0100
commit59684a321ed21ceae0dca4b7105fb45c4d07a150 (patch)
tree4eac1897c0477f6d967659deb529043d35091ff4 /sw/source/core/graphic
parenta449fbbb207beab2657b19620b239b9e6f145396 (diff)
sw/source/core/doc: Stop abusing observer pattern for code obfuscation.
The old SwClient/SwModify combo is a questionable implementation of the observer pattern (among other things). The one thing the observer pattern is good for is dependency inversion: The creator of the message does not need to know the type of the receiver. Calling the message handling on the receiver directly introduces tight coupling and entirely defeats the purpose, leaving us with the worst of both worlds. In such case, at least be honest about the tight coupling and call a somewhat more explicit member function of the target. Thus introduce SwFootNoteInfo::UpdateFormatOrAttr, SwContentNode::UpdateAttr, remove some useless SwFormatChg clutter in Set{Foot,End}NodeInfo, and check for some invariants in SwContentNode::SwClientNotify to limit some of the "a message are two void pointers" madness. Change-Id: I32a8d6973231bb5f65c9e144be72d5bcf98f3f44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105104 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
Diffstat (limited to 'sw/source/core/graphic')
-rw-r--r--sw/source/core/graphic/ndgrf.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index f7e9f66e14e3..583ac191fbb2 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -272,8 +272,8 @@ bool SwGrfNode::ReRead(
// create an updates for the frames
if( bReadGrf && bNewGrf )
{
- SwMsgPoolItem aMsgHint( RES_UPDATE_ATTR );
- lcl_SwClientNotify(*this, aMsgHint);
+ const SwUpdateAttr aHint(0,0,0);
+ lcl_SwClientNotify(*this, aHint);
}
return bReadGrf;