From 16b7354f9f89127f5746266fc77fcb844b9309ca Mon Sep 17 00:00:00 2001 From: August Sodora Date: Fri, 13 Jan 2012 18:23:08 -0500 Subject: SvStringsDtor->std::vector --- sw/source/core/fields/authfld.cxx | 5 ++--- sw/source/ui/index/swuiidxmrk.cxx | 12 ++++++------ 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx index 718e9638caf9..2a4d66d3d677 100644 --- a/sw/source/core/fields/authfld.cxx +++ b/sw/source/core/fields/authfld.cxx @@ -218,13 +218,12 @@ const SwAuthEntry* SwAuthorityFieldType::GetEntryByHandle(long nHandle) const } void SwAuthorityFieldType::GetAllEntryIdentifiers( - SvStringsDtor& rToFill )const + std::vector& rToFill )const { for(sal_uInt16 j = 0; j < m_pDataArr->Count(); j++) { SwAuthEntry* pTemp = m_pDataArr->GetObject(j); - rToFill.Insert( new String( pTemp->GetAuthorField( - AUTH_FIELD_IDENTIFIER )), rToFill.Count() ); + rToFill.push_back(pTemp->GetAuthorField(AUTH_FIELD_IDENTIFIER)); } } diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index 8ae80434eb16..72b26395db6d 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -1477,10 +1477,10 @@ IMPL_LINK(SwAuthMarkDlg, ChangeSourceHdl, RadioButton*, pButton) pSh->GetFldType(RES_AUTHORITY, aEmptyStr); if(pFType) { - SvStringsDtor aIds; + std::vector aIds; pFType->GetAllEntryIdentifiers( aIds ); - for(sal_uInt16 n = 0; n < aIds.Count(); n++) - aEntryLB.InsertEntry(*aIds.GetObject(n)); + for(size_t n = 0; n < aIds.size(); ++n) + aEntryLB.InsertEntry(aIds[n]); } if(m_sCreatedEntry[AUTH_FIELD_IDENTIFIER].Len()) aEntryLB.InsertEntry(m_sCreatedEntry[AUTH_FIELD_IDENTIFIER]); @@ -1656,10 +1656,10 @@ SwCreateAuthEntryDlg_Impl::SwCreateAuthEntryDlg_Impl(Window* pParent, rSh.GetFldType(RES_AUTHORITY, aEmptyStr); if(pFType) { - SvStringsDtor aIds; + std::vector aIds; pFType->GetAllEntryIdentifiers( aIds ); - for(sal_uInt16 n = 0; n < aIds.Count(); n++) - pIdentifierBox->InsertEntry(*aIds.GetObject(n)); + for(size_t n = 0; n < aIds.size(); ++n) + pIdentifierBox->InsertEntry(aIds[n]); } pIdentifierBox->SetText(pFields[aCurInfo.nToxField]); Size aTmp(aEditSize); -- cgit