diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2017-11-19 17:10:24 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-19 20:31:53 +0100 |
commit | ac3e2eac2bfaf6a2a94ac1bb4926d35a55125b3e (patch) | |
tree | cdee3ce48a585544dbb2013226e3744512ecaf15 /sw | |
parent | 2d8cca33e3cce4a885fcfc9a3c38483927f2242d (diff) |
clang-tidy modernize-use-equals-default in sw/source/uibase
removing unused assignment operators for SwDocDisplayItem,
SwElemItem and SwShadowCursorItem, which are implicitly deleted now.
Change-Id: I25200c3c61b77c5dedf7cf9de3edabc9d1e68730
Reviewed-on: https://gerrit.libreoffice.org/44928
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/app/docstyle.cxx | 19 | ||||
-rw-r--r-- | sw/source/uibase/config/caption.cxx | 28 | ||||
-rw-r--r-- | sw/source/uibase/config/cfgitems.cxx | 77 | ||||
-rw-r--r-- | sw/source/uibase/dialog/swwrtshitem.cxx | 5 | ||||
-rw-r--r-- | sw/source/uibase/docvw/FrameControlsManager.cxx | 13 | ||||
-rw-r--r-- | sw/source/uibase/envelp/envimg.cxx | 18 | ||||
-rw-r--r-- | sw/source/uibase/envelp/labimg.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/inc/FrameControlsManager.hxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/inc/caption.hxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/inc/cfgitems.hxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/inc/envimg.hxx | 1 | ||||
-rw-r--r-- | sw/source/uibase/inc/labimg.hxx | 1 | ||||
-rw-r--r-- | sw/source/uibase/inc/swwrtshitem.hxx | 1 | ||||
-rw-r--r-- | sw/source/uibase/inc/uiitems.hxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/utlui/uiitems.cxx | 18 |
15 files changed, 3 insertions, 201 deletions
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index adb438cab7c7..1ec7292ceba4 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -490,24 +490,9 @@ SwDocStyleSheet::SwDocStyleSheet( SwDoc& rDocument, nHelpId = UCHAR_MAX; } -SwDocStyleSheet::SwDocStyleSheet( const SwDocStyleSheet& rOrg) : - SfxStyleSheetBase(rOrg), - pCharFormat(rOrg.pCharFormat), - pColl(rOrg.pColl), - pFrameFormat(rOrg.pFrameFormat), - pDesc(rOrg.pDesc), - pNumRule(rOrg.pNumRule), - pTableFormat(rOrg.pTableFormat), - pBoxFormat(rOrg.pBoxFormat), - rDoc(rOrg.rDoc), - aCoreSet(rOrg.aCoreSet), - bPhysical(rOrg.bPhysical) -{ -} +SwDocStyleSheet::SwDocStyleSheet( const SwDocStyleSheet& ) = default; - SwDocStyleSheet::~SwDocStyleSheet() -{ -} +SwDocStyleSheet::~SwDocStyleSheet() = default; void SwDocStyleSheet::Reset() { diff --git a/sw/source/uibase/config/caption.cxx b/sw/source/uibase/config/caption.cxx index 9f38f73d89a1..97244660f550 100644 --- a/sw/source/uibase/config/caption.cxx +++ b/sw/source/uibase/config/caption.cxx @@ -36,32 +36,6 @@ InsCaptionOpt::InsCaptionOpt(const SwCapObjType eType, const SvGlobalName* pOleI aOleId = *pOleId; } -InsCaptionOpt::InsCaptionOpt(const InsCaptionOpt& rOpt) -{ - *this = rOpt; -} - -InsCaptionOpt::~InsCaptionOpt() -{ -} - -InsCaptionOpt& InsCaptionOpt::operator=( const InsCaptionOpt& rOpt ) -{ - bUseCaption = rOpt.bUseCaption; - eObjType = rOpt.eObjType; - aOleId = rOpt.aOleId; - sCategory = rOpt.sCategory; - nNumType = rOpt.nNumType; - sNumberSeparator = rOpt.sNumberSeparator; - sCaption = rOpt.sCaption; - nPos = rOpt.nPos; - nLevel = rOpt.nLevel; - sSeparator = rOpt.sSeparator; - bIgnoreSeqOpts = rOpt.bIgnoreSeqOpts; - sCharacterStyle = rOpt.sCharacterStyle; - bCopyAttributes = rOpt.bCopyAttributes; - - return *this; -} +InsCaptionOpt::~InsCaptionOpt() = default; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/config/cfgitems.cxx b/sw/source/uibase/config/cfgitems.cxx index 07b569fc6307..f029eda606c0 100644 --- a/sw/source/uibase/config/cfgitems.cxx +++ b/sw/source/uibase/config/cfgitems.cxx @@ -46,12 +46,6 @@ SwDocDisplayItem::SwDocDisplayItem() : }; // Item for the Settings dialog, page document view -SwDocDisplayItem::SwDocDisplayItem( const SwDocDisplayItem& rDocDisplayItem ): - SfxPoolItem(rDocDisplayItem) -{ - *this = rDocDisplayItem; -}; - SwDocDisplayItem::SwDocDisplayItem(const SwViewOption& rVOpt ) : SfxPoolItem( FN_PARAM_DOCDISP ) { @@ -88,20 +82,6 @@ bool SwDocDisplayItem::operator==( const SfxPoolItem& rAttr ) const bShowHiddenPara == rItem.bShowHiddenPara ); } -SwDocDisplayItem& SwDocDisplayItem::operator=( const SwDocDisplayItem& rDocDisplayItem) -{ - bParagraphEnd = rDocDisplayItem.bParagraphEnd ; - bTab = rDocDisplayItem.bTab ; - bSpace = rDocDisplayItem.bSpace ; - bNonbreakingSpace = rDocDisplayItem.bNonbreakingSpace ; - bSoftHyphen = rDocDisplayItem.bSoftHyphen ; - bCharHiddenText = rDocDisplayItem.bCharHiddenText ; - bFieldHiddenText = rDocDisplayItem.bFieldHiddenText ; - bManualBreak = rDocDisplayItem.bManualBreak ; - bShowHiddenPara = rDocDisplayItem.bShowHiddenPara ; - return *this; -} - void SwDocDisplayItem::FillViewOptions( SwViewOption& rVOpt) const { rVOpt.SetParagraph (bParagraphEnd ); @@ -129,12 +109,6 @@ SwElemItem::SwElemItem() : bNotes = false; } -SwElemItem::SwElemItem( const SwElemItem& rElemItem ): - SfxPoolItem(rElemItem) -{ - *this = rElemItem; -} - SwElemItem::SwElemItem(const SwViewOption& rVOpt) : SfxPoolItem( FN_PARAM_ELEM ) { @@ -172,20 +146,6 @@ bool SwElemItem::operator==( const SfxPoolItem& rAttr ) const bNotes == rItem.bNotes ); } -SwElemItem& SwElemItem::operator=( const SwElemItem& rElemItem) -{ - bVertRuler = rElemItem. bVertRuler ; - bVertRulerRight = rElemItem. bVertRulerRight ; - bCrosshair = rElemItem. bCrosshair ; - bSmoothScroll = rElemItem. bSmoothScroll ; - bTable = rElemItem.bTable ; - bGraphic = rElemItem.bGraphic ; - bDrawing = rElemItem.bDrawing ; - bFieldName = rElemItem.bFieldName ; - bNotes = rElemItem.bNotes ; - return *this; -} - void SwElemItem::FillViewOptions( SwViewOption& rVOpt) const { rVOpt.SetViewVRuler(bVertRuler ); @@ -200,13 +160,6 @@ void SwElemItem::FillViewOptions( SwViewOption& rVOpt) const rVOpt.SetPostIts (bNotes ); } -// CopyCTOR -SwAddPrinterItem::SwAddPrinterItem( const SwAddPrinterItem& rAddPrinterItem ): - SfxPoolItem(rAddPrinterItem), - SwPrintData( rAddPrinterItem ) -{ -} - // CTOR for empty Item SwAddPrinterItem::SwAddPrinterItem(): SfxPoolItem(FN_PARAM_ADDPRINTER) @@ -242,14 +195,6 @@ SwShadowCursorItem::SwShadowCursorItem() { } -SwShadowCursorItem::SwShadowCursorItem( const SwShadowCursorItem& rCpy ) - : SfxPoolItem( rCpy.Which() ), - eMode( rCpy.GetMode() ) - ,bOn( rCpy.IsOn() ) - -{ -} - SwShadowCursorItem::SwShadowCursorItem( const SwViewOption& rVOpt ) : SfxPoolItem( FN_PARAM_SHADOWCURSOR ), eMode( rVOpt.GetShdwCursorFillMode() ) @@ -269,13 +214,6 @@ bool SwShadowCursorItem::operator==( const SfxPoolItem& rCmp ) const GetMode() == static_cast<const SwShadowCursorItem&>(rCmp).GetMode(); } -SwShadowCursorItem& SwShadowCursorItem::operator=( const SwShadowCursorItem& rCpy ) -{ - SetOn( rCpy.IsOn() ); - SetMode( rCpy.GetMode() ); - return *this; -} - void SwShadowCursorItem::FillViewOptions( SwViewOption& rVOpt ) const { rVOpt.SetShadowCursor( bOn ); @@ -283,21 +221,6 @@ void SwShadowCursorItem::FillViewOptions( SwViewOption& rVOpt ) const } #ifdef DBG_UTIL -SwTestItem::SwTestItem( const SwTestItem& rTestItem ): - SfxPoolItem(rTestItem) -{ - bTest1=rTestItem.bTest1; - bTest2=rTestItem.bTest2; - bTest3=rTestItem.bTest3; - bTest4=rTestItem.bTest4; - bTest5=rTestItem.bTest5; - bTest6=rTestItem.bTest6; - bTest7=rTestItem.bTest7; - bTest8=rTestItem.bTest8; - bTest9=rTestItem.bTest9; - bTest10=rTestItem.bTest10; -}; - SfxPoolItem* SwTestItem::Clone( SfxItemPool* ) const { return new SwTestItem( *this ); diff --git a/sw/source/uibase/dialog/swwrtshitem.cxx b/sw/source/uibase/dialog/swwrtshitem.cxx index 366c760efb55..4c6671e5bbb9 100644 --- a/sw/source/uibase/dialog/swwrtshitem.cxx +++ b/sw/source/uibase/dialog/swwrtshitem.cxx @@ -25,11 +25,6 @@ SwWrtShellItem::SwWrtShellItem( SwWrtShell* pSh ) { } -SwWrtShellItem::SwWrtShellItem( const SwWrtShellItem& rItem) : - SfxPoolItem( rItem.Which() ), - pWrtSh( rItem.pWrtSh ) -{ -} bool SwWrtShellItem::operator==( const SfxPoolItem& rItem) const { diff --git a/sw/source/uibase/docvw/FrameControlsManager.cxx b/sw/source/uibase/docvw/FrameControlsManager.cxx index bf42b2aeb518..56b99b8bc217 100644 --- a/sw/source/uibase/docvw/FrameControlsManager.cxx +++ b/sw/source/uibase/docvw/FrameControlsManager.cxx @@ -28,24 +28,11 @@ SwFrameControlsManager::~SwFrameControlsManager() { } -SwFrameControlsManager::SwFrameControlsManager( const SwFrameControlsManager& rCopy ) : - m_pEditWin( rCopy.m_pEditWin ), - m_aControls( rCopy.m_aControls ) -{ -} - void SwFrameControlsManager::dispose() { m_aControls.clear(); } -SwFrameControlsManager& SwFrameControlsManager::operator=( const SwFrameControlsManager& rCopy ) -{ - m_pEditWin = rCopy.m_pEditWin; - m_aControls = rCopy.m_aControls; - return *this; -} - SwFrameControlPtr SwFrameControlsManager::GetControl( FrameControlType eType, const SwFrame* pFrame ) { SwFrameControlPtrMap& rControls = m_aControls[eType]; diff --git a/sw/source/uibase/envelp/envimg.cxx b/sw/source/uibase/envelp/envimg.cxx index 804c4ef3d374..8e4b46113e32 100644 --- a/sw/source/uibase/envelp/envimg.cxx +++ b/sw/source/uibase/envelp/envimg.cxx @@ -110,24 +110,6 @@ SwEnvItem::SwEnvItem() : lAddrFromTop = std::min(lWidth, lHeight) / 2; } -SwEnvItem::SwEnvItem(const SwEnvItem& rItem) : - SfxPoolItem(FN_ENVELOP), - aAddrText (rItem.aAddrText), - bSend (rItem.bSend), - aSendText (rItem.aSendText), - lAddrFromLeft (rItem.lAddrFromLeft), - lAddrFromTop (rItem.lAddrFromTop), - lSendFromLeft (rItem.lSendFromLeft), - lSendFromTop (rItem.lSendFromTop), - lWidth (rItem.lWidth), - lHeight (rItem.lHeight), - eAlign (rItem.eAlign), - bPrintFromAbove(rItem.bPrintFromAbove), - lShiftRight (rItem.lShiftRight), - lShiftDown (rItem.lShiftDown) -{ -} - SwEnvItem& SwEnvItem::operator =(const SwEnvItem& rItem) { aAddrText = rItem.aAddrText; diff --git a/sw/source/uibase/envelp/labimg.cxx b/sw/source/uibase/envelp/labimg.cxx index e65ccb2465d0..ab0cad1880e6 100644 --- a/sw/source/uibase/envelp/labimg.cxx +++ b/sw/source/uibase/envelp/labimg.cxx @@ -55,12 +55,6 @@ SwLabItem::SwLabItem() : m_lPHeight = 5669; // 10 cm } -SwLabItem::SwLabItem(const SwLabItem& rItem) : - SfxPoolItem(FN_LABEL) -{ - *this = rItem; -} - SwLabItem& SwLabItem::operator =(const SwLabItem& rItem) { m_bAddr = rItem.m_bAddr; diff --git a/sw/source/uibase/inc/FrameControlsManager.hxx b/sw/source/uibase/inc/FrameControlsManager.hxx index af34bae99d10..df449922d755 100644 --- a/sw/source/uibase/inc/FrameControlsManager.hxx +++ b/sw/source/uibase/inc/FrameControlsManager.hxx @@ -38,9 +38,6 @@ class SwFrameControlsManager ~SwFrameControlsManager(); void dispose(); - SwFrameControlsManager( const SwFrameControlsManager& rCopy ); - SwFrameControlsManager& operator=( const SwFrameControlsManager& rCopy ); - SwFrameControlPtr GetControl( FrameControlType eType, const SwFrame* pFrame ); void RemoveControls( const SwFrame* pFrame ); void RemoveControlsByType( FrameControlType eType, const SwFrame* pFrame ); diff --git a/sw/source/uibase/inc/caption.hxx b/sw/source/uibase/inc/caption.hxx index e3bb8e8de208..fba8ac06b65e 100644 --- a/sw/source/uibase/inc/caption.hxx +++ b/sw/source/uibase/inc/caption.hxx @@ -44,7 +44,6 @@ private: public: InsCaptionOpt(const SwCapObjType eType = FRAME_CAP, const SvGlobalName* pOleId = nullptr); - InsCaptionOpt(const InsCaptionOpt&); ~InsCaptionOpt(); bool& UseCaption() { return bUseCaption; } @@ -84,8 +83,6 @@ public: bool& CopyAttributes() { return bCopyAttributes; } bool CopyAttributes() const { return bCopyAttributes; } - - InsCaptionOpt& operator= ( const InsCaptionOpt& rOpt ); }; #endif diff --git a/sw/source/uibase/inc/cfgitems.hxx b/sw/source/uibase/inc/cfgitems.hxx index c5716c7f13cd..908c2026cbb5 100644 --- a/sw/source/uibase/inc/cfgitems.hxx +++ b/sw/source/uibase/inc/cfgitems.hxx @@ -56,13 +56,10 @@ class SW_DLLPUBLIC SwDocDisplayItem : public SfxPoolItem public: SwDocDisplayItem(); - SwDocDisplayItem( - const SwDocDisplayItem& rSwDocDisplayItem ); SwDocDisplayItem( const SwViewOption& rVOpt ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; virtual bool operator==( const SfxPoolItem& ) const override; - SwDocDisplayItem& operator=( const SwDocDisplayItem& ); void FillViewOptions( SwViewOption& rVOpt) const; }; @@ -87,12 +84,10 @@ class SW_DLLPUBLIC SwElemItem : public SfxPoolItem public: SwElemItem(); - SwElemItem(const SwElemItem& rElemItem); SwElemItem(const SwViewOption& rVOpt); virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; virtual bool operator==( const SfxPoolItem& ) const override; - SwElemItem& operator=( const SwElemItem& ); void FillViewOptions( SwViewOption& rVOpt) const; @@ -109,7 +104,6 @@ class SW_DLLPUBLIC SwAddPrinterItem : public SfxPoolItem, public SwPrintData public: SwAddPrinterItem(); SwAddPrinterItem( const SwPrintData& rPrtData ); - SwAddPrinterItem( const SwAddPrinterItem& rAddPrinterItem); virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; @@ -125,7 +119,6 @@ class SW_DLLPUBLIC SwShadowCursorItem : public SfxPoolItem bool bOn; public: SwShadowCursorItem(); - SwShadowCursorItem( const SwShadowCursorItem& rElemItem ); SwShadowCursorItem( const SwViewOption& rVOpt ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; @@ -163,7 +156,6 @@ class SW_DLLPUBLIC SwTestItem : public SfxPoolItem public: SwTestItem() : SfxPoolItem(FN_PARAM_SWTEST) {}; - SwTestItem( const SwTestItem& pTestItem); virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; virtual bool operator==( const SfxPoolItem& ) const override; diff --git a/sw/source/uibase/inc/envimg.hxx b/sw/source/uibase/inc/envimg.hxx index 1cf77dbe791c..7806119adb45 100644 --- a/sw/source/uibase/inc/envimg.hxx +++ b/sw/source/uibase/inc/envimg.hxx @@ -54,7 +54,6 @@ public: sal_Int32 lShiftDown; // shift down (twips) SwEnvItem(); - SwEnvItem(const SwEnvItem& rItem); static SfxPoolItem* CreateDefault(); SwEnvItem& operator =(const SwEnvItem& rItem); diff --git a/sw/source/uibase/inc/labimg.hxx b/sw/source/uibase/inc/labimg.hxx index 0763b99e1f21..fc21242ec5e6 100644 --- a/sw/source/uibase/inc/labimg.hxx +++ b/sw/source/uibase/inc/labimg.hxx @@ -32,7 +32,6 @@ class SW_DLLPUBLIC SwLabItem : public SfxPoolItem public: SwLabItem(); - SwLabItem(const SwLabItem& rItem); SwLabItem& operator =(const SwLabItem& rItem); diff --git a/sw/source/uibase/inc/swwrtshitem.hxx b/sw/source/uibase/inc/swwrtshitem.hxx index 282d0d47e3b1..0cc7b32deebc 100644 --- a/sw/source/uibase/inc/swwrtshitem.hxx +++ b/sw/source/uibase/inc/swwrtshitem.hxx @@ -29,7 +29,6 @@ class SW_DLLPUBLIC SwWrtShellItem: public SfxPoolItem public: SwWrtShellItem( SwWrtShell* pWrtSh ); - SwWrtShellItem( const SwWrtShellItem& ); virtual bool operator==( const SfxPoolItem& ) const override; virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; diff --git a/sw/source/uibase/inc/uiitems.hxx b/sw/source/uibase/inc/uiitems.hxx index 173bbe1c3cab..ea8138caaeae 100644 --- a/sw/source/uibase/inc/uiitems.hxx +++ b/sw/source/uibase/inc/uiitems.hxx @@ -37,7 +37,6 @@ class SW_DLLPUBLIC SwPageFootnoteInfoItem : public SfxPoolItem public: SwPageFootnoteInfoItem(SwPageFootnoteInfo const & rInfo); - SwPageFootnoteInfoItem(const SwPageFootnoteInfoItem& rItem ); virtual ~SwPageFootnoteInfoItem() override; virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; @@ -61,7 +60,6 @@ class SW_DLLPUBLIC SwPtrItem : public SfxPoolItem public: SwPtrItem( const sal_uInt16 nId, void* pPtr = nullptr); - SwPtrItem( const SwPtrItem& rItem ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; virtual bool operator==( const SfxPoolItem& ) const override; @@ -94,7 +92,6 @@ class SW_DLLPUBLIC SwPaMItem : public SfxPoolItem public: SwPaMItem( const sal_uInt16 nId, SwPaM* pPaM = nullptr); - SwPaMItem( const SwPaMItem& rItem ); virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; virtual bool operator==( const SfxPoolItem& ) const override; diff --git a/sw/source/uibase/utlui/uiitems.cxx b/sw/source/uibase/utlui/uiitems.cxx index 751b6bc4964e..c94fb328ca48 100644 --- a/sw/source/uibase/utlui/uiitems.cxx +++ b/sw/source/uibase/utlui/uiitems.cxx @@ -37,12 +37,6 @@ SwPageFootnoteInfoItem::SwPageFootnoteInfoItem( SwPageFootnoteInfo const & rInfo { } -SwPageFootnoteInfoItem::SwPageFootnoteInfoItem( const SwPageFootnoteInfoItem& rItem ) : - SfxPoolItem( rItem ), - aFootnoteInfo(rItem.GetPageFootnoteInfo()) -{ -} - SwPageFootnoteInfoItem::~SwPageFootnoteInfoItem() { } @@ -197,13 +191,6 @@ SwPtrItem::SwPtrItem( const sal_uInt16 nId, void* pPtr ) : { } -// Copy constructor - -SwPtrItem::SwPtrItem( const SwPtrItem& rItem ) : SfxPoolItem( rItem ) -{ - pMisc = rItem.pMisc; -} - // Cloning SfxPoolItem* SwPtrItem::Clone( SfxItemPool * /*pPool*/ ) const @@ -274,11 +261,6 @@ SwPaMItem::SwPaMItem( const sal_uInt16 nId, SwPaM* pPaM ) : { } -SwPaMItem::SwPaMItem( const SwPaMItem& rItem ) : SfxPoolItem( rItem ) -{ - m_pPaM = rItem.m_pPaM; -} - SfxPoolItem* SwPaMItem::Clone( SfxItemPool * /*pPool*/ ) const { return new SwPaMItem( *this ); |