sw/source/core/unocore/unotbl.cxx | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-)
New commits: commit f90ad3d22ca77d5d76fa18767f807c0772bb5ac2 Author: Bjoern Michaelsen <[email protected]> AuthorDate: Tue Nov 13 23:16:51 2018 +0100 Commit: Björn Michaelsen <[email protected]> CommitDate: Thu Nov 15 08:35:18 2018 +0100 no more SwClient/SwModify for SwXTableColumns Change-Id: I1522cec0e01b4c9ccb4b252b8dc0a480edb22102 Reviewed-on: https://gerrit.libreoffice.org/63350 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <[email protected]> diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 268b2f542622..44b4282c99a6 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -4065,13 +4065,16 @@ void SwXTableRows::Impl::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNe // SwXTableColumns -class SwXTableColumns::Impl : public SwClient +class SwXTableColumns::Impl : public SvtListener { -public: - explicit Impl(SwFrameFormat& rFrameFormat) : SwClient(&rFrameFormat) {} -protected: - //SwClient - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override; + SwFrameFormat* m_pFrameFormat; + public: + explicit Impl(SwFrameFormat& rFrameFormat) : m_pFrameFormat(&rFrameFormat) + { + StartListening(rFrameFormat.GetNotifier()); + } + SwFrameFormat* GetFrameFormat() { return m_pFrameFormat; } + virtual void Notify(const SfxHint&) override; }; OUString SwXTableColumns::getImplementationName() @@ -4093,7 +4096,7 @@ SwXTableColumns::~SwXTableColumns() SwFrameFormat* SwXTableColumns::GetFrameFormat() const { - return static_cast<SwFrameFormat*>(m_pImpl->GetRegisteredIn()); + return m_pImpl->GetFrameFormat(); } sal_Int32 SwXTableColumns::getCount() @@ -4211,7 +4214,10 @@ void SwXTableColumns::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) } } -void SwXTableColumns::Impl::Modify(const SfxPoolItem* pOld, const SfxPoolItem *pNew) - { ClientModify(this, pOld, pNew); } +void SwXTableColumns::Impl::Notify(const SfxHint& rHint) +{ + if(rHint.GetId() == SfxHintId::Dying) + m_pFrameFormat = nullptr; +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
