summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore/unotbl.cxx
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@libreoffice.org>2018-11-13 23:16:51 +0100
committerBjörn Michaelsen <bjoern.michaelsen@libreoffice.org>2018-11-18 13:19:28 +0100
commitced9b3e50cb8a880630a3d02723816ce8c565aca (patch)
tree824f018433892d61e1d98d7f2075f2f119c97668 /sw/source/core/unocore/unotbl.cxx
parent0c3e10b8407996b822331c56201ade515245f373 (diff)
no more SwClient/SwModify for SwXTableRows
Change-Id: Ic487fc51134bacbbc16b675cc177602874b9bc2a Reviewed-on: https://gerrit.libreoffice.org/63491 Tested-by: Jenkins Reviewed-by: Björn Michaelsen <bjoern.michaelsen@libreoffice.org>
Diffstat (limited to 'sw/source/core/unocore/unotbl.cxx')
-rw-r--r--sw/source/core/unocore/unotbl.cxx24
1 files changed, 16 insertions, 8 deletions
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index 44b4282c99a6..dd2161c24ef4 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -3901,13 +3901,18 @@ void SwXCellRange::Impl::Modify(
}
}
-class SwXTableRows::Impl : public SwClient
+class SwXTableRows::Impl : public SvtListener
{
+private:
+ SwFrameFormat* m_pFrameFormat;
+
public:
- explicit Impl(SwFrameFormat& rFrameFormat) : SwClient(&rFrameFormat) {}
-protected:
- //SwClient
- virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override;
+ explicit Impl(SwFrameFormat& rFrameFormat) : m_pFrameFormat(&rFrameFormat)
+ {
+ StartListening(rFrameFormat.GetNotifier());
+ }
+ SwFrameFormat* GetFrameFormat() { return m_pFrameFormat; }
+ virtual void Notify(const SfxHint&) override;
};
// SwXTableRows
@@ -3931,7 +3936,7 @@ SwXTableRows::~SwXTableRows()
SwFrameFormat* SwXTableRows::GetFrameFormat()
{
- return static_cast<SwFrameFormat*>(m_pImpl->GetRegisteredIn());
+ return m_pImpl->GetFrameFormat();
}
sal_Int32 SwXTableRows::getCount()
@@ -4060,8 +4065,11 @@ void SwXTableRows::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount)
}
}
-void SwXTableRows::Impl::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew)
- { ClientModify(this, pOld, pNew); }
+void SwXTableRows::Impl::Notify( const SfxHint& rHint)
+{
+ if(rHint.GetId() == SfxHintId::Dying)
+ m_pFrameFormat = nullptr;
+}
// SwXTableColumns