diff options
-rw-r--r-- | include/sfx2/dinfdlg.hxx | 5 | ||||
-rw-r--r-- | include/svl/stritem.hxx | 4 | ||||
-rw-r--r-- | include/svx/xit.hxx | 3 | ||||
-rw-r--r-- | svl/source/items/stritem.cxx | 2 | ||||
-rw-r--r-- | sw/inc/paratr.hxx | 3 |
5 files changed, 15 insertions, 2 deletions
diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx index b541c67c8336..303b06c0c4cb 100644 --- a/include/sfx2/dinfdlg.hxx +++ b/include/sfx2/dinfdlg.hxx @@ -173,7 +173,10 @@ public: void SetCmisProperties(const css::uno::Sequence< css::document::CmisProperty >& cmisProps ); virtual SfxDocumentInfoItem* Clone( SfxItemPool* pPool = nullptr ) const override; - virtual bool operator==( const SfxPoolItem& ) const override; + virtual bool operator==( const SfxPoolItem& ) const override; + // Marked as false since the SfxStringItem superclass supports hashing, but + // this class has not been checked for safety under hashing yet. + virtual bool supportsHashCode() const override { return false; } virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override; }; diff --git a/include/svl/stritem.hxx b/include/svl/stritem.hxx index 270a6cdde41a..977f4bddc7b0 100644 --- a/include/svl/stritem.hxx +++ b/include/svl/stritem.hxx @@ -36,6 +36,10 @@ public: SfxPoolItem(which, eItemType), m_aValue(rValue) {} virtual bool operator ==(const SfxPoolItem & rItem) const override; + // Note that all the subclasses are currently marked as false since we haven't check them to + // be safe under hashing + virtual bool supportsHashCode() const override { return true; } + virtual size_t hashCode() const override { return m_aValue.hashCode(); } virtual bool GetPresentation(SfxItemPresentation, MapUnit, MapUnit, diff --git a/include/svx/xit.hxx b/include/svx/xit.hxx index 7fd0fbd09327..67f4a7433349 100644 --- a/include/svx/xit.hxx +++ b/include/svx/xit.hxx @@ -49,6 +49,9 @@ public: virtual bool operator==(const SfxPoolItem& rItem) const override; virtual NameOrIndex* Clone(SfxItemPool* pPool = nullptr) const override; + // Marked as false since the SfxStringItem superclass supports hashing, but + // this class has not been checked for safety under hashing yet. + virtual bool supportsHashCode() const override { return false; } OUString const & GetName() const { return GetValue(); } void SetName(const OUString& rName) { SetValue(rName); } diff --git a/svl/source/items/stritem.cxx b/svl/source/items/stritem.cxx index a384e23a2ee8..0c6b8be1763d 100644 --- a/svl/source/items/stritem.cxx +++ b/svl/source/items/stritem.cxx @@ -49,7 +49,7 @@ bool SfxStringItem::PutValue(const css::uno::Any& rVal, m_aValue = aTheValue; return true; } - OSL_FAIL("CntUnencodedStringItem::PutValue(): Wrong type"); + OSL_FAIL("SfxStringItem::PutValue(): Wrong type"); return false; } diff --git a/sw/inc/paratr.hxx b/sw/inc/paratr.hxx index 3a8fd5d03674..5c8d93b49b76 100644 --- a/sw/inc/paratr.hxx +++ b/sw/inc/paratr.hxx @@ -166,6 +166,9 @@ public: /// "pure virtual methods" of SfxPoolItem virtual bool operator==( const SfxPoolItem& ) const override; virtual SwNumRuleItem* Clone( SfxItemPool *pPool = nullptr ) const override; + // Marked as false since the SfxStringItem superclass supports hashing, but + // this class has not been checked for safety under hashing yet. + virtual bool supportsHashCode() const override { return false; } virtual bool GetPresentation( SfxItemPresentation ePres, MapUnit eCoreMetric, MapUnit ePresMetric, |