From dfe635d4f523224b7a6991b524dc2635311a5956 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 29 Nov 2017 23:24:35 +0100 Subject: sw: std::vector considered silly Change-Id: Ie5141a01b1a63c083d5fce1842a35a9a4b0d36e3 --- sw/source/ui/dialog/uiregionsw.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sw/source/ui') diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 78bf7c681bd5..404b2a0f59bc 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -1379,22 +1379,22 @@ IMPL_LINK( SwEditRegionDlg, SubRegionEventHdl, VclWindowEvent&, rEvent, void ) } } -// helper function - read region names from medium +// helper function - read section names from medium static void lcl_ReadSections( SfxMedium& rMedium, ComboBox& rBox ) { rBox.Clear(); uno::Reference < embed::XStorage > xStg; if( rMedium.IsStorage() && (xStg = rMedium.GetStorage()).is() ) { - std::vector aArr; + std::vector aArr; SotClipboardFormatId nFormat = SotStorage::GetFormatID( xStg ); if ( nFormat == SotClipboardFormatId::STARWRITER_60 || nFormat == SotClipboardFormatId::STARWRITERGLOB_60 || nFormat == SotClipboardFormatId::STARWRITER_8 || nFormat == SotClipboardFormatId::STARWRITERGLOB_8) SwGetReaderXML()->GetSectionList( rMedium, aArr ); - for(std::vector::const_iterator it(aArr.begin()); it != aArr.end(); ++it) { - rBox.InsertEntry( **it ); - delete *it; + for (auto const& it : aArr) + { + rBox.InsertEntry(it); } } } -- cgit