From dea2c65032eafb0398ffd10bcd3485499be17eb4 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 27 Jul 2018 10:26:52 +0200 Subject: -Werror=deprecated-copy (GCC trunk towards GCC 9) ...in SfxPoolItem-derived classes that have a user-provided copy assignment op (to override the explicitly deleted one of SfxPoolItem, cf. 727878a7d8ae25342db75173cc314fa330ccc077 "Remove unused copy assignment ops of SfxPoolItem-derived classes"), so GCC 9 would warn about the implicitly-defined copy ctor. Mark all those with "SfxPoolItem copy function dichotomy" comments so they can be found again should the odd design of SfxPoolItem ever be changed. Change-Id: If206716747c42205ae4822a3f54c9de037c75286 Reviewed-on: https://gerrit.libreoffice.org/58172 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- sw/inc/fmtftntx.hxx | 2 ++ sw/inc/fmtornt.hxx | 2 ++ sw/inc/paratr.hxx | 1 + sw/source/uibase/inc/envimg.hxx | 1 + sw/source/uibase/inc/labimg.hxx | 1 + 5 files changed, 7 insertions(+) (limited to 'sw') diff --git a/sw/inc/fmtftntx.hxx b/sw/inc/fmtftntx.hxx index 52279dbca158..2cc217f0ae12 100644 --- a/sw/inc/fmtftntx.hxx +++ b/sw/inc/fmtftntx.hxx @@ -63,6 +63,8 @@ public: bool IsAtEnd() const { return FTNEND_ATPGORDOCEND != GetValue(); } SwFormatFootnoteEndAtTextEnd & operator=( const SwFormatFootnoteEndAtTextEnd & rAttr ); + SwFormatFootnoteEndAtTextEnd(SwFormatFootnoteEndAtTextEnd const &) = default; + // SfxPoolItem copy function dichotomy SvxNumType GetNumType() const { return aFormat.GetNumberingType(); } void SetNumType( SvxNumType eType ) { aFormat.SetNumberingType(eType); } diff --git a/sw/inc/fmtornt.hxx b/sw/inc/fmtornt.hxx index 5de9f2ff6949..817bdf871db7 100644 --- a/sw/inc/fmtornt.hxx +++ b/sw/inc/fmtornt.hxx @@ -39,6 +39,7 @@ public: SwFormatVertOrient( SwTwips nY = 0, sal_Int16 eVert = css::text::VertOrientation::NONE, sal_Int16 eRel = css::text::RelOrientation::PRINT_AREA ); inline SwFormatVertOrient &operator=( const SwFormatVertOrient &rCpy ); + SwFormatVertOrient(SwFormatVertOrient const &) = default; // SfxPoolItem copy function dichotomy /// "Pure virtual methods" of SfxPoolItem. virtual bool operator==( const SfxPoolItem& ) const override; @@ -75,6 +76,7 @@ public: SwFormatHoriOrient( SwTwips nX = 0, sal_Int16 eHori = css::text::HoriOrientation::NONE, sal_Int16 eRel = css::text::RelOrientation::PRINT_AREA, bool bPos = false ); inline SwFormatHoriOrient &operator=( const SwFormatHoriOrient &rCpy ); + SwFormatHoriOrient(SwFormatHoriOrient const &) = default; // SfxPoolItem copy function dichotomy /// "Pure virtual methods" of SfxPoolItem. virtual bool operator==( const SfxPoolItem& ) const override; diff --git a/sw/inc/paratr.hxx b/sw/inc/paratr.hxx index a42788b6c20f..cc173cb9173b 100644 --- a/sw/inc/paratr.hxx +++ b/sw/inc/paratr.hxx @@ -140,6 +140,7 @@ public: SwNumRuleItem& operator=( const SwNumRuleItem& rCpy ) { SetValue( rCpy.GetValue() ); return *this; } + SwNumRuleItem(SwNumRuleItem const &) = default; // SfxPoolItem copy function dichotomy /// "pure virtual methods" of SfxPoolItem virtual bool operator==( const SfxPoolItem& ) const override; diff --git a/sw/source/uibase/inc/envimg.hxx b/sw/source/uibase/inc/envimg.hxx index 7bb83499e47a..46974d37a4dd 100644 --- a/sw/source/uibase/inc/envimg.hxx +++ b/sw/source/uibase/inc/envimg.hxx @@ -57,6 +57,7 @@ public: static SfxPoolItem* CreateDefault(); SwEnvItem& operator =(const SwEnvItem& rItem); + SwEnvItem(SwEnvItem const &) = default; // SfxPoolItem copy function dichotomy virtual bool operator ==(const SfxPoolItem& rItem) const override; diff --git a/sw/source/uibase/inc/labimg.hxx b/sw/source/uibase/inc/labimg.hxx index fc21242ec5e6..e81a986e025f 100644 --- a/sw/source/uibase/inc/labimg.hxx +++ b/sw/source/uibase/inc/labimg.hxx @@ -34,6 +34,7 @@ public: SwLabItem(); SwLabItem& operator =(const SwLabItem& rItem); + SwLabItem(SwLabItem const &) = default; // SfxPoolItem copy function dichotomy virtual bool operator ==(const SfxPoolItem& rItem) const override; -- cgit