summaryrefslogtreecommitdiff
path: root/include/vcl
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2022-04-27 11:57:29 +0200
committerLuboš Luňák <l.lunak@collabora.com>2022-04-27 22:45:33 +0200
commit6d36d7185b025c77db9dcccea1861d37dd6bcc1b (patch)
tree859047f1623af5dcf996c350ac02df08c4bc2ce9 /include/vcl
parent8de60b9049f07d8a958d0e28759dca247c4d5044 (diff)
provide explicit function for hashing vcl::Font
It's cleaner than streaming the font and then hashing the result, and it's also faster. Change-Id: I6262e45362d386c21482f1e71be51912f123ee45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133500 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'include/vcl')
-rw-r--r--include/vcl/font.hxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/vcl/font.hxx b/include/vcl/font.hxx
index 0f641100eecb..9f910688de1a 100644
--- a/include/vcl/font.hxx
+++ b/include/vcl/font.hxx
@@ -161,6 +161,10 @@ public:
bool IsSameInstance( const Font& ) const;
bool EqualIgnoreColor( const Font& ) const;
+ // Compute value usable as hash.
+ size_t GetHashValue() const;
+ size_t GetHashValueIgnoreColor() const;
+
friend VCL_DLLPUBLIC SvStream& ::ReadFont( SvStream& rIStm, vcl::Font& );
friend VCL_DLLPUBLIC SvStream& ::WriteFont( SvStream& rOStm, const vcl::Font& );