summaryrefslogtreecommitdiff
path: root/tools/inc/tools
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 /tools/inc/tools
parenta9aa5e1feff13541cdf725f83c408d5c5d795591 (diff)
parentce5f1dd187c3a7d8113c7653fa887b98fd50aaf6 (diff)
rebase to DEV300_m100
Diffstat (limited to 'tools/inc/tools')
-rw-r--r--tools/inc/tools/StringListResource.hxx2
-rw-r--r--tools/inc/tools/bigint.hxx8
-rw-r--r--tools/inc/tools/cachestr.hxx22
-rw-r--r--tools/inc/tools/color.hxx108
-rw-r--r--tools/inc/tools/config.hxx30
-rw-r--r--tools/inc/tools/contnr.hxx56
-rw-r--r--tools/inc/tools/date.hxx42
-rw-r--r--tools/inc/tools/datetime.hxx20
-rw-r--r--tools/inc/tools/debug.hxx80
-rw-r--r--tools/inc/tools/dynary.hxx32
-rw-r--r--tools/inc/tools/errcode.hxx6
-rw-r--r--tools/inc/tools/errinf.hxx64
-rw-r--r--tools/inc/tools/fontenum.hxx2
-rw-r--r--tools/inc/tools/fract.hxx34
-rw-r--r--tools/inc/tools/fsys.hxx124
-rw-r--r--tools/inc/tools/gen.hxx52
-rw-r--r--tools/inc/tools/geninfo.hxx80
-rwxr-xr-x[-rw-r--r--]tools/inc/tools/globname.hxx30
-rwxr-xr-x[-rw-r--r--]tools/inc/tools/inetmime.hxx6
-rw-r--r--tools/inc/tools/inetmsg.hxx82
-rw-r--r--tools/inc/tools/inetstrm.hxx44
-rw-r--r--tools/inc/tools/iparser.hxx30
-rw-r--r--tools/inc/tools/line.hxx6
-rw-r--r--tools/inc/tools/link.hxx24
-rw-r--r--tools/inc/tools/list.hxx36
-rw-r--r--tools/inc/tools/mempool.hxx6
-rw-r--r--tools/inc/tools/multisel.hxx40
-rw-r--r--tools/inc/tools/ownlist.hxx18
-rw-r--r--tools/inc/tools/poly.hxx102
-rw-r--r--tools/inc/tools/postsys.h10
-rw-r--r--tools/inc/tools/postwin.h6
-rw-r--r--tools/inc/tools/presys.h3
-rw-r--r--tools/inc/tools/prewin.h9
-rw-r--r--tools/inc/tools/prex.h4
-rw-r--r--tools/inc/tools/pstm.hxx68
-rw-r--r--tools/inc/tools/queue.hxx24
-rw-r--r--tools/inc/tools/rc.hxx4
-rw-r--r--tools/inc/tools/ref.hxx78
-rw-r--r--tools/inc/tools/resid.hxx6
-rw-r--r--tools/inc/tools/resmgr.hxx22
-rw-r--r--tools/inc/tools/rtti.hxx26
-rw-r--r--tools/inc/tools/shl.hxx2
-rw-r--r--tools/inc/tools/solar.h145
-rw-r--r--tools/inc/tools/stack.hxx22
-rw-r--r--tools/inc/tools/stream.hxx24
-rwxr-xr-x[-rw-r--r--]tools/inc/tools/string.hxx108
-rw-r--r--tools/inc/tools/svborder.hxx6
-rw-r--r--tools/inc/tools/table.hxx60
-rw-r--r--tools/inc/tools/tenccvt.hxx4
-rw-r--r--tools/inc/tools/time.hxx56
-rw-r--r--tools/inc/tools/unqid.hxx24
-rw-r--r--tools/inc/tools/unqidx.hxx64
-rw-r--r--tools/inc/tools/vcompat.hxx22
-rw-r--r--tools/inc/tools/vector2d.hxx12
-rw-r--r--tools/inc/tools/wintypes.hxx4
-rw-r--r--tools/inc/tools/wldcrd.hxx8
-rw-r--r--tools/inc/tools/zcodec.hxx50
57 files changed, 1004 insertions, 1053 deletions
diff --git a/tools/inc/tools/StringListResource.hxx b/tools/inc/tools/StringListResource.hxx
index 9709435407fb..3f7f6dcc610a 100644
--- a/tools/inc/tools/StringListResource.hxx
+++ b/tools/inc/tools/StringListResource.hxx
@@ -39,7 +39,7 @@ namespace tools
public:
StringListResource(const ResId& _aResId,::std::vector< ::rtl::OUString>& _rToFill ) : Resource(_aResId)
{
- USHORT i = 1;
+ sal_uInt16 i = 1;
while( IsAvailableRes(ResId(i,*m_pResMgr).SetRT(RSC_STRING)) )
{
String sStr = String(ResId(i,*m_pResMgr));
diff --git a/tools/inc/tools/bigint.hxx b/tools/inc/tools/bigint.hxx
index 353fbb063191..9a5f1e6de886 100644
--- a/tools/inc/tools/bigint.hxx
+++ b/tools/inc/tools/bigint.hxx
@@ -93,8 +93,8 @@ public:
operator long() const;
operator int() const;
operator double() const;
- operator USHORT() const;
- operator ULONG() const;
+ operator sal_uInt16() const;
+ operator sal_uIntPtr() const;
void Set( sal_Bool bSet ) { bIsSet = bSet; }
ByteString GetByteString() const;
@@ -199,10 +199,10 @@ inline BigInt::operator int() const
return 0;
}
-inline BigInt::operator USHORT() const
+inline BigInt::operator sal_uInt16() const
{
if ( !bIsBig && nVal >= 0 && nVal <= USHRT_MAX )
- return (USHORT)nVal;
+ return (sal_uInt16)nVal;
else
return 0;
}
diff --git a/tools/inc/tools/cachestr.hxx b/tools/inc/tools/cachestr.hxx
index 1819792bb386..26085fb49e8b 100644
--- a/tools/inc/tools/cachestr.hxx
+++ b/tools/inc/tools/cachestr.hxx
@@ -42,7 +42,7 @@ class TOOLS_DLLPUBLIC SvCacheStream : public SvStream
{
private:
String aFileName;
- ULONG nMaxSize;
+ sal_uIntPtr nMaxSize;
int bPersistent;
SvStream* pSwapStream;
@@ -51,17 +51,17 @@ private:
Link aFilenameLinkHdl;
- TOOLS_DLLPRIVATE virtual ULONG GetData( void* pData, ULONG nSize );
- TOOLS_DLLPRIVATE virtual ULONG PutData( const void* pData, ULONG nSize );
- TOOLS_DLLPRIVATE virtual ULONG SeekPos( ULONG nPos );
+ TOOLS_DLLPRIVATE virtual sal_uIntPtr GetData( void* pData, sal_uIntPtr nSize );
+ TOOLS_DLLPRIVATE virtual sal_uIntPtr PutData( const void* pData, sal_uIntPtr nSize );
+ TOOLS_DLLPRIVATE virtual sal_uIntPtr SeekPos( sal_uIntPtr nPos );
TOOLS_DLLPRIVATE virtual void FlushData();
- TOOLS_DLLPRIVATE virtual void SetSize( ULONG nSize );
+ TOOLS_DLLPRIVATE virtual void SetSize( sal_uIntPtr nSize );
public:
- SvCacheStream( ULONG nMaxMemSize = 0 );
+ SvCacheStream( sal_uIntPtr nMaxMemSize = 0 );
SvCacheStream( const String &rFileName,
- ULONG nExpectedSize = 0,
- ULONG nMaxMemSize = 0 );
+ sal_uIntPtr nExpectedSize = 0,
+ sal_uIntPtr nMaxMemSize = 0 );
~SvCacheStream();
void SetFilenameHdl( const Link& rLink);
@@ -72,10 +72,10 @@ public:
void SwapOut();
const void* GetBuffer();
- ULONG GetSize();
+ sal_uIntPtr GetSize();
- BOOL IsPersistent() { return bPersistent != 0; }
- void SetPersistence( BOOL b = TRUE ) { bPersistent = b; }
+ sal_Bool IsPersistent() { return bPersistent != 0; }
+ void SetPersistence( sal_Bool b = sal_True ) { bPersistent = b; }
void SetSwapStream( SvStream *p )
{ pSwapStream = p; } // darf nur vom FilenameHdl gerufen werden!
};
diff --git a/tools/inc/tools/color.hxx b/tools/inc/tools/color.hxx
index a99ad1dd11c4..ad34f1e9de08 100644
--- a/tools/inc/tools/color.hxx
+++ b/tools/inc/tools/color.hxx
@@ -41,24 +41,24 @@ class ResId;
// - ColorCount-Types -
// --------------------
-#define COLCOUNT_MONOCHROM ((ULONG)2)
-#define COLCOUNT_16 ((ULONG)16)
-#define COLCOUNT_256 ((ULONG)256)
-#define COLCOUNT_HICOLOR1 (((ULONG)0x00007FFF)+1)
-#define COLCOUNT_HICOLOR2 (((ULONG)0x0000FFFF)+1)
-#define COLCOUNT_TRUECOLOR (((ULONG)0x00FFFFFF)+1)
+#define COLCOUNT_MONOCHROM ((sal_uIntPtr)2)
+#define COLCOUNT_16 ((sal_uIntPtr)16)
+#define COLCOUNT_256 ((sal_uIntPtr)256)
+#define COLCOUNT_HICOLOR1 (((sal_uIntPtr)0x00007FFF)+1)
+#define COLCOUNT_HICOLOR2 (((sal_uIntPtr)0x0000FFFF)+1)
+#define COLCOUNT_TRUECOLOR (((sal_uIntPtr)0x00FFFFFF)+1)
// ---------------
// - Color-Types -
// ---------------
-typedef UINT32 ColorData;
-#define RGB_COLORDATA( r,g,b ) ((ColorData)(((UINT32)((UINT8)(b))))|(((UINT32)((UINT8)(g)))<<8)|(((UINT32)((UINT8)(r)))<<16))
-#define TRGB_COLORDATA( t,r,g,b ) ((ColorData)(((UINT32)((UINT8)(b))))|(((UINT32)((UINT8)(g)))<<8)|(((UINT32)((UINT8)(r)))<<16)|(((UINT32)((UINT8)(t)))<<24))
-#define COLORDATA_RED( n ) ((UINT8)((n)>>16))
-#define COLORDATA_GREEN( n ) ((UINT8)(((UINT16)(n)) >> 8))
-#define COLORDATA_BLUE( n ) ((UINT8)(n))
-#define COLORDATA_TRANSPARENCY( n ) ((UINT8)((n)>>24))
+typedef sal_uInt32 ColorData;
+#define RGB_COLORDATA( r,g,b ) ((ColorData)(((sal_uInt32)((sal_uInt8)(b))))|(((sal_uInt32)((sal_uInt8)(g)))<<8)|(((sal_uInt32)((sal_uInt8)(r)))<<16))
+#define TRGB_COLORDATA( t,r,g,b ) ((ColorData)(((sal_uInt32)((sal_uInt8)(b))))|(((sal_uInt32)((sal_uInt8)(g)))<<8)|(((sal_uInt32)((sal_uInt8)(r)))<<16)|(((sal_uInt32)((sal_uInt8)(t)))<<24))
+#define COLORDATA_RED( n ) ((sal_uInt8)((n)>>16))
+#define COLORDATA_GREEN( n ) ((sal_uInt8)(((sal_uInt16)(n)) >> 8))
+#define COLORDATA_BLUE( n ) ((sal_uInt8)(n))
+#define COLORDATA_TRANSPARENCY( n ) ((sal_uInt8)((n)>>24))
#define COLORDATA_RGB( n ) ((ColorData)((n) & 0x00FFFFFF))
#define COL_BLACK RGB_COLORDATA( 0x00, 0x00, 0x00 )
@@ -108,7 +108,7 @@ typedef UINT32 ColorData;
#define COL_AUTHOR9_LIGHT RGB_COLORDATA(255, 231, 199)
#define COLOR_CHANNEL_MERGE( _def_cDst, _def_cSrc, _def_cSrcTrans ) \
- ((BYTE)((((long)(_def_cDst)-(_def_cSrc))*(_def_cSrcTrans)+(((_def_cSrc)<<8L)|(_def_cDst)))>>8L))
+ ((sal_uInt8)((((long)(_def_cDst)-(_def_cSrc))*(_def_cSrcTrans)+(((_def_cSrc)<<8L)|(_def_cDst)))>>8L))
// ---------
// - Color -
@@ -122,9 +122,9 @@ protected:
public:
Color() { mnColor = COL_BLACK; }
Color( ColorData nColor ) { mnColor = nColor; }
- Color( UINT8 nRed, UINT8 nGreen, UINT8 nBlue )
+ Color( sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue )
{ mnColor = RGB_COLORDATA( nRed, nGreen, nBlue ); }
- Color( UINT8 nTransparency, UINT8 nRed, UINT8 nGreen, UINT8 nBlue )
+ Color( sal_uInt8 nTransparency, sal_uInt8 nRed, sal_uInt8 nGreen, sal_uInt8 nBlue )
{ mnColor = TRGB_COLORDATA( nTransparency, nRed, nGreen, nBlue ); }
Color( const ResId& rResId );
// This ctor is defined in svtools, not tools!
@@ -133,58 +133,58 @@ public:
explicit Color(const ::basegfx::BColor& rBColor)
{
mnColor = RGB_COLORDATA(
- UINT8((rBColor.getRed() * 255.0) + 0.5),
- UINT8((rBColor.getGreen() * 255.0) + 0.5),
- UINT8((rBColor.getBlue() * 255.0) + 0.5));
+ sal_uInt8((rBColor.getRed() * 255.0) + 0.5),
+ sal_uInt8((rBColor.getGreen() * 255.0) + 0.5),
+ sal_uInt8((rBColor.getBlue() * 255.0) + 0.5));
}
- void SetRed( UINT8 nRed );
- UINT8 GetRed() const { return COLORDATA_RED( mnColor ); }
- void SetGreen( UINT8 nGreen );
- UINT8 GetGreen() const { return COLORDATA_GREEN( mnColor ); }
- void SetBlue( UINT8 nBlue );
- UINT8 GetBlue() const { return COLORDATA_BLUE( mnColor ); }
- void SetTransparency( UINT8 nTransparency );
- UINT8 GetTransparency() const { return COLORDATA_TRANSPARENCY( mnColor ); }
+ void SetRed( sal_uInt8 nRed );
+ sal_uInt8 GetRed() const { return COLORDATA_RED( mnColor ); }
+ void SetGreen( sal_uInt8 nGreen );
+ sal_uInt8 GetGreen() const { return COLORDATA_GREEN( mnColor ); }
+ void SetBlue( sal_uInt8 nBlue );
+ sal_uInt8 GetBlue() const { return COLORDATA_BLUE( mnColor ); }
+ void SetTransparency( sal_uInt8 nTransparency );
+ sal_uInt8 GetTransparency() const { return COLORDATA_TRANSPARENCY( mnColor ); }
void SetColor( ColorData nColor ) { mnColor = nColor; }
ColorData GetColor() const { return mnColor; }
ColorData GetRGBColor() const { return COLORDATA_RGB( mnColor ); }
- UINT8 GetColorError( const Color& rCompareColor ) const;
+ sal_uInt8 GetColorError( const Color& rCompareColor ) const;
- UINT8 GetLuminance() const;
- void IncreaseLuminance( UINT8 cLumInc );
- void DecreaseLuminance( UINT8 cLumDec );
+ sal_uInt8 GetLuminance() const;
+ void IncreaseLuminance( sal_uInt8 cLumInc );
+ void DecreaseLuminance( sal_uInt8 cLumDec );
- void IncreaseContrast( UINT8 cContInc );
- void DecreaseContrast( UINT8 cContDec );
+ void IncreaseContrast( sal_uInt8 cContInc );
+ void DecreaseContrast( sal_uInt8 cContDec );
void Invert();
- void Merge( const Color& rMergeColor, BYTE cTransparency );
+ void Merge( const Color& rMergeColor, sal_uInt8 cTransparency );
- BOOL IsRGBEqual( const Color& rColor ) const;
+ sal_Bool IsRGBEqual( const Color& rColor ) const;
// comparison with luminance thresholds
- BOOL IsDark() const;
- BOOL IsBright() const;
+ sal_Bool IsDark() const;
+ sal_Bool IsBright() const;
// color space conversion tools
// the range for h/s/b is:
// Hue: 0-360 degree
// Saturation: 0-100 %
// Brightness: 0-100 %
- static ColorData HSBtoRGB( USHORT nHue, USHORT nSat, USHORT nBri );
- void RGBtoHSB( USHORT& nHue, USHORT& nSat, USHORT& nBri ) const;
+ static ColorData HSBtoRGB( sal_uInt16 nHue, sal_uInt16 nSat, sal_uInt16 nBri );
+ void RGBtoHSB( sal_uInt16& nHue, sal_uInt16& nSat, sal_uInt16& nBri ) const;
- BOOL operator==( const Color& rColor ) const
+ sal_Bool operator==( const Color& rColor ) const
{ return (mnColor == rColor.mnColor); }
- BOOL operator!=( const Color& rColor ) const
+ sal_Bool operator!=( const Color& rColor ) const
{ return !(Color::operator==( rColor )); }
- SvStream& Read( SvStream& rIStm, BOOL bNewFormat = TRUE );
- SvStream& Write( SvStream& rOStm, BOOL bNewFormat = TRUE );
+ SvStream& Read( SvStream& rIStm, sal_Bool bNewFormat = sal_True );
+ SvStream& Write( SvStream& rOStm, sal_Bool bNewFormat = sal_True );
TOOLS_DLLPUBLIC friend SvStream& operator>>( SvStream& rIStream, Color& rColor );
TOOLS_DLLPUBLIC friend SvStream& operator<<( SvStream& rOStream, const Color& rColor );
@@ -193,43 +193,43 @@ public:
::basegfx::BColor getBColor() const { return ::basegfx::BColor(GetRed() / 255.0, GetGreen() / 255.0, GetBlue() / 255.0); }
};
-inline void Color::SetRed( UINT8 nRed )
+inline void Color::SetRed( sal_uInt8 nRed )
{
mnColor &= 0xFF00FFFF;
- mnColor |= ((UINT32)nRed)<<16;
+ mnColor |= ((sal_uInt32)nRed)<<16;
}
-inline void Color::SetGreen( UINT8 nGreen )
+inline void Color::SetGreen( sal_uInt8 nGreen )
{
mnColor &= 0xFFFF00FF;
- mnColor |= ((UINT16)nGreen)<<8;
+ mnColor |= ((sal_uInt16)nGreen)<<8;
}
-inline void Color::SetBlue( UINT8 nBlue )
+inline void Color::SetBlue( sal_uInt8 nBlue )
{
mnColor &= 0xFFFFFF00;
mnColor |= nBlue;
}
-inline void Color::SetTransparency( UINT8 nTransparency )
+inline void Color::SetTransparency( sal_uInt8 nTransparency )
{
mnColor &= 0x00FFFFFF;
- mnColor |= ((UINT32)nTransparency)<<24;
+ mnColor |= ((sal_uInt32)nTransparency)<<24;
}
-inline BOOL Color::IsRGBEqual( const Color& rColor ) const
+inline sal_Bool Color::IsRGBEqual( const Color& rColor ) const
{
return (COLORDATA_RGB( mnColor ) == COLORDATA_RGB( rColor.mnColor ));
}
-inline UINT8 Color::GetLuminance() const
+inline sal_uInt8 Color::GetLuminance() const
{
- return( (UINT8) ( ( COLORDATA_BLUE( mnColor ) * 28UL +
+ return( (sal_uInt8) ( ( COLORDATA_BLUE( mnColor ) * 28UL +
COLORDATA_GREEN( mnColor ) * 151UL +
COLORDATA_RED( mnColor ) * 77UL ) >> 8UL ) );
}
-inline void Color::Merge( const Color& rMergeColor, BYTE cTransparency )
+inline void Color::Merge( const Color& rMergeColor, sal_uInt8 cTransparency )
{
SetRed( COLOR_CHANNEL_MERGE( COLORDATA_RED( mnColor ), COLORDATA_RED( rMergeColor.mnColor ), cTransparency ) );
SetGreen( COLOR_CHANNEL_MERGE( COLORDATA_GREEN( mnColor ), COLORDATA_GREEN( rMergeColor.mnColor ), cTransparency ) );
diff --git a/tools/inc/tools/config.hxx b/tools/inc/tools/config.hxx
index cb64cc2ec5bd..d0df492f5488 100644
--- a/tools/inc/tools/config.hxx
+++ b/tools/inc/tools/config.hxx
@@ -44,13 +44,13 @@ private:
ByteString maGroupName;
ImplConfigData* mpData;
ImplGroupData* mpActGroup;
- ULONG mnDataUpdateId;
- USHORT mnLockCount;
- BOOL mbPersistence;
- BOOL mbDummy1;
+ sal_uIntPtr mnDataUpdateId;
+ sal_uInt16 mnLockCount;
+ sal_Bool mbPersistence;
+ sal_Bool mbDummy1;
#ifdef _CONFIG_CXX
- TOOLS_DLLPRIVATE BOOL ImplUpdateConfig() const;
+ TOOLS_DLLPRIVATE sal_Bool ImplUpdateConfig() const;
TOOLS_DLLPRIVATE ImplGroupData* ImplGetGroup() const;
#endif
@@ -66,9 +66,9 @@ public:
void SetGroup( const ByteString& rGroup );
const ByteString& GetGroup() const { return maGroupName; }
void DeleteGroup( const ByteString& rGroup );
- ByteString GetGroupName( USHORT nGroup ) const;
- USHORT GetGroupCount() const;
- BOOL HasGroup( const ByteString& rGroup ) const;
+ ByteString GetGroupName( sal_uInt16 nGroup ) const;
+ sal_uInt16 GetGroupCount() const;
+ sal_Bool HasGroup( const ByteString& rGroup ) const;
ByteString ReadKey( const ByteString& rKey ) const;
UniString ReadKey( const ByteString& rKey, rtl_TextEncoding eEncoding ) const;
@@ -76,19 +76,19 @@ public:
void WriteKey( const ByteString& rKey, const ByteString& rValue );
void WriteKey( const ByteString& rKey, const UniString& rValue, rtl_TextEncoding eEncoding );
void DeleteKey( const ByteString& rKey );
- ByteString GetKeyName( USHORT nKey ) const;
- ByteString ReadKey( USHORT nKey ) const;
- USHORT GetKeyCount() const;
+ ByteString GetKeyName( sal_uInt16 nKey ) const;
+ ByteString ReadKey( sal_uInt16 nKey ) const;
+ sal_uInt16 GetKeyCount() const;
void EnterLock();
void LeaveLock();
- BOOL IsLocked() const { return (mnLockCount != 0); }
- BOOL Update();
+ sal_Bool IsLocked() const { return (mnLockCount != 0); }
+ sal_Bool Update();
void Flush();
- void EnablePersistence( BOOL bPersistence = TRUE )
+ void EnablePersistence( sal_Bool bPersistence = sal_True )
{ mbPersistence = bPersistence; }
- BOOL IsPersistenceEnabled() const { return mbPersistence; }
+ sal_Bool IsPersistenceEnabled() const { return mbPersistence; }
void SetLineEnd( LineEnd eLineEnd );
LineEnd GetLineEnd() const;
diff --git a/tools/inc/tools/contnr.hxx b/tools/inc/tools/contnr.hxx
index 5cf8e7b74569..804482afaea5 100644
--- a/tools/inc/tools/contnr.hxx
+++ b/tools/inc/tools/contnr.hxx
@@ -39,7 +39,7 @@ class CBlock;
// -------------
// Maximale Blockgroesse
-#define CONTAINER_MAXBLOCKSIZE ((USHORT)0x3FF0)
+#define CONTAINER_MAXBLOCKSIZE ((sal_uInt16)0x3FF0)
#define CONTAINER_APPEND ULONG_MAX
#define CONTAINER_ENTRY_NOTFOUND ULONG_MAX
@@ -50,11 +50,11 @@ private:
CBlock* pFirstBlock;
CBlock* pCurBlock;
CBlock* pLastBlock;
- USHORT nCurIndex;
- USHORT nBlockSize;
- USHORT nInitSize;
- USHORT nReSize;
- ULONG nCount;
+ sal_uInt16 nCurIndex;
+ sal_uInt16 nBlockSize;
+ sal_uInt16 nInitSize;
+ sal_uInt16 nReSize;
+ sal_uIntPtr nCount;
TOOLS_DLLPRIVATE void ImpCopyContainer(Container const *);
#if defined DBG_UTIL
@@ -63,49 +63,49 @@ private:
protected:
#ifdef _IMPCONT_HXX
- void ImpInsert( void* p, CBlock* pBlock, USHORT nIndex );
- void* ImpRemove( CBlock* pBlock, USHORT nIndex );
- void* ImpGetObject( ULONG nIndex ) const;
+ void ImpInsert( void* p, CBlock* pBlock, sal_uInt16 nIndex );
+ void* ImpRemove( CBlock* pBlock, sal_uInt16 nIndex );
+ void* ImpGetObject( sal_uIntPtr nIndex ) const;
void** ImpGetOnlyNodes() const;
#endif
- void** GetObjectPtr( ULONG nIndex );
+ void** GetObjectPtr( sal_uIntPtr nIndex );
public:
- Container( USHORT nBlockSize,
- USHORT nInitSize,
- USHORT nReSize );
- Container( ULONG nSize );
+ Container( sal_uInt16 nBlockSize,
+ sal_uInt16 nInitSize,
+ sal_uInt16 nReSize );
+ Container( sal_uIntPtr nSize );
Container( const Container& rContainer );
~Container();
void Insert( void* p );
- void Insert( void* p, ULONG nIndex );
+ void Insert( void* p, sal_uIntPtr nIndex );
void Insert( void* pNew, void* pOld );
void* Remove();
- void* Remove( ULONG nIndex );
+ void* Remove( sal_uIntPtr nIndex );
void* Remove( void* p )
{ return Remove( GetPos( p ) ); }
void* Replace( void* p );
- void* Replace( void* p, ULONG nIndex );
+ void* Replace( void* p, sal_uIntPtr nIndex );
void* Replace( void* pNew, void* pOld )
{ return Replace( pNew, GetPos( pOld ) ); }
- void SetSize( ULONG nNewSize );
- ULONG GetSize() const { return nCount; }
+ void SetSize( sal_uIntPtr nNewSize );
+ sal_uIntPtr GetSize() const { return nCount; }
- ULONG Count() const { return nCount; }
+ sal_uIntPtr Count() const { return nCount; }
void Clear();
void* GetCurObject() const;
- ULONG GetCurPos() const;
- void* GetObject( ULONG nIndex ) const;
- ULONG GetPos( const void* p ) const;
- ULONG GetPos( const void* p, ULONG nStartIndex,
- BOOL bForward = TRUE ) const;
+ sal_uIntPtr GetCurPos() const;
+ void* GetObject( sal_uIntPtr nIndex ) const;
+ sal_uIntPtr GetPos( const void* p ) const;
+ sal_uIntPtr GetPos( const void* p, sal_uIntPtr nStartIndex,
+ sal_Bool bForward = sal_True ) const;
- void* Seek( ULONG nIndex );
+ void* Seek( sal_uIntPtr nIndex );
void* Seek( void* p ) { return Seek( GetPos( p ) ); }
void* First();
@@ -115,8 +115,8 @@ public:
Container& operator =( const Container& rContainer );
- BOOL operator ==( const Container& rContainer ) const;
- BOOL operator !=( const Container& rContainer ) const
+ sal_Bool operator ==( const Container& rContainer ) const;
+ sal_Bool operator !=( const Container& rContainer ) const
{ return !(Container::operator==( rContainer )); }
};
diff --git a/tools/inc/tools/date.hxx b/tools/inc/tools/date.hxx
index 50b31edb0f83..6e4a2291d954 100644
--- a/tools/inc/tools/date.hxx
+++ b/tools/inc/tools/date.hxx
@@ -54,7 +54,7 @@ public:
Date( sal_uInt32 _nDate ) { Date::nDate = _nDate; }
Date( const Date& rDate )
{ nDate = rDate.nDate; }
- Date( USHORT nDay, USHORT nMonth, USHORT nYear )
+ Date( sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear )
{ nDate = ( sal_uInt32( nDay % 100 ) ) +
( ( sal_uInt32( nMonth % 100 ) ) * 100 ) +
( ( sal_uInt32( nYear % 10000 ) ) * 10000); }
@@ -62,40 +62,40 @@ public:
void SetDate( sal_uInt32 nNewDate ) { nDate = nNewDate; }
sal_uInt32 GetDate() const { return nDate; }
- void SetDay( USHORT nNewDay );
- void SetMonth( USHORT nNewMonth );
- void SetYear( USHORT nNewYear );
- USHORT GetDay() const { return (USHORT)(nDate % 100); }
- USHORT GetMonth() const { return (USHORT)((nDate / 100) % 100); }
- USHORT GetYear() const { return (USHORT)(nDate / 10000); }
+ void SetDay( sal_uInt16 nNewDay );
+ void SetMonth( sal_uInt16 nNewMonth );
+ void SetYear( sal_uInt16 nNewYear );
+ sal_uInt16 GetDay() const { return (sal_uInt16)(nDate % 100); }
+ sal_uInt16 GetMonth() const { return (sal_uInt16)((nDate / 100) % 100); }
+ sal_uInt16 GetYear() const { return (sal_uInt16)(nDate / 10000); }
DayOfWeek GetDayOfWeek() const;
- USHORT GetDayOfYear() const;
+ sal_uInt16 GetDayOfYear() const;
/** nMinimumNumberOfDaysInWeek: how many days of a week must reside in the
first week of a year. */
- USHORT GetWeekOfYear( DayOfWeek eStartDay = MONDAY,
+ sal_uInt16 GetWeekOfYear( DayOfWeek eStartDay = MONDAY,
sal_Int16 nMinimumNumberOfDaysInWeek = 4 ) const;
- USHORT GetDaysInMonth() const;
- USHORT GetDaysInYear() const { return (IsLeapYear()) ? 366 : 365; }
- BOOL IsLeapYear() const;
- BOOL IsValid() const;
+ sal_uInt16 GetDaysInMonth() const;
+ sal_uInt16 GetDaysInYear() const { return (IsLeapYear()) ? 366 : 365; }
+ sal_Bool IsLeapYear() const;
+ sal_Bool IsValid() const;
- BOOL IsBetween( const Date& rFrom, const Date& rTo ) const
+ sal_Bool IsBetween( const Date& rFrom, const Date& rTo ) const
{ return ((nDate >= rFrom.nDate) &&
(nDate <= rTo.nDate)); }
- BOOL operator ==( const Date& rDate ) const
+ sal_Bool operator ==( const Date& rDate ) const
{ return (nDate == rDate.nDate); }
- BOOL operator !=( const Date& rDate ) const
+ sal_Bool operator !=( const Date& rDate ) const
{ return (nDate != rDate.nDate); }
- BOOL operator >( const Date& rDate ) const
+ sal_Bool operator >( const Date& rDate ) const
{ return (nDate > rDate.nDate); }
- BOOL operator <( const Date& rDate ) const
+ sal_Bool operator <( const Date& rDate ) const
{ return (nDate < rDate.nDate); }
- BOOL operator >=( const Date& rDate ) const
+ sal_Bool operator >=( const Date& rDate ) const
{ return (nDate >= rDate.nDate); }
- BOOL operator <=( const Date& rDate ) const
+ sal_Bool operator <=( const Date& rDate ) const
{ return (nDate <= rDate.nDate); }
Date& operator =( const Date& rDate )
@@ -113,7 +113,7 @@ public:
TOOLS_DLLPUBLIC friend Date operator -( const Date& rDate, long nDays );
TOOLS_DLLPUBLIC friend long operator -( const Date& rDate1, const Date& rDate2 );
- static long DateToDays( USHORT nDay, USHORT nMonth, USHORT nYear );
+ static long DateToDays( sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear );
};
diff --git a/tools/inc/tools/datetime.hxx b/tools/inc/tools/datetime.hxx
index 1a782486250b..c642045c0e76 100644
--- a/tools/inc/tools/datetime.hxx
+++ b/tools/inc/tools/datetime.hxx
@@ -47,29 +47,29 @@ public:
DateTime( const Date& rDate, const Time& rTime ) :
Date( rDate ), Time( rTime ) {}
- BOOL IsBetween( const DateTime& rFrom,
+ sal_Bool IsBetween( const DateTime& rFrom,
const DateTime& rTo ) const;
- BOOL IsEqualIgnore100Sec( const DateTime& rDateTime ) const
+ sal_Bool IsEqualIgnore100Sec( const DateTime& rDateTime ) const
{
if ( Date::operator!=( rDateTime ) )
- return FALSE;
+ return sal_False;
return Time::IsEqualIgnore100Sec( rDateTime );
}
- BOOL operator ==( const DateTime& rDateTime ) const
+ sal_Bool operator ==( const DateTime& rDateTime ) const
{ return (Date::operator==( rDateTime ) &&
Time::operator==( rDateTime )); }
- BOOL operator !=( const DateTime& rDateTime ) const
+ sal_Bool operator !=( const DateTime& rDateTime ) const
{ return (Date::operator!=( rDateTime ) ||
Time::operator!=( rDateTime )); }
- BOOL operator >( const DateTime& rDateTime ) const;
- BOOL operator <( const DateTime& rDateTime ) const;
- BOOL operator >=( const DateTime& rDateTime ) const;
- BOOL operator <=( const DateTime& rDateTime ) const;
+ sal_Bool operator >( const DateTime& rDateTime ) const;
+ sal_Bool operator <( const DateTime& rDateTime ) const;
+ sal_Bool operator >=( const DateTime& rDateTime ) const;
+ sal_Bool operator <=( const DateTime& rDateTime ) const;
long GetSecFromDateTime( const Date& rDate ) const;
- void MakeDateTimeFromSec( const Date& rDate, ULONG nSec );
+ void MakeDateTimeFromSec( const Date& rDate, sal_uIntPtr nSec );
void ConvertToUTC() { *this -= Time::GetUTCOffset(); }
void ConvertToLocalTime() { *this += Time::GetUTCOffset(); }
diff --git a/tools/inc/tools/debug.hxx b/tools/inc/tools/debug.hxx
index b8aa1c8b59fe..4d640642c69d 100644
--- a/tools/inc/tools/debug.hxx
+++ b/tools/inc/tools/debug.hxx
@@ -93,15 +93,15 @@ typedef void (*DbgTestSolarMutexProc)();
struct DbgData
{
- ULONG nTestFlags;
- ULONG bOverwrite;
- ULONG nTraceOut;
- ULONG nWarningOut;
- ULONG nErrorOut;
- ULONG bHookOSLAssert;
- BYTE bMemInit;
- BYTE bMemBound;
- BYTE bMemFree;
+ sal_uIntPtr nTestFlags;
+ sal_uIntPtr bOverwrite;
+ sal_uIntPtr nTraceOut;
+ sal_uIntPtr nWarningOut;
+ sal_uIntPtr nErrorOut;
+ sal_uIntPtr bHookOSLAssert;
+ sal_uInt8 bMemInit;
+ sal_uInt8 bMemBound;
+ sal_uInt8 bMemFree;
sal_Char aDebugName[260];
sal_Char aInclFilter[512];
sal_Char aExclFilter[512];
@@ -138,7 +138,7 @@ struct DbgDataType
#define DBG_FUNC_FILTERMESSAGE 18 // new for #i38967
#define DBG_FUNC_UPDATEOSLHOOK 19
-TOOLS_DLLPUBLIC void* DbgFunc( USHORT nAction, void* pData = NULL );
+TOOLS_DLLPUBLIC void* DbgFunc( sal_uInt16 nAction, void* pData = NULL );
inline void DbgUpdateOslHook( DbgData* pData )
{
@@ -180,7 +180,7 @@ inline void DbgSetPrintTestTool( DbgPrintLine pProc )
DbgFunc( DBG_FUNC_SETPRINTTESTTOOL, (void*)(long)pProc );
}
-typedef USHORT DbgChannelId;
+typedef sal_uInt16 DbgChannelId;
/** registers a user-defined channel for emitting the diagnostic messages
Note that such a user-defined channel cannot be revoked during the lifetime
@@ -199,9 +199,9 @@ typedef USHORT DbgChannelId;
*/
TOOLS_DLLPUBLIC DbgChannelId DbgRegisterUserChannel( DbgPrintLine pProc );
-inline BOOL DbgFilterMessage( const char* pMsg )
+inline sal_Bool DbgFilterMessage( const char* pMsg )
{
- return (BOOL)(long) DbgFunc( DBG_FUNC_FILTERMESSAGE, (void*)pMsg );
+ return (sal_Bool)(long) DbgFunc( DBG_FUNC_FILTERMESSAGE, (void*)pMsg );
}
inline int DbgIsAllErrorOut()
@@ -219,34 +219,34 @@ inline void DbgSaveData( const DbgData& rData )
DbgFunc( DBG_FUNC_SAVEDATA, (void*)&rData );
}
-inline ULONG DbgIsTraceOut()
+inline sal_uIntPtr DbgIsTraceOut()
{
DbgData* pData = DbgGetData();
if ( pData )
return (pData->nTraceOut != DBG_OUT_NULL);
else
- return FALSE;
+ return sal_False;
}
-inline ULONG DbgIsWarningOut()
+inline sal_uIntPtr DbgIsWarningOut()
{
DbgData* pData = DbgGetData();
if ( pData )
return (pData->nWarningOut != DBG_OUT_NULL);
else
- return FALSE;
+ return sal_False;
}
-inline ULONG DbgIsErrorOut()
+inline sal_uIntPtr DbgIsErrorOut()
{
DbgData* pData = DbgGetData();
if ( pData )
return (pData->nErrorOut != DBG_OUT_NULL);
else
- return FALSE;
+ return sal_False;
}
-inline ULONG DbgGetErrorOut() // Testtool: test wether to collect OSL_ASSERTions as well
+inline sal_uIntPtr DbgGetErrorOut() // Testtool: test wether to collect OSL_ASSERTions as well
{
DbgData* pData = DbgGetData();
if ( pData )
@@ -255,41 +255,41 @@ inline ULONG DbgGetErrorOut() // Testtool: test wether to collect OSL_ASSERTio
return DBG_OUT_NULL;
}
-inline ULONG DbgIsAssertWarning()
+inline sal_uIntPtr DbgIsAssertWarning()
{
return DbgIsWarningOut();
}
-inline ULONG DbgIsAssert()
+inline sal_uIntPtr DbgIsAssert()
{
return DbgIsErrorOut();
}
-inline ULONG DbgIsResource()
+inline sal_uIntPtr DbgIsResource()
{
DbgData* pData = DbgGetData();
if ( pData )
return pData->nTestFlags & DBG_TEST_RESOURCE;
else
- return FALSE;
+ return sal_False;
}
-inline ULONG DbgIsDialog()
+inline sal_uIntPtr DbgIsDialog()
{
DbgData* pData = DbgGetData();
if ( pData )
return pData->nTestFlags & DBG_TEST_DIALOG;
else
- return FALSE;
+ return sal_False;
}
-inline ULONG DbgIsBoldAppFont()
+inline sal_uIntPtr DbgIsBoldAppFont()
{
DbgData* pData = DbgGetData();
if ( pData )
return pData->nTestFlags & DBG_TEST_BOLDAPPFONT;
else
- return FALSE;
+ return sal_False;
}
inline void DbgXtorInfo( sal_Char* pBuf )
@@ -326,8 +326,8 @@ inline void DbgPrintFile( const sal_Char* pLine )
TOOLS_DLLPUBLIC void DbgStartStackTree();
TOOLS_DLLPUBLIC void DbgEndStackTree();
-void* DbgGetStackTree( ULONG nAlloc = 0 );
-void DbgFreeStackTree( void* p, ULONG nAlloc = 0 );
+void* DbgGetStackTree( sal_uIntPtr nAlloc = 0 );
+void DbgFreeStackTree( void* p, sal_uIntPtr nAlloc = 0 );
void DbgPrintStackTree( void* p );
// --- Dbg-Output ---
@@ -336,27 +336,27 @@ void DbgPrintStackTree( void* p );
#define DBG_OUT_WARNING 2
#define DBG_OUT_ERROR 3
-TOOLS_DLLPUBLIC void DbgOut( const sal_Char* pMsg, USHORT nOutType = DBG_OUT_TRACE,
- const sal_Char* pFile = NULL, USHORT nLine = 0 );
+TOOLS_DLLPUBLIC void DbgOut( const sal_Char* pMsg, sal_uInt16 nOutType = DBG_OUT_TRACE,
+ const sal_Char* pFile = NULL, sal_uInt16 nLine = 0 );
TOOLS_DLLPUBLIC void DbgPrintShell(char const * message);
-TOOLS_DLLPUBLIC void DbgOutTypef( USHORT nOutType, const sal_Char* pFStr, ... );
+TOOLS_DLLPUBLIC void DbgOutTypef( sal_uInt16 nOutType, const sal_Char* pFStr, ... );
TOOLS_DLLPUBLIC void DbgOutf( const sal_Char* pFStr, ... );
TOOLS_DLLPUBLIC void ImpDbgOutfBuf( sal_Char* pBuf, const sal_Char* pFStr, ... );
inline void DbgTrace( const sal_Char* pMsg,
- const sal_Char* pFile = NULL, USHORT nLine = 0 )
+ const sal_Char* pFile = NULL, sal_uInt16 nLine = 0 )
{
DbgOut( pMsg, DBG_OUT_TRACE, pFile, nLine );
}
inline void DbgWarning( const sal_Char* pMsg,
- const sal_Char* pFile = NULL, USHORT nLine = 0 )
+ const sal_Char* pFile = NULL, sal_uInt16 nLine = 0 )
{
DbgOut( pMsg, DBG_OUT_WARNING, pFile, nLine );
}
inline void DbgError( const sal_Char* pMsg,
- const sal_Char* pFile = NULL, USHORT nLine = 0 )
+ const sal_Char* pFile = NULL, sal_uInt16 nLine = 0 )
{
DbgOut( pMsg, DBG_OUT_ERROR, pFile, nLine );
}
@@ -373,7 +373,7 @@ inline void DbgMemTest( void* p = NULL )
#define DBG_PROF_CONTINUE 3
#define DBG_PROF_PAUSE 4
-TOOLS_DLLPUBLIC void DbgProf( USHORT nAction, DbgDataType* );
+TOOLS_DLLPUBLIC void DbgProf( sal_uInt16 nAction, DbgDataType* );
#define DBG_XTOR_CTOR 1
#define DBG_XTOR_DTOR 2
@@ -382,7 +382,7 @@ TOOLS_DLLPUBLIC void DbgProf( USHORT nAction, DbgDataType* );
#define DBG_XTOR_DTOROBJ 0x8000
TOOLS_DLLPUBLIC void DbgXtor( DbgDataType* pDbgData,
- USHORT nAction, const void* pThis, DbgUsr fDbgUsr );
+ sal_uInt16 nAction, const void* pThis, DbgUsr fDbgUsr );
class DbgXtorObj
{
@@ -390,11 +390,11 @@ private:
DbgDataType* pDbgData;
const void* pThis;
DbgUsr fDbgUsr;
- USHORT nAction;
+ sal_uInt16 nAction;
public:
DbgXtorObj( DbgDataType* pData,
- USHORT nAct, const void* pThs, DbgUsr fUsr )
+ sal_uInt16 nAct, const void* pThs, DbgUsr fUsr )
{
DbgXtor( pData, nAct, pThs, fUsr );
pDbgData = pData;
diff --git a/tools/inc/tools/dynary.hxx b/tools/inc/tools/dynary.hxx
index 1693be40e435..d7ed083b8e44 100644
--- a/tools/inc/tools/dynary.hxx
+++ b/tools/inc/tools/dynary.hxx
@@ -44,26 +44,26 @@ public:
using Container::GetSize;
using Container::Clear;
- DynArray( ULONG nSize = 16 ) : Container( nSize ) {}
+ DynArray( sal_uIntPtr nSize = 16 ) : Container( nSize ) {}
DynArray( const DynArray& rAry ) : Container( rAry ) {}
- void* Put( ULONG nIndex, void* p )
+ void* Put( sal_uIntPtr nIndex, void* p )
{ return Container::Replace( p, nIndex ); }
- void* Get( ULONG nIndex ) const
+ void* Get( sal_uIntPtr nIndex ) const
{ return Container::GetObject( nIndex ); }
- ULONG GetIndex( const void* p ) const
+ sal_uIntPtr GetIndex( const void* p ) const
{ return Container::GetPos( p ); }
- ULONG GetIndex( const void* p, ULONG nStartIndex,
- BOOL bForward = TRUE ) const
+ sal_uIntPtr GetIndex( const void* p, sal_uIntPtr nStartIndex,
+ sal_Bool bForward = sal_True ) const
{ return Container::GetPos( p, nStartIndex, bForward ); }
DynArray& operator =( const DynArray& rAry )
{ Container::operator =( rAry ); return *this; }
- BOOL operator ==( const DynArray& rAry ) const
+ sal_Bool operator ==( const DynArray& rAry ) const
{ return Container::operator ==( rAry ); }
- BOOL operator !=( const DynArray& rAry ) const
+ sal_Bool operator !=( const DynArray& rAry ) const
{ return Container::operator !=( rAry ); }
};
@@ -79,20 +79,20 @@ public: \
using DynArray::GetSize; \
using DynArray::Clear; \
\
- ClassName( ULONG nSize = 16 ) : \
+ ClassName( sal_uIntPtr nSize = 16 ) : \
DynArray( nSize ) {} \
ClassName( const ClassName& rClassName ) : \
DynArray( rClassName ) {} \
\
- Type Put( ULONG nIndex, Type p ) \
+ Type Put( sal_uIntPtr nIndex, Type p ) \
{ return (Type)DynArray::Put( nIndex, (void*)p ); } \
- Type Get( ULONG nIndex ) const \
+ Type Get( sal_uIntPtr nIndex ) const \
{ return (Type)DynArray::Get( nIndex ); } \
\
- ULONG GetIndex( const Type p ) const \
+ sal_uIntPtr GetIndex( const Type p ) const \
{ return DynArray::GetIndex( (const void*)p ); } \
- ULONG GetIndex( const Type p, ULONG nStartIndex, \
- BOOL bForward = TRUE ) const \
+ sal_uIntPtr GetIndex( const Type p, sal_uIntPtr nStartIndex, \
+ sal_Bool bForward = sal_True ) const \
{ return DynArray::GetIndex( (const void*)p, \
nStartIndex, \
bForward ); } \
@@ -101,9 +101,9 @@ public: \
{ DynArray::operator =( rClassName ); \
return *this; } \
\
- BOOL operator ==( const ClassName& rAry ) const \
+ sal_Bool operator ==( const ClassName& rAry ) const \
{ return DynArray::operator ==( rAry ); } \
- BOOL operator !=( const ClassName& rAry ) const \
+ sal_Bool operator !=( const ClassName& rAry ) const \
{ return DynArray::operator !=( rAry ); } \
};
diff --git a/tools/inc/tools/errcode.hxx b/tools/inc/tools/errcode.hxx
index cf767b842b7a..404ce7bd6e34 100644
--- a/tools/inc/tools/errcode.hxx
+++ b/tools/inc/tools/errcode.hxx
@@ -95,14 +95,14 @@ Warning || || |
#else
-typedef ULONG ErrCode;
+typedef sal_uIntPtr ErrCode;
-inline ULONG ERRCODE_TOERRID( ULONG x )
+inline sal_uIntPtr ERRCODE_TOERRID( sal_uIntPtr x )
{
return x & ~ERRCODE_DYNAMIC_MASK;
}
-inline ULONG ERRCODE_TOERROR( ULONG x )
+inline sal_uIntPtr ERRCODE_TOERROR( sal_uIntPtr x )
{
return ((x & ERRCODE_WARNING_MASK) ? 0 : (x & ERRCODE_ERROR_MASK));
}
diff --git a/tools/inc/tools/errinf.hxx b/tools/inc/tools/errinf.hxx
index 45141af278b1..e059a7add067 100644
--- a/tools/inc/tools/errinf.hxx
+++ b/tools/inc/tools/errinf.hxx
@@ -47,18 +47,18 @@ class Window;
class ErrorInfo
{
private:
- ULONG lUserId;
+ sal_uIntPtr lUserId;
public:
TYPEINFO();
- ErrorInfo( ULONG lArgUserId ) :
+ ErrorInfo( sal_uIntPtr lArgUserId ) :
lUserId( lArgUserId ){}
virtual ~ErrorInfo(){}
- ULONG GetErrorCode() const { return lUserId; }
+ sal_uIntPtr GetErrorCode() const { return lUserId; }
- static ErrorInfo* GetErrorInfo(ULONG);
+ static ErrorInfo* GetErrorInfo(sal_uIntPtr);
};
@@ -76,11 +76,11 @@ private:
public:
TYPEINFO();
- DynamicErrorInfo(ULONG lUserId, USHORT nMask);
+ DynamicErrorInfo(sal_uIntPtr lUserId, sal_uInt16 nMask);
virtual ~DynamicErrorInfo();
- operator ULONG() const;
- USHORT GetDialogMask() const;
+ operator sal_uIntPtr() const;
+ sal_uInt16 GetDialogMask() const;
};
@@ -91,14 +91,14 @@ public:
class StandardErrorInfo : public DynamicErrorInfo
{
private:
- ULONG lExtId;
+ sal_uIntPtr lExtId;
public:
TYPEINFO();
- StandardErrorInfo( ULONG lUserId, ULONG lExtId,
- USHORT nFlags = 0);
- ULONG GetExtendedErrorCode() const { return lExtId; }
+ StandardErrorInfo( sal_uIntPtr lUserId, sal_uIntPtr lExtId,
+ sal_uInt16 nFlags = 0);
+ sal_uIntPtr GetExtendedErrorCode() const { return lExtId; }
};
@@ -115,9 +115,9 @@ private:
public:
TYPEINFO();
- StringErrorInfo( ULONG lUserId,
+ StringErrorInfo( sal_uIntPtr lUserId,
const String& aStringP,
- USHORT nFlags = 0);
+ sal_uInt16 nFlags = 0);
const String& GetErrorString() const { return aString; }
};
@@ -131,8 +131,8 @@ private:
public:
TYPEINFO();
- TwoStringErrorInfo(ULONG nUserID, const String & rTheArg1,
- const String & rTheArg2, USHORT nFlags = 0):
+ TwoStringErrorInfo(sal_uIntPtr nUserID, const String & rTheArg1,
+ const String & rTheArg2, sal_uInt16 nFlags = 0):
DynamicErrorInfo(nUserID, nFlags), aArg1(rTheArg1), aArg2(rTheArg2) {}
virtual ~TwoStringErrorInfo() {}
@@ -149,10 +149,10 @@ class TOOLS_DLLPUBLIC MessageInfo : public DynamicErrorInfo
public:
TYPEINFO();
- MessageInfo(ULONG UserId, USHORT nFlags = 0) :
+ MessageInfo(sal_uIntPtr UserId, sal_uInt16 nFlags = 0) :
DynamicErrorInfo(UserId, nFlags){}
- MessageInfo(ULONG UserId, const String &rArg,
- USHORT nFlags = 0 ) :
+ MessageInfo(sal_uIntPtr UserId, const String &rArg,
+ sal_uInt16 nFlags = 0 ) :
DynamicErrorInfo(UserId, nFlags), aArg(rArg) {}
const String& GetMessageArg() const { return aArg; }
@@ -178,7 +178,7 @@ public:
ErrorContext(Window *pWin=0);
virtual ~ErrorContext();
- virtual BOOL GetString( ULONG nErrId, String& rCtxStr ) = 0;
+ virtual sal_Bool GetString( sal_uIntPtr nErrId, String& rCtxStr ) = 0;
Window* GetParent() { return pWin; }
static ErrorContext* GetContext();
@@ -189,8 +189,8 @@ public:
// - ErrorHandler -
// ----------------
-typedef USHORT WindowDisplayErrorFunc(
- Window *, USHORT nMask, const String &rErr, const String &rAction);
+typedef sal_uInt16 WindowDisplayErrorFunc(
+ Window *, sal_uInt16 nMask, const String &rErr, const String &rAction);
typedef void BasicDisplayErrorFunc(
const String &rErr, const String &rAction);
@@ -202,22 +202,22 @@ class TOOLS_DLLPUBLIC ErrorHandler
private:
ErrHdl_Impl* pImpl;
- static USHORT HandleError_Impl( ULONG lId,
- USHORT nFlags,
- BOOL bJustCreateString,
+ static sal_uInt16 HandleError_Impl( sal_uIntPtr lId,
+ sal_uInt16 nFlags,
+ sal_Bool bJustCreateString,
String & rError);
protected:
- virtual BOOL CreateString( const ErrorInfo *,
- String &, USHORT& nMask ) const = 0;
- BOOL ForwCreateString( const ErrorInfo*,
- String&, USHORT& nMask ) const;
+ virtual sal_Bool CreateString( const ErrorInfo *,
+ String &, sal_uInt16& nMask ) const = 0;
+ sal_Bool ForwCreateString( const ErrorInfo*,
+ String&, sal_uInt16& nMask ) const;
public:
ErrorHandler();
virtual ~ErrorHandler();
- static USHORT HandleError ( ULONG lId, USHORT nMask = USHRT_MAX );
- static BOOL GetErrorString( ULONG lId, String& rStr );
+ static sal_uInt16 HandleError ( sal_uIntPtr lId, sal_uInt16 nMask = USHRT_MAX );
+ static sal_Bool GetErrorString( sal_uIntPtr lId, String& rStr );
static void RegisterDisplay( BasicDisplayErrorFunc* );
static void RegisterDisplay( WindowDisplayErrorFunc* );
@@ -231,8 +231,8 @@ public:
class TOOLS_DLLPUBLIC SimpleErrorHandler : private ErrorHandler
{
protected:
- virtual BOOL CreateString( const ErrorInfo*, String &,
- USHORT &nMask ) const;
+ virtual sal_Bool CreateString( const ErrorInfo*, String &,
+ sal_uInt16 &nMask ) const;
public:
SimpleErrorHandler();
diff --git a/tools/inc/tools/fontenum.hxx b/tools/inc/tools/fontenum.hxx
index 0e0f1b2f7368..54611c8f7c25 100644
--- a/tools/inc/tools/fontenum.hxx
+++ b/tools/inc/tools/fontenum.hxx
@@ -127,7 +127,7 @@ enum FontStrikeout { STRIKEOUT_NONE, STRIKEOUT_SINGLE, STRIKEOUT_DOUBLE,
#ifndef ENUM_FONTEMPHASISMARK_DECLARED
#define ENUM_FONTEMPHASISMARK_DECLARED
-typedef USHORT FontEmphasisMark;
+typedef sal_uInt16 FontEmphasisMark;
#define EMPHASISMARK_NONE ((FontEmphasisMark)0x0000)
#define EMPHASISMARK_DOT ((FontEmphasisMark)0x0001)
#define EMPHASISMARK_CIRCLE ((FontEmphasisMark)0x0002)
diff --git a/tools/inc/tools/fract.hxx b/tools/inc/tools/fract.hxx
index 7769e88ab541..249f1723097b 100644
--- a/tools/inc/tools/fract.hxx
+++ b/tools/inc/tools/fract.hxx
@@ -48,7 +48,7 @@ public:
Fraction( long nN1, long nN2, long nD1, long nD2 );
Fraction( double dVal );
- BOOL IsValid() const;
+ sal_Bool IsValid() const;
long GetNumerator() const { return nNumerator; }
long GetDenominator() const { return nDenominator; }
@@ -70,24 +70,24 @@ public:
friend Fraction operator*( const Fraction& rVal1, const Fraction& rVal2 );
friend Fraction operator/( const Fraction& rVal1, const Fraction& rVal2 );
- friend BOOL operator==( const Fraction& rVal1, const Fraction& rVal2 );
- friend BOOL operator!=( const Fraction& rVal1, const Fraction& rVal2 );
- friend BOOL operator< ( const Fraction& rVal1, const Fraction& rVal2 );
- friend BOOL operator> ( const Fraction& rVal1, const Fraction& rVal2 );
- friend BOOL operator<=( const Fraction& rVal1, const Fraction& rVal2 );
- friend BOOL operator>=( const Fraction& rVal1, const Fraction& rVal2 );
+ friend sal_Bool operator==( const Fraction& rVal1, const Fraction& rVal2 );
+ friend sal_Bool operator!=( const Fraction& rVal1, const Fraction& rVal2 );
+ friend sal_Bool operator< ( const Fraction& rVal1, const Fraction& rVal2 );
+ friend sal_Bool operator> ( const Fraction& rVal1, const Fraction& rVal2 );
+ friend sal_Bool operator<=( const Fraction& rVal1, const Fraction& rVal2 );
+ friend sal_Bool operator>=( const Fraction& rVal1, const Fraction& rVal2 );
#else
friend inline Fraction operator+( const Fraction& rVal1, const Fraction& rVal2 );
friend inline Fraction operator-( const Fraction& rVal1, const Fraction& rVal2 );
friend inline Fraction operator*( const Fraction& rVal1, const Fraction& rVal2 );
friend inline Fraction operator/( const Fraction& rVal1, const Fraction& rVal2 );
- TOOLS_DLLPUBLIC friend BOOL operator==( const Fraction& rVal1, const Fraction& rVal2 );
- friend inline BOOL operator!=( const Fraction& rVal1, const Fraction& rVal2 );
- TOOLS_DLLPUBLIC friend BOOL operator< ( const Fraction& rVal1, const Fraction& rVal2 );
- TOOLS_DLLPUBLIC friend BOOL operator> ( const Fraction& rVal1, const Fraction& rVal2 );
- friend inline BOOL operator<=( const Fraction& rVal1, const Fraction& rVal2 );
- friend inline BOOL operator>=( const Fraction& rVal1, const Fraction& rVal2 );
+ TOOLS_DLLPUBLIC friend sal_Bool operator==( const Fraction& rVal1, const Fraction& rVal2 );
+ friend inline sal_Bool operator!=( const Fraction& rVal1, const Fraction& rVal2 );
+ TOOLS_DLLPUBLIC friend sal_Bool operator< ( const Fraction& rVal1, const Fraction& rVal2 );
+ TOOLS_DLLPUBLIC friend sal_Bool operator> ( const Fraction& rVal1, const Fraction& rVal2 );
+ friend inline sal_Bool operator<=( const Fraction& rVal1, const Fraction& rVal2 );
+ friend inline sal_Bool operator>=( const Fraction& rVal1, const Fraction& rVal2 );
#endif
TOOLS_DLLPUBLIC friend SvStream& operator>>( SvStream& rIStream, Fraction& rFract );
TOOLS_DLLPUBLIC friend SvStream& operator<<( SvStream& rOStream, const Fraction& rFract );
@@ -106,7 +106,7 @@ inline Fraction& Fraction::operator=( const Fraction& rFrac )
return *this;
}
-inline BOOL Fraction::IsValid() const
+inline sal_Bool Fraction::IsValid() const
{
return (nDenominator > 0);
}
@@ -147,17 +147,17 @@ inline Fraction operator/( const Fraction& rVal1, const Fraction& rVal2 )
return aErg;
}
-inline BOOL operator !=( const Fraction& rVal1, const Fraction& rVal2 )
+inline sal_Bool operator !=( const Fraction& rVal1, const Fraction& rVal2 )
{
return !(rVal1 == rVal2);
}
-inline BOOL operator <=( const Fraction& rVal1, const Fraction& rVal2 )
+inline sal_Bool operator <=( const Fraction& rVal1, const Fraction& rVal2 )
{
return !(rVal1 > rVal2);
}
-inline BOOL operator >=( const Fraction& rVal1, const Fraction& rVal2 )
+inline sal_Bool operator >=( const Fraction& rVal1, const Fraction& rVal2 )
{
return !(rVal1 < rVal2);
}
diff --git a/tools/inc/tools/fsys.hxx b/tools/inc/tools/fsys.hxx
index 5ef51803734b..9507fdb15faa 100644
--- a/tools/inc/tools/fsys.hxx
+++ b/tools/inc/tools/fsys.hxx
@@ -146,7 +146,7 @@ typedef int FSysAction;
#define RFS_LOWER "-rfs-"
#define RFS_UPPER "-RFS-"
-typedef ULONG FSysError;
+typedef sal_uIntPtr FSysError;
// FSysExact
enum FSysExact
@@ -176,9 +176,9 @@ class TOOLS_DLLPUBLIC FileStat
friend struct DirReader_Impl;
friend void ImpInitFileStat( FileStat&, dirent* );
- ULONG nError;
+ sal_uIntPtr nError;
DirEntryKind nKindFlags;
- ULONG nSize;
+ sal_uIntPtr nSize;
String aCreator;
String aType;
Date aDateCreated;
@@ -199,16 +199,16 @@ public:
FileStat();
FileStat( const DirEntry& rDirEntry,
FSysAccess nAccess = FSYS_ACCESS_FLOPPY );
- BOOL Update( const DirEntry& rDirEntry,
- BOOL bForceAccess = TRUE );
+ sal_Bool Update( const DirEntry& rDirEntry,
+ sal_Bool bForceAccess = sal_True );
- ULONG GetError() const { return ERRCODE_TOERROR(nError); }
- ULONG GetErrorCode() const { return nError; }
+ sal_uIntPtr GetError() const { return ERRCODE_TOERROR(nError); }
+ sal_uIntPtr GetErrorCode() const { return nError; }
- ULONG GetSize() const { return nSize; }
+ sal_uIntPtr GetSize() const { return nSize; }
DirEntryKind GetKind() const { return nKindFlags; }
- BOOL IsKind( DirEntryKind nKind ) const;
+ sal_Bool IsKind( DirEntryKind nKind ) const;
String GetType() const { return aType; }
String GetCreator() const { return aCreator; }
@@ -219,12 +219,12 @@ public:
Time TimeModified() const { return aTimeModified; }
Date DateAccessed() const { return aDateAccessed; }
Time TimeAccessed() const { return aTimeAccessed; }
- BOOL IsYounger( const FileStat& rIsOlder ) const;
+ sal_Bool IsYounger( const FileStat& rIsOlder ) const;
#define TF_FSYS_READONLY_FLAG
- static ULONG SetReadOnlyFlag( const DirEntry &rEntry, BOOL bRO = TRUE );
- static BOOL GetReadOnlyFlag( const DirEntry &rEntry );
- static BOOL HasReadOnlyFlag();
+ static sal_uIntPtr SetReadOnlyFlag( const DirEntry &rEntry, sal_Bool bRO = sal_True );
+ static sal_Bool GetReadOnlyFlag( const DirEntry &rEntry );
+ static sal_Bool HasReadOnlyFlag();
static ErrCode QueryDiskSpace( const String &rPath,
BigInt &rFreeBytes, BigInt &rTotalBytes );
@@ -251,7 +251,7 @@ friend class FileCopier;
#endif
ByteString aName;
DirEntry* pParent;
- ULONG nError;
+ sal_uIntPtr nError;
DirEntryFlag eFlag;
private:
@@ -271,17 +271,17 @@ private:
FSysPathStyle eStyle );
TOOLS_DLLPRIVATE FSysError ImpParseUnixName( const ByteString& rPfad,
FSysPathStyle eStyle );
- TOOLS_DLLPRIVATE USHORT ImpTryUrl( DirEntryStack& rStack, const String& rPfad, FSysPathStyle eStyle );
+ TOOLS_DLLPRIVATE sal_uInt16 ImpTryUrl( DirEntryStack& rStack, const String& rPfad, FSysPathStyle eStyle );
TOOLS_DLLPRIVATE const DirEntry* ImpGetTopPtr() const;
TOOLS_DLLPRIVATE DirEntry* ImpGetTopPtr();
TOOLS_DLLPRIVATE DirEntry* ImpGetPreTopPtr();
- TOOLS_DLLPRIVATE BOOL ImpToRel( String aStart );
+ TOOLS_DLLPRIVATE sal_Bool ImpToRel( String aStart );
protected:
void ImpTrim( FSysPathStyle eStyle );
const ByteString& ImpTheName() const;
DirEntryFlag ImpTheFlag() const { return eFlag; };
- DirEntry* ImpChangeParent( DirEntry* pNewParent, BOOL bNormalize = TRUE );
+ DirEntry* ImpChangeParent( DirEntry* pNewParent, sal_Bool bNormalize = sal_True );
DirEntry* ImpGetParent() { return pParent; }
#ifdef FEAT_FSYS_DOUBLESPEED
FileStat* ImpGetStat() const { return pStat; }
@@ -291,7 +291,7 @@ protected:
//#endif
protected:
- void SetError( ULONG nErr ) { nError = nErr; }
+ void SetError( sal_uIntPtr nErr ) { nError = nErr; }
DirEntry* GetParent() { return pParent; }
public:
DirEntry( DirEntryFlag aDirFlag = FSYS_FLAG_CURRENT );
@@ -302,11 +302,11 @@ public:
FSysPathStyle eParser = FSYS_STYLE_HOST );
~DirEntry();
- BOOL IsLongNameOnFAT() const;
- BOOL IsCaseSensitive (FSysPathStyle eFormatter = FSYS_STYLE_HOST) const;
+ sal_Bool IsLongNameOnFAT() const;
+ sal_Bool IsCaseSensitive (FSysPathStyle eFormatter = FSYS_STYLE_HOST) const;
- ULONG GetError() const { return nError; }
- BOOL IsValid() const;
+ sal_uIntPtr GetError() const { return nError; }
+ sal_Bool IsValid() const;
DirEntryFlag GetFlag() const { return eFlag; };
void SetExtension( const String& rExt, char cSep = '.' );
@@ -322,31 +322,31 @@ public:
DirEntry GetDevice() const;
String GetVolume() const;
String GetFull( FSysPathStyle eFormatter = FSYS_STYLE_HOST,
- BOOL bWithDelimiter = FALSE,
- USHORT nMaxChars = STRING_MAXLEN ) const;
+ sal_Bool bWithDelimiter = sal_False,
+ sal_uInt16 nMaxChars = STRING_MAXLEN ) const;
DirEntry TempName( DirEntryKind = FSYS_KIND_NONE ) const;
static const DirEntry& SetTempNameBase( const String &rBaseName );
- BOOL MakeShortName( const String& rLongName,
+ sal_Bool MakeShortName( const String& rLongName,
DirEntryKind eCreateKind = FSYS_KIND_NONE,
- BOOL bUseTilde = TRUE,
+ sal_Bool bUseTilde = sal_True,
FSysPathStyle eStyle = FSYS_STYLE_DETECT );
bool IsAbs() const;
- BOOL ToAbs();
- BOOL Find( const String& rPfad, char cDelim = 0 );
- BOOL ToRel();
- BOOL ToRel( const DirEntry& rRefDir );
- USHORT CutRelParents();
+ sal_Bool ToAbs();
+ sal_Bool Find( const String& rPfad, char cDelim = 0 );
+ sal_Bool ToRel();
+ sal_Bool ToRel( const DirEntry& rRefDir );
+ sal_uInt16 CutRelParents();
- BOOL SetCWD( BOOL bSloppy = FALSE ) const;
- BOOL MakeDir( BOOL bSloppy = FALSE ) const;
- BOOL Exists( FSysAccess nAccess = FSYS_ACCESS_FLOPPY ) const;
- BOOL First();
+ sal_Bool SetCWD( sal_Bool bSloppy = sal_False ) const;
+ sal_Bool MakeDir( sal_Bool bSloppy = sal_False ) const;
+ sal_Bool Exists( FSysAccess nAccess = FSYS_ACCESS_FLOPPY ) const;
+ sal_Bool First();
- USHORT Level() const;
- const DirEntry& operator []( USHORT nParentLevel ) const;
- BOOL Contains( const DirEntry &rSubEntry ) const;
+ sal_uInt16 Level() const;
+ const DirEntry& operator []( sal_uInt16 nParentLevel ) const;
+ sal_Bool Contains( const DirEntry &rSubEntry ) const;
FSysError CopyTo( const DirEntry& rDestDir,
FSysAction nActions = FSYS_ACTION_STANDARD ) const;
@@ -356,8 +356,8 @@ public:
DirEntry& operator =( const DirEntry& rOrigDir );
DirEntry operator +( const DirEntry& rSubDir ) const;
DirEntry& operator +=( const DirEntry& rSubDir );
- BOOL operator ==( const DirEntry& rAnotherDir ) const;
- BOOL operator !=( const DirEntry& rAnotherDir ) const
+ sal_Bool operator ==( const DirEntry& rAnotherDir ) const;
+ sal_Bool operator !=( const DirEntry& rAnotherDir ) const
{ return !(DirEntry::operator==( rAnotherDir )); }
StringCompare NameCompare( const DirEntry &rWith ) const;
@@ -372,11 +372,11 @@ public:
static String GetAccessDelimiter( FSysPathStyle eFormatter = FSYS_STYLE_HOST );
static String GetSearchDelimiter( FSysPathStyle eFormatter = FSYS_STYLE_HOST );
- static USHORT GetMaxNameLen( FSysPathStyle eFormatter = FSYS_STYLE_HOST );
+ static sal_uInt16 GetMaxNameLen( FSysPathStyle eFormatter = FSYS_STYLE_HOST );
static FSysPathStyle GetPathStyle( const String &rDevice );
static String ConvertNameToSystem( const String & rName );
static String ConvertSystemToName( const String & rName );
- static BOOL IsRFSAvailable();
+ static sal_Bool IsRFSAvailable();
};
// --------------
@@ -387,10 +387,10 @@ class TOOLS_DLLPUBLIC FileCopier
{
DirEntry aSource;
DirEntry aTarget;
- ULONG nBytesTotal;
- ULONG nBytesCopied;
+ sal_uIntPtr nBytesTotal;
+ sal_uIntPtr nBytesCopied;
Link aProgressLink;
- USHORT nBlockSize;
+ sal_uInt16 nBlockSize;
FileCopier_Impl* pImp;
private:
@@ -398,7 +398,7 @@ private:
const DirEntry &rSource, const DirEntry &rTarget );
protected:
- virtual BOOL Progress();
+ virtual sal_Bool Progress();
virtual ErrCode Error( ErrCode eErr,
const DirEntry *pSource, const DirEntry *pTarget );
@@ -411,11 +411,11 @@ public:
FileCopier& operator = ( const FileCopier &rCopier );
- void SetBlockSize( USHORT nBytes ) { nBlockSize = nBytes; }
- USHORT GetBlockSize() const { return nBlockSize; }
+ void SetBlockSize( sal_uInt16 nBytes ) { nBlockSize = nBytes; }
+ sal_uInt16 GetBlockSize() const { return nBlockSize; }
- ULONG GetBytesTotal() const { return nBytesTotal; }
- ULONG GetBytesCopied() const { return nBytesCopied; }
+ sal_uIntPtr GetBytesTotal() const { return nBytesTotal; }
+ sal_uIntPtr GetBytesCopied() const { return nBytesCopied; }
void SetSource( const DirEntry &rSource ) { aSource = rSource; }
void SetTarget( const DirEntry &rTarget ) { aTarget = rTarget; }
@@ -464,10 +464,10 @@ private:
#ifndef _TOOLS_HXX
protected:
- BOOL ImpInsertPointReached( const DirEntry& rIsSmaller,
+ sal_Bool ImpInsertPointReached( const DirEntry& rIsSmaller,
const FileStat& rNewStat,
- ULONG nCurPos,
- ULONG nSortIndex ) const;
+ sal_uIntPtr nCurPos,
+ sal_uIntPtr nSortIndex ) const;
void ImpSortedInsert( const DirEntry *pNewEntry,
const FileStat *pNewStat );
#endif
@@ -486,12 +486,12 @@ public:
FSysError SetSort( FSysSort nSort, ... );
void Reset();
- USHORT Scan( USHORT nCount = 5 );
- USHORT Count( BOOL bUpdated = TRUE ) const;
- BOOL Update();
+ sal_uInt16 Scan( sal_uInt16 nCount = 5 );
+ sal_uInt16 Count( sal_Bool bUpdated = sal_True ) const;
+ sal_Bool Update();
Dir& operator +=( const Dir& rDir );
- DirEntry& operator []( USHORT nIndex ) const;
+ DirEntry& operator []( sal_uInt16 nIndex ) const;
};
// we don't need this stuff for bootstraping
@@ -509,7 +509,7 @@ public:
class FSysRedirector
{
static FSysRedirector* _pRedirector;
- static BOOL _bEnabled;
+ static sal_Bool _bEnabled;
public:
/** This method must called with the one and only instance of the
@@ -541,9 +541,9 @@ public:
redirected (modified) path too, which can be of both formats
too.
- @return BOOL<BR>
- TRUE, if the path is redirected
- FALSE, if the path is not redirected (unchanged)
+ @return sal_Bool<BR>
+ sal_True, if the path is redirected
+ sal_False, if the path is not redirected (unchanged)
*/
static void DoRedirect( String &rPath );
};
@@ -552,7 +552,7 @@ public:
//========================================================================
-void FSysEnableSysErrorBox( BOOL bEnable );
+void FSysEnableSysErrorBox( sal_Bool bEnable );
//========================================================================
diff --git a/tools/inc/tools/gen.hxx b/tools/inc/tools/gen.hxx
index 308cc02165ce..360ecdf98325 100644
--- a/tools/inc/tools/gen.hxx
+++ b/tools/inc/tools/gen.hxx
@@ -84,8 +84,8 @@ public:
long& A() { return nA; }
long& B() { return nB; }
- BOOL operator == ( const Pair& rPair ) const;
- BOOL operator != ( const Pair& rPair ) const;
+ sal_Bool operator == ( const Pair& rPair ) const;
+ sal_Bool operator != ( const Pair& rPair ) const;
TOOLS_DLLPUBLIC friend SvStream& operator>>( SvStream& rIStream, Pair& rPair );
TOOLS_DLLPUBLIC friend SvStream& operator<<( SvStream& rOStream, const Pair& rPair );
@@ -102,12 +102,12 @@ inline Pair::Pair( long _nA, long _nB )
Pair::nB = _nB;
}
-inline BOOL Pair::operator == ( const Pair& rPair ) const
+inline sal_Bool Pair::operator == ( const Pair& rPair ) const
{
return ((nA == rPair.nA) && (nB == rPair.nB));
}
-inline BOOL Pair::operator != ( const Pair& rPair ) const
+inline sal_Bool Pair::operator != ( const Pair& rPair ) const
{
return ((nA != rPair.nA) || (nB != rPair.nB));
}
@@ -129,10 +129,10 @@ public:
long& Y() { return nB; }
void Move( long nHorzMove, long nVertMove );
- BOOL IsAbove( const Point& rPoint ) const;
- BOOL IsBelow( const Point& rPoint ) const;
- BOOL IsLeft( const Point& rPoint ) const;
- BOOL IsRight( const Point& rPoint ) const;
+ sal_Bool IsAbove( const Point& rPoint ) const;
+ sal_Bool IsBelow( const Point& rPoint ) const;
+ sal_Bool IsLeft( const Point& rPoint ) const;
+ sal_Bool IsRight( const Point& rPoint ) const;
Point& operator += ( const Point& rPoint );
Point& operator -= ( const Point& rPoint );
@@ -171,22 +171,22 @@ inline void Point::Move( long nHorzMove, long nVertMove )
nB += nVertMove;
}
-inline BOOL Point::IsAbove( const Point& rPoint ) const
+inline sal_Bool Point::IsAbove( const Point& rPoint ) const
{
return (nB > rPoint.nB);
}
-inline BOOL Point::IsBelow( const Point& rPoint ) const
+inline sal_Bool Point::IsBelow( const Point& rPoint ) const
{
return (nB < rPoint.nB);
}
-inline BOOL Point::IsLeft( const Point& rPoint ) const
+inline sal_Bool Point::IsLeft( const Point& rPoint ) const
{
return (nA < rPoint.nA);
}
-inline BOOL Point::IsRight( const Point& rPoint ) const
+inline sal_Bool Point::IsRight( const Point& rPoint ) const
{
return (nA > rPoint.nA);
}
@@ -290,7 +290,7 @@ public:
long& Min() { return nA; }
long& Max() { return nB; }
- BOOL IsInside( long nIs ) const;
+ sal_Bool IsInside( long nIs ) const;
void Justify();
};
@@ -303,7 +303,7 @@ inline Range::Range( long nMin, long nMax ) : Pair( nMin, nMax )
{
}
-inline BOOL Range::IsInside( long nIs ) const
+inline sal_Bool Range::IsInside( long nIs ) const
{
return ((nA <= nIs) && (nIs <= nB ));
}
@@ -339,11 +339,11 @@ public:
long& Min() { return nA; }
long& Max() { return nB; }
- BOOL IsInside( long nIs ) const;
+ sal_Bool IsInside( long nIs ) const;
void Justify();
- BOOL operator !() const { return !Len(); }
+ sal_Bool operator !() const { return !Len(); }
long getMin() const { return Min(); }
long getMax() const { return Max(); }
@@ -364,7 +364,7 @@ inline Selection::Selection( long nMin, long nMax ) :
{
}
-inline BOOL Selection::IsInside( long nIs ) const
+inline sal_Bool Selection::IsInside( long nIs ) const
{
return ((nA <= nIs) && (nIs < nB ));
}
@@ -435,15 +435,15 @@ public:
void Justify();
- BOOL IsInside( const Point& rPOINT ) const;
- BOOL IsInside( const Rectangle& rRect ) const;
- BOOL IsOver( const Rectangle& rRect ) const;
+ sal_Bool IsInside( const Point& rPOINT ) const;
+ sal_Bool IsInside( const Rectangle& rRect ) const;
+ sal_Bool IsOver( const Rectangle& rRect ) const;
void SetEmpty() { nRight = nBottom = RECT_EMPTY; }
- BOOL IsEmpty() const;
+ sal_Bool IsEmpty() const;
- BOOL operator == ( const Rectangle& rRect ) const;
- BOOL operator != ( const Rectangle& rRect ) const;
+ sal_Bool operator == ( const Rectangle& rRect ) const;
+ sal_Bool operator != ( const Rectangle& rRect ) const;
Rectangle& operator += ( const Point& rPt );
Rectangle& operator -= ( const Point& rPt );
@@ -501,7 +501,7 @@ inline Rectangle::Rectangle( const Point& rLT, const Size& rSize )
nBottom = rSize.Height() ? nTop+rSize.Height()-1 : RECT_EMPTY;
}
-inline BOOL Rectangle::IsEmpty() const
+inline sal_Bool Rectangle::IsEmpty() const
{
return ((nRight == RECT_EMPTY) || (nBottom == RECT_EMPTY));
}
@@ -654,7 +654,7 @@ inline Rectangle Rectangle::GetIntersection( const Rectangle& rRect ) const
return aTmpRect.Intersection( rRect );
}
-inline BOOL Rectangle::operator == ( const Rectangle& rRect ) const
+inline sal_Bool Rectangle::operator == ( const Rectangle& rRect ) const
{
return ((nLeft == rRect.nLeft ) &&
(nTop == rRect.nTop ) &&
@@ -662,7 +662,7 @@ inline BOOL Rectangle::operator == ( const Rectangle& rRect ) const
(nBottom == rRect.nBottom ));
}
-inline BOOL Rectangle::operator != ( const Rectangle& rRect ) const
+inline sal_Bool Rectangle::operator != ( const Rectangle& rRect ) const
{
return ((nLeft != rRect.nLeft ) ||
(nTop != rRect.nTop ) ||
diff --git a/tools/inc/tools/geninfo.hxx b/tools/inc/tools/geninfo.hxx
index 720ccb9cd788..889d8c1713cc 100644
--- a/tools/inc/tools/geninfo.hxx
+++ b/tools/inc/tools/geninfo.hxx
@@ -62,7 +62,7 @@ public:
GenericInformation( const ByteString &rKey, const ByteString &rValue,
GenericInformationList *pParentList = NULL,
GenericInformationList *pSubInfos = NULL );
- GenericInformation( const GenericInformation& rInf, BOOL bCopySubs = TRUE);
+ GenericInformation( const GenericInformation& rInf, sal_Bool bCopySubs = sal_True);
~GenericInformation();
@@ -73,18 +73,18 @@ public:
void SetComment( const ByteString &rComment ) { sComment = rComment; }
// this methods used to handle sub informations
- BOOL InsertSubInfo( GenericInformation *pInfo );
+ sal_Bool InsertSubInfo( GenericInformation *pInfo );
// siehe GenericInformationList
- BOOL InsertSubInfo( const ByteString &rPathKey, const ByteString &rValue,
- BOOL bSearchByPath = FALSE, BOOL bNewPath = FALSE);
- void RemoveSubInfo( GenericInformation *pInfo, BOOL bDelete = FALSE );
- // void RemoveSelf( BOOL bDelete = FALSE ); // loescht sich selbst aus der Parentliste
+ sal_Bool InsertSubInfo( const ByteString &rPathKey, const ByteString &rValue,
+ sal_Bool bSearchByPath = sal_False, sal_Bool bNewPath = sal_False);
+ void RemoveSubInfo( GenericInformation *pInfo, sal_Bool bDelete = sal_False );
+ // void RemoveSelf( sal_Bool bDelete = sal_False ); // loescht sich selbst aus der Parentliste
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- // bei bDelete = TRUE werden auch alle Sublisten UND DIE INFO SELBST geloescht.
+ // bei bDelete = sal_True werden auch alle Sublisten UND DIE INFO SELBST geloescht.
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- GenericInformation *GetSubInfo( ByteString &rKey, BOOL bSearchByPath = FALSE,
- BOOL bCreatePath = FALSE );
+ GenericInformation *GetSubInfo( ByteString &rKey, sal_Bool bSearchByPath = sal_False,
+ sal_Bool bCreatePath = sal_False );
// path can be something like this: src370/drives/o:
void SetSubList( GenericInformationList *pSubList )
@@ -132,43 +132,43 @@ GenericLockInformation( const ByteString &rKey, const ByteString &rValue,
/* der Schreibschutz darf nur aktiviert werden, wenn
* der Status auf Lesen steht
*/
- BOOL SetWriteLock(UINT32 nKey = 0) { return ((read==aLockState) &&
- (aLockState=writeonly, nLockKey=nKey, TRUE)); }
+ sal_Bool SetWriteLock(sal_uInt32 nKey = 0) { return ((read==aLockState) &&
+ (aLockState=writeonly, nLockKey=nKey, sal_True)); }
/* Schreibschutz darf nur geloest werden, wenn
* der Schreibschutz drin ist, und
* entweder der LockKey Null ist(Generalschluessel) oder der Key zum LockKey passt
*/
- BOOL ReleaseWriteLock(UINT32 nKey = 0) { return ((writeonly==aLockState) &&
+ sal_Bool ReleaseWriteLock(sal_uInt32 nKey = 0) { return ((writeonly==aLockState) &&
(!nLockKey||nKey==nLockKey) &&
- (aLockState=read, nLockKey=0, TRUE)); } // setzt den zustand auf "read"
- BOOL SetReadLock(UINT32 nKey = 0) { return ((read==aLockState) &&
- (aLockState=readonly, nLockKey=nKey, TRUE)); }
- BOOL ReleaseReadLock(UINT32 nKey = 0) { return ((readonly==aLockState) &&
+ (aLockState=read, nLockKey=0, sal_True)); } // setzt den zustand auf "read"
+ sal_Bool SetReadLock(sal_uInt32 nKey = 0) { return ((read==aLockState) &&
+ (aLockState=readonly, nLockKey=nKey, sal_True)); }
+ sal_Bool ReleaseReadLock(sal_uInt32 nKey = 0) { return ((readonly==aLockState) &&
(!nLockKey||nKey==nLockKey) &&
- (aLockState=read, nLockKey=0, TRUE)); } // setzt den zustand auf "read"
+ (aLockState=read, nLockKey=0, sal_True)); } // setzt den zustand auf "read"
LockState GetLockState() const { return aLockState; }
- BOOL IsWriteLocked() const { return (writeonly==aLockState); }
- BOOL IsReadLocked() const { return (readonly==aLockState); }
- BOOL IsNotLocked() const { return (read==aLockState); }
- BOOL IsLocker( UINT32 nKey ) { return (nKey==nLockKey || !nLockKey); }
+ sal_Bool IsWriteLocked() const { return (writeonly==aLockState); }
+ sal_Bool IsReadLocked() const { return (readonly==aLockState); }
+ sal_Bool IsNotLocked() const { return (read==aLockState); }
+ sal_Bool IsLocker( sal_uInt32 nKey ) { return (nKey==nLockKey || !nLockKey); }
/* wenn der Schreibschutz aktiviert wurde,
* und bei vorhandenem Schreibschutz die Keys stimmen
* rufe die Parentmethode auf */
- BOOL InsertSubInfo( GenericInformation *pInfo, UINT32 nKey = 0 ) {
+ sal_Bool InsertSubInfo( GenericInformation *pInfo, sal_uInt32 nKey = 0 ) {
return ((writeonly==aLockState) &&
(!nLockKey || nKey==nLockKey) &&
- (GenericInformation::InsertSubInfo( pInfo ), TRUE)); }
+ (GenericInformation::InsertSubInfo( pInfo ), sal_True)); }
- BOOL InsertSubInfo( const ByteString &rPathKey, const ByteString &rValue, UINT32 nKey = 0,
- BOOL bSearchByPath = FALSE, BOOL bNewPath = FALSE) {
+ sal_Bool InsertSubInfo( const ByteString &rPathKey, const ByteString &rValue, sal_uInt32 nKey = 0,
+ sal_Bool bSearchByPath = sal_False, sal_Bool bNewPath = sal_False) {
return ((writeonly==aLockState) &&
(!nLockKey || nKey==nLockKey) &&
- (GenericInformation::InsertSubInfo( rPathKey, rValue, bSearchByPath, bNewPath ), TRUE)); }
+ (GenericInformation::InsertSubInfo( rPathKey, rValue, bSearchByPath, bNewPath ), sal_True)); }
/* 29.jan.98: erweiterung um lesemoeglichkeit vom Lockclienten */
- GenericInformation *GetSubInfo( ByteString &rKey, BOOL bSearchByPath = FALSE,
- BOOL bCreatePath = FALSE, UINT32 nKey = 0 ) {
+ GenericInformation *GetSubInfo( ByteString &rKey, sal_Bool bSearchByPath = sal_False,
+ sal_Bool bCreatePath = sal_False, sal_uInt32 nKey = 0 ) {
if (writeonly==aLockState && nLockKey && nKey!=nLockKey )
return NULL;
return GenericInformation::GetSubInfo(rKey, bSearchByPath, bCreatePath); }
@@ -177,7 +177,7 @@ GenericLockInformation( const ByteString &rKey, const ByteString &rValue,
private:
LockState aLockState;
- UINT32 nLockKey;
+ sal_uInt32 nLockKey;
};
//
@@ -197,10 +197,10 @@ private:
protected:
// methods
- ULONG InsertSorted( GenericInformation *pInfo, BOOL bOverwrite,
- ULONG nStart, ULONG nEnd );
- GenericInformation *Search( ULONG &rPos, ByteString sKey,
- ULONG nStart, ULONG nEnd );
+ sal_uIntPtr InsertSorted( GenericInformation *pInfo, sal_Bool bOverwrite,
+ sal_uIntPtr nStart, sal_uIntPtr nEnd );
+ GenericInformation *Search( sal_uIntPtr &rPos, ByteString sKey,
+ sal_uIntPtr nStart, sal_uIntPtr nEnd );
public:
GenericInformationList( GenericInformation *pParent = NULL );
@@ -208,19 +208,19 @@ public:
~GenericInformationList();
// this methods used to handle the informations using binary search
- GenericInformation *GetInfo( ByteString &rKey, BOOL bSearchByPath = FALSE,
- BOOL bCreatePath = FALSE );
+ GenericInformation *GetInfo( ByteString &rKey, sal_Bool bSearchByPath = sal_False,
+ sal_Bool bCreatePath = sal_False );
/* path can be something like this: src370/drives/o:
* bCreatePath will create the neccecary paths to the GI */
- BOOL InsertInfo( GenericInformation *pInfo, BOOL bOverwrite = TRUE );
+ sal_Bool InsertInfo( GenericInformation *pInfo, sal_Bool bOverwrite = sal_True );
/* legt eine GenericInformation im Baum an mit Key-Value
* wenn bNewPath gesetzt, wird der nichtexistente Teil des Pfades neu kreiert
* wenn bNewPath nicht gesetzt ist und ein Teil des Pfades nicht vorhanden ist,
- * gibt die Methode FALSE zurueck.*/
- BOOL InsertInfo( const ByteString &rPathKey, const ByteString &rValue,
- BOOL bSearchByPath = FALSE, BOOL bNewPath = FALSE);
- void RemoveInfo( GenericInformation *pInfo, BOOL bDelete = FALSE );
+ * gibt die Methode sal_False zurueck.*/
+ sal_Bool InsertInfo( const ByteString &rPathKey, const ByteString &rValue,
+ sal_Bool bSearchByPath = sal_False, sal_Bool bNewPath = sal_False);
+ void RemoveInfo( GenericInformation *pInfo, sal_Bool bDelete = sal_False );
GenericInformation* SetOwner( GenericInformation *pNewOwner );
diff --git a/tools/inc/tools/globname.hxx b/tools/inc/tools/globname.hxx
index 7fac64e2f74b..026e4c51b9ac 100644..100755
--- a/tools/inc/tools/globname.hxx
+++ b/tools/inc/tools/globname.hxx
@@ -36,8 +36,8 @@
*************************************************************************/
struct ImpSvGlobalName
{
- BYTE szData[ 16 ];
- USHORT nRefCount;
+ sal_uInt8 szData[ 16 ];
+ sal_uInt16 nRefCount;
ImpSvGlobalName()
{
@@ -46,7 +46,7 @@ struct ImpSvGlobalName
ImpSvGlobalName( const ImpSvGlobalName & rObj );
ImpSvGlobalName( int );
- BOOL operator == ( const ImpSvGlobalName & rObj ) const;
+ sal_Bool operator == ( const ImpSvGlobalName & rObj ) const;
};
#ifdef WNT
@@ -75,9 +75,9 @@ public:
pImp = pImpP;
pImp->nRefCount++;
}
- SvGlobalName( UINT32 n1, USHORT n2, USHORT n3,
- BYTE b8, BYTE b9, BYTE b10, BYTE b11,
- BYTE b12, BYTE b13, BYTE b14, BYTE b15 );
+ SvGlobalName( sal_uInt32 n1, sal_uInt16 n2, sal_uInt16 n3,
+ sal_uInt8 b8, sal_uInt8 b9, sal_uInt8 b10, sal_uInt8 b11,
+ sal_uInt8 b12, sal_uInt8 b13, sal_uInt8 b14, sal_uInt8 b15 );
// create SvGlobalName from a platform independent representation
SvGlobalName( const ::com::sun::star::uno::Sequence< sal_Int8 >& aSeq );
@@ -88,16 +88,16 @@ public:
TOOLS_DLLPUBLIC friend SvStream & operator >> ( SvStream &, SvGlobalName & );
TOOLS_DLLPUBLIC friend SvStream & operator << ( SvStream &, const SvGlobalName & );
- BOOL operator < ( const SvGlobalName & rObj ) const;
- SvGlobalName & operator += ( UINT32 );
+ sal_Bool operator < ( const SvGlobalName & rObj ) const;
+ SvGlobalName & operator += ( sal_uInt32 );
SvGlobalName & operator ++ () { return operator += ( 1 ); }
- BOOL operator == ( const SvGlobalName & rObj ) const;
- BOOL operator != ( const SvGlobalName & rObj ) const
+ sal_Bool operator == ( const SvGlobalName & rObj ) const;
+ sal_Bool operator != ( const SvGlobalName & rObj ) const
{ return !(*this == rObj); }
void MakeFromMemory( void * pData );
- BOOL MakeId( const String & rId );
+ sal_Bool MakeId( const String & rId );
String GetctorName() const;
String GetHexName() const;
String GetRegDbName() const
@@ -110,7 +110,7 @@ public:
SvGlobalName( const CLSID & rId );
const CLSID & GetCLSID() const { return *(CLSID *)pImp->szData; }
- const BYTE* GetBytes() const { return pImp->szData; }
+ const sal_uInt8* GetBytes() const { return pImp->szData; }
// platform independent representation of a "GlobalName"
// maybe transported remotely
@@ -125,9 +125,9 @@ public:
~SvGlobalNameList();
void Append( const SvGlobalName & );
- SvGlobalName GetObject( ULONG );
- BOOL IsEntry( const SvGlobalName & rName );
- ULONG Count() const { return aList.Count(); }
+ SvGlobalName GetObject( sal_uLong );
+ sal_Bool IsEntry( const SvGlobalName & rName );
+ sal_uInt32 Count() const { return aList.Count(); }
private:
// nicht erlaubt
SvGlobalNameList( const SvGlobalNameList & );
diff --git a/tools/inc/tools/inetmime.hxx b/tools/inc/tools/inetmime.hxx
index 4e8065f6264c..2408bf231665 100644..100755
--- a/tools/inc/tools/inetmime.hxx
+++ b/tools/inc/tools/inetmime.hxx
@@ -1426,17 +1426,17 @@ public:
void Clear();
- void Insert(INetContentTypeParameter * pParameter, ULONG nIndex)
+ void Insert(INetContentTypeParameter * pParameter, sal_uIntPtr nIndex)
{ List::Insert(pParameter, nIndex); }
- inline const INetContentTypeParameter * GetObject(ULONG nIndex) const;
+ inline const INetContentTypeParameter * GetObject(sal_uIntPtr nIndex) const;
const INetContentTypeParameter * find(const ByteString & rAttribute)
const;
};
inline const INetContentTypeParameter *
-INetContentTypeParameterList::GetObject(ULONG nIndex) const
+INetContentTypeParameterList::GetObject(sal_uIntPtr nIndex) const
{
return static_cast< INetContentTypeParameter * >(List::GetObject(nIndex));
}
diff --git a/tools/inc/tools/inetmsg.hxx b/tools/inc/tools/inetmsg.hxx
index d7619fc34a4d..1f14a67b62a7 100644
--- a/tools/inc/tools/inetmsg.hxx
+++ b/tools/inc/tools/inetmsg.hxx
@@ -116,7 +116,7 @@ class INetMessage
{
List m_aHeaderList;
- ULONG m_nDocSize;
+ sal_uIntPtr m_nDocSize;
UniString m_aDocName;
SvLockBytesRef m_xDocLB;
@@ -125,7 +125,7 @@ class INetMessage
protected:
UniString GetHeaderName_Impl (
- ULONG nIndex, rtl_TextEncoding eEncoding) const
+ sal_uIntPtr nIndex, rtl_TextEncoding eEncoding) const
{
INetMessageHeader *p =
(INetMessageHeader*)(m_aHeaderList.GetObject(nIndex));
@@ -136,7 +136,7 @@ protected:
}
UniString GetHeaderValue_Impl (
- ULONG nIndex, INetMIME::HeaderFieldType eType) const
+ sal_uIntPtr nIndex, INetMIME::HeaderFieldType eType) const
{
INetMessageHeader *p =
(INetMessageHeader*)(m_aHeaderList.GetObject(nIndex));
@@ -147,7 +147,7 @@ protected:
}
void SetHeaderField_Impl (
- const INetMessageHeader &rHeader, ULONG &rnIndex)
+ const INetMessageHeader &rHeader, sal_uIntPtr &rnIndex)
{
INetMessageHeader *p = new INetMessageHeader (rHeader);
if (m_aHeaderList.Count() <= rnIndex)
@@ -166,7 +166,7 @@ protected:
INetMIME::HeaderFieldType eType,
const ByteString &rName,
const UniString &rValue,
- ULONG &rnIndex);
+ sal_uIntPtr &rnIndex);
virtual SvStream& operator<< (SvStream& rStrm) const;
virtual SvStream& operator>> (SvStream& rStrm);
@@ -192,19 +192,19 @@ public:
return *this;
}
- ULONG GetHeaderCount (void) const { return m_aHeaderList.Count(); }
+ sal_uIntPtr GetHeaderCount (void) const { return m_aHeaderList.Count(); }
- UniString GetHeaderName (ULONG nIndex) const
+ UniString GetHeaderName (sal_uIntPtr nIndex) const
{
return GetHeaderName_Impl (nIndex, RTL_TEXTENCODING_ASCII_US);
}
- UniString GetHeaderValue (ULONG nIndex) const
+ UniString GetHeaderValue (sal_uIntPtr nIndex) const
{
return GetHeaderValue_Impl (nIndex, INetMIME::HEADER_FIELD_TEXT);
}
- INetMessageHeader GetHeaderField (ULONG nIndex) const
+ INetMessageHeader GetHeaderField (sal_uIntPtr nIndex) const
{
INetMessageHeader *p =
(INetMessageHeader*)(m_aHeaderList.GetObject(nIndex));
@@ -214,16 +214,16 @@ public:
return INetMessageHeader();
}
- ULONG SetHeaderField (
+ sal_uIntPtr SetHeaderField (
const UniString& rName,
const UniString& rValue,
- ULONG nIndex = LIST_APPEND);
+ sal_uIntPtr nIndex = LIST_APPEND);
- virtual ULONG SetHeaderField (
- const INetMessageHeader &rField, ULONG nIndex = LIST_APPEND);
+ virtual sal_uIntPtr SetHeaderField (
+ const INetMessageHeader &rField, sal_uIntPtr nIndex = LIST_APPEND);
- ULONG GetDocumentSize (void) const { return m_nDocSize; }
- void SetDocumentSize (ULONG nSize) { m_nDocSize = nSize; }
+ sal_uIntPtr GetDocumentSize (void) const { return m_nDocSize; }
+ void SetDocumentSize (sal_uIntPtr nSize) { m_nDocSize = nSize; }
const UniString& GetDocumentName (void) const { return m_aDocName; }
void SetDocumentName (const UniString& rName) { m_aDocName = rName; }
@@ -251,7 +251,7 @@ public:
*=====================================================================*/
class INetMessageHeaderIterator
{
- ULONG nValueCount;
+ sal_uIntPtr nValueCount;
List aValueList;
UniString aEmptyString;
@@ -260,8 +260,8 @@ public:
const INetMessage& rMsg, const UniString& rHdrName);
virtual ~INetMessageHeaderIterator (void);
- ULONG GetValueCount (void) const { return nValueCount; }
- const UniString& GetValue (ULONG nIndex) const
+ sal_uIntPtr GetValueCount (void) const { return nValueCount; }
+ const UniString& GetValue (sal_uIntPtr nIndex) const
{
if (nIndex < nValueCount)
{
@@ -301,7 +301,7 @@ public:
class TOOLS_DLLPUBLIC INetRFC822Message : public INetMessage
{
- ULONG m_nIndex[INETMSG_RFC822_NUMHDR];
+ sal_uIntPtr m_nIndex[INETMSG_RFC822_NUMHDR];
protected:
virtual SvStream& operator<< (SvStream& rStrm) const;
@@ -314,14 +314,14 @@ public:
INetRFC822Message& operator= (const INetRFC822Message& rMsg);
- static BOOL GenerateDateField (
+ static sal_Bool GenerateDateField (
const DateTime& rDateTime, UniString& rDateField);
- static BOOL ParseDateField (
+ static sal_Bool ParseDateField (
const UniString& rDateField, DateTime& rDateTime);
using INetMessage::SetHeaderField;
- virtual ULONG SetHeaderField (
- const INetMessageHeader &rHeader, ULONG nIndex = LIST_APPEND);
+ virtual sal_uIntPtr SetHeaderField (
+ const INetMessageHeader &rHeader, sal_uIntPtr nIndex = LIST_APPEND);
/** Header fields.
*/
@@ -495,23 +495,23 @@ enum INetMessageContainerType
class TOOLS_DLLPUBLIC INetMIMEMessage : public INetRFC822Message
{
- ULONG m_nIndex[INETMSG_MIME_NUMHDR];
+ sal_uIntPtr m_nIndex[INETMSG_MIME_NUMHDR];
INetMIMEMessage *pParent;
- ULONG nNumChildren;
+ sal_uIntPtr nNumChildren;
List aChildren;
ByteString m_aBoundary;
- BOOL bHeaderParsed;
+ sal_Bool bHeaderParsed;
friend class INetMIMEMessageStream;
- void SetChildCount (ULONG nCount) { nNumChildren = nCount; }
+ void SetChildCount (sal_uIntPtr nCount) { nNumChildren = nCount; }
const ByteString& GetMultipartBoundary (void) const { return m_aBoundary; }
void SetMultipartBoundary (const ByteString& rBnd) { m_aBoundary = rBnd; }
void CleanupImp (void);
void CopyImp (const INetMIMEMessage& rMsg);
- void SetHeaderParsed() { bHeaderParsed = TRUE; }
+ void SetHeaderParsed() { bHeaderParsed = sal_True; }
protected:
virtual SvStream& operator<< (SvStream& rStrm) const;
@@ -524,14 +524,14 @@ public:
INetMIMEMessage& operator= (const INetMIMEMessage& rMsg);
- BOOL HeaderParsed() const { return bHeaderParsed; }
+ sal_Bool HeaderParsed() const { return bHeaderParsed; }
virtual INetMIMEMessage* CreateMessage (
const INetMIMEMessage& rMsg) const;
using INetRFC822Message::SetHeaderField;
- virtual ULONG SetHeaderField (
- const INetMessageHeader &rHeader, ULONG nIndex = LIST_APPEND);
+ virtual sal_uIntPtr SetHeaderField (
+ const INetMessageHeader &rHeader, sal_uIntPtr nIndex = LIST_APPEND);
/** Header fields.
*/
@@ -575,34 +575,34 @@ public:
/** Message container methods.
*/
- BOOL IsContainer (void) const
+ sal_Bool IsContainer (void) const
{
return (IsMessage() || IsMultipart());
}
- BOOL IsMessage (void) const
+ sal_Bool IsMessage (void) const
{
UniString aType (GetContentType());
return (aType.CompareIgnoreCaseToAscii("message/", 8) == 0);
}
- BOOL IsMultipart (void) const
+ sal_Bool IsMultipart (void) const
{
UniString aType (GetContentType());
return (aType.CompareIgnoreCaseToAscii("multipart/", 10) == 0);
}
- ULONG GetChildCount (void) const { return nNumChildren; }
- INetMIMEMessage* GetChild (ULONG nIndex) const
+ sal_uIntPtr GetChildCount (void) const { return nNumChildren; }
+ INetMIMEMessage* GetChild (sal_uIntPtr nIndex) const
{
return ((INetMIMEMessage *)(aChildren.GetObject (nIndex)));
}
INetMIMEMessage* GetParent (void) const { return pParent; }
- BOOL EnableAttachChild (
+ sal_Bool EnableAttachChild (
INetMessageContainerType eType = INETMSG_MULTIPART_MIXED);
- BOOL AttachChild (
- INetMIMEMessage& rChildMsg, BOOL bOwner = TRUE);
- BOOL DetachChild (
- ULONG nIndex, INetMIMEMessage& rChildMsg) const;
+ sal_Bool AttachChild (
+ INetMIMEMessage& rChildMsg, sal_Bool bOwner = sal_True);
+ sal_Bool DetachChild (
+ sal_uIntPtr nIndex, INetMIMEMessage& rChildMsg) const;
/** Stream operators.
*/
diff --git a/tools/inc/tools/inetstrm.hxx b/tools/inc/tools/inetstrm.hxx
index 1fd9a913b382..b1c01333c63a 100644
--- a/tools/inc/tools/inetstrm.hxx
+++ b/tools/inc/tools/inetstrm.hxx
@@ -60,13 +60,13 @@ class TOOLS_DLLPUBLIC INetIStream
INetIStream& operator= (const INetIStream& rStrm);
protected:
- virtual int GetData (sal_Char *pData, ULONG nSize) = 0;
+ virtual int GetData (sal_Char *pData, sal_uIntPtr nSize) = 0;
public:
INetIStream ();
virtual ~INetIStream (void);
- int Read (sal_Char *pData, ULONG nSize);
+ int Read (sal_Char *pData, sal_uIntPtr nSize);
static void Decode64 (SvStream& rIn, SvStream& rOut);
static void Encode64 (SvStream& rIn, SvStream& rOut);
@@ -83,13 +83,13 @@ class INetOStream
protected:
virtual int PutData (
- const sal_Char *pData, ULONG nSize) = 0;
+ const sal_Char *pData, sal_uIntPtr nSize) = 0;
public:
INetOStream ();
virtual ~INetOStream (void);
- int Write (const sal_Char *pData, ULONG nSize);
+ int Write (const sal_Char *pData, sal_uIntPtr nSize);
};
/*
@@ -102,7 +102,7 @@ class INetIOStream : public INetIStream, public INetOStream
INetIOStream& operator= (const INetIOStream& rStrm);
public:
- INetIOStream (ULONG nIBufferSize = 0, ULONG nOBufferSize = 0);
+ INetIOStream (sal_uIntPtr nIBufferSize = 0, sal_uIntPtr nOBufferSize = 0);
virtual ~INetIOStream (void);
};
@@ -128,9 +128,9 @@ enum INetMessageStreamState
class INetMessageIStream : public INetIStream
{
INetMessage *pSourceMsg;
- BOOL bHeaderGenerated;
+ sal_Bool bHeaderGenerated;
- ULONG nBufSiz;
+ sal_uIntPtr nBufSiz;
sal_Char *pBuffer;
sal_Char *pRead;
sal_Char *pWrite;
@@ -140,24 +140,24 @@ class INetMessageIStream : public INetIStream
sal_Char *pMsgRead;
sal_Char *pMsgWrite;
- virtual int GetData (sal_Char *pData, ULONG nSize);
+ virtual int GetData (sal_Char *pData, sal_uIntPtr nSize);
// Not implemented.
INetMessageIStream (const INetMessageIStream& rStrm);
INetMessageIStream& operator= (const INetMessageIStream& rStrm);
protected:
- virtual int GetMsgLine (sal_Char *pData, ULONG nSize);
+ virtual int GetMsgLine (sal_Char *pData, sal_uIntPtr nSize);
public:
- INetMessageIStream (ULONG nBufferSize = 2048);
+ INetMessageIStream (sal_uIntPtr nBufferSize = 2048);
virtual ~INetMessageIStream (void);
INetMessage *GetSourceMessage (void) const { return pSourceMsg; }
void SetSourceMessage (INetMessage *pMsg) { pSourceMsg = pMsg; }
- void GenerateHeader (BOOL bGen = TRUE) { bHeaderGenerated = !bGen; }
- BOOL IsHeaderGenerated (void) const { return bHeaderGenerated; }
+ void GenerateHeader (sal_Bool bGen = sal_True) { bHeaderGenerated = !bGen; }
+ sal_Bool IsHeaderGenerated (void) const { return bHeaderGenerated; }
};
/*
@@ -166,20 +166,20 @@ public:
class INetMessageOStream : public INetOStream
{
INetMessage *pTargetMsg;
- BOOL bHeaderParsed;
+ sal_Bool bHeaderParsed;
INetMessageStreamState eOState;
SvMemoryStream *pMsgBuffer;
- virtual int PutData (const sal_Char *pData, ULONG nSize);
+ virtual int PutData (const sal_Char *pData, sal_uIntPtr nSize);
// Not implemented.
INetMessageOStream (const INetMessageOStream& rStrm);
INetMessageOStream& operator= (const INetMessageOStream& rStrm);
protected:
- virtual int PutMsgLine (const sal_Char *pData, ULONG nSize);
+ virtual int PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize);
public:
INetMessageOStream (void);
@@ -188,8 +188,8 @@ public:
INetMessage *GetTargetMessage (void) const { return pTargetMsg; }
void SetTargetMessage (INetMessage *pMsg) { pTargetMsg = pMsg; }
- void ParseHeader (BOOL bParse = TRUE) { bHeaderParsed = !bParse; }
- BOOL IsHeaderParsed (void) const { return bHeaderParsed; }
+ void ParseHeader (sal_Bool bParse = sal_True) { bHeaderParsed = !bParse; }
+ sal_Bool IsHeaderParsed (void) const { return bHeaderParsed; }
};
/*
@@ -204,7 +204,7 @@ class INetMessageIOStream
INetMessageIOStream& operator= (const INetMessageIOStream& rStrm);
public:
- INetMessageIOStream (ULONG nBufferSize = 2048);
+ INetMessageIOStream (sal_uIntPtr nBufferSize = 2048);
virtual ~INetMessageIOStream (void);
};
@@ -226,7 +226,7 @@ class TOOLS_DLLPUBLIC INetMIMEMessageStream : public INetMessageIOStream
{
int eState;
- ULONG nChildIndex;
+ sal_uIntPtr nChildIndex;
INetMIMEMessageStream *pChildStrm;
INetMessageEncoding eEncoding;
@@ -243,11 +243,11 @@ class TOOLS_DLLPUBLIC INetMIMEMessageStream : public INetMessageIOStream
INetMIMEMessageStream& operator= (const INetMIMEMessageStream& rStrm);
protected:
- virtual int GetMsgLine (sal_Char *pData, ULONG nSize);
- virtual int PutMsgLine (const sal_Char *pData, ULONG nSize);
+ virtual int GetMsgLine (sal_Char *pData, sal_uIntPtr nSize);
+ virtual int PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize);
public:
- INetMIMEMessageStream (ULONG nBufferSize = 2048);
+ INetMIMEMessageStream (sal_uIntPtr nBufferSize = 2048);
virtual ~INetMIMEMessageStream (void);
using INetMessageIStream::SetSourceMessage;
diff --git a/tools/inc/tools/iparser.hxx b/tools/inc/tools/iparser.hxx
index 78eed43e8391..c31f6ebd75f7 100644
--- a/tools/inc/tools/iparser.hxx
+++ b/tools/inc/tools/iparser.hxx
@@ -72,18 +72,18 @@ key [value]
#define IP_NO_ERROR 0x0000
#define IP_UNEXPECTED_EOF 0x0001
-#define REPLACE_VARIABLES TRUE
+#define REPLACE_VARIABLES sal_True
class TOOLS_DLLPUBLIC InformationParser
{
private:
- BOOL bRecover;
+ sal_Bool bRecover;
ByteString sOldLine;
ByteString sCurrentComment;
- BOOL bReplaceVariables; // meaning %UPD and %VERSION
- USHORT nLevel;
+ sal_Bool bReplaceVariables; // meaning %UPD and %VERSION
+ sal_uInt16 nLevel;
ByteString sUPD;
ByteString sVersion;
@@ -91,10 +91,10 @@ private:
SvStream *pActStream;
UniString sStreamName;
- USHORT nErrorCode;
- ULONG nErrorLine;
+ sal_uInt16 nErrorCode;
+ sal_uIntPtr nErrorLine;
ByteString sErrorText;
- ULONG nActLine;
+ sal_uIntPtr nActLine;
// methods
TOOLS_DLLPRIVATE ByteString &ReadLine();
@@ -102,15 +102,15 @@ private:
inline void Recover();
protected:
- BOOL Save( SvStream &rOutStream,
- const GenericInformationList *pSaveList, USHORT nLevel, BOOL bStripped );
+ sal_Bool Save( SvStream &rOutStream,
+ const GenericInformationList *pSaveList, sal_uInt16 nLevel, sal_Bool bStripped );
GenericInformationList *Execute( SvStream &rSourceStream,
GenericInformationList *pExistingList );
virtual void PrintStatus( ByteString &rStatus )
{ if ( aStatusLink.IsSet()) aStatusLink.Call( &rStatus ); }
public:
- InformationParser( BOOL bReplace = FALSE );
+ InformationParser( sal_Bool bReplace = sal_False );
virtual ~InformationParser();
// the following methods return NULL if any errors are detected
@@ -129,15 +129,15 @@ public:
GenericInformationList *pExistingList = NULL );
// save the InfrormationList to rSourceFile
- // returns FALSE on error
- BOOL Save( SvFileStream &rSourceStream,
+ // returns sal_False on error
+ sal_Bool Save( SvFileStream &rSourceStream,
const GenericInformationList *pSaveList );
- BOOL Save( SvMemoryStream &rSourceStream,
+ sal_Bool Save( SvMemoryStream &rSourceStream,
const GenericInformationList *pSaveList );
- BOOL Save( const UniString &rSourceFile,
+ sal_Bool Save( const UniString &rSourceFile,
const GenericInformationList *pSaveList );
- USHORT GetErrorCode();
+ sal_uInt16 GetErrorCode();
ByteString &GetErrorText();
void SetStatusHdl( const Link &rHdl ) { aStatusLink = rHdl; }
diff --git a/tools/inc/tools/line.hxx b/tools/inc/tools/line.hxx
index c6c70df842ca..32fc157a34a4 100644
--- a/tools/inc/tools/line.hxx
+++ b/tools/inc/tools/line.hxx
@@ -60,9 +60,9 @@ public:
double GetLength() const;
- BOOL Intersection( const Line& rLine, double& rIntersectionX, double& rIntersectionY ) const;
- BOOL Intersection( const Line& rLine, Point& rIntersection ) const;
- BOOL Intersection( const Rectangle& rRect, Line& rIntersection ) const;
+ sal_Bool Intersection( const Line& rLine, double& rIntersectionX, double& rIntersectionY ) const;
+ sal_Bool Intersection( const Line& rLine, Point& rIntersection ) const;
+ sal_Bool Intersection( const Rectangle& rRect, Line& rIntersection ) const;
double GetDistance( const double& rPtX, const double& rPtY ) const;
double GetDistance( const Point& rPoint ) const { return( GetDistance( rPoint.X(), rPoint.Y() ) ); }
diff --git a/tools/inc/tools/link.hxx b/tools/inc/tools/link.hxx
index 1742759055d6..f31fcabc8108 100644
--- a/tools/inc/tools/link.hxx
+++ b/tools/inc/tools/link.hxx
@@ -112,14 +112,14 @@ public:
long Call( void* pCaller ) const;
- BOOL IsSet() const;
- BOOL operator !() const;
+ sal_Bool IsSet() const;
+ sal_Bool operator !() const;
- BOOL operator==( const Link& rLink ) const;
- BOOL operator!=( const Link& rLink ) const
+ sal_Bool operator==( const Link& rLink ) const;
+ sal_Bool operator!=( const Link& rLink ) const
{ return !(Link::operator==( rLink )); }
- BOOL operator<( const Link& rLink ) const
- { return ((ULONG)rLink.pFunc < (ULONG)pFunc); }
+ sal_Bool operator<( const Link& rLink ) const
+ { return ((sal_uIntPtr)rLink.pFunc < (sal_uIntPtr)pFunc); }
};
inline Link::Link()
@@ -139,20 +139,20 @@ inline long Link::Call(void *pCaller) const
return pFunc ? (*pFunc)(pInst, pCaller) : 0;
}
-inline BOOL Link::IsSet() const
+inline sal_Bool Link::IsSet() const
{
if ( pFunc )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
-inline BOOL Link::operator !() const
+inline sal_Bool Link::operator !() const
{
if ( !pFunc )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
#endif // _LINK_HXX
diff --git a/tools/inc/tools/list.hxx b/tools/inc/tools/list.hxx
index dd8fbf454f80..bb0d8627838c 100644
--- a/tools/inc/tools/list.hxx
+++ b/tools/inc/tools/list.hxx
@@ -56,18 +56,18 @@ public:
using Container::Next;
using Container::Prev;
- List( USHORT _nInitSize = 16, USHORT _nReSize = 16 ) :
+ List( sal_uInt16 _nInitSize = 16, sal_uInt16 _nReSize = 16 ) :
Container( 1024, _nInitSize, _nReSize ) {}
- List( USHORT _nBlockSize, USHORT _nInitSize, USHORT _nReSize ) :
+ List( sal_uInt16 _nBlockSize, sal_uInt16 _nInitSize, sal_uInt16 _nReSize ) :
Container( _nBlockSize, _nInitSize, _nReSize ) {}
List( const List& rList ) : Container( rList ) {}
List& operator =( const List& rList )
{ Container::operator =( rList ); return *this; }
- BOOL operator ==( const List& rList ) const
+ sal_Bool operator ==( const List& rList ) const
{ return Container::operator ==( rList ); }
- BOOL operator !=( const List& rList ) const
+ sal_Bool operator !=( const List& rList ) const
{ return Container::operator !=( rList ); }
};
@@ -83,16 +83,16 @@ public: \
using List::Count; \
using List::GetCurPos; \
\
- ClassName( USHORT _nInitSize = 16, \
- USHORT _nReSize = 16 ) : \
+ ClassName( sal_uInt16 _nInitSize = 16, \
+ sal_uInt16 _nReSize = 16 ) : \
List( _nInitSize, _nReSize ) {} \
- ClassName( USHORT _nBlockSize, USHORT _nInitSize, \
- USHORT _nReSize ) : \
+ ClassName( sal_uInt16 _nBlockSize, sal_uInt16 _nInitSize, \
+ sal_uInt16 _nReSize ) : \
List( _nBlockSize, _nInitSize, _nReSize ) {} \
ClassName( const ClassName& rClassName ) : \
List( rClassName ) {} \
\
- void Insert( Type p, ULONG nIndex ) \
+ void Insert( Type p, sal_uIntPtr nIndex ) \
{ List::Insert( (void*)p, nIndex ); } \
void Insert( Type p ) \
{ List::Insert( (void*)p ); } \
@@ -100,13 +100,13 @@ public: \
{ List::Insert( (void*)pNew, (void*)pOld ); } \
Type Remove() \
{ return (Type)List::Remove(); } \
- Type Remove( ULONG nIndex ) \
+ Type Remove( sal_uIntPtr nIndex ) \
{ return (Type)List::Remove( nIndex ); } \
Type Remove( Type p ) \
{ return (Type)List::Remove( (void*)p ); } \
Type Replace( Type p ) \
{ return (Type)List::Replace( (void*)p ); } \
- Type Replace( Type p, ULONG nIndex ) \
+ Type Replace( Type p, sal_uIntPtr nIndex ) \
{ return (Type)List::Replace( (void*)p, nIndex ); } \
Type Replace( Type pNew, Type pOld ) \
{ return (Type)List::Replace( (void*)pNew, \
@@ -114,16 +114,16 @@ public: \
\
Type GetCurObject() const \
{ return (Type)List::GetCurObject(); } \
- Type GetObject( ULONG nIndex ) const \
+ Type GetObject( sal_uIntPtr nIndex ) const \
{ return (Type)List::GetObject( nIndex ); } \
- ULONG GetPos( const Type p ) const \
+ sal_uIntPtr GetPos( const Type p ) const \
{ return List::GetPos( (const void*)p ); } \
- ULONG GetPos( const Type p, ULONG nStartIndex, \
- BOOL bForward = TRUE ) const \
+ sal_uIntPtr GetPos( const Type p, sal_uIntPtr nStartIndex, \
+ sal_Bool bForward = sal_True ) const \
{ return List::GetPos( (const void*)p, nStartIndex, \
bForward ); } \
\
- Type Seek( ULONG nIndex ) \
+ Type Seek( sal_uIntPtr nIndex ) \
{ return (Type)List::Seek( nIndex ); } \
Type Seek( void* p ) { return (Type)List::Seek( p ); } \
Type First() { return (Type)List::First(); } \
@@ -134,9 +134,9 @@ public: \
ClassName& operator =( const ClassName& rClassName ) \
{ List::operator =( rClassName ); return *this; } \
\
- BOOL operator ==( const ClassName& rList ) const \
+ sal_Bool operator ==( const ClassName& rList ) const \
{ return List::operator ==( rList ); } \
- BOOL operator !=( const ClassName& rList ) const \
+ sal_Bool operator !=( const ClassName& rList ) const \
{ return List::operator !=( rList ); } \
};
diff --git a/tools/inc/tools/mempool.hxx b/tools/inc/tools/mempool.hxx
index a96a024d4b27..4c6c68ab0dd9 100644
--- a/tools/inc/tools/mempool.hxx
+++ b/tools/inc/tools/mempool.hxx
@@ -41,9 +41,9 @@ class TOOLS_DLLPUBLIC FixedMemPool
FixedMemPool_Impl * m_pImpl;
public:
- FixedMemPool( USHORT nTypeSize,
- USHORT nInitSize = 512,
- USHORT nGrowSize = 256 );
+ FixedMemPool( sal_uInt16 nTypeSize,
+ sal_uInt16 nInitSize = 512,
+ sal_uInt16 nGrowSize = 256 );
~FixedMemPool();
void* Alloc();
diff --git a/tools/inc/tools/multisel.hxx b/tools/inc/tools/multisel.hxx
index f75f4c5f03af..6544fe771f95 100644
--- a/tools/inc/tools/multisel.hxx
+++ b/tools/inc/tools/multisel.hxx
@@ -56,17 +56,17 @@ class TOOLS_DLLPUBLIC MultiSelection
private:
ImpSelList aSels; // array of SV-selections
Range aTotRange; // total range of indexes
- ULONG nCurSubSel; // index in aSels of current selected index
+ sal_uIntPtr nCurSubSel; // index in aSels of current selected index
long nCurIndex; // current selected entry
- ULONG nSelCount; // number of selected indexes
- BOOL bInverseCur;// inverse cursor
- BOOL bCurValid; // are nCurIndex and nCurSubSel valid
- BOOL bSelectNew; // auto-select newly inserted indexes
+ sal_uIntPtr nSelCount; // number of selected indexes
+ sal_Bool bInverseCur;// inverse cursor
+ sal_Bool bCurValid; // are nCurIndex and nCurSubSel valid
+ sal_Bool bSelectNew; // auto-select newly inserted indexes
#ifdef _SV_MULTISEL_CXX
TOOLS_DLLPRIVATE void ImplClear();
- TOOLS_DLLPRIVATE ULONG ImplFindSubSelection( long nIndex ) const;
- TOOLS_DLLPRIVATE BOOL ImplMergeSubSelections( ULONG nPos1, ULONG nPos2 );
+ TOOLS_DLLPRIVATE sal_uIntPtr ImplFindSubSelection( long nIndex ) const;
+ TOOLS_DLLPRIVATE sal_Bool ImplMergeSubSelections( sal_uIntPtr nPos1, sal_uIntPtr nPos2 );
TOOLS_DLLPRIVATE long ImplFwdUnselected();
TOOLS_DLLPRIVATE long ImplBwdUnselected();
#endif
@@ -81,18 +81,18 @@ public:
~MultiSelection();
MultiSelection& operator= ( const MultiSelection& rOrig );
- BOOL operator== ( MultiSelection& rOrig );
- BOOL operator!= ( MultiSelection& rOrig )
+ sal_Bool operator== ( MultiSelection& rOrig );
+ sal_Bool operator!= ( MultiSelection& rOrig )
{ return !operator==( rOrig ); }
- BOOL operator !() const
+ sal_Bool operator !() const
{ return nSelCount == 0; }
- void SelectAll( BOOL bSelect = TRUE );
- BOOL Select( long nIndex, BOOL bSelect = TRUE );
- void Select( const Range& rIndexRange, BOOL bSelect = TRUE );
- BOOL IsSelected( long nIndex ) const;
- BOOL IsAllSelected() const
- { return nSelCount == ULONG(aTotRange.Len()); }
+ void SelectAll( sal_Bool bSelect = sal_True );
+ sal_Bool Select( long nIndex, sal_Bool bSelect = sal_True );
+ void Select( const Range& rIndexRange, sal_Bool bSelect = sal_True );
+ sal_Bool IsSelected( long nIndex ) const;
+ sal_Bool IsAllSelected() const
+ { return nSelCount == sal_uIntPtr(aTotRange.Len()); }
long GetSelectCount() const { return nSelCount; }
void SetTotalRange( const Range& rTotRange );
@@ -101,15 +101,15 @@ public:
void Append( long nCount = 1 );
const Range& GetTotalRange() const { return aTotRange; }
- BOOL IsCurValid() const { return bCurValid; }
+ sal_Bool IsCurValid() const { return bCurValid; }
long GetCurSelected() const { return nCurIndex; }
- long FirstSelected( BOOL bInverse = FALSE );
+ long FirstSelected( sal_Bool bInverse = sal_False );
long LastSelected();
long NextSelected();
long PrevSelected();
- ULONG GetRangeCount() const { return aSels.Count(); }
- const Range& GetRange( ULONG nRange ) const { return *(const Range*)aSels.GetObject(nRange); }
+ sal_uIntPtr GetRangeCount() const { return aSels.Count(); }
+ const Range& GetRange( sal_uIntPtr nRange ) const { return *(const Range*)aSels.GetObject(nRange); }
};
class TOOLS_DLLPUBLIC StringRangeEnumerator
diff --git a/tools/inc/tools/ownlist.hxx b/tools/inc/tools/ownlist.hxx
index ac99537a9f0d..78cf5af8e89c 100644
--- a/tools/inc/tools/ownlist.hxx
+++ b/tools/inc/tools/ownlist.hxx
@@ -37,8 +37,8 @@
#define PRV_SV_DECL_OWNER_LIST(ClassName,Type) \
List aTypes; \
public: \
- ClassName( USHORT nInitSize = 16, \
- USHORT nReSize = 16 ) \
+ ClassName( sal_uInt16 nInitSize = 16, \
+ sal_uInt16 nReSize = 16 ) \
: aTypes( nInitSize, nReSize ) {} \
ClassName( const ClassName & rObj ) \
{ *this = rObj; } \
@@ -50,18 +50,18 @@ public: \
{ delete (Type *)aTypes.Remove(); } \
void Remove( Type * pObj ) \
{ delete (Type *)aTypes.Remove( pObj ); } \
- void Remove( ULONG nPos ) \
+ void Remove( sal_uIntPtr nPos ) \
{ delete (Type *)aTypes.Remove( nPos ); } \
- Type & Insert( const Type &, ULONG nPos ); \
+ Type & Insert( const Type &, sal_uIntPtr nPos ); \
Type & Insert( const Type & rType ) \
{ return Insert( rType, aTypes.GetCurPos() ); } \
Type & Append( const Type & rType ) \
{ return Insert( rType, LIST_APPEND ); } \
- Type & GetObject( ULONG nPos ) const \
+ Type & GetObject( sal_uIntPtr nPos ) const \
{ return *(Type *)aTypes.GetObject( nPos ); } \
- Type & operator []( ULONG nPos ) const \
+ Type & operator []( sal_uIntPtr nPos ) const \
{ return *(Type *)aTypes.GetObject( nPos ); } \
- ULONG Count() const { return aTypes.Count(); }
+ sal_uIntPtr Count() const { return aTypes.Count(); }
#define PRV_SV_IMPL_OWNER_LIST(ClassName,Type) \
ClassName & ClassName::operator = ( const ClassName & rObj ) \
@@ -69,7 +69,7 @@ ClassName & ClassName::operator = ( const ClassName & rObj ) \
if( this != &rObj ) \
{ \
Clear(); \
- for( ULONG i = 0; i < rObj.Count(); i++ ) \
+ for( sal_uIntPtr i = 0; i < rObj.Count(); i++ ) \
Append( rObj.GetObject( i ) ); \
} \
return *this; \
@@ -84,7 +84,7 @@ void ClassName::Clear() \
} \
aTypes.Clear(); \
} \
-Type & ClassName::Insert( const Type & rType, ULONG nPos ) \
+Type & ClassName::Insert( const Type & rType, sal_uIntPtr nPos ) \
{ \
Type * pType = new Type( rType ); \
aTypes.Insert( pType, nPos ); \
diff --git a/tools/inc/tools/poly.hxx b/tools/inc/tools/poly.hxx
index b83877b88959..5abcca0c819d 100644
--- a/tools/inc/tools/poly.hxx
+++ b/tools/inc/tools/poly.hxx
@@ -85,16 +85,16 @@ private:
enum DataType { DATA_NONE = 0, DATA_ABSOLUT = 1, DATA_PERCENT = 2 };
DataType eType;
- union { ULONG mnAbsolut; USHORT mnPercent; };
+ union { sal_uIntPtr mnAbsolut; sal_uInt16 mnPercent; };
public:
PolyOptimizeData() : eType( DATA_NONE ) {}
- PolyOptimizeData( ULONG nAbsolut ) : eType( DATA_ABSOLUT ), mnAbsolut( nAbsolut ) {}
- PolyOptimizeData( USHORT nPercent ) : eType( DATA_PERCENT ), mnPercent( nPercent ) {}
+ PolyOptimizeData( sal_uIntPtr nAbsolut ) : eType( DATA_ABSOLUT ), mnAbsolut( nAbsolut ) {}
+ PolyOptimizeData( sal_uInt16 nPercent ) : eType( DATA_PERCENT ), mnPercent( nPercent ) {}
- ULONG GetAbsValue() const { DBG_ASSERT( eType == DATA_ABSOLUT, "Wrong data type" ); return mnAbsolut; }
- USHORT GetPercentValue() const { DBG_ASSERT( eType == DATA_PERCENT, "Wrong data type" ); return mnPercent; }
+ sal_uIntPtr GetAbsValue() const { DBG_ASSERT( eType == DATA_ABSOLUT, "Wrong data type" ); return mnAbsolut; }
+ sal_uInt16 GetPercentValue() const { DBG_ASSERT( eType == DATA_PERCENT, "Wrong data type" ); return mnPercent; }
};
// -----------
@@ -125,9 +125,9 @@ private:
public:
Point* ImplGetPointAry();
- BYTE* ImplGetFlagAry();
+ sal_uInt8* ImplGetFlagAry();
- static void ImplReduceEdges( Polygon& rPoly, const double& rArea, USHORT nPercent );
+ static void ImplReduceEdges( Polygon& rPoly, const double& rArea, sal_uInt16 nPercent );
void ImplRead( SvStream& rIStream );
void ImplWrite( SvStream& rOStream ) const;
@@ -135,49 +135,49 @@ public:
public:
Polygon();
- Polygon( USHORT nSize );
- Polygon( USHORT nPoints, const Point* pPtAry,
- const BYTE* pFlagAry = NULL );
+ Polygon( sal_uInt16 nSize );
+ Polygon( sal_uInt16 nPoints, const Point* pPtAry,
+ const sal_uInt8* pFlagAry = NULL );
Polygon( const Rectangle& rRect );
Polygon( const Rectangle& rRect,
- ULONG nHorzRound, ULONG nVertRound );
+ sal_uIntPtr nHorzRound, sal_uIntPtr nVertRound );
Polygon( const Point& rCenter,
long nRadX, long nRadY,
- USHORT nPoints = 0 );
+ sal_uInt16 nPoints = 0 );
Polygon( const Rectangle& rBound,
const Point& rStart, const Point& rEnd,
PolyStyle ePolyStyle = POLY_ARC );
Polygon( const Point& rBezPt1, const Point& rCtrlPt1,
const Point& rBezPt2, const Point& rCtrlPt2,
- USHORT nPoints = 0 );
+ sal_uInt16 nPoints = 0 );
Polygon( const Polygon& rPoly );
~Polygon();
- void SetPoint( const Point& rPt, USHORT nPos );
- const Point& GetPoint( USHORT nPos ) const;
+ void SetPoint( const Point& rPt, sal_uInt16 nPos );
+ const Point& GetPoint( sal_uInt16 nPos ) const;
- void SetFlags( USHORT nPos, PolyFlags eFlags );
- PolyFlags GetFlags( USHORT nPos ) const;
+ void SetFlags( sal_uInt16 nPos, PolyFlags eFlags );
+ PolyFlags GetFlags( sal_uInt16 nPos ) const;
sal_Bool HasFlags() const;
- BOOL IsControl( USHORT nPos ) const;
- BOOL IsSmooth( USHORT nPos ) const;
- BOOL IsRect() const;
+ sal_Bool IsControl( sal_uInt16 nPos ) const;
+ sal_Bool IsSmooth( sal_uInt16 nPos ) const;
+ sal_Bool IsRect() const;
- void SetSize( USHORT nNewSize );
- USHORT GetSize() const;
+ void SetSize( sal_uInt16 nNewSize );
+ sal_uInt16 GetSize() const;
void Clear();
Rectangle GetBoundRect() const;
double GetArea() const;
double GetSignedArea() const;
- BOOL IsInside( const Point& rPt ) const;
- BOOL IsRightOrientated() const;
- double CalcDistance( USHORT nPt1, USHORT nPt2 );
- void Clip( const Rectangle& rRect, BOOL bPolygon = TRUE );
- void Optimize( ULONG nOptimizeFlags, const PolyOptimizeData* pData = NULL );
+ sal_Bool IsInside( const Point& rPt ) const;
+ sal_Bool IsRightOrientated() const;
+ double CalcDistance( sal_uInt16 nPt1, sal_uInt16 nPt2 );
+ void Clip( const Rectangle& rRect, sal_Bool bPolygon = sal_True );
+ void Optimize( sal_uIntPtr nOptimizeFlags, const PolyOptimizeData* pData = NULL );
/** Adaptive subdivision of polygons with curves
@@ -208,21 +208,21 @@ public:
void Translate( const Point& rTrans );
void Scale( double fScaleX, double fScaleY );
void Rotate( const Point& rCenter, double fSin, double fCos );
- void Rotate( const Point& rCenter, USHORT nAngle10 );
+ void Rotate( const Point& rCenter, sal_uInt16 nAngle10 );
void SlantX( long nYRef, double fSin, double fCos );
void SlantY( long nXRef, double fSin, double fCos );
void Distort( const Rectangle& rRefRect, const Polygon& rDistortedRect );
- void Insert( USHORT nPos, const Point& rPt, PolyFlags eFlags = POLY_NORMAL );
- void Insert( USHORT nPos, const Polygon& rPoly );
- void Remove( USHORT nPos, USHORT nCount );
+ void Insert( sal_uInt16 nPos, const Point& rPt, PolyFlags eFlags = POLY_NORMAL );
+ void Insert( sal_uInt16 nPos, const Polygon& rPoly );
+ void Remove( sal_uInt16 nPos, sal_uInt16 nCount );
- const Point& operator[]( USHORT nPos ) const { return GetPoint( nPos ); }
- Point& operator[]( USHORT nPos );
+ const Point& operator[]( sal_uInt16 nPos ) const { return GetPoint( nPos ); }
+ Point& operator[]( sal_uInt16 nPos );
Polygon& operator=( const Polygon& rPoly );
- BOOL operator==( const Polygon& rPoly ) const;
- BOOL operator!=( const Polygon& rPoly ) const
+ sal_Bool operator==( const Polygon& rPoly ) const;
+ sal_Bool operator!=( const Polygon& rPoly ) const
{ return !(Polygon::operator==( rPoly )); }
sal_Bool IsEqual( const Polygon& rPoly ) const;
@@ -235,7 +235,7 @@ public:
void Write( SvStream& rOStream ) const;
const Point* GetConstPointAry() const;
- const BYTE* GetConstFlagAry() const;
+ const sal_uInt8* GetConstFlagAry() const;
// convert to ::basegfx::B2DPolygon and return
::basegfx::B2DPolygon getB2DPolygon() const;
@@ -256,33 +256,33 @@ private:
ImplPolyPolygon* mpImplPolyPolygon;
//#if 0 // _SOLAR__PRIVATE
- TOOLS_DLLPRIVATE void ImplDoOperation( const PolyPolygon& rPolyPoly, PolyPolygon& rResult, ULONG nOperation ) const;
+ TOOLS_DLLPRIVATE void ImplDoOperation( const PolyPolygon& rPolyPoly, PolyPolygon& rResult, sal_uIntPtr nOperation ) const;
TOOLS_DLLPRIVATE void *ImplCreateArtVpath() const;
TOOLS_DLLPRIVATE void ImplSetFromArtVpath( void *pVpath );
//#endif // __PRIVATE
public:
- PolyPolygon( USHORT nInitSize = 16, USHORT nResize = 16 );
+ PolyPolygon( sal_uInt16 nInitSize = 16, sal_uInt16 nResize = 16 );
PolyPolygon( const Polygon& rPoly );
- PolyPolygon( USHORT nPoly, const USHORT* pPointCountAry,
+ PolyPolygon( sal_uInt16 nPoly, const sal_uInt16* pPointCountAry,
const Point* pPtAry );
PolyPolygon( const PolyPolygon& rPolyPoly );
~PolyPolygon();
- void Insert( const Polygon& rPoly, USHORT nPos = POLYPOLY_APPEND );
- void Remove( USHORT nPos );
- void Replace( const Polygon& rPoly, USHORT nPos );
- const Polygon& GetObject( USHORT nPos ) const;
+ void Insert( const Polygon& rPoly, sal_uInt16 nPos = POLYPOLY_APPEND );
+ void Remove( sal_uInt16 nPos );
+ void Replace( const Polygon& rPoly, sal_uInt16 nPos );
+ const Polygon& GetObject( sal_uInt16 nPos ) const;
- BOOL IsRect() const;
+ sal_Bool IsRect() const;
void Clear();
- USHORT Count() const;
+ sal_uInt16 Count() const;
Rectangle GetBoundRect() const;
void Clip( const Rectangle& rRect );
- void Optimize( ULONG nOptimizeFlags, const PolyOptimizeData* pData = NULL );
+ void Optimize( sal_uIntPtr nOptimizeFlags, const PolyOptimizeData* pData = NULL );
/** Adaptive subdivision of polygons with curves
@@ -313,17 +313,17 @@ public:
void Translate( const Point& rTrans );
void Scale( double fScaleX, double fScaleY );
void Rotate( const Point& rCenter, double fSin, double fCos );
- void Rotate( const Point& rCenter, USHORT nAngle10 );
+ void Rotate( const Point& rCenter, sal_uInt16 nAngle10 );
void SlantX( long nYRef, double fSin, double fCos );
void SlantY( long nXRef, double fSin, double fCos );
void Distort( const Rectangle& rRefRect, const Polygon& rDistortedRect );
- const Polygon& operator[]( USHORT nPos ) const { return GetObject( nPos ); }
- Polygon& operator[]( USHORT nPos );
+ const Polygon& operator[]( sal_uInt16 nPos ) const { return GetObject( nPos ); }
+ Polygon& operator[]( sal_uInt16 nPos );
PolyPolygon& operator=( const PolyPolygon& rPolyPoly );
- BOOL operator==( const PolyPolygon& rPolyPoly ) const;
- BOOL operator!=( const PolyPolygon& rPolyPoly ) const
+ sal_Bool operator==( const PolyPolygon& rPolyPoly ) const;
+ sal_Bool operator!=( const PolyPolygon& rPolyPoly ) const
{ return !(PolyPolygon::operator==( rPolyPoly )); }
sal_Bool IsEqual( const PolyPolygon& rPolyPoly ) const;
diff --git a/tools/inc/tools/postsys.h b/tools/inc/tools/postsys.h
index 3b7e37a4c23b..994f86ae35b5 100644
--- a/tools/inc/tools/postsys.h
+++ b/tools/inc/tools/postsys.h
@@ -33,8 +33,8 @@
#undef PolyPolygon
#undef Polygon
#undef Rectangle
-#undef BYTE
-#undef BOOL
+#undef sal_uInt8
+#undef sal_Bool
#undef DELETE
/* Hilfe-Ids umbenennen */
@@ -232,9 +232,9 @@
extern "C"
{
-WIN_BOOL WINAPI WIN_Rectangle( HDC hDC, int X1, int Y1, int X2, int Y2 );
-WIN_BOOL WINAPI WIN_Polygon( HDC hDC, CONST POINT * ppt, int ncnt );
-WIN_BOOL WINAPI WIN_PolyPolygon( HDC hDC, CONST POINT * ppt, LPINT npcnt, int ncnt );
+ BOOL WINAPI WIN_Rectangle( HDC hDC, int X1, int Y1, int X2, int Y2 );
+ BOOL WINAPI WIN_Polygon( HDC hDC, CONST POINT * ppt, int ncnt );
+ BOOL WINAPI WIN_PolyPolygon( HDC hDC, CONST POINT * ppt, LPINT npcnt, int ncnt );
}
#endif
diff --git a/tools/inc/tools/postwin.h b/tools/inc/tools/postwin.h
index a6bd3431a9dc..1e746a941f5c 100644
--- a/tools/inc/tools/postwin.h
+++ b/tools/inc/tools/postwin.h
@@ -247,9 +247,9 @@
#ifdef WNT
extern "C"
{
-WIN_BOOL WINAPI WIN_Rectangle( HDC hDC, int X1, int Y1, int X2, int Y2 );
-WIN_BOOL WINAPI WIN_Polygon( HDC hDC, CONST POINT * ppt, int ncnt );
-WIN_BOOL WINAPI WIN_PolyPolygon( HDC hDC, CONST POINT * ppt, LPINT npcnt, int ncnt );
+BOOL WINAPI WIN_Rectangle( HDC hDC, int X1, int Y1, int X2, int Y2 );
+BOOL WINAPI WIN_Polygon( HDC hDC, CONST POINT * ppt, int ncnt );
+BOOL WINAPI WIN_PolyPolygon( HDC hDC, CONST POINT * ppt, LPINT npcnt, int ncnt );
}
#endif
diff --git a/tools/inc/tools/presys.h b/tools/inc/tools/presys.h
index 457b57142dcd..7e84a92fb257 100644
--- a/tools/inc/tools/presys.h
+++ b/tools/inc/tools/presys.h
@@ -32,9 +32,6 @@
#if defined WNT
-#define BOOL WIN_BOOL
-#define BYTE WIN_BYTE
-
#define Rectangle BLA_Rectangle
#define Polygon BLA_Polygon
#define PolyPolygon BLA_PolyPolygon
diff --git a/tools/inc/tools/prewin.h b/tools/inc/tools/prewin.h
index 43a4452594cc..86bda268722d 100644
--- a/tools/inc/tools/prewin.h
+++ b/tools/inc/tools/prewin.h
@@ -29,15 +29,6 @@
#if defined WNT
-#define BOOL WIN_BOOL
-#define BYTE WIN_BYTE
-#ifndef VCL_NEED_BASETSD
-#define INT64 WIN_INT64
-#define UINT64 WIN_UINT64
-#define INT32 WIN_INT32
-#define UINT32 WIN_UINT32
-#endif
-
#define Rectangle BLA_Rectangle
#define Polygon BLA_Polygon
#define PolyPolygon BLA_PolyPolygon
diff --git a/tools/inc/tools/prex.h b/tools/inc/tools/prex.h
index 61088960bbfd..250a72b2476c 100644
--- a/tools/inc/tools/prex.h
+++ b/tools/inc/tools/prex.h
@@ -29,10 +29,6 @@
#define _PREX_H
#define Window XLIB_Window
-#define BYTE XLIB_BYTE
-#define INT8 XLIB_INT8
-#define INT64 XLIB_INT64
-#define BOOL XLIB_BOOL
#define Font XLIB_Font
#define Cursor XLIB_Cursor
#define String XLIB_String
diff --git a/tools/inc/tools/pstm.hxx b/tools/inc/tools/pstm.hxx
index 2575ccae8f3e..f149e977f3b3 100644
--- a/tools/inc/tools/pstm.hxx
+++ b/tools/inc/tools/pstm.hxx
@@ -52,11 +52,11 @@ typedef void * (*SvCreateInstancePersist)( SvPersistBase ** );
class TOOLS_DLLPUBLIC SvClassManager
{
- typedef std::hash_map< USHORT, SvCreateInstancePersist > Map;
+ typedef std::hash_map< sal_uInt16, SvCreateInstancePersist > Map;
Map aAssocTable;
public:
- void Register( USHORT nClassId, SvCreateInstancePersist pFunc );
- SvCreateInstancePersist Get( USHORT nClassId );
+ void Register( sal_uInt16 nClassId, SvCreateInstancePersist pFunc );
+ SvCreateInstancePersist Get( sal_uInt16 nClassId );
};
/************************** S v R t t i B a s e **************************/
@@ -71,11 +71,11 @@ SV_DECL_IMPL_REF(SvRttiBase)
/*************************************************************************/
#define SV_DECL_PERSIST( Class, CLASS_ID ) \
TYPEINFO(); \
- static USHORT StaticClassId() { return CLASS_ID; } \
+ static sal_uInt16 StaticClassId() { return CLASS_ID; } \
static void * CreateInstance( SvPersistBase ** ppBase ); \
friend SvPersistStream& operator >> ( SvPersistStream & rStm, \
Class *& rpObj); \
- virtual USHORT GetClassId() const; \
+ virtual sal_uInt16 GetClassId() const; \
virtual void Load( SvPersistStream & ); \
virtual void Save( SvPersistStream & );
@@ -89,7 +89,7 @@ SV_DECL_IMPL_REF(SvRttiBase)
*ppBase = p; \
return p; \
} \
- USHORT Class::GetClassId() const \
+ sal_uInt16 Class::GetClassId() const \
{ return StaticClassId(); } \
SvPersistStream& operator >> (SvPersistStream & rStm, Class *& rpObj)\
{ \
@@ -112,7 +112,7 @@ class SvPersistStream;
class SvPersistBase : public SvRttiBase
{
public:
- virtual USHORT GetClassId() const = 0;
+ virtual sal_uInt16 GetClassId() const = 0;
virtual void Load( SvPersistStream & ) = 0;
virtual void Save( SvPersistStream & ) = 0;
TOOLS_DLLPUBLIC friend SvPersistStream& operator >> ( SvPersistStream & rStm,
@@ -130,9 +130,9 @@ class TOOLS_DLLPUBLIC SvPersistBaseMemberList : public SuperSvPersistBaseMemberL
{
public:
SvPersistBaseMemberList();
- SvPersistBaseMemberList(USHORT nInitSz, USHORT nResize );
+ SvPersistBaseMemberList(sal_uInt16 nInitSz, sal_uInt16 nResize );
- void WriteObjects( SvPersistStream &, BOOL bOnlyStreamedObj = FALSE ) const;
+ void WriteObjects( SvPersistStream &, sal_Bool bOnlyStreamedObj = sal_False ) const;
TOOLS_DLLPUBLIC friend SvPersistStream& operator << (SvPersistStream &, const SvPersistBaseMemberList &);
TOOLS_DLLPUBLIC friend SvPersistStream& operator >> (SvPersistStream &, SvPersistBaseMemberList &);
};
@@ -170,7 +170,7 @@ class TOOLS_DLLPUBLIC SvPersistStream : public SvStream
die im Stream vorkommen k"onnen, ben"otigt. Die Liste aller Klassen
wird in einem <SvClassManager> Objekt gespeichert und dem
SvPersistStream "ubergeben, wenn er erzeugt wird.
- Weiterhin wird die M"oglichkeit geboten UINT32 Werte komprimiert
+ Weiterhin wird die M"oglichkeit geboten sal_uInt32 Werte komprimiert
zu schreiben und zu lesen (<SvPersistStream::WriteCompressed>,
<SvPersistStream::ReadCompressed>).
Es gibt auch die drei Hilfsmethoden <SvPersistStream::WriteDummyLen>,
@@ -201,49 +201,49 @@ class TOOLS_DLLPUBLIC SvPersistStream : public SvStream
SvStream * pStm;
Table aPTable; // Pointer und Key gedreht
SvPersistUIdx aPUIdx;
- ULONG nStartIdx;
+ sal_uIntPtr nStartIdx;
const SvPersistStream * pRefStm;
- UINT32 nFlags;
+ sal_uInt32 nFlags;
- virtual ULONG GetData( void* pData, ULONG nSize );
- virtual ULONG PutData( const void* pData, ULONG nSize );
- virtual ULONG SeekPos( ULONG nPos );
+ virtual sal_uIntPtr GetData( void* pData, sal_uIntPtr nSize );
+ virtual sal_uIntPtr PutData( const void* pData, sal_uIntPtr nSize );
+ virtual sal_uIntPtr SeekPos( sal_uIntPtr nPos );
virtual void FlushData();
protected:
- ULONG GetCurMaxIndex( const SvPersistUIdx & ) const;
- ULONG GetCurMaxIndex() const
+ sal_uIntPtr GetCurMaxIndex( const SvPersistUIdx & ) const;
+ sal_uIntPtr GetCurMaxIndex() const
{ return GetCurMaxIndex( aPUIdx ); }
- void WriteObj( BYTE nHdr, SvPersistBase * pObj );
- UINT32 ReadObj( SvPersistBase * & rpObj,
- BOOL bRegister );
+ void WriteObj( sal_uInt8 nHdr, SvPersistBase * pObj );
+ sal_uInt32 ReadObj( SvPersistBase * & rpObj,
+ sal_Bool bRegister );
public:
- BOOL IsStreamed( SvPersistBase * pObj ) const
+ sal_Bool IsStreamed( SvPersistBase * pObj ) const
{ return 0 != GetIndex( pObj ); }
virtual void ResetError();
SvPersistStream( SvClassManager &, SvStream * pStream,
- UINT32 nStartIdx = 1 );
+ sal_uInt32 nStartIdx = 1 );
SvPersistStream( SvClassManager &, SvStream * pStream,
const SvPersistStream & rPersStm );
~SvPersistStream();
void SetStream( SvStream * pStream );
SvStream * GetStream() const { return pStm; }
- virtual USHORT IsA() const;
+ virtual sal_uInt16 IsA() const;
- SvPersistBase * GetObject( ULONG nIdx ) const;
- ULONG GetIndex( SvPersistBase * ) const;
+ SvPersistBase * GetObject( sal_uIntPtr nIdx ) const;
+ sal_uIntPtr GetIndex( SvPersistBase * ) const;
- void SetContextFlags( UINT32 n ) { nFlags = n; }
- UINT32 GetContextFlags() const { return nFlags; }
+ void SetContextFlags( sal_uInt32 n ) { nFlags = n; }
+ sal_uInt32 GetContextFlags() const { return nFlags; }
- static void WriteCompressed( SvStream & rStm, UINT32 nVal );
- static UINT32 ReadCompressed( SvStream & rStm );
+ static void WriteCompressed( SvStream & rStm, sal_uInt32 nVal );
+ static sal_uInt32 ReadCompressed( SvStream & rStm );
- UINT32 WriteDummyLen();
- void WriteLen( UINT32 nLenPos );
- UINT32 ReadLen( UINT32 * pTestPos );
+ sal_uInt32 WriteDummyLen();
+ void WriteLen( sal_uInt32 nLenPos );
+ sal_uInt32 ReadLen( sal_uInt32 * pTestPos );
SvPersistStream& WritePointer( SvPersistBase * pObj );
SvPersistStream& ReadPointer( SvPersistBase * & rpObj );
@@ -254,8 +254,8 @@ public:
// gespeichert werden.
friend SvStream& operator >> ( SvStream &, SvPersistStream & );
friend SvStream& operator << ( SvStream &, SvPersistStream & );
- ULONG InsertObj( SvPersistBase * );
- ULONG RemoveObj( SvPersistBase * );
+ sal_uIntPtr InsertObj( SvPersistBase * );
+ sal_uIntPtr RemoveObj( SvPersistBase * );
};
#endif // _PSTM_HXX
diff --git a/tools/inc/tools/queue.hxx b/tools/inc/tools/queue.hxx
index cb89bce6cdda..4df0a60a1618 100644
--- a/tools/inc/tools/queue.hxx
+++ b/tools/inc/tools/queue.hxx
@@ -45,19 +45,19 @@ public:
using Container::GetObject;
using Container::GetPos;
- Queue( USHORT _nInitSize = 16, USHORT _nReSize = 16 ) :
+ Queue( sal_uInt16 _nInitSize = 16, sal_uInt16 _nReSize = 16 ) :
Container( _nReSize, _nInitSize, _nReSize ) {}
Queue( const Queue& rQueue ) : Container( rQueue ) {}
void Put( void* p ) { Container::Insert( p, CONTAINER_APPEND ); }
- void* Get() { return Container::Remove( (ULONG)0 ); }
+ void* Get() { return Container::Remove( (sal_uIntPtr)0 ); }
Queue& operator =( const Queue& rQueue )
{ Container::operator =( rQueue ); return *this; }
- BOOL operator ==( const Queue& rQueue ) const
+ sal_Bool operator ==( const Queue& rQueue ) const
{ return Container::operator ==( rQueue ); }
- BOOL operator !=( const Queue& rQueue ) const
+ sal_Bool operator !=( const Queue& rQueue ) const
{ return Container::operator !=( rQueue ); }
};
@@ -72,8 +72,8 @@ public: \
using Queue::Clear; \
using Queue::Count; \
\
- ClassName( USHORT _nInitSize = 16, \
- USHORT _nReSize = 16 ) : \
+ ClassName( sal_uInt16 _nInitSize = 16, \
+ sal_uInt16 _nReSize = 16 ) : \
Queue( _nInitSize, _nReSize ) {} \
ClassName( const ClassName& rClassName ) : \
Queue( rClassName ) {} \
@@ -81,12 +81,12 @@ public: \
void Put( Type p ) { Queue::Put( (void*)p ); } \
Type Get() { return (Type)Queue::Get(); } \
\
- Type GetObject( ULONG nIndex ) const \
+ Type GetObject( sal_uIntPtr nIndex ) const \
{ return (Type)Queue::GetObject( nIndex ); } \
- ULONG GetPos( const Type p ) const \
+ sal_uIntPtr GetPos( const Type p ) const \
{ return Queue::GetPos( (const void*)p ); } \
- ULONG GetPos( const Type p, ULONG nStartIndex, \
- BOOL bForward = TRUE ) const \
+ sal_uIntPtr GetPos( const Type p, sal_uIntPtr nStartIndex, \
+ sal_Bool bForward = sal_True ) const \
{ return Queue::GetPos( (const void*)p, \
nStartIndex, \
bForward ); } \
@@ -95,9 +95,9 @@ public: \
{ Queue::operator =( rClassName ); \
return *this; } \
\
- BOOL operator ==( const Queue& rQueue ) const \
+ sal_Bool operator ==( const Queue& rQueue ) const \
{ return Queue::operator ==( rQueue ); } \
- BOOL operator !=( const Queue& rQueue ) const \
+ sal_Bool operator !=( const Queue& rQueue ) const \
{ return Queue::operator !=( rQueue ); } \
};
diff --git a/tools/inc/tools/rc.hxx b/tools/inc/tools/rc.hxx
index 15e077c3c62c..d8cd73d6dcbc 100644
--- a/tools/inc/tools/rc.hxx
+++ b/tools/inc/tools/rc.hxx
@@ -42,7 +42,7 @@ class TOOLS_DLLPUBLIC Resource
ResMgr* m_pResMgr;
// check availability of Resource
- BOOL IsAvailableRes( const ResId& rId ) const
+ sal_Bool IsAvailableRes( const ResId& rId ) const
{ return m_pResMgr->IsAvailable( rId, this ); }
// Load a Resource
@@ -56,7 +56,7 @@ class TOOLS_DLLPUBLIC Resource
{ return m_pResMgr->GetClass(); }
// read a string from the resource
- static sal_uInt32 GetStringRes( UniString& rStr, const BYTE* pStr )
+ static sal_uInt32 GetStringRes( UniString& rStr, const sal_uInt8* pStr )
{ return ResMgr::GetString( rStr, pStr ); }
// increase the memory pointer gotten by GetClassRes()
diff --git a/tools/inc/tools/ref.hxx b/tools/inc/tools/ref.hxx
index ea1886b73e04..e2c2c5c893be 100644
--- a/tools/inc/tools/ref.hxx
+++ b/tools/inc/tools/ref.hxx
@@ -41,7 +41,7 @@
inline ~ClassName##Ref(); \
inline ClassName##Ref & operator = ( const ClassName##Ref & rObj ); \
inline ClassName##Ref & operator = ( ClassName * pObj ); \
- inline BOOL Is() const { return pObj != NULL; } \
+ inline sal_Bool Is() const { return pObj != NULL; } \
inline ClassName * operator & () const { return pObj; } \
inline ClassName * operator -> () const { return pObj; } \
inline ClassName & operator * () const { return *pObj; } \
@@ -106,8 +106,8 @@ PRV_SV_IMPL_REF_COUNTERS( ClassName, Ref, AddRef(), AddNextRef(),\
ReleaseReference(), EMPTYARG, pObj )
#define SV_IMPL_LOCK( ClassName ) \
-PRV_SV_IMPL_REF_COUNTERS( ClassName, Lock, OwnerLock( TRUE ), \
- OwnerLock( TRUE ), OwnerLock( FALSE ), \
+PRV_SV_IMPL_REF_COUNTERS( ClassName, Lock, OwnerLock( sal_True ), \
+ OwnerLock( sal_True ), OwnerLock( sal_False ), \
EMPTYARG, pObj )
#define SV_DECL_IMPL_REF(ClassName) \
@@ -126,7 +126,7 @@ class vis CN##MemberList : public CN##List\
{\
public:\
inline CN##MemberList();\
-inline CN##MemberList(USHORT nInitSz, USHORT nResize );\
+inline CN##MemberList(sal_uInt16 nInitSz, sal_uInt16 nResize );\
inline CN##MemberList( const CN##MemberList & rRef );\
inline ~CN##MemberList();\
inline CN##MemberList & operator =\
@@ -134,17 +134,17 @@ inline CN##MemberList & operator =\
inline void Clear();\
inline void Insert( EN p )\
{ CN##List::Insert( p ); p->AddRef();}\
-inline void Insert( EN p, ULONG nIndex )\
+inline void Insert( EN p, sal_uIntPtr nIndex )\
{ CN##List::Insert( p, nIndex ); p->AddRef();}\
inline void Insert( EN p, EN pOld )\
{ CN##List::Insert( p, pOld ); p->AddRef();}\
inline void Append( EN p )\
{ Insert( p, LIST_APPEND );}\
inline EN Remove();\
-inline EN Remove( ULONG nIndex );\
+inline EN Remove( sal_uIntPtr nIndex );\
inline EN Remove( EN p );\
inline EN Replace( EN p );\
-inline EN Replace( EN p, ULONG nIndex );\
+inline EN Replace( EN p, sal_uIntPtr nIndex );\
inline EN Replace( EN pNew, EN pOld );\
inline void Append( const CN##MemberList & );\
};
@@ -157,12 +157,12 @@ PRV_SV_DECL_REF_LIST(CN,EN,vis)
/************************** S v R e f L i s t ****************************/
#define SV_IMPL_REF_LIST( CN, EN ) \
inline CN##MemberList::CN##MemberList(){}\
-inline CN##MemberList::CN##MemberList(USHORT nInitSz, USHORT nResize )\
+inline CN##MemberList::CN##MemberList(sal_uInt16 nInitSz, sal_uInt16 nResize )\
: CN##List( nInitSz, nResize ){}\
inline CN##MemberList::CN##MemberList( const CN##MemberList & rRef ) \
: CN##List( rRef ) \
{\
- ULONG nOldCount = Count(); \
+ sal_uIntPtr nOldCount = Count(); \
EN pEntry = First(); \
while( pEntry ) \
{ pEntry->AddRef(); pEntry = Next(); } \
@@ -173,7 +173,7 @@ inline CN##MemberList & CN##MemberList::operator = \
( const CN##MemberList & rRef ) \
{\
CN##MemberList & rList = (CN##MemberList &)rRef; \
- ULONG nOldCount = rList.Count(); \
+ sal_uIntPtr nOldCount = rList.Count(); \
/* Count der Objekte erhoehen */ \
EN pEntry = rList.First(); \
while( pEntry ) \
@@ -195,7 +195,7 @@ inline EN CN##MemberList::Remove() \
EN p = CN##List::Remove(); \
if( p ) p->ReleaseReference(); return p; \
}\
-inline EN CN##MemberList::Remove( ULONG nIndex ) \
+inline EN CN##MemberList::Remove( sal_uIntPtr nIndex ) \
{\
EN p = CN##List::Remove( nIndex ); \
if( p ) p->ReleaseReference(); return p; \
@@ -210,7 +210,7 @@ inline EN CN##MemberList::Replace( EN p ) \
p->AddRef(); p = CN##List::Replace( p ); \
if( p ) p->ReleaseReference(); return p; \
}\
-inline EN CN##MemberList::Replace( EN p, ULONG nIndex ) \
+inline EN CN##MemberList::Replace( EN p, sal_uIntPtr nIndex ) \
{\
p->AddRef(); p = CN##List::Replace( p, nIndex ); \
if( p ) p->ReleaseReference(); return p; \
@@ -222,7 +222,7 @@ inline EN CN##MemberList::Replace( EN pNew, EN pOld ) \
}\
inline void CN##MemberList::Append( const CN##MemberList & rList )\
{\
- for( ULONG i = 0; i < rList.Count(); i++ )\
+ for( sal_uIntPtr i = 0; i < rList.Count(); i++ )\
Append( rList.GetObject( i ) );\
}
@@ -234,23 +234,23 @@ inline void CN##MemberList::Append( const CN##MemberList & rList )\
/************************** S v M e m b e r L i s t **********************/
#define PRV_SV_DECL_MEMBER_LIST(Class,EntryName) \
Class##MemberList() {} \
-inline Class##MemberList(USHORT nInitSz,USHORT nResize);\
+inline Class##MemberList(sal_uInt16 nInitSz,sal_uInt16 nResize);\
inline void Insert( EntryName p ); \
-inline void Insert( EntryName p, ULONG nIndex ); \
+inline void Insert( EntryName p, sal_uIntPtr nIndex ); \
inline void Insert( EntryName p, EntryName pOld ); \
inline void Append( EntryName p ); \
inline EntryName Remove(); \
-inline EntryName Remove( ULONG nIndex ); \
+inline EntryName Remove( sal_uIntPtr nIndex ); \
inline EntryName Remove( EntryName p ); \
inline EntryName Replace( EntryName p ); \
-inline EntryName Replace( EntryName p, ULONG nIndex );\
+inline EntryName Replace( EntryName p, sal_uIntPtr nIndex );\
inline EntryName Replace( EntryName pNew, EntryName pOld );\
inline EntryName GetCurObject() const;\
-inline EntryName GetObject( ULONG nIndex ) const;\
-inline ULONG GetPos( const EntryName ) const;\
-inline ULONG GetPos( const EntryName, ULONG nStartIndex,\
- BOOL bForward = TRUE ) const;\
-inline EntryName Seek( ULONG nIndex );\
+inline EntryName GetObject( sal_uIntPtr nIndex ) const;\
+inline sal_uIntPtr GetPos( const EntryName ) const;\
+inline sal_uIntPtr GetPos( const EntryName, sal_uIntPtr nStartIndex,\
+ sal_Bool bForward = sal_True ) const;\
+inline EntryName Seek( sal_uIntPtr nIndex );\
inline EntryName Seek( EntryName p );\
inline EntryName First();\
inline EntryName Last();\
@@ -260,11 +260,11 @@ inline void Append( const Class##MemberList & rList );
#define PRV_SV_IMPL_MEMBER_LIST(ClassName,EntryName,BaseList)\
inline ClassName##MemberList::ClassName##MemberList\
- (USHORT nInitSz,USHORT nResize)\
+ (sal_uInt16 nInitSz,sal_uInt16 nResize)\
: BaseList( nInitSz, nResize ){}\
inline void ClassName##MemberList::Insert( EntryName p )\
{BaseList::Insert(p);}\
-inline void ClassName##MemberList::Insert( EntryName p, ULONG nIdx )\
+inline void ClassName##MemberList::Insert( EntryName p, sal_uIntPtr nIdx )\
{BaseList::Insert(p,nIdx);}\
inline void ClassName##MemberList::Insert( EntryName p, EntryName pOld )\
{BaseList::Insert(p,pOld);}\
@@ -272,21 +272,21 @@ inline void ClassName##MemberList::Append( EntryName p )\
{BaseList::Append(p);}\
inline EntryName ClassName##MemberList::Remove()\
{return (EntryName)BaseList::Remove();}\
-inline EntryName ClassName##MemberList::Remove( ULONG nIdx )\
+inline EntryName ClassName##MemberList::Remove( sal_uIntPtr nIdx )\
{return (EntryName)BaseList::Remove(nIdx);}\
inline EntryName ClassName##MemberList::Remove( EntryName p )\
{return (EntryName)BaseList::Remove(p);}\
inline EntryName ClassName##MemberList::Replace( EntryName p )\
{return (EntryName)BaseList::Replace(p);}\
-inline EntryName ClassName##MemberList::Replace( EntryName p, ULONG nIdx )\
+inline EntryName ClassName##MemberList::Replace( EntryName p, sal_uIntPtr nIdx )\
{return (EntryName)BaseList::Replace(p,nIdx);}\
inline EntryName ClassName##MemberList::Replace( EntryName p, EntryName pOld )\
{return (EntryName)BaseList::Replace(p,pOld);}\
inline EntryName ClassName##MemberList::GetCurObject() const\
{return (EntryName)BaseList::GetCurObject();}\
-inline EntryName ClassName##MemberList::GetObject( ULONG nIdx ) const\
+inline EntryName ClassName##MemberList::GetObject( sal_uIntPtr nIdx ) const\
{return (EntryName)BaseList::GetObject( nIdx );}\
-inline EntryName ClassName##MemberList::Seek( ULONG nIdx )\
+inline EntryName ClassName##MemberList::Seek( sal_uIntPtr nIdx )\
{return (EntryName)BaseList::Seek( nIdx );}\
inline EntryName ClassName##MemberList::Seek( EntryName p )\
{return (EntryName)BaseList::Seek( p );}\
@@ -300,10 +300,10 @@ inline EntryName ClassName##MemberList::Prev()\
{return (EntryName)BaseList::Prev();}\
inline void ClassName##MemberList::Append( const ClassName##MemberList & rList )\
{BaseList::Append(rList);}\
-inline ULONG ClassName##MemberList::GetPos( const EntryName p) const\
+inline sal_uIntPtr ClassName##MemberList::GetPos( const EntryName p) const\
{return BaseList::GetPos( p );}\
-inline ULONG ClassName##MemberList::GetPos\
- ( const EntryName p, ULONG nStart, BOOL bForward ) const\
+inline sal_uIntPtr ClassName##MemberList::GetPos\
+ ( const EntryName p, sal_uIntPtr nStart, sal_Bool bForward ) const\
{return BaseList::GetPos( p, nStart, bForward );}
#define SV_DECL_MEMBER_LIST(ClassName,EntryName)\
@@ -324,7 +324,7 @@ SV_IMPL_MEMBER_LIST(ClassName,EntryName)
#define SV_NO_DELETE_REFCOUNT 0x80000000
class TOOLS_DLLPUBLIC SvRefBase
{
- UINT32 nRefCount;
+ sal_uIntPtr nRefCount;
#if defined (GCC) && (defined (C281) || defined (C290) || defined (C291))
public:
#else
@@ -343,9 +343,9 @@ public:
if( nRefCount < SV_NO_DELETE_REFCOUNT )
nRefCount += SV_NO_DELETE_REFCOUNT;
}
- UINT32 AddMulRef( UINT32 n ) { return nRefCount += n; }
- UINT32 AddNextRef() { return ++nRefCount; }
- UINT32 AddRef()
+ sal_uIntPtr AddMulRef( sal_uIntPtr n ) { return nRefCount += n; }
+ sal_uIntPtr AddNextRef() { return ++nRefCount; }
+ sal_uIntPtr AddRef()
{
if( nRefCount >= SV_NO_DELETE_REFCOUNT )
nRefCount -= SV_NO_DELETE_REFCOUNT;
@@ -356,14 +356,14 @@ public:
if( !--nRefCount )
QueryDelete();
}
- UINT32 ReleaseRef()
+ sal_uIntPtr ReleaseRef()
{
- UINT32 n = --nRefCount;
+ sal_uIntPtr n = --nRefCount;
if( !n )
QueryDelete();
return n;
}
- UINT32 GetRefCount() const { return nRefCount; }
+ sal_uIntPtr GetRefCount() const { return nRefCount; }
};
//#if 0 // _SOLAR__PRIVATE
@@ -436,7 +436,7 @@ public: \
inline void Clear() { _xHdl.Clear(); } \
inline ClassName##Weak& operator = ( ClassName * pObj ) { \
_xHdl = pObj ? pObj->GetHdl() : 0; return *this; } \
- inline BOOL Is() const { \
+ inline sal_Bool Is() const { \
return _xHdl.Is() && _xHdl->GetObj(); } \
inline ClassName * operator & () const { \
return (ClassName*) ( _xHdl.Is() ? _xHdl->GetObj() : 0 ); } \
diff --git a/tools/inc/tools/resid.hxx b/tools/inc/tools/resid.hxx
index cfefce8e6ab0..cf3ec3d78ea9 100644
--- a/tools/inc/tools/resid.hxx
+++ b/tools/inc/tools/resid.hxx
@@ -75,7 +75,7 @@ class ResId
ImplInit( nId, rMgr, NULL );
}
// backwards compatibility; avoid ambiguities
- ResId( USHORT nId, ResMgr& rMgr )
+ ResId( sal_uInt16 nId, ResMgr& rMgr )
{
ImplInit( sal_uInt32(nId), rMgr, NULL );
}
@@ -143,7 +143,7 @@ class ResId
return *this;
}
- const ResId & SetAutoRelease(BOOL bRelease) const
+ const ResId & SetAutoRelease(sal_Bool bRelease) const
{
if( bRelease )
m_nResId &= ~RSC_DONTRELEASE;
@@ -152,7 +152,7 @@ class ResId
return *this;
}
- BOOL IsAutoRelease() const
+ sal_Bool IsAutoRelease() const
{ return !(m_nResId & RSC_DONTRELEASE); }
sal_uInt32 GetId() const { return m_nResId & ~RSC_DONTRELEASE; }
diff --git a/tools/inc/tools/resmgr.hxx b/tools/inc/tools/resmgr.hxx
index 4b79040921b3..327eff7a3b80 100644
--- a/tools/inc/tools/resmgr.hxx
+++ b/tools/inc/tools/resmgr.hxx
@@ -138,7 +138,7 @@ private:
// the next two methods are needed to prevent the string hook called
// with the res mgr mutex locked
// like GetString, but doesn't call the string hook
- TOOLS_DLLPRIVATE static sal_uInt32 GetStringWithoutHook( UniString& rStr, const BYTE* pStr );
+ TOOLS_DLLPRIVATE static sal_uInt32 GetStringWithoutHook( UniString& rStr, const sal_uInt8* pStr );
// like ReadString but doesn't call the string hook
TOOLS_DLLPRIVATE UniString ReadStringWithoutHook();
@@ -153,7 +153,7 @@ public:
~ResMgr();
// Sprachabhaengige Ressource Library
- static const sal_Char* GetLang( LanguageType& eLanguage, USHORT nPrio = 0 ); //depricated! see "tools/source/rc/resmgr.cxx"
+ static const sal_Char* GetLang( LanguageType& eLanguage, sal_uInt16 nPrio = 0 ); //depricated! see "tools/source/rc/resmgr.cxx"
static ResMgr* SearchCreateResMgr( const sal_Char* pPrefixName,
com::sun::star::lang::Locale& rLocale );
static ResMgr* CreateResMgr( const sal_Char* pPrefixName,
@@ -165,11 +165,11 @@ public:
void TestStack( const Resource * );
// ist Resource verfuegbar
- BOOL IsAvailable( const ResId& rId,
+ sal_Bool IsAvailable( const ResId& rId,
const Resource* = NULL) const;
// Resource suchen und laden
- BOOL GetResource( const ResId& rId, const Resource * = NULL );
+ sal_Bool GetResource( const ResId& rId, const Resource * = NULL );
static void * GetResourceSkipHeader( const ResId& rResId, ResMgr ** ppResMgr );
// Kontext freigeben
void PopContext( const Resource* = NULL );
@@ -182,21 +182,21 @@ public:
{ return( pHT->GetGlobOff() ); }
// returns a string and its length out of the resource
- static sal_uInt32 GetString( UniString& rStr, const BYTE* pStr );
+ static sal_uInt32 GetString( UniString& rStr, const sal_uInt8* pStr );
// returns a byte string and its length out of the resource
- static sal_uInt32 GetByteString( rtl::OString& rStr, const BYTE* pStr );
+ static sal_uInt32 GetByteString( rtl::OString& rStr, const sal_uInt8* pStr );
// Groesse eines Strings in der Resource
static sal_uInt32 GetStringSize( sal_uInt32 nLen )
{ nLen++; return (nLen + nLen%2); }
- static sal_uInt32 GetStringSize( const BYTE* pStr, sal_uInt32& nLen );
+ static sal_uInt32 GetStringSize( const sal_uInt8* pStr, sal_uInt32& nLen );
// return a int64
static sal_uInt64 GetUInt64( void* pDatum );
// Gibt einen long zurueck
- static INT32 GetLong( void * pLong );
+ static sal_Int32 GetLong( void * pLong );
// return a short
- static INT16 GetShort( void * pShort );
+ static sal_Int16 GetShort( void * pShort );
// Gibt einen Zeiger auf die Resource zurueck
void * GetClass();
@@ -208,8 +208,8 @@ public:
const rtl::OUString&GetFileName() const;
- INT16 ReadShort();
- INT32 ReadLong();
+ sal_Int16 ReadShort();
+ sal_Int32 ReadLong();
UniString ReadString();
rtl::OString ReadByteString();
diff --git a/tools/inc/tools/rtti.hxx b/tools/inc/tools/rtti.hxx
index 1f8673596b48..70a9dee7c04d 100644
--- a/tools/inc/tools/rtti.hxx
+++ b/tools/inc/tools/rtti.hxx
@@ -38,25 +38,25 @@ typedef void* (*TypeId)();
#define TYPEINFO() \
static void* CreateType(); \
static TypeId StaticType(); \
- static BOOL IsOf( TypeId aSameOrSuperType ); \
+ static sal_Bool IsOf( TypeId aSameOrSuperType ); \
virtual TypeId Type() const; \
- virtual BOOL IsA( TypeId aSameOrSuperType ) const
+ virtual sal_Bool IsA( TypeId aSameOrSuperType ) const
#define TYPEINFO_VISIBILITY(visibility) \
visibility static void* CreateType(); \
visibility static TypeId StaticType(); \
- visibility static BOOL IsOf( TypeId aSameOrSuperType ); \
+ visibility static sal_Bool IsOf( TypeId aSameOrSuperType ); \
visibility virtual TypeId Type() const; \
- visibility virtual BOOL IsA( TypeId aSameOrSuperType ) const
+ visibility virtual sal_Bool IsA( TypeId aSameOrSuperType ) const
#define TYPEINIT_FACTORY(sType, Factory ) \
void* sType::CreateType() { return Factory; } \
TypeId sType::StaticType() { return &CreateType; } \
TypeId sType::Type() const { return &CreateType; } \
- BOOL sType::IsOf( TypeId aSameOrSuperType ) \
+ sal_Bool sType::IsOf( TypeId aSameOrSuperType ) \
{ \
if ( aSameOrSuperType == StaticType() ) \
- return TRUE
+ return sal_True
#define STATICTYPE(sType) (sType::StaticType())
@@ -67,12 +67,12 @@ typedef void* (*TypeId)();
#define SUPERTYPE(sSuper) \
if ( sSuper::IsOf(aSameOrSuperType ) ) \
- return TRUE
+ return sal_True
#define TYPEINIT_END(sType) \
- return FALSE; \
+ return sal_False; \
} \
- BOOL sType::IsA( TypeId aSameOrSuperType ) const \
+ sal_Bool sType::IsA( TypeId aSameOrSuperType ) const \
{ return IsOf( aSameOrSuperType ); }
#define TYPEINIT0_FACTORY(sType, Factory) \
@@ -121,16 +121,16 @@ typedef void* (*TypeId)();
#define TYPEINFO_ID(id) \
static TypeId StaticType() { return (TypeId) ( id | 0xF000000L ); } \
- static BOOL IsOf( TypeId aSameOrSuperType ); \
+ static sal_Bool IsOf( TypeId aSameOrSuperType ); \
virtual TypeId Type() const; \
- virtual BOOL IsA( TypeId aSameOrSuperType ) const
+ virtual sal_Bool IsA( TypeId aSameOrSuperType ) const
#define TYPEINIT_ID(sType) \
TypeId sType::Type() const { return StaticType(); } \
- BOOL sType::IsOf( TypeId aSameOrSuperType ) \
+ sal_Bool sType::IsOf( TypeId aSameOrSuperType ) \
{ \
if ( aSameOrSuperType == StaticType() ) \
- return TRUE
+ return sal_True
#define TYPEINIT0_ID(sType) \
TYPEINIT_ID(sType); \
diff --git a/tools/inc/tools/shl.hxx b/tools/inc/tools/shl.hxx
index ab08e3cc7a58..73933d91e53b 100644
--- a/tools/inc/tools/shl.hxx
+++ b/tools/inc/tools/shl.hxx
@@ -109,6 +109,6 @@
#define SHL_COUNT 64
-TOOLS_DLLPUBLIC void** GetAppData( USHORT nSharedLib );
+TOOLS_DLLPUBLIC void** GetAppData( sal_uInt16 nSharedLib );
#endif // _SHL_HXX
diff --git a/tools/inc/tools/solar.h b/tools/inc/tools/solar.h
index cc7c189fbf84..1686e82bf52d 100644
--- a/tools/inc/tools/solar.h
+++ b/tools/inc/tools/solar.h
@@ -34,57 +34,24 @@
/*** common solar defines ***********************************/
-#ifndef TRUE
-#define TRUE 1
-#endif
-#ifndef FALSE
-#define FALSE 0
-#endif
-
#ifdef _SOLAR__PRIVATE
#undef _SOLAR__PRIVATE
#endif
#define _SOLAR__PRIVATE 1
#define __REFERENCED 0
-/*** common solar types ********************************************/
-/* NOTE: these types are deprecated, or soon will be. They should */
-/* not be used in new code, and should be replaced with their */
-/* corresponding types from sal/types.h in old code when possible. */
-/* Previous typedefs from before sal convergence are in comments */
-/* to the right of the new types. */
-
-typedef sal_Bool BOOL; /* typedef unsigned char BOOL; */
-typedef sal_uInt8 BYTE; /* typedef unsigned char BYTE; */
-typedef sal_uInt16 USHORT; /* typedef unsigned short USHORT; */
-typedef sal_uIntPtr ULONG; /* typedef unsigned long ULONG; */
-typedef int FASTBOOL;
-
-#if !defined(VCL_NEED_BASETSD) || defined(__MINGW32__)
-#ifndef _SOLAR_NOUINT
-typedef sal_Int16 INT16; /* typedef short INT16; */
-typedef sal_uInt16 UINT16; /* typedef unsigned short UINT16; */
-#if defined(SAL_W32)
-typedef sal_sChar INT8;
-#else
-typedef sal_Char INT8; /* typedef char INT8; */
-#endif
-typedef sal_uInt8 UINT8; /* typedef unsigned char UINT8; */
-#endif /* _SOLAR_NOUINT */
-#endif
-
-#ifndef VCL_NEED_BASETSD
-#ifndef _SOLAR_NOUINT
-/* types with exact defined size (not just the minimum size) */
-typedef sal_Int64 INT64; /* typedef long INT64; previously "void" on Windows */
-typedef sal_uInt64 UINT64; /* typedef unsigned long UINT64; previously "void" on Windows */
-typedef sal_Int32 INT32; /* typedef int INT32; previously "long" on Windows */
-typedef sal_uInt32 UINT32; /* typedef unsigned int UINT32; previously "unsigned long" on Windows */
-#endif /* _SOLAR_NOUINT */
-#endif
+/************************************************************
+ Intermediate type to solve type clash with Windows headers.
+ Should be removed as soon as all code parts have been reviewed
+ and the correct type is known. Most of the times ULONG is meant
+ to be a 32-Bit unsigned integer type as sal_uInt32 is often
+ used for data exchange or for similiar method args.
+*************************************************************/
+typedef sal_uIntPtr sal_uLong; /* Replaces type ULONG */
/*** misc. macros to leverage platform and compiler differences ********/
+typedef int FASTBOOL;
#define DELETEZ( p ) ( delete p,p = 0 )
#define __FAR_DATA
@@ -114,69 +81,69 @@ typedef sal_uInt32 UINT32; /* typedef unsigned int UINT32; previousl
always little endian;
not necessarily aligned */
-typedef BYTE SVBT8[1];
-typedef BYTE SVBT16[2];
-typedef BYTE SVBT32[4];
-typedef BYTE SVBT64[8];
+typedef sal_uInt8 SVBT8[1];
+typedef sal_uInt8 SVBT16[2];
+typedef sal_uInt8 SVBT32[4];
+typedef sal_uInt8 SVBT64[8];
#ifdef __cplusplus
-inline BYTE SVBT8ToByte ( const SVBT8 p ) { return p[0]; }
-inline USHORT SVBT16ToShort( const SVBT16 p ) { return (USHORT)p[0]
- + ((USHORT)p[1] << 8); }
+inline sal_uInt8 SVBT8ToByte ( const SVBT8 p ) { return p[0]; }
+inline sal_uInt16 SVBT16ToShort( const SVBT16 p ) { return (sal_uInt16)p[0]
+ + ((sal_uInt16)p[1] << 8); }
inline sal_uInt32 SVBT32ToUInt32 ( const SVBT32 p ) { return (sal_uInt32)p[0]
+ ((sal_uInt32)p[1] << 8)
+ ((sal_uInt32)p[2] << 16)
+ ((sal_uInt32)p[3] << 24); }
#if defined OSL_LITENDIAN
inline double SVBT64ToDouble( const SVBT64 p ) { double n;
- ((BYTE*)&n)[0] = p[0];
- ((BYTE*)&n)[1] = p[1];
- ((BYTE*)&n)[2] = p[2];
- ((BYTE*)&n)[3] = p[3];
- ((BYTE*)&n)[4] = p[4];
- ((BYTE*)&n)[5] = p[5];
- ((BYTE*)&n)[6] = p[6];
- ((BYTE*)&n)[7] = p[7];
+ ((sal_uInt8*)&n)[0] = p[0];
+ ((sal_uInt8*)&n)[1] = p[1];
+ ((sal_uInt8*)&n)[2] = p[2];
+ ((sal_uInt8*)&n)[3] = p[3];
+ ((sal_uInt8*)&n)[4] = p[4];
+ ((sal_uInt8*)&n)[5] = p[5];
+ ((sal_uInt8*)&n)[6] = p[6];
+ ((sal_uInt8*)&n)[7] = p[7];
return n; }
#else
inline double SVBT64ToDouble( const SVBT64 p ) { double n;
- ((BYTE*)&n)[0] = p[7];
- ((BYTE*)&n)[1] = p[6];
- ((BYTE*)&n)[2] = p[5];
- ((BYTE*)&n)[3] = p[4];
- ((BYTE*)&n)[4] = p[3];
- ((BYTE*)&n)[5] = p[2];
- ((BYTE*)&n)[6] = p[1];
- ((BYTE*)&n)[7] = p[0];
+ ((sal_uInt8*)&n)[0] = p[7];
+ ((sal_uInt8*)&n)[1] = p[6];
+ ((sal_uInt8*)&n)[2] = p[5];
+ ((sal_uInt8*)&n)[3] = p[4];
+ ((sal_uInt8*)&n)[4] = p[3];
+ ((sal_uInt8*)&n)[5] = p[2];
+ ((sal_uInt8*)&n)[6] = p[1];
+ ((sal_uInt8*)&n)[7] = p[0];
return n; }
#endif
-inline void ByteToSVBT8 ( BYTE n, SVBT8 p ) { p[0] = n; }
-inline void ShortToSVBT16( USHORT n, SVBT16 p ) { p[0] = (BYTE) n;
- p[1] = (BYTE)(n >> 8); }
-inline void UInt32ToSVBT32 ( sal_uInt32 n, SVBT32 p ) { p[0] = (BYTE) n;
- p[1] = (BYTE)(n >> 8);
- p[2] = (BYTE)(n >> 16);
- p[3] = (BYTE)(n >> 24); }
+inline void ByteToSVBT8 ( sal_uInt8 n, SVBT8 p ) { p[0] = n; }
+inline void ShortToSVBT16( sal_uInt16 n, SVBT16 p ) { p[0] = (sal_uInt8) n;
+ p[1] = (sal_uInt8)(n >> 8); }
+inline void UInt32ToSVBT32 ( sal_uInt32 n, SVBT32 p ) { p[0] = (sal_uInt8) n;
+ p[1] = (sal_uInt8)(n >> 8);
+ p[2] = (sal_uInt8)(n >> 16);
+ p[3] = (sal_uInt8)(n >> 24); }
#if defined OSL_LITENDIAN
-inline void DoubleToSVBT64( double n, SVBT64 p ) { p[0] = ((BYTE*)&n)[0];
- p[1] = ((BYTE*)&n)[1];
- p[2] = ((BYTE*)&n)[2];
- p[3] = ((BYTE*)&n)[3];
- p[4] = ((BYTE*)&n)[4];
- p[5] = ((BYTE*)&n)[5];
- p[6] = ((BYTE*)&n)[6];
- p[7] = ((BYTE*)&n)[7]; }
+inline void DoubleToSVBT64( double n, SVBT64 p ) { p[0] = ((sal_uInt8*)&n)[0];
+ p[1] = ((sal_uInt8*)&n)[1];
+ p[2] = ((sal_uInt8*)&n)[2];
+ p[3] = ((sal_uInt8*)&n)[3];
+ p[4] = ((sal_uInt8*)&n)[4];
+ p[5] = ((sal_uInt8*)&n)[5];
+ p[6] = ((sal_uInt8*)&n)[6];
+ p[7] = ((sal_uInt8*)&n)[7]; }
#else
-inline void DoubleToSVBT64( double n, SVBT64 p ) { p[0] = ((BYTE*)&n)[7];
- p[1] = ((BYTE*)&n)[6];
- p[2] = ((BYTE*)&n)[5];
- p[3] = ((BYTE*)&n)[4];
- p[4] = ((BYTE*)&n)[3];
- p[5] = ((BYTE*)&n)[2];
- p[6] = ((BYTE*)&n)[1];
- p[7] = ((BYTE*)&n)[0]; }
+inline void DoubleToSVBT64( double n, SVBT64 p ) { p[0] = ((sal_uInt8*)&n)[7];
+ p[1] = ((sal_uInt8*)&n)[6];
+ p[2] = ((sal_uInt8*)&n)[5];
+ p[3] = ((sal_uInt8*)&n)[4];
+ p[4] = ((sal_uInt8*)&n)[3];
+ p[5] = ((sal_uInt8*)&n)[2];
+ p[6] = ((sal_uInt8*)&n)[1];
+ p[7] = ((sal_uInt8*)&n)[0]; }
#endif
#endif
#endif
@@ -358,7 +325,7 @@ template<typename T> inline T Abs(T a) { return (a>=0?a:-a); }
#ifdef STRING32
#define xub_StrLen sal_uInt32
#else
-#define xub_StrLen USHORT
+#define xub_StrLen sal_uInt16
#endif
// -- moved here from libcall.hxx ----------------------------------------
diff --git a/tools/inc/tools/stack.hxx b/tools/inc/tools/stack.hxx
index 4f3223295114..6ac6aa2fc586 100644
--- a/tools/inc/tools/stack.hxx
+++ b/tools/inc/tools/stack.hxx
@@ -44,7 +44,7 @@ public:
using Container::GetObject;
using Container::GetPos;
- Stack( USHORT _nInitSize = 16, USHORT _nReSize = 16 ) :
+ Stack( sal_uInt16 _nInitSize = 16, sal_uInt16 _nReSize = 16 ) :
Container( CONTAINER_MAXBLOCKSIZE, _nInitSize, _nReSize ) {}
Stack( const Stack& rStack ) : Container( rStack ) {}
@@ -55,9 +55,9 @@ public:
Stack& operator =( const Stack& rStack )
{ Container::operator =( rStack ); return *this; }
- BOOL operator ==( const Stack& rStack ) const
+ sal_Bool operator ==( const Stack& rStack ) const
{ return Container::operator ==( rStack ); }
- BOOL operator !=( const Stack& rStack ) const
+ sal_Bool operator !=( const Stack& rStack ) const
{ return Container::operator !=( rStack ); }
};
@@ -72,8 +72,8 @@ public: \
using Stack::Clear; \
using Stack::Count; \
\
- ClassName( USHORT _nInitSize = 16, \
- USHORT _nReSize = 16 ) : \
+ ClassName( sal_uInt16 _nInitSize = 16, \
+ sal_uInt16 _nReSize = 16 ) : \
Stack( _nInitSize, _nReSize ) {} \
ClassName( const ClassName& rClassName ) : \
Stack( rClassName ) {} \
@@ -82,12 +82,12 @@ public: \
Type Pop() { return (Type)Stack::Pop(); } \
Type Top() const { return (Type)Stack::Top(); } \
\
- Type GetObject( ULONG nIndex ) const \
+ Type GetObject( sal_uIntPtr nIndex ) const \
{ return (Type)Stack::GetObject( nIndex ); } \
- ULONG GetPos( const Type p ) const \
+ sal_uIntPtr GetPos( const Type p ) const \
{ return Stack::GetPos( (const void*)p ); } \
- ULONG GetPos( const Type p, ULONG nStartIndex, \
- BOOL bForward = TRUE ) const \
+ sal_uIntPtr GetPos( const Type p, sal_uIntPtr nStartIndex, \
+ sal_Bool bForward = sal_True ) const \
{ return Stack::GetPos( (const void*)p, \
nStartIndex, \
bForward ); } \
@@ -96,9 +96,9 @@ public: \
{ Stack::operator =( rClassName ); \
return *this; } \
\
- BOOL operator ==( const ClassName& rStack ) const \
+ sal_Bool operator ==( const ClassName& rStack ) const \
{ return Stack::operator ==( rStack ); } \
- BOOL operator !=( const ClassName& rStack ) const \
+ sal_Bool operator !=( const ClassName& rStack ) const \
{ return Stack::operator !=( rStack ); } \
};
diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx
index 61af361aa5b7..66034d1dc10e 100644
--- a/tools/inc/tools/stream.hxx
+++ b/tools/inc/tools/stream.hxx
@@ -142,16 +142,16 @@ protected:
public:
TYPEINFO();
- SvLockBytes(): m_pStream(0), m_bOwner(FALSE), m_bSync(FALSE) {}
+ SvLockBytes(): m_pStream(0), m_bOwner(sal_False), m_bSync(sal_False) {}
- SvLockBytes(SvStream * pTheStream, sal_Bool bTheOwner = FALSE):
- m_pStream(pTheStream), m_bOwner(bTheOwner), m_bSync(FALSE) {}
+ SvLockBytes(SvStream * pTheStream, sal_Bool bTheOwner = sal_False):
+ m_pStream(pTheStream), m_bOwner(bTheOwner), m_bSync(sal_False) {}
virtual ~SvLockBytes() { close(); }
virtual const SvStream * GetStream() const { return m_pStream; }
- virtual void SetSynchronMode(sal_Bool bTheSync = TRUE) { m_bSync = bTheSync; }
+ virtual void SetSynchronMode(sal_Bool bTheSync = sal_True) { m_bSync = bTheSync; }
virtual sal_Bool IsSynchronMode() const { return m_bSync; }
@@ -183,7 +183,7 @@ class TOOLS_DLLPUBLIC SvOpenLockBytes: public SvLockBytes
public:
TYPEINFO();
- SvOpenLockBytes(): SvLockBytes(0, FALSE) {}
+ SvOpenLockBytes(): SvLockBytes(0, sal_False) {}
SvOpenLockBytes(SvStream * pStream, sal_Bool bOwner):
SvLockBytes(pStream, bOwner) {}
@@ -213,7 +213,7 @@ public:
TYPEINFO();
SvAsyncLockBytes(SvStream * pStream, sal_Bool bOwner):
- SvOpenLockBytes(pStream, bOwner), m_nSize(0), m_bTerminated(FALSE) {}
+ SvOpenLockBytes(pStream, bOwner), m_nSize(0), m_bTerminated(sal_False) {}
virtual ErrCode ReadAt(sal_Size nPos, void * pBuffer, sal_Size nCount,
sal_Size * pRead) const;
@@ -228,7 +228,7 @@ public:
virtual sal_Size Seek(sal_Size nPos);
- virtual void Terminate() { m_bTerminated = TRUE; }
+ virtual void Terminate() { m_bTerminated = sal_True; }
};
SV_DECL_IMPL_REF(SvAsyncLockBytes);
@@ -257,8 +257,8 @@ private:
unsigned int eIOMode:2; // STREAM_IO_*
// Error-Codes, Konvertierung, Komprimierung, ...
- int bIsDirty:1; // TRUE: Stream != Pufferinhalt
- int bIsConsistent:1;// FALSE: Buffer enthaelt Daten, die NICHT
+ int bIsDirty:1; // sal_True: Stream != Pufferinhalt
+ int bIsConsistent:1;// sal_False: Buffer enthaelt Daten, die NICHT
// per PutData in den abgeleiteten Stream
// geschrieben werden duerfen (siehe PutBack)
int bSwap:1;
@@ -648,7 +648,7 @@ inline SvStream& SvStream::ReadNumber( int& rInt )
/*
inline SvStream& SvStream::ReadNumber( unsigned int& rUInt )
{
- ULONG nTmp;
+ sal_uIntPtr nTmp;
ReadNumber( nTmp );
rUInt = (unsigned int)nTmp;
return *this;
@@ -684,7 +684,7 @@ inline SvStream& SvStream::WriteNumber( int nInt )
/*
inline SvStream& SvStream::WriteNumber( unsigned int nUInt )
{
- WriteNumber( (ULONG)nUInt );
+ WriteNumber( (sal_uIntPtr)nUInt );
return *this;
}
*/
@@ -824,7 +824,7 @@ public:
void* SwitchBuffer( sal_Size nInitSize=512, sal_Size nResize=64 );
void* SetBuffer( void* pBuf, sal_Size nSize,
- sal_Bool bOwnsData=TRUE, sal_Size nEOF=0 );
+ sal_Bool bOwnsData=sal_True, sal_Size nEOF=0 );
void ObjectOwnsMemory( sal_Bool bOwn ) { bOwnsData = bOwn; }
sal_Bool IsObjectMemoryOwner() { return bOwnsData; }
diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx
index 1e438a1296b6..510d66937299 100644..100755
--- a/tools/inc/tools/string.hxx
+++ b/tools/inc/tools/string.hxx
@@ -171,7 +171,7 @@ private:
TOOLS_DLLPRIVATE void ImplUpdateStringFromUniString(
sal_Unicode const *, sal_Size, rtl_TextEncoding, sal_uInt32);
TOOLS_DLLPRIVATE void ImplStringConvert(
- rtl_TextEncoding, rtl_TextEncoding, BOOL);
+ rtl_TextEncoding, rtl_TextEncoding, sal_Bool);
ByteString( const int* pDummy ); // not implemented: to prevent ByteString( NULL )
ByteString(int); // not implemented; to detect misuses
@@ -273,29 +273,29 @@ public:
ByteString& Convert( rtl_TextEncoding eSource,
rtl_TextEncoding eTarget,
- BOOL bReplace = TRUE );
+ sal_Bool bReplace = sal_True );
static sal_Char Convert( sal_Char c, rtl_TextEncoding eSource,
rtl_TextEncoding eTarget,
- BOOL bReplace = TRUE );
+ sal_Bool bReplace = sal_True );
static sal_Unicode ConvertToUnicode( sal_Char c,
rtl_TextEncoding eTextEncoding );
static sal_Char ConvertFromUnicode( sal_Unicode c,
rtl_TextEncoding eTextEncoding,
- BOOL bReplace = TRUE );
+ sal_Bool bReplace = sal_True );
static sal_Unicode ConvertToUnicode( const sal_Char* pChar, sal_Size* pLen,
rtl_TextEncoding eTextEncoding );
static sal_Size ConvertFromUnicode( sal_Unicode c, sal_Char* pBuf, sal_Size nBufLen,
rtl_TextEncoding eTextEncoding,
- BOOL bReplace = TRUE );
+ sal_Bool bReplace = sal_True );
ByteString& ConvertLineEnd( LineEnd eLineEnd );
ByteString& ConvertLineEnd()
{ return ConvertLineEnd( GetSystemLineEnd() ); }
- BOOL IsLowerAscii() const;
- BOOL IsUpperAscii() const;
- BOOL IsAlphaAscii() const;
- BOOL IsNumericAscii() const;
- BOOL IsAlphaNumericAscii() const;
+ sal_Bool IsLowerAscii() const;
+ sal_Bool IsUpperAscii() const;
+ sal_Bool IsAlphaAscii() const;
+ sal_Bool IsNumericAscii() const;
+ sal_Bool IsAlphaNumericAscii() const;
ByteString& ToLowerAscii();
ByteString& ToUpperAscii();
@@ -308,17 +308,17 @@ public:
xub_StrLen nLen = STRING_LEN ) const;
StringCompare CompareIgnoreCaseToAscii( const sal_Char* pCharStr,
xub_StrLen nLen = STRING_LEN ) const;
- BOOL Equals( const ByteString& rStr ) const;
- BOOL Equals( const sal_Char* pCharStr ) const;
- BOOL EqualsIgnoreCaseAscii( const ByteString& rStr ) const;
- BOOL EqualsIgnoreCaseAscii( const sal_Char* pCharStr ) const;
- BOOL Equals( const ByteString& rStr,
+ sal_Bool Equals( const ByteString& rStr ) const;
+ sal_Bool Equals( const sal_Char* pCharStr ) const;
+ sal_Bool EqualsIgnoreCaseAscii( const ByteString& rStr ) const;
+ sal_Bool EqualsIgnoreCaseAscii( const sal_Char* pCharStr ) const;
+ sal_Bool Equals( const ByteString& rStr,
xub_StrLen nIndex, xub_StrLen nLen ) const;
- BOOL Equals( const sal_Char* pCharStr,
+ sal_Bool Equals( const sal_Char* pCharStr,
xub_StrLen nIndex, xub_StrLen nLen ) const;
- BOOL EqualsIgnoreCaseAscii( const ByteString& rStr,
+ sal_Bool EqualsIgnoreCaseAscii( const ByteString& rStr,
xub_StrLen nIndex, xub_StrLen nLen ) const;
- BOOL EqualsIgnoreCaseAscii( const sal_Char* pCharStr,
+ sal_Bool EqualsIgnoreCaseAscii( const sal_Char* pCharStr,
xub_StrLen nIndex, xub_StrLen nLen ) const;
xub_StrLen Match( const ByteString& rStr ) const;
@@ -357,41 +357,41 @@ public:
void ReleaseBufferAccess( xub_StrLen nLen = STRING_LEN );
sal_Char* AllocBuffer( xub_StrLen nLen );
- friend BOOL operator == ( const ByteString& rStr1, const ByteString& rStr2 )
+ friend sal_Bool operator == ( const ByteString& rStr1, const ByteString& rStr2 )
{ return rStr1.Equals( rStr2 ); }
- friend BOOL operator == ( const ByteString& rStr, const sal_Char* pCharStr )
+ friend sal_Bool operator == ( const ByteString& rStr, const sal_Char* pCharStr )
{ return rStr.Equals( pCharStr ); }
- friend BOOL operator == ( const sal_Char* pCharStr, const ByteString& rStr )
+ friend sal_Bool operator == ( const sal_Char* pCharStr, const ByteString& rStr )
{ return rStr.Equals( pCharStr ); }
- friend BOOL operator != ( const ByteString& rStr1, const ByteString& rStr2 )
+ friend sal_Bool operator != ( const ByteString& rStr1, const ByteString& rStr2 )
{ return !(operator == ( rStr1, rStr2 )); }
- friend BOOL operator != ( const ByteString& rStr, const sal_Char* pCharStr )
+ friend sal_Bool operator != ( const ByteString& rStr, const sal_Char* pCharStr )
{ return !(operator == ( rStr, pCharStr )); }
- friend BOOL operator != ( const sal_Char* pCharStr, const ByteString& rStr )
+ friend sal_Bool operator != ( const sal_Char* pCharStr, const ByteString& rStr )
{ return !(operator == ( pCharStr, rStr )); }
- friend BOOL operator < ( const ByteString& rStr1, const ByteString& rStr2 )
+ friend sal_Bool operator < ( const ByteString& rStr1, const ByteString& rStr2 )
{ return (rStr1.CompareTo( rStr2 ) == COMPARE_LESS); }
- friend BOOL operator < ( const ByteString& rStr, const sal_Char* pCharStr )
+ friend sal_Bool operator < ( const ByteString& rStr, const sal_Char* pCharStr )
{ return (rStr.CompareTo( pCharStr ) == COMPARE_LESS); }
- friend BOOL operator < ( const sal_Char* pCharStr, const ByteString& rStr )
+ friend sal_Bool operator < ( const sal_Char* pCharStr, const ByteString& rStr )
{ return (rStr.CompareTo( pCharStr ) >= COMPARE_EQUAL); }
- friend BOOL operator > ( const ByteString& rStr1, const ByteString& rStr2 )
+ friend sal_Bool operator > ( const ByteString& rStr1, const ByteString& rStr2 )
{ return (rStr1.CompareTo( rStr2 ) == COMPARE_GREATER); }
- friend BOOL operator > ( const ByteString& rStr, const sal_Char* pCharStr )
+ friend sal_Bool operator > ( const ByteString& rStr, const sal_Char* pCharStr )
{ return (rStr.CompareTo( pCharStr ) == COMPARE_GREATER); }
- friend BOOL operator > ( const sal_Char* pCharStr, const ByteString& rStr )
+ friend sal_Bool operator > ( const sal_Char* pCharStr, const ByteString& rStr )
{ return (rStr.CompareTo( pCharStr ) <= COMPARE_EQUAL); }
- friend BOOL operator <= ( const ByteString& rStr1, const ByteString& rStr2 )
+ friend sal_Bool operator <= ( const ByteString& rStr1, const ByteString& rStr2 )
{ return !(operator > ( rStr1, rStr2 )); }
- friend BOOL operator <= ( const ByteString& rStr, const sal_Char* pCharStr )
+ friend sal_Bool operator <= ( const ByteString& rStr, const sal_Char* pCharStr )
{ return !(operator > ( rStr, pCharStr )); }
- friend BOOL operator <= ( const sal_Char* pCharStr, const ByteString& rStr )
+ friend sal_Bool operator <= ( const sal_Char* pCharStr, const ByteString& rStr )
{ return !(operator > ( pCharStr, rStr )); }
- friend BOOL operator >= ( const ByteString& rStr1, const ByteString& rStr2 )
+ friend sal_Bool operator >= ( const ByteString& rStr1, const ByteString& rStr2 )
{ return !(operator < ( rStr1, rStr2 )); }
- friend BOOL operator >= ( const ByteString& rStr, const sal_Char* pCharStr )
+ friend sal_Bool operator >= ( const ByteString& rStr, const sal_Char* pCharStr )
{ return !(operator < ( rStr, pCharStr )); }
- friend BOOL operator >= ( const sal_Char* pCharStr, const ByteString& rStr )
+ friend sal_Bool operator >= ( const sal_Char* pCharStr, const ByteString& rStr )
{ return !(operator < ( pCharStr, rStr )); }
};
@@ -596,23 +596,23 @@ public:
xub_StrLen nLen = STRING_LEN ) const;
StringCompare CompareIgnoreCaseToAscii( const sal_Char* pAsciiStr,
xub_StrLen nLen = STRING_LEN ) const;
- BOOL Equals( const UniString& rStr ) const;
- BOOL Equals( const sal_Unicode* pCharStr ) const;
- BOOL EqualsAscii( const sal_Char* pAsciiStr ) const;
- BOOL EqualsIgnoreCaseAscii( const UniString& rStr ) const;
- BOOL EqualsIgnoreCaseAscii( const sal_Unicode* pCharStr ) const;
- BOOL EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr ) const;
- BOOL Equals( const UniString& rStr,
+ sal_Bool Equals( const UniString& rStr ) const;
+ sal_Bool Equals( const sal_Unicode* pCharStr ) const;
+ sal_Bool EqualsAscii( const sal_Char* pAsciiStr ) const;
+ sal_Bool EqualsIgnoreCaseAscii( const UniString& rStr ) const;
+ sal_Bool EqualsIgnoreCaseAscii( const sal_Unicode* pCharStr ) const;
+ sal_Bool EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr ) const;
+ sal_Bool Equals( const UniString& rStr,
xub_StrLen nIndex, xub_StrLen nLen ) const;
- BOOL Equals( const sal_Unicode* pCharStr,
+ sal_Bool Equals( const sal_Unicode* pCharStr,
xub_StrLen nIndex, xub_StrLen nLen ) const;
- BOOL EqualsAscii( const sal_Char* pAsciiStr,
+ sal_Bool EqualsAscii( const sal_Char* pAsciiStr,
xub_StrLen nIndex, xub_StrLen nLen ) const;
- BOOL EqualsIgnoreCaseAscii( const UniString& rStr,
+ sal_Bool EqualsIgnoreCaseAscii( const UniString& rStr,
xub_StrLen nIndex, xub_StrLen nLen ) const;
- BOOL EqualsIgnoreCaseAscii( const sal_Unicode* pCharStr,
+ sal_Bool EqualsIgnoreCaseAscii( const sal_Unicode* pCharStr,
xub_StrLen nIndex, xub_StrLen nLen ) const;
- BOOL EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr,
+ sal_Bool EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr,
xub_StrLen nIndex, xub_StrLen nLen ) const;
xub_StrLen Match( const UniString& rStr ) const;
@@ -656,17 +656,17 @@ public:
void ReleaseBufferAccess( xub_StrLen nLen = STRING_LEN );
sal_Unicode* AllocBuffer( xub_StrLen nLen );
- friend BOOL operator == ( const UniString& rStr1, const UniString& rStr2 )
+ friend sal_Bool operator == ( const UniString& rStr1, const UniString& rStr2 )
{ return rStr1.Equals( rStr2 ); }
- friend BOOL operator != ( const UniString& rStr1, const UniString& rStr2 )
+ friend sal_Bool operator != ( const UniString& rStr1, const UniString& rStr2 )
{ return !(operator == ( rStr1, rStr2 )); }
- friend BOOL operator < ( const UniString& rStr1, const UniString& rStr2 )
+ friend sal_Bool operator < ( const UniString& rStr1, const UniString& rStr2 )
{ return (rStr1.CompareTo( rStr2 ) == COMPARE_LESS); }
- friend BOOL operator > ( const UniString& rStr1, const UniString& rStr2 )
+ friend sal_Bool operator > ( const UniString& rStr1, const UniString& rStr2 )
{ return (rStr1.CompareTo( rStr2 ) == COMPARE_GREATER); }
- friend BOOL operator <= ( const UniString& rStr1, const UniString& rStr2 )
+ friend sal_Bool operator <= ( const UniString& rStr1, const UniString& rStr2 )
{ return !(operator > ( rStr1, rStr2 )); }
- friend BOOL operator >= ( const UniString& rStr1, const UniString& rStr2 )
+ friend sal_Bool operator >= ( const UniString& rStr1, const UniString& rStr2 )
{ return !(operator < ( rStr1, rStr2 )); }
};
diff --git a/tools/inc/tools/svborder.hxx b/tools/inc/tools/svborder.hxx
index a0509bcc89be..a525618a6c17 100644
--- a/tools/inc/tools/svborder.hxx
+++ b/tools/inc/tools/svborder.hxx
@@ -42,12 +42,12 @@ public:
SvBorder( const Rectangle & rOuter, const Rectangle & rInner );
SvBorder( long nLeftP, long nTopP, long nRightP, long nBottomP )
{ nLeft = nLeftP; nTop = nTopP; nRight = nRightP; nBottom = nBottomP; }
- BOOL operator == ( const SvBorder & rObj ) const
+ sal_Bool operator == ( const SvBorder & rObj ) const
{
return nTop == rObj.nTop && nRight == rObj.nRight &&
nBottom == rObj.nBottom && nLeft == rObj.nLeft;
}
- BOOL operator != ( const SvBorder & rObj ) const
+ sal_Bool operator != ( const SvBorder & rObj ) const
{ return !(*this == rObj); }
SvBorder & operator = ( const SvBorder & rBorder )
{
@@ -73,7 +73,7 @@ public:
Bottom() -= rBorder.Bottom();
return *this;
}
- BOOL IsInside( const SvBorder & rInside )
+ sal_Bool IsInside( const SvBorder & rInside )
{
return nTop >= rInside.nTop && nRight >= rInside.nRight &&
nBottom >= rInside.nBottom && nLeft >= rInside.nLeft;
diff --git a/tools/inc/tools/table.hxx b/tools/inc/tools/table.hxx
index 1ac3fbe27b6f..6fff4d7d7f2b 100644
--- a/tools/inc/tools/table.hxx
+++ b/tools/inc/tools/table.hxx
@@ -40,36 +40,36 @@
class TOOLS_DLLPUBLIC Table : private Container
{
private:
- ULONG nCount;
+ sal_uIntPtr nCount;
//#if 0 // _SOLAR__PRIVATE
- TOOLS_DLLPRIVATE ULONG ImplGetIndex( ULONG nKey, ULONG* pIndex = NULL ) const;
+ TOOLS_DLLPRIVATE sal_uIntPtr ImplGetIndex( sal_uIntPtr nKey, sal_uIntPtr* pIndex = NULL ) const;
//#endif
public:
- Table( USHORT nInitSize = 16, USHORT nReSize = 16 );
+ Table( sal_uInt16 nInitSize = 16, sal_uInt16 nReSize = 16 );
Table( const Table& rTable ) : Container( rTable )
{ nCount = rTable.nCount; }
- BOOL Insert( ULONG nKey, void* p );
- void* Remove( ULONG nKey );
- void* Replace( ULONG nKey, void* p );
- void* Get( ULONG nKey ) const;
+ sal_Bool Insert( sal_uIntPtr nKey, void* p );
+ void* Remove( sal_uIntPtr nKey );
+ void* Replace( sal_uIntPtr nKey, void* p );
+ void* Get( sal_uIntPtr nKey ) const;
void Clear() { Container::Clear(); nCount = 0; }
- ULONG Count() const { return( nCount ); }
+ sal_uIntPtr Count() const { return( nCount ); }
void* GetCurObject() const;
- ULONG GetCurKey() const { return (ULONG)Container::GetCurObject(); }
- ULONG GetKey( const void* p ) const;
- BOOL IsKeyValid( ULONG nKey ) const;
+ sal_uIntPtr GetCurKey() const { return (sal_uIntPtr)Container::GetCurObject(); }
+ sal_uIntPtr GetKey( const void* p ) const;
+ sal_Bool IsKeyValid( sal_uIntPtr nKey ) const;
- void* GetObject( ULONG nPos ) const
+ void* GetObject( sal_uIntPtr nPos ) const
{ return Container::GetObject( (nPos*2)+1 ); }
- ULONG GetObjectKey( ULONG nPos ) const
- { return (ULONG)Container::GetObject( nPos*2 ); }
- ULONG GetUniqueKey( ULONG nStartKey = 1 ) const;
- ULONG SearchKey( ULONG nKey, ULONG* pPos = NULL ) const;
+ sal_uIntPtr GetObjectKey( sal_uIntPtr nPos ) const
+ { return (sal_uIntPtr)Container::GetObject( nPos*2 ); }
+ sal_uIntPtr GetUniqueKey( sal_uIntPtr nStartKey = 1 ) const;
+ sal_uIntPtr SearchKey( sal_uIntPtr nKey, sal_uIntPtr* pPos = NULL ) const;
- void* Seek( ULONG nKey );
+ void* Seek( sal_uIntPtr nKey );
void* Seek( void* p );
void* First();
void* Last();
@@ -78,9 +78,9 @@ public:
Table& operator =( const Table& rTable );
- BOOL operator ==( const Table& rTable ) const
+ sal_Bool operator ==( const Table& rTable ) const
{ return Container::operator ==( rTable ); }
- BOOL operator !=( const Table& rTable ) const
+ sal_Bool operator !=( const Table& rTable ) const
{ return Container::operator !=( rTable ); }
};
@@ -107,30 +107,30 @@ public: \
using Table::SearchKey; \
using Table::IsKeyValid; \
\
- ClassName( USHORT _nInitSize = 16, \
- USHORT _nReSize = 16 ) : \
+ ClassName( sal_uInt16 _nInitSize = 16, \
+ sal_uInt16 _nReSize = 16 ) : \
Table( _nInitSize, _nReSize ) {} \
ClassName( const ClassName& rClassName ) : \
Table( rClassName ) {} \
\
- BOOL Insert( ULONG nKey, Type p ) \
+ sal_Bool Insert( sal_uIntPtr nKey, Type p ) \
{ return Table::Insert( nKey, (void*)p ); } \
- Type Remove( ULONG nKey ) \
+ Type Remove( sal_uIntPtr nKey ) \
{ return (Type)Table::Remove( nKey ); } \
- Type Replace( ULONG nKey, Type p ) \
+ Type Replace( sal_uIntPtr nKey, Type p ) \
{ return (Type)Table::Replace( nKey, (void*)p ); } \
- Type Get( ULONG nKey ) const \
+ Type Get( sal_uIntPtr nKey ) const \
{ return (Type)Table::Get( nKey ); } \
\
Type GetCurObject() const \
{ return (Type)Table::GetCurObject(); } \
- ULONG GetKey( const Type p ) const \
+ sal_uIntPtr GetKey( const Type p ) const \
{ return Table::GetKey( (const void*)p ); } \
\
- Type GetObject( ULONG nPos ) const \
+ Type GetObject( sal_uIntPtr nPos ) const \
{ return (Type)Table::GetObject( nPos ); } \
\
- Type Seek( ULONG nKey ) \
+ Type Seek( sal_uIntPtr nKey ) \
{ return (Type)Table::Seek( nKey ); } \
Type Seek( Type p ) \
{ return (Type)Table::Seek( (void*)p ); } \
@@ -143,9 +143,9 @@ public: \
{ Table::operator =( rClassName ); \
return *this; } \
\
- BOOL operator ==( const ClassName& rTable ) const \
+ sal_Bool operator ==( const ClassName& rTable ) const \
{ return Table::operator ==( rTable ); } \
- BOOL operator !=( const ClassName& rTable ) const \
+ sal_Bool operator !=( const ClassName& rTable ) const \
{ return Table::operator !=( rTable ); } \
};
diff --git a/tools/inc/tools/tenccvt.hxx b/tools/inc/tools/tenccvt.hxx
index e24c2e259022..4c9968149291 100644
--- a/tools/inc/tools/tenccvt.hxx
+++ b/tools/inc/tools/tenccvt.hxx
@@ -52,7 +52,7 @@ TOOLS_DLLPUBLIC rtl_TextEncoding GetExtendedTextEncoding( rtl_TextEncoding eEnco
// is returned (normally windows-1252).
TOOLS_DLLPUBLIC rtl_TextEncoding GetOneByteTextEncoding( rtl_TextEncoding eEncoding );
-TOOLS_DLLPUBLIC rtl_TextEncoding GetSOLoadTextEncoding( rtl_TextEncoding eEncoding, USHORT nVersion = SOFFICE_FILEFORMAT_50 );
-TOOLS_DLLPUBLIC rtl_TextEncoding GetSOStoreTextEncoding( rtl_TextEncoding eEncoding, USHORT nVersion = SOFFICE_FILEFORMAT_50 );
+TOOLS_DLLPUBLIC rtl_TextEncoding GetSOLoadTextEncoding( rtl_TextEncoding eEncoding, sal_uInt16 nVersion = SOFFICE_FILEFORMAT_50 );
+TOOLS_DLLPUBLIC rtl_TextEncoding GetSOStoreTextEncoding( rtl_TextEncoding eEncoding, sal_uInt16 nVersion = SOFFICE_FILEFORMAT_50 );
#endif // _TOOLS_TENCCVT_HXX
diff --git a/tools/inc/tools/time.hxx b/tools/inc/tools/time.hxx
index 269b104e57e6..5b0b508598d8 100644
--- a/tools/inc/tools/time.hxx
+++ b/tools/inc/tools/time.hxx
@@ -46,28 +46,28 @@ public:
Time( const ResId & rResId );
Time( sal_Int32 _nTime ) { Time::nTime = _nTime; }
Time( const Time& rTime );
- Time( ULONG nHour, ULONG nMin,
- ULONG nSec = 0, ULONG n100Sec = 0 );
+ Time( sal_uIntPtr nHour, sal_uIntPtr nMin,
+ sal_uIntPtr nSec = 0, sal_uIntPtr n100Sec = 0 );
void SetTime( sal_Int32 nNewTime ) { nTime = nNewTime; }
sal_Int32 GetTime() const { return nTime; }
- void SetHour( USHORT nNewHour );
- void SetMin( USHORT nNewMin );
- void SetSec( USHORT nNewSec );
- void Set100Sec( USHORT nNew100Sec );
- USHORT GetHour() const
- { ULONG nTempTime = (nTime >= 0) ? nTime : nTime*-1;
- return (USHORT)(nTempTime / 1000000); }
- USHORT GetMin() const
- { ULONG nTempTime = (nTime >= 0) ? nTime : nTime*-1;
- return (USHORT)((nTempTime / 10000) % 100); }
- USHORT GetSec() const
- { ULONG nTempTime = (nTime >= 0) ? nTime : nTime*-1;
- return (USHORT)((nTempTime / 100) % 100); }
- USHORT Get100Sec() const
- { ULONG nTempTime = (nTime >= 0) ? nTime : nTime*-1;
- return (USHORT)(nTempTime % 100); }
+ void SetHour( sal_uInt16 nNewHour );
+ void SetMin( sal_uInt16 nNewMin );
+ void SetSec( sal_uInt16 nNewSec );
+ void Set100Sec( sal_uInt16 nNew100Sec );
+ sal_uInt16 GetHour() const
+ { sal_uIntPtr nTempTime = (nTime >= 0) ? nTime : nTime*-1;
+ return (sal_uInt16)(nTempTime / 1000000); }
+ sal_uInt16 GetMin() const
+ { sal_uIntPtr nTempTime = (nTime >= 0) ? nTime : nTime*-1;
+ return (sal_uInt16)((nTempTime / 10000) % 100); }
+ sal_uInt16 GetSec() const
+ { sal_uIntPtr nTempTime = (nTime >= 0) ? nTime : nTime*-1;
+ return (sal_uInt16)((nTempTime / 100) % 100); }
+ sal_uInt16 Get100Sec() const
+ { sal_uIntPtr nTempTime = (nTime >= 0) ? nTime : nTime*-1;
+ return (sal_uInt16)(nTempTime % 100); }
sal_Int32 GetMSFromTime() const;
void MakeTimeFromMS( sal_Int32 nMS );
@@ -75,27 +75,27 @@ public:
/// 12 hours == 0.5 days
double GetTimeInDays() const;
- BOOL IsBetween( const Time& rFrom, const Time& rTo ) const
+ sal_Bool IsBetween( const Time& rFrom, const Time& rTo ) const
{ return ((nTime >= rFrom.nTime) && (nTime <= rTo.nTime)); }
- BOOL IsEqualIgnore100Sec( const Time& rTime ) const;
+ sal_Bool IsEqualIgnore100Sec( const Time& rTime ) const;
- BOOL operator ==( const Time& rTime ) const
+ sal_Bool operator ==( const Time& rTime ) const
{ return (nTime == rTime.nTime); }
- BOOL operator !=( const Time& rTime ) const
+ sal_Bool operator !=( const Time& rTime ) const
{ return (nTime != rTime.nTime); }
- BOOL operator >( const Time& rTime ) const
+ sal_Bool operator >( const Time& rTime ) const
{ return (nTime > rTime.nTime); }
- BOOL operator <( const Time& rTime ) const
+ sal_Bool operator <( const Time& rTime ) const
{ return (nTime < rTime.nTime); }
- BOOL operator >=( const Time& rTime ) const
+ sal_Bool operator >=( const Time& rTime ) const
{ return (nTime >= rTime.nTime); }
- BOOL operator <=( const Time& rTime ) const
+ sal_Bool operator <=( const Time& rTime ) const
{ return (nTime <= rTime.nTime); }
static Time GetUTCOffset();
- static ULONG GetSystemTicks(); // Elapsed time
- static ULONG GetProcessTicks(); // CPU time
+ static sal_uIntPtr GetSystemTicks(); // Elapsed time
+ static sal_uIntPtr GetProcessTicks(); // CPU time
void ConvertToUTC() { *this -= Time::GetUTCOffset(); }
void ConvertToLocalTime() { *this += Time::GetUTCOffset(); }
diff --git a/tools/inc/tools/unqid.hxx b/tools/inc/tools/unqid.hxx
index 4e255e0efdd1..a8ef2587d486 100644
--- a/tools/inc/tools/unqid.hxx
+++ b/tools/inc/tools/unqid.hxx
@@ -36,8 +36,8 @@
struct ImpUniqueId
{
- ULONG nId;
- USHORT nRefCount;
+ sal_uIntPtr nId;
+ sal_uInt16 nRefCount;
void Release()
{
nRefCount--;
@@ -71,7 +71,7 @@ public:
pId = rId.pId;
return *this;
}
- ULONG GetId() const { return pId ? pId->nId : 0; }
+ sal_uIntPtr GetId() const { return pId ? pId->nId : 0; }
};
// ---------------------
@@ -80,30 +80,30 @@ public:
class TOOLS_DLLPUBLIC UniqueIdContainer : private UniqueIndex
{
- USHORT nCollectCount;
+ sal_uInt16 nCollectCount;
public: // Irgend etwas mit protected falsch
- void Clear( BOOL bAll );
- UniqueItemId CreateIdProt( ULONG nId );
+ void Clear( sal_Bool bAll );
+ UniqueItemId CreateIdProt( sal_uIntPtr nId );
public:
- UniqueIdContainer( ULONG _nStartIndex,
- ULONG _nInitSize = 16,
- ULONG _nReSize = 16 )
+ UniqueIdContainer( sal_uIntPtr _nStartIndex,
+ sal_uIntPtr _nInitSize = 16,
+ sal_uIntPtr _nReSize = 16 )
: UniqueIndex( _nStartIndex, _nInitSize, _nReSize )
, nCollectCount( 0 )
{}
UniqueIdContainer( const UniqueIdContainer& );
~UniqueIdContainer()
- { Clear( TRUE ); }
+ { Clear( sal_True ); }
UniqueIdContainer& operator = ( const UniqueIdContainer & );
- BOOL IsIndexValid( ULONG nIndex ) const
+ sal_Bool IsIndexValid( sal_uIntPtr nIndex ) const
{ return UniqueIndex::IsIndexValid( nIndex ); }
UniqueItemId CreateId();
- static UniqueItemId CreateFreeId( ULONG nId ); // freies Id
+ static UniqueItemId CreateFreeId( sal_uIntPtr nId ); // freies Id
};
#endif // _UNQID_HXX
diff --git a/tools/inc/tools/unqidx.hxx b/tools/inc/tools/unqidx.hxx
index 95aac95d9cf4..6059af077abc 100644
--- a/tools/inc/tools/unqidx.hxx
+++ b/tools/inc/tools/unqidx.hxx
@@ -40,47 +40,47 @@
class TOOLS_DLLPUBLIC UniqueIndex : private Container
{
private:
- ULONG nReSize;
- ULONG nStartIndex;
- ULONG nUniqIndex;
- ULONG nCount;
+ sal_uIntPtr nReSize;
+ sal_uIntPtr nStartIndex;
+ sal_uIntPtr nUniqIndex;
+ sal_uIntPtr nCount;
public:
using Container::GetCurObject;
- UniqueIndex( ULONG nStartIndex = 0,
- ULONG nInitSize = 16,
- ULONG nReSize = 16 );
+ UniqueIndex( sal_uIntPtr nStartIndex = 0,
+ sal_uIntPtr nInitSize = 16,
+ sal_uIntPtr nReSize = 16 );
UniqueIndex( const UniqueIndex& rIdx );
- ULONG Insert( ULONG nIndex, void* p );
- ULONG Insert( void* p );
- void* Remove( ULONG nIndex );
- void* Replace( ULONG nIndex, void* p );
- void* Get( ULONG nIndex ) const;
+ sal_uIntPtr Insert( sal_uIntPtr nIndex, void* p );
+ sal_uIntPtr Insert( void* p );
+ void* Remove( sal_uIntPtr nIndex );
+ void* Replace( sal_uIntPtr nIndex, void* p );
+ void* Get( sal_uIntPtr nIndex ) const;
void Clear();
- ULONG Count() const { return nCount; }
+ sal_uIntPtr Count() const { return nCount; }
- ULONG GetCurIndex() const;
- ULONG GetIndex( const void* p ) const;
- BOOL IsIndexValid( ULONG nIndex ) const;
+ sal_uIntPtr GetCurIndex() const;
+ sal_uIntPtr GetIndex( const void* p ) const;
+ sal_Bool IsIndexValid( sal_uIntPtr nIndex ) const;
- void* Seek( ULONG nIndex );
+ void* Seek( sal_uIntPtr nIndex );
void* Seek( void* p );
void* First();
void* Last();
void* Next();
void* Prev();
- ULONG GetStartIndex() const { return nStartIndex; }
- ULONG GetCurMaxIndex() const
+ sal_uIntPtr GetStartIndex() const { return nStartIndex; }
+ sal_uIntPtr GetCurMaxIndex() const
{ return (nStartIndex + Container::GetSize()); }
UniqueIndex& operator =( const UniqueIndex& rIdx );
- BOOL operator ==( const UniqueIndex& rIdx ) const;
- BOOL operator !=( const UniqueIndex& rIdx ) const
+ sal_Bool operator ==( const UniqueIndex& rIdx ) const;
+ sal_Bool operator !=( const UniqueIndex& rIdx ) const
{ return !(UniqueIndex::operator==( rIdx )); }
};
@@ -106,30 +106,30 @@ public: \
using UniqueIndex::GetStartIndex; \
using UniqueIndex::GetCurMaxIndex; \
\
- ClassName( ULONG _nStartIndex = 0, \
- ULONG _nInitSize = 16, ULONG _nReSize = 16 ):\
+ ClassName( sal_uIntPtr _nStartIndex = 0, \
+ sal_uIntPtr _nInitSize = 16, sal_uIntPtr _nReSize = 16 ):\
UniqueIndex( _nStartIndex, _nInitSize, _nReSize ) {}\
ClassName( const ClassName& rClassName ) : \
UniqueIndex( rClassName ) {} \
\
- ULONG Insert( ULONG nIndex, Type p ) \
+ sal_uIntPtr Insert( sal_uIntPtr nIndex, Type p ) \
{ return UniqueIndex::Insert( nIndex, (void*)p ); } \
- ULONG Insert( Type p ) \
+ sal_uIntPtr Insert( Type p ) \
{ return UniqueIndex::Insert( (void*)p ); } \
- Type Remove( ULONG nIndex ) \
+ Type Remove( sal_uIntPtr nIndex ) \
{ return (Type)UniqueIndex::Remove( nIndex ); } \
- Type Replace( ULONG nIndex, Type p ) \
+ Type Replace( sal_uIntPtr nIndex, Type p ) \
{ return (Type)UniqueIndex::Replace( nIndex, \
(void*)p ); } \
- Type Get( ULONG nIndex ) const \
+ Type Get( sal_uIntPtr nIndex ) const \
{ return (Type)UniqueIndex::Get( nIndex ); } \
\
Type GetCurObject() const \
{ return (Type)UniqueIndex::GetCurObject(); } \
- ULONG GetIndex( const Type p ) const \
+ sal_uIntPtr GetIndex( const Type p ) const \
{ return UniqueIndex::GetIndex( (const void*)p ); } \
\
- Type Seek( ULONG nKey ) \
+ Type Seek( sal_uIntPtr nKey ) \
{ return (Type)UniqueIndex::Seek( nKey ); } \
Type Seek( Type p ) \
{ return (Type)UniqueIndex::Seek( (void*)p ); } \
@@ -142,9 +142,9 @@ public: \
{ UniqueIndex::operator =( rClassName ); \
return *this; } \
\
- BOOL operator ==( const ClassName& rIdx ) const \
+ sal_Bool operator ==( const ClassName& rIdx ) const \
{ return UniqueIndex::operator ==( rIdx ); } \
- BOOL operator !=( const ClassName& rIdx ) const \
+ sal_Bool operator !=( const ClassName& rIdx ) const \
{ return UniqueIndex::operator !=( rIdx ); } \
};
diff --git a/tools/inc/tools/vcompat.hxx b/tools/inc/tools/vcompat.hxx
index f6ee6922faac..93517b77053d 100644
--- a/tools/inc/tools/vcompat.hxx
+++ b/tools/inc/tools/vcompat.hxx
@@ -35,10 +35,10 @@
// -----------
#define COMPAT_FORMAT( char1, char2, char3, char4 ) \
- ((UINT32)((((UINT32)(char)(char1)))| \
- (((UINT32)(char)(char2))<<8UL)| \
- (((UINT32)(char)(char3))<<16UL)| \
- ((UINT32)(char)(char4))<<24UL))
+ ((sal_uInt32)((((sal_uInt32)(char)(char1)))| \
+ (((sal_uInt32)(char)(char2))<<8UL)| \
+ (((sal_uInt32)(char)(char3))<<16UL)| \
+ ((sal_uInt32)(char)(char4))<<24UL))
// --------------
// - ImplCompat -
@@ -49,22 +49,22 @@ class SvStream;
class TOOLS_DLLPUBLIC VersionCompat
{
SvStream* mpRWStm;
- UINT32 mnCompatPos;
- UINT32 mnTotalSize;
- UINT16 mnStmMode;
- UINT16 mnVersion;
+ sal_uInt32 mnCompatPos;
+ sal_uInt32 mnTotalSize;
+ sal_uInt16 mnStmMode;
+ sal_uInt16 mnVersion;
VersionCompat() {}
VersionCompat( const VersionCompat& ) {}
VersionCompat& operator=( const VersionCompat& ) { return *this; }
- BOOL operator==( const VersionCompat& ) { return FALSE; }
+ sal_Bool operator==( const VersionCompat& ) { return sal_False; }
public:
- VersionCompat( SvStream& rStm, USHORT nStreamMode, UINT16 nVersion = 1 );
+ VersionCompat( SvStream& rStm, sal_uInt16 nStreamMode, sal_uInt16 nVersion = 1 );
~VersionCompat();
- UINT16 GetVersion() const { return mnVersion; }
+ sal_uInt16 GetVersion() const { return mnVersion; }
};
#endif // _VCOMPAT_HXX
diff --git a/tools/inc/tools/vector2d.hxx b/tools/inc/tools/vector2d.hxx
index d346e1af2bbf..10c33b57c871 100644
--- a/tools/inc/tools/vector2d.hxx
+++ b/tools/inc/tools/vector2d.hxx
@@ -87,8 +87,8 @@ public:
inline Vector2D& operator/=(double t) { mfX /= t; mfY /= t; return *this; }
inline Vector2D operator/(double t) const { Vector2D aNew(*this); aNew /= t; return aNew; }
- inline BOOL operator==( const Vector2D& rVec ) const { return( mfX == rVec.mfX && mfY == rVec.mfY ); }
- inline BOOL operator!=( const Vector2D& rVec ) const { return !( *this == rVec ); }
+ inline sal_Bool operator==( const Vector2D& rVec ) const { return( mfX == rVec.mfX && mfY == rVec.mfY ); }
+ inline sal_Bool operator!=( const Vector2D& rVec ) const { return !( *this == rVec ); }
inline Vector2D& operator=( const Vector2D& rVec ) { mfX = rVec.mfX, mfY = rVec.mfY; return *this; }
inline Vector2D& operator=( const Pair& rPair ) { mfX = rPair.nA, mfY = rPair.nB; return *this; }
@@ -97,11 +97,11 @@ public:
inline Vector2D& operator*=( const Pair& rPair ) { mfX *= rPair.nA, mfY *= rPair.nB; return *this; }
inline Vector2D& operator/=( const Pair& rPair ) { mfX /= rPair.nA, mfY /= rPair.nB; return *this; }
- inline BOOL operator==( const Pair& rPair ) const { return( mfX == rPair.nA && mfY == rPair.nB ); }
- inline BOOL operator!=( const Pair& rPair ) const { return !( *this == rPair ); }
+ inline sal_Bool operator==( const Pair& rPair ) const { return( mfX == rPair.nA && mfY == rPair.nB ); }
+ inline sal_Bool operator!=( const Pair& rPair ) const { return !( *this == rPair ); }
- inline BOOL IsPositive( Vector2D& rVec ) const { return( ( mfX * rVec.mfY - mfY * rVec.mfX ) >= 0.0 ); }
- inline BOOL IsNegative( Vector2D& rVec ) const { return !IsPositive( rVec ); }
+ inline sal_Bool IsPositive( Vector2D& rVec ) const { return( ( mfX * rVec.mfY - mfY * rVec.mfX ) >= 0.0 ); }
+ inline sal_Bool IsNegative( Vector2D& rVec ) const { return !IsPositive( rVec ); }
};
// -----------------------------------------------------------------------------
diff --git a/tools/inc/tools/wintypes.hxx b/tools/inc/tools/wintypes.hxx
index cfa08c325573..3e6081fa2b82 100644
--- a/tools/inc/tools/wintypes.hxx
+++ b/tools/inc/tools/wintypes.hxx
@@ -34,7 +34,7 @@
// - Window-Types -
// ----------------
-typedef USHORT WindowType;
+typedef sal_uInt16 WindowType;
#define WINDOW_BASE 0x0100
#define WINDOW_FIRST (WINDOW_BASE + 0x30)
#define WINDOW_MESSBOX (WINDOW_FIRST)
@@ -319,7 +319,7 @@ enum TriState { STATE_NOCHECK, STATE_CHECK, STATE_DONTKNOW };
// - ButtonDialog-Types -
// ----------------------
-typedef USHORT StandardButtonType;
+typedef sal_uInt16 StandardButtonType;
#define BUTTON_OK ((StandardButtonType)0)
#define BUTTON_CANCEL ((StandardButtonType)1)
#define BUTTON_YES ((StandardButtonType)2)
diff --git a/tools/inc/tools/wldcrd.hxx b/tools/inc/tools/wldcrd.hxx
index 478566ce9b44..4938bc212db2 100644
--- a/tools/inc/tools/wldcrd.hxx
+++ b/tools/inc/tools/wldcrd.hxx
@@ -42,7 +42,7 @@ private:
ByteString aWildString;
char cSepSymbol;
- USHORT ImpMatch( const char *pWild, const char *pStr ) const;
+ sal_uInt16 ImpMatch( const char *pWild, const char *pStr ) const;
public:
WildCard();
@@ -52,11 +52,11 @@ public:
const String GetWildCard() const { return UniString( aWildString, osl_getThreadTextEncoding()); }
const String operator ()() const { return UniString( aWildString, osl_getThreadTextEncoding()); }
- BOOL Matches( const String& rStr ) const;
+ sal_Bool Matches( const String& rStr ) const;
- BOOL operator ==( const String& rString ) const
+ sal_Bool operator ==( const String& rString ) const
{ return Matches( rString ); }
- BOOL operator !=( const String& rString ) const
+ sal_Bool operator !=( const String& rString ) const
{ return !( Matches( rString ) ); }
WildCard& operator =( const String& rString );
diff --git a/tools/inc/tools/zcodec.hxx b/tools/inc/tools/zcodec.hxx
index 430caa363663..d42e87f5d4e0 100644
--- a/tools/inc/tools/zcodec.hxx
+++ b/tools/inc/tools/zcodec.hxx
@@ -73,47 +73,47 @@ class TOOLS_DLLPUBLIC ZCodec
{
private:
- ULONG mbInit;
- BOOL mbStatus;
- BOOL mbFinish;
- ULONG mnMemUsage;
+ sal_uIntPtr mbInit;
+ sal_Bool mbStatus;
+ sal_Bool mbFinish;
+ sal_uIntPtr mnMemUsage;
SvStream* mpIStm;
- BYTE* mpInBuf;
- ULONG mnInBufSize;
- ULONG mnInToRead;
+ sal_uInt8* mpInBuf;
+ sal_uIntPtr mnInBufSize;
+ sal_uIntPtr mnInToRead;
SvStream* mpOStm;
- BYTE* mpOutBuf;
- ULONG mnOutBufSize;
+ sal_uInt8* mpOutBuf;
+ sal_uIntPtr mnOutBufSize;
- ULONG mnCRC;
- ULONG mnCompressMethod;
+ sal_uIntPtr mnCRC;
+ sal_uIntPtr mnCompressMethod;
void* mpsC_Stream;
- void ImplInitBuf( BOOL nIOFlag );
+ void ImplInitBuf( sal_Bool nIOFlag );
void ImplWriteBack( void );
public:
- ZCodec( ULONG nInBuf, ULONG nOutBuf, ULONG nMemUsage = MAX_MEM_USAGE );
+ ZCodec( sal_uIntPtr nInBuf, sal_uIntPtr nOutBuf, sal_uIntPtr nMemUsage = MAX_MEM_USAGE );
ZCodec( void );
virtual ~ZCodec();
- virtual void BeginCompression( ULONG nCompressMethod = ZCODEC_DEFAULT );
+ virtual void BeginCompression( sal_uIntPtr nCompressMethod = ZCODEC_DEFAULT );
virtual long EndCompression();
- BOOL IsFinished () const { return mbFinish; }
+ sal_Bool IsFinished () const { return mbFinish; }
long Compress( SvStream& rIStm, SvStream& rOStm );
long Decompress( SvStream& rIStm, SvStream& rOStm );
- long Write( SvStream& rOStm, const BYTE* pData, ULONG nSize );
- long Read( SvStream& rIStm, BYTE* pData, ULONG nSize );
- long ReadAsynchron( SvStream& rIStm, BYTE* pData, ULONG nSize );
+ long Write( SvStream& rOStm, const sal_uInt8* pData, sal_uIntPtr nSize );
+ long Read( SvStream& rIStm, sal_uInt8* pData, sal_uIntPtr nSize );
+ long ReadAsynchron( SvStream& rIStm, sal_uInt8* pData, sal_uIntPtr nSize );
- void SetBreak( ULONG );
- ULONG GetBreak( void );
- void SetCRC( ULONG nCurrentCRC );
- ULONG UpdateCRC( ULONG nLatestCRC, ULONG nSource );
- ULONG UpdateCRC( ULONG nLatestCRC, BYTE* pSource, long nDatSize );
- ULONG GetCRC();
+ void SetBreak( sal_uIntPtr );
+ sal_uIntPtr GetBreak( void );
+ void SetCRC( sal_uIntPtr nCurrentCRC );
+ sal_uIntPtr UpdateCRC( sal_uIntPtr nLatestCRC, sal_uIntPtr nSource );
+ sal_uIntPtr UpdateCRC( sal_uIntPtr nLatestCRC, sal_uInt8* pSource, long nDatSize );
+ sal_uIntPtr GetCRC();
};
class GZCodec : public ZCodec
@@ -122,7 +122,7 @@ class GZCodec : public ZCodec
public:
GZCodec(){};
~GZCodec(){};
- virtual void BeginCompression( ULONG nCompressMethod = ZCODEC_DEFAULT );
+ virtual void BeginCompression( sal_uIntPtr nCompressMethod = ZCODEC_DEFAULT );
};
#endif // _ZCODEC_HXX