summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2017-09-30 23:58:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-10-28 08:33:08 +0200
commit165d0a149d631d96a91118dfc7686bd2ebb0b6b9 (patch)
tree67881f3106c0eb411194b616bacc3c27cbbbb9cc /include
parentWork around "xargs: environment is too large for exec" errors on Windows (diff)
downloadcore-165d0a149d631d96a91118dfc7686bd2ebb0b6b9.tar.gz
core-165d0a149d631d96a91118dfc7686bd2ebb0b6b9.zip
clang-tidy modernize-use-equals-default in svl
SfxPoolItem has a copy constructor and its copy assignment operator is deleted. Derived classes have a implicit defined copy constructor too, if all members are copy constructible. This patch removes default able copy constructors on such items. Note: clang-tidy only finds functions defined in source, inlined functions in headers are picked manualy. Change-Id: I7e642a2ecf139420c53f6fcb39208918dd1a8d52 Reviewed-on: https://gerrit.libreoffice.org/43003 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/svl/cenumitm.hxx3
-rw-r--r--include/svl/cintitem.hxx16
-rw-r--r--include/svl/custritm.hxx4
-rw-r--r--include/svl/eitem.hxx10
-rw-r--r--include/svl/flagitem.hxx1
-rw-r--r--include/svl/ilstitem.hxx1
-rw-r--r--include/svl/int64item.hxx1
-rw-r--r--include/svl/intitem.hxx4
-rw-r--r--include/svl/lckbitem.hxx1
-rw-r--r--include/svl/macitem.hxx7
-rw-r--r--include/svl/metitem.hxx1
-rw-r--r--include/svl/poolitem.hxx2
-rw-r--r--include/svl/ptitem.hxx1
-rw-r--r--include/svl/rectitem.hxx1
-rw-r--r--include/svl/rngitem.hxx1
-rw-r--r--include/svl/slstitm.hxx1
-rw-r--r--include/svl/visitem.hxx4
17 files changed, 3 insertions, 56 deletions
diff --git a/include/svl/cenumitm.hxx b/include/svl/cenumitm.hxx
index 1857be8cc886..92a537cb390a 100644
--- a/include/svl/cenumitm.hxx
+++ b/include/svl/cenumitm.hxx
@@ -28,8 +28,7 @@ class SVL_DLLPUBLIC SfxEnumItemInterface: public SfxPoolItem
protected:
explicit SfxEnumItemInterface(sal_uInt16 which): SfxPoolItem(which) {}
- SfxEnumItemInterface(const SfxEnumItemInterface & rItem):
- SfxPoolItem(rItem) {}
+ SfxEnumItemInterface(const SfxEnumItemInterface &) = default;
public:
diff --git a/include/svl/cintitem.hxx b/include/svl/cintitem.hxx
index 9b265179cd77..f8e1ea3f0fa3 100644
--- a/include/svl/cintitem.hxx
+++ b/include/svl/cintitem.hxx
@@ -33,10 +33,6 @@ public:
CntByteItem(sal_uInt16 which, sal_uInt8 nTheValue):
SfxPoolItem(which), m_nValue(nTheValue) {}
- CntByteItem(const CntByteItem & rItem):
- SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
- {}
-
virtual bool operator ==(const SfxPoolItem & rItem) const override;
virtual bool GetPresentation(SfxItemPresentation,
@@ -80,10 +76,6 @@ public:
CntUInt16Item(sal_uInt16 which, SvStream & rStream);
- CntUInt16Item(const CntUInt16Item & rItem):
- SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
- {}
-
virtual bool operator ==(const SfxPoolItem & rItem) const override;
virtual bool GetPresentation(SfxItemPresentation,
@@ -127,10 +119,6 @@ public:
CntInt32Item(sal_uInt16 which, SvStream & rStream);
- CntInt32Item(const CntInt32Item & rItem):
- SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
- {}
-
virtual bool operator ==(const SfxPoolItem & rItem) const override;
virtual bool GetPresentation(SfxItemPresentation,
@@ -174,10 +162,6 @@ public:
CntUInt32Item(sal_uInt16 nWhich, SvStream & rStream);
- CntUInt32Item(const CntUInt32Item & rItem):
- SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
- {}
-
virtual bool operator ==(const SfxPoolItem & rItem) const override;
virtual bool GetPresentation(SfxItemPresentation,
diff --git a/include/svl/custritm.hxx b/include/svl/custritm.hxx
index c48988448418..65facd5cd54e 100644
--- a/include/svl/custritm.hxx
+++ b/include/svl/custritm.hxx
@@ -37,10 +37,6 @@ public:
SfxPoolItem(which), m_aValue(rTheValue)
{}
- CntUnencodedStringItem(const CntUnencodedStringItem & rItem):
- SfxPoolItem(rItem), m_aValue(rItem.m_aValue)
- {}
-
virtual bool operator ==(const SfxPoolItem & rItem) const override;
virtual bool GetPresentation(SfxItemPresentation,
diff --git a/include/svl/eitem.hxx b/include/svl/eitem.hxx
index cbfc1a4930a0..eb488f65b251 100644
--- a/include/svl/eitem.hxx
+++ b/include/svl/eitem.hxx
@@ -36,10 +36,7 @@ protected:
, m_nValue(nValue)
{ }
- SfxEnumItem(const SfxEnumItem & rItem)
- : SfxEnumItemInterface(rItem)
- , m_nValue(rItem.m_nValue)
- { }
+ SfxEnumItem(const SfxEnumItem &) = default;
SfxEnumItem(sal_uInt16 const nWhich, SvStream & rStream)
: SfxEnumItemInterface(nWhich)
@@ -95,11 +92,6 @@ public:
, m_bValue(bValue)
{ }
- SfxBoolItem(SfxBoolItem const& rItem)
- : SfxPoolItem(rItem)
- , m_bValue(rItem.m_bValue)
- { }
-
SfxBoolItem(sal_uInt16 nWhich, SvStream & rStream);
bool GetValue() const { return m_bValue; }
diff --git a/include/svl/flagitem.hxx b/include/svl/flagitem.hxx
index 56965d68ba8b..ce88c35f96f6 100644
--- a/include/svl/flagitem.hxx
+++ b/include/svl/flagitem.hxx
@@ -31,7 +31,6 @@ class SVL_DLLPUBLIC SfxFlagItem: public SfxPoolItem
public:
explicit SfxFlagItem( sal_uInt16 nWhich = 0, sal_uInt16 nValue = 0 );
- SfxFlagItem( const SfxFlagItem& );
virtual sal_uInt8 GetFlagCount() const;
diff --git a/include/svl/ilstitem.hxx b/include/svl/ilstitem.hxx
index 422d38d6c023..a5916eadf1f1 100644
--- a/include/svl/ilstitem.hxx
+++ b/include/svl/ilstitem.hxx
@@ -34,7 +34,6 @@ public:
SfxIntegerListItem();
SfxIntegerListItem( sal_uInt16 nWhich, const ::std::vector < sal_Int32 >& rList );
SfxIntegerListItem( sal_uInt16 nWhich, const css::uno::Sequence < sal_Int32 >& rList );
- SfxIntegerListItem( const SfxIntegerListItem& rItem );
virtual ~SfxIntegerListItem() override;
const std::vector< sal_Int32 >& GetList() const { return m_aList; }
diff --git a/include/svl/int64item.hxx b/include/svl/int64item.hxx
index 3c2148e2411f..9a4defcd0e8b 100644
--- a/include/svl/int64item.hxx
+++ b/include/svl/int64item.hxx
@@ -20,7 +20,6 @@ class SVL_DLLPUBLIC SfxInt64Item : public SfxPoolItem
public:
SfxInt64Item( sal_uInt16 nWhich, sal_Int64 nVal );
SfxInt64Item( sal_uInt16 nWhich, SvStream & rStream );
- SfxInt64Item( const SfxInt64Item& rItem );
virtual ~SfxInt64Item() override;
diff --git a/include/svl/intitem.hxx b/include/svl/intitem.hxx
index 5c73398864ad..448eda8a514b 100644
--- a/include/svl/intitem.hxx
+++ b/include/svl/intitem.hxx
@@ -51,10 +51,6 @@ public:
SfxInt16Item(sal_uInt16 nWhich, SvStream & rStream);
- SfxInt16Item(const SfxInt16Item & rItem):
- SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
- {}
-
virtual bool operator ==(const SfxPoolItem & rItem) const override;
virtual bool GetPresentation(SfxItemPresentation,
diff --git a/include/svl/lckbitem.hxx b/include/svl/lckbitem.hxx
index b6548256c559..ca5402cf2933 100644
--- a/include/svl/lckbitem.hxx
+++ b/include/svl/lckbitem.hxx
@@ -31,7 +31,6 @@ public:
static SfxPoolItem* CreateDefault();
SfxLockBytesItem();
SfxLockBytesItem( sal_uInt16 nWhich, SvStream & );
- SfxLockBytesItem( const SfxLockBytesItem& );
virtual ~SfxLockBytesItem() override;
virtual bool operator==( const SfxPoolItem& ) const override;
diff --git a/include/svl/macitem.hxx b/include/svl/macitem.hxx
index 54ca627a632f..7d17b3349dd3 100644
--- a/include/svl/macitem.hxx
+++ b/include/svl/macitem.hxx
@@ -137,17 +137,12 @@ public:
private:
SvxMacroTableDtor aMacroTable;
- inline SvxMacroItem( const SvxMacroItem& );
- SvxMacroItem &operator=( const SvxMacroItem & ) = delete;
+ SvxMacroItem( const SvxMacroItem& ) = default;
};
inline SvxMacroItem::SvxMacroItem( const sal_uInt16 nId )
: SfxPoolItem( nId )
{}
-inline SvxMacroItem::SvxMacroItem( const SvxMacroItem &rCpy )
- : SfxPoolItem( rCpy ),
- aMacroTable( rCpy.GetMacroTable() )
-{}
inline bool SvxMacroItem::HasMacro( SvMacroItemId nEvent ) const
{
diff --git a/include/svl/metitem.hxx b/include/svl/metitem.hxx
index bcace549a956..be5b1b7ba497 100644
--- a/include/svl/metitem.hxx
+++ b/include/svl/metitem.hxx
@@ -26,7 +26,6 @@ class SVL_DLLPUBLIC SfxMetricItem: public SfxInt32Item
{
public:
explicit SfxMetricItem( sal_uInt16 nWhich, sal_uInt32 nValue );
- SfxMetricItem( const SfxMetricItem& );
virtual void ScaleMetrics( long lMult, long lDiv ) override;
virtual bool HasMetrics() const override;
diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx
index 5a7c5073396b..7f9540c166a2 100644
--- a/include/svl/poolitem.hxx
+++ b/include/svl/poolitem.hxx
@@ -243,11 +243,9 @@ inline bool IsInvalidItem(const SfxPoolItem *pItem)
class SVL_DLLPUBLIC SfxVoidItem final: public SfxPoolItem
{
- SfxVoidItem & operator=( const SfxVoidItem& ) = delete;
public:
static SfxPoolItem* CreateDefault();
explicit SfxVoidItem( sal_uInt16 nWhich );
- SfxVoidItem( const SfxVoidItem& );
virtual ~SfxVoidItem() override;
virtual bool operator==( const SfxPoolItem& ) const override;
diff --git a/include/svl/ptitem.hxx b/include/svl/ptitem.hxx
index 7854c089abeb..b4513c9e85fc 100644
--- a/include/svl/ptitem.hxx
+++ b/include/svl/ptitem.hxx
@@ -33,7 +33,6 @@ public:
static SfxPoolItem* CreateDefault();
SfxPointItem();
SfxPointItem( sal_uInt16 nWhich, const Point& rVal );
- SfxPointItem( const SfxPointItem& );
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
diff --git a/include/svl/rectitem.hxx b/include/svl/rectitem.hxx
index 25a722227355..d37be512bc47 100644
--- a/include/svl/rectitem.hxx
+++ b/include/svl/rectitem.hxx
@@ -34,7 +34,6 @@ public:
static SfxPoolItem* CreateDefault();
SfxRectangleItem();
SfxRectangleItem( sal_uInt16 nWhich, const tools::Rectangle& rVal );
- SfxRectangleItem( const SfxRectangleItem& );
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
diff --git a/include/svl/rngitem.hxx b/include/svl/rngitem.hxx
index e07f21f9cb6e..316b9c334f3d 100644
--- a/include/svl/rngitem.hxx
+++ b/include/svl/rngitem.hxx
@@ -33,7 +33,6 @@ private:
sal_uInt16 nTo;
public:
SfxRangeItem( sal_uInt16 nWID, sal_uInt16 nFrom, sal_uInt16 nTo );
- SfxRangeItem( const SfxRangeItem& rItem );
virtual bool operator==( const SfxPoolItem& ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,
MapUnit eCoreMetric,
diff --git a/include/svl/slstitm.hxx b/include/svl/slstitm.hxx
index c22a5bf6bf20..7f11ecbe4597 100644
--- a/include/svl/slstitm.hxx
+++ b/include/svl/slstitm.hxx
@@ -36,7 +36,6 @@ public:
SfxStringListItem();
SfxStringListItem( sal_uInt16 nWhich, const std::vector<OUString> *pList=nullptr );
SfxStringListItem( sal_uInt16 nWhich, SvStream& rStream );
- SfxStringListItem( const SfxStringListItem& rItem );
virtual ~SfxStringListItem() override;
std::vector<OUString>& GetList();
diff --git a/include/svl/visitem.hxx b/include/svl/visitem.hxx
index c73bd970f863..a5a481fa2a6c 100644
--- a/include/svl/visitem.hxx
+++ b/include/svl/visitem.hxx
@@ -38,10 +38,6 @@ public:
SfxVisibilityItem(sal_uInt16 which, SvStream & rStream);
- SfxVisibilityItem(const SfxVisibilityItem & rItem):
- SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
- {}
-
virtual bool operator ==(const SfxPoolItem & rItem) const override;
virtual bool GetPresentation(SfxItemPresentation, MapUnit, MapUnit,