diff options
author | Xiaofei Zhang <Zhangxiaofei@openoffice.org> | 2010-07-29 10:56:19 +0800 |
---|---|---|
committer | Xiaofei Zhang <Zhangxiaofei@openoffice.org> | 2010-07-29 10:56:19 +0800 |
commit | d210c6ccc30466e98240c1409df0550514668d68 (patch) | |
tree | 0c94d52ecaebd283a92275cb372d5ddf926f5131 /svl/source/items/aeitem.cxx | |
parent | 7f0993d43019a0ccb7f89c11fc23704c063b902f (diff) |
#i112600#: clean up l10ntools, rsc, sot, svl, tools and unotools
Diffstat (limited to 'svl/source/items/aeitem.cxx')
-rw-r--r-- | svl/source/items/aeitem.cxx | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/svl/source/items/aeitem.cxx b/svl/source/items/aeitem.cxx index 36445162424b..370a3ebeb44e 100644 --- a/svl/source/items/aeitem.cxx +++ b/svl/source/items/aeitem.cxx @@ -47,7 +47,7 @@ TYPEINIT1_AUTOFACTORY(SfxAllEnumItem, SfxEnumItem) struct SfxAllEnumValue_Impl { - USHORT nValue; + sal_uInt16 nValue; XubString aText; }; @@ -63,7 +63,7 @@ SfxAllEnumItem::SfxAllEnumItem() : { } -SfxAllEnumItem::SfxAllEnumItem( USHORT which, USHORT nVal, const XubString &rText ): +SfxAllEnumItem::SfxAllEnumItem( sal_uInt16 which, sal_uInt16 nVal, const XubString &rText ): SfxEnumItem(which, nVal), pValues( 0 ), pDisabledValues( 0 ) @@ -74,7 +74,7 @@ SfxAllEnumItem::SfxAllEnumItem( USHORT which, USHORT nVal, const XubString &rTex // ----------------------------------------------------------------------- -SfxAllEnumItem::SfxAllEnumItem(USHORT which, USHORT nVal): +SfxAllEnumItem::SfxAllEnumItem(sal_uInt16 which, sal_uInt16 nVal): SfxEnumItem(which, nVal), pValues( 0 ), pDisabledValues( 0 ) @@ -85,7 +85,7 @@ SfxAllEnumItem::SfxAllEnumItem(USHORT which, USHORT nVal): // ----------------------------------------------------------------------- -SfxAllEnumItem::SfxAllEnumItem( USHORT which, SvStream &rStream ): +SfxAllEnumItem::SfxAllEnumItem( sal_uInt16 which, SvStream &rStream ): SfxEnumItem(which, rStream), pValues( 0 ), pDisabledValues( 0 ) @@ -97,7 +97,7 @@ SfxAllEnumItem::SfxAllEnumItem( USHORT which, SvStream &rStream ): // ----------------------------------------------------------------------- -SfxAllEnumItem::SfxAllEnumItem(USHORT which): +SfxAllEnumItem::SfxAllEnumItem(sal_uInt16 which): SfxEnumItem(which, 0), pValues( 0 ), pDisabledValues( 0 ) @@ -119,7 +119,7 @@ SfxAllEnumItem::SfxAllEnumItem(const SfxAllEnumItem &rCopy): pValues = new SfxAllEnumValueArr; - for ( USHORT nPos = 0; nPos < rCopy.pValues->Count(); ++nPos ) + for ( sal_uInt16 nPos = 0; nPos < rCopy.pValues->Count(); ++nPos ) { SfxAllEnumValue_Impl *pVal = new SfxAllEnumValue_Impl; pVal->nValue = rCopy.pValues->GetObject(nPos)->nValue; @@ -131,7 +131,7 @@ SfxAllEnumItem::SfxAllEnumItem(const SfxAllEnumItem &rCopy): if( rCopy.pDisabledValues ) { pDisabledValues = new SvUShorts; - for ( USHORT nPos = 0; nPos < rCopy.pDisabledValues->Count(); ++nPos ) + for ( sal_uInt16 nPos = 0; nPos < rCopy.pDisabledValues->Count(); ++nPos ) { pDisabledValues->Insert( rCopy.pDisabledValues->GetObject(nPos), nPos ); @@ -150,7 +150,7 @@ SfxAllEnumItem::~SfxAllEnumItem() // ----------------------------------------------------------------------- -USHORT SfxAllEnumItem::GetValueCount() const +sal_uInt16 SfxAllEnumItem::GetValueCount() const { DBG_CHKTHIS(SfxAllEnumItem, 0); return pValues ? pValues->Count() : 0; @@ -158,7 +158,7 @@ USHORT SfxAllEnumItem::GetValueCount() const // ----------------------------------------------------------------------- -XubString SfxAllEnumItem::GetValueTextByPos( USHORT nPos ) const +XubString SfxAllEnumItem::GetValueTextByPos( sal_uInt16 nPos ) const { DBG_CHKTHIS(SfxAllEnumItem, 0); DBG_ASSERT( pValues && nPos < pValues->Count(), "enum overflow" ); @@ -167,7 +167,7 @@ XubString SfxAllEnumItem::GetValueTextByPos( USHORT nPos ) const // ----------------------------------------------------------------------- -USHORT SfxAllEnumItem::GetValueByPos( USHORT nPos ) const +sal_uInt16 SfxAllEnumItem::GetValueByPos( sal_uInt16 nPos ) const { DBG_CHKTHIS(SfxAllEnumItem, 0); DBG_ASSERT( pValues && nPos < pValues->Count(), "enum overflow" ); @@ -184,7 +184,7 @@ SfxPoolItem* SfxAllEnumItem::Clone( SfxItemPool * ) const // ----------------------------------------------------------------------- -SfxPoolItem* SfxAllEnumItem::Create( SvStream & rStream, USHORT ) const +SfxPoolItem* SfxAllEnumItem::Create( SvStream & rStream, sal_uInt16 ) const { DBG_CHKTHIS(SfxAllEnumItem, 0); return new SfxAllEnumItem( Which(), rStream ); @@ -193,11 +193,11 @@ SfxPoolItem* SfxAllEnumItem::Create( SvStream & rStream, USHORT ) const // ----------------------------------------------------------------------- -USHORT SfxAllEnumItem::_GetPosByValue( USHORT nVal ) const +sal_uInt16 SfxAllEnumItem::_GetPosByValue( sal_uInt16 nVal ) const /* [Beschreibung] - Im Ggs. zu <SfxEnumItemInterface::GetPosByValue(USHORT)const> liefert + Im Ggs. zu <SfxEnumItemInterface::GetPosByValue(sal_uInt16)const> liefert diese interne Methode bei nicht vorhandenen Values die Position, an der der Wert liegen w"urde. */ @@ -209,7 +209,7 @@ USHORT SfxAllEnumItem::_GetPosByValue( USHORT nVal ) const return 0; //!O: binaere Suche oder SortArray verwenden - USHORT nPos; + sal_uInt16 nPos; for ( nPos = 0; nPos < pValues->Count(); ++nPos ) if ( pValues->GetObject(nPos)->nValue >= nVal ) return nPos; @@ -218,11 +218,11 @@ USHORT SfxAllEnumItem::_GetPosByValue( USHORT nVal ) const // ----------------------------------------------------------------------- -USHORT SfxAllEnumItem::GetPosByValue( USHORT nValue ) const +sal_uInt16 SfxAllEnumItem::GetPosByValue( sal_uInt16 nValue ) const /* [Beschreibung] - Liefert im Gegensatz zu <SfxEnumItemInterface::GetPosByValue(USHORT)const> + Liefert im Gegensatz zu <SfxEnumItemInterface::GetPosByValue(sal_uInt16)const> immer nValue zur"uck, solange nicht mindestens ein Wert mit einer der Methoden <SfxAllEnumItem::InsertValue()> eingef"ugt wurde. */ @@ -238,7 +238,7 @@ USHORT SfxAllEnumItem::GetPosByValue( USHORT nValue ) const // ----------------------------------------------------------------------- -void SfxAllEnumItem::InsertValue( USHORT nValue, const XubString &rValue ) +void SfxAllEnumItem::InsertValue( sal_uInt16 nValue, const XubString &rValue ) { DBG_CHKTHIS(SfxAllEnumItem, 0); SfxAllEnumValue_Impl *pVal = new SfxAllEnumValue_Impl; @@ -256,7 +256,7 @@ void SfxAllEnumItem::InsertValue( USHORT nValue, const XubString &rValue ) // ----------------------------------------------------------------------- -void SfxAllEnumItem::InsertValue( USHORT nValue ) +void SfxAllEnumItem::InsertValue( sal_uInt16 nValue ) { DBG_CHKTHIS(SfxAllEnumItem, 0); SfxAllEnumValue_Impl *pVal = new SfxAllEnumValue_Impl; @@ -269,7 +269,7 @@ void SfxAllEnumItem::InsertValue( USHORT nValue ) pValues->Insert( pTemp, _GetPosByValue(nValue) ); //! doppelte?! } -void SfxAllEnumItem::DisableValue( USHORT nValue ) +void SfxAllEnumItem::DisableValue( sal_uInt16 nValue ) { DBG_CHKTHIS(SfxAllEnumItem, 0); if ( !pDisabledValues ) @@ -278,24 +278,24 @@ void SfxAllEnumItem::DisableValue( USHORT nValue ) pDisabledValues->Insert( nValue, pDisabledValues->Count() ); } -BOOL SfxAllEnumItem::IsEnabled( USHORT nValue ) const +sal_Bool SfxAllEnumItem::IsEnabled( sal_uInt16 nValue ) const { if ( pDisabledValues ) { - for ( USHORT i=0; i<pDisabledValues->Count(); i++ ) + for ( sal_uInt16 i=0; i<pDisabledValues->Count(); i++ ) if ( (*pDisabledValues)[i] == nValue ) - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- -void SfxAllEnumItem::RemoveValue( USHORT nValue ) +void SfxAllEnumItem::RemoveValue( sal_uInt16 nValue ) { DBG_CHKTHIS(SfxAllEnumItem, 0); - USHORT nPos = GetPosByValue(nValue); + sal_uInt16 nPos = GetPosByValue(nValue); DBG_ASSERT( nPos != USHRT_MAX, "removing value not in enum" ); pValues->Remove( nPos ); } |