summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2020-10-26 07:22:29 +0100
committerBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2020-10-28 20:34:31 +0100
commit6e38f611a3d98156505b9937f30e94605381156c (patch)
treea4b0c0946e6cdede20f87dc18d76228c98c4d681 /sw
parent27ae083f7e5fce97c73498698d855cdcaac7737d (diff)
NoTextFrame: Modify no more ...
Change-Id: I2816fae99fc9774ab1728d20e1de215322a2de8d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104791 Tested-by: Jenkins Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/notxtfrm.cxx13
-rw-r--r--sw/source/core/inc/notxtfrm.hxx2
2 files changed, 9 insertions, 6 deletions
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* );