[Libreoffice-commits] core.git: include/sfx2 sfx2/inc sfx2/source

Jochen Nitschke j.nitschke+logerrit at ok.de
Wed Oct 4 09:36:55 UTC 2017


 include/sfx2/minfitem.hxx         |    2 --
 include/sfx2/tplpitem.hxx         |    1 -
 include/sfx2/watermarkitem.hxx    |    1 -
 include/sfx2/zoomitem.hxx         |    2 --
 sfx2/inc/sorgitm.hxx              |    2 --
 sfx2/source/control/minfitem.cxx  |   14 --------------
 sfx2/source/control/sorgitm.cxx   |   15 ---------------
 sfx2/source/dialog/tplpitem.cxx   |   11 -----------
 sfx2/source/doc/watermarkitem.cxx |   10 ----------
 sfx2/source/doc/zoomitem.cxx      |   13 -------------
 10 files changed, 71 deletions(-)

New commits:
commit b18545688a6399dbf89b05dae585e15a75b8302a
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date:   Mon Oct 2 00:17:21 2017 +0200

    clang-tidy modernize-use-equals-default in sfx2
    
    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 and destructors
    on such items.
    
    Change-Id: I214dfc016f02617e39a69177aa2233573dfe5f28
    Reviewed-on: https://gerrit.libreoffice.org/43039
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/sfx2/minfitem.hxx b/include/sfx2/minfitem.hxx
index a80e5757a17a..4ee078822e2d 100644
--- a/include/sfx2/minfitem.hxx
+++ b/include/sfx2/minfitem.hxx
@@ -43,8 +43,6 @@ public:
                     const OUString &rMethodName,
                     const OUString &rComment);
 
-    SfxMacroInfoItem( const SfxMacroInfoItem& );
-
     virtual SfxPoolItem*    Clone( SfxItemPool *pPool = nullptr ) const override;
     virtual bool            operator==( const SfxPoolItem& ) const override;
     const OUString&         GetMethod() const
diff --git a/include/sfx2/tplpitem.hxx b/include/sfx2/tplpitem.hxx
index d76551ca03c7..f607466c4780 100644
--- a/include/sfx2/tplpitem.hxx
+++ b/include/sfx2/tplpitem.hxx
@@ -33,7 +33,6 @@ public:
     SfxTemplateItem();
     SfxTemplateItem( sal_uInt16 nWhich,
                      const OUString &rStyle );
-    SfxTemplateItem( const SfxTemplateItem& );
 
     const OUString&         GetStyleName() const { return aStyle; }
 
diff --git a/include/sfx2/watermarkitem.hxx b/include/sfx2/watermarkitem.hxx
index 9fd7a91415a4..104c330e0a4b 100644
--- a/include/sfx2/watermarkitem.hxx
+++ b/include/sfx2/watermarkitem.hxx
@@ -17,7 +17,6 @@ class SFX2_DLLPUBLIC SfxWatermarkItem: public SfxPoolItem
 public:
     static SfxPoolItem* CreateDefault();
     SfxWatermarkItem();
-    SfxWatermarkItem( const SfxWatermarkItem& );
     virtual SfxPoolItem*    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;
diff --git a/include/sfx2/zoomitem.hxx b/include/sfx2/zoomitem.hxx
index 6329c3157277..4bc7a682cea0 100644
--- a/include/sfx2/zoomitem.hxx
+++ b/include/sfx2/zoomitem.hxx
@@ -62,8 +62,6 @@ public:
 
     SvxZoomItem( SvxZoomType eZoomType = SvxZoomType::PERCENT,
                  sal_uInt16 nVal = 0, sal_uInt16 nWhich = SID_ATTR_ZOOM );
-    SvxZoomItem( const SvxZoomItem& );
-    virtual ~SvxZoomItem() override;
 
     void                    SetValueSet( SvxZoomEnableFlags nValues ) { nValueSet = nValues; }
     SvxZoomEnableFlags      GetValueSet() const { return nValueSet; }
diff --git a/sfx2/inc/sorgitm.hxx b/sfx2/inc/sorgitm.hxx
index 521eaa8967cb..f43ac927d84a 100644
--- a/sfx2/inc/sorgitm.hxx
+++ b/sfx2/inc/sorgitm.hxx
@@ -31,8 +31,6 @@ private:
 public:
     static SfxPoolItem* CreateDefault();
     SfxScriptOrganizerItem();
-    SfxScriptOrganizerItem( const SfxScriptOrganizerItem& );
-    virtual ~SfxScriptOrganizerItem() override;
 
     virtual SfxPoolItem*  Clone( SfxItemPool* pPool = nullptr ) const override;
     virtual bool          operator==( const SfxPoolItem& ) const override;
diff --git a/sfx2/source/control/minfitem.cxx b/sfx2/source/control/minfitem.cxx
index d7eeb624e454..f7b04998da92 100644
--- a/sfx2/source/control/minfitem.cxx
+++ b/sfx2/source/control/minfitem.cxx
@@ -38,20 +38,6 @@ SfxMacroInfoItem::SfxMacroInfoItem(
 {
 }
 
-
-// copy constructor
-
-SfxMacroInfoItem::SfxMacroInfoItem(const SfxMacroInfoItem& rCopy):
-    SfxPoolItem(rCopy),
-    pBasicManager(rCopy.pBasicManager),
-    aLibName(rCopy.aLibName),
-    aModuleName(rCopy.aModuleName),
-    aMethodName(rCopy.aMethodName),
-    aCommentText(rCopy.aCommentText)
-{
-}
-
-
 // op ==
 
 bool SfxMacroInfoItem::operator==( const SfxPoolItem& rCmp) const
diff --git a/sfx2/source/control/sorgitm.cxx b/sfx2/source/control/sorgitm.cxx
index 1d4395fc6d02..e064fbf5b1e5 100644
--- a/sfx2/source/control/sorgitm.cxx
+++ b/sfx2/source/control/sorgitm.cxx
@@ -34,21 +34,6 @@ SfxScriptOrganizerItem::SfxScriptOrganizerItem() :
 }
 
 
-SfxScriptOrganizerItem::SfxScriptOrganizerItem( const SfxScriptOrganizerItem& rItem ) :
-
-    SfxStringItem( rItem ),
-
-    aLanguage( rItem.aLanguage )
-
-{
-}
-
-
-SfxScriptOrganizerItem::~SfxScriptOrganizerItem()
-{
-}
-
-
 SfxPoolItem* SfxScriptOrganizerItem::Clone( SfxItemPool * ) const
 {
     return new SfxScriptOrganizerItem( *this );
diff --git a/sfx2/source/dialog/tplpitem.cxx b/sfx2/source/dialog/tplpitem.cxx
index 6f5f77ef1d37..154f7688575b 100644
--- a/sfx2/source/dialog/tplpitem.cxx
+++ b/sfx2/source/dialog/tplpitem.cxx
@@ -37,17 +37,6 @@ SfxTemplateItem::SfxTemplateItem
 {
 }
 
-
-// copy constuctor
-SfxTemplateItem::SfxTemplateItem( const SfxTemplateItem& rCopy ) :
-
-    SfxFlagItem( rCopy ),
-
-    aStyle( rCopy.aStyle )
-{
-}
-
-
 // op ==
 
 bool SfxTemplateItem::operator==( const SfxPoolItem& rCmp ) const
diff --git a/sfx2/source/doc/watermarkitem.cxx b/sfx2/source/doc/watermarkitem.cxx
index f54745694557..d6978ff153d9 100644
--- a/sfx2/source/doc/watermarkitem.cxx
+++ b/sfx2/source/doc/watermarkitem.cxx
@@ -26,16 +26,6 @@ SfxPoolItem* SfxWatermarkItem::CreateDefault()
     return new SfxWatermarkItem();
 }
 
-SfxWatermarkItem::SfxWatermarkItem( const SfxWatermarkItem& rCopy )
-: SfxPoolItem( rCopy )
-, m_aText( rCopy.m_aText )
-, m_aFont( rCopy.m_aFont )
-, m_nAngle( rCopy.m_nAngle )
-, m_nTransparency( rCopy.m_nTransparency )
-, m_nColor( rCopy.m_nColor )
-{
-}
-
 bool SfxWatermarkItem::operator==( const SfxPoolItem& rCmp ) const
 {
     return ( SfxPoolItem::operator==( rCmp ) &&
diff --git a/sfx2/source/doc/zoomitem.cxx b/sfx2/source/doc/zoomitem.cxx
index e528175a3187..b86c738e3c5f 100644
--- a/sfx2/source/doc/zoomitem.cxx
+++ b/sfx2/source/doc/zoomitem.cxx
@@ -47,19 +47,6 @@ SvxZoomItem::SvxZoomItem
 }
 
 
-SvxZoomItem::SvxZoomItem( const SvxZoomItem& rOrig )
-:   SfxUInt16Item( rOrig.Which(), rOrig.GetValue() ),
-    nValueSet( rOrig.GetValueSet() ),
-    eType( rOrig.GetType() )
-{
-}
-
-
-SvxZoomItem::~SvxZoomItem()
-{
-}
-
-
 SfxPoolItem* SvxZoomItem::Clone( SfxItemPool * /*pPool*/ ) const
 {
     return new SvxZoomItem( *this );


More information about the Libreoffice-commits mailing list