sw/source/core/doc/notxtfrm.cxx | 13 ++++++++----- sw/source/core/inc/notxtfrm.hxx | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-)
New commits: commit 6e38f611a3d98156505b9937f30e94605381156c Author: Bjoern Michaelsen <bjoern.michael...@libreoffice.org> AuthorDate: Mon Oct 26 07:22:29 2020 +0100 Commit: Bjoern Michaelsen <bjoern.michael...@libreoffice.org> CommitDate: Wed Oct 28 20:34:31 2020 +0100 NoTextFrame: Modify no more ... Change-Id: I2816fae99fc9774ab1728d20e1de215322a2de8d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104791 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michael...@libreoffice.org> diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index 2fcf84602d62..7d8c50238ae1 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -720,9 +720,12 @@ void SwNoTextFrame::ClearCache() } } -void SwNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) +void SwNoTextFrame::SwClientNotify(const SwModify& rModify, const SfxHint& rHint) { - sal_uInt16 nWhich = pNew ? pNew->Which() : pOld ? pOld->Which() : 0; + auto pLegacy = dynamic_cast<const sw::LegacyModifyHint*>(&rHint); + if(!pLegacy) + return; + sal_uInt16 nWhich = pLegacy->GetWhich(); // #i73788# // no <SwContentFrame::Modify(..)> for RES_LINKED_GRAPHIC_STREAM_ARRIVED @@ -731,7 +734,7 @@ void SwNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) RES_GRF_REREAD_AND_INCACHE != nWhich && RES_LINKED_GRAPHIC_STREAM_ARRIVED != nWhich ) { - SwContentFrame::Modify( pOld, pNew ); + SwContentFrame::SwClientNotify(rModify, rHint); } bool bComplete = true; @@ -762,7 +765,7 @@ void SwNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) { sal_uInt16 n; for( n = RES_GRFATR_BEGIN; n < RES_GRFATR_END; ++n ) - if( SfxItemState::SET == static_cast<const SwAttrSetChg*>(pOld)->GetChgSet()-> + if( SfxItemState::SET == static_cast<const SwAttrSetChg*>(pLegacy->m_pOld)->GetChgSet()-> GetItemState( n, false )) { ClearCache(); @@ -841,7 +844,7 @@ void SwNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) break; default: - if ( !pNew || !isGRFATR(nWhich) ) + if ( !pLegacy->m_pNew || !isGRFATR(nWhich) ) return; } diff --git a/sw/source/core/inc/notxtfrm.hxx b/sw/source/core/inc/notxtfrm.hxx index d36f359eaba6..9300639ad6d2 100644 --- a/sw/source/core/inc/notxtfrm.hxx +++ b/sw/source/core/inc/notxtfrm.hxx @@ -58,7 +58,7 @@ private: protected: virtual void MakeAll(vcl::RenderContext* pRenderContext) override; - virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) override; + virtual void SwClientNotify(const SwModify&, const SfxHint&) override; public: SwNoTextFrame( SwNoTextNode * const, SwFrame* ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits