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:
SetValue(rColor.GetValue());
return *this;
}
SvxColorItem(SvxColorItem const &) = default; // SfxPoolItem copy function dichotomy
const Color& GetValue() const
{
......
......@@ -51,6 +51,7 @@ public:
SetValue(rCont.GetValue());
return *this;
}
SvxContourItem(SvxContourItem const &) = default; // SfxPoolItem copy function dichotomy
};
#endif
......
......@@ -64,6 +64,7 @@ public:
SetValue( rCross.GetValue() );
return *this;
}
SvxCrossedOutItem(SvxCrossedOutItem const &) = default; // SfxPoolItem copy function dichotomy
// enum cast
FontStrikeout GetStrikeout() const
......
......@@ -72,6 +72,7 @@ public:
ePropUnit = rSize.ePropUnit;
return *this;
}
SvxFontHeightItem(SvxFontHeightItem const &) = default; // SfxPoolItem copy function dichotomy
void SetHeight( sal_uInt32 nNewHeight, const sal_uInt16 nNewProp = 100,
MapUnit eUnit = MapUnit::MapRelative );
......
......@@ -107,6 +107,7 @@ public:
}
SvxFontItem& operator=(const SvxFontItem& rFont);
SvxFontItem(SvxFontItem const &) = default; // SfxPoolItem copy function dichotomy
void dumpAsXml(struct _xmlTextWriter* pWriter) const override;
};
......
......@@ -41,6 +41,7 @@ public:
inline SvxFormatBreakItem( const SvxBreak eBrk /*= SvxBreak::NONE*/,
const sal_uInt16 nWhich );
inline SvxFormatBreakItem& operator=( const SvxFormatBreakItem& rCpy );
SvxFormatBreakItem(SvxFormatBreakItem const &) = default; // SfxPoolItem copy function dichotomy
// "pure virtual Methods" from SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
......
......@@ -56,6 +56,8 @@ public:
SetValue( rItem.GetValue() );
return *this;
}
SvxFrameDirectionItem(SvxFrameDirectionItem const &) = default;
// SfxPoolItem copy function dichotomy
};
#endif // INCLUDED_EDITENG_FRMDIRITEM_HXX
......
......@@ -54,6 +54,7 @@ public:
SetValue( rHorJustify.GetValue() );
return *this;
}
SvxHorJustifyItem(SvxHorJustifyItem const &) = default; // SfxPoolItem copy function dichotomy
};
......@@ -86,6 +87,7 @@ public:
SetValue( rVerJustify.GetValue() );
return *this;
}
SvxVerJustifyItem(SvxVerJustifyItem const &) = default; // SfxPoolItem copy function dichotomy
};
......
......@@ -38,6 +38,7 @@ public:
inline SvxFormatKeepItem( const bool bKeep /*= false*/,
const sal_uInt16 _nWhich );
inline SvxFormatKeepItem& operator=( const SvxFormatKeepItem& rSplit );
SvxFormatKeepItem(SvxFormatKeepItem const &) = default; // SfxPoolItem copy function dichotomy
// "pure virtual Methods" from SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
......
......@@ -62,6 +62,7 @@ public:
SetValue( rLang.GetValue() );
return *this;
}
SvxLanguageItem(SvxLanguageItem const &) = default; // SfxPoolItem copy function dichotomy
LanguageType GetLanguage() const
{ return GetValue(); }
......
......@@ -69,6 +69,7 @@ public:
const long nTLeft /*= 0*/, const short nOfset /*= 0*/,
const sal_uInt16 nId );
inline SvxLRSpaceItem& operator=( const SvxLRSpaceItem &rCpy );
SvxLRSpaceItem(SvxLRSpaceItem const &) = default; // SfxPoolItem copy function dichotomy
// "pure virtual Methods" from SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
......
......@@ -37,6 +37,7 @@ class EDITENG_DLLPUBLIC SvxOpaqueItem : public SfxBoolItem
public:
explicit SvxOpaqueItem( const sal_uInt16 nId , const bool bOpa = true );
inline SvxOpaqueItem &operator=( const SvxOpaqueItem &rCpy );
SvxOpaqueItem(SvxOpaqueItem const &) = default; // SfxPoolItem copy function dichotomy
// "pure virtual Methods" from SfxPoolItem
virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
......
......@@ -63,6 +63,7 @@ public:
SetValue( rPost.GetValue() );
return *this;
}
SvxPostureItem(SvxPostureItem const &) = default; // SfxPoolItem copy function dichotomy
// enum cast
FontItalic GetPosture() const
......
......@@ -43,6 +43,7 @@ public:
explicit inline SvxProtectItem( const sal_uInt16 nId );
inline SvxProtectItem &operator=( const SvxProtectItem &rCpy );
SvxProtectItem(SvxProtectItem const &) = default; // SfxPoolItem copy function dichotomy
// "pure virtual Methods" from SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
......
......@@ -46,6 +46,7 @@ public:
const SvxShadowLocation eLoc = SvxShadowLocation::NONE );
inline SvxShadowItem& operator=( const SvxShadowItem& rFmtShadow );
SvxShadowItem(SvxShadowItem const &) = default; // SfxPoolItem copy function dichotomy
// "pure virtual Methods" from SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
......
......@@ -53,7 +53,7 @@ public:
SetValue(rShadow.GetValue());
return *this;
}
SvxShadowedItem(SvxShadowedItem const &) = default; // SfxPoolItem copy function dichotomy
};
#endif
......
......@@ -42,6 +42,7 @@ public:
SvxSizeItem( const sal_uInt16 nId, const Size& rSize);
inline SvxSizeItem& operator=( const SvxSizeItem &rCpy );
SvxSizeItem(SvxSizeItem const &) = default; // SfxPoolItem copy function dichotomy
// "pure virtual Methods" from SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
......
......@@ -117,6 +117,7 @@ public:
// Assignment operator, equality operator (caution: expensive!)
SvxTabStopItem& operator=( const SvxTabStopItem& rTSI );
SvxTabStopItem(SvxTabStopItem const &) = default; // SfxPoolItem copy function dichotomy
// this is already included in SfxPoolItem declaration
//int operator!=( const SvxTabStopItem& rTSI ) const
......
......@@ -65,6 +65,7 @@ public:
SetColor( rTextLine.GetColor() );
return *this;
}
SvxTextLineItem(SvxTextLineItem const &) = default; // SfxPoolItem copy function dichotomy
// enum cast
FontLineStyle GetLineStyle() const
......
......@@ -45,6 +45,7 @@ public:
SvxULSpaceItem( const sal_uInt16 nUp, const sal_uInt16 nLow,
const sal_uInt16 nId );
inline SvxULSpaceItem& operator=( const SvxULSpaceItem &rCpy );
SvxULSpaceItem(SvxULSpaceItem const &) = default; // SfxPoolItem copy function dichotomy
// "pure virtual Methods" from SfxPoolItem
virtual bool operator==( const SfxPoolItem& ) const override;
......
......@@ -63,6 +63,7 @@ public:
SetValue( rWeight.GetValue() );
return *this;
}
SvxWeightItem(SvxWeightItem const &) = default; // SfxPoolItem copy function dichotomy
// enum cast
FontWeight GetWeight() const { return GetValue(); }
......
......@@ -60,6 +60,7 @@ public:
SetValue( rOrientation.GetValue() );
return *this;
}
SvxOrientationItem(SvxOrientationItem const &) = default; // SfxPoolItem copy function dichotomy
/** Returns sal_True, if the item represents STACKED state. */
bool IsStacked() const;
......@@ -110,6 +111,7 @@ public:
nBottomMargin = rMargin.nBottomMargin;
return *this;
}
SvxMarginItem(SvxMarginItem const &) = default; // SfxPoolItem copy function dichotomy
};
#endif
......
......@@ -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); }
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
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