[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source

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


 writerfilter/inc/dmapper/resourcemodel.hxx     |    6 +++
 writerfilter/source/dmapper/PropertyMap.hxx    |    5 ++
 writerfilter/source/ooxml/OOXMLPropertySet.hxx |   45 +++++++++++++++++++++++++
 writerfilter/source/rtftok/rtfsprm.cxx         |    6 ---
 writerfilter/source/rtftok/rtfsprm.hxx         |    7 +++
 5 files changed, 62 insertions(+), 7 deletions(-)

New commits:
commit 2fb6ac75eb63368b1a0b52d82ae9adab9e012ab3
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Jul 26 12:20:50 2018 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Jul 26 20:43:47 2018 +0200

    writerfilter: 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: I08632dcf7ccac1ab7efa0d5e8f4985d74cd31eac
    Reviewed-on: https://gerrit.libreoffice.org/58077
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/writerfilter/inc/dmapper/resourcemodel.hxx b/writerfilter/inc/dmapper/resourcemodel.hxx
index b2caa3ad97fa..8e2ffc546682 100644
--- a/writerfilter/inc/dmapper/resourcemodel.hxx
+++ b/writerfilter/inc/dmapper/resourcemodel.hxx
@@ -99,6 +99,12 @@ public:
      */
     virtual void resolve(T & rHandler) = 0;
 
+    Reference() = default;
+    Reference(Reference const &) = default;
+    Reference(Reference &&) = default;
+    Reference & operator =(Reference const &) = default;
+    Reference & operator =(Reference &&) = default;
+
 protected:
     ~Reference() override {}
 };
diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx
index 91e182d3997f..f43bb38cad77 100644
--- a/writerfilter/source/dmapper/PropertyMap.hxx
+++ b/writerfilter/source/dmapper/PropertyMap.hxx
@@ -409,6 +409,11 @@ private:
 public:
     ParagraphProperties();
 
+    ParagraphProperties(ParagraphProperties const &) = default;
+    ParagraphProperties(ParagraphProperties &&) = default;
+    ParagraphProperties & operator =(ParagraphProperties const &) = default;
+    ParagraphProperties & operator =(ParagraphProperties &&) = default;
+
     // Does not compare the starting/ending range, m_sParaStyleName and m_nDropCapLength
     bool operator==( const ParagraphProperties& );
 
diff --git a/writerfilter/source/ooxml/OOXMLPropertySet.hxx b/writerfilter/source/ooxml/OOXMLPropertySet.hxx
index 2950d250b398..5d744015eb3f 100644
--- a/writerfilter/source/ooxml/OOXMLPropertySet.hxx
+++ b/writerfilter/source/ooxml/OOXMLPropertySet.hxx
@@ -35,6 +35,11 @@ public:
     OOXMLValue();
     virtual ~OOXMLValue() override;
 
+    OOXMLValue(OOXMLValue const &) = default;
+    OOXMLValue(OOXMLValue &&) = default;
+    OOXMLValue & operator =(OOXMLValue const &) = default;
+    OOXMLValue & operator =(OOXMLValue &&) = default;
+
     virtual int getInt() const override;
     ;
     virtual OUString getString() const override;
@@ -96,6 +101,11 @@ public:
 
     virtual ~OOXMLBooleanValue() override;
 
+    OOXMLBooleanValue(OOXMLBooleanValue const &) = default;
+    OOXMLBooleanValue(OOXMLBooleanValue &&) = default;
+    OOXMLBooleanValue & operator =(OOXMLBooleanValue const &) = default;
+    OOXMLBooleanValue & operator =(OOXMLBooleanValue &&) = default;
+
     virtual int getInt() const override;
     virtual css::uno::Any getAny() const override;
 #ifdef DEBUG_WRITERFILTER
@@ -111,6 +121,11 @@ public:
     explicit OOXMLStringValue(const OUString & rStr);
     virtual ~OOXMLStringValue() override;
 
+    OOXMLStringValue(OOXMLStringValue const &) = default;
+    OOXMLStringValue(OOXMLStringValue &&) = default;
+    OOXMLStringValue & operator =(OOXMLStringValue const &) = default;
+    OOXMLStringValue & operator =(OOXMLStringValue &&) = default;
+
     virtual css::uno::Any getAny() const override;
     virtual OUString getString() const override;
 #ifdef DEBUG_WRITERFILTER
@@ -146,6 +161,11 @@ public:
     OOXMLPropertySet();
     virtual ~OOXMLPropertySet() override;
 
+    OOXMLPropertySet(OOXMLPropertySet const &) = default;
+    OOXMLPropertySet(OOXMLPropertySet &&) = default;
+    OOXMLPropertySet & operator =(OOXMLPropertySet const &) = default;
+    OOXMLPropertySet & operator =(OOXMLPropertySet &&) = default;
+
     void resolve(Properties & rHandler) override;
     void add(Id id, const OOXMLValue::Pointer_t& pValue, OOXMLProperty::Type_t eType);
     void add(const OOXMLPropertySet::Pointer_t& pPropertySet);
@@ -170,6 +190,11 @@ public:
     OOXMLTable();
     virtual ~OOXMLTable() override;
 
+    OOXMLTable(OOXMLTable const &) = default;
+    OOXMLTable(OOXMLTable &&) = default;
+    OOXMLTable & operator =(OOXMLTable const &) = default;
+    OOXMLTable & operator =(OOXMLTable &&) = default;
+
     void resolve(Table & rTable) override;
     void add(const ValuePointer_t& pPropertySet);
     OOXMLTable * clone() const;
@@ -185,6 +210,11 @@ public:
     explicit OOXMLPropertySetValue(const OOXMLPropertySet::Pointer_t& pPropertySet);
     virtual ~OOXMLPropertySetValue() override;
 
+    OOXMLPropertySetValue(OOXMLPropertySetValue const &) = default;
+    OOXMLPropertySetValue(OOXMLPropertySetValue &&) = default;
+    OOXMLPropertySetValue & operator =(OOXMLPropertySetValue const &) = default;
+    OOXMLPropertySetValue & operator =(OOXMLPropertySetValue &&) = default;
+
     virtual writerfilter::Reference<Properties>::Pointer_t getProperties() override;
 #ifdef DEBUG_WRITERFILTER
     virtual std::string toString() const override;
@@ -200,6 +230,11 @@ public:
     static OOXMLValue::Pointer_t Create (sal_Int32 nValue);
     virtual ~OOXMLIntegerValue() override;
 
+    OOXMLIntegerValue(OOXMLIntegerValue const &) = default;
+    OOXMLIntegerValue(OOXMLIntegerValue &&) = default;
+    OOXMLIntegerValue & operator =(OOXMLIntegerValue const &) = default;
+    OOXMLIntegerValue & operator =(OOXMLIntegerValue &&) = default;
+
     virtual int getInt() const override;
     virtual css::uno::Any getAny() const override;
 #ifdef DEBUG_WRITERFILTER
@@ -217,6 +252,11 @@ public:
     explicit OOXMLHexValue(const char * pValue);
     virtual ~OOXMLHexValue() override;
 
+    OOXMLHexValue(OOXMLHexValue const &) = default;
+    OOXMLHexValue(OOXMLHexValue &&) = default;
+    OOXMLHexValue & operator =(OOXMLHexValue const &) = default;
+    OOXMLHexValue & operator =(OOXMLHexValue &&) = default;
+
     virtual int getInt() const override;
 #ifdef DEBUG_WRITERFILTER
     virtual std::string toString() const override;
@@ -238,6 +278,11 @@ public:
     OOXMLUniversalMeasureValue(const char * pValue, sal_uInt32 npPt);
     virtual ~OOXMLUniversalMeasureValue() override;
 
+    OOXMLUniversalMeasureValue(OOXMLUniversalMeasureValue const &) = default;
+    OOXMLUniversalMeasureValue(OOXMLUniversalMeasureValue &&) = default;
+    OOXMLUniversalMeasureValue & operator =(OOXMLUniversalMeasureValue const &) = default;
+    OOXMLUniversalMeasureValue & operator =(OOXMLUniversalMeasureValue &&) = default;
+
     virtual int getInt() const override;
 #ifdef DEBUG_WRITERFILTER
     virtual std::string toString() const override;
diff --git a/writerfilter/source/rtftok/rtfsprm.cxx b/writerfilter/source/rtftok/rtfsprm.cxx
index 45c6e351ed5f..c6cc55d1c655 100644
--- a/writerfilter/source/rtftok/rtfsprm.cxx
+++ b/writerfilter/source/rtftok/rtfsprm.cxx
@@ -372,12 +372,6 @@ RTFSprms::RTFSprms()
 
 RTFSprms::~RTFSprms() = default;
 
-RTFSprms::RTFSprms(const RTFSprms& rSprms)
-    : SvRefBase(rSprms)
-{
-    *this = rSprms;
-}
-
 void RTFSprms::clear()
 {
     if (m_pSprms->GetRefCount() == 1)
diff --git a/writerfilter/source/rtftok/rtfsprm.hxx b/writerfilter/source/rtftok/rtfsprm.hxx
index f5a294d601ea..f8bbed3a0f69 100644
--- a/writerfilter/source/rtftok/rtfsprm.hxx
+++ b/writerfilter/source/rtftok/rtfsprm.hxx
@@ -46,8 +46,13 @@ public:
     using Iterator_t = std::vector<Entry_t>::iterator;
     using ReverseIterator_t = std::vector<Entry_t>::reverse_iterator;
     RTFSprms();
-    RTFSprms(const RTFSprms& rSprms);
     ~RTFSprms() override;
+
+    RTFSprms(RTFSprms const&) = default;
+    RTFSprms(RTFSprms&&) = default;
+    RTFSprms& operator=(RTFSprms const&) = default;
+    RTFSprms& operator=(RTFSprms&&) = default;
+
     RTFValue::Pointer_t find(Id nKeyword, bool bFirst = true, bool bForWrite = false);
     /// Does the same as ->push_back(), except that it can overwrite or ignore existing entries.
     void set(Id nKeyword, RTFValue::Pointer_t pValue, RTFOverwrite eOverwrite = RTFOverwrite::YES);


More information about the Libreoffice-commits mailing list