diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-15 10:14:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-15 15:50:08 +0200 |
commit | db50f2f094648c9e8fa08eb7e0723003c6ac06e5 (patch) | |
tree | b89a57a521df3a91e436ac6b2dffed92717ebcb6 | |
parent | 10fff25227db4d2161dcc3e498654f6bc499a5b2 (diff) |
clang-tidy bugprone-copy-constructor-init
message is "calling a base constructor other than the copy constructor"
these constructors are not in use, so just remove them
Change-Id: Ic8cede1eb153a6ae97fd1ca9c96ca8c1f43e3399
Reviewed-on: https://gerrit.libreoffice.org/61784
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | basic/source/sbx/sbxarray.cxx | 14 | ||||
-rw-r--r-- | include/basic/sbx.hxx | 4 | ||||
-rw-r--r-- | sc/inc/chartlis.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/tool/chartlis.cxx | 28 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 38 | ||||
-rw-r--r-- | sc/source/ui/inc/docsh.hxx | 2 | ||||
-rw-r--r-- | sd/source/filter/eppt/pptx-text.cxx | 8 | ||||
-rw-r--r-- | sd/source/filter/eppt/text.hxx | 2 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLPropertySet.cxx | 5 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLPropertySet.hxx | 2 |
10 files changed, 6 insertions, 99 deletions
diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx index 628c7dc918af..1e6f663824b0 100644 --- a/basic/source/sbx/sbxarray.cxx +++ b/basic/source/sbx/sbxarray.cxx @@ -44,14 +44,6 @@ SbxArray::SbxArray( SbxDataType t ) : SbxBase() SetFlag( SbxFlagBits::Fixed ); } -SbxArray::SbxArray( const SbxArray& rArray ) : - SvRefBase( rArray ), SbxBase() -{ - if( rArray.eType != SbxVARIANT ) - SetFlag( SbxFlagBits::Fixed ); - *this = rArray; -} - SbxArray& SbxArray::operator=( const SbxArray& rArray ) { if( &rArray != this ) @@ -465,12 +457,6 @@ SbxDimArray::SbxDimArray( SbxDataType t ) : SbxArray( t ), mbHasFixedSize( false { } -SbxDimArray::SbxDimArray( const SbxDimArray& rArray ) - : SvRefBase( rArray ), SbxArray( rArray.eType ) -{ - *this = rArray; -} - SbxDimArray& SbxDimArray::operator=( const SbxDimArray& rArray ) { if( &rArray != this ) diff --git a/include/basic/sbx.hxx b/include/basic/sbx.hxx index 26cfa3b4d05d..73f233e6b6b7 100644 --- a/include/basic/sbx.hxx +++ b/include/basic/sbx.hxx @@ -122,7 +122,7 @@ protected: public: SBX_DECL_PERSIST_NODATA(SBXID_ARRAY,1); SbxArray( SbxDataType=SbxVARIANT ); - SbxArray( const SbxArray& ); + SbxArray( const SbxArray& ) = delete; SbxArray& operator=( const SbxArray& ); virtual void Clear() override; sal_uInt16 Count() const; @@ -167,7 +167,7 @@ protected: public: SBX_DECL_PERSIST_NODATA(SBXID_DIMARRAY,1); SbxDimArray( SbxDataType=SbxVARIANT ); - SbxDimArray( const SbxDimArray& ); + SbxDimArray( const SbxDimArray& ) = delete; SbxDimArray& operator=( const SbxDimArray& ); virtual void Clear() override; using SbxArray::GetRef; diff --git a/sc/inc/chartlis.hxx b/sc/inc/chartlis.hxx index 4541e5c05ba3..846259d678fa 100644 --- a/sc/inc/chartlis.hxx +++ b/sc/inc/chartlis.hxx @@ -77,7 +77,7 @@ public: const ScRangeListRef& rRangeListRef ); ScChartListener( const OUString& rName, ScDocument* pDoc, std::unique_ptr<::std::vector<ScTokenRef>> pTokens ); - ScChartListener( const ScChartListener& ); + ScChartListener( const ScChartListener& ) = delete; virtual ~ScChartListener() override; const OUString& GetName() const { return maName;} diff --git a/sc/source/core/tool/chartlis.cxx b/sc/source/core/tool/chartlis.cxx index b55c6a57a089..781859a7c4ae 100644 --- a/sc/source/core/tool/chartlis.cxx +++ b/sc/source/core/tool/chartlis.cxx @@ -113,34 +113,6 @@ ScChartListener::ScChartListener( const OUString& rName, ScDocument* pDocP, std: { } -ScChartListener::ScChartListener( const ScChartListener& r ) : - SvtListener(), - mpTokens(new vector<ScTokenRef>(*r.mpTokens)), - maName(r.maName), - mpDoc( r.mpDoc ), - bUsed( false ), - bDirty( r.bDirty ) -{ - if ( r.pUnoData ) - pUnoData.reset( new ScChartUnoData( *r.pUnoData ) ); - - if (r.mpExtRefListener.get()) - { - // Re-register this new listener for the files that the old listener - // was listening to. - - ScExternalRefManager* pRefMgr = mpDoc->GetExternalRefManager(); - const std::unordered_set<sal_uInt16>& rFileIds = r.mpExtRefListener->getAllFileIds(); - mpExtRefListener.reset(new ExternalRefListener(*this, mpDoc)); - std::unordered_set<sal_uInt16>::const_iterator itr = rFileIds.begin(), itrEnd = rFileIds.end(); - for (; itr != itrEnd; ++itr) - { - pRefMgr->addLinkListener(*itr, mpExtRefListener.get()); - mpExtRefListener->addFileId(*itr); - } - } -} - ScChartListener::~ScChartListener() { if ( HasBroadcaster() ) diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index d06c28843502..39eb8c840e5f 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -2791,44 +2791,6 @@ ScDocument* ScDocShell::GetClipDoc() return nullptr; } -ScDocShell::ScDocShell( const ScDocShell& rShell ) : - SvRefBase(rShell), - SotObject(), - SfxObjectShell( rShell.GetCreateMode() ), - SfxListener(), - m_aDocument ( SCDOCMODE_DOCUMENT, this ), - m_aDdeTextFmt(OUString("TEXT")), - m_nPrtToScreenFactor( 1.0 ), - m_pImpl ( new DocShell_Impl ), - m_bHeaderOn ( true ), - m_bFooterOn ( true ), - m_bIsEmpty ( true ), - m_bIsInUndo ( false ), - m_bDocumentModifiedPending( false ), - m_bUpdateEnabled ( true ), - m_bUcalcTest(rShell.m_bUcalcTest), - m_nDocumentLock ( 0 ), - m_nCanUpdate (css::document::UpdateDocMode::ACCORDING_TO_CONFIG) -{ - SetPool( &SC_MOD()->GetPool() ); - - m_bIsInplace = rShell.m_bIsInplace; - - m_pDocFunc = CreateDocFunc(); - - // SetBaseModel needs exception handling - ScModelObj::CreateAndSet( this ); - - StartListening(*this); - SfxStyleSheetPool* pStlPool = m_aDocument.GetStyleSheetPool(); - if (pStlPool) - StartListening(*pStlPool); - - GetPageOnFromPageStyleSet( nullptr, 0, m_bHeaderOn, m_bFooterOn ); - - // InitItems and CalcOutputFactor are called now in Load/ConvertFrom/InitNew -} - ScDocShell::ScDocShell( const SfxModelFlags i_nSfxCreationFlags ) : SfxObjectShell( i_nSfxCreationFlags ), m_aDocument ( SCDOCMODE_DOCUMENT, this ), diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index c31eacb566b9..032585f8d7c7 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -176,7 +176,7 @@ private: static void InitInterface_Impl(); public: - explicit ScDocShell( const ScDocShell& rDocShell ); + explicit ScDocShell( const ScDocShell& rDocShell ) = delete; explicit ScDocShell( const SfxModelFlags i_nSfxCreationFlags = SfxModelFlags::EMBEDDED_OBJECT ); virtual ~ScDocShell() override; diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx index 71d05d0910cd..c6c538437ee8 100644 --- a/sd/source/filter/eppt/pptx-text.cxx +++ b/sd/source/filter/eppt/pptx-text.cxx @@ -737,14 +737,6 @@ ParagraphObj::ParagraphObj(css::uno::Reference< css::text::XTextContent > const } } -ParagraphObj::ParagraphObj( const ParagraphObj& rObj ) -: PropStateValue() -, SOParagraph() -, mvPortions() -{ - ImplConstruct( rObj ); -} - ParagraphObj::~ParagraphObj() { ImplClear(); diff --git a/sd/source/filter/eppt/text.hxx b/sd/source/filter/eppt/text.hxx index 0928e9b72dba..7de5741c87ec 100644 --- a/sd/source/filter/eppt/text.hxx +++ b/sd/source/filter/eppt/text.hxx @@ -214,7 +214,7 @@ class ParagraphObj : public PropStateValue, public SOParagraph ParagraphObj( css::uno::Reference< css::text::XTextContent > const & rXTextContentRef, ParaFlags, FontCollection& rFontCollection, PPTExBulletProvider& rBuProv ); - ParagraphObj( const ParagraphObj& rParargraphObj ); + ParagraphObj( const ParagraphObj& rParargraphObj ) = delete; ParagraphObj( const css::uno::Reference< css::beans::XPropertySet > & rXPropSetRef, PPTExBulletProvider* pBuProv ); diff --git a/writerfilter/source/ooxml/OOXMLPropertySet.cxx b/writerfilter/source/ooxml/OOXMLPropertySet.cxx index bf9f966ecd24..c4ca1de9f6d1 100644 --- a/writerfilter/source/ooxml/OOXMLPropertySet.cxx +++ b/writerfilter/source/ooxml/OOXMLPropertySet.cxx @@ -38,11 +38,6 @@ OOXMLProperty::OOXMLProperty(Id id, const OOXMLValue::Pointer_t& pValue, { } -OOXMLProperty::OOXMLProperty(const OOXMLProperty & rSprm) -: SvRefBase(rSprm), mId(rSprm.mId), mpValue(rSprm.mpValue), meType(rSprm.meType) -{ -} - OOXMLProperty::~OOXMLProperty() { } diff --git a/writerfilter/source/ooxml/OOXMLPropertySet.hxx b/writerfilter/source/ooxml/OOXMLPropertySet.hxx index 3628ab6696c6..39480c78d004 100644 --- a/writerfilter/source/ooxml/OOXMLPropertySet.hxx +++ b/writerfilter/source/ooxml/OOXMLPropertySet.hxx @@ -64,7 +64,7 @@ private: public: OOXMLProperty(Id id, const OOXMLValue::Pointer_t& pValue, Type_t eType); - OOXMLProperty(const OOXMLProperty & rSprm); + OOXMLProperty(const OOXMLProperty & rSprm) = delete; virtual ~OOXMLProperty() override; sal_uInt32 getId() const override; |