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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Jul 26 18:43:52 UTC 2018


 filter/source/graphicfilter/icgm/bundles.cxx |    8 --------
 filter/source/graphicfilter/icgm/bundles.hxx |    6 +++++-
 filter/source/msfilter/svdfppt.cxx           |   19 -------------------
 filter/source/msfilter/util.cxx              |    7 -------
 filter/source/svg/svgexport.cxx              |    5 +++++
 include/filter/msfilter/mstoolbar.hxx        |   11 +++++++++++
 include/filter/msfilter/svdfppt.hxx          |    4 ----
 include/filter/msfilter/util.hxx             |    1 -
 8 files changed, 21 insertions(+), 40 deletions(-)

New commits:
commit ec32cb36e63fe3dd1599b2984ade83b811700939
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Jul 26 12:17:51 2018 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Jul 26 20:43:19 2018 +0200

    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 <sbergman at redhat.com>

diff --git a/filter/source/graphicfilter/icgm/bundles.cxx b/filter/source/graphicfilter/icgm/bundles.cxx
index e3ced2b7153d..c083229216fa 100644
--- a/filter/source/graphicfilter/icgm/bundles.cxx
+++ b/filter/source/graphicfilter/icgm/bundles.cxx
@@ -23,14 +23,6 @@
 #include <tools/stream.hxx>
 #include <memory>
 
-Bundle& Bundle::operator=( const Bundle& rSource )
-{
-    mnColor = rSource.mnColor;
-    mnBundleIndex = rSource.mnBundleIndex;
-    return *this;
-};
-
-
 void Bundle::SetColor( sal_uInt32 nColor )
 {
     mnColor = nColor;
diff --git a/filter/source/graphicfilter/icgm/bundles.hxx b/filter/source/graphicfilter/icgm/bundles.hxx
index 40178e373f71..ba0740afdb45 100644
--- a/filter/source/graphicfilter/icgm/bundles.hxx
+++ b/filter/source/graphicfilter/icgm/bundles.hxx
@@ -45,9 +45,13 @@ public:
         {};
 
     virtual Bundle*     Clone() { return new Bundle( *this ); };
-            Bundle&     operator=(const Bundle& rBundle );
 
     virtual            ~Bundle() {} ;
+
+    Bundle(Bundle const &) = default;
+    Bundle(Bundle &&) = default;
+    Bundle & operator =(Bundle const &) = default;
+    Bundle & operator =(Bundle &&) = default;
 };
 
 
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 02201e843ece..d31da869b523 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -3108,11 +3108,6 @@ HeaderFooterEntry::HeaderFooterEntry( const PptSlidePersistEntry* pMPE ) :
     }
 }
 
-HeaderFooterEntry::~HeaderFooterEntry()
-{
-}
-
-
 sal_uInt32 HeaderFooterEntry::IsToDisplay( sal_uInt32 nInstance )
 {
     sal_uInt32 nMask = 0;
@@ -3834,11 +3829,6 @@ PPTCharSheet::PPTCharSheet( TSS_Type nInstance )
     }
 }
 
-PPTCharSheet::PPTCharSheet( const PPTCharSheet& rAttr )
-{
-    *this = rAttr;
-}
-
 void PPTCharSheet::Read( SvStream& rIn, sal_uInt32 nLevel)
 {
     // character attributes
@@ -3931,11 +3921,6 @@ PPTParaSheet::PPTParaSheet( TSS_Type nInstance )
     }
 }
 
-PPTParaSheet::PPTParaSheet( const PPTParaSheet& rSheet )
-{
-    *this = rSheet;
-}
-
 void PPTParaSheet::Read( SdrPowerPointImport const &
 #ifdef DBG_UTIL
                     rManager
@@ -4760,10 +4745,6 @@ PPTTextSpecInfo::PPTTextSpecInfo( sal_uInt32 _nCharIdx ) :
     nLanguage[ 2 ] = LANGUAGE_SYSTEM;
 }
 
-PPTTextSpecInfo::~PPTTextSpecInfo()
-{
-}
-
 PPTTextSpecInfoAtomInterpreter::PPTTextSpecInfoAtomInterpreter() :
     bValid  ( false )
 {
diff --git a/filter/source/msfilter/util.cxx b/filter/source/msfilter/util.cxx
index fec841f2d34f..9335cc4d2b00 100644
--- a/filter/source/msfilter/util.cxx
+++ b/filter/source/msfilter/util.cxx
@@ -310,13 +310,6 @@ WW8ReadFieldParams::WW8ReadFieldParams( const OUString& _rData )
     nSavPtr   = nNext;
 }
 
-
-WW8ReadFieldParams::~WW8ReadFieldParams()
-{
-
-}
-
-
 OUString WW8ReadFieldParams::GetResult() const
 {
     if (nFnd<0 && nSavPtr>nFnd)
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 91a1d35c3bb4..f959563de94d 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -100,6 +100,11 @@ class TextField
 protected:
     SVGFilter::ObjectSet mMasterPageSet;
 public:
+    TextField() = default;
+    TextField(TextField const &) = default;
+    TextField(TextField &&) = default;
+    TextField & operator =(TextField const &) = default;
+    TextField & operator =(TextField &&) = default;
 
     virtual OUString getClassName() const
     {
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();


More information about the Libreoffice-commits mailing list