From 01b3628d420ed30b5c61376f4f5fcb491a5aa0a1 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Wed, 3 Nov 2010 15:49:08 +0100 Subject: removetooltypes01: #i112600# remove tooltypes from idl, and other small changes --- idl/source/cmptools/hash.cxx | 60 ++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'idl/source/cmptools/hash.cxx') diff --git a/idl/source/cmptools/hash.cxx b/idl/source/cmptools/hash.cxx index 0c7985e05ec3..cf78e9664233 100644 --- a/idl/source/cmptools/hash.cxx +++ b/idl/source/cmptools/hash.cxx @@ -55,7 +55,7 @@ SvStringHashEntry::~SvStringHashEntry() { }; |* Beschreibung |* *************************************************************************/ -SvHashTable::SvHashTable( UINT32 nMaxEntries ) +SvHashTable::SvHashTable( sal_uInt32 nMaxEntries ) { nMax = nMaxEntries; // set max entries nFill = 0; // no entries @@ -87,12 +87,12 @@ SvHashTable::~SvHashTable() |* Beschreibung |* *************************************************************************/ -BOOL SvHashTable::Test_Insert( const void * pElement, BOOL bInsert, - UINT32 * pInsertPos ) +sal_Bool SvHashTable::Test_Insert( const void * pElement, sal_Bool bInsert, + sal_uInt32 * pInsertPos ) { - UINT32 nHash; - UINT32 nIndex; - UINT32 nLoop; + sal_uInt32 nHash; + sal_uInt32 nIndex; + sal_uInt32 nLoop; lAsk++; lTry++; @@ -110,11 +110,11 @@ BOOL SvHashTable::Test_Insert( const void * pElement, BOOL bInsert, { if( pInsertPos ) *pInsertPos = nIndex; // place of Element - return TRUE; + return sal_True; } nLoop++; lTry++; - nIndex = (USHORT)(nIndex + nHash + 7) % nMax; + nIndex = (sal_uInt16)(nIndex + nHash + 7) % nMax; } if( bInsert ) @@ -124,10 +124,10 @@ BOOL SvHashTable::Test_Insert( const void * pElement, BOOL bInsert, { nFill++; *pInsertPos = nIndex; // return free place - return TRUE; + return sal_True; } } - return( FALSE ); + return( sal_False ); } /************************************************************************/ @@ -138,11 +138,11 @@ BOOL SvHashTable::Test_Insert( const void * pElement, BOOL bInsert, |* Beschreibung |* *************************************************************************/ -SvStringHashTable::SvStringHashTable( UINT32 nMaxEntries ) +SvStringHashTable::SvStringHashTable( sal_uInt32 nMaxEntries ) : SvHashTable( nMaxEntries ) { #ifdef WIN - DBG_ASSERT( (UINT32)nMaxEntries * sizeof( SvStringHashEntry ) <= 0xFF00, + DBG_ASSERT( (sal_uInt32)nMaxEntries * sizeof( SvStringHashEntry ) <= 0xFF00, "Hash table size cannot exeed 64k byte" ) #endif pEntries = new SvStringHashEntry[ nMaxEntries ]; @@ -181,7 +181,7 @@ SvStringHashTable::~SvStringHashTable() #ifdef MPW // der MPW-Compiler ruft sonst keine Dtoren! - for ( USHORT n = 0; n < GetMax(); ++n ) + for ( sal_uInt16 n = 0; n < GetMax(); ++n ) (pEntries+n)->SvStringHashEntry::~SvStringHashEntry(); delete (void*) pEntries; #else @@ -196,18 +196,18 @@ SvStringHashTable::~SvStringHashTable() |* Beschreibung |* *************************************************************************/ -UINT32 SvStringHashTable::HashFunc( const void * pElement ) const +sal_uInt32 SvStringHashTable::HashFunc( const void * pElement ) const { - UINT32 nHash = 0; // hash value + sal_uInt32 nHash = 0; // hash value const char * pStr = ((const ByteString * )pElement)->GetBuffer(); int nShift = 0; while( *pStr ) { if( isupper( *pStr ) ) - nHash ^= UINT32(*pStr - 'A' + 26) << nShift; + nHash ^= sal_uInt32(*pStr - 'A' + 26) << nShift; else - nHash ^= UINT32(*pStr - 'a') << nShift; + nHash ^= sal_uInt32(*pStr - 'a') << nShift; if( nShift == 28 ) nShift = 0; else @@ -226,7 +226,7 @@ UINT32 SvStringHashTable::HashFunc( const void * pElement ) const *************************************************************************/ ByteString SvStringHashTable::GetNearString( const ByteString & rName ) const { - for( UINT32 i = 0; i < GetMax(); i++ ) + for( sal_uInt32 i = 0; i < GetMax(); i++ ) { SvStringHashEntry * pE = Get( i ); if( pE ) @@ -245,10 +245,10 @@ ByteString SvStringHashTable::GetNearString( const ByteString & rName ) const |* Beschreibung |* *************************************************************************/ -BOOL SvStringHashTable::IsEntry( UINT32 nIndex ) const +sal_Bool SvStringHashTable::IsEntry( sal_uInt32 nIndex ) const { if( nIndex >= GetMax() ) - return FALSE; + return sal_False; return pEntries[ nIndex ].HasId(); } @@ -259,18 +259,18 @@ BOOL SvStringHashTable::IsEntry( UINT32 nIndex ) const |* Beschreibung |* *************************************************************************/ -BOOL SvStringHashTable::Insert( const ByteString & rName, UINT32 * pIndex ) +sal_Bool SvStringHashTable::Insert( const ByteString & rName, sal_uInt32 * pIndex ) { - UINT32 nIndex; + sal_uInt32 nIndex; if( !pIndex ) pIndex = &nIndex; - if( !SvHashTable::Test_Insert( &rName, TRUE, pIndex ) ) - return FALSE; + if( !SvHashTable::Test_Insert( &rName, sal_True, pIndex ) ) + return sal_False; if( !IsEntry( *pIndex ) ) pEntries[ *pIndex ] = SvStringHashEntry( rName, *pIndex ); - return TRUE; + return sal_True; } /************************************************************************* @@ -280,10 +280,10 @@ BOOL SvStringHashTable::Insert( const ByteString & rName, UINT32 * pIndex ) |* Beschreibung |* *************************************************************************/ -BOOL SvStringHashTable::Test( const ByteString & rName, UINT32 * pPos ) const +sal_Bool SvStringHashTable::Test( const ByteString & rName, sal_uInt32 * pPos ) const { return ((SvStringHashTable *)this)->SvHashTable:: - Test_Insert( &rName, FALSE, pPos ); + Test_Insert( &rName, sal_False, pPos ); } /************************************************************************* @@ -293,7 +293,7 @@ BOOL SvStringHashTable::Test( const ByteString & rName, UINT32 * pPos ) const |* Beschreibung |* *************************************************************************/ -SvStringHashEntry * SvStringHashTable::Get( UINT32 nIndex ) const +SvStringHashEntry * SvStringHashTable::Get( sal_uInt32 nIndex ) const { if( IsEntry( nIndex ) ) return pEntries + nIndex; @@ -308,7 +308,7 @@ SvStringHashEntry * SvStringHashTable::Get( UINT32 nIndex ) const |* *************************************************************************/ StringCompare SvStringHashTable::Compare( const void * pElement, - UINT32 nIndex ) const + sal_uInt32 nIndex ) const { return ((const ByteString *)pElement)->CompareTo( pEntries[ nIndex ].GetName() ); } @@ -322,7 +322,7 @@ StringCompare SvStringHashTable::Compare( const void * pElement, *************************************************************************/ void SvStringHashTable::FillHashList( SvStringHashList * pList ) const { - for( UINT32 n = 0; n < GetMax(); n++ ) + for( sal_uInt32 n = 0; n < GetMax(); n++ ) { if( IsEntry( n ) ) pList->Insert( Get( n ), LIST_APPEND ); -- cgit From d0097a3f35e5e2c68d293d604a2f6f51b2d822a5 Mon Sep 17 00:00:00 2001 From: Xiaofei Zhang Date: Mon, 8 Nov 2010 15:11:38 +0800 Subject: removetooltypes01: #i112600# remove tooltypes from toolkit, svtools and framework --- idl/source/cmptools/hash.cxx | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 idl/source/cmptools/hash.cxx (limited to 'idl/source/cmptools/hash.cxx') diff --git a/idl/source/cmptools/hash.cxx b/idl/source/cmptools/hash.cxx old mode 100644 new mode 100755 -- cgit From d1b478f18dee26565d638054f54fabd5ac87c346 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Thu, 13 Jan 2011 09:32:03 +0100 Subject: removetooltypes01: #i112600# Exchange misleading sal_uIntPtr with sal_uLong in idl --- idl/source/cmptools/hash.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'idl/source/cmptools/hash.cxx') diff --git a/idl/source/cmptools/hash.cxx b/idl/source/cmptools/hash.cxx index c212289823ed..f919a1074efa 100755 --- a/idl/source/cmptools/hash.cxx +++ b/idl/source/cmptools/hash.cxx @@ -34,7 +34,7 @@ #include #include -// Programmabh„ngige Includes. +// Programmabh�ngige Includes. #include #include @@ -73,8 +73,8 @@ SvHashTable::SvHashTable( sal_uInt32 nMaxEntries ) SvHashTable::~SvHashTable() { #ifdef DOS_NIE - printf( "Maximum: %ld, Fllung: %ld\n", (sal_uIntPtr)nMax, (sal_uIntPtr)nFill ); - printf( "Anfragen: %ld, Versuche: %ld", (sal_uIntPtr)lAsk, (sal_uIntPtr)lTry ); + printf( "Maximum: %ld, F�llung: %ld\n", (sal_uLong)nMax, (sal_uLong)nFill ); + printf( "Anfragen: %ld, Versuche: %ld", (sal_uLong)lAsk, (sal_uLong)lTry ); if( lTry != 0 ) printf( ", V/E = %ld\n", lTry / lAsk ); #endif -- cgit