summaryrefslogtreecommitdiff
path: root/include/svl
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 /include/svl
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 'include/svl')
-rw-r--r--include/svl/aeitem.hxx2
-rw-r--r--include/svl/cintitem.hxx8
-rw-r--r--include/svl/custritm.hxx2
-rw-r--r--include/svl/eitem.hxx2
-rw-r--r--include/svl/flagitem.hxx2
-rw-r--r--include/svl/globalnameitem.hxx2
-rw-r--r--include/svl/grabbagitem.hxx2
-rw-r--r--include/svl/ilstitem.hxx2
-rw-r--r--include/svl/imageitm.hxx2
-rw-r--r--include/svl/int64item.hxx2
-rw-r--r--include/svl/intitem.hxx10
-rw-r--r--include/svl/lckbitem.hxx2
-rw-r--r--include/svl/macitem.hxx2
-rw-r--r--include/svl/poolitem.hxx4
-rw-r--r--include/svl/ptitem.hxx2
-rw-r--r--include/svl/rectitem.hxx2
-rw-r--r--include/svl/rngitem.hxx2
-rw-r--r--include/svl/slstitm.hxx2
-rw-r--r--include/svl/srchitem.hxx2
-rw-r--r--include/svl/stritem.hxx2
-rw-r--r--include/svl/visitem.hxx2
21 files changed, 29 insertions, 29 deletions
diff --git a/include/svl/aeitem.hxx b/include/svl/aeitem.hxx
index 9b2c942b0066..9778b67e8ad9 100644
--- a/include/svl/aeitem.hxx
+++ b/include/svl/aeitem.hxx
@@ -38,7 +38,7 @@ public:
void SetTextByPos( sal_uInt16 nPos, const OUString &rText );
OUString const & GetTextByPos( sal_uInt16 nPos ) const;
sal_Int32 GetTextCount() const;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SfxAllEnumItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( SfxPoolItem const & ) const override;
};
diff --git a/include/svl/cintitem.hxx b/include/svl/cintitem.hxx
index 5176d150629c..bde59c39906b 100644
--- a/include/svl/cintitem.hxx
+++ b/include/svl/cintitem.hxx
@@ -47,7 +47,7 @@ public:
virtual bool PutValue(const css::uno::Any& rVal,
sal_uInt8 nMemberId) override;
- virtual SfxPoolItem * Clone(SfxItemPool * = nullptr) const override;
+ virtual CntByteItem* Clone(SfxItemPool * = nullptr) const override;
sal_uInt8 GetValue() const { return m_nValue; }
@@ -84,7 +84,7 @@ public:
virtual bool PutValue(const css::uno::Any& rVal,
sal_uInt8 nMemberId) override;
- virtual SfxPoolItem * Clone(SfxItemPool * = nullptr) const override;
+ virtual CntUInt16Item* Clone(SfxItemPool * = nullptr) const override;
sal_uInt16 GetValue() const { return m_nValue; }
@@ -121,7 +121,7 @@ public:
virtual bool PutValue(const css::uno::Any& rVal,
sal_uInt8 nMemberId) override;
- virtual SfxPoolItem * Clone(SfxItemPool * = nullptr) const override;
+ virtual CntInt32Item* Clone(SfxItemPool * = nullptr) const override;
sal_Int32 GetValue() const { return m_nValue; }
@@ -158,7 +158,7 @@ public:
virtual bool PutValue(const css::uno::Any& rVal,
sal_uInt8 nMemberId) override;
- virtual SfxPoolItem * Clone(SfxItemPool * = nullptr) const override;
+ virtual CntUInt32Item* Clone(SfxItemPool * = nullptr) const override;
sal_uInt32 GetValue() const { return m_nValue; }
diff --git a/include/svl/custritm.hxx b/include/svl/custritm.hxx
index 5ace7fa7c5c7..d46fe011ad6c 100644
--- a/include/svl/custritm.hxx
+++ b/include/svl/custritm.hxx
@@ -51,7 +51,7 @@ public:
virtual bool PutValue(const css::uno::Any& rVal, sal_uInt8 nMemberId) override;
- virtual SfxPoolItem * Clone(SfxItemPool * = nullptr) const override;
+ virtual CntUnencodedStringItem* Clone(SfxItemPool * = nullptr) const override;
const OUString & GetValue() const { return m_aValue; }
diff --git a/include/svl/eitem.hxx b/include/svl/eitem.hxx
index aaef90e75964..114e451c061d 100644
--- a/include/svl/eitem.hxx
+++ b/include/svl/eitem.hxx
@@ -97,7 +97,7 @@ public:
virtual bool PutValue(const css::uno::Any& rVal, sal_uInt8) override;
- virtual SfxPoolItem * Clone(SfxItemPool * = nullptr) const override;
+ virtual SfxBoolItem* Clone(SfxItemPool * = nullptr) const override;
virtual OUString GetValueTextByVal(bool bTheValue) const;
};
diff --git a/include/svl/flagitem.hxx b/include/svl/flagitem.hxx
index db061e38c326..70b968f2c95c 100644
--- a/include/svl/flagitem.hxx
+++ b/include/svl/flagitem.hxx
@@ -37,7 +37,7 @@ public:
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SfxFlagItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
MapUnit ePresMetric,
diff --git a/include/svl/globalnameitem.hxx b/include/svl/globalnameitem.hxx
index a3ab6d3e11a6..edbb56273232 100644
--- a/include/svl/globalnameitem.hxx
+++ b/include/svl/globalnameitem.hxx
@@ -40,7 +40,7 @@ public:
SfxGlobalNameItem & operator =(SfxGlobalNameItem &&) = delete; // due to SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SfxGlobalNameItem* Clone( SfxItemPool *pPool = nullptr ) const override;
const SvGlobalName& GetValue() const { return m_aName; }
virtual bool PutValue ( const css::uno::Any& rVal,
diff --git a/include/svl/grabbagitem.hxx b/include/svl/grabbagitem.hxx
index 3614e79a18e5..77a619aec4c1 100644
--- a/include/svl/grabbagitem.hxx
+++ b/include/svl/grabbagitem.hxx
@@ -36,7 +36,7 @@ public:
std::map<OUString, css::uno::Any>& GetGrabBag() { return m_aMap; }
bool operator==(const SfxPoolItem& rItem) const override;
- SfxPoolItem* Clone(SfxItemPool* pPool = nullptr) const override;
+ SfxGrabBagItem* Clone(SfxItemPool* pPool = nullptr) const override;
bool PutValue(const css::uno::Any& rVal, sal_uInt8 nMemberId) override;
bool QueryValue(css::uno::Any& rVal, sal_uInt8 nMemberId = 0) const override;
diff --git a/include/svl/ilstitem.hxx b/include/svl/ilstitem.hxx
index 592743d71182..ec40762b6a43 100644
--- a/include/svl/ilstitem.hxx
+++ b/include/svl/ilstitem.hxx
@@ -45,7 +45,7 @@ public:
const std::vector< sal_Int32 >& GetList() const { return m_aList; }
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SfxIntegerListItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool PutValue ( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
};
diff --git a/include/svl/imageitm.hxx b/include/svl/imageitm.hxx
index cee429ba892b..ccecc5356637 100644
--- a/include/svl/imageitm.hxx
+++ b/include/svl/imageitm.hxx
@@ -34,7 +34,7 @@ public:
SfxImageItem( const SfxImageItem& );
virtual ~SfxImageItem() override;
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
+ virtual SfxImageItem* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
diff --git a/include/svl/int64item.hxx b/include/svl/int64item.hxx
index b4f30d9b3337..70a502c645a8 100644
--- a/include/svl/int64item.hxx
+++ b/include/svl/int64item.hxx
@@ -39,7 +39,7 @@ public:
virtual bool PutValue(
const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
- virtual SfxPoolItem* Clone( SfxItemPool* pOther = nullptr ) const override;
+ virtual SfxInt64Item* Clone( SfxItemPool* pOther = nullptr ) const override;
sal_Int64 GetValue() const { return mnValue;}
diff --git a/include/svl/intitem.hxx b/include/svl/intitem.hxx
index 5bf9785cbf43..92999568b7f2 100644
--- a/include/svl/intitem.hxx
+++ b/include/svl/intitem.hxx
@@ -33,7 +33,7 @@ public:
explicit SfxByteItem(sal_uInt16 which = 0, sal_uInt8 nValue = 0):
CntByteItem(which, nValue) {}
- virtual SfxPoolItem * Clone(SfxItemPool * = nullptr) const override
+ virtual SfxByteItem* Clone(SfxItemPool * = nullptr) const override
{ return new SfxByteItem(*this); }
};
@@ -64,7 +64,7 @@ public:
virtual bool PutValue( const css::uno::Any& rVal,
sal_uInt8 nMemberId ) override;
- virtual SfxPoolItem * Clone(SfxItemPool * = nullptr) const override;
+ virtual SfxInt16Item* Clone(SfxItemPool * = nullptr) const override;
sal_Int16 GetValue() const { return m_nValue; }
@@ -86,7 +86,7 @@ public:
explicit SfxUInt16Item(sal_uInt16 which = 0, sal_uInt16 nValue = 0):
CntUInt16Item(which, nValue) {}
- virtual SfxPoolItem * Clone(SfxItemPool * = nullptr) const override
+ virtual SfxUInt16Item* Clone(SfxItemPool * = nullptr) const override
{ return new SfxUInt16Item(*this); }
void dumpAsXml(xmlTextWriterPtr pWriter) const override;
@@ -102,7 +102,7 @@ public:
explicit SfxInt32Item(sal_uInt16 which = 0, sal_Int32 nValue = 0):
CntInt32Item(which, nValue) {}
- virtual SfxPoolItem * Clone(SfxItemPool * = nullptr) const override
+ virtual SfxInt32Item* Clone(SfxItemPool * = nullptr) const override
{ return new SfxInt32Item(*this); }
void dumpAsXml(xmlTextWriterPtr pWriter) const override;
@@ -118,7 +118,7 @@ public:
explicit SfxUInt32Item(sal_uInt16 which = 0, sal_uInt32 nValue = 0):
CntUInt32Item(which, nValue) {}
- virtual SfxPoolItem * Clone(SfxItemPool * = nullptr) const override
+ virtual SfxUInt32Item* Clone(SfxItemPool * = nullptr) const override
{ return new SfxUInt32Item(*this); }
void dumpAsXml(xmlTextWriterPtr pWriter) const override;
diff --git a/include/svl/lckbitem.hxx b/include/svl/lckbitem.hxx
index 0e0f7dd6dd81..5625a7aac098 100644
--- a/include/svl/lckbitem.hxx
+++ b/include/svl/lckbitem.hxx
@@ -38,7 +38,7 @@ public:
SfxLockBytesItem & operator =(SfxLockBytesItem &&) = delete; // due to SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SfxLockBytesItem* Clone( SfxItemPool *pPool = nullptr ) const override;
SvLockBytes* GetValue() const { return _xVal.get(); }
diff --git a/include/svl/macitem.hxx b/include/svl/macitem.hxx
index f796d1d3586b..19a49dde97c3 100644
--- a/include/svl/macitem.hxx
+++ b/include/svl/macitem.hxx
@@ -118,7 +118,7 @@ public:
MapUnit ePresMetric,
OUString &rText,
const IntlWrapper& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SvxMacroItem* Clone( SfxItemPool *pPool = nullptr ) const override;
const SvxMacroTableDtor& GetMacroTable() const { return aMacroTable;}
void SetMacroTable( const SvxMacroTableDtor& rTbl ) { aMacroTable = rTbl; }
diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx
index d3b95e0cf9f5..f1bb0cfab4d3 100644
--- a/include/svl/poolitem.hxx
+++ b/include/svl/poolitem.hxx
@@ -268,7 +268,7 @@ public:
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
// create a copy of itself
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SfxVoidItem* Clone( SfxItemPool *pPool = nullptr ) const override;
/** Always returns true as this is an SfxVoidItem. */
virtual bool IsVoidItem() const override;
@@ -295,7 +295,7 @@ public:
const IntlWrapper& ) const override;
// create a copy of itself
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override = 0;
+ virtual SfxSetItem* Clone( SfxItemPool *pPool = nullptr ) const override = 0;
const SfxItemSet& GetItemSet() const
{ return *pSet; }
diff --git a/include/svl/ptitem.hxx b/include/svl/ptitem.hxx
index c98a2fe81adf..2ceb39410695 100644
--- a/include/svl/ptitem.hxx
+++ b/include/svl/ptitem.hxx
@@ -43,7 +43,7 @@ public:
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SfxPointItem* Clone( SfxItemPool *pPool = nullptr ) const override;
const Point& GetValue() const { return aVal; }
void SetValue( const Point& rNewVal ) {
diff --git a/include/svl/rectitem.hxx b/include/svl/rectitem.hxx
index 5da145bb2da9..94465bad4149 100644
--- a/include/svl/rectitem.hxx
+++ b/include/svl/rectitem.hxx
@@ -41,7 +41,7 @@ public:
const IntlWrapper& ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SfxRectangleItem* Clone( SfxItemPool *pPool = nullptr ) const override;
const tools::Rectangle& GetValue() const { return aVal; }
virtual bool QueryValue( css::uno::Any& rVal,
diff --git a/include/svl/rngitem.hxx b/include/svl/rngitem.hxx
index 5b33e3d3574d..08404d83e6ef 100644
--- a/include/svl/rngitem.hxx
+++ b/include/svl/rngitem.hxx
@@ -39,7 +39,7 @@ public:
MapUnit ePresMetric,
OUString &rText,
const IntlWrapper& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SfxRangeItem* Clone( SfxItemPool *pPool = nullptr ) const override;
sal_uInt16& From() { return nFrom; }
};
diff --git a/include/svl/slstitm.hxx b/include/svl/slstitm.hxx
index ef2a1b83b8b5..9215cf82d7c8 100644
--- a/include/svl/slstitm.hxx
+++ b/include/svl/slstitm.hxx
@@ -60,7 +60,7 @@ public:
MapUnit ePresMetric,
OUString &rText,
const IntlWrapper& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SfxStringListItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool PutValue ( const css::uno::Any& rVal,
sal_uInt8 nMemberId ) override;
diff --git a/include/svl/srchitem.hxx b/include/svl/srchitem.hxx
index 9b46d07e26b2..c7f7381f77c6 100644
--- a/include/svl/srchitem.hxx
+++ b/include/svl/srchitem.hxx
@@ -99,7 +99,7 @@ public:
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
virtual bool operator == ( const SfxPoolItem& ) const override;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+ virtual SvxSearchItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
MapUnit ePresMetric,
diff --git a/include/svl/stritem.hxx b/include/svl/stritem.hxx
index 37546d88b4b2..fe3695f7947b 100644
--- a/include/svl/stritem.hxx
+++ b/include/svl/stritem.hxx
@@ -34,7 +34,7 @@ public:
SfxStringItem(sal_uInt16 which, const OUString & rValue):
CntUnencodedStringItem(which, rValue) {}
- virtual SfxPoolItem * Clone(SfxItemPool * = nullptr) const override;
+ virtual SfxStringItem* Clone(SfxItemPool * = nullptr) const override;
void dumpAsXml(xmlTextWriterPtr pWriter) const override;
diff --git a/include/svl/visitem.hxx b/include/svl/visitem.hxx
index 457ac02f7e68..4ae5cdd550c1 100644
--- a/include/svl/visitem.hxx
+++ b/include/svl/visitem.hxx
@@ -49,7 +49,7 @@ public:
virtual bool PutValue( const css::uno::Any& rVal,
sal_uInt8 nMemberId ) override;
- virtual SfxPoolItem * Clone(SfxItemPool * = nullptr) const override;
+ virtual SfxVisibilityItem* Clone(SfxItemPool * = nullptr) const override;
bool GetValue() const { return m_nValue.bVisible; }
};