perf: use freeze/thaw around block insert of multiple icons
into the style preview widget in the tabbed view
|--1.67%--StylesListUpdateTask::Invoke
| StylesPreviewWindow_Base::UpdateStylesList
| weld::IconView::append (inlined)
| JSIconView::insert
| |
| |--1.58%--SalInstanceIconView::insert
| | |
| | |--1.19%--SvTreeListBox::Insert
| | | SvTreeList::Insert
| | | SvTreeList::Broadcast (inlined)
| | | SvTreeListBox::ModelNotification
Change-Id: I1c1058324a056e7c8fb42f31c5b4919fcc5870e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152577
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
diff --git a/svx/source/tbxctrls/StylesPreviewWindow.cxx b/svx/source/tbxctrls/StylesPreviewWindow.cxx
index a51283d..3cc669f 100644
--- a/svx/source/tbxctrls/StylesPreviewWindow.cxx
+++ b/svx/source/tbxctrls/StylesPreviewWindow.cxx
@@ -541,6 +541,7 @@ void StylesPreviewWindow_Base::UpdateStylesList()
}
}
m_xStylesView->freeze();
m_xStylesView->clear();
for (const auto& rStyle : m_aAllStyles)
{
@@ -548,6 +549,7 @@ void StylesPreviewWindow_Base::UpdateStylesList()
m_xStylesView->append(rStyle.first, rStyle.second, pImg);
}
m_xStylesView->thaw();
}
StylesPreviewWindow_Impl::StylesPreviewWindow_Impl(