diff --git a/include/svx/grfcrop.hxx b/include/svx/grfcrop.hxx index 354ee8b16c44..ff17e66e0c03 100644 --- a/include/svx/grfcrop.hxx +++ b/include/svx/grfcrop.hxx @@ -44,6 +44,8 @@ public: // "pure virtual methods" from SfxPoolItem virtual bool operator==( const SfxPoolItem& ) const override; + virtual bool supportsHashCode() const override { return true; } + virtual size_t hashCode() const override; virtual bool GetPresentation( SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, diff --git a/svx/source/items/grfitem.cxx b/svx/source/items/grfitem.cxx index b87f021a6f5f..d65682d28da1 100644 --- a/svx/source/items/grfitem.cxx +++ b/svx/source/items/grfitem.cxx @@ -53,6 +53,15 @@ bool SvxGrfCrop::operator==( const SfxPoolItem& rAttr ) const m_nBottom == rCrop.GetBottom(); } +size_t SvxGrfCrop::hashCode() const +{ + std::size_t seed(0); + o3tl::hash_combine(seed, m_nLeft); + o3tl::hash_combine(seed, m_nRight); + o3tl::hash_combine(seed, m_nTop); + o3tl::hash_combine(seed, m_nBottom); + return seed; +} bool SvxGrfCrop::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const {