summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Dominguez <venccsralph@gmail.com>2011-05-21 17:04:16 -0430
committerJoseph Powers <jpowers27@cox.net>2011-05-22 21:19:05 -0700
commita72ca64d502d73e3c4a579f0e1aed9bfebd36c87 (patch)
treecea0138673f60eaf8286d1569a3c8539692b9862
parenta548e1e131357f91641ac9ef23ef41ce6ec525e4 (diff)
Replace List for std::vector<String>.
-rw-r--r--svx/source/dialog/srchdlg.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index a4d031d567..0dd41154fb 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -158,15 +158,18 @@ void ListToStrArr_Impl( sal_uInt16 nId, SvStringsDtor& rStrLst, ComboBox& rCBox
{
SfxStringListItem* pSrchItem =
(SfxStringListItem*)SFX_APP()->GetItem( nId );
- List* pLst = pSrchItem ? pSrchItem->GetList() : 0;
- if ( pLst )
- for ( sal_uInt16 i = 0; i < pLst->Count(); ++i )
+ if (pSrchItem)
+ {
+ std::vector<String> aLst = pSrchItem->GetList();
+
+ for ( sal_uInt16 i = 0; i < aLst.size(); ++i )
{
- String* pTmp = new String( *(String*)( pLst->GetObject(i) ) );
+ String* pTmp = new String(aLst[i]);
rStrLst.Insert( pTmp, rStrLst.Count() );
rCBox.InsertEntry( *pTmp );
}
+ }
}
// -----------------------------------------------------------------------
@@ -174,10 +177,10 @@ void ListToStrArr_Impl( sal_uInt16 nId, SvStringsDtor& rStrLst, ComboBox& rCBox
void StrArrToList_Impl( sal_uInt16 nId, const SvStringsDtor& rStrLst )
{
DBG_ASSERT( rStrLst.Count(), "check in advance");
- List aLst;
+ std::vector<String> aLst;
for ( sal_uInt16 i = 0; i < rStrLst.Count(); ++i )
- aLst.Insert( rStrLst[ i ], LIST_APPEND );
+ aLst.push_back( *rStrLst[ i ]);
SFX_APP()->PutItem( SfxStringListItem( nId, &aLst ) );
}