From ec32cb36e63fe3dd1599b2984ade83b811700939 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 26 Jul 2018 12:17:51 +0200 Subject: filter: 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: I20a2c713f0fea62659d44298c1d98dc9b7f2d5aa Reviewed-on: https://gerrit.libreoffice.org/58076 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- include/filter/msfilter/mstoolbar.hxx | 11 +++++++++++ include/filter/msfilter/svdfppt.hxx | 4 ---- include/filter/msfilter/util.hxx | 1 - 3 files changed, 11 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/filter/msfilter/mstoolbar.hxx b/include/filter/msfilter/mstoolbar.hxx index 5a7da86b37b5..4b7181be5eca 100644 --- a/include/filter/msfilter/mstoolbar.hxx +++ b/include/filter/msfilter/mstoolbar.hxx @@ -85,6 +85,11 @@ public: TBBase() : nOffSet( 0 ) {} virtual ~TBBase(){} + TBBase(TBBase const &) = default; + TBBase(TBBase &&) = default; + TBBase & operator =(TBBase const &) = default; + TBBase & operator =(TBBase &&) = default; + virtual bool Read(SvStream &rS) = 0; #ifdef DEBUG_FILTER_MSTOOLBAR virtual void Print( FILE* ) {} // #FIXME remove this an implement the debug routines in all the classes below to enable some sort of readable output @@ -255,6 +260,12 @@ class MSFILTER_DLLPUBLIC TBCHeader : public TBBase public: TBCHeader(); virtual ~TBCHeader() override; + + TBCHeader(TBCHeader const &) = default; + TBCHeader(TBCHeader &&) = default; + TBCHeader & operator =(TBCHeader const &) = default; + TBCHeader & operator =(TBCHeader &&) = default; + sal_uInt8 getTct() const { return tct; } sal_uInt16 getTcID() const { return tcid; } bool isVisible() { return !( bFlagsTCR & 0x1 ); } diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx index e3be8307a185..044ad88b43d2 100644 --- a/include/filter/msfilter/svdfppt.hxx +++ b/include/filter/msfilter/svdfppt.hxx @@ -528,7 +528,6 @@ struct MSFILTER_DLLPUBLIC HeaderFooterEntry ); explicit HeaderFooterEntry( const PptSlidePersistEntry* pMaster = nullptr ); - ~HeaderFooterEntry(); }; struct ProcessData @@ -668,7 +667,6 @@ struct PPTTextSpecInfo sal_uInt16 nDontKnow; explicit PPTTextSpecInfo( sal_uInt32 nCharIdx ); - ~PPTTextSpecInfo(); }; struct PPTTextSpecInfoAtomInterpreter @@ -754,7 +752,6 @@ struct PPTCharSheet PPTCharLevel maCharLevel[nMaxPPTLevels]; explicit PPTCharSheet( TSS_Type nInstance ); - PPTCharSheet( const PPTCharSheet& rCharSheet ); void Read( SvStream& rIn, sal_uInt32 nLevel ); }; @@ -787,7 +784,6 @@ public: PPTParaLevel maParaLevel[nMaxPPTLevels]; explicit PPTParaSheet( TSS_Type nInstance ); - PPTParaSheet( const PPTParaSheet& rParaSheet ); void Read( SdrPowerPointImport const & rMan, diff --git a/include/filter/msfilter/util.hxx b/include/filter/msfilter/util.hxx index 6718dffc9299..c4197c8b2d1e 100644 --- a/include/filter/msfilter/util.hxx +++ b/include/filter/msfilter/util.hxx @@ -94,7 +94,6 @@ private: sal_Int32 nSavPtr; public: WW8ReadFieldParams( const OUString& rData ); - ~WW8ReadFieldParams(); bool GoToTokenParam(); sal_Int32 SkipToNextToken(); -- cgit