Kaydet (Commit) 2fb6ac75 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

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: 's avatarStephan Bergmann <sbergman@redhat.com>
üst ec32cb36
...@@ -99,6 +99,12 @@ public: ...@@ -99,6 +99,12 @@ public:
*/ */
virtual void resolve(T & rHandler) = 0; 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: protected:
~Reference() override {} ~Reference() override {}
}; };
......
...@@ -409,6 +409,11 @@ private: ...@@ -409,6 +409,11 @@ private:
public: public:
ParagraphProperties(); 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 // Does not compare the starting/ending range, m_sParaStyleName and m_nDropCapLength
bool operator==( const ParagraphProperties& ); bool operator==( const ParagraphProperties& );
......
...@@ -35,6 +35,11 @@ public: ...@@ -35,6 +35,11 @@ public:
OOXMLValue(); OOXMLValue();
virtual ~OOXMLValue() override; 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 int getInt() const override;
; ;
virtual OUString getString() const override; virtual OUString getString() const override;
...@@ -96,6 +101,11 @@ public: ...@@ -96,6 +101,11 @@ public:
virtual ~OOXMLBooleanValue() override; 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 int getInt() const override;
virtual css::uno::Any getAny() const override; virtual css::uno::Any getAny() const override;
#ifdef DEBUG_WRITERFILTER #ifdef DEBUG_WRITERFILTER
...@@ -111,6 +121,11 @@ public: ...@@ -111,6 +121,11 @@ public:
explicit OOXMLStringValue(const OUString & rStr); explicit OOXMLStringValue(const OUString & rStr);
virtual ~OOXMLStringValue() override; 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 css::uno::Any getAny() const override;
virtual OUString getString() const override; virtual OUString getString() const override;
#ifdef DEBUG_WRITERFILTER #ifdef DEBUG_WRITERFILTER
...@@ -146,6 +161,11 @@ public: ...@@ -146,6 +161,11 @@ public:
OOXMLPropertySet(); OOXMLPropertySet();
virtual ~OOXMLPropertySet() override; 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 resolve(Properties & rHandler) override;
void add(Id id, const OOXMLValue::Pointer_t& pValue, OOXMLProperty::Type_t eType); void add(Id id, const OOXMLValue::Pointer_t& pValue, OOXMLProperty::Type_t eType);
void add(const OOXMLPropertySet::Pointer_t& pPropertySet); void add(const OOXMLPropertySet::Pointer_t& pPropertySet);
...@@ -170,6 +190,11 @@ public: ...@@ -170,6 +190,11 @@ public:
OOXMLTable(); OOXMLTable();
virtual ~OOXMLTable() override; 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 resolve(Table & rTable) override;
void add(const ValuePointer_t& pPropertySet); void add(const ValuePointer_t& pPropertySet);
OOXMLTable * clone() const; OOXMLTable * clone() const;
...@@ -185,6 +210,11 @@ public: ...@@ -185,6 +210,11 @@ public:
explicit OOXMLPropertySetValue(const OOXMLPropertySet::Pointer_t& pPropertySet); explicit OOXMLPropertySetValue(const OOXMLPropertySet::Pointer_t& pPropertySet);
virtual ~OOXMLPropertySetValue() override; 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; virtual writerfilter::Reference<Properties>::Pointer_t getProperties() override;
#ifdef DEBUG_WRITERFILTER #ifdef DEBUG_WRITERFILTER
virtual std::string toString() const override; virtual std::string toString() const override;
...@@ -200,6 +230,11 @@ public: ...@@ -200,6 +230,11 @@ public:
static OOXMLValue::Pointer_t Create (sal_Int32 nValue); static OOXMLValue::Pointer_t Create (sal_Int32 nValue);
virtual ~OOXMLIntegerValue() override; 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 int getInt() const override;
virtual css::uno::Any getAny() const override; virtual css::uno::Any getAny() const override;
#ifdef DEBUG_WRITERFILTER #ifdef DEBUG_WRITERFILTER
...@@ -217,6 +252,11 @@ public: ...@@ -217,6 +252,11 @@ public:
explicit OOXMLHexValue(const char * pValue); explicit OOXMLHexValue(const char * pValue);
virtual ~OOXMLHexValue() override; virtual ~OOXMLHexValue() override;
OOXMLHexValue(OOXMLHexValue const &) = default;
OOXMLHexValue(OOXMLHexValue &&) = default;
OOXMLHexValue & operator =(OOXMLHexValue const &) = default;
OOXMLHexValue & operator =(OOXMLHexValue &&) = default;
virtual int getInt() const override; virtual int getInt() const override;
#ifdef DEBUG_WRITERFILTER #ifdef DEBUG_WRITERFILTER
virtual std::string toString() const override; virtual std::string toString() const override;
...@@ -238,6 +278,11 @@ public: ...@@ -238,6 +278,11 @@ public:
OOXMLUniversalMeasureValue(const char * pValue, sal_uInt32 npPt); OOXMLUniversalMeasureValue(const char * pValue, sal_uInt32 npPt);
virtual ~OOXMLUniversalMeasureValue() override; virtual ~OOXMLUniversalMeasureValue() override;
OOXMLUniversalMeasureValue(OOXMLUniversalMeasureValue const &) = default;
OOXMLUniversalMeasureValue(OOXMLUniversalMeasureValue &&) = default;
OOXMLUniversalMeasureValue & operator =(OOXMLUniversalMeasureValue const &) = default;
OOXMLUniversalMeasureValue & operator =(OOXMLUniversalMeasureValue &&) = default;
virtual int getInt() const override; virtual int getInt() const override;
#ifdef DEBUG_WRITERFILTER #ifdef DEBUG_WRITERFILTER
virtual std::string toString() const override; virtual std::string toString() const override;
......
...@@ -372,12 +372,6 @@ RTFSprms::RTFSprms() ...@@ -372,12 +372,6 @@ RTFSprms::RTFSprms()
RTFSprms::~RTFSprms() = default; RTFSprms::~RTFSprms() = default;
RTFSprms::RTFSprms(const RTFSprms& rSprms)
: SvRefBase(rSprms)
{
*this = rSprms;
}
void RTFSprms::clear() void RTFSprms::clear()
{ {
if (m_pSprms->GetRefCount() == 1) if (m_pSprms->GetRefCount() == 1)
......
...@@ -46,8 +46,13 @@ public: ...@@ -46,8 +46,13 @@ public:
using Iterator_t = std::vector<Entry_t>::iterator; using Iterator_t = std::vector<Entry_t>::iterator;
using ReverseIterator_t = std::vector<Entry_t>::reverse_iterator; using ReverseIterator_t = std::vector<Entry_t>::reverse_iterator;
RTFSprms(); RTFSprms();
RTFSprms(const RTFSprms& rSprms);
~RTFSprms() override; ~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); 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. /// 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); void set(Id nKeyword, RTFValue::Pointer_t pValue, RTFOverwrite eOverwrite = RTFOverwrite::YES);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment