summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-07-08 12:57:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-07-08 19:25:53 +0200
commit7e274df5d149fc272277f234bf14d558a77d4bc1 (patch)
tree56cde0f2af9e8b171d5c21f5a7e8d1e772f657fb /include
parenta6f89b388365dab9e2df90edd1017370dc7607ea (diff)
make some of the SfxStringItem subclasses hashable
Change-Id: I7ad748b67266926f1e4e67e843a90b5ac3fe58b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170152 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/svl/custritm.hxx2
-rw-r--r--include/svx/postattr.hxx8
2 files changed, 10 insertions, 0 deletions
diff --git a/include/svl/custritm.hxx b/include/svl/custritm.hxx
index 118fd0963f15..309c0ebfe48a 100644
--- a/include/svl/custritm.hxx
+++ b/include/svl/custritm.hxx
@@ -39,6 +39,8 @@ public:
SfxPoolItem(which, eItemType), m_aValue(std::move(aTheValue))
{}
+ // not all of the subclasses of this are hashable, so we only define the shared hashCode function here
+ virtual size_t hashCode() const override;
virtual bool operator ==(const SfxPoolItem & rItem) const override;
virtual bool GetPresentation(SfxItemPresentation,
diff --git a/include/svx/postattr.hxx b/include/svx/postattr.hxx
index af980a3e5b9e..22ede7dffc92 100644
--- a/include/svx/postattr.hxx
+++ b/include/svx/postattr.hxx
@@ -39,6 +39,8 @@ public:
OUString &rText, const IntlWrapper& ) const override;
virtual SvxPostItAuthorItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+
+ virtual bool isHashable() const override; // hashCode is defined in CntUnencodedStringItem
};
@@ -59,6 +61,8 @@ public:
OUString &rText, const IntlWrapper& ) const override;
virtual SvxPostItDateItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+
+ virtual bool isHashable() const override; // hashCode is defined in CntUnencodedStringItem
};
/** The text of a note
@@ -79,6 +83,8 @@ public:
OUString &rText, const IntlWrapper& ) const override;
virtual SvxPostItTextItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+
+ virtual bool isHashable() const override; // hashCode is defined in CntUnencodedStringItem
};
@@ -93,6 +99,8 @@ public:
SvxPostItIdItem( TypedWhichId<SvxPostItIdItem> nWhich );
virtual SvxPostItIdItem* Clone( SfxItemPool *pPool = nullptr ) const override;
+
+ virtual bool isHashable() const override; // hashCode is defined in CntUnencodedStringItem
};
#endif