diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-11-22 08:41:26 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-11-22 16:59:37 +0100 |
commit | d9c726beb64968e84d2150824c81dcf0a8b66ec2 (patch) | |
tree | 9fb1e8983ec450ee793ad6d2c655adf3d0d134a5 /include | |
parent | 9b2d6b36815cbfee8b44b87b7c0b3cb4bab61850 (diff) |
optimise framelinkarray lookup
We can use hashing to do an O(1) lookup instead of O(n)
linear scanning, this class is sometimes a bottleneck
in laying out large spreadsheets.
Change-Id: I4d27e8f339a8732535d832442a9d4a649da19e88
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159801
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/svx/framelink.hxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/svx/framelink.hxx b/include/svx/framelink.hxx index ceb0abe5e390..5c98c3a1a3c6 100644 --- a/include/svx/framelink.hxx +++ b/include/svx/framelink.hxx @@ -163,6 +163,7 @@ public: bool operator==( const Style& rOther) const; bool operator<( const Style& rOther) const; + size_t hashCode() const; }; inline bool operator>( const Style& rL, const Style& rR ) { return rR.operator<(rL); } |