summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2022-05-16 22:38:03 +0200
committerLuboš Luňák <l.lunak@collabora.com>2022-05-17 07:37:15 +0200
commitea980b36a7b48a3c9c17cf08d15c5f4f27f79942 (patch)
treebad168bac2c7e3c196e6f3fec1ec4c1d156e977b /sc
parent5bf7058f4959ce0cf217817d2b5a30b81c4a7ff9 (diff)
freeze() and thaw() a widget during creation (tdf#149112)
The repeated inserts each trigger SvTreeList::GetVisibleCount(), which has a poor performance because of repeated uses of the SvListView::Impl::m_DataTable map. Change-Id: Ibb261a8501a1d5c168b37675e34498386f161595 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134415 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/dbgui/tpsubt.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx
index 439ee359f203..aa5f38862701 100644
--- a/sc/source/ui/dbgui/tpsubt.cxx
+++ b/sc/source/ui/dbgui/tpsubt.cxx
@@ -257,6 +257,7 @@ void ScTpSubTotalGroup::FillListBoxes()
mxLbColumns->clear();
mxLbGroup->insert_text(0, aStrNone );
+ mxLbColumns->freeze();
sal_uInt16 i=0;
for ( col=nFirstCol; col<=nMaxCol && i<SC_MAXFIELDS(pDoc->GetSheetLimits()); col++ )
{
@@ -273,6 +274,8 @@ void ScTpSubTotalGroup::FillListBoxes()
mxLbColumns->set_id(i, "0");
i++;
}
+ mxLbColumns->thaw();
+
// subsequent initialization of the constant:
nFieldCount = i;
}