summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2017-02-27 13:56:14 +0100
committerBjörn Michaelsen <bjoern.michaelsen@canonical.com>2017-02-28 06:55:14 +0000
commit2e1797c66a7bac74602e6a7e131c9039a6cd1622 (patch)
tree1a54fe33a008bbcd3b23f6c9c84a9576111b19c6 /sw
parentb5987a4148a10e27fe44ecf5d03e697692e07ca9 (diff)
move troublesome SetMaster from SwContact down to SwDrawContact
Change-Id: I4fc0565175cda316e5b26c78fd0a05a4e27e527a Reviewed-on: https://gerrit.libreoffice.org/34699 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/dcontact.hxx7
-rw-r--r--sw/source/core/draw/dcontact.cxx13
2 files changed, 6 insertions, 14 deletions
diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx
index e7a34d129083..958e1a591245 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 5fcde7d522c2..49d326562067 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 )
{