summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-05-20 12:34:52 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-05-21 17:21:02 +0200
commit86618248683fa4048192d15356c7e6b430e8dbb9 (patch)
tree56e8bfbb202fc09539af38e2f273d56b24baecd5 /include
parenta703b4d8842261f55f489c28352df1f53a9b070a (diff)
tdf#109158 short-circuit text width measuring with fixed width columns
Change-Id: Id050bfa8b4dae70e2a3a45b2501bb071d82d14e5 Reviewed-on: https://gerrit.libreoffice.org/72601 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.hxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 8ba41b4e5851..71214ada80cf 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -775,9 +775,15 @@ public:
// 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
+ // this enables inserting the entries backwards in models where that is faster,
+ //
+ // pFixedWidths is optional, when present each matching entry col text
+ // width will not be measured, and the fixed width used instead. Use
+ // sparingly because wider text than the fixed width is clipped and cannot
+ // be scrolled into view horizontally.
virtual void bulk_insert_for_each(int nSourceCount,
- const std::function<void(TreeIter&, int nSourceIndex)>& func)
+ const std::function<void(TreeIter&, int nSourceIndex)>& func,
+ const std::vector<int>* pFixedWidths = nullptr)
= 0;
void connect_expanding(const Link<const TreeIter&, bool>& rLink) { m_aExpandingHdl = rLink; }