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

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: 's avatarStephan Bergmann <sbergman@redhat.com>
üst c57f10b6
......@@ -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;
......
......@@ -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;
};
......
......@@ -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;
};
......
......@@ -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
......
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