Kaydet (Commit) ced9b3e5 authored tarafından Bjoern Michaelsen's avatar Bjoern Michaelsen Kaydeden (comit) Björn Michaelsen

no more SwClient/SwModify for SwXTableRows

Change-Id: Ic487fc51134bacbbc16b675cc177602874b9bc2a
Reviewed-on: https://gerrit.libreoffice.org/63491
Tested-by: Jenkins
Reviewed-by: 's avatarBjörn Michaelsen <bjoern.michaelsen@libreoffice.org>
üst 0c3e10b8
...@@ -3901,13 +3901,18 @@ void SwXCellRange::Impl::Modify( ...@@ -3901,13 +3901,18 @@ void SwXCellRange::Impl::Modify(
} }
} }
class SwXTableRows::Impl : public SwClient class SwXTableRows::Impl : public SvtListener
{ {
private:
SwFrameFormat* m_pFrameFormat;
public: public:
explicit Impl(SwFrameFormat& rFrameFormat) : SwClient(&rFrameFormat) {} explicit Impl(SwFrameFormat& rFrameFormat) : m_pFrameFormat(&rFrameFormat)
protected: {
//SwClient StartListening(rFrameFormat.GetNotifier());
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override; }
SwFrameFormat* GetFrameFormat() { return m_pFrameFormat; }
virtual void Notify(const SfxHint&) override;
}; };
// SwXTableRows // SwXTableRows
...@@ -3931,7 +3936,7 @@ SwXTableRows::~SwXTableRows() ...@@ -3931,7 +3936,7 @@ SwXTableRows::~SwXTableRows()
SwFrameFormat* SwXTableRows::GetFrameFormat() SwFrameFormat* SwXTableRows::GetFrameFormat()
{ {
return static_cast<SwFrameFormat*>(m_pImpl->GetRegisteredIn()); return m_pImpl->GetFrameFormat();
} }
sal_Int32 SwXTableRows::getCount() sal_Int32 SwXTableRows::getCount()
...@@ -4060,8 +4065,11 @@ void SwXTableRows::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount) ...@@ -4060,8 +4065,11 @@ void SwXTableRows::removeByIndex(sal_Int32 nIndex, sal_Int32 nCount)
} }
} }
void SwXTableRows::Impl::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) void SwXTableRows::Impl::Notify( const SfxHint& rHint)
{ ClientModify(this, pOld, pNew); } {
if(rHint.GetId() == SfxHintId::Dying)
m_pFrameFormat = nullptr;
}
// SwXTableColumns // SwXTableColumns
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment