summaryrefslogtreecommitdiffstats
path: root/include/editeng
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-07-27 09:43:17 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-07-27 13:31:56 +0200
commitc21612e5e18d632fd2073e4f3c717613051133ed (patch)
treed0e6562ae9f401ebc28440d3f6b4b370a58d2c84 /include/editeng
parenttdf#111306: Hide background widget in sidebar in master and notes view (diff)
downloadcore-c21612e5e18d632fd2073e4f3c717613051133ed.tar.gz
core-c21612e5e18d632fd2073e4f3c717613051133ed.zip
editeng: 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: Icf0d0a904252ca014a0272cd2ff21c77438eba9d Reviewed-on: https://gerrit.libreoffice.org/58166 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include/editeng')
-rw-r--r--include/editeng/flditem.hxx5
-rw-r--r--include/editeng/measfld.hxx5
-rw-r--r--include/editeng/tstpitem.hxx8
-rw-r--r--include/editeng/unoedsrc.hxx6
4 files changed, 16 insertions, 8 deletions
diff --git a/include/editeng/flditem.hxx b/include/editeng/flditem.hxx
index 9ed775c01c1c..47dbe869be9b 100644
--- a/include/editeng/flditem.hxx
+++ b/include/editeng/flditem.hxx
@@ -52,6 +52,11 @@ public:
SvxFieldData();
virtual ~SvxFieldData();
+ SvxFieldData(SvxFieldData const &) = default;
+ SvxFieldData(SvxFieldData &&) = default;
+ SvxFieldData & operator =(SvxFieldData const &) = default;
+ SvxFieldData & operator =(SvxFieldData &&) = default;
+
virtual std::unique_ptr<SvxFieldData> Clone() const;
virtual bool operator==( const SvxFieldData& ) const;
diff --git a/include/editeng/measfld.hxx b/include/editeng/measfld.hxx
index 2422ed9a8462..a860dc2d91f0 100644
--- a/include/editeng/measfld.hxx
+++ b/include/editeng/measfld.hxx
@@ -38,6 +38,11 @@ public:
virtual std::unique_ptr<SvxFieldData> Clone() const override;
virtual bool operator==(const SvxFieldData&) const override;
SdrMeasureFieldKind GetMeasureFieldKind() const { return eMeasureFieldKind; }
+
+ SdrMeasureField(SdrMeasureField const &) = default;
+ SdrMeasureField(SdrMeasureField &&) = default;
+ SdrMeasureField & operator =(SdrMeasureField const &) = default;
+ SdrMeasureField & operator =(SdrMeasureField &&) = default;
};
diff --git a/include/editeng/tstpitem.hxx b/include/editeng/tstpitem.hxx
index 35032596883e..1e8c061ecf03 100644
--- a/include/editeng/tstpitem.hxx
+++ b/include/editeng/tstpitem.hxx
@@ -77,14 +77,6 @@ public:
bool operator <( const SvxTabStop& rTS ) const
{ return nTabPos < rTS.nTabPos; }
- SvxTabStop& operator=( const SvxTabStop& rTS )
- {
- nTabPos = rTS.nTabPos;
- eAdjustment = rTS.eAdjustment;
- m_cDecimal = rTS.m_cDecimal;
- cFill = rTS.cFill;
- return *this;
- }
void dumpAsXml(struct _xmlTextWriter* pWriter) const;
};
diff --git a/include/editeng/unoedsrc.hxx b/include/editeng/unoedsrc.hxx
index c4077bccc758..3c7952bad1cc 100644
--- a/include/editeng/unoedsrc.hxx
+++ b/include/editeng/unoedsrc.hxx
@@ -56,6 +56,12 @@ typedef std::vector< SvxUnoTextRangeBase* > SvxUnoTextRangeBaseVec;
class EDITENG_DLLPUBLIC SvxEditSource
{
public:
+ SvxEditSource() = default;
+ SvxEditSource(SvxEditSource const &) = default;
+ SvxEditSource(SvxEditSource &&) = default;
+ SvxEditSource & operator =(SvxEditSource const &) = default;
+ SvxEditSource & operator =(SvxEditSource &&) = default;
+
virtual ~SvxEditSource();
/// Returns a new reference to the same object. This is a shallow copy