diff options
Diffstat (limited to 'svx/source/items/clipfmtitem.cxx')
-rw-r--r-- | svx/source/items/clipfmtitem.cxx | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/svx/source/items/clipfmtitem.cxx b/svx/source/items/clipfmtitem.cxx index bc3ca621635b..f65c9bbf6df4 100644 --- a/svx/source/items/clipfmtitem.cxx +++ b/svx/source/items/clipfmtitem.cxx @@ -53,7 +53,7 @@ SvxClipboardFmtItem_Impl::SvxClipboardFmtItem_Impl( const SvxClipboardFmtItem_Impl& rCpy ) { aFmtIds.Insert( &rCpy.aFmtIds, 0 ); - for( USHORT n = 0, nEnd = rCpy.aFmtNms.Count(); n < nEnd; ++n ) + for( sal_uInt16 n = 0, nEnd = rCpy.aFmtNms.Count(); n < nEnd; ++n ) { String* pStr = rCpy.aFmtNms[ n ]; if( pStr ) @@ -62,7 +62,7 @@ SvxClipboardFmtItem_Impl::SvxClipboardFmtItem_Impl( } } -SvxClipboardFmtItem::SvxClipboardFmtItem( USHORT nId ) +SvxClipboardFmtItem::SvxClipboardFmtItem( sal_uInt16 nId ) : SfxPoolItem( nId ), pImpl( new SvxClipboardFmtItem_Impl ) { } @@ -78,35 +78,35 @@ SvxClipboardFmtItem::~SvxClipboardFmtItem() delete pImpl; } -BOOL SvxClipboardFmtItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) const +sal_Bool SvxClipboardFmtItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const { - USHORT nCount = Count(); + sal_uInt16 nCount = Count(); ::com::sun::star::frame::status::ClipboardFormats aClipFormats; aClipFormats.Identifiers.realloc( nCount ); aClipFormats.Names.realloc( nCount ); - for ( USHORT n=0; n < nCount; n++ ) + for ( sal_uInt16 n=0; n < nCount; n++ ) { aClipFormats.Identifiers[n] = (sal_Int64)GetClipbrdFormatId( n ); aClipFormats.Names[n] = GetClipbrdFormatName( n ); } rVal <<= aClipFormats; - return TRUE; + return sal_True; } -sal_Bool SvxClipboardFmtItem::PutValue( const ::com::sun::star::uno::Any& rVal, BYTE /*nMemberId*/ ) +sal_Bool SvxClipboardFmtItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) { ::com::sun::star::frame::status::ClipboardFormats aClipFormats; if ( rVal >>= aClipFormats ) { - USHORT nCount = USHORT( aClipFormats.Identifiers.getLength() ); + sal_uInt16 nCount = sal_uInt16( aClipFormats.Identifiers.getLength() ); pImpl->aFmtIds.Remove( 0, pImpl->aFmtIds.Count() ); pImpl->aFmtNms.Remove( 0, pImpl->aFmtNms.Count() ); - for ( USHORT n=0; n < nCount; n++ ) - AddClipbrdFormat( ULONG( aClipFormats.Identifiers[n] ), aClipFormats.Names[n], n ); + for ( sal_uInt16 n=0; n < nCount; n++ ) + AddClipbrdFormat( sal_uIntPtr( aClipFormats.Identifiers[n] ), aClipFormats.Names[n], n ); return sal_True; } @@ -122,7 +122,7 @@ int SvxClipboardFmtItem::operator==( const SfxPoolItem& rComp ) const { nRet = 1; const String* pStr1, *pStr2; - for( USHORT n = 0, nEnd = rCmp.pImpl->aFmtNms.Count(); n < nEnd; ++n ) + for( sal_uInt16 n = 0, nEnd = rCmp.pImpl->aFmtNms.Count(); n < nEnd; ++n ) { if( pImpl->aFmtIds[ n ] != rCmp.pImpl->aFmtIds[ n ] || ( (0 == ( pStr1 = pImpl->aFmtNms[ n ] )) ^ @@ -142,7 +142,7 @@ SfxPoolItem* SvxClipboardFmtItem::Clone( SfxItemPool * /*pPool*/ ) const return new SvxClipboardFmtItem( *this ); } -void SvxClipboardFmtItem::AddClipbrdFormat( ULONG nId, USHORT nPos ) +void SvxClipboardFmtItem::AddClipbrdFormat( sal_uIntPtr nId, sal_uInt16 nPos ) { if( nPos > pImpl->aFmtNms.Count() ) nPos = pImpl->aFmtNms.Count(); @@ -151,8 +151,8 @@ void SvxClipboardFmtItem::AddClipbrdFormat( ULONG nId, USHORT nPos ) pImpl->aFmtIds.Insert( nId, nPos ); } -void SvxClipboardFmtItem::AddClipbrdFormat( ULONG nId, const String& rName, - USHORT nPos ) +void SvxClipboardFmtItem::AddClipbrdFormat( sal_uIntPtr nId, const String& rName, + sal_uInt16 nPos ) { if( nPos > pImpl->aFmtNms.Count() ) nPos = pImpl->aFmtNms.Count(); @@ -161,17 +161,17 @@ void SvxClipboardFmtItem::AddClipbrdFormat( ULONG nId, const String& rName, pImpl->aFmtIds.Insert( nId, nPos ); } -USHORT SvxClipboardFmtItem::Count() const +sal_uInt16 SvxClipboardFmtItem::Count() const { return pImpl->aFmtIds.Count(); } -ULONG SvxClipboardFmtItem::GetClipbrdFormatId( USHORT nPos ) const +sal_uIntPtr SvxClipboardFmtItem::GetClipbrdFormatId( sal_uInt16 nPos ) const { return pImpl->aFmtIds[ nPos ]; } -const String& SvxClipboardFmtItem::GetClipbrdFormatName( USHORT nPos ) const +const String& SvxClipboardFmtItem::GetClipbrdFormatName( sal_uInt16 nPos ) const { const String* pS = pImpl->aFmtNms[ nPos ]; return pS ? *pS : SvxClipboardFmtItem_Impl::sEmptyStr; |