diff options
Diffstat (limited to 'tools/source/memtools')
-rwxr-xr-x[-rw-r--r--] | tools/source/memtools/contnr.cxx | 116 | ||||
-rw-r--r-- | tools/source/memtools/makefile.mk | 56 | ||||
-rwxr-xr-x[-rw-r--r--] | tools/source/memtools/mempool.cxx | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | tools/source/memtools/multisel.cxx | 100 | ||||
-rwxr-xr-x[-rw-r--r--] | tools/source/memtools/table.cxx | 82 | ||||
-rwxr-xr-x[-rw-r--r--] | tools/source/memtools/unqidx.cxx | 60 |
6 files changed, 180 insertions, 236 deletions
diff --git a/tools/source/memtools/contnr.cxx b/tools/source/memtools/contnr.cxx index 3aff098aa3bc..9fe9babc5f05 100644..100755 --- a/tools/source/memtools/contnr.cxx +++ b/tools/source/memtools/contnr.cxx @@ -75,7 +75,7 @@ const char* CBlock::DbgCheckCBlock( const void* pBlock ) |* *************************************************************************/ -CBlock::CBlock( USHORT nInitSize, CBlock* _pPrev, CBlock* _pNext ) +CBlock::CBlock( sal_uInt16 nInitSize, CBlock* _pPrev, CBlock* _pNext ) { DBG_CTOR( CBlock, DbgCheckCBlock ); @@ -96,7 +96,7 @@ CBlock::CBlock( USHORT nInitSize, CBlock* _pPrev, CBlock* _pNext ) |* *************************************************************************/ -CBlock::CBlock( USHORT _nSize, CBlock* _pPrev ) +CBlock::CBlock( sal_uInt16 _nSize, CBlock* _pPrev ) { DBG_CTOR( CBlock, DbgCheckCBlock ); DBG_ASSERT( _nSize, "CBlock::CBlock(): nSize == 0" ); @@ -158,7 +158,7 @@ inline CBlock::~CBlock() |* *************************************************************************/ -void CBlock::Insert( void* p, USHORT nIndex, USHORT nReSize ) +void CBlock::Insert( void* p, sal_uInt16 nIndex, sal_uInt16 nReSize ) { DBG_CHKTHIS( CBlock, DbgCheckCBlock ); DBG_ASSERT( nIndex <= nCount, "CBlock::Insert(): Index > nCount" ); @@ -212,12 +212,12 @@ void CBlock::Insert( void* p, USHORT nIndex, USHORT nReSize ) |* *************************************************************************/ -CBlock* CBlock::Split( void* p, USHORT nIndex, USHORT nReSize ) +CBlock* CBlock::Split( void* p, sal_uInt16 nIndex, sal_uInt16 nReSize ) { DBG_CHKTHIS( CBlock, DbgCheckCBlock ); - USHORT nNewSize; - USHORT nMiddle; + sal_uInt16 nNewSize; + sal_uInt16 nMiddle; CBlock* pNewBlock; nMiddle = nCount/2; @@ -347,7 +347,7 @@ CBlock* CBlock::Split( void* p, USHORT nIndex, USHORT nReSize ) |* *************************************************************************/ -void* CBlock::Remove( USHORT nIndex, USHORT nReSize ) +void* CBlock::Remove( sal_uInt16 nIndex, sal_uInt16 nReSize ) { DBG_CHKTHIS( CBlock, DbgCheckCBlock ); @@ -404,7 +404,7 @@ void* CBlock::Remove( USHORT nIndex, USHORT nReSize ) |* *************************************************************************/ -inline void* CBlock::Replace( void* p, USHORT nIndex ) +inline void* CBlock::Replace( void* p, sal_uInt16 nIndex ) { DBG_CHKTHIS( CBlock, DbgCheckCBlock ); @@ -423,7 +423,7 @@ inline void* CBlock::Replace( void* p, USHORT nIndex ) |* *************************************************************************/ -inline void** CBlock::GetObjectPtr( USHORT nIndex ) +inline void** CBlock::GetObjectPtr( sal_uInt16 nIndex ) { DBG_CHKTHIS( CBlock, DbgCheckCBlock ); @@ -438,7 +438,7 @@ inline void** CBlock::GetObjectPtr( USHORT nIndex ) |* *************************************************************************/ -void CBlock::SetSize( USHORT nNewSize ) +void CBlock::SetSize( sal_uInt16 nNewSize ) { DBG_CHKTHIS( CBlock, DbgCheckCBlock ); DBG_ASSERT( nNewSize, "CBlock::SetSize(): nNewSize == 0" ); @@ -554,7 +554,7 @@ void Container::ImpCopyContainer( const Container* pCont2 ) |* *************************************************************************/ -Container::Container( USHORT _nBlockSize, USHORT _nInitSize, USHORT _nReSize ) +Container::Container( sal_uInt16 _nBlockSize, sal_uInt16 _nInitSize, sal_uInt16 _nReSize ) { DBG_CTOR( Container, DbgCheckContainer ); @@ -615,7 +615,7 @@ Container::Container( USHORT _nBlockSize, USHORT _nInitSize, USHORT _nReSize ) |* *************************************************************************/ -Container::Container( ULONG nSize ) +Container::Container( sal_uIntPtr nSize ) { DBG_CTOR( Container, DbgCheckContainer ); @@ -636,7 +636,7 @@ Container::Container( ULONG nSize ) // Muss mehr als ein Block angelegt werden if ( nSize <= nBlockSize ) { - pFirstBlock = new CBlock( (USHORT)nSize, NULL ); + pFirstBlock = new CBlock( (sal_uInt16)nSize, NULL ); pLastBlock = pFirstBlock; } else @@ -657,7 +657,7 @@ Container::Container( ULONG nSize ) nSize -= nBlockSize; } - pLastBlock = new CBlock( (USHORT)nSize, pBlock1 ); + pLastBlock = new CBlock( (sal_uInt16)nSize, pBlock1 ); pBlock1->SetNextBlock( pLastBlock ); } @@ -707,7 +707,7 @@ Container::~Container() |* *************************************************************************/ -void Container::ImpInsert( void* p, CBlock* pBlock, USHORT nIndex ) +void Container::ImpInsert( void* p, CBlock* pBlock, sal_uInt16 nIndex ) { DBG_CHKTHIS( Container, DbgCheckContainer ); @@ -799,7 +799,7 @@ void Container::Insert( void* p ) |* *************************************************************************/ -void Container::Insert( void* p, ULONG nIndex ) +void Container::Insert( void* p, sal_uIntPtr nIndex ) { if ( nCount <= nIndex ) { @@ -818,7 +818,7 @@ void Container::Insert( void* p, ULONG nIndex ) pTemp = pTemp->GetNextBlock(); } - ImpInsert( p, pTemp, (USHORT)nIndex ); + ImpInsert( p, pTemp, (sal_uInt16)nIndex ); } } @@ -830,7 +830,7 @@ void Container::Insert( void* p, ULONG nIndex ) void Container::Insert( void* pNew, void* pOld ) { - ULONG nIndex = GetPos( pOld ); + sal_uIntPtr nIndex = GetPos( pOld ); if ( nIndex != CONTAINER_ENTRY_NOTFOUND ) Insert( pNew, nIndex ); } @@ -843,7 +843,7 @@ void Container::Insert( void* pNew, void* pOld ) |* *************************************************************************/ -void* Container::ImpRemove( CBlock* pBlock, USHORT nIndex ) +void* Container::ImpRemove( CBlock* pBlock, sal_uInt16 nIndex ) { DBG_CHKTHIS( Container, DbgCheckContainer ); @@ -931,7 +931,7 @@ void* Container::Remove() |* *************************************************************************/ -void* Container::Remove( ULONG nIndex ) +void* Container::Remove( sal_uIntPtr nIndex ) { // Ist Index nicht innerhalb des Containers, dann NULL zurueckgeben if ( nCount <= nIndex ) @@ -946,7 +946,7 @@ void* Container::Remove( ULONG nIndex ) pTemp = pTemp->GetNextBlock(); } - return ImpRemove( pTemp, (USHORT)nIndex ); + return ImpRemove( pTemp, (sal_uInt16)nIndex ); } } @@ -972,7 +972,7 @@ void* Container::Replace( void* p ) |* *************************************************************************/ -void* Container::Replace( void* p, ULONG nIndex ) +void* Container::Replace( void* p, sal_uIntPtr nIndex ) { DBG_CHKTHIS( Container, DbgCheckContainer ); @@ -989,7 +989,7 @@ void* Container::Replace( void* p, ULONG nIndex ) pTemp = pTemp->GetNextBlock(); } - return pTemp->Replace( p, (USHORT)nIndex ); + return pTemp->Replace( p, (sal_uInt16)nIndex ); } } @@ -999,7 +999,7 @@ void* Container::Replace( void* p, ULONG nIndex ) |* *************************************************************************/ -void Container::SetSize( ULONG nNewSize ) +void Container::SetSize( sal_uIntPtr nNewSize ) { DBG_CHKTHIS( Container, DbgCheckContainer ); @@ -1009,7 +1009,7 @@ void Container::SetSize( ULONG nNewSize ) if ( nNewSize != nCount ) { CBlock* pTemp; - ULONG nTemp; + sal_uIntPtr nTemp; // Wird verkleinert if ( nNewSize < nCount ) @@ -1023,14 +1023,14 @@ void Container::SetSize( ULONG nNewSize ) } // Alle folgenden Bloecke loeschen - BOOL bLast = FALSE; + sal_Bool bLast = sal_False; CBlock* pDelNext; CBlock* pDelBlock = pTemp->GetNextBlock(); while ( pDelBlock ) { // Muss CurrentBlock umgesetzt werden if ( pDelBlock == pCurBlock ) - bLast = TRUE; + bLast = sal_True; pDelNext = pDelBlock->GetNextBlock(); delete pDelBlock; pDelBlock = pDelNext; @@ -1041,7 +1041,7 @@ void Container::SetSize( ULONG nNewSize ) { pLastBlock = pTemp; pTemp->SetNextBlock( NULL ); - pTemp->SetSize( (USHORT)(nNewSize-nTemp) ); + pTemp->SetSize( (sal_uInt16)(nNewSize-nTemp) ); } else { @@ -1068,7 +1068,7 @@ void Container::SetSize( ULONG nNewSize ) // Muss mehr als ein Block angelegt werden if ( nNewSize <= nBlockSize ) { - pFirstBlock = new CBlock( (USHORT)nNewSize, NULL ); + pFirstBlock = new CBlock( (sal_uInt16)nNewSize, NULL ); pLastBlock = pFirstBlock; } else @@ -1089,7 +1089,7 @@ void Container::SetSize( ULONG nNewSize ) nNewSize -= nBlockSize; } - pLastBlock = new CBlock( (USHORT)nNewSize, pBlock1 ); + pLastBlock = new CBlock( (sal_uInt16)nNewSize, pBlock1 ); pBlock1->SetNextBlock( pLastBlock ); } @@ -1097,7 +1097,7 @@ void Container::SetSize( ULONG nNewSize ) } // Reicht es, den letzen Puffer in der Groesse anzupassen else if ( (nTemp+pTemp->Count()) <= nBlockSize ) - pTemp->SetSize( (USHORT)(nTemp+pTemp->Count()) ); + pTemp->SetSize( (sal_uInt16)(nTemp+pTemp->Count()) ); else { // Puffer auf max. Blockgroesse setzen @@ -1118,7 +1118,7 @@ void Container::SetSize( ULONG nNewSize ) // Den letzten Block anlegen if ( nTemp ) { - pLastBlock = new CBlock( (USHORT)nTemp, pTemp ); + pLastBlock = new CBlock( (sal_uInt16)nTemp, pTemp ); pTemp->SetNextBlock( pLastBlock ); } else @@ -1183,7 +1183,7 @@ void* Container::GetCurObject() const |* *************************************************************************/ -ULONG Container::GetCurPos() const +sal_uIntPtr Container::GetCurPos() const { DBG_CHKTHIS( Container, DbgCheckContainer ); @@ -1194,7 +1194,7 @@ ULONG Container::GetCurPos() const { // Block suchen CBlock* pTemp = pFirstBlock; - ULONG nTemp = 0; + sal_uIntPtr nTemp = 0; while ( pTemp != pCurBlock ) { nTemp += pTemp->Count(); @@ -1213,7 +1213,7 @@ ULONG Container::GetCurPos() const |* *************************************************************************/ -void** Container::GetObjectPtr( ULONG nIndex ) +void** Container::GetObjectPtr( sal_uIntPtr nIndex ) { DBG_CHKTHIS( Container, DbgCheckContainer ); @@ -1231,7 +1231,7 @@ void** Container::GetObjectPtr( ULONG nIndex ) } // Item innerhalb des gefundenen Blocks zurueckgeben - return pTemp->GetObjectPtr( (USHORT)nIndex ); + return pTemp->GetObjectPtr( (sal_uInt16)nIndex ); } } @@ -1241,7 +1241,7 @@ void** Container::GetObjectPtr( ULONG nIndex ) |* *************************************************************************/ -void* Container::GetObject( ULONG nIndex ) const +void* Container::GetObject( sal_uIntPtr nIndex ) const { DBG_CHKTHIS( Container, DbgCheckContainer ); @@ -1259,7 +1259,7 @@ void* Container::GetObject( ULONG nIndex ) const } // Item innerhalb des gefundenen Blocks zurueckgeben - return pTemp->GetObject( (USHORT)nIndex ); + return pTemp->GetObject( (sal_uInt16)nIndex ); } } @@ -1269,15 +1269,15 @@ void* Container::GetObject( ULONG nIndex ) const |* *************************************************************************/ -ULONG Container::GetPos( const void* p ) const +sal_uIntPtr Container::GetPos( const void* p ) const { DBG_CHKTHIS( Container, DbgCheckContainer ); void** pNodes; CBlock* pTemp; - ULONG nTemp; - USHORT nBlockCount; - USHORT i; + sal_uIntPtr nTemp; + sal_uInt16 nBlockCount; + sal_uInt16 i; // Block suchen pTemp = pFirstBlock; @@ -1307,8 +1307,8 @@ ULONG Container::GetPos( const void* p ) const |* *************************************************************************/ -ULONG Container::GetPos( const void* p, ULONG nStartIndex, - BOOL bForward ) const +sal_uIntPtr Container::GetPos( const void* p, sal_uIntPtr nStartIndex, + sal_Bool bForward ) const { DBG_CHKTHIS( Container, DbgCheckContainer ); @@ -1318,12 +1318,12 @@ ULONG Container::GetPos( const void* p, ULONG nStartIndex, else { void** pNodes; - USHORT nBlockCount; - USHORT i; + sal_uInt16 nBlockCount; + sal_uInt16 i; // Block suchen CBlock* pTemp = pFirstBlock; - ULONG nTemp = 0; + sal_uIntPtr nTemp = 0; while ( nTemp+pTemp->Count() <= nStartIndex ) { nTemp += pTemp->Count(); @@ -1334,7 +1334,7 @@ ULONG Container::GetPos( const void* p, ULONG nStartIndex, if ( bForward ) { // Alle Bloecke durchrsuchen - i = (USHORT)(nStartIndex - nTemp); + i = (sal_uInt16)(nStartIndex - nTemp); pNodes = pTemp->GetObjectPtr( i ); do { @@ -1356,12 +1356,12 @@ ULONG Container::GetPos( const void* p, ULONG nStartIndex, else break; } - while ( TRUE ); + while ( sal_True ); } else { // Alle Bloecke durchrsuchen - i = (USHORT)(nStartIndex-nTemp)+1; + i = (sal_uInt16)(nStartIndex-nTemp)+1; pNodes = pTemp->GetObjectPtr( i-1 ); do { @@ -1385,7 +1385,7 @@ ULONG Container::GetPos( const void* p, ULONG nStartIndex, else break; } - while ( TRUE ); + while ( sal_True ); } } @@ -1398,7 +1398,7 @@ ULONG Container::GetPos( const void* p, ULONG nStartIndex, |* *************************************************************************/ -void* Container::Seek( ULONG nIndex ) +void* Container::Seek( sal_uIntPtr nIndex ) { DBG_CHKTHIS( Container, DbgCheckContainer ); @@ -1417,7 +1417,7 @@ void* Container::Seek( ULONG nIndex ) // Item innerhalb des gefundenen Blocks zurueckgeben pCurBlock = pTemp; - nCurIndex = (USHORT)nIndex; + nCurIndex = (sal_uInt16)nIndex; return pCurBlock->GetObject( nCurIndex ); } } @@ -1552,22 +1552,22 @@ Container& Container::operator =( const Container& r ) |* *************************************************************************/ -BOOL Container::operator ==( const Container& r ) const +sal_Bool Container::operator ==( const Container& r ) const { DBG_CHKTHIS( Container, DbgCheckContainer ); if ( nCount != r.nCount ) - return FALSE; + return sal_False; - ULONG i = 0; + sal_uIntPtr i = 0; while ( i < nCount ) { if ( GetObject( i ) != r.GetObject( i ) ) - return FALSE; + return sal_False; i++; } - return TRUE; + return sal_True; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/tools/source/memtools/makefile.mk b/tools/source/memtools/makefile.mk deleted file mode 100644 index de03a0d50cc3..000000000000 --- a/tools/source/memtools/makefile.mk +++ /dev/null @@ -1,56 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=tools -TARGET=mtools - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES= $(SLO)$/contnr.obj \ - $(SLO)$/table.obj \ - $(SLO)$/unqidx.obj \ - $(SLO)$/mempool.obj \ - $(SLO)$/multisel.obj - -EXCEPTIONSFILES= $(SLO)$/multisel.obj $(OBJ)$/multisel.obj - -OBJFILES= $(OBJ)$/contnr.obj \ - $(OBJ)$/table.obj \ - $(OBJ)$/unqidx.obj \ - $(OBJ)$/mempool.obj \ - $(OBJ)$/multisel.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/tools/source/memtools/mempool.cxx b/tools/source/memtools/mempool.cxx index 4e4886bb8ea9..006c5de7b6e0 100644..100755 --- a/tools/source/memtools/mempool.cxx +++ b/tools/source/memtools/mempool.cxx @@ -41,7 +41,7 @@ *************************************************************************/ FixedMemPool::FixedMemPool ( - USHORT _nTypeSize, USHORT, USHORT) + sal_uInt16 _nTypeSize, sal_uInt16, sal_uInt16) { char name[RTL_CACHE_NAME_LENGTH + 1]; snprintf (name, sizeof(name), "FixedMemPool_%d", (int)_nTypeSize); diff --git a/tools/source/memtools/multisel.cxx b/tools/source/memtools/multisel.cxx index 6b4187de1ef3..295b8376d366 100644..100755 --- a/tools/source/memtools/multisel.cxx +++ b/tools/source/memtools/multisel.cxx @@ -64,7 +64,7 @@ static void Print( const MultiSelection* pSel ) } DbgOutf( "SelCount: %4ld\n", pSel->nSelCount ); DbgOutf( "SubCount: %4ld\n", pSel->aSels.Count() ); - for ( ULONG nPos = 0; nPos < pSel->aSels.Count(); ++nPos ) + for ( sal_uIntPtr nPos = 0; nPos < pSel->aSels.Count(); ++nPos ) { DbgOutf( "SubSel #%2ld: %4ld-%4ld\n", nPos, pSel->aSels.GetObject(nPos)->Min(), @@ -103,11 +103,11 @@ size_t MultiSelection::ImplFindSubSelection( long nIndex ) const // ----------------------------------------------------------------------- -BOOL MultiSelection::ImplMergeSubSelections( size_t nPos1, size_t nPos2 ) +sal_Bool MultiSelection::ImplMergeSubSelections( size_t nPos1, size_t nPos2 ) { // didn't a sub selection at nPos2 exist? if ( nPos2 >= aSels.size() ) - return FALSE; + return sal_False; // did the sub selections touch each other? if ( (aSels[ nPos1 ]->Max() + 1) == aSels[ nPos2 ]->Min() ) @@ -118,10 +118,10 @@ BOOL MultiSelection::ImplMergeSubSelections( size_t nPos1, size_t nPos2 ) ::std::advance( it, nPos2 ); delete *it; aSels.erase( it ); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- @@ -130,8 +130,8 @@ MultiSelection::MultiSelection(): aTotRange( 0, -1 ), nCurSubSel(0), nSelCount(0), - bCurValid(FALSE), - bSelectNew(FALSE) + bCurValid(sal_False), + bSelectNew(sal_False) { } @@ -141,8 +141,8 @@ MultiSelection::MultiSelection( const UniString& rString, sal_Unicode cRange, sa aTotRange(0,RANGE_MAX), nCurSubSel(0), nSelCount(0), - bCurValid(FALSE), - bSelectNew(FALSE) + bCurValid(sal_False), + bSelectNew(sal_False) { // Dies ist nur ein Schnellschuss und sollte bald optimiert, // an die verschiedenen Systeme (UNIX etc.) @@ -151,8 +151,8 @@ MultiSelection::MultiSelection( const UniString& rString, sal_Unicode cRange, sa UniString aStr( rString ); sal_Unicode* pStr = aStr.GetBufferAccess(); sal_Unicode* pOld = pStr; - BOOL bReady = FALSE; - BOOL bUntil = FALSE; + sal_Bool bReady = sal_False; + sal_Bool bUntil = sal_False; xub_StrLen nCut = 0; // Hier normieren wir den String, sodass nur Ziffern, @@ -178,11 +178,11 @@ MultiSelection::MultiSelection( const UniString& rString, sal_Unicode cRange, sa { *pStr++ = ';'; nCut++; - bReady = FALSE; + bReady = sal_False; } *pStr++ = *pOld; nCut++; - bUntil = FALSE; + bUntil = sal_False; break; case '-': @@ -194,12 +194,12 @@ MultiSelection::MultiSelection( const UniString& rString, sal_Unicode cRange, sa { *pStr++ = '-'; nCut++; - bUntil = TRUE; + bUntil = sal_True; } - bReady = FALSE; + bReady = sal_False; } else - bReady = TRUE; + bReady = sal_True; break; case ' ': @@ -215,12 +215,12 @@ MultiSelection::MultiSelection( const UniString& rString, sal_Unicode cRange, sa { *pStr++ = '-'; nCut++; - bUntil = TRUE; + bUntil = sal_True; } - bReady = FALSE; + bReady = sal_False; } else - bReady = TRUE; + bReady = sal_True; break; } @@ -234,7 +234,7 @@ MultiSelection::MultiSelection( const UniString& rString, sal_Unicode cRange, sa const sal_Unicode* pCStr = aStr.GetBuffer(); long nPage = 1; long nNum = 1; - bUntil = FALSE; + bUntil = sal_False; while ( *pCStr ) { switch ( *pCStr ) @@ -266,13 +266,13 @@ MultiSelection::MultiSelection( const UniString& rString, sal_Unicode cRange, sa Select( nNum ); nPage = 0; aNumStr.Erase(); - bUntil = FALSE; + bUntil = sal_False; break; case '-': nPage = aNumStr.ToInt32(); aNumStr.Erase(); - bUntil = TRUE; + bUntil = sal_True; break; } @@ -299,7 +299,7 @@ MultiSelection::MultiSelection( const MultiSelection& rOrig ) : aTotRange(rOrig.aTotRange), nSelCount(rOrig.nSelCount), bCurValid(rOrig.bCurValid), - bSelectNew(FALSE) + bSelectNew(sal_False) { if ( bCurValid ) { @@ -318,8 +318,8 @@ MultiSelection::MultiSelection( const Range& rRange ): aTotRange(rRange), nCurSubSel(0), nSelCount(0), - bCurValid(FALSE), - bSelectNew(FALSE) + bCurValid(sal_False), + bSelectNew(sal_False) { } @@ -355,24 +355,24 @@ MultiSelection& MultiSelection::operator= ( const MultiSelection& rOrig ) // ----------------------------------------------------------------------- -BOOL MultiSelection::operator== ( MultiSelection& rWith ) +sal_Bool MultiSelection::operator== ( MultiSelection& rWith ) { if ( aTotRange != rWith.aTotRange || nSelCount != rWith.nSelCount || aSels.size() != rWith.aSels.size() ) - return FALSE; + return sal_False; // compare the sub seletions for ( size_t n = 0; n < aSels.size(); ++n ) if ( *aSels[ n ] != *rWith.aSels[ n ] ) - return FALSE; - return TRUE; + return sal_False; + return sal_True; } // ----------------------------------------------------------------------- -void MultiSelection::SelectAll( BOOL bSelect ) +void MultiSelection::SelectAll( sal_Bool bSelect ) { - DBG(DbgOutf( "::SelectAll(%s)\n", bSelect ? "TRUE" : "FALSE" )); + DBG(DbgOutf( "::SelectAll(%s)\n", bSelect ? "sal_True" : "sal_False" )); ImplClear(); if ( bSelect ) @@ -386,13 +386,13 @@ void MultiSelection::SelectAll( BOOL bSelect ) // ----------------------------------------------------------------------- -BOOL MultiSelection::Select( long nIndex, BOOL bSelect ) +sal_Bool MultiSelection::Select( long nIndex, sal_Bool bSelect ) { DBG_ASSERT( aTotRange.IsInside(nIndex), "selected index out of range" ); // out of range? if ( !aTotRange.IsInside(nIndex) ) - return FALSE; + return sal_False; // find the virtual target position size_t nSubSelPos = ImplFindSubSelection( nIndex ); @@ -402,7 +402,7 @@ BOOL MultiSelection::Select( long nIndex, BOOL bSelect ) // is it included in the found sub selection? if ( nSubSelPos < aSels.size() && aSels[ nSubSelPos ]->IsInside( nIndex ) ) // already selected, nothing to do - return FALSE; + return sal_False; // it will become selected ++nSelCount; @@ -445,7 +445,7 @@ BOOL MultiSelection::Select( long nIndex, BOOL bSelect ) ) { // not selected, nothing to do DBG(Print( this )); - return FALSE; + return sal_False; } // it will become deselected @@ -460,7 +460,7 @@ BOOL MultiSelection::Select( long nIndex, BOOL bSelect ) delete *it; aSels.erase( it ); DBG(Print( this )); - return TRUE; + return sal_True; } // is it at the beginning of the found sub selection? @@ -486,20 +486,20 @@ BOOL MultiSelection::Select( long nIndex, BOOL bSelect ) DBG(Print( this )); - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- -void MultiSelection::Select( const Range& rIndexRange, BOOL bSelect ) +void MultiSelection::Select( const Range& rIndexRange, sal_Bool bSelect ) { Range* pRange; long nOld; - ULONG nTmpMin = rIndexRange.Min(); - ULONG nTmpMax = rIndexRange.Max(); - ULONG nCurMin = FirstSelected(); - ULONG nCurMax = LastSelected(); + sal_uIntPtr nTmpMin = rIndexRange.Min(); + sal_uIntPtr nTmpMax = rIndexRange.Max(); + sal_uIntPtr nCurMin = FirstSelected(); + sal_uIntPtr nCurMax = LastSelected(); DBG_ASSERT(aTotRange.IsInside(nTmpMax), "selected index out of range" ); DBG_ASSERT(aTotRange.IsInside(nTmpMin), "selected index out of range" ); @@ -533,7 +533,7 @@ void MultiSelection::Select( const Range& rIndexRange, BOOL bSelect ) pRange->Min() = (long)nTmpMin; nSelCount += ( nOld - nTmpMin ); } - bCurValid = FALSE; + bCurValid = sal_False; } return; } @@ -556,7 +556,7 @@ void MultiSelection::Select( const Range& rIndexRange, BOOL bSelect ) pRange->Max() = (long)nTmpMax; nSelCount += ( nTmpMax - nOld ); } - bCurValid = FALSE; + bCurValid = sal_False; } return; } @@ -571,7 +571,7 @@ void MultiSelection::Select( const Range& rIndexRange, BOOL bSelect ) // ----------------------------------------------------------------------- -BOOL MultiSelection::IsSelected( long nIndex ) const +sal_Bool MultiSelection::IsSelected( long nIndex ) const { // find the virtual target position size_t nSubSelPos = ImplFindSubSelection( nIndex ); @@ -629,7 +629,7 @@ void MultiSelection::Insert( long nIndex, long nCount ) } } - bCurValid = FALSE; + bCurValid = sal_False; aTotRange.Max() += nCount; if ( bSelectNew ) nSelCount += nCount; @@ -673,7 +673,7 @@ void MultiSelection::Remove( long nIndex ) --( aSels[ nPos ]->Max() ); } - bCurValid = FALSE; + bCurValid = sal_False; aTotRange.Max() -= 1; DBG(Print( this )); @@ -731,14 +731,14 @@ long MultiSelection::ImplBwdUnselected() // ----------------------------------------------------------------------- -long MultiSelection::FirstSelected( BOOL bInverse ) +long MultiSelection::FirstSelected( sal_Bool bInverse ) { bInverseCur = bInverse; nCurSubSel = 0; if ( bInverseCur ) { - bCurValid = nSelCount < ULONG(aTotRange.Len()); + bCurValid = nSelCount < sal_uIntPtr(aTotRange.Len()); if ( bCurValid ) { nCurIndex = 0; @@ -878,7 +878,7 @@ void MultiSelection::SetTotalRange( const Range& rTotRange ) nSelCount += pRange->Len(); } - bCurValid = FALSE; + bCurValid = sal_False; nCurIndex = 0; } diff --git a/tools/source/memtools/table.cxx b/tools/source/memtools/table.cxx index 5e38574464f3..75119ba6f142 100644..100755 --- a/tools/source/memtools/table.cxx +++ b/tools/source/memtools/table.cxx @@ -38,16 +38,16 @@ // ======================================================================= -ULONG Table::ImplGetIndex( ULONG nKey, ULONG* pIndex ) const +sal_uIntPtr Table::ImplGetIndex( sal_uIntPtr nKey, sal_uIntPtr* pIndex ) const { // Abpruefen, ob der erste Key groesser als der Vergleichskey ist - if ( !nCount || (nKey < (ULONG)Container::ImpGetObject(0)) ) + if ( !nCount || (nKey < (sal_uIntPtr)Container::ImpGetObject(0)) ) return TABLE_ENTRY_NOTFOUND; - ULONG nLow; - ULONG nHigh; - ULONG nMid; - ULONG nCompareKey; + sal_uIntPtr nLow; + sal_uIntPtr nHigh; + sal_uIntPtr nMid; + sal_uIntPtr nCompareKey; void** pNodes = Container::ImpGetOnlyNodes(); // Binaeres Suchen @@ -58,7 +58,7 @@ ULONG Table::ImplGetIndex( ULONG nKey, ULONG* pIndex ) const do { nMid = (nLow + nHigh) / 2; - nCompareKey = (ULONG)pNodes[nMid*2]; + nCompareKey = (sal_uIntPtr)pNodes[nMid*2]; if ( nKey < nCompareKey ) nHigh = nMid-1; else @@ -76,7 +76,7 @@ ULONG Table::ImplGetIndex( ULONG nKey, ULONG* pIndex ) const do { nMid = (nLow + nHigh) / 2; - nCompareKey = (ULONG)Container::ImpGetObject( nMid*2 ); + nCompareKey = (sal_uIntPtr)Container::ImpGetObject( nMid*2 ); if ( nKey < nCompareKey ) nHigh = nMid-1; else @@ -103,7 +103,7 @@ ULONG Table::ImplGetIndex( ULONG nKey, ULONG* pIndex ) const // ======================================================================= -Table::Table( USHORT _nInitSize, USHORT _nReSize ) : +Table::Table( sal_uInt16 _nInitSize, sal_uInt16 _nReSize ) : Container( CONTAINER_MAXBLOCKSIZE, _nInitSize*2, _nReSize*2 ) { DBG_ASSERT( _nInitSize <= 32767, "Table::Table(): InitSize > 32767" ); @@ -113,26 +113,26 @@ Table::Table( USHORT _nInitSize, USHORT _nReSize ) : // ----------------------------------------------------------------------- -BOOL Table::Insert( ULONG nKey, void* p ) +sal_Bool Table::Insert( sal_uIntPtr nKey, void* p ) { // Tabellenelement einsortieren - ULONG i; + sal_uIntPtr i; if ( nCount ) { if ( nCount <= 24 ) { - USHORT n = 0; - USHORT nTempCount = (USHORT)nCount * 2; + sal_uInt16 n = 0; + sal_uInt16 nTempCount = (sal_uInt16)nCount * 2; if( void** pNodes = Container::ImpGetOnlyNodes() ) { - ULONG nCompareKey = (ULONG)(*pNodes); + sal_uIntPtr nCompareKey = (sal_uIntPtr)(*pNodes); while ( nKey > nCompareKey ) { n += 2; pNodes += 2; if ( n < nTempCount ) - nCompareKey = (ULONG)(*pNodes); + nCompareKey = (sal_uIntPtr)(*pNodes); else { nCompareKey = 0; @@ -142,7 +142,7 @@ BOOL Table::Insert( ULONG nKey, void* p ) // Testen, ob sich der Key schon in der Tabelle befindet if ( nKey == nCompareKey ) - return FALSE; + return sal_False; i = n; } @@ -150,14 +150,14 @@ BOOL Table::Insert( ULONG nKey, void* p ) { i = 0; if ( ImplGetIndex( nKey, &i ) != TABLE_ENTRY_NOTFOUND ) - return FALSE; + return sal_False; } } else { i = 0; if ( ImplGetIndex( nKey, &i ) != TABLE_ENTRY_NOTFOUND ) - return FALSE; + return sal_False; } } else @@ -170,15 +170,15 @@ BOOL Table::Insert( ULONG nKey, void* p ) // Ein neuer Eintrag nCount++; - return TRUE; + return sal_True; } // ----------------------------------------------------------------------- -void* Table::Remove( ULONG nKey ) +void* Table::Remove( sal_uIntPtr nKey ) { // Index besorgen - ULONG nIndex = ImplGetIndex( nKey ); + sal_uIntPtr nIndex = ImplGetIndex( nKey ); // Testen, ob sich der Key in der Tabelle befindet if ( nIndex == TABLE_ENTRY_NOTFOUND ) @@ -196,10 +196,10 @@ void* Table::Remove( ULONG nKey ) // ----------------------------------------------------------------------- -void* Table::Replace( ULONG nKey, void* p ) +void* Table::Replace( sal_uIntPtr nKey, void* p ) { // Index abfragen - ULONG nIndex = ImplGetIndex( nKey ); + sal_uIntPtr nIndex = ImplGetIndex( nKey ); // Existiert kein Eintrag mit dem Schluessel if ( nIndex == TABLE_ENTRY_NOTFOUND ) @@ -210,10 +210,10 @@ void* Table::Replace( ULONG nKey, void* p ) // ----------------------------------------------------------------------- -void* Table::Get( ULONG nKey ) const +void* Table::Get( sal_uIntPtr nKey ) const { // Index besorgen - ULONG nIndex = ImplGetIndex( nKey ); + sal_uIntPtr nIndex = ImplGetIndex( nKey ); // Testen, ob sich der Key in der Tabelle befindet if ( nIndex == TABLE_ENTRY_NOTFOUND ) @@ -231,16 +231,16 @@ void* Table::GetCurObject() const // ----------------------------------------------------------------------- -ULONG Table::GetKey( const void* p ) const +sal_uIntPtr Table::GetKey( const void* p ) const { - ULONG nIndex = 0; + sal_uIntPtr nIndex = 0; // Solange noch Eintraege Vorhanden sind while ( nIndex < nCount ) { // Stimmt der Pointer ueberein, wird der Key zurueckgegeben if ( p == Container::ImpGetObject( (nIndex*2)+1 ) ) - return (ULONG)Container::ImpGetObject( nIndex*2 ); + return (sal_uIntPtr)Container::ImpGetObject( nIndex*2 ); nIndex++; } @@ -250,14 +250,14 @@ ULONG Table::GetKey( const void* p ) const // ----------------------------------------------------------------------- -BOOL Table::IsKeyValid( ULONG nKey ) const +sal_Bool Table::IsKeyValid( sal_uIntPtr nKey ) const { - return (ImplGetIndex( nKey ) != TABLE_ENTRY_NOTFOUND) ? TRUE : FALSE; + return (ImplGetIndex( nKey ) != TABLE_ENTRY_NOTFOUND) ? sal_True : sal_False; } // ----------------------------------------------------------------------- -ULONG Table::GetUniqueKey( ULONG nStartKey ) const +sal_uIntPtr Table::GetUniqueKey( sal_uIntPtr nStartKey ) const { DBG_ASSERT( (nStartKey > 1) && (nStartKey < 0xFFFFFFFF), "Table::GetUniqueKey() - nStartKey == 0 or nStartKey >= 0xFFFFFFFF" ); @@ -265,7 +265,7 @@ ULONG Table::GetUniqueKey( ULONG nStartKey ) const if ( !nCount ) return nStartKey; - ULONG nLastKey = (ULONG)Container::GetObject( (nCount*2)-2 ); + sal_uIntPtr nLastKey = (sal_uIntPtr)Container::GetObject( (nCount*2)-2 ); if ( nLastKey < nStartKey ) return nStartKey; else @@ -274,18 +274,18 @@ ULONG Table::GetUniqueKey( ULONG nStartKey ) const return nLastKey+1; else { - ULONG nPos; - ULONG nTempPos = ImplGetIndex( nStartKey, &nPos ); + sal_uIntPtr nPos; + sal_uIntPtr nTempPos = ImplGetIndex( nStartKey, &nPos ); if ( nTempPos != TABLE_ENTRY_NOTFOUND ) nPos = nTempPos; - nLastKey = (ULONG)Container::GetObject( nPos ); + nLastKey = (sal_uIntPtr)Container::GetObject( nPos ); if ( nStartKey < nLastKey ) return nStartKey; while ( nLastKey < 0xFFFFFFFE ) { nPos += 2; nLastKey++; - if ( nLastKey != (ULONG)Container::GetObject( nPos ) ) + if ( nLastKey != (sal_uIntPtr)Container::GetObject( nPos ) ) return nLastKey; } } @@ -296,10 +296,10 @@ ULONG Table::GetUniqueKey( ULONG nStartKey ) const // ----------------------------------------------------------------------- -ULONG Table::SearchKey( ULONG nKey, ULONG* pPos ) const +sal_uIntPtr Table::SearchKey( sal_uIntPtr nKey, sal_uIntPtr* pPos ) const { *pPos = 0; - ULONG nPos = ImplGetIndex( nKey, pPos ); + sal_uIntPtr nPos = ImplGetIndex( nKey, pPos ); if ( nPos != TABLE_ENTRY_NOTFOUND ) { nPos /= 2; @@ -312,12 +312,12 @@ ULONG Table::SearchKey( ULONG nKey, ULONG* pPos ) const // ----------------------------------------------------------------------- -void* Table::Seek( ULONG nKey ) +void* Table::Seek( sal_uIntPtr nKey ) { // Testen, ob ein Eintrag vorhanden ist if ( nCount ) { - ULONG nIndex = ImplGetIndex( nKey ); + sal_uIntPtr nIndex = ImplGetIndex( nKey ); // Ist Key nicht enthalten if ( nIndex == TABLE_ENTRY_NOTFOUND ) @@ -339,7 +339,7 @@ void* Table::Seek( ULONG nKey ) void* Table::Seek( void* p ) { - ULONG nKey = GetKey( p ); + sal_uIntPtr nKey = GetKey( p ); // Ist Key vorhanden, dann als aktuellen Eintrag setzen if ( nKey != TABLE_ENTRY_NOTFOUND ) diff --git a/tools/source/memtools/unqidx.cxx b/tools/source/memtools/unqidx.cxx index b4b733f9452b..278199333e37 100644..100755 --- a/tools/source/memtools/unqidx.cxx +++ b/tools/source/memtools/unqidx.cxx @@ -38,8 +38,8 @@ |* *************************************************************************/ -UniqueIndex::UniqueIndex( ULONG _nStartIndex, - ULONG _nInitSize, ULONG _nReSize ) : +UniqueIndex::UniqueIndex( sal_uIntPtr _nStartIndex, + sal_uIntPtr _nInitSize, sal_uIntPtr _nReSize ) : Container( _nInitSize ) { nReSize = _nReSize; @@ -69,7 +69,7 @@ UniqueIndex::UniqueIndex( const UniqueIndex& rIdx ) : |* *************************************************************************/ -ULONG UniqueIndex::Insert( void* p ) +sal_uIntPtr UniqueIndex::Insert( void* p ) { // NULL-Pointer ist nicht erlaubt if ( !p ) @@ -101,13 +101,13 @@ ULONG UniqueIndex::Insert( void* p ) |* *************************************************************************/ -ULONG UniqueIndex::Insert( ULONG nIndex, void* p ) +sal_uIntPtr UniqueIndex::Insert( sal_uIntPtr nIndex, void* p ) { // NULL-Pointer ist nicht erlaubt if ( !p ) return UNIQUEINDEX_ENTRY_NOTFOUND; - ULONG nContIndex = nIndex - nStartIndex; + sal_uIntPtr nContIndex = nIndex - nStartIndex; // Ist Array voll, dann expandieren if ( nContIndex >= Container::GetSize() ) SetSize( nContIndex + nReSize ); @@ -126,7 +126,7 @@ ULONG UniqueIndex::Insert( ULONG nIndex, void* p ) |* *************************************************************************/ -void* UniqueIndex::Remove( ULONG nIndex ) +void* UniqueIndex::Remove( sal_uIntPtr nIndex ) { // Ist Index zulaessig if ( (nIndex >= nStartIndex) && @@ -149,7 +149,7 @@ void* UniqueIndex::Remove( ULONG nIndex ) |* *************************************************************************/ -void* UniqueIndex::Replace( ULONG nIndex, void* p ) +void* UniqueIndex::Replace( sal_uIntPtr nIndex, void* p ) { // NULL-Pointer ist nicht erlaubt if ( !p ) @@ -171,7 +171,7 @@ void* UniqueIndex::Replace( ULONG nIndex, void* p ) |* *************************************************************************/ -void* UniqueIndex::Get( ULONG nIndex ) const +void* UniqueIndex::Get( sal_uIntPtr nIndex ) const { // Ist Index zulaessig if ( (nIndex >= nStartIndex) && @@ -187,9 +187,9 @@ void* UniqueIndex::Get( ULONG nIndex ) const |* *************************************************************************/ -ULONG UniqueIndex::GetCurIndex() const +sal_uIntPtr UniqueIndex::GetCurIndex() const { - ULONG nPos = Container::GetCurPos(); + sal_uIntPtr nPos = Container::GetCurPos(); // Ist der Current-Index nicht belegt, dann gibt es keinen Current-Index if ( !Container::ImpGetObject( nPos ) ) @@ -204,13 +204,13 @@ ULONG UniqueIndex::GetCurIndex() const |* *************************************************************************/ -ULONG UniqueIndex::GetIndex( const void* p ) const +sal_uIntPtr UniqueIndex::GetIndex( const void* p ) const { // Wird ein NULL-Pointer uebergeben, dann wurde Pointer nicht gefunden if ( !p ) return UNIQUEINDEX_ENTRY_NOTFOUND; - ULONG nIndex = Container::GetPos( p ); + sal_uIntPtr nIndex = Container::GetPos( p ); if ( nIndex != CONTAINER_ENTRY_NOTFOUND ) return nIndex+nStartIndex; @@ -224,7 +224,7 @@ ULONG UniqueIndex::GetIndex( const void* p ) const |* *************************************************************************/ -BOOL UniqueIndex::IsIndexValid( ULONG nIndex ) const +sal_Bool UniqueIndex::IsIndexValid( sal_uIntPtr nIndex ) const { // Ist Index zulaessig if ( (nIndex >= nStartIndex) && @@ -232,12 +232,12 @@ BOOL UniqueIndex::IsIndexValid( ULONG nIndex ) const { // Index ist nur zulaessig, wenn Eintrag auch belegt ist if ( Container::ImpGetObject( nIndex-nStartIndex ) ) - return TRUE; + return sal_True; else - return FALSE; + return sal_False; } else - return FALSE; + return sal_False; } /************************************************************************* @@ -246,7 +246,7 @@ BOOL UniqueIndex::IsIndexValid( ULONG nIndex ) const |* *************************************************************************/ -void* UniqueIndex::Seek( ULONG nIndex ) +void* UniqueIndex::Seek( sal_uIntPtr nIndex ) { // Index-Eintrag als aktuellen setzten, wenn er gueltig ist if ( IsIndexValid( nIndex ) ) @@ -267,7 +267,7 @@ void* UniqueIndex::Seek( void* p ) if ( !p ) return NULL; - ULONG nIndex = GetIndex( p ); + sal_uIntPtr nIndex = GetIndex( p ); // Ist Index vorhanden, dann als aktuellen Eintrag setzen if ( nIndex != UNIQUEINDEX_ENTRY_NOTFOUND ) @@ -363,15 +363,15 @@ UniqueIndex& UniqueIndex::operator =( const UniqueIndex& rIdx ) |* *************************************************************************/ -BOOL UniqueIndex::operator ==( const UniqueIndex& rIdx ) const +sal_Bool UniqueIndex::operator ==( const UniqueIndex& rIdx ) const { // Neue Werte zuweisen if ( (nStartIndex == rIdx.nStartIndex) && (nCount == rIdx.nCount) && (Container::operator ==( rIdx )) ) - return TRUE; + return sal_True; else - return FALSE; + return sal_False; } /************************************************************************* |* @@ -383,7 +383,7 @@ UniqueIdContainer::UniqueIdContainer( const UniqueIdContainer& rObj ) : UniqueIndex( rObj ) , nCollectCount( rObj.nCollectCount ) { - ULONG nCur = GetCurIndex(); + sal_uIntPtr nCur = GetCurIndex(); ImpUniqueId * pEle = (ImpUniqueId *)First(); while( pEle ) @@ -405,7 +405,7 @@ UniqueIdContainer& UniqueIdContainer::operator = ( const UniqueIdContainer & rOb UniqueIndex::operator = ( rObj ); nCollectCount = rObj.nCollectCount; - ULONG nCur = GetCurIndex(); + sal_uIntPtr nCur = GetCurIndex(); ImpUniqueId * pEle = (ImpUniqueId *)First(); while( pEle ) @@ -423,12 +423,12 @@ UniqueIdContainer& UniqueIdContainer::operator = ( const UniqueIdContainer & rOb |* *************************************************************************/ -void UniqueIdContainer::Clear( BOOL bAll ) +void UniqueIdContainer::Clear( sal_Bool bAll ) { - USHORT nFree = bAll ? 0xFFFF : 1; + sal_uInt16 nFree = bAll ? 0xFFFF : 1; ImpUniqueId* pId = (ImpUniqueId*)Last(); - BOOL bLast = TRUE; + sal_Bool bLast = sal_True; while ( pId ) { if ( pId->nRefCount <= nFree ) @@ -442,7 +442,7 @@ void UniqueIdContainer::Clear( BOOL bAll ) else { pId = (ImpUniqueId *)Prev(); - bLast = FALSE; + bLast = sal_False; } } } @@ -457,7 +457,7 @@ UniqueItemId UniqueIdContainer::CreateId() { if( nCollectCount > 50 ) { // aufraeumen - Clear( FALSE ); + Clear( sal_False ); nCollectCount = 0; } nCollectCount++; @@ -474,7 +474,7 @@ UniqueItemId UniqueIdContainer::CreateId() |* *************************************************************************/ -UniqueItemId UniqueIdContainer::CreateFreeId( ULONG nId ) +UniqueItemId UniqueIdContainer::CreateFreeId( sal_uIntPtr nId ) { // Einfach erzeugen, fuer abgeleitete Klasse ImpUniqueId * pId = new ImpUniqueId; @@ -489,7 +489,7 @@ UniqueItemId UniqueIdContainer::CreateFreeId( ULONG nId ) |* *************************************************************************/ -UniqueItemId UniqueIdContainer::CreateIdProt( ULONG nId ) +UniqueItemId UniqueIdContainer::CreateIdProt( sal_uIntPtr nId ) { if ( IsIndexValid( nId ) ) return UniqueItemId( (ImpUniqueId *)Get( nId ) ); |