svx: Iterate over map elements once instead of twice
Instead of iterating over the DefaultShapesPanel::m_aShapesSetMap elements twice, do so only once and just do everything that needs to be done for each of the elements right away. Change-Id: I0b774ccbed7e5110f57d0ce6cc6cf2382a6b923e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211854 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
@@ -102,12 +102,9 @@ void DefaultShapesPanel::Initialize()
|
||||
sal_uInt16 nSelectionId = i + 1; // tdf#142767 id 0 is reserved for nothing-selected
|
||||
aSet.first->InsertItem(nSelectionId, aSlotImage, sLabel);
|
||||
}
|
||||
}
|
||||
|
||||
for (auto& aSetMap : m_aShapesSetMap)
|
||||
{
|
||||
aSetMap.first->SetColor(Application::GetSettings().GetStyleSettings().GetDialogColor());
|
||||
aSetMap.first->SetSelectHdl(LINK(this, DefaultShapesPanel, ShapeSelectHdl));
|
||||
aSet.first->SetColor(Application::GetSettings().GetStyleSettings().GetDialogColor());
|
||||
aSet.first->SetSelectHdl(LINK(this, DefaultShapesPanel, ShapeSelectHdl));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user