diff options
Diffstat (limited to 'tools/source/communi/geninfo.cxx')
-rw-r--r-- | tools/source/communi/geninfo.cxx | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/tools/source/communi/geninfo.cxx b/tools/source/communi/geninfo.cxx index 97326836de2d..01a325054a69 100644 --- a/tools/source/communi/geninfo.cxx +++ b/tools/source/communi/geninfo.cxx @@ -55,7 +55,7 @@ GenericInformation::GenericInformation( const ByteString &rKey, /*****************************************************************************/ GenericInformation::GenericInformation( const GenericInformation& rInf, - BOOL bCopySubs) + sal_Bool bCopySubs) /*****************************************************************************/ : ByteString( rInf ), sValue( rInf.sValue ), @@ -80,15 +80,15 @@ GenericInformation::~GenericInformation() } /*****************************************************************************/ -BOOL GenericInformation::InsertSubInfo( GenericInformation *pInfo ) +sal_Bool GenericInformation::InsertSubInfo( GenericInformation *pInfo ) /*****************************************************************************/ { return ( pInfoList && pInfoList->InsertInfo( pInfo )); } /*****************************************************************************/ -BOOL GenericInformation::InsertSubInfo( const ByteString &rPathKey, const ByteString &rValue, - BOOL bSearchByPath, BOOL bNewPath ) +sal_Bool GenericInformation::InsertSubInfo( const ByteString &rPathKey, const ByteString &rValue, + sal_Bool bSearchByPath, sal_Bool bNewPath ) /*****************************************************************************/ { return (pInfoList && pInfoList->InsertInfo( rPathKey, rValue, bSearchByPath, bNewPath )); @@ -96,14 +96,14 @@ BOOL GenericInformation::InsertSubInfo( const ByteString &rPathKey, const ByteSt /*****************************************************************************/ void GenericInformation::RemoveSubInfo( GenericInformation *pInfo, - BOOL bDelete ) + sal_Bool bDelete ) /*****************************************************************************/ { pInfoList->RemoveInfo( pInfo, bDelete ); } /*****************************************************************************/ -//void GenericInformation::RemoveSelf( BOOL bDelete ) +//void GenericInformation::RemoveSelf( sal_Bool bDelete ) /*****************************************************************************/ /*{ if ( pParent ) @@ -118,8 +118,8 @@ void GenericInformation::RemoveSubInfo( GenericInformation *pInfo, /*****************************************************************************/ GenericInformation *GenericInformation::GetSubInfo( ByteString &rKey, - BOOL bSearchByPath, - BOOL bCreatePath ) + sal_Bool bSearchByPath, + sal_Bool bCreatePath ) /*****************************************************************************/ { if ( !pInfoList && bCreatePath ) @@ -147,7 +147,7 @@ GenericInformationList::GenericInformationList(const GenericInformationList& rLi /*****************************************************************************/ : GenericInformationList_Impl() { - USHORT i; + sal_uInt16 i; GenericInformation* pTemp,*pWork; pOwner = pParent; @@ -155,7 +155,7 @@ GenericInformationList::GenericInformationList(const GenericInformationList& rLi for(i=0;i<rList.Count();i++) { pTemp = rList.GetObject(i); - pWork = new GenericInformation(*pTemp,TRUE); + pWork = new GenericInformation(*pTemp,sal_True); Insert(pWork,LIST_APPEND); } @@ -167,7 +167,7 @@ GenericInformationList::~GenericInformationList() { // delete all Informations stored in this List // ### GH: Hier werden dann wohl etwa die H�lfte der Eintr�ge gel�scht -/* for ( ULONG i = 0; i < Count(); i++ ) { +/* for ( sal_uIntPtr i = 0; i < Count(); i++ ) { GetObject( i )->ListDeleted(); delete GetObject( i ); Remove( i );*/ @@ -175,13 +175,13 @@ GenericInformationList::~GenericInformationList() while ( Count() ) { GetObject( 0 )->ListDeleted(); delete GetObject( 0 ); - Remove( (ULONG)0 ); + Remove( (sal_uIntPtr)0 ); } } /*****************************************************************************/ -GenericInformation *GenericInformationList::Search( ULONG &rPos, ByteString sKey, - ULONG nStart, ULONG nEnd ) +GenericInformation *GenericInformationList::Search( sal_uIntPtr &rPos, ByteString sKey, + sal_uIntPtr nStart, sal_uIntPtr nEnd ) /*****************************************************************************/ { if ( Count() == 0 ) { @@ -202,7 +202,7 @@ GenericInformation *GenericInformationList::Search( ULONG &rPos, ByteString sKey } // search binary in existing list - ULONG nActPos = nStart + (( nEnd - nStart ) / 2 ); + sal_uIntPtr nActPos = nStart + (( nEnd - nStart ) / 2 ); rPos = nActPos; ByteString sCandidate = ByteString( *GetObject( nActPos )); @@ -218,8 +218,8 @@ GenericInformation *GenericInformationList::Search( ULONG &rPos, ByteString sKey /*****************************************************************************/ GenericInformation *GenericInformationList::GetInfo( ByteString &rKey, - BOOL bSearchByPath, - BOOL bCreatePath ) + sal_Bool bSearchByPath, + sal_Bool bCreatePath ) /*****************************************************************************/ { @@ -232,7 +232,7 @@ GenericInformation *GenericInformationList::GetInfo( ByteString &rKey, else sKey = rKey; - ULONG nPos = 0; + sal_uIntPtr nPos = 0; GenericInformation *pReturnInfo = Search( nPos, sKey, 0, Count() - 1 ); /* wenn kein Searchpath gesetzt und kein Returninfo vorhanden, * gib NULL zurueck @@ -241,7 +241,7 @@ GenericInformation *GenericInformationList::GetInfo( ByteString &rKey, * wenn searchpath gesetzt kein returninfo vorhanden und newpath gesetzt, * mache neues Verzeichniss */ - USHORT nTokenCount = rKey.GetTokenCount('/'); + sal_uInt16 nTokenCount = rKey.GetTokenCount('/'); // search for next key of path in next level of tree if ( bSearchByPath && (nTokenCount > 1)) { ByteString sPath = ByteString(rKey.Copy( sKey.Len() + 1 )); @@ -251,7 +251,7 @@ GenericInformation *GenericInformationList::GetInfo( ByteString &rKey, pReturnInfo = new GenericInformation( sKey, "", this, NULL); pReturnInfo->SetSubList( new GenericInformationList( pReturnInfo )); } - return pReturnInfo->GetSubInfo( sPath, TRUE, bCreatePath ); + return pReturnInfo->GetSubInfo( sPath, sal_True, bCreatePath ); } if ( !pReturnInfo && bCreatePath ) { pReturnInfo = new GenericInformation ( sKey, "", this, NULL); @@ -261,9 +261,9 @@ GenericInformation *GenericInformationList::GetInfo( ByteString &rKey, } /*****************************************************************************/ -ULONG GenericInformationList::InsertSorted( GenericInformation *pInfo, - BOOL bOverwrite, - ULONG nStart, ULONG nEnd ) +sal_uIntPtr GenericInformationList::InsertSorted( GenericInformation *pInfo, + sal_Bool bOverwrite, + sal_uIntPtr nStart, sal_uIntPtr nEnd ) /*****************************************************************************/ { if ( Count() == 0 ) { @@ -292,11 +292,11 @@ ULONG GenericInformationList::InsertSorted( GenericInformation *pInfo, if ( sCandidate.ToUpperAscii() == sKey ) { // key allready exists in list if ( bOverwrite ) - Replace( pInfo, ULONG(0)); // ### Laut NF scheint hier ein Memory Leak zu sein + Replace( pInfo, sal_uIntPtr(0)); // ### Laut NF scheint hier ein Memory Leak zu sein return 0; } else if ( sCandidate > sKey ) { - Insert( pInfo, ULONG(0)); + Insert( pInfo, sal_uIntPtr(0)); return 0; } else { @@ -306,7 +306,7 @@ ULONG GenericInformationList::InsertSorted( GenericInformation *pInfo, } // ### GH: /ENDE/ dieser Block schein �berfl�ssig zu sein - ULONG nActPos = nStart + (( nEnd - nStart ) / 2 ); + sal_uIntPtr nActPos = nStart + (( nEnd - nStart ) / 2 ); ByteString sCandidate = ByteString( *GetObject( nActPos )); if ( sCandidate.ToUpperAscii() == sKey ) { @@ -348,21 +348,21 @@ ULONG GenericInformationList::InsertSorted( GenericInformation *pInfo, } /*****************************************************************************/ -BOOL GenericInformationList::InsertInfo( GenericInformation *pInfo, - BOOL bOverwrite ) +sal_Bool GenericInformationList::InsertInfo( GenericInformation *pInfo, + sal_Bool bOverwrite ) /*****************************************************************************/ { if ( !pInfo->Len()) - return FALSE; + return sal_False; InsertSorted( pInfo, bOverwrite, 0, Count() - 1 ); - return TRUE; + return sal_True; } /*****************************************************************************/ -BOOL GenericInformationList::InsertInfo( const ByteString &rPathKey, const ByteString &rValue, - BOOL bSearchByPath, BOOL bNewPath ) +sal_Bool GenericInformationList::InsertInfo( const ByteString &rPathKey, const ByteString &rValue, + sal_Bool bSearchByPath, sal_Bool bNewPath ) /*****************************************************************************/ { GenericInformation *pInfo; @@ -374,14 +374,14 @@ BOOL GenericInformationList::InsertInfo( const ByteString &rPathKey, const ByteS if ( pInfo ) { pInfo->SetValue( rValue ); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } /*****************************************************************************/ void GenericInformationList::RemoveInfo( GenericInformation *pInfo, - BOOL bDelete ) + sal_Bool bDelete ) /*****************************************************************************/ { Remove( pInfo ); |