diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-07-26 13:47:59 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-07-27 08:20:20 +0200 |
commit | f1a10d4f14e86a2a2a632ff4a091690c2f31f255 (patch) | |
tree | 739f86a047016f2ac99c9dca142d666253173c80 /sc/inc | |
parent | 7f0bdd5e88ed49eebe3c0c8edabecffdddeaff4f (diff) |
sc: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)
...by explicitly defaulting the copy/move functions (and, where needed in turn,
also a default ctor) for classes that have a user-declared dtor that does
nothing other than an implicitly-defined one would do, but needs to be user-
declared because it is virtual and potentially serves as a key function to
emit the vtable, or is non-public, etc.; and by removing explicitly user-
provided functions that do the same as their implicitly-defined counterparts,
but may prevent implicitly declared copy functions from being defined as non-
deleted in the future. (Even if such a user-provided function was declared
non-inline in an include file, the apparently-used implicitly-defined copy
functions are already include, so why bother with non-inline functions.)
Change-Id: I4efe3eb088e5f9096be87dd8240504768755112b
Reviewed-on: https://gerrit.libreoffice.org/58096
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/attrib.hxx | 15 | ||||
-rw-r--r-- | sc/inc/celltextattr.hxx | 1 | ||||
-rw-r--r-- | sc/inc/datamapper.hxx | 2 | ||||
-rw-r--r-- | sc/inc/defaultsoptions.hxx | 5 | ||||
-rw-r--r-- | sc/inc/docoptio.hxx | 5 | ||||
-rw-r--r-- | sc/inc/dpdimsave.hxx | 3 | ||||
-rw-r--r-- | sc/inc/dpnumgroupinfo.hxx | 1 | ||||
-rw-r--r-- | sc/inc/formulaopt.hxx | 5 | ||||
-rw-r--r-- | sc/inc/postit.hxx | 1 | ||||
-rw-r--r-- | sc/inc/printopt.hxx | 6 | ||||
-rw-r--r-- | sc/inc/queryparam.hxx | 5 | ||||
-rw-r--r-- | sc/inc/refhint.hxx | 15 | ||||
-rw-r--r-- | sc/inc/refupdatecontext.hxx | 1 | ||||
-rw-r--r-- | sc/inc/textuno.hxx | 15 | ||||
-rw-r--r-- | sc/inc/token.hxx | 15 | ||||
-rw-r--r-- | sc/inc/userdat.hxx | 5 | ||||
-rw-r--r-- | sc/inc/viewopti.hxx | 6 |
17 files changed, 95 insertions, 11 deletions
diff --git a/sc/inc/attrib.hxx b/sc/inc/attrib.hxx index fadbad0639ac..b881a54a96d5 100644 --- a/sc/inc/attrib.hxx +++ b/sc/inc/attrib.hxx @@ -87,6 +87,11 @@ public: ScMergeFlagAttr(ScMF nFlags); virtual ~ScMergeFlagAttr() override; + ScMergeFlagAttr(ScMergeFlagAttr const &) = default; + ScMergeFlagAttr(ScMergeFlagAttr &&) = default; + ScMergeFlagAttr & operator =(ScMergeFlagAttr const &) = default; + ScMergeFlagAttr & operator =(ScMergeFlagAttr &&) = default; + SfxPoolItem * Clone(SfxItemPool * pPool = nullptr) const override; ScMF GetValue() const { return static_cast<ScMF>(SfxInt16Item::GetValue()); } @@ -194,6 +199,11 @@ public: ScViewObjectModeItem( sal_uInt16 nWhich, ScVObjMode eMode ); virtual ~ScViewObjectModeItem() override; + ScViewObjectModeItem(ScViewObjectModeItem const &) = default; + ScViewObjectModeItem(ScViewObjectModeItem &&) = default; + ScViewObjectModeItem & operator =(ScViewObjectModeItem const &) = default; + ScViewObjectModeItem & operator =(ScViewObjectModeItem &&) = default; + virtual sal_uInt16 GetValueCount() const override; virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; virtual sal_uInt16 GetVersion( sal_uInt16 nFileVersion ) const override; @@ -234,6 +244,11 @@ public: virtual ~ScPageScaleToItem() override; + ScPageScaleToItem(ScPageScaleToItem const &) = default; + ScPageScaleToItem(ScPageScaleToItem &&) = default; + ScPageScaleToItem & operator =(ScPageScaleToItem const &) = default; + ScPageScaleToItem & operator =(ScPageScaleToItem &&) = default; + virtual ScPageScaleToItem* Clone( SfxItemPool* = nullptr ) const override; virtual bool operator==( const SfxPoolItem& rCmp ) const override; diff --git a/sc/inc/celltextattr.hxx b/sc/inc/celltextattr.hxx index d10274c06f60..0e9c34c4cf24 100644 --- a/sc/inc/celltextattr.hxx +++ b/sc/inc/celltextattr.hxx @@ -21,7 +21,6 @@ struct CellTextAttr SvtScriptType mnScriptType; CellTextAttr(); - CellTextAttr(const CellTextAttr& r); }; } diff --git a/sc/inc/datamapper.hxx b/sc/inc/datamapper.hxx index 9c59a7461b82..1ea5e4111c6a 100644 --- a/sc/inc/datamapper.hxx +++ b/sc/inc/datamapper.hxx @@ -80,8 +80,6 @@ public: ExternalDataSource(const OUString& rURL, const OUString& rProvider, ScDocument* pDoc); - ~ExternalDataSource(); - void setUpdateFrequency(double nUpdateFrequency); void setID(const OUString& rID); diff --git a/sc/inc/defaultsoptions.hxx b/sc/inc/defaultsoptions.hxx index 81c5fe2babd4..76e187797f48 100644 --- a/sc/inc/defaultsoptions.hxx +++ b/sc/inc/defaultsoptions.hxx @@ -43,6 +43,11 @@ public: ScTpDefaultsItem( const ScDefaultsOptions& rOpt ); virtual ~ScTpDefaultsItem() override; + ScTpDefaultsItem(ScTpDefaultsItem const &) = default; + ScTpDefaultsItem(ScTpDefaultsItem &&) = default; + ScTpDefaultsItem & operator =(ScTpDefaultsItem const &) = default; + ScTpDefaultsItem & operator =(ScTpDefaultsItem &&) = default; + virtual bool operator==( const SfxPoolItem& ) const override; virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; diff --git a/sc/inc/docoptio.hxx b/sc/inc/docoptio.hxx index ad6079711853..32d8d328d523 100644 --- a/sc/inc/docoptio.hxx +++ b/sc/inc/docoptio.hxx @@ -140,6 +140,11 @@ public: const ScDocOptions& rOpt ); virtual ~ScTpCalcItem() override; + ScTpCalcItem(ScTpCalcItem const &) = default; + ScTpCalcItem(ScTpCalcItem &&) = default; + ScTpCalcItem & operator =(ScTpCalcItem const &) = default; + ScTpCalcItem & operator =(ScTpCalcItem &&) = default; + virtual bool operator==( const SfxPoolItem& ) const override; virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; diff --git a/sc/inc/dpdimsave.hxx b/sc/inc/dpdimsave.hxx index d982daa9c687..c49f2d33f969 100644 --- a/sc/inc/dpdimsave.hxx +++ b/sc/inc/dpdimsave.hxx @@ -90,7 +90,6 @@ class SC_DLLPUBLIC ScDPSaveGroupDimension public: ScDPSaveGroupDimension( const OUString& rSource, const OUString& rName ); ScDPSaveGroupDimension( const OUString& rSource, const OUString& rName, const ScDPNumGroupInfo& rDateInfo, sal_Int32 nPart ); - ~ScDPSaveGroupDimension(); void AddToData( ScDPGroupTableData& rData ) const; void AddToCache(ScDPCache& rCache) const; @@ -135,7 +134,6 @@ class SC_DLLPUBLIC ScDPSaveNumGroupDimension public: ScDPSaveNumGroupDimension( const OUString& rName, const ScDPNumGroupInfo& rInfo ); ScDPSaveNumGroupDimension( const OUString& rName, const ScDPNumGroupInfo& rDateInfo, sal_Int32 nPart ); - ~ScDPSaveNumGroupDimension(); void AddToData( ScDPGroupTableData& rData ) const; void AddToCache(ScDPCache& rCache) const; @@ -158,7 +156,6 @@ class SC_DLLPUBLIC ScDPDimensionSaveData { public: ScDPDimensionSaveData(); - ~ScDPDimensionSaveData(); bool operator==( const ScDPDimensionSaveData& r ) const; diff --git a/sc/inc/dpnumgroupinfo.hxx b/sc/inc/dpnumgroupinfo.hxx index 48906f151ffe..4a867a99efb1 100644 --- a/sc/inc/dpnumgroupinfo.hxx +++ b/sc/inc/dpnumgroupinfo.hxx @@ -25,7 +25,6 @@ struct ScDPNumGroupInfo double mfStep; SC_DLLPUBLIC ScDPNumGroupInfo(); - SC_DLLPUBLIC ScDPNumGroupInfo(const ScDPNumGroupInfo& r); #if DUMP_PIVOT_TABLE void Dump() const; diff --git a/sc/inc/formulaopt.hxx b/sc/inc/formulaopt.hxx index 14cd9432bef6..72aed45577c9 100644 --- a/sc/inc/formulaopt.hxx +++ b/sc/inc/formulaopt.hxx @@ -81,6 +81,11 @@ public: ScTpFormulaItem( const ScFormulaOptions& rOpt ); virtual ~ScTpFormulaItem() override; + ScTpFormulaItem(ScTpFormulaItem const &) = default; + ScTpFormulaItem(ScTpFormulaItem &&) = default; + ScTpFormulaItem & operator =(ScTpFormulaItem const &) = default; + ScTpFormulaItem & operator =(ScTpFormulaItem &&) = default; + virtual bool operator==( const SfxPoolItem& ) const override; virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; diff --git a/sc/inc/postit.hxx b/sc/inc/postit.hxx index de77e208b829..fcb4ea542354 100644 --- a/sc/inc/postit.hxx +++ b/sc/inc/postit.hxx @@ -48,7 +48,6 @@ struct SC_DLLPUBLIC ScNoteData bool mbShown; /// True = note is visible. explicit ScNoteData( bool bShown = false ); - ~ScNoteData(); }; /** diff --git a/sc/inc/printopt.hxx b/sc/inc/printopt.hxx index 23bf35796247..68c3056f86fe 100644 --- a/sc/inc/printopt.hxx +++ b/sc/inc/printopt.hxx @@ -33,7 +33,6 @@ private: public: ScPrintOptions(); - ~ScPrintOptions(); bool GetSkipEmpty() const { return bSkipEmpty; } void SetSkipEmpty( bool bVal ) { bSkipEmpty = bVal; } @@ -55,6 +54,11 @@ public: ScTpPrintItem( const ScPrintOptions& rOpt ); virtual ~ScTpPrintItem() override; + ScTpPrintItem(ScTpPrintItem const &) = default; + ScTpPrintItem(ScTpPrintItem &&) = default; + ScTpPrintItem & operator =(ScTpPrintItem const &) = default; + ScTpPrintItem & operator =(ScTpPrintItem &&) = default; + virtual bool operator==( const SfxPoolItem& ) const override; virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; diff --git a/sc/inc/queryparam.hxx b/sc/inc/queryparam.hxx index c1709015a951..79215637ef03 100644 --- a/sc/inc/queryparam.hxx +++ b/sc/inc/queryparam.hxx @@ -109,6 +109,11 @@ struct ScQueryParamTable ScQueryParamTable(); virtual ~ScQueryParamTable(); + + ScQueryParamTable(ScQueryParamTable const &) = default; + ScQueryParamTable(ScQueryParamTable &&) = default; + ScQueryParamTable & operator =(ScQueryParamTable const &) = default; + ScQueryParamTable & operator =(ScQueryParamTable &&) = default; }; // For use in SAL_DEBUG etc. Output format not guaranteed to be stable. diff --git a/sc/inc/refhint.hxx b/sc/inc/refhint.hxx index e558c8e7fe48..4bc7eb468110 100644 --- a/sc/inc/refhint.hxx +++ b/sc/inc/refhint.hxx @@ -39,6 +39,11 @@ public: RefHint() = delete; virtual ~RefHint() override = 0; + RefHint(RefHint const &) = default; + RefHint(RefHint &&) = default; + RefHint & operator =(RefHint const &) = default; + RefHint & operator =(RefHint &&) = default; + Type getType() const; }; @@ -77,6 +82,11 @@ public: RefColReorderHint( const sc::ColRowReorderMapType& rColMap, SCTAB nTab, SCROW nRow1, SCROW nRow2 ); virtual ~RefColReorderHint() override; + RefColReorderHint(RefColReorderHint const &) = default; + RefColReorderHint(RefColReorderHint &&) = default; + RefColReorderHint & operator =(RefColReorderHint const &) = default; + RefColReorderHint & operator =(RefColReorderHint &&) = default; + const sc::ColRowReorderMapType& getColMap() const; SCTAB getTab() const; @@ -95,6 +105,11 @@ public: RefRowReorderHint( const sc::ColRowReorderMapType& rRowMap, SCTAB nTab, SCCOL nCol1, SCCOL nCol2 ); virtual ~RefRowReorderHint() override; + RefRowReorderHint(RefRowReorderHint const &) = default; + RefRowReorderHint(RefRowReorderHint &&) = default; + RefRowReorderHint & operator =(RefRowReorderHint const &) = default; + RefRowReorderHint & operator =(RefRowReorderHint &&) = default; + const sc::ColRowReorderMapType& getRowMap() const; SCTAB getTab() const; diff --git a/sc/inc/refupdatecontext.hxx b/sc/inc/refupdatecontext.hxx index 167eb0bec2d3..417aa794a54e 100644 --- a/sc/inc/refupdatecontext.hxx +++ b/sc/inc/refupdatecontext.hxx @@ -104,7 +104,6 @@ struct RefUpdateResult bool mbNameModified; RefUpdateResult(); - RefUpdateResult(const RefUpdateResult& r); }; struct SC_DLLPUBLIC RefUpdateInsertTabContext diff --git a/sc/inc/textuno.hxx b/sc/inc/textuno.hxx index ec66fdcf17c0..6a1d1ee946f7 100644 --- a/sc/inc/textuno.hxx +++ b/sc/inc/textuno.hxx @@ -220,6 +220,11 @@ public: ScCellTextCursor(ScCellObj& rText); virtual ~ScCellTextCursor() throw() override; + ScCellTextCursor(ScCellTextCursor const &) = default; + ScCellTextCursor(ScCellTextCursor &&) = default; + ScCellTextCursor & operator =(ScCellTextCursor const &) = default; + ScCellTextCursor & operator =(ScCellTextCursor &&) = default; + ScCellObj& GetCellObj() const { return *mxTextObj; } // SvxUnoTextCursor methods reimplemented here: @@ -246,6 +251,11 @@ public: ScHeaderFooterTextCursor(rtl::Reference<ScHeaderFooterTextObj> const & rText); virtual ~ScHeaderFooterTextCursor() throw() override; + ScHeaderFooterTextCursor(ScHeaderFooterTextCursor const &) = default; + ScHeaderFooterTextCursor(ScHeaderFooterTextCursor &&) = default; + ScHeaderFooterTextCursor & operator =(ScHeaderFooterTextCursor const &) = default; + ScHeaderFooterTextCursor & operator =(ScHeaderFooterTextCursor &&) = default; + // SvxUnoTextCursor methods reimplemented here: virtual css::uno::Reference< css::text::XText > SAL_CALL getText() override; @@ -271,6 +281,11 @@ public: const SvxUnoTextBase& rText ); virtual ~ScDrawTextCursor() throw() override; + ScDrawTextCursor(ScDrawTextCursor const &) = default; + ScDrawTextCursor(ScDrawTextCursor &&) = default; + ScDrawTextCursor & operator =(ScDrawTextCursor const &) = default; + ScDrawTextCursor & operator =(ScDrawTextCursor &&) = default; + // SvxUnoTextCursor methods reimplemented here: virtual css::uno::Reference< css::text::XText > SAL_CALL getText() override; diff --git a/sc/inc/token.hxx b/sc/inc/token.hxx index 8e756a93a54f..2e747b2d82ad 100644 --- a/sc/inc/token.hxx +++ b/sc/inc/token.hxx @@ -147,6 +147,11 @@ public: ScExternalSingleRefToken() = delete; virtual ~ScExternalSingleRefToken() override; + ScExternalSingleRefToken(ScExternalSingleRefToken const &) = default; + ScExternalSingleRefToken(ScExternalSingleRefToken &&) = default; + ScExternalSingleRefToken & operator =(ScExternalSingleRefToken const &) = default; + ScExternalSingleRefToken & operator =(ScExternalSingleRefToken &&) = default; + virtual sal_uInt16 GetIndex() const override; virtual svl::SharedString GetString() const override; virtual const ScSingleRefData* GetSingleRef() const override; @@ -166,6 +171,11 @@ public: ScExternalDoubleRefToken( sal_uInt16 nFileId, const svl::SharedString& rTabName, const ScComplexRefData& r ); virtual ~ScExternalDoubleRefToken() override; + ScExternalDoubleRefToken(ScExternalDoubleRefToken const &) = default; + ScExternalDoubleRefToken(ScExternalDoubleRefToken &&) = default; + ScExternalDoubleRefToken & operator =(ScExternalDoubleRefToken const &) = default; + ScExternalDoubleRefToken & operator =(ScExternalDoubleRefToken &&) = default; + virtual sal_uInt16 GetIndex() const override; virtual svl::SharedString GetString() const override; virtual const ScSingleRefData* GetSingleRef() const override; @@ -188,6 +198,11 @@ public: ScExternalNameToken( sal_uInt16 nFileId, const svl::SharedString& rName ); virtual ~ScExternalNameToken() override; + ScExternalNameToken(ScExternalNameToken const &) = default; + ScExternalNameToken(ScExternalNameToken &&) = default; + ScExternalNameToken & operator =(ScExternalNameToken const &) = default; + ScExternalNameToken & operator =(ScExternalNameToken &&) = default; + virtual sal_uInt16 GetIndex() const override; virtual svl::SharedString GetString() const override; virtual bool operator==( const formula::FormulaToken& rToken ) const override; diff --git a/sc/inc/userdat.hxx b/sc/inc/userdat.hxx index a85c5b3d8946..7e32d3c32ab1 100644 --- a/sc/inc/userdat.hxx +++ b/sc/inc/userdat.hxx @@ -88,6 +88,11 @@ public: ScMacroInfo(); virtual ~ScMacroInfo() override; + ScMacroInfo(ScMacroInfo const &) = default; + ScMacroInfo(ScMacroInfo &&) = default; + ScMacroInfo & operator =(ScMacroInfo const &) = default; + ScMacroInfo & operator =(ScMacroInfo &&) = default; + virtual std::unique_ptr<SdrObjUserData> Clone( SdrObject* pObj ) const override; void SetMacro( const OUString& rMacro ) { maMacro = rMacro; } diff --git a/sc/inc/viewopti.hxx b/sc/inc/viewopti.hxx index cd73ada6640e..b7870ddb646a 100644 --- a/sc/inc/viewopti.hxx +++ b/sc/inc/viewopti.hxx @@ -68,7 +68,6 @@ public: ScGridOptions( const SvxOptionsGrid& rOpt ) : SvxOptionsGrid( rOpt ) {} void SetDefaults(); - ScGridOptions& operator= ( const ScGridOptions& rCpy ); bool operator== ( const ScGridOptions& rOpt ) const; bool operator!= ( const ScGridOptions& rOpt ) const { return !(operator==(rOpt)); } }; @@ -117,6 +116,11 @@ public: ScTpViewItem( const ScViewOptions& rOpt ); virtual ~ScTpViewItem() override; + ScTpViewItem(ScTpViewItem const &) = default; + ScTpViewItem(ScTpViewItem &&) = default; + ScTpViewItem & operator =(ScTpViewItem const &) = default; + ScTpViewItem & operator =(ScTpViewItem &&) = default; + virtual bool operator==( const SfxPoolItem& ) const override; virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; |