diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2022-05-16 22:38:03 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2022-05-17 07:37:15 +0200 |
commit | ea980b36a7b48a3c9c17cf08d15c5f4f27f79942 (patch) | |
tree | bad168bac2c7e3c196e6f3fec1ec4c1d156e977b /sc | |
parent | 5bf7058f4959ce0cf217817d2b5a30b81c4a7ff9 (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.cxx | 3 |
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; } |