summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorAugust Sodora <augsod@gmail.com>2012-01-13 18:23:08 -0500
committerAugust Sodora <augsod@gmail.com>2012-01-13 22:21:06 -0500
commit16b7354f9f89127f5746266fc77fcb844b9309ca (patch)
tree8f9ca420684ef5ed1f8aa2139c674291ab5dac7a /sw
parentf1de38b5441e082d80f663923a9ac713c8db172d (diff)
SvStringsDtor->std::vector
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/authfld.hxx2
-rw-r--r--sw/source/core/fields/authfld.cxx5
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx12
3 files changed, 9 insertions, 10 deletions
diff --git a/sw/inc/authfld.hxx b/sw/inc/authfld.hxx
index 2f667e804a99..fa1ab08bb499 100644
--- a/sw/inc/authfld.hxx
+++ b/sw/inc/authfld.hxx
@@ -107,7 +107,7 @@ public:
const SwAuthEntry* GetEntryByHandle(long nHandle) const;
- void GetAllEntryIdentifiers( SvStringsDtor& rToFill )const;
+ void GetAllEntryIdentifiers( std::vector<String>& rToFill )const;
const SwAuthEntry* GetEntryByIdentifier(const String& rIdentifier)const;
bool ChangeEntryContent(const SwAuthEntry* pNewEntry);
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<String>& 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<String> 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<String> 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);