diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2017-02-27 22:24:50 +0100 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@canonical.com> | 2017-02-28 08:57:16 +0000 |
commit | ae181f927dfc7d18562279a49813035931667463 (patch) | |
tree | 61c382f0fe4e02067318b37627caef2ccc37a0a0 /sw/inc/dcontact.hxx | |
parent | ad85c1236dddeea20069bcda8cab43f10e3cd026 (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.hxx | 6 |
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; |