summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-11-29 23:24:35 +0100
committerMichael Stahl <mstahl@redhat.com>2017-11-30 22:32:46 +0100
commitdfe635d4f523224b7a6991b524dc2635311a5956 (patch)
treeb27b77e3d8084e07636a20e74ef82f8756b7a6df /sw/source/ui
parent2c081e66cd63df812c2d248c7d2b5bb384b21156 (diff)
sw: std::vector<OUString*> considered silly
Change-Id: Ie5141a01b1a63c083d5fce1842a35a9a4b0d36e3
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx10
1 files changed, 5 insertions, 5 deletions
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<OUString*> aArr;
+ std::vector<OUString> 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<OUString*>::const_iterator it(aArr.begin()); it != aArr.end(); ++it) {
- rBox.InsertEntry( **it );
- delete *it;
+ for (auto const& it : aArr)
+ {
+ rBox.InsertEntry(it);
}
}
}