summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-11-25 15:41:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-11-27 14:16:43 +0100
commitf4b128f0d607fa74c9a62744753beff497dd0fc3 (patch)
tree3d04d65bb6c1c7071afd4820f495bb0df92a3584 /include
parent7e25c7c6fb0574ca6ebd4abc403104fe89f28074 (diff)
tdf#108642 simplify comparison data calculation
Complex table-based writer doc with sidebar slow to open. We are only using the extent data in SwAccessibleTableData_Impl as a comparison method to see if that table structure has changed. So just compare the rows and columns arrays instead of calculating extents. The downside is that we might fire events a little more often. This takes the opening time from 17s to 10s for me. Change-Id: I936cbc01072345d6360c0ec162de20b3111a588e Reviewed-on: https://gerrit.libreoffice.org/83682 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 4edf078a77167d0fb5201f857146d95a901a809e) Reviewed-on: https://gerrit.libreoffice.org/83884
Diffstat (limited to 'include')
-rw-r--r--include/o3tl/sorted_vector.hxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/o3tl/sorted_vector.hxx b/include/o3tl/sorted_vector.hxx
index 102287d52a21..088f5a2aa214 100644
--- a/include/o3tl/sorted_vector.hxx
+++ b/include/o3tl/sorted_vector.hxx
@@ -198,6 +198,16 @@ public:
return (ret.second) ? ret.first : m_vector.end();
}
+ bool operator==(const sorted_vector & other) const
+ {
+ return m_vector == other.m_vector;
+ }
+
+ bool operator!=(const sorted_vector & other) const
+ {
+ return m_vector != other.m_vector;
+ }
+
void insert(sorted_vector<Value,Compare,Find> const& rOther)
{
// optimization for the rather common case that we are overwriting this with the contents