summaryrefslogtreecommitdiff
path: root/svx/inc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-12-11 20:57:45 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-12-12 21:12:10 +0100
commit2431477337f4ac4384ba615f76bfb5904f1a3b47 (patch)
tree6f676441983e9b3c8440600d09a49478353e1faf /svx/inc
parent23cfd3d1004f5ddda8cd79878c00b6c64f20068c (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 'svx/inc')
-rw-r--r--svx/inc/sxallitm.hxx10
-rw-r--r--svx/inc/sxcikitm.hxx2
-rw-r--r--svx/inc/sxlayitm.hxx4
-rw-r--r--svx/inc/sxlogitm.hxx6
-rw-r--r--svx/inc/sxmkitm.hxx2
-rw-r--r--svx/inc/sxmoitm.hxx2
-rw-r--r--svx/inc/sxmovitm.hxx4
-rw-r--r--svx/inc/sxmsitm.hxx2
-rw-r--r--svx/inc/sxmtaitm.hxx4
-rw-r--r--svx/inc/sxoneitm.hxx10
-rw-r--r--svx/inc/sxopitm.hxx4
-rw-r--r--svx/inc/sxreaitm.hxx4
-rw-r--r--svx/inc/sxreoitm.hxx4
-rw-r--r--svx/inc/sxroaitm.hxx2
-rw-r--r--svx/inc/sxrooitm.hxx2
-rw-r--r--svx/inc/sxsaitm.hxx2
-rw-r--r--svx/inc/sxsalitm.hxx4
-rw-r--r--svx/inc/sxsoitm.hxx4
-rw-r--r--svx/inc/sxtraitm.hxx8
19 files changed, 37 insertions, 43 deletions
diff --git a/svx/inc/sxallitm.hxx b/svx/inc/sxallitm.hxx
index 3539a8ca6ded..ac0aedc78e9e 100644
--- a/svx/inc/sxallitm.hxx
+++ b/svx/inc/sxallitm.hxx
@@ -25,7 +25,7 @@
class SdrAllPositionXItem: public SdrMetricItem {
public:
SdrAllPositionXItem(long nPosX=0): SdrMetricItem(SDRATTR_ALLPOSITIONX,nPosX) {}
- virtual SfxPoolItem* Clone(SfxItemPool*) const override
+ virtual SdrAllPositionXItem* Clone(SfxItemPool*) const override
{
return new SdrAllPositionXItem(*this);
}
@@ -34,7 +34,7 @@ public:
class SdrAllPositionYItem: public SdrMetricItem {
public:
SdrAllPositionYItem(long nPosY=0): SdrMetricItem(SDRATTR_ALLPOSITIONY,nPosY) {}
- virtual SfxPoolItem* Clone(SfxItemPool*) const override
+ virtual SdrAllPositionYItem* Clone(SfxItemPool*) const override
{
return new SdrAllPositionYItem(*this);
}
@@ -43,18 +43,16 @@ public:
class SdrAllSizeWidthItem: public SdrMetricItem {
public:
SdrAllSizeWidthItem(long nWdt=0): SdrMetricItem(SDRATTR_ALLSIZEWIDTH,nWdt) {}
- virtual SfxPoolItem* Clone(SfxItemPool*) const override
+ virtual SdrAllSizeWidthItem* Clone(SfxItemPool*) const override
{
return new SdrAllSizeWidthItem(*this);
}
};
-
-
class SdrAllSizeHeightItem: public SdrMetricItem {
public:
SdrAllSizeHeightItem(long nHgt=0): SdrMetricItem(SDRATTR_ALLSIZEHEIGHT,nHgt) {}
- virtual SfxPoolItem* Clone(SfxItemPool*) const override
+ virtual SdrAllSizeHeightItem* Clone(SfxItemPool*) const override
{
return new SdrAllSizeHeightItem(*this);
}
diff --git a/svx/inc/sxcikitm.hxx b/svx/inc/sxcikitm.hxx
index a92fbc1c8856..c3fc7ce475c0 100644
--- a/svx/inc/sxcikitm.hxx
+++ b/svx/inc/sxcikitm.hxx
@@ -26,7 +26,7 @@
class SdrCircKindItem: public SfxEnumItem<SdrCircKind> {
public:
SdrCircKindItem(SdrCircKind eKind=SdrCircKind::Full): SfxEnumItem(SDRATTR_CIRCKIND, eKind) {}
- virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override;
+ virtual SdrCircKindItem* Clone(SfxItemPool* pPool=nullptr) const override;
virtual sal_uInt16 GetValueCount() const override; // { return 4; }
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
diff --git a/svx/inc/sxlayitm.hxx b/svx/inc/sxlayitm.hxx
index 9516f4efb9de..6260ae4147bd 100644
--- a/svx/inc/sxlayitm.hxx
+++ b/svx/inc/sxlayitm.hxx
@@ -28,14 +28,14 @@ class SdrLayerIdItem: public SfxUInt16Item {
public:
SdrLayerIdItem(SdrLayerID nId): SfxUInt16Item(SDRATTR_LAYERID,sal_uInt8(nId)) {}
SdrLayerID GetValue() const { return SdrLayerID(SfxUInt16Item::GetValue()); }
- virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override;
+ virtual SdrLayerIdItem* Clone(SfxItemPool* pPool=nullptr) const override;
};
class SdrLayerNameItem: public SfxStringItem {
public:
SdrLayerNameItem() : SfxStringItem() { SetWhich(SDRATTR_LAYERNAME); }
SdrLayerNameItem(const OUString& rStr) : SfxStringItem(SDRATTR_LAYERNAME,rStr) {}
- virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override;
+ virtual SdrLayerNameItem* Clone(SfxItemPool* pPool=nullptr) const override;
};
#endif
diff --git a/svx/inc/sxlogitm.hxx b/svx/inc/sxlogitm.hxx
index 6a7db6e56340..70fe78c00131 100644
--- a/svx/inc/sxlogitm.hxx
+++ b/svx/inc/sxlogitm.hxx
@@ -25,18 +25,16 @@
class SdrLogicSizeWidthItem: public SdrMetricItem {
public:
SdrLogicSizeWidthItem(long nWdt=0): SdrMetricItem(SDRATTR_LOGICSIZEWIDTH,nWdt) {}
- virtual SfxPoolItem* Clone(SfxItemPool*) const override
+ virtual SdrLogicSizeWidthItem* Clone(SfxItemPool*) const override
{
return new SdrLogicSizeWidthItem(*this);
}
};
-
-
class SdrLogicSizeHeightItem: public SdrMetricItem {
public:
SdrLogicSizeHeightItem(long nHgt=0): SdrMetricItem(SDRATTR_LOGICSIZEHEIGHT,nHgt) {}
- virtual SfxPoolItem* Clone(SfxItemPool*) const override
+ virtual SdrLogicSizeHeightItem* Clone(SfxItemPool*) const override
{
return new SdrLogicSizeHeightItem(*this);
}
diff --git a/svx/inc/sxmkitm.hxx b/svx/inc/sxmkitm.hxx
index 741752b01f39..bebcda57b642 100644
--- a/svx/inc/sxmkitm.hxx
+++ b/svx/inc/sxmkitm.hxx
@@ -29,7 +29,7 @@ enum SdrMeasureKind {SDRMEASURE_STD,SDRMEASURE_RADIUS}; // n.i.
class SdrMeasureKindItem: public SfxEnumItem<SdrMeasureKind> {
public:
SdrMeasureKindItem() : SfxEnumItem(SDRATTR_MEASUREKIND, SDRMEASURE_STD) {}
- virtual SfxPoolItem* Clone(SfxItemPool* pPool=nullptr) const override;
+ virtual SdrMeasureKindItem* Clone(SfxItemPool* pPool=nullptr) const override;
virtual sal_uInt16 GetValueCount() const override; // { return 2; }
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
diff --git a/svx/inc/sxmoitm.hxx b/svx/inc/sxmoitm.hxx
index 2ae11c2d74c1..0b50536dd747 100644
--- a/svx/inc/sxmoitm.hxx
+++ b/svx/inc/sxmoitm.hxx
@@ -27,7 +27,7 @@
class SdrMeasureOverhangItem: public SdrMetricItem {
public:
SdrMeasureOverhangItem(long nVal): SdrMetricItem(SDRATTR_MEASUREOVERHANG,nVal) {}
- virtual SfxPoolItem* Clone(SfxItemPool*) const override
+ virtual SdrMeasureOverhangItem* Clone(SfxItemPool*) const override
{
return new SdrMeasureOverhangItem(*this);
}
diff --git a/svx/inc/sxmovitm.hxx b/svx/inc/sxmovitm.hxx
index ff8683b7fc52..d3a4087c6f13 100644
--- a/svx/inc/sxmovitm.hxx
+++ b/svx/inc/sxmovitm.hxx
@@ -25,7 +25,7 @@
class SdrMoveXItem: public SdrMetricItem {
public:
SdrMoveXItem(): SdrMetricItem(SDRATTR_MOVEX,0) {}
- SfxPoolItem* Clone(SfxItemPool*) const override
+ SdrMoveXItem* Clone(SfxItemPool*) const override
{
return new SdrMoveXItem(*this);
}
@@ -34,7 +34,7 @@ public:
class SdrMoveYItem: public SdrMetricItem {
public:
SdrMoveYItem(): SdrMetricItem(SDRATTR_MOVEY,0) {}
- SfxPoolItem* Clone(SfxItemPool*) const override
+ SdrMoveYItem* Clone(SfxItemPool*) const override
{
return new SdrMoveYItem(*this);
}
diff --git a/svx/inc/sxmsitm.hxx b/svx/inc/sxmsitm.hxx
index da889bb823d8..208ede07e6c7 100644
--- a/svx/inc/sxmsitm.hxx
+++ b/svx/inc/sxmsitm.hxx
@@ -28,7 +28,7 @@
class SdrMeasureScaleItem: public SdrScaleItem {
public:
SdrMeasureScaleItem() : SdrScaleItem(SDRATTR_MEASURESCALE,Fraction(1,1)) {}
- virtual SfxPoolItem* Clone(SfxItemPool*) const override
+ virtual SdrMeasureScaleItem* Clone(SfxItemPool*) const override
{
return new SdrMeasureScaleItem(*this);
}
diff --git a/svx/inc/sxmtaitm.hxx b/svx/inc/sxmtaitm.hxx
index 663ce66fc072..a658fd97c828 100644
--- a/svx/inc/sxmtaitm.hxx
+++ b/svx/inc/sxmtaitm.hxx
@@ -28,7 +28,7 @@
class SdrMeasureTextAutoAngleItem: public SdrYesNoItem {
public:
SdrMeasureTextAutoAngleItem(bool bOn=true): SdrYesNoItem(SDRATTR_MEASURETEXTAUTOANGLE,bOn) {}
- virtual SfxPoolItem* Clone(SfxItemPool*) const override
+ virtual SdrMeasureTextAutoAngleItem* Clone(SfxItemPool*) const override
{
return new SdrMeasureTextAutoAngleItem(*this);
}
@@ -39,7 +39,7 @@ public:
class SdrMeasureTextAutoAngleViewItem: public SdrAngleItem {
public:
SdrMeasureTextAutoAngleViewItem(long nVal=31500): SdrAngleItem(SDRATTR_MEASURETEXTAUTOANGLEVIEW,nVal) {}
- virtual SfxPoolItem* Clone(SfxItemPool*) const override
+ virtual SdrMeasureTextAutoAngleViewItem* Clone(SfxItemPool*) const override
{
return new SdrMeasureTextAutoAngleViewItem(*this);
}
diff --git a/svx/inc/sxoneitm.hxx b/svx/inc/sxoneitm.hxx
index 0a368b471cf7..516a93b919b2 100644
--- a/svx/inc/sxoneitm.hxx
+++ b/svx/inc/sxoneitm.hxx
@@ -25,7 +25,7 @@
class SdrOnePositionXItem: public SdrMetricItem {
public:
SdrOnePositionXItem(long nPosX=0): SdrMetricItem(SDRATTR_ONEPOSITIONX,nPosX) {}
- virtual SfxPoolItem* Clone(SfxItemPool*) const override
+ virtual SdrOnePositionXItem* Clone(SfxItemPool*) const override
{
return new SdrOnePositionXItem(*this);
}
@@ -34,7 +34,7 @@ public:
class SdrOnePositionYItem: public SdrMetricItem {
public:
SdrOnePositionYItem(long nPosY=0): SdrMetricItem(SDRATTR_ONEPOSITIONY,nPosY) {}
- virtual SfxPoolItem* Clone(SfxItemPool*) const override
+ virtual SdrOnePositionYItem* Clone(SfxItemPool*) const override
{
return new SdrOnePositionYItem(*this);
}
@@ -43,18 +43,16 @@ public:
class SdrOneSizeWidthItem: public SdrMetricItem {
public:
SdrOneSizeWidthItem(long nWdt=0): SdrMetricItem(SDRATTR_ONESIZEWIDTH,nWdt) {}
- virtual SfxPoolItem* Clone(SfxItemPool*) const override
+ virtual SdrOneSizeWidthItem* Clone(SfxItemPool*) const override
{
return new SdrOneSizeWidthItem(*this);
}
};
-
-
class SdrOneSizeHeightItem: public SdrMetricItem {
public:
SdrOneSizeHeightItem(long nHgt=0): SdrMetricItem(SDRATTR_ONESIZEHEIGHT,nHgt) {}
- virtual SfxPoolItem* Clone(SfxItemPool*) const override
+ virtual SdrOneSizeHeightItem* Clone(SfxItemPool*) const override
{
return new SdrOneSizeHeightItem(*this);
}
diff --git a/svx/inc/sxopitm.hxx b/svx/inc/sxopitm.hxx
index 0484281879c5..b0d45bd54323 100644
--- a/svx/inc/sxopitm.hxx
+++ b/svx/inc/sxopitm.hxx
@@ -25,7 +25,7 @@
class SdrObjPrintableItem: public SdrYesNoItem {
public:
SdrObjPrintableItem(bool bOn=false): SdrYesNoItem(SDRATTR_OBJPRINTABLE,bOn) {}
- virtual SfxPoolItem* Clone(SfxItemPool*) const override
+ virtual SdrObjPrintableItem* Clone(SfxItemPool*) const override
{
return new SdrObjPrintableItem(*this);
}
@@ -34,7 +34,7 @@ public:
class SdrObjVisibleItem: public SdrYesNoItem {
public:
SdrObjVisibleItem(bool bOn=true): SdrYesNoItem(SDRATTR_OBJVISIBLE,bOn) {}
- virtual SfxPoolItem* Clone(SfxItemPool*) const override
+ virtual SdrObjVisibleItem* Clone(SfxItemPool*) const override
{
return new SdrObjVisibleItem(*this);
}
diff --git a/svx/inc/sxreaitm.hxx b/svx/inc/sxreaitm.hxx
index 8235b18b4387..409a6512a1cf 100644
--- a/svx/inc/sxreaitm.hxx
+++ b/svx/inc/sxreaitm.hxx
@@ -26,7 +26,7 @@
class SdrResizeXAllItem: public SdrFractionItem {
public:
SdrResizeXAllItem(): SdrFractionItem(SDRATTR_RESIZEXALL,Fraction(1,1)) {}
- virtual SfxPoolItem* Clone(SfxItemPool*) const override
+ virtual SdrResizeXAllItem* Clone(SfxItemPool*) const override
{
return new SdrResizeXAllItem(*this);
}
@@ -35,7 +35,7 @@ public:
class SdrResizeYAllItem: public SdrFractionItem {
public:
SdrResizeYAllItem(): SdrFractionItem(SDRATTR_RESIZEYALL,Fraction(1,1)) {}
- virtual SfxPoolItem* Clone(SfxItemPool*) const override
+ virtual SdrResizeYAllItem* Clone(SfxItemPool*) const override
{
return new SdrResizeYAllItem(*this);
}
diff --git a/svx/inc/sxreoitm.hxx b/svx/inc/sxreoitm.hxx
index f0a5c318e05e..0c58a3f618f5 100644
--- a/svx/inc/sxreoitm.hxx
+++ b/svx/inc/sxreoitm.hxx
@@ -26,7 +26,7 @@
class SdrResizeXOneItem: public SdrFractionItem {
public:
SdrResizeXOneItem(): SdrFractionItem(SDRATTR_RESIZEXONE,Fraction(1,1)) {}
- SfxPoolItem* Clone(SfxItemPool*) const override
+ SdrResizeXOneItem* Clone(SfxItemPool*) const override
{
return new SdrResizeXOneItem(*this);
}
@@ -35,7 +35,7 @@ public:
class SdrResizeYOneItem: public SdrFractionItem {
public:
SdrResizeYOneItem(): SdrFractionItem(SDRATTR_RESIZEYONE,Fraction(1,1)) {}
- SfxPoolItem* Clone(SfxItemPool*) const override
+ SdrResizeYOneItem* Clone(SfxItemPool*) const override
{
return new SdrResizeYOneItem(*this);
}
diff --git a/svx/inc/sxroaitm.hxx b/svx/inc/sxroaitm.hxx
index 4b1c249c25dd..5dadbde33f8b 100644
--- a/svx/inc/sxroaitm.hxx
+++ b/svx/inc/sxroaitm.hxx
@@ -25,7 +25,7 @@
class SdrRotateAllItem: public SdrAngleItem {
public:
SdrRotateAllItem(): SdrAngleItem(SDRATTR_ROTATEALL,0) {}
- virtual SfxPoolItem* Clone(SfxItemPool*) const override
+ virtual SdrRotateAllItem* Clone(SfxItemPool*) const override
{
return new SdrRotateAllItem(*this);
}
diff --git a/svx/inc/sxrooitm.hxx b/svx/inc/sxrooitm.hxx
index 20f0ba449c97..28ceadafd90a 100644
--- a/svx/inc/sxrooitm.hxx
+++ b/svx/inc/sxrooitm.hxx
@@ -25,7 +25,7 @@
class SdrRotateOneItem: public SdrAngleItem {
public:
SdrRotateOneItem(): SdrAngleItem(SDRATTR_ROTATEONE,0) {}
- SfxPoolItem* Clone(SfxItemPool*) const override
+ SdrRotateOneItem* Clone(SfxItemPool*) const override
{
return new SdrRotateOneItem(*this);
}
diff --git a/svx/inc/sxsaitm.hxx b/svx/inc/sxsaitm.hxx
index 2e5d3971c342..ccaf50901be8 100644
--- a/svx/inc/sxsaitm.hxx
+++ b/svx/inc/sxsaitm.hxx
@@ -25,7 +25,7 @@
class SdrShearAngleItem: public SdrAngleItem {
public:
SdrShearAngleItem(long nAngle=0): SdrAngleItem(SDRATTR_SHEARANGLE,nAngle) {}
- virtual SfxPoolItem* Clone(SfxItemPool*) const override
+ virtual SdrShearAngleItem* Clone(SfxItemPool*) const override
{
return new SdrShearAngleItem(*this);
}
diff --git a/svx/inc/sxsalitm.hxx b/svx/inc/sxsalitm.hxx
index ccd4aee0eb97..f73b460a9800 100644
--- a/svx/inc/sxsalitm.hxx
+++ b/svx/inc/sxsalitm.hxx
@@ -25,7 +25,7 @@
class SdrHorzShearAllItem: public SdrAngleItem {
public:
SdrHorzShearAllItem(): SdrAngleItem(SDRATTR_HORZSHEARALL,0) {}
- virtual SfxPoolItem* Clone(SfxItemPool*) const override
+ virtual SdrHorzShearAllItem* Clone(SfxItemPool*) const override
{
return new SdrHorzShearAllItem(*this);
}
@@ -34,7 +34,7 @@ public:
class SdrVertShearAllItem: public SdrAngleItem {
public:
SdrVertShearAllItem(): SdrAngleItem(SDRATTR_VERTSHEARALL,0) {}
- virtual SfxPoolItem* Clone(SfxItemPool*) const override
+ virtual SdrVertShearAllItem* Clone(SfxItemPool*) const override
{
return new SdrVertShearAllItem(*this);
}
diff --git a/svx/inc/sxsoitm.hxx b/svx/inc/sxsoitm.hxx
index 0d01cc7530a4..2c5273a5bda7 100644
--- a/svx/inc/sxsoitm.hxx
+++ b/svx/inc/sxsoitm.hxx
@@ -25,7 +25,7 @@
class SdrHorzShearOneItem: public SdrAngleItem {
public:
SdrHorzShearOneItem(): SdrAngleItem(SDRATTR_HORZSHEARONE,0) {}
- SfxPoolItem* Clone(SfxItemPool*) const override
+ SdrHorzShearOneItem* Clone(SfxItemPool*) const override
{
return new SdrHorzShearOneItem(*this);
}
@@ -34,7 +34,7 @@ public:
class SdrVertShearOneItem: public SdrAngleItem {
public:
SdrVertShearOneItem(): SdrAngleItem(SDRATTR_VERTSHEARONE,0) {}
- SfxPoolItem* Clone(SfxItemPool*) const override
+ SdrVertShearOneItem* Clone(SfxItemPool*) const override
{
return new SdrVertShearOneItem(*this);
}
diff --git a/svx/inc/sxtraitm.hxx b/svx/inc/sxtraitm.hxx
index 645831b2b0c4..1cebff377699 100644
--- a/svx/inc/sxtraitm.hxx
+++ b/svx/inc/sxtraitm.hxx
@@ -25,7 +25,7 @@
class SdrTransformRef1XItem: public SdrMetricItem {
public:
SdrTransformRef1XItem(long nHgt=0): SdrMetricItem(SDRATTR_TRANSFORMREF1X,nHgt) {}
- virtual SfxPoolItem* Clone(SfxItemPool*) const override
+ virtual SdrTransformRef1XItem* Clone(SfxItemPool*) const override
{
return new SdrTransformRef1XItem(*this);
}
@@ -34,7 +34,7 @@ public:
class SdrTransformRef1YItem: public SdrMetricItem {
public:
SdrTransformRef1YItem(long nHgt=0): SdrMetricItem(SDRATTR_TRANSFORMREF1Y,nHgt) {}
- virtual SfxPoolItem* Clone(SfxItemPool*) const override
+ virtual SdrTransformRef1YItem* Clone(SfxItemPool*) const override
{
return new SdrTransformRef1YItem(*this);
}
@@ -43,7 +43,7 @@ public:
class SdrTransformRef2XItem: public SdrMetricItem {
public:
SdrTransformRef2XItem(long nHgt=0): SdrMetricItem(SDRATTR_TRANSFORMREF2X,nHgt) {}
- virtual SfxPoolItem* Clone(SfxItemPool*) const override
+ virtual SdrTransformRef2XItem* Clone(SfxItemPool*) const override
{
return new SdrTransformRef2XItem(*this);
}
@@ -52,7 +52,7 @@ public:
class SdrTransformRef2YItem: public SdrMetricItem {
public:
SdrTransformRef2YItem(long nHgt=0): SdrMetricItem(SDRATTR_TRANSFORMREF2Y,nHgt) {}
- virtual SfxPoolItem* Clone(SfxItemPool*) const override
+ virtual SdrTransformRef2YItem* Clone(SfxItemPool*) const override
{
return new SdrTransformRef2YItem(*this);
}