diff options
author | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2020-12-31 23:03:01 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2021-01-02 21:56:11 +0100 |
commit | ac624ef10a4620c2a12ea688e313a8d5173052cf (patch) | |
tree | eba5ab66ba08b6247bae965a5f9add261f9bb6e6 /sw/inc | |
parent | ed7d6dd9e222daef5a0d0147e0311b951f9a29ce (diff) |
SwFrame: Modify no more
Change-Id: I8e2c89f2c897535013d64720b6c2c5bbac602b14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108551
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/accmap.hxx | 2 | ||||
-rw-r--r-- | sw/inc/calbck.hxx | 13 |
2 files changed, 3 insertions, 12 deletions
diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx index 58f758706cbf..979fac964823 100644 --- a/sw/inc/accmap.hxx +++ b/sw/inc/accmap.hxx @@ -61,7 +61,7 @@ namespace com::sun::star::accessibility { class XAccessible; } // There are two reason for this. First of all, a new accessible shape // for the XShape might be created soon. It's then cheaper if the XShape // still exists. The other reason are situations where an accessible shape -// is destroyed within an SwFrameFormat::Modify. In this case, destroying +// is destroyed within an SwFrameFormat::SwClientNotify. In this case, destroying // the XShape at the same time (indirectly by destroying the accessible // shape) leads to an assert, because a client of the Modify is destroyed // within a Modify call. diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx index 8fbb2e87e0b2..e469c3dd4134 100644 --- a/sw/inc/calbck.hxx +++ b/sw/inc/calbck.hxx @@ -143,11 +143,6 @@ public: SwClient() : m_pRegisteredIn(nullptr) {} SwClient(SwClient&&) noexcept; virtual ~SwClient() override; - // callbacks received from SwModify (friend class - so these methods can be private) - // should be called only from SwModify the client is registered in - // mba: IMHO this method should be pure virtual - // DO NOT USE IN NEW CODE! use SwClientNotify instead. - virtual void Modify(const SfxPoolItem*, const SfxPoolItem*); // in case an SwModify object is destroyed that itself is registered in another SwModify, @@ -183,13 +178,10 @@ class SW_DLLPUBLIC SwModify: public SwClient bool m_bInCache : 1; bool m_bInSwFntCache : 1; - // mba: IMHO this method should be pure virtual - // DO NOT USE IN NEW CODE! use CallSwClientNotify instead. - virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override - { NotifyClients( pOld, pNew ); }; - SwModify(SwModify const &) = delete; SwModify &operator =(const SwModify&) = delete; +protected: + virtual void SwClientNotify(const SwModify&, const SfxHint& rHint) override; public: SwModify() : SwClient(), m_pWriterListeners(nullptr), m_bModifyLocked(false), m_bInCache(false), m_bInSwFntCache(false) @@ -268,7 +260,6 @@ namespace sw /** get Client information */ virtual bool GetInfo( SfxPoolItem& rInfo) const override; private: - virtual void Modify(const SfxPoolItem* pOldValue, const SfxPoolItem *pNewValue) override; virtual void SwClientNotify(const SwModify& rModify, const SfxHint& rHint) override; }; |