diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2017-11-05 08:39:47 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2017-11-05 11:40:33 +0100 |
commit | e567694246d99a2a99c4079b04ed2ad8cd5ed785 (patch) | |
tree | 006797c2b3e74e1a3e37c4739b0b5e513041dd2f /starmath | |
parent | ca2aaa2b9f4ce69d05d415e13451ae6a6030f032 (diff) |
Remove GetNextSubset and create GetSubsetMap
To avoid to store an iterator and simplify loops
Change-Id: I9b160714125176841961a56905d81dcb876c68b6
Reviewed-on: https://gerrit.libreoffice.org/44326
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/dialog.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index ffde4194dbbd..f710aa1988f0 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -2257,11 +2257,10 @@ void SmSymDefineDialog::SetFont(const OUString &rFontName, const OUString &rStyl pFontsSubsetLB->Clear(); bool bFirst = true; - const Subset* pSubset; - while( nullptr != (pSubset = pSubsetMap->GetNextSubset( bFirst )) ) + for (auto & subset : pSubsetMap->GetSubsetMap()) { - const sal_Int32 nPos = pFontsSubsetLB->InsertEntry( pSubset->GetName()); - pFontsSubsetLB->SetEntryData( nPos, const_cast<Subset *>(pSubset) ); + const sal_Int32 nPos = pFontsSubsetLB->InsertEntry( subset.GetName()); + pFontsSubsetLB->SetEntryData( nPos, const_cast<Subset *>(&subset) ); // subset must live at least as long as the selected font !!! if( bFirst ) pFontsSubsetLB->SelectEntryPos( nPos ); |