diff options
Diffstat (limited to 'svx/source/items/grfitem.cxx')
-rw-r--r-- | svx/source/items/grfitem.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/svx/source/items/grfitem.cxx b/svx/source/items/grfitem.cxx index 62f34094e228..8a8510aad8d4 100644 --- a/svx/source/items/grfitem.cxx +++ b/svx/source/items/grfitem.cxx @@ -22,6 +22,7 @@ #include <com/sun/star/text/GraphicCrop.hpp> #include <tools/mapunit.hxx> #include <tools/UnitConversion.hxx> +#include <o3tl/hash_combine.hxx> using namespace ::com::sun::star; @@ -41,6 +42,21 @@ SvxGrfCrop::~SvxGrfCrop() { } +bool SvxGrfCrop::isHashable() const +{ + return true; +} + +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::operator==( const SfxPoolItem& rAttr ) const { assert(SfxPoolItem::operator==(rAttr)); @@ -77,6 +93,7 @@ bool SvxGrfCrop::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const bool SvxGrfCrop::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { + ASSERT_CHANGE_REFCOUNTED_ITEM; bool bConvert = 0!=(nMemberId&CONVERT_TWIPS); text::GraphicCrop aVal; |