diff options
author | Nigel Hawkins <n.hawkins@gmx.com> | 2011-08-09 15:23:32 +0100 |
---|---|---|
committer | Nigel Hawkins <n.hawkins@gmx.com> | 2011-08-09 15:23:32 +0100 |
commit | bb8ea3fc5f69522073a490782e99c81aed96d02f (patch) | |
tree | 05dea5b84a7536992b95cd0608da6f85f3baa31b /svl/source/items/aeitem.cxx | |
parent | 79f5abe3fde96a5537f0d80e0919c80d241f63a8 (diff) |
Replace SvUShorts with vector in aeitem.[ch]xx
LGPLv3+/MPL1.1
Diffstat (limited to 'svl/source/items/aeitem.cxx')
-rw-r--r-- | svl/source/items/aeitem.cxx | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/svl/source/items/aeitem.cxx b/svl/source/items/aeitem.cxx index e45c6acbaa26..e81c67d2d041 100644 --- a/svl/source/items/aeitem.cxx +++ b/svl/source/items/aeitem.cxx @@ -31,8 +31,6 @@ #include <tools/string.hxx> -#define _SVSTDARR_USHORTS -#include <svl/svstdarr.hxx> #include <svl/svarray.hxx> #include <svl/aeitem.hxx> @@ -129,12 +127,7 @@ SfxAllEnumItem::SfxAllEnumItem(const SfxAllEnumItem &rCopy): if( rCopy.pDisabledValues ) { - pDisabledValues = new SvUShorts; - for ( sal_uInt16 nPos = 0; nPos < rCopy.pDisabledValues->Count(); ++nPos ) - { - pDisabledValues->Insert( rCopy.pDisabledValues->GetObject(nPos), - nPos ); - } + pDisabledValues = new std::vector<sal_uInt16>( *(rCopy.pDisabledValues) ); } } @@ -272,16 +265,16 @@ void SfxAllEnumItem::DisableValue( sal_uInt16 nValue ) { DBG_CHKTHIS(SfxAllEnumItem, 0); if ( !pDisabledValues ) - pDisabledValues = new SvUShorts; + pDisabledValues = new std::vector<sal_uInt16>; - pDisabledValues->Insert( nValue, pDisabledValues->Count() ); + pDisabledValues->push_back( nValue ); } sal_Bool SfxAllEnumItem::IsEnabled( sal_uInt16 nValue ) const { if ( pDisabledValues ) { - for ( sal_uInt16 i=0; i<pDisabledValues->Count(); i++ ) + for ( size_t i=0; i<pDisabledValues->size(); i++ ) if ( (*pDisabledValues)[i] == nValue ) return sal_False; } |