summaryrefslogtreecommitdiff
path: root/sw/inc/dcontact.hxx
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2017-02-27 22:24:50 +0100
committerBjörn Michaelsen <bjoern.michaelsen@canonical.com>2017-02-28 08:57:16 +0000
commitae181f927dfc7d18562279a49813035931667463 (patch)
tree61c382f0fe4e02067318b37627caef2ccc37a0a0 /sw/inc/dcontact.hxx
parentad85c1236dddeea20069bcda8cab43f10e3cd026 (diff)
remove const code duplication
Change-Id: If8330d3f1ce0c92122dcecfc22c32b005deffeb3 Reviewed-on: https://gerrit.libreoffice.org/34702 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Diffstat (limited to 'sw/inc/dcontact.hxx')
-rw-r--r--sw/inc/dcontact.hxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx
index 966ddc1c1a6b..91800c480a8a 100644
--- a/sw/inc/dcontact.hxx
+++ b/sw/inc/dcontact.hxx
@@ -202,7 +202,8 @@ public:
virtual const SwAnchoredObject* GetAnchoredObj( const SdrObject* _pSdrObj ) const override;
virtual SwAnchoredObject* GetAnchoredObj( SdrObject* _pSdrObj ) override;
- virtual const SdrObject* GetMaster() const override;
+ virtual const SdrObject* GetMaster() const override
+ { return const_cast<SwFlyDrawContact*>(this)->GetMaster(); };
virtual SdrObject* GetMaster() override;
/** override methods to control Writer fly frames,
@@ -385,7 +386,8 @@ class SwDrawContact final : public SwContact
virtual const SwAnchoredObject* GetAnchoredObj( const SdrObject* _pSdrObj ) const override;
virtual SwAnchoredObject* GetAnchoredObj( SdrObject* _pSdrObj ) override;
- virtual const SdrObject* GetMaster() const override;
+ virtual const SdrObject* GetMaster() const override
+ { return const_cast<SwDrawContact*>(this)->GetMaster(); };
virtual SdrObject* GetMaster() override;
const SwFrame* GetAnchorFrame( const SdrObject* _pDrawObj = nullptr ) const;