[Libreoffice-commits] core.git: sw/source
Bjoern Michaelsen (via logerrit)
logerrit at kemper.freedesktop.org
Fri Oct 30 11:56:24 UTC 2020
sw/source/core/graphic/ndgrf.cxx | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
New commits:
commit c169edd1b3d521f3e41dba6f7b6f572de16861b9
Author: Bjoern Michaelsen <bjoern.michaelsen at libreoffice.org>
AuthorDate: Wed Oct 28 23:34:53 2020 +0100
Commit: Bjoern Michaelsen <bjoern.michaelsen at libreoffice.org>
CommitDate: Fri Oct 30 12:55:40 2020 +0100
SwGrfNode: ModifyNotification no more
Change-Id: Iea856fd84d08678d1d7d3041df518f58fcd6b28a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104983
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen at libreoffice.org>
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 2e607b83093a..f7e9f66e14e3 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -51,6 +51,15 @@
using namespace com::sun::star;
+
+namespace
+{
+ void lcl_SwClientNotify(SwModify& rModify, const SfxPoolItem& rOldNew)
+ {
+ const sw::LegacyModifyHint aHint(&rOldNew, &rOldNew);
+ rModify.SwClientNotify(rModify, aHint);
+ }
+}
SwGrfNode::SwGrfNode(
const SwNodeIndex & rWhere,
const OUString& rGrfName,
@@ -205,7 +214,7 @@ bool SwGrfNode::ReRead(
if( getLayoutFrame( GetDoc().getIDocumentLayoutAccess().GetCurrentLayout() ) )
{
SwMsgPoolItem aMsgHint( RES_GRF_REREAD_AND_INCACHE );
- ModifyNotification( &aMsgHint, &aMsgHint );
+ lcl_SwClientNotify(*this, aMsgHint);
}
else if ( bNewGrf )
{
@@ -264,7 +273,7 @@ bool SwGrfNode::ReRead(
if( bReadGrf && bNewGrf )
{
SwMsgPoolItem aMsgHint( RES_UPDATE_ATTR );
- ModifyNotification( &aMsgHint, &aMsgHint );
+ lcl_SwClientNotify(*this, aMsgHint);
}
return bReadGrf;
@@ -461,7 +470,7 @@ bool SwGrfNode::SwapIn(bool bWaitForData)
maGrfObj.SetGraphic( Graphic() );
onGraphicChanged();
SwMsgPoolItem aMsgHint( RES_GRAPHIC_PIECE_ARRIVED );
- ModifyNotification( &aMsgHint, &aMsgHint );
+ lcl_SwClientNotify(*this, aMsgHint);
}
}
else
@@ -831,7 +840,7 @@ void SwGrfNode::ApplyInputStream(
mbIsStreamReadOnly = bIsStreamReadOnly;
mbLinkedInputStreamReady = true;
SwMsgPoolItem aMsgHint( RES_LINKED_GRAPHIC_STREAM_ARRIVED );
- ModifyNotification( &aMsgHint, &aMsgHint );
+ lcl_SwClientNotify(*this, aMsgHint);
}
}
}
@@ -845,7 +854,7 @@ void SwGrfNode::UpdateLinkWithInputStream()
GetLink()->setStreamToLoadFrom( mxInputStream, mbIsStreamReadOnly );
GetLink()->Update();
SwMsgPoolItem aMsgHint( RES_GRAPHIC_ARRIVED );
- ModifyNotification( &aMsgHint, &aMsgHint );
+ lcl_SwClientNotify(*this, aMsgHint);
// #i88291#
mxInputStream.clear();
More information about the Libreoffice-commits
mailing list