summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-07-27 09:55:44 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-07-27 13:53:57 +0200
commit0920b06d3d8a148ff547ca2b373edc62cc280357 (patch)
tree5addd9a69f8a321eebb31c23dab353317d6f68ad /sw/source
parentd77d6983602cb468621b34e3561a85040f5a3018 (diff)
sw: 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: Ib4a48431398d40858d9e2ee1fd685b1f223a5423 Reviewed-on: https://gerrit.libreoffice.org/58168 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/access/accfrmobj.hxx5
-rw-r--r--sw/source/core/inc/docsort.hxx6
-rw-r--r--sw/source/core/text/porlay.hxx2
-rw-r--r--sw/source/core/undo/SwRewriter.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par.hxx5
-rw-r--r--sw/source/uibase/config/caption.cxx2
-rw-r--r--sw/source/uibase/inc/caption.hxx1
-rw-r--r--sw/source/uibase/inc/uiitems.hxx5
8 files changed, 21 insertions, 9 deletions
diff --git a/sw/source/core/access/accfrmobj.hxx b/sw/source/core/access/accfrmobj.hxx
index 5806f4abd179..bfe6240ce62a 100644
--- a/sw/source/core/access/accfrmobj.hxx
+++ b/sw/source/core/access/accfrmobj.hxx
@@ -42,6 +42,11 @@ class SwAccessibleChild
const SdrObject* pDrawObj,
vcl::Window* pWindow );
+ SwAccessibleChild(SwAccessibleChild const &) = default;
+ SwAccessibleChild(SwAccessibleChild &&) = default;
+ SwAccessibleChild & operator =(SwAccessibleChild const &) = default;
+ SwAccessibleChild & operator =(SwAccessibleChild &&) = default;
+
SwAccessibleChild& operator=( const SdrObject* pDrawObj );
SwAccessibleChild& operator=( const SwFrame* pFrame );
SwAccessibleChild& operator=( vcl::Window* pWindow );
diff --git a/sw/source/core/inc/docsort.hxx b/sw/source/core/inc/docsort.hxx
index fc10a3b987c4..fd224ae4d8b8 100644
--- a/sw/source/core/inc/docsort.hxx
+++ b/sw/source/core/inc/docsort.hxx
@@ -79,6 +79,12 @@ struct SwSortElement
static void Init( SwDoc*, const SwSortOptions& rOpt, FlatFndBox const * = nullptr );
static void Finit();
+ SwSortElement() = default;
+ SwSortElement(SwSortElement const &) = default;
+ SwSortElement(SwSortElement &&) = default;
+ SwSortElement & operator =(SwSortElement const &) = default;
+ SwSortElement & operator =(SwSortElement &&) = default;
+
virtual ~SwSortElement();
virtual OUString GetKey(sal_uInt16 nKey ) const = 0;
diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx
index bffa35c692e8..8d7f4fa40658 100644
--- a/sw/source/core/text/porlay.hxx
+++ b/sw/source/core/text/porlay.hxx
@@ -68,8 +68,6 @@ class SwRepaint : public SwRect
SwTwips nRightOfst;
public:
SwRepaint() : SwRect(), nOfst( 0 ), nRightOfst( 0 ) {}
- SwRepaint( const SwRepaint& rRep ) : SwRect( rRep ), nOfst( rRep.nOfst ),
- nRightOfst( rRep.nRightOfst ) {}
SwTwips GetOfst() const { return nOfst; }
void SetOfst( const SwTwips nNew ) { nOfst = nNew; }
diff --git a/sw/source/core/undo/SwRewriter.cxx b/sw/source/core/undo/SwRewriter.cxx
index e97437e7c1e0..28eaa6d144f5 100644
--- a/sw/source/core/undo/SwRewriter.cxx
+++ b/sw/source/core/undo/SwRewriter.cxx
@@ -31,10 +31,6 @@ SwRewriter::SwRewriter()
{
}
-SwRewriter::~SwRewriter()
-{
-}
-
void SwRewriter::AddRule(SwUndoArg eWhat, const OUString & rWith)
{
SwRewriteRule aRule(eWhat, rWith);
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 40864a93914f..ee5ed06d308d 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -505,6 +505,11 @@ public:
SwMacroInfo();
virtual ~SwMacroInfo() override;
+ SwMacroInfo(SwMacroInfo const &) = default;
+ SwMacroInfo(SwMacroInfo &&) = default;
+ SwMacroInfo & operator =(SwMacroInfo const &) = default;
+ SwMacroInfo & operator =(SwMacroInfo &&) = default;
+
virtual std::unique_ptr<SdrObjUserData> Clone( SdrObject* pObj ) const override;
void SetHlink( const OUString& rHlink ) { maHlink = rHlink; }
diff --git a/sw/source/uibase/config/caption.cxx b/sw/source/uibase/config/caption.cxx
index f13f9b8409d6..505f9c80fa7b 100644
--- a/sw/source/uibase/config/caption.cxx
+++ b/sw/source/uibase/config/caption.cxx
@@ -36,6 +36,4 @@ InsCaptionOpt::InsCaptionOpt(const SwCapObjType eType, const SvGlobalName* pOleI
m_aOleId = *pOleId;
}
-InsCaptionOpt::~InsCaptionOpt() = default;
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/inc/caption.hxx b/sw/source/uibase/inc/caption.hxx
index 33008631e1c9..d762091b153e 100644
--- a/sw/source/uibase/inc/caption.hxx
+++ b/sw/source/uibase/inc/caption.hxx
@@ -44,7 +44,6 @@ private:
public:
InsCaptionOpt(const SwCapObjType eType = FRAME_CAP, const SvGlobalName* pOleId = nullptr);
- ~InsCaptionOpt();
bool& UseCaption() { return m_bUseCaption; }
bool UseCaption() const { return m_bUseCaption; }
diff --git a/sw/source/uibase/inc/uiitems.hxx b/sw/source/uibase/inc/uiitems.hxx
index fadb8bdb0a95..66baa0e306d2 100644
--- a/sw/source/uibase/inc/uiitems.hxx
+++ b/sw/source/uibase/inc/uiitems.hxx
@@ -39,6 +39,11 @@ public:
SwPageFootnoteInfoItem(SwPageFootnoteInfo const & rInfo);
virtual ~SwPageFootnoteInfoItem() override;
+ SwPageFootnoteInfoItem(SwPageFootnoteInfoItem const &) = default;
+ SwPageFootnoteInfoItem(SwPageFootnoteInfoItem &&) = default;
+ SwPageFootnoteInfoItem & operator =(SwPageFootnoteInfoItem const &) = default;
+ SwPageFootnoteInfoItem & operator =(SwPageFootnoteInfoItem &&) = default;
+
virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
virtual bool GetPresentation( SfxItemPresentation ePres,