From a61fa94f70409b7c86ea7a006a784a26a2a3da84 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 21 Oct 2024 13:47:20 +0200 Subject: [PATCH] tdf#163484 Treeview not maximized in the StyleList regression from commit 7f42f031ed1b9f374f3fcba9c814dc5862492026 Author: Noel Grandin Date: Thu Oct 10 09:39:14 2024 +0200 tdf#100894 speed up style tree creation Change-Id: I953c2765090cfa56c7926c4cc10534f6ce60237b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175330 Reviewed-by: Noel Grandin Tested-by: Jenkins --- vcl/source/app/salvtables.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 3c3bc90be2df..e20a36662b8c 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -4068,9 +4068,11 @@ void SalInstanceTreeView::bulk_insert_for_each( for (int i = 0; i < nSourceCount; ++i) { aVclIter.iter = new SvTreeListEntry; - if (bHasAutoCheckButton || bGoingToSetText) + if (bHasAutoCheckButton) AddStringItem(aVclIter.iter, u""_ustr, -1); aVclIter.iter->AddItem(std::make_unique(aDummy, aDummy, false)); + if (bGoingToSetText) + AddStringItem(aVclIter.iter, u""_ustr, aVclIter.iter->ItemCount()); m_xTreeView->Insert(aVclIter.iter, pVclParent, TREELIST_APPEND); func(aVclIter, i);