sw/inc/SwRewriter.hxx | 1 - sw/inc/ccoll.hxx | 4 ++++ sw/inc/cellfml.hxx | 5 +++++ sw/inc/docary.hxx | 6 ++++++ sw/inc/fldbas.hxx | 5 +++++ sw/inc/fmtline.hxx | 5 +++++ sw/inc/frmfmt.hxx | 5 +++++ sw/inc/postithelper.hxx | 5 +++++ sw/inc/printdata.hxx | 5 +++++ sw/source/core/access/accfrmobj.hxx | 5 +++++ sw/source/core/inc/docsort.hxx | 6 ++++++ sw/source/core/text/porlay.hxx | 2 -- sw/source/core/undo/SwRewriter.cxx | 4 ---- sw/source/filter/ww8/ww8par.hxx | 5 +++++ sw/source/uibase/config/caption.cxx | 2 -- sw/source/uibase/inc/caption.hxx | 1 - sw/source/uibase/inc/uiitems.hxx | 5 +++++ 17 files changed, 61 insertions(+), 10 deletions(-)
New commits: commit 0920b06d3d8a148ff547ca2b373edc62cc280357 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Fri Jul 27 09:55:44 2018 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Fri Jul 27 13:53:57 2018 +0200 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 <sberg...@redhat.com> diff --git a/sw/inc/SwRewriter.hxx b/sw/inc/SwRewriter.hxx index 4fc2658a801f..0adc40e87780 100644 --- a/sw/inc/SwRewriter.hxx +++ b/sw/inc/SwRewriter.hxx @@ -39,7 +39,6 @@ class SW_DLLPUBLIC SwRewriter public: SwRewriter(); - ~SwRewriter(); void AddRule(SwUndoArg eWhat, const OUString & rWith); diff --git a/sw/inc/ccoll.hxx b/sw/inc/ccoll.hxx index 4ffbd9e77af9..3b6ef8b7d11b 100644 --- a/sw/inc/ccoll.hxx +++ b/sw/inc/ccoll.hxx @@ -46,6 +46,10 @@ public: SwCondCollItem(); virtual ~SwCondCollItem() override; + SwCondCollItem(SwCondCollItem const &) = default; + SwCondCollItem(SwCondCollItem &&) = default; + SwCondCollItem & operator =(SwCondCollItem const &) = default; + SwCondCollItem & operator =(SwCondCollItem &&) = default; virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; virtual bool operator==( const SfxPoolItem& ) const override; diff --git a/sw/inc/cellfml.hxx b/sw/inc/cellfml.hxx index 1828c1b1be4f..2d6a64b4d3ec 100644 --- a/sw/inc/cellfml.hxx +++ b/sw/inc/cellfml.hxx @@ -110,6 +110,11 @@ public: virtual ~SwTableFormula(); + SwTableFormula(SwTableFormula const &) = default; + SwTableFormula(SwTableFormula &&) = default; + SwTableFormula & operator =(SwTableFormula const &) = default; + SwTableFormula & operator =(SwTableFormula &&) = default; + /// create from the internal formula (for CORE) the external formula (for UI) void PtrToBoxNm( const SwTable* pTable ); /// create from the external formula the internal diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx index 5c92a68d1c31..20871385fa97 100644 --- a/sw/inc/docary.hxx +++ b/sw/inc/docary.hxx @@ -53,6 +53,12 @@ public: virtual size_t GetFormatCount() const = 0; virtual SwFormat* GetFormat(size_t idx) const = 0; virtual ~SwFormatsBase() {}; + + SwFormatsBase() = default; + SwFormatsBase(SwFormatsBase const &) = default; + SwFormatsBase(SwFormatsBase &&) = default; + SwFormatsBase & operator =(SwFormatsBase const &) = default; + SwFormatsBase & operator =(SwFormatsBase &&) = default; }; template<typename Value> diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx index 0093ce66b337..8765362f6754 100644 --- a/sw/inc/fldbas.hxx +++ b/sw/inc/fldbas.hxx @@ -298,6 +298,11 @@ protected: public: virtual ~SwField(); + SwField(SwField const &) = default; + SwField(SwField &&) = default; + SwField & operator =(SwField const &) = default; + SwField & operator =(SwField &&) = default; + inline SwFieldType* GetTyp() const; /// Set new type (used for copying among documents). diff --git a/sw/inc/fmtline.hxx b/sw/inc/fmtline.hxx index 8bba534cd392..405176cf0e53 100644 --- a/sw/inc/fmtline.hxx +++ b/sw/inc/fmtline.hxx @@ -35,6 +35,11 @@ public: SwFormatLineNumber(); virtual ~SwFormatLineNumber() override; + SwFormatLineNumber(SwFormatLineNumber const &) = default; + SwFormatLineNumber(SwFormatLineNumber &&) = default; + SwFormatLineNumber & operator =(SwFormatLineNumber const &) = default; + SwFormatLineNumber & operator =(SwFormatLineNumber &&) = default; + static SfxPoolItem* CreateDefault(); /// "Pure virtual methods" of SfxPoolItem. diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx index 6b117cf74616..3675aa9489df 100644 --- a/sw/inc/frmfmt.hxx +++ b/sw/inc/frmfmt.hxx @@ -104,6 +104,11 @@ protected: public: virtual ~SwFrameFormat() override; + SwFrameFormat(SwFrameFormat const &) = default; + SwFrameFormat(SwFrameFormat &&) = default; + SwFrameFormat & operator =(SwFrameFormat const &) = default; + SwFrameFormat & operator =(SwFrameFormat &&) = default; + /// Destroys all Frames in aDepend (Frames are identified via dynamic_cast). virtual void DelFrames(); diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx index d9a0f8aac3e3..7678f4bde1fd 100644 --- a/sw/inc/postithelper.hxx +++ b/sw/inc/postithelper.hxx @@ -108,6 +108,11 @@ public: { } + SwSidebarItem(SwSidebarItem const &) = default; + SwSidebarItem(SwSidebarItem &&) = default; + SwSidebarItem & operator =(SwSidebarItem const &) = default; + SwSidebarItem & operator =(SwSidebarItem &&) = default; + virtual SwPosition GetAnchorPosition() const = 0; virtual bool UseElement() = 0; virtual const SwFormatField& GetFormatField() const = 0; diff --git a/sw/inc/printdata.hxx b/sw/inc/printdata.hxx index a87232c6b95c..ef008593cc7e 100644 --- a/sw/inc/printdata.hxx +++ b/sw/inc/printdata.hxx @@ -99,6 +99,11 @@ public: virtual ~SwPrintData() {} + SwPrintData(SwPrintData const &) = default; + SwPrintData(SwPrintData &&) = default; + SwPrintData & operator =(SwPrintData const &) = default; + SwPrintData & operator =(SwPrintData &&) = default; + bool operator==(const SwPrintData& rData)const { return 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, _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits