summaryrefslogtreecommitdiff
path: root/vcl/inc/salvtables.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-10-10 09:39:14 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-10-16 07:38:45 +0200
commit7f42f031ed1b9f374f3fcba9c814dc5862492026 (patch)
tree96c46bce70ed5538f884e5aacf1357fcc5a7632c /vcl/inc/salvtables.hxx
parent34b95e12a839cbcf4818bbb0b2ce26b85999e856 (diff)
tdf#100894 speed up style tree creation
by using bulk_insert_for_each() more aggressively. Reduces the open time from several minutes to 18s on my machine. I had to pass down a flag, because the gtk and the gen weld backends work differently, and the gen backend absolutely has to know up front if the inserter function is going to call set_text, otherwise it asserts in SvTreeListBox::SetEntryText Change-Id: I84750888c0a80f4041cfe024e6570dd94f6d09db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174757 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/inc/salvtables.hxx')
-rw-r--r--vcl/inc/salvtables.hxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index 01da5ed831f6..f7e577ab7808 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -1638,11 +1638,10 @@ public:
virtual void insert_separator(int pos, const OUString& /*rId*/) override;
- virtual void
- bulk_insert_for_each(int nSourceCount,
- const std::function<void(weld::TreeIter&, int nSourceIndex)>& func,
- const weld::TreeIter* pParent = nullptr,
- const std::vector<int>* pFixedWidths = nullptr) override;
+ virtual void bulk_insert_for_each(
+ int nSourceCount, const std::function<void(weld::TreeIter&, int nSourceIndex)>& func,
+ const weld::TreeIter* pParent = nullptr, const std::vector<int>* pFixedWidths = nullptr,
+ bool bGoingToSetText = false) override;
virtual void set_font_color(int pos, const Color& rColor) override;