sw/inc/dcontact.hxx | 7 ++----- sw/source/core/draw/dcontact.cxx | 13 ++++--------- 2 files changed, 6 insertions(+), 14 deletions(-)
New commits: commit 2e1797c66a7bac74602e6a7e131c9039a6cd1622 Author: Bjoern Michaelsen <bjoern.michael...@canonical.com> Date: Mon Feb 27 13:56:14 2017 +0100 move troublesome SetMaster from SwContact down to SwDrawContact Change-Id: I4fc0565175cda316e5b26c78fd0a05a4e27e527a Reviewed-on: https://gerrit.libreoffice.org/34699 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx index e7a34d1..958e1a5 100644 --- a/sw/inc/dcontact.hxx +++ b/sw/inc/dcontact.hxx @@ -114,7 +114,6 @@ public: virtual const SdrObject *GetMaster() const = 0; virtual SdrObject *GetMaster() = 0; - virtual void SetMaster( SdrObject* _pNewMaster ) = 0; SwFrameFormat *GetFormat() { return static_cast<SwFrameFormat*>(GetRegisteredIn()); } const SwFrameFormat *GetFormat() const @@ -205,7 +204,6 @@ public: virtual const SdrObject* GetMaster() const override; virtual SdrObject* GetMaster() override; - virtual void SetMaster( SdrObject* _pNewMaster ) override; /** override methods to control Writer fly frames, which are linked, and to assure that all objects anchored at/inside the @@ -311,7 +309,7 @@ bool CheckControlLayer( const SdrObject *pObj ); in SwClient and the objects themselves in Drawing (SDrObjUserCall). */ class NestedUserCallHdl; -class SwDrawContact : public SwContact +class SwDrawContact final : public SwContact { private: /** anchored drawing object instance for the @@ -377,7 +375,6 @@ class SwDrawContact : public SwContact SwDrawContact( const SwDrawContact& ) = delete; SwDrawContact& operator=( const SwDrawContact& ) = delete; - protected: virtual void SwClientNotify(const SwModify&, const SfxHint& rHint) override; public: @@ -390,7 +387,7 @@ class SwDrawContact : public SwContact virtual const SdrObject* GetMaster() const override; virtual SdrObject* GetMaster() override; - virtual void SetMaster( SdrObject* _pNewMaster ) override; + void SetMaster( SdrObject* _pNewMaster ); const SwFrame* GetAnchorFrame( const SdrObject* _pDrawObj = nullptr ) const; SwFrame* GetAnchorFrame( SdrObject* _pDrawObj = nullptr ); diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index 5fcde7d..49d3265 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -491,11 +491,6 @@ SdrObject* SwFlyDrawContact::GetMaster() return mpMasterObj.get(); } -void SwFlyDrawContact::SetMaster( SdrObject* ) -{ - std::abort(); // this should never be called SwFlyDrawContact is owning its "Master" -} - /** * @note Overriding method to control Writer fly frames, which are linked, and * to assure that all objects anchored at/inside the Writer fly frame are @@ -743,10 +738,10 @@ SdrObject* SwDrawContact::GetMaster() } /** - * @note Override <SwContact::SetMaster(..)> in order to assert, if the - * 'master' drawing object is replaced. The latter is correctly handled, - * if handled by method <SwDrawContact::ChangeMasterObject(..)>. Thus, - * assert only, if a debug level is given. + * @note checks if the 'master' drawing object is replaced. The latter is + * correctly handled, if handled by method + * <SwDrawContact::ChangeMasterObject(..)>. Thus, assert only, if a debug level + * is given. */ void SwDrawContact::SetMaster( SdrObject* _pNewMaster ) {
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits