summaryrefslogtreecommitdiff
path: root/scaddins/source/pricing/pricing.cxx
diff options
context:
space:
mode:
authorIan <ian.gilham@gmail.com>2015-08-07 10:59:28 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-08-07 14:02:45 +0000
commit25534a62b2ba398c6298c6b9e521f20de1087540 (patch)
tree71756dd35a4f9822a53d43328edae1a386d8998a /scaddins/source/pricing/pricing.cxx
parent0dc79f35aa3a373414c17f596ca4491a69083864 (diff)
tdf#90222: Removed redundant collection type
Removed ScaStringList collection and replaced it with std::vector<OUString> Change-Id: Iba9680454a7a154cc445e2b5c8a436917868b40e Reviewed-on: https://gerrit.libreoffice.org/17573 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'scaddins/source/pricing/pricing.cxx')
-rw-r--r--scaddins/source/pricing/pricing.cxx14
1 files changed, 4 insertions, 10 deletions
diff --git a/scaddins/source/pricing/pricing.cxx b/scaddins/source/pricing/pricing.cxx
index 21174c7fb108..3b83dcf13040 100644
--- a/scaddins/source/pricing/pricing.cxx
+++ b/scaddins/source/pricing/pricing.cxx
@@ -72,12 +72,6 @@ void ScaList::_Grow()
pData = pNewData;
}
-ScaStringList::~ScaStringList()
-{
- for( OUString* pStr = First(); pStr; pStr = Next() )
- delete pStr;
-}
-
ScaResId::ScaResId( sal_uInt16 nId, ResMgr& rResMgr ) :
ResId( nId, rResMgr )
{
@@ -114,7 +108,7 @@ ScaFuncData::ScaFuncData( const ScaFuncDataBase& rBaseData, ResMgr& rResMgr ) :
const ResStringArray& rArr = aArrLoader.GetStringArray();
for( sal_uInt32 nIndex = 0; nIndex < rArr.Count(); nIndex++ )
- aCompList.Append( rArr.GetString( nIndex ) );
+ aCompList.push_back( rArr.GetString( nIndex ) );
}
ScaFuncData::~ScaFuncData()
@@ -452,14 +446,14 @@ uno::Sequence< sheet::LocalizedName > SAL_CALL ScaPricingAddIn::getCompatibility
if( !pFData )
return uno::Sequence< sheet::LocalizedName >( 0 );
- const ScaStringList& rStrList = pFData->GetCompNameList();
- sal_uInt32 nCount = rStrList.Count();
+ const std::vector<OUString>& rStrList = pFData->GetCompNameList();
+ sal_uInt32 nCount = rStrList.size();
uno::Sequence< sheet::LocalizedName > aRet( nCount );
sheet::LocalizedName* pArray = aRet.getArray();
for( sal_uInt32 nIndex = 0; nIndex < nCount; nIndex++ )
- pArray[ nIndex ] = sheet::LocalizedName( GetLocale( nIndex ), *rStrList.Get( nIndex ) );
+ pArray[ nIndex ] = sheet::LocalizedName( GetLocale( nIndex ), rStrList[nIndex] );
return aRet;
}