[Libreoffice-commits] core.git: sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sun Nov 18 12:19:50 UTC 2018
sw/source/core/unocore/unotbl.cxx | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
New commits:
commit ced9b3e50cb8a880630a3d02723816ce8c565aca
Author: Bjoern Michaelsen <bjoern.michaelsen at libreoffice.org>
AuthorDate: Tue Nov 13 23:16:51 2018 +0100
Commit: Björn Michaelsen <bjoern.michaelsen at libreoffice.org>
CommitDate: Sun Nov 18 13:19:28 2018 +0100
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 at libreoffice.org>
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
More information about the Libreoffice-commits
mailing list