summaryrefslogtreecommitdiff
path: root/svl/inc/svl/svarray.hxx
diff options
context:
space:
mode:
authorPhilipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM>2011-02-14 18:20:23 +0100
committerPhilipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM>2011-02-14 18:20:23 +0100
commitdb45e5f229c444e481e354863da1d07348ba9d67 (patch)
treeada7b20bd8efcfd76f8e169754ddf5bdb774252e /svl/inc/svl/svarray.hxx
parenta9aa5e1feff13541cdf725f83c408d5c5d795591 (diff)
parentce5f1dd187c3a7d8113c7653fa887b98fd50aaf6 (diff)
rebase to DEV300_m100
Diffstat (limited to 'svl/inc/svl/svarray.hxx')
-rw-r--r--svl/inc/svl/svarray.hxx234
1 files changed, 117 insertions, 117 deletions
diff --git a/svl/inc/svl/svarray.hxx b/svl/inc/svl/svarray.hxx
index d48998247eeb..19ee3a9e5077 100644
--- a/svl/inc/svl/svarray.hxx
+++ b/svl/inc/svl/svarray.hxx
@@ -118,15 +118,15 @@ inline void operator delete( void*, DummyType* ) {}
#if defined(PRODUCT)
#define _SVVARARR_DEF_GET_OP_INLINE( nm, ArrElem ) \
-ArrElem& operator[](USHORT nP) const { return *(pData+nP); }\
+ArrElem& operator[](sal_uInt16 nP) const { return *(pData+nP); }\
\
-void Insert( const nm * pI, USHORT nP,\
- USHORT nS = 0, USHORT nE = USHRT_MAX )\
+void Insert( const nm * pI, sal_uInt16 nP,\
+ sal_uInt16 nS = 0, sal_uInt16 nE = USHRT_MAX )\
{\
if( USHRT_MAX == nE ) \
nE = pI->nA; \
if( nS < nE ) \
- Insert( (const ArrElem*)pI->pData+nS, (USHORT)nE-nS, nP );\
+ Insert( (const ArrElem*)pI->pData+nS, (sal_uInt16)nE-nS, nP );\
}
#define _SVVARARR_IMPL_GET_OP_INLINE( nm, ArrElem )
@@ -134,64 +134,64 @@ void Insert( const nm * pI, USHORT nP,\
#else
#define _SVVARARR_DEF_GET_OP_INLINE( nm,ArrElem )\
-ArrElem& operator[](USHORT nP) const;\
-void Insert( const nm *pI, USHORT nP,\
- USHORT nS = 0, USHORT nE = USHRT_MAX );
+ArrElem& operator[](sal_uInt16 nP) const;\
+void Insert( const nm *pI, sal_uInt16 nP,\
+ sal_uInt16 nS = 0, sal_uInt16 nE = USHRT_MAX );
#define _SVVARARR_IMPL_GET_OP_INLINE( nm, ArrElem )\
-ArrElem& nm::operator[](USHORT nP) const\
+ArrElem& nm::operator[](sal_uInt16 nP) const\
{\
DBG_ASSERT( pData && nP < nA,"Op[]");\
return *(pData+nP);\
}\
-void nm::Insert( const nm *pI, USHORT nP, USHORT nStt, USHORT nE)\
+void nm::Insert( const nm *pI, sal_uInt16 nP, sal_uInt16 nStt, sal_uInt16 nE)\
{\
DBG_ASSERT(nP<=nA,"Ins,Ar[Start.End]");\
if( USHRT_MAX == nE ) \
nE = pI->nA; \
if( nStt < nE ) \
- Insert( (const ArrElem*)pI->pData+nStt, (USHORT)nE-nStt, nP );\
+ Insert( (const ArrElem*)pI->pData+nStt, (sal_uInt16)nE-nStt, nP );\
}
#endif
#define _SV_DECL_VARARR_GEN(nm, AE, IS, GS, AERef, vis )\
-typedef BOOL (*FnForEach_##nm)( const AERef, void* );\
+typedef sal_Bool (*FnForEach_##nm)( const AERef, void* );\
class vis nm\
{\
protected:\
AE *pData;\
- USHORT nFree;\
- USHORT nA;\
+ sal_uInt16 nFree;\
+ sal_uInt16 nA;\
\
void _resize(size_t n);\
\
public:\
- nm( USHORT= IS, BYTE= GS );\
+ nm( sal_uInt16= IS, sal_uInt8= GS );\
~nm() { rtl_freeMemory( pData ); }\
\
_SVVARARR_DEF_GET_OP_INLINE(nm, AE )\
- AERef GetObject(USHORT nP) const { return (*this)[nP]; } \
+ AERef GetObject(sal_uInt16 nP) const { return (*this)[nP]; } \
\
- void Insert( const AERef aE, USHORT nP );\
- void Insert( const AE *pE, USHORT nL, USHORT nP );\
- void Remove( USHORT nP, USHORT nL = 1 );\
- void Replace( const AERef aE, USHORT nP );\
- void Replace( const AE *pE, USHORT nL, USHORT nP );\
- USHORT Count() const { return nA; }\
+ void Insert( const AERef aE, sal_uInt16 nP );\
+ void Insert( const AE *pE, sal_uInt16 nL, sal_uInt16 nP );\
+ void Remove( sal_uInt16 nP, sal_uInt16 nL = 1 );\
+ void Replace( const AERef aE, sal_uInt16 nP );\
+ void Replace( const AE *pE, sal_uInt16 nL, sal_uInt16 nP );\
+ sal_uInt16 Count() const { return nA; }\
const AE* GetData() const { return (const AE*)pData; }\
\
void ForEach( CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( 0, nA, fnForEach, pArgs );\
}\
- void ForEach( USHORT nS, USHORT nE, \
+ void ForEach( sal_uInt16 nS, sal_uInt16 nE, \
CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( nS, nE, fnForEach, pArgs );\
}\
\
- void _ForEach( USHORT nStt, USHORT nE, \
+ void _ForEach( sal_uInt16 nStt, sal_uInt16 nE, \
CONCAT( FnForEach_, nm ) fnCall, void* pArgs = 0 );\
\
@@ -212,7 +212,7 @@ SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE &, )
SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE &, vis )
#define SV_IMPL_VARARR_GEN( nm, AE, AERef )\
-nm::nm( USHORT nInit, BYTE )\
+nm::nm( sal_uInt16 nInit, sal_uInt8 )\
: pData (0),\
nFree (nInit),\
nA (0)\
@@ -226,7 +226,7 @@ nm::nm( USHORT nInit, BYTE )\
\
void nm::_resize (size_t n)\
{\
- USHORT nL = ((n < USHRT_MAX) ? USHORT(n) : USHRT_MAX);\
+ sal_uInt16 nL = ((n < USHRT_MAX) ? sal_uInt16(n) : USHRT_MAX);\
AE* pE = (AE*)(rtl_reallocateMemory (pData, sizeof(AE) * nL));\
if ((pE != 0) || (nL == 0))\
{\
@@ -235,7 +235,7 @@ void nm::_resize (size_t n)\
}\
}\
\
-void nm::Insert( const AERef aE, USHORT nP )\
+void nm::Insert( const AERef aE, sal_uInt16 nP )\
{\
DBG_ASSERT(nP <= nA && nA < USHRT_MAX, "Ins 1");\
if (nFree < 1)\
@@ -246,7 +246,7 @@ void nm::Insert( const AERef aE, USHORT nP )\
++nA; --nFree;\
}\
\
-void nm::Insert( const AE* pE, USHORT nL, USHORT nP )\
+void nm::Insert( const AE* pE, sal_uInt16 nL, sal_uInt16 nP )\
{\
DBG_ASSERT(nP<=nA && ((long)nA+nL)<USHRT_MAX,"Ins n");\
if (nFree < nL)\
@@ -258,13 +258,13 @@ void nm::Insert( const AE* pE, USHORT nL, USHORT nP )\
nA = nA + nL; nFree = nFree - nL;\
}\
\
-void nm::Replace( const AERef aE, USHORT nP )\
+void nm::Replace( const AERef aE, sal_uInt16 nP )\
{\
if( nP < nA )\
*(pData+nP) = (AE&)aE;\
}\
\
-void nm::Replace( const AE *pE, USHORT nL, USHORT nP )\
+void nm::Replace( const AE *pE, sal_uInt16 nL, sal_uInt16 nP )\
{\
if( pE && nP < nA )\
{\
@@ -278,7 +278,7 @@ void nm::Replace( const AE *pE, USHORT nL, USHORT nP )\
}\
else \
{\
- USHORT nTmpLen = nA + nFree - nP; \
+ sal_uInt16 nTmpLen = nA + nFree - nP; \
memcpy( pData + nP, pE, nTmpLen * sizeof( AE ));\
nA = nA + nFree; \
nFree = 0; \
@@ -287,7 +287,7 @@ void nm::Replace( const AE *pE, USHORT nL, USHORT nP )\
}\
}\
\
-void nm::Remove( USHORT nP, USHORT nL )\
+void nm::Remove( sal_uInt16 nP, sal_uInt16 nL )\
{\
if( !nL )\
return;\
@@ -299,7 +299,7 @@ void nm::Remove( USHORT nP, USHORT nL )\
_resize (nA);\
}\
\
-void nm::_ForEach( USHORT nStt, USHORT nE, \
+void nm::_ForEach( sal_uInt16 nStt, sal_uInt16 nE, \
CONCAT( FnForEach_, nm ) fnCall, void* pArgs )\
{\
if( nStt >= nE || nE > nA )\
@@ -315,36 +315,36 @@ SV_IMPL_VARARR_GEN( nm, AE, AE & )
#define _SV_DECL_PTRARR_DEF_GEN( nm, AE, IS, GS, AERef, vis )\
_SV_DECL_VARARR_GEN( nm, AE, IS, GS, AERef, vis)\
-USHORT GetPos( const AERef aE ) const;\
+sal_uInt16 GetPos( const AERef aE ) const;\
};
#define _SV_DECL_PTRARR_DEF( nm, AE, IS, GS, vis )\
_SV_DECL_PTRARR_DEF_GEN( nm, AE, IS, GS, AE &, vis )
#define SV_DECL_PTRARR_GEN(nm, AE, IS, GS, Base, AERef, VPRef, vis )\
-typedef BOOL (*FnForEach_##nm)( const AERef, void* );\
+typedef sal_Bool (*FnForEach_##nm)( const AERef, void* );\
class vis nm: public Base \
{\
public:\
- nm( USHORT nIni=IS, BYTE nG=GS )\
+ nm( sal_uInt16 nIni=IS, sal_uInt8 nG=GS )\
: Base(nIni,nG) {}\
- void Insert( const nm *pI, USHORT nP, \
- USHORT nS = 0, USHORT nE = USHRT_MAX ) {\
+ void Insert( const nm *pI, sal_uInt16 nP, \
+ sal_uInt16 nS = 0, sal_uInt16 nE = USHRT_MAX ) {\
Base::Insert((const Base*)pI, nP, nS, nE);\
}\
- void Insert( const AERef aE, USHORT nP ) {\
+ void Insert( const AERef aE, sal_uInt16 nP ) {\
Base::Insert( (const VPRef )aE, nP );\
}\
- void Insert( const AE *pE, USHORT nL, USHORT nP ) {\
+ void Insert( const AE *pE, sal_uInt16 nL, sal_uInt16 nP ) {\
Base::Insert( (const VoidPtr*)pE, nL, nP );\
}\
- void Replace( const AERef aE, USHORT nP ) {\
+ void Replace( const AERef aE, sal_uInt16 nP ) {\
Base::Replace( (const VPRef)aE, nP );\
}\
- void Replace( const AE *pE, USHORT nL, USHORT nP ) {\
+ void Replace( const AE *pE, sal_uInt16 nL, sal_uInt16 nP ) {\
Base::Replace( (const VoidPtr*)pE, nL, nP );\
}\
- void Remove( USHORT nP, USHORT nL = 1) {\
+ void Remove( sal_uInt16 nP, sal_uInt16 nL = 1) {\
Base::Remove(nP,nL);\
}\
const AE* GetData() const {\
@@ -354,20 +354,20 @@ public:\
{\
_ForEach( 0, nA, (FnForEach_##Base)fnForEach, pArgs );\
}\
- void ForEach( USHORT nS, USHORT nE, \
+ void ForEach( sal_uInt16 nS, sal_uInt16 nE, \
CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( nS, nE, (FnForEach_##Base)fnForEach, pArgs );\
}\
- AE operator[]( USHORT nP )const { \
+ AE operator[]( sal_uInt16 nP )const { \
return (AE)Base::operator[](nP); }\
- AE GetObject(USHORT nP) const { \
+ AE GetObject(sal_uInt16 nP) const { \
return (AE)Base::GetObject(nP); }\
\
- USHORT GetPos( const AERef aE ) const { \
+ sal_uInt16 GetPos( const AERef aE ) const { \
return Base::GetPos((const VPRef)aE);\
}\
- void DeleteAndDestroy( USHORT nP, USHORT nL=1 );\
+ void DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL=1 );\
private:\
nm( const nm& );\
nm& operator=( const nm& );\
@@ -380,30 +380,30 @@ SV_DECL_PTRARR_GEN(nm, AE, IS, GS, SvPtrarr, AE &, VoidPtr &, )
SV_DECL_PTRARR_GEN(nm, AE, IS, GS, SvPtrarr, AE &, VoidPtr &, vis )
#define SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, GS, Base, AERef, VPRef, vis )\
-typedef BOOL (*FnForEach_##nm)( const AERef, void* );\
+typedef sal_Bool (*FnForEach_##nm)( const AERef, void* );\
class vis nm: public Base \
{\
public:\
- nm( USHORT nIni=IS, BYTE nG=GS )\
+ nm( sal_uInt16 nIni=IS, sal_uInt8 nG=GS )\
: Base(nIni,nG) {}\
~nm() { DeleteAndDestroy( 0, Count() ); }\
- void Insert( const nm *pI, USHORT nP, \
- USHORT nS = 0, USHORT nE = USHRT_MAX ) {\
+ void Insert( const nm *pI, sal_uInt16 nP, \
+ sal_uInt16 nS = 0, sal_uInt16 nE = USHRT_MAX ) {\
Base::Insert((const Base*)pI, nP, nS, nE);\
}\
- void Insert( const AERef aE, USHORT nP ) {\
+ void Insert( const AERef aE, sal_uInt16 nP ) {\
Base::Insert((const VPRef)aE, nP );\
}\
- void Insert( const AE *pE, USHORT nL, USHORT nP ) {\
+ void Insert( const AE *pE, sal_uInt16 nL, sal_uInt16 nP ) {\
Base::Insert( (const VoidPtr *)pE, nL, nP );\
}\
- void Replace( const AERef aE, USHORT nP ) {\
+ void Replace( const AERef aE, sal_uInt16 nP ) {\
Base::Replace( (const VPRef)aE, nP );\
}\
- void Replace( const AE *pE, USHORT nL, USHORT nP ) {\
+ void Replace( const AE *pE, sal_uInt16 nL, sal_uInt16 nP ) {\
Base::Replace( (const VoidPtr*)pE, nL, nP );\
}\
- void Remove( USHORT nP, USHORT nL = 1) {\
+ void Remove( sal_uInt16 nP, sal_uInt16 nL = 1) {\
Base::Remove(nP,nL);\
}\
const AE* GetData() const {\
@@ -413,20 +413,20 @@ public:\
{\
_ForEach( 0, nA, (FnForEach_##Base)fnForEach, pArgs );\
}\
- void ForEach( USHORT nS, USHORT nE, \
+ void ForEach( sal_uInt16 nS, sal_uInt16 nE, \
CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( nS, nE, (FnForEach_##Base)fnForEach, pArgs );\
}\
- AE operator[]( USHORT nP )const { \
+ AE operator[]( sal_uInt16 nP )const { \
return (AE)Base::operator[](nP); }\
- AE GetObject( USHORT nP )const { \
+ AE GetObject( sal_uInt16 nP )const { \
return (AE)Base::GetObject(nP); }\
\
- USHORT GetPos( const AERef aE ) const { \
+ sal_uInt16 GetPos( const AERef aE ) const { \
return Base::GetPos((const VPRef)aE);\
} \
- void DeleteAndDestroy( USHORT nP, USHORT nL=1 );\
+ void DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL=1 );\
private:\
nm( const nm& );\
nm& operator=( const nm& );\
@@ -439,11 +439,11 @@ SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, GS, SvPtrarr, AE &, VoidPtr &, )
SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, GS, SvPtrarr, AE &, VoidPtr &, vis)
#define SV_IMPL_PTRARR_GEN(nm, AE, Base)\
-void nm::DeleteAndDestroy( USHORT nP, USHORT nL )\
+void nm::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL )\
{ \
if( nL ) {\
DBG_ASSERT( nP < nA && nP + nL <= nA,"Del");\
- for( USHORT n=nP; n < nP + nL; n++ ) \
+ for( sal_uInt16 n=nP; n < nP + nL; n++ ) \
delete *((AE*)pData+n); \
Base::Remove( nP, nL ); \
} \
@@ -464,27 +464,27 @@ _SV_DECL_PTRARR_DEF( SvPtrarr, VoidPtr, 0, 1, SVL_DLLPUBLIC )
#endif
#define _SORT_CLASS_DEF(nm, AE, IS, GS, vis)\
-typedef BOOL (*FnForEach_##nm)( const AE&, void* );\
+typedef sal_Bool (*FnForEach_##nm)( const AE&, void* );\
class vis nm : __MWERKS__PRIVATE nm##_SAR \
{\
public:\
- nm(USHORT nSize = IS, BYTE nG = GS)\
+ nm(sal_uInt16 nSize = IS, sal_uInt8 nG = GS)\
: nm##_SAR(nSize,nG) {}\
- void Insert( const nm *pI, USHORT nS=0, USHORT nE=USHRT_MAX );\
- BOOL Insert( const AE& aE );\
- BOOL Insert( const AE& aE, USHORT& rP );\
- void Insert( const AE *pE, USHORT nL );\
- void Remove( USHORT nP, USHORT nL = 1 );\
- void Remove( const AE& aE, USHORT nL = 1 );\
- USHORT Count() const { return nm##_SAR::Count(); }\
+ void Insert( const nm *pI, sal_uInt16 nS=0, sal_uInt16 nE=USHRT_MAX );\
+ sal_Bool Insert( const AE& aE );\
+ sal_Bool Insert( const AE& aE, sal_uInt16& rP );\
+ void Insert( const AE *pE, sal_uInt16 nL );\
+ void Remove( sal_uInt16 nP, sal_uInt16 nL = 1 );\
+ void Remove( const AE& aE, sal_uInt16 nL = 1 );\
+ sal_uInt16 Count() const { return nm##_SAR::Count(); }\
const AE* GetData() const { return (const AE*)pData; }\
\
/* Das Ende stehe im DECL-Makro !!! */
#define _SV_SEEK_PTR(nm,AE)\
-BOOL nm::Seek_Entry( const AE aE, USHORT* pP ) const\
+sal_Bool nm::Seek_Entry( const AE aE, sal_uInt16* pP ) const\
{\
- register USHORT nO = nm##_SAR::Count(),\
+ register sal_uInt16 nO = nm##_SAR::Count(),\
nM, \
nU = 0;\
if( nO > 0 )\
@@ -497,27 +497,27 @@ BOOL nm::Seek_Entry( const AE aE, USHORT* pP ) const\
if( (long)*(pData + nM) == rCmp )\
{\
if( pP ) *pP = nM;\
- return TRUE;\
+ return sal_True;\
}\
else if( (long)*(pData+ nM) < (long)aE )\
nU = nM + 1;\
else if( nM == 0 )\
{\
if( pP ) *pP = nU;\
- return FALSE;\
+ return sal_False;\
}\
else\
nO = nM - 1;\
}\
}\
if( pP ) *pP = nU;\
- return FALSE;\
+ return sal_False;\
}
#define _SV_SEEK_PTR_TO_OBJECT( nm,AE )\
-BOOL nm::Seek_Entry( const AE aE, USHORT* pP ) const\
+sal_Bool nm::Seek_Entry( const AE aE, sal_uInt16* pP ) const\
{\
- register USHORT nO = nm##_SAR::Count(),\
+ register sal_uInt16 nO = nm##_SAR::Count(),\
nM, \
nU = 0;\
if( nO > 0 )\
@@ -529,27 +529,27 @@ BOOL nm::Seek_Entry( const AE aE, USHORT* pP ) const\
if( *(*((AE*)pData + nM)) == *(aE) )\
{\
if( pP ) *pP = nM;\
- return TRUE;\
+ return sal_True;\
}\
else if( *(*((AE*)pData + nM)) < *(aE) )\
nU = nM + 1;\
else if( nM == 0 )\
{\
if( pP ) *pP = nU;\
- return FALSE;\
+ return sal_False;\
}\
else\
nO = nM - 1;\
}\
}\
if( pP ) *pP = nU;\
- return FALSE;\
+ return sal_False;\
}
#define _SV_SEEK_OBJECT( nm,AE )\
-BOOL nm::Seek_Entry( const AE & aE, USHORT* pP ) const\
+sal_Bool nm::Seek_Entry( const AE & aE, sal_uInt16* pP ) const\
{\
- register USHORT nO = nm##_SAR::Count(),\
+ register sal_uInt16 nO = nm##_SAR::Count(),\
nM, \
nU = 0;\
if( nO > 0 )\
@@ -561,29 +561,29 @@ BOOL nm::Seek_Entry( const AE & aE, USHORT* pP ) const\
if( *(pData + nM) == aE )\
{\
if( pP ) *pP = nM;\
- return TRUE;\
+ return sal_True;\
}\
else if( *(pData + nM) < aE )\
nU = nM + 1;\
else if( nM == 0 )\
{\
if( pP ) *pP = nU;\
- return FALSE;\
+ return sal_False;\
}\
else\
nO = nM - 1;\
}\
}\
if( pP ) *pP = nU;\
- return FALSE;\
+ return sal_False;\
}
#define _SV_IMPL_SORTAR_ALG(nm, AE)\
-void nm::Insert( const nm * pI, USHORT nS, USHORT nE )\
+void nm::Insert( const nm * pI, sal_uInt16 nS, sal_uInt16 nE )\
{\
if( USHRT_MAX == nE )\
nE = pI->Count();\
- USHORT nP;\
+ sal_uInt16 nP;\
const AE * pIArr = pI->GetData();\
for( ; nS < nE; ++nS )\
{\
@@ -597,39 +597,39 @@ void nm::Insert( const nm * pI, USHORT nS, USHORT nE )\
}\
}\
\
-BOOL nm::Insert( const AE & aE )\
+sal_Bool nm::Insert( const AE & aE )\
{\
- USHORT nP;\
- BOOL bExist;\
+ sal_uInt16 nP;\
+ sal_Bool bExist;\
bExist = Seek_Entry( aE, &nP );\
if( ! bExist )\
nm##_SAR::Insert( aE, nP );\
return !bExist;\
}\
-BOOL nm::Insert( const AE & aE, USHORT& rP )\
+sal_Bool nm::Insert( const AE & aE, sal_uInt16& rP )\
{\
- BOOL bExist;\
+ sal_Bool bExist;\
bExist = Seek_Entry( aE, &rP );\
if( ! bExist )\
nm##_SAR::Insert( aE, rP );\
return !bExist;\
}\
-void nm::Insert( const AE* pE, USHORT nL)\
+void nm::Insert( const AE* pE, sal_uInt16 nL)\
{\
- USHORT nP;\
- for( USHORT n = 0; n < nL; ++n )\
+ sal_uInt16 nP;\
+ for( sal_uInt16 n = 0; n < nL; ++n )\
if( ! Seek_Entry( *(pE+n), &nP ))\
nm##_SAR::Insert( *(pE+n), nP );\
}\
-void nm::Remove( USHORT nP, USHORT nL )\
+void nm::Remove( sal_uInt16 nP, sal_uInt16 nL )\
{\
if( nL )\
nm##_SAR::Remove( nP, nL);\
}\
\
-void nm::Remove( const AE &aE, USHORT nL )\
+void nm::Remove( const AE &aE, sal_uInt16 nL )\
{\
- USHORT nP;\
+ sal_uInt16 nP;\
if( nL && Seek_Entry( aE, &nP ) ) \
nm##_SAR::Remove( nP, nL);\
}\
@@ -637,20 +637,20 @@ void nm::Remove( const AE &aE, USHORT nL )\
#if defined(TCPP)
#define _SORTARR_BLC_CASTS(nm, AE )\
- BOOL Insert( AE &aE ) {\
+ sal_Bool Insert( AE &aE ) {\
return Insert( (const AE&)aE );\
}\
- USHORT GetPos( AE& aE ) const { \
+ sal_uInt16 GetPos( AE& aE ) const { \
return SvPtrarr::GetPos((const VoidPtr&)aE);\
}\
- void Remove( AE& aE, USHORT nL = 1 ) { \
+ void Remove( AE& aE, sal_uInt16 nL = 1 ) { \
Remove( (const AE&) aE, nL );\
}
#else
#define _SORTARR_BLC_CASTS(nm, AE )\
- USHORT GetPos( const AE& aE ) const { \
+ sal_uInt16 GetPos( const AE& aE ) const { \
return SvPtrarr::GetPos((const VoidPtr&)aE);\
}
@@ -659,23 +659,23 @@ void nm::Remove( const AE &aE, USHORT nL )\
#define _SV_DECL_PTRARR_SORT_ALG(nm, AE, IS, GS, vis)\
SV_DECL_PTRARR_VISIBILITY(nm##_SAR, AE, IS, GS, vis)\
_SORT_CLASS_DEF(nm, AE, IS, GS, vis)\
- AE operator[](USHORT nP) const {\
+ AE operator[](sal_uInt16 nP) const {\
return nm##_SAR::operator[]( nP );\
}\
- AE GetObject(USHORT nP) const {\
+ AE GetObject(sal_uInt16 nP) const {\
return nm##_SAR::GetObject( nP );\
}\
- BOOL Seek_Entry( const AE aE, USHORT* pP = 0 ) const;\
+ sal_Bool Seek_Entry( const AE aE, sal_uInt16* pP = 0 ) const;\
void ForEach( CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( 0, nA, (FnForEach_SvPtrarr)fnForEach, pArgs );\
}\
- void ForEach( USHORT nS, USHORT nE, \
+ void ForEach( sal_uInt16 nS, sal_uInt16 nE, \
CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( nS, nE, (FnForEach_SvPtrarr)fnForEach, pArgs );\
}\
- void DeleteAndDestroy( USHORT nP, USHORT nL=1 ); \
+ void DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL=1 ); \
_SORTARR_BLC_CASTS(nm, AE )\
\
/* Das Ende stehe im DECL-Makro !!! */
@@ -711,18 +711,18 @@ _SV_DECL_PTRARR_SORT_DEL(nm, AE, IS, GS, vis)
#define _SV_DECL_VARARR_SORT(nm, AE, IS, GS, vis)\
SV_DECL_VARARR_VISIBILITY(nm##_SAR, AE, IS, GS, vis)\
_SORT_CLASS_DEF(nm, AE, IS, GS, vis) \
- const AE& operator[](USHORT nP) const {\
+ const AE& operator[](sal_uInt16 nP) const {\
return nm##_SAR::operator[]( nP );\
}\
- const AE& GetObject(USHORT nP) const {\
+ const AE& GetObject(sal_uInt16 nP) const {\
return nm##_SAR::GetObject( nP );\
}\
- BOOL Seek_Entry( const AE & aE, USHORT* pP = 0 ) const;\
+ sal_Bool Seek_Entry( const AE & aE, sal_uInt16* pP = 0 ) const;\
void ForEach( CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( 0, nA, (FnForEach_##nm##_SAR)fnForEach, pArgs );\
}\
- void ForEach( USHORT nS, USHORT nE, \
+ void ForEach( sal_uInt16 nS, sal_uInt16 nE, \
CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( nS, nE, (FnForEach_##nm##_SAR)fnForEach, pArgs );\
@@ -740,10 +740,10 @@ _SV_DECL_VARARR_SORT(nm, AE, IS, GS, vis)
#define SV_IMPL_PTRARR_SORT( nm,AE )\
_SV_IMPL_SORTAR_ALG( nm,AE )\
- void nm::DeleteAndDestroy( USHORT nP, USHORT nL ) { \
+ void nm::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL ) { \
if( nL ) {\
DBG_ASSERT( nP < nA && nP + nL <= nA, "ERR_VAR_DEL" );\
- for( USHORT n=nP; n < nP + nL; n++ ) \
+ for( sal_uInt16 n=nP; n < nP + nL; n++ ) \
delete *((AE*)pData+n); \
SvPtrarr::Remove( nP, nL ); \
} \
@@ -752,10 +752,10 @@ _SV_SEEK_PTR( nm, AE )
#define SV_IMPL_OP_PTRARR_SORT( nm,AE )\
_SV_IMPL_SORTAR_ALG( nm,AE )\
- void nm::DeleteAndDestroy( USHORT nP, USHORT nL ) { \
+ void nm::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL ) { \
if( nL ) {\
DBG_ASSERT( nP < nA && nP + nL <= nA, "ERR_VAR_DEL" );\
- for( USHORT n=nP; n < nP + nL; n++ ) \
+ for( sal_uInt16 n=nP; n < nP + nL; n++ ) \
delete *((AE*)pData+n); \
SvPtrarr::Remove( nP, nL ); \
} \