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

-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.
727878a7 "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: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 3280281b
...@@ -61,6 +61,7 @@ public: ...@@ -61,6 +61,7 @@ public:
SetValue(rColor.GetValue()); SetValue(rColor.GetValue());
return *this; return *this;
} }
SvxColorItem(SvxColorItem const &) = default; // SfxPoolItem copy function dichotomy
const Color& GetValue() const const Color& GetValue() const
{ {
......
...@@ -51,6 +51,7 @@ public: ...@@ -51,6 +51,7 @@ public:
SetValue(rCont.GetValue()); SetValue(rCont.GetValue());
return *this; return *this;
} }
SvxContourItem(SvxContourItem const &) = default; // SfxPoolItem copy function dichotomy
}; };
#endif #endif
......
...@@ -64,6 +64,7 @@ public: ...@@ -64,6 +64,7 @@ public:
SetValue( rCross.GetValue() ); SetValue( rCross.GetValue() );
return *this; return *this;
} }
SvxCrossedOutItem(SvxCrossedOutItem const &) = default; // SfxPoolItem copy function dichotomy
// enum cast // enum cast
FontStrikeout GetStrikeout() const FontStrikeout GetStrikeout() const
......
...@@ -72,6 +72,7 @@ public: ...@@ -72,6 +72,7 @@ public:
ePropUnit = rSize.ePropUnit; ePropUnit = rSize.ePropUnit;
return *this; return *this;
} }
SvxFontHeightItem(SvxFontHeightItem const &) = default; // SfxPoolItem copy function dichotomy
void SetHeight( sal_uInt32 nNewHeight, const sal_uInt16 nNewProp = 100, void SetHeight( sal_uInt32 nNewHeight, const sal_uInt16 nNewProp = 100,
MapUnit eUnit = MapUnit::MapRelative ); MapUnit eUnit = MapUnit::MapRelative );
......
...@@ -107,6 +107,7 @@ public: ...@@ -107,6 +107,7 @@ public:
} }
SvxFontItem& operator=(const SvxFontItem& rFont); SvxFontItem& operator=(const SvxFontItem& rFont);
SvxFontItem(SvxFontItem const &) = default; // SfxPoolItem copy function dichotomy
void dumpAsXml(struct _xmlTextWriter* pWriter) const override; void dumpAsXml(struct _xmlTextWriter* pWriter) const override;
}; };
......
...@@ -41,6 +41,7 @@ public: ...@@ -41,6 +41,7 @@ public:
inline SvxFormatBreakItem( const SvxBreak eBrk /*= SvxBreak::NONE*/, inline SvxFormatBreakItem( const SvxBreak eBrk /*= SvxBreak::NONE*/,
const sal_uInt16 nWhich ); const sal_uInt16 nWhich );
inline SvxFormatBreakItem& operator=( const SvxFormatBreakItem& rCpy ); inline SvxFormatBreakItem& operator=( const SvxFormatBreakItem& rCpy );
SvxFormatBreakItem(SvxFormatBreakItem const &) = default; // SfxPoolItem copy function dichotomy
// "pure virtual Methods" from SfxPoolItem // "pure virtual Methods" from SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override; virtual bool operator==( const SfxPoolItem& ) const override;
......
...@@ -56,6 +56,8 @@ public: ...@@ -56,6 +56,8 @@ public:
SetValue( rItem.GetValue() ); SetValue( rItem.GetValue() );
return *this; return *this;
} }
SvxFrameDirectionItem(SvxFrameDirectionItem const &) = default;
// SfxPoolItem copy function dichotomy
}; };
#endif // INCLUDED_EDITENG_FRMDIRITEM_HXX #endif // INCLUDED_EDITENG_FRMDIRITEM_HXX
......
...@@ -54,6 +54,7 @@ public: ...@@ -54,6 +54,7 @@ public:
SetValue( rHorJustify.GetValue() ); SetValue( rHorJustify.GetValue() );
return *this; return *this;
} }
SvxHorJustifyItem(SvxHorJustifyItem const &) = default; // SfxPoolItem copy function dichotomy
}; };
...@@ -86,6 +87,7 @@ public: ...@@ -86,6 +87,7 @@ public:
SetValue( rVerJustify.GetValue() ); SetValue( rVerJustify.GetValue() );
return *this; return *this;
} }
SvxVerJustifyItem(SvxVerJustifyItem const &) = default; // SfxPoolItem copy function dichotomy
}; };
......
...@@ -38,6 +38,7 @@ public: ...@@ -38,6 +38,7 @@ public:
inline SvxFormatKeepItem( const bool bKeep /*= false*/, inline SvxFormatKeepItem( const bool bKeep /*= false*/,
const sal_uInt16 _nWhich ); const sal_uInt16 _nWhich );
inline SvxFormatKeepItem& operator=( const SvxFormatKeepItem& rSplit ); inline SvxFormatKeepItem& operator=( const SvxFormatKeepItem& rSplit );
SvxFormatKeepItem(SvxFormatKeepItem const &) = default; // SfxPoolItem copy function dichotomy
// "pure virtual Methods" from SfxPoolItem // "pure virtual Methods" from SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
......
...@@ -62,6 +62,7 @@ public: ...@@ -62,6 +62,7 @@ public:
SetValue( rLang.GetValue() ); SetValue( rLang.GetValue() );
return *this; return *this;
} }
SvxLanguageItem(SvxLanguageItem const &) = default; // SfxPoolItem copy function dichotomy
LanguageType GetLanguage() const LanguageType GetLanguage() const
{ return GetValue(); } { return GetValue(); }
......
...@@ -69,6 +69,7 @@ public: ...@@ -69,6 +69,7 @@ public:
const long nTLeft /*= 0*/, const short nOfset /*= 0*/, const long nTLeft /*= 0*/, const short nOfset /*= 0*/,
const sal_uInt16 nId ); const sal_uInt16 nId );
inline SvxLRSpaceItem& operator=( const SvxLRSpaceItem &rCpy ); inline SvxLRSpaceItem& operator=( const SvxLRSpaceItem &rCpy );
SvxLRSpaceItem(SvxLRSpaceItem const &) = default; // SfxPoolItem copy function dichotomy
// "pure virtual Methods" from SfxPoolItem // "pure virtual Methods" from SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override; virtual bool operator==( const SfxPoolItem& ) const override;
......
...@@ -37,6 +37,7 @@ class EDITENG_DLLPUBLIC SvxOpaqueItem : public SfxBoolItem ...@@ -37,6 +37,7 @@ class EDITENG_DLLPUBLIC SvxOpaqueItem : public SfxBoolItem
public: public:
explicit SvxOpaqueItem( const sal_uInt16 nId , const bool bOpa = true ); explicit SvxOpaqueItem( const sal_uInt16 nId , const bool bOpa = true );
inline SvxOpaqueItem &operator=( const SvxOpaqueItem &rCpy ); inline SvxOpaqueItem &operator=( const SvxOpaqueItem &rCpy );
SvxOpaqueItem(SvxOpaqueItem const &) = default; // SfxPoolItem copy function dichotomy
// "pure virtual Methods" from SfxPoolItem // "pure virtual Methods" from SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override; virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
......
...@@ -63,6 +63,7 @@ public: ...@@ -63,6 +63,7 @@ public:
SetValue( rPost.GetValue() ); SetValue( rPost.GetValue() );
return *this; return *this;
} }
SvxPostureItem(SvxPostureItem const &) = default; // SfxPoolItem copy function dichotomy
// enum cast // enum cast
FontItalic GetPosture() const FontItalic GetPosture() const
......
...@@ -43,6 +43,7 @@ public: ...@@ -43,6 +43,7 @@ public:
explicit inline SvxProtectItem( const sal_uInt16 nId ); explicit inline SvxProtectItem( const sal_uInt16 nId );
inline SvxProtectItem &operator=( const SvxProtectItem &rCpy ); inline SvxProtectItem &operator=( const SvxProtectItem &rCpy );
SvxProtectItem(SvxProtectItem const &) = default; // SfxPoolItem copy function dichotomy
// "pure virtual Methods" from SfxPoolItem // "pure virtual Methods" from SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override; virtual bool operator==( const SfxPoolItem& ) const override;
......
...@@ -46,6 +46,7 @@ public: ...@@ -46,6 +46,7 @@ public:
const SvxShadowLocation eLoc = SvxShadowLocation::NONE ); const SvxShadowLocation eLoc = SvxShadowLocation::NONE );
inline SvxShadowItem& operator=( const SvxShadowItem& rFmtShadow ); inline SvxShadowItem& operator=( const SvxShadowItem& rFmtShadow );
SvxShadowItem(SvxShadowItem const &) = default; // SfxPoolItem copy function dichotomy
// "pure virtual Methods" from SfxPoolItem // "pure virtual Methods" from SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override; virtual bool operator==( const SfxPoolItem& ) const override;
......
...@@ -53,7 +53,7 @@ public: ...@@ -53,7 +53,7 @@ public:
SetValue(rShadow.GetValue()); SetValue(rShadow.GetValue());
return *this; return *this;
} }
SvxShadowedItem(SvxShadowedItem const &) = default; // SfxPoolItem copy function dichotomy
}; };
#endif #endif
......
...@@ -42,6 +42,7 @@ public: ...@@ -42,6 +42,7 @@ public:
SvxSizeItem( const sal_uInt16 nId, const Size& rSize); SvxSizeItem( const sal_uInt16 nId, const Size& rSize);
inline SvxSizeItem& operator=( const SvxSizeItem &rCpy ); inline SvxSizeItem& operator=( const SvxSizeItem &rCpy );
SvxSizeItem(SvxSizeItem const &) = default; // SfxPoolItem copy function dichotomy
// "pure virtual Methods" from SfxPoolItem // "pure virtual Methods" from SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override; virtual bool operator==( const SfxPoolItem& ) const override;
......
...@@ -117,6 +117,7 @@ public: ...@@ -117,6 +117,7 @@ public:
// Assignment operator, equality operator (caution: expensive!) // Assignment operator, equality operator (caution: expensive!)
SvxTabStopItem& operator=( const SvxTabStopItem& rTSI ); SvxTabStopItem& operator=( const SvxTabStopItem& rTSI );
SvxTabStopItem(SvxTabStopItem const &) = default; // SfxPoolItem copy function dichotomy
// this is already included in SfxPoolItem declaration // this is already included in SfxPoolItem declaration
//int operator!=( const SvxTabStopItem& rTSI ) const //int operator!=( const SvxTabStopItem& rTSI ) const
......
...@@ -65,6 +65,7 @@ public: ...@@ -65,6 +65,7 @@ public:
SetColor( rTextLine.GetColor() ); SetColor( rTextLine.GetColor() );
return *this; return *this;
} }
SvxTextLineItem(SvxTextLineItem const &) = default; // SfxPoolItem copy function dichotomy
// enum cast // enum cast
FontLineStyle GetLineStyle() const FontLineStyle GetLineStyle() const
......
...@@ -45,6 +45,7 @@ public: ...@@ -45,6 +45,7 @@ public:
SvxULSpaceItem( const sal_uInt16 nUp, const sal_uInt16 nLow, SvxULSpaceItem( const sal_uInt16 nUp, const sal_uInt16 nLow,
const sal_uInt16 nId ); const sal_uInt16 nId );
inline SvxULSpaceItem& operator=( const SvxULSpaceItem &rCpy ); inline SvxULSpaceItem& operator=( const SvxULSpaceItem &rCpy );
SvxULSpaceItem(SvxULSpaceItem const &) = default; // SfxPoolItem copy function dichotomy
// "pure virtual Methods" from SfxPoolItem // "pure virtual Methods" from SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override; virtual bool operator==( const SfxPoolItem& ) const override;
......
...@@ -63,6 +63,7 @@ public: ...@@ -63,6 +63,7 @@ public:
SetValue( rWeight.GetValue() ); SetValue( rWeight.GetValue() );
return *this; return *this;
} }
SvxWeightItem(SvxWeightItem const &) = default; // SfxPoolItem copy function dichotomy
// enum cast // enum cast
FontWeight GetWeight() const { return GetValue(); } FontWeight GetWeight() const { return GetValue(); }
......
...@@ -60,6 +60,7 @@ public: ...@@ -60,6 +60,7 @@ public:
SetValue( rOrientation.GetValue() ); SetValue( rOrientation.GetValue() );
return *this; return *this;
} }
SvxOrientationItem(SvxOrientationItem const &) = default; // SfxPoolItem copy function dichotomy
/** Returns sal_True, if the item represents STACKED state. */ /** Returns sal_True, if the item represents STACKED state. */
bool IsStacked() const; bool IsStacked() const;
...@@ -110,6 +111,7 @@ public: ...@@ -110,6 +111,7 @@ public:
nBottomMargin = rMargin.nBottomMargin; nBottomMargin = rMargin.nBottomMargin;
return *this; return *this;
} }
SvxMarginItem(SvxMarginItem const &) = default; // SfxPoolItem copy function dichotomy
}; };
#endif #endif
......
...@@ -63,6 +63,8 @@ public: ...@@ -63,6 +63,8 @@ public:
bool IsAtEnd() const { return FTNEND_ATPGORDOCEND != GetValue(); } bool IsAtEnd() const { return FTNEND_ATPGORDOCEND != GetValue(); }
SwFormatFootnoteEndAtTextEnd & operator=( const SwFormatFootnoteEndAtTextEnd & rAttr ); SwFormatFootnoteEndAtTextEnd & operator=( const SwFormatFootnoteEndAtTextEnd & rAttr );
SwFormatFootnoteEndAtTextEnd(SwFormatFootnoteEndAtTextEnd const &) = default;
// SfxPoolItem copy function dichotomy
SvxNumType GetNumType() const { return aFormat.GetNumberingType(); } SvxNumType GetNumType() const { return aFormat.GetNumberingType(); }
void SetNumType( SvxNumType eType ) { aFormat.SetNumberingType(eType); } void SetNumType( SvxNumType eType ) { aFormat.SetNumberingType(eType); }
......
...@@ -39,6 +39,7 @@ public: ...@@ -39,6 +39,7 @@ public:
SwFormatVertOrient( SwTwips nY = 0, sal_Int16 eVert = css::text::VertOrientation::NONE, SwFormatVertOrient( SwTwips nY = 0, sal_Int16 eVert = css::text::VertOrientation::NONE,
sal_Int16 eRel = css::text::RelOrientation::PRINT_AREA ); sal_Int16 eRel = css::text::RelOrientation::PRINT_AREA );
inline SwFormatVertOrient &operator=( const SwFormatVertOrient &rCpy ); inline SwFormatVertOrient &operator=( const SwFormatVertOrient &rCpy );
SwFormatVertOrient(SwFormatVertOrient const &) = default; // SfxPoolItem copy function dichotomy
/// "Pure virtual methods" of SfxPoolItem. /// "Pure virtual methods" of SfxPoolItem.
virtual bool operator==( const SfxPoolItem& ) const override; virtual bool operator==( const SfxPoolItem& ) const override;
...@@ -75,6 +76,7 @@ public: ...@@ -75,6 +76,7 @@ public:
SwFormatHoriOrient( SwTwips nX = 0, sal_Int16 eHori = css::text::HoriOrientation::NONE, SwFormatHoriOrient( SwTwips nX = 0, sal_Int16 eHori = css::text::HoriOrientation::NONE,
sal_Int16 eRel = css::text::RelOrientation::PRINT_AREA, bool bPos = false ); sal_Int16 eRel = css::text::RelOrientation::PRINT_AREA, bool bPos = false );
inline SwFormatHoriOrient &operator=( const SwFormatHoriOrient &rCpy ); inline SwFormatHoriOrient &operator=( const SwFormatHoriOrient &rCpy );
SwFormatHoriOrient(SwFormatHoriOrient const &) = default; // SfxPoolItem copy function dichotomy
/// "Pure virtual methods" of SfxPoolItem. /// "Pure virtual methods" of SfxPoolItem.
virtual bool operator==( const SfxPoolItem& ) const override; virtual bool operator==( const SfxPoolItem& ) const override;
......
...@@ -140,6 +140,7 @@ public: ...@@ -140,6 +140,7 @@ public:
SwNumRuleItem& operator=( const SwNumRuleItem& rCpy ) SwNumRuleItem& operator=( const SwNumRuleItem& rCpy )
{ SetValue( rCpy.GetValue() ); return *this; } { SetValue( rCpy.GetValue() ); return *this; }
SwNumRuleItem(SwNumRuleItem const &) = default; // SfxPoolItem copy function dichotomy
/// "pure virtual methods" of SfxPoolItem /// "pure virtual methods" of SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override; virtual bool operator==( const SfxPoolItem& ) const override;
......
...@@ -57,6 +57,7 @@ public: ...@@ -57,6 +57,7 @@ public:
static SfxPoolItem* CreateDefault(); static SfxPoolItem* CreateDefault();
SwEnvItem& operator =(const SwEnvItem& rItem); SwEnvItem& operator =(const SwEnvItem& rItem);
SwEnvItem(SwEnvItem const &) = default; // SfxPoolItem copy function dichotomy
virtual bool operator ==(const SfxPoolItem& rItem) const override; virtual bool operator ==(const SfxPoolItem& rItem) const override;
......
...@@ -34,6 +34,7 @@ public: ...@@ -34,6 +34,7 @@ public:
SwLabItem(); SwLabItem();
SwLabItem& operator =(const SwLabItem& rItem); SwLabItem& operator =(const SwLabItem& rItem);
SwLabItem(SwLabItem const &) = default; // SfxPoolItem copy function dichotomy
virtual bool operator ==(const SfxPoolItem& rItem) const override; virtual bool operator ==(const SfxPoolItem& rItem) const override;
......
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