diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-05-17 12:43:38 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-05-20 14:53:12 +0200 |
commit | 50588a1583e3cc5dc647a35889e50478c7bfd033 (patch) | |
tree | 460a6c4137c2ceade8132c760b79eac99dee4c81 /include | |
parent | 092da974f180e6f166c2e5662ce11db72351700b (diff) |
Related: tdf#109158 GtkTreeStore append performance is poor
so prepend in opposite order
Change-Id: Ibfa2878d999b945e774b5a90309a663f11b132b5
Reviewed-on: https://gerrit.libreoffice.org/72488
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/weld.hxx | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index 6f01abf567c2..8ba41b4e5851 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -765,12 +765,20 @@ public: virtual void move_subtree(TreeIter& rNode, const TreeIter* pNewParent, int nIndexInNewParent) = 0; - //calling func on each element until func returns true or we run out of elements + // call func on each element until func returns true or we run out of elements virtual void all_foreach(const std::function<bool(TreeIter&)>& func) = 0; - //calling func on each selected element until func returns true or we run out of elements + // call func on each selected element until func returns true or we run out of elements virtual void selected_foreach(const std::function<bool(TreeIter&)>& func) = 0; - //calling func on each visible element until func returns true or we run out of elements + // call func on each visible element until func returns true or we run out of elements virtual void visible_foreach(const std::function<bool(TreeIter&)>& func) = 0; + // clear the tree, then add nSourceCount rows, call func on each row + // inserted with an arg of the index that this row will be when bulk insert + // ends. + // + // this enables inserting the entries backwards in models where that is faster + virtual void bulk_insert_for_each(int nSourceCount, + const std::function<void(TreeIter&, int nSourceIndex)>& func) + = 0; void connect_expanding(const Link<const TreeIter&, bool>& rLink) { m_aExpandingHdl = rLink; } |