sw/source/core/docnode/section.cxx | 44 ++++++++++++++----------------------- 1 file changed, 17 insertions(+), 27 deletions(-)
New commits: commit 296c1b3b7e2fca6d54e3e61684d70d12f7989624 Author: Bjoern Michaelsen <bjoern.michael...@libreoffice.org> AuthorDate: Sun Nov 22 10:47:20 2020 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Wed Mar 31 16:26:26 2021 +0200 tdf#140863: section.cxx: Remove remaining SwClientNotifyCalls Change-Id: I569c5952a7491c37c677ad6b6d5f803a50b2e701 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106341 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michael...@libreoffice.org> (cherry picked from commit 5fc6a601d7a1978db291fd0f7dcec638a7c25651) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113361 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> Tested-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index a3dad1262b23..00adf5a40f47 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -66,13 +66,6 @@ using namespace ::com::sun::star; namespace { - - void lcl_SwClientNotify(sw::BroadcastingModify& rModify, const SfxPoolItem* pOldNew) - { - const sw::LegacyModifyHint aHint(pOldNew, pOldNew); - rModify.SwClientNotifyCall(rModify, aHint); - } - class SwIntrnlSectRefLink : public SwBaseLink { SwSectionFormat& m_rSectFormat; @@ -318,8 +311,8 @@ void SwSection::ImplSetHiddenFlag(bool const bTmpHidden, bool const bCondition) // This should be shown by the bHiddenFlag. // Tell all Children that they are hidden - SwMsgPoolItem aMsgItem( RES_SECTION_HIDDEN ); - lcl_SwClientNotify(*pFormat, &aMsgItem); + const SwMsgPoolItem aMsgItem( RES_SECTION_HIDDEN ); + pFormat->CallSwClientNotify(sw::LegacyModifyHint(&aMsgItem, &aMsgItem)); // Delete all Frames pFormat->DelFrames(); @@ -333,8 +326,8 @@ void SwSection::ImplSetHiddenFlag(bool const bTmpHidden, bool const bCondition) if( !pParentSect || !pParentSect->IsHiddenFlag() ) { // Tell all Children that the Parent is not hidden anymore - SwMsgPoolItem aMsgItem( RES_SECTION_NOT_HIDDEN ); - lcl_SwClientNotify(*pFormat, &aMsgItem); + const SwMsgPoolItem aMsgItem( RES_SECTION_NOT_HIDDEN ); + pFormat->CallSwClientNotify(sw::LegacyModifyHint(&aMsgItem, &aMsgItem)); pFormat->MakeFrames(); } @@ -719,8 +712,8 @@ void SwSectionFormat::DelFrames() SwContentNode* pCNd = GetDoc()->GetNodes().GoNextSection( &aNextNd, true, false ); if( pCNd ) { - const SfxPoolItem& rItem = pCNd->GetSwAttrSet().Get( RES_PAGEDESC ); - lcl_SwClientNotify(*pCNd, &rItem); + const SfxPoolItem& rItem = pCNd->GetSwAttrSet().Get(RES_PAGEDESC); + pCNd->CallSwClientNotify(sw::LegacyModifyHint(&rItem, &rItem)); } } @@ -945,22 +938,19 @@ void SwSectionFormat::UpdateParent() bIsHidden = pPS->IsHiddenFlag(); } SwIterator<SwSectionFormat,SwSectionFormat> aIter(*this); - for(SwSectionFormat* pLast = aIter.First(); pLast; pLast = aIter.Next()) - { - if(!pProtect->IsContentProtected() != !pSection->IsProtectFlag()) - lcl_SwClientNotify(*static_cast<sw::BroadcastingModify*>(pLast), static_cast<SfxPoolItem const *>(pProtect)); + if(!pProtect->IsContentProtected() != !pSection->IsProtectFlag()) + CallSwClientNotify(sw::LegacyModifyHint(pProtect, pProtect)); - // edit in readonly sections - if(!pEditInReadonly->GetValue() != !pSection->IsEditInReadonlyFlag()) - lcl_SwClientNotify(*static_cast<sw::BroadcastingModify*>(pLast), static_cast<SfxPoolItem const *>(pEditInReadonly)); + // edit in readonly sections + if(!pEditInReadonly->GetValue() != !pSection->IsEditInReadonlyFlag()) + CallSwClientNotify(sw::LegacyModifyHint(pEditInReadonly, pEditInReadonly)); - if(bIsHidden == pSection->IsHiddenFlag()) - { - SwMsgPoolItem aMsgItem( static_cast<sal_uInt16>(bIsHidden - ? RES_SECTION_HIDDEN - : RES_SECTION_NOT_HIDDEN ) ); - lcl_SwClientNotify(*static_cast<sw::BroadcastingModify*>(pLast), &aMsgItem); - } + if(bIsHidden == pSection->IsHiddenFlag()) + { + SwMsgPoolItem aMsgItem(static_cast<sal_uInt16>(bIsHidden + ? RES_SECTION_HIDDEN + : RES_SECTION_NOT_HIDDEN)); + CallSwClientNotify(sw::LegacyModifyHint(&aMsgItem, &aMsgItem)); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits