diff options
author | Nigel Hawkins <n.hawkins@gmx.com> | 2011-08-09 15:29:47 +0100 |
---|---|---|
committer | Nigel Hawkins <n.hawkins@gmx.com> | 2011-08-09 15:29:47 +0100 |
commit | b3a2205527b969128438bec50531e57c2efe9a32 (patch) | |
tree | c0d0bb2d26ae94aee8bcbe251a240157c85c686d /svl | |
parent | Replace SvUShorts with vector in aeitem.[ch]xx (diff) | |
download | core-b3a2205527b969128438bec50531e57c2efe9a32.tar.gz core-b3a2205527b969128438bec50531e57c2efe9a32.zip |
Replace SvUShorts with vector in svl/zforlist.[ch]xx
LGPLv3+/MPL1.1
Diffstat (limited to 'svl')
-rw-r--r-- | svl/inc/svl/zforlist.hxx | 3 | ||||
-rw-r--r-- | svl/source/numbers/zforlist.cxx | 13 |
2 files changed, 7 insertions, 9 deletions
diff --git a/svl/inc/svl/zforlist.hxx b/svl/inc/svl/zforlist.hxx index 4b0441ce26da..60f42ba119a1 100644 --- a/svl/inc/svl/zforlist.hxx +++ b/svl/inc/svl/zforlist.hxx @@ -47,7 +47,6 @@ class Date; class SvStream; class Color; -class SvUShorts; class CharClass; class CalendarWrapper; @@ -791,7 +790,7 @@ public: void GetCompatibilityCurrency( String& rSymbol, String& rAbbrev ) const; /// Fill rList with the language/country codes that have been allocated - void GetUsedLanguages( SvUShorts& rList ); + void GetUsedLanguages( std::vector<sal_uInt16>& rList ); /// Fill a <type>NfKeywordIndex</type> table with keywords of a language/country void FillKeywordTable( NfKeywordTable& rKeywords, LanguageType eLang ); diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index bb12e31875bf..8a9a3d5e756d 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -886,12 +886,11 @@ sal_Bool SvNumberFormatter::Load( SvStream& rStream ) // generate additional i18n standard formats for all used locales LanguageType eOldLanguage = ActLnge; NumberFormatCodeWrapper aNumberFormatCode( xServiceManager, GetLocale() ); - SvUShorts aList; + std::vector<sal_uInt16> aList; GetUsedLanguages( aList ); - sal_uInt16 nCount = aList.Count(); - for ( sal_uInt16 j=0; j<nCount; j++ ) + for ( std::vector<sal_uInt16>::const_iterator it(aList.begin()); it != aList.end(); ++it ) { - LanguageType eLang = aList[j]; + LanguageType eLang = *it; ChangeIntl( eLang ); sal_uInt32 CLOffset = ImpGetCLOffset( eLang ); ImpGenerateAdditionalFormats( CLOffset, aNumberFormatCode, sal_True ); @@ -941,16 +940,16 @@ sal_Bool SvNumberFormatter::Save( SvStream& rStream ) const return sal_True; } -void SvNumberFormatter::GetUsedLanguages( SvUShorts& rList ) +void SvNumberFormatter::GetUsedLanguages( std::vector<sal_uInt16>& rList ) { - rList.Remove( 0, rList.Count() ); + rList.clear(); sal_uInt32 nOffset = 0; while (nOffset <= MaxCLOffset) { SvNumberformat* pFormat = (SvNumberformat*) aFTable.Get(nOffset); if (pFormat) - rList.Insert( pFormat->GetLanguage(), rList.Count() ); + rList.push_back( pFormat->GetLanguage() ); nOffset += SV_COUNTRY_LANGUAGE_OFFSET; } } |