diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-12-11 20:57:45 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-12-12 21:12:10 +0100 |
commit | 2431477337f4ac4384ba615f76bfb5904f1a3b47 (patch) | |
tree | 6f676441983e9b3c8440600d09a49478353e1faf /sw/inc/grfatr.hxx | |
parent | 23cfd3d1004f5ddda8cd79878c00b6c64f20068c (diff) |
use covariant return type for SfxPoolItem::Clone
and can then remove some casting
Change-Id: Id821c32ca2cbcdb7f57ef7a5fa1960042e630ffc
Reviewed-on: https://gerrit.libreoffice.org/85022
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/inc/grfatr.hxx')
-rw-r--r-- | sw/inc/grfatr.hxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sw/inc/grfatr.hxx b/sw/inc/grfatr.hxx index bb8f41311fb7..f43fd0c1dd3d 100644 --- a/sw/inc/grfatr.hxx +++ b/sw/inc/grfatr.hxx @@ -46,7 +46,7 @@ public: {} // pure virtual methods of SfxPoolItem - virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; + virtual SwMirrorGrf* Clone( SfxItemPool *pPool = nullptr ) const override; // pure virtual methods of SfxEnumItem virtual sal_uInt16 GetValueCount() const override; @@ -74,7 +74,7 @@ public: sal_Int32 nTop, sal_Int32 nBottom ); // "pure virtual methods" of SfxPoolItem - virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; + virtual SwCropGrf* Clone( SfxItemPool *pPool = nullptr ) const override; }; class SAL_DLLPUBLIC_RTTI SwRotationGrf : public SfxUInt16Item @@ -93,7 +93,7 @@ public: SwRotationGrf( sal_Int16 nVal, const Size& rSz ); // pure virtual methods from SfxInt16Item - virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; + virtual SwRotationGrf* Clone( SfxItemPool *pPool = nullptr ) const override; virtual bool operator==( const SfxPoolItem& ) const override; virtual bool GetPresentation( SfxItemPresentation ePres, MapUnit eCoreMetric, @@ -116,7 +116,7 @@ public: {} // pure virtual methods from SfxInt16Item - virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; + virtual SwLuminanceGrf* Clone( SfxItemPool *pPool = nullptr ) const override; virtual bool GetPresentation( SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, @@ -132,7 +132,7 @@ public: {} // pure virtual methods from SfxInt16Item - virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; + virtual SwContrastGrf* Clone( SfxItemPool *pPool = nullptr ) const override; virtual bool GetPresentation( SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, @@ -162,7 +162,7 @@ public: SwChannelRGrf( sal_Int16 nVal = 0 ) : SwChannelGrf( nVal, RES_GRFATR_CHANNELR ) {} - virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; + virtual SwChannelRGrf* Clone( SfxItemPool *pPool = nullptr ) const override; }; class SwChannelGGrf : public SwChannelGrf { @@ -170,7 +170,7 @@ public: SwChannelGGrf( sal_Int16 nVal = 0 ) : SwChannelGrf( nVal, RES_GRFATR_CHANNELG ) {} - virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; + virtual SwChannelGGrf* Clone( SfxItemPool *pPool = nullptr ) const override; }; class SwChannelBGrf : public SwChannelGrf { @@ -178,7 +178,7 @@ public: SwChannelBGrf( sal_Int16 nVal = 0 ) : SwChannelGrf( nVal, RES_GRFATR_CHANNELB ) {} - virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; + virtual SwChannelBGrf* Clone( SfxItemPool *pPool = nullptr ) const override; }; class SW_DLLPUBLIC SwGammaGrf : public SfxPoolItem @@ -193,7 +193,7 @@ public: {} // pure virtual methods from SfxEnumItem - virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; + virtual SwGammaGrf* Clone( SfxItemPool *pPool = nullptr ) const override; virtual bool operator==( const SfxPoolItem& ) const override; virtual bool GetPresentation( SfxItemPresentation ePres, MapUnit eCoreMetric, @@ -217,7 +217,7 @@ public: {} // pure virtual methods from SfxInt16Item - virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; + virtual SwInvertGrf* Clone( SfxItemPool *pPool = nullptr ) const override; virtual bool GetPresentation( SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, @@ -233,7 +233,7 @@ public: {} // pure virtual methods from SfxInt16Item - virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; + virtual SwTransparencyGrf* Clone( SfxItemPool *pPool = nullptr ) const override; virtual bool GetPresentation( SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, @@ -260,7 +260,7 @@ public: {} // pure virtual methods of SfxPoolItem - virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; + virtual SwDrawModeGrf* Clone( SfxItemPool *pPool = nullptr ) const override; // pure virtual methods of SfxEnumItem virtual sal_uInt16 GetValueCount() const override; |