summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/Executable_mkunroll.mk18
-rw-r--r--tools/Executable_rscdep.mk19
-rw-r--r--tools/Executable_so_checksum.mk17
-rw-r--r--tools/Executable_sspretty.mk17
-rw-r--r--tools/Library_tl.mk20
-rw-r--r--tools/bootstrp/addexes/replace.cxx2
-rw-r--r--tools/bootstrp/addexes2/mkfilt.cxx32
-rw-r--r--tools/bootstrp/cppdep.cxx32
-rw-r--r--tools/bootstrp/cppdep.hxx6
-rw-r--r--tools/bootstrp/inimgr.cxx10
-rw-r--r--tools/bootstrp/iserver.cxx24
-rw-r--r--tools/bootstrp/mkcreate.cxx148
-rw-r--r--tools/bootstrp/prj.cxx17
-rw-r--r--tools/bootstrp/rscdep.cxx12
-rw-r--r--tools/inc/bootstrp/inimgr.hxx2
-rw-r--r--tools/inc/bootstrp/mkcreate.hxx54
-rw-r--r--tools/inc/bootstrp/prj.hxx2
-rw-r--r--tools/inc/impcont.hxx32
-rw-r--r--tools/inc/poly.h32
-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
-rw-r--r--tools/prj/build.lst1
-rw-r--r--tools/prj/makefile.mk2
-rw-r--r--tools/source/communi/geninfo.cxx70
-rw-r--r--tools/source/communi/parser.cxx56
-rw-r--r--tools/source/datetime/datetime.cxx54
-rw-r--r--tools/source/datetime/tdate.cxx158
-rw-r--r--tools/source/datetime/ttime.cxx48
-rw-r--r--tools/source/debug/debug.cxx238
-rw-r--r--tools/source/debug/stcktree.cxx62
-rwxr-xr-x[-rw-r--r--]tools/source/fsys/comdep.hxx16
-rwxr-xr-x[-rw-r--r--]tools/source/fsys/dirent.cxx204
-rwxr-xr-x[-rw-r--r--]tools/source/fsys/filecopy.cxx10
-rwxr-xr-x[-rw-r--r--]tools/source/fsys/fstat.cxx60
-rwxr-xr-x[-rw-r--r--]tools/source/fsys/tdir.cxx94
-rw-r--r--tools/source/fsys/unx.cxx82
-rwxr-xr-x[-rw-r--r--]tools/source/fsys/wldcrd.cxx12
-rwxr-xr-x[-rw-r--r--]tools/source/fsys/wntmsc.cxx98
-rwxr-xr-x[-rw-r--r--]tools/source/fsys/wntmsc.hxx4
-rw-r--r--tools/source/generic/bigint.cxx4
-rw-r--r--tools/source/generic/color.cxx112
-rw-r--r--tools/source/generic/config.cxx156
-rw-r--r--tools/source/generic/fract.cxx12
-rw-r--r--tools/source/generic/gen.cxx54
-rw-r--r--tools/source/generic/line.cxx34
-rw-r--r--tools/source/generic/link.cxx10
-rw-r--r--tools/source/generic/poly.cxx304
-rw-r--r--tools/source/generic/poly2.cxx102
-rw-r--r--tools/source/generic/svborder.cxx2
-rw-r--r--tools/source/inet/inetmime.cxx2
-rw-r--r--tools/source/inet/inetmsg.cxx134
-rw-r--r--tools/source/inet/inetstrm.cxx124
-rwxr-xr-x[-rw-r--r--]tools/source/memtools/contnr.cxx116
-rwxr-xr-x[-rw-r--r--]tools/source/memtools/mempool.cxx2
-rwxr-xr-x[-rw-r--r--]tools/source/memtools/multisel.cxx130
-rwxr-xr-x[-rw-r--r--]tools/source/memtools/table.cxx82
-rwxr-xr-x[-rw-r--r--]tools/source/memtools/unqidx.cxx60
-rw-r--r--tools/source/rc/rc.cxx18
-rw-r--r--tools/source/rc/resmgr.cxx116
-rw-r--r--tools/source/ref/errinf.cxx84
-rwxr-xr-x[-rw-r--r--]tools/source/ref/globname.cxx136
-rw-r--r--tools/source/ref/pstm.cxx218
-rw-r--r--tools/source/stream/cachestr.cxx32
-rwxr-xr-x[-rw-r--r--]tools/source/stream/stream.cxx124
-rw-r--r--tools/source/stream/strmos2.cxx100
-rw-r--r--tools/source/stream/strmunx.cxx6
-rw-r--r--tools/source/stream/strmwnt.cxx78
-rw-r--r--tools/source/stream/vcompat.cxx6
-rw-r--r--tools/source/string/strascii.cxx14
-rw-r--r--tools/source/string/strcvt.cxx12
-rw-r--r--tools/source/string/strimp.cxx32
-rw-r--r--tools/source/string/tenccvt.cxx4
-rw-r--r--tools/source/string/tstring.cxx30
-rw-r--r--tools/source/testtoolloader/testtoolloader.cxx4
-rw-r--r--tools/source/zcodec/zcodec.cxx82
-rw-r--r--tools/unx/source/dll/toolsdll.cxx2
-rw-r--r--tools/util/makefile.pmk31
-rw-r--r--tools/util/tools.r17
133 files changed, 3124 insertions, 3284 deletions
diff --git a/tools/Executable_mkunroll.mk b/tools/Executable_mkunroll.mk
index 6a88e48f232a..60c6e676057e 100644
--- a/tools/Executable_mkunroll.mk
+++ b/tools/Executable_mkunroll.mk
@@ -45,6 +45,7 @@ $(eval $(call gb_Executable_add_linked_libs,mkunroll,\
stl \
tl \
vos3 \
+ $(gb_STDLIBS) \
))
# used to link against basegfxlx comphelp4gcc3 i18nisolang1gcc3 ucbhelper4gcc3 uno_cppu uno_cppuhelpergcc3 uno_salhelpergcc3 - seems to be superficial
@@ -57,21 +58,4 @@ $(eval $(call gb_Executable_add_exception_objects,mkunroll,\
tools/bootstrp/prj \
))
-ifeq ($(OS),WNT)
-$(eval $(call gb_Executable_add_linked_libs,mkunroll,\
- kernel32 \
- msvcrt \
- oldnames \
- user32 \
- uwinapi \
-))
-endif
-
-ifeq ($(OS),LINUX)
-$(eval $(call gb_Executable_add_linked_libs,mkunroll,\
- dl \
- pthread \
-))
-endif
-
# vim: set noet sw=4 ts=4:
diff --git a/tools/Executable_rscdep.mk b/tools/Executable_rscdep.mk
index d6f2c25a1763..8d8c55fa585d 100644
--- a/tools/Executable_rscdep.mk
+++ b/tools/Executable_rscdep.mk
@@ -44,6 +44,7 @@ $(eval $(call gb_Executable_add_linked_libs,rscdep,\
stl \
tl \
vos3 \
+ $(gb_STDLIBS) \
))
$(eval $(call gb_Executable_add_exception_objects,rscdep,\
@@ -55,20 +56,16 @@ $(eval $(call gb_Executable_add_exception_objects,rscdep,\
))
ifeq ($(OS),WNT)
+ifeq ($(HAVE_GETOPT),YES)
+$(eval $(call gb_Executable_set_cxxflags,rscdep,\
+ $$(CXXFLAGS) \
+ -DHAVE_GETOPT \
+))
+else
$(eval $(call gb_Executable_add_linked_libs,rscdep,\
gnu_getopt \
- kernel32 \
- msvcrt \
- oldnames \
- user32 \
- uwinapi \
))
endif
-
-ifeq ($(OS),LINUX)
-$(eval $(call gb_Executable_add_linked_libs,rscdep,\
- dl \
- pthread \
-))
endif
+
# vim: set noet sw=4 ts=4:
diff --git a/tools/Executable_so_checksum.mk b/tools/Executable_so_checksum.mk
index 071f0c5bb7b0..32b95bedd6da 100644
--- a/tools/Executable_so_checksum.mk
+++ b/tools/Executable_so_checksum.mk
@@ -42,6 +42,7 @@ $(eval $(call gb_Executable_set_cxxflags,so_checksum,\
$(eval $(call gb_Executable_add_linked_libs,so_checksum,\
sal \
tl \
+ $(gb_STDLIBS) \
))
# used to link against basegfxlx comphelp4gcc3 i18nisolang1gcc3 ucbhelper4gcc3 uno_cppu uno_cppuhelpergcc3 uno_salhelpergcc3 vos3gcc3 - seems to be superficial
@@ -50,20 +51,4 @@ $(eval $(call gb_Executable_add_exception_objects,so_checksum,\
tools/bootstrp/so_checksum \
))
-ifeq ($(OS),WNT)
-$(eval $(call gb_Executable_add_linked_libs,so_checksum,\
- kernel32 \
- msvcrt \
- oldnames \
- user32 \
- uwinapi \
-))
-endif
-
-ifeq ($(OS),LINUX)
-$(eval $(call gb_Executable_add_linked_libs,so_checksum,\
- dl \
- pthread \
-))
-endif
# vim: set noet sw=4 ts=4:
diff --git a/tools/Executable_sspretty.mk b/tools/Executable_sspretty.mk
index 0c83b7137eea..ab8379bae5bd 100644
--- a/tools/Executable_sspretty.mk
+++ b/tools/Executable_sspretty.mk
@@ -44,6 +44,7 @@ $(eval $(call gb_Executable_add_linked_libs,sspretty,\
stl \
tl \
vos3 \
+ $(gb_STDLIBS) \
))
# used to link against basegfxlx comphelp4gcc3 i18nisolang1gcc3 ucbhelper4gcc3 uno_cppu uno_cppuhelpergcc3 uno_salhelpergcc3 - seems to be superficial
@@ -55,20 +56,4 @@ $(eval $(call gb_Executable_add_exception_objects,sspretty,\
tools/bootstrp/sspretty \
))
-ifeq ($(OS),WNT)
-$(eval $(call gb_Executable_add_linked_libs,sspretty,\
- kernel32 \
- msvcrt \
- oldnames \
- user32 \
- uwinapi \
-))
-endif
-
-ifeq ($(OS),LINUX)
-$(eval $(call gb_Executable_add_linked_libs,sspretty,\
- dl \
- pthread \
-))
-endif
# vim: set noet sw=4 ts=4:
diff --git a/tools/Library_tl.mk b/tools/Library_tl.mk
index dde1f8f5dd92..4e676f2c3436 100644
--- a/tools/Library_tl.mk
+++ b/tools/Library_tl.mk
@@ -33,13 +33,10 @@ $(eval $(call gb_Library_add_precompiled_header,tl,$(SRCDIR)/tools/inc/pch/preco
$(eval $(call gb_Library_set_include,tl,\
$$(INCLUDE) \
- -I$(OUTDIR)/inc \
- -I$(WORKDIR)/inc/tools \
-I$(SRCDIR)/tools/inc \
-I$(SRCDIR)/tools/inc/pch \
-I$(SRCDIR)/solenv/inc \
-I$(SRCDIR)/solenv/inc/Xp31 \
- -I$(OUTDIR)/inc/tools \
-I$(OUTDIR)/inc/offuh \
-I$(OUTDIR)/inc/stl \
))
@@ -58,6 +55,7 @@ $(eval $(call gb_Library_add_linked_libs,tl,\
cppu \
sal \
vos3 \
+ $(gb_STDLIBS) \
))
@@ -142,15 +140,8 @@ $(eval $(call gb_Library_add_linked_static_libs,tl,\
))
endif
-ifeq ($(OS),LINUX)
-$(eval $(call gb_Library_add_linked_libs,tl,\
- dl \
- m \
- pthread \
-))
-endif
-
ifeq ($(OS),WNT)
+
$(eval $(call gb_Library_set_include,tl,\
$$(INCLUDE) \
-I$(SRCDIR)/tools/win/inc \
@@ -161,18 +152,15 @@ $(eval $(call gb_Library_add_exception_objects,tl,\
))
$(eval $(call gb_Library_add_linked_libs,tl,\
- advapi32 \
- kernel32 \
mpr \
- msvcrt \
- oldnames \
ole32 \
shell32 \
user32 \
uuid \
- uwinapi \
))
+
endif
+
# tools/source/string/debugprint -DDEBUG -DEXCEPTIONS_OFF -DOSL_DEBUG_LEVEL=2 -DSHAREDLIB -DTOOLS_DLLIMPLEMENTATION -D_DLL_ -O0 -fno-exceptions -fpic -fvisibility=hidden -g
# -DOPTIMIZE
# no -DTOOLS_DLLIMPLEMENTATION on toolsdll
diff --git a/tools/bootstrp/addexes/replace.cxx b/tools/bootstrp/addexes/replace.cxx
index 3c451ae54be0..37304ab18870 100644
--- a/tools/bootstrp/addexes/replace.cxx
+++ b/tools/bootstrp/addexes/replace.cxx
@@ -60,7 +60,7 @@ int _cdecl main( int argc, char *argv[] )
aUpperText.ToUpperAscii();
- ULONG nIndex;
+ sal_uIntPtr nIndex;
aSearch.ToUpperAscii();
nIndex = aUpperText.Search( aSearch.GetBuffer(), 0);
diff --git a/tools/bootstrp/addexes2/mkfilt.cxx b/tools/bootstrp/addexes2/mkfilt.cxx
index 2d03aaa153e5..9dae100352c3 100644
--- a/tools/bootstrp/addexes2/mkfilt.cxx
+++ b/tools/bootstrp/addexes2/mkfilt.cxx
@@ -88,16 +88,16 @@ class MkLine
public:
ByteString aLine;
ByteStringList* pPrivateTnrLst;
- BOOL bOut;
- BOOL bHier;
+ sal_Bool bOut;
+ sal_Bool bHier;
MkLine();
};
MkLine::MkLine()
{
- bOut = FALSE;
- bHier = FALSE;
+ bOut = sal_False;
+ bHier = sal_False;
pPrivateTnrLst = NULL;
}
@@ -159,32 +159,32 @@ void MkFilter::Filter()
MkLine *pMkLine = new MkLine();
ByteString *pStr = new ByteString( aLineBuf );
pMkLine->aLine = *pStr;
- pMkLine->bOut = FALSE;
+ pMkLine->bOut = sal_False;
pLst->Insert( pMkLine, LIST_APPEND );
}
else if ( nState == 1 )
{
- BOOL bInTnrList = TRUE;
+ sal_Bool bInTnrList = sal_True;
fprintf( stderr, ":" );
MkLine *pMkLine = new MkLine();
if ( aLine.Search("unroll end") != STRING_NOTFOUND )
{
fprintf( stderr, ";\nunroll end\n" );
MkLine *p_MkLine = new MkLine();
- p_MkLine->bHier = TRUE;
+ p_MkLine->bHier = sal_True;
ByteString *pByteString = new ByteString("# do not delete this line === mkfilter3i\n");
p_MkLine->aLine = *pByteString;
- p_MkLine->bOut = FALSE;
+ p_MkLine->bOut = sal_False;
p_MkLine->pPrivateTnrLst = pTnrLst;
pTnrLst = new ByteStringList();
pLst->Insert( p_MkLine, LIST_APPEND );
nState = 0;
- bInTnrList = FALSE;
+ bInTnrList = sal_False;
}
ByteString *pStr = new ByteString( aLineBuf );
pMkLine->aLine = *pStr;
- pMkLine->bOut = FALSE;
+ pMkLine->bOut = sal_False;
if ( bInTnrList )
pTnrLst->Insert( pMkLine, LIST_APPEND );
@@ -196,21 +196,21 @@ void MkFilter::Filter()
fprintf( stderr, "\n" );
// das File wieder ausgegeben
- ULONG nLines = pLst->Count();
- for ( ULONG j=0; j<nLines; j++ )
+ sal_uIntPtr nLines = pLst->Count();
+ for ( sal_uIntPtr j=0; j<nLines; j++ )
{
MkLine *pLine = pLst->GetObject( j );
if ( pLine->bHier )
{
// die List n - Mal abarbeiten
- for ( USHORT n=1; n<11; n++)
+ for ( sal_uInt16 n=1; n<11; n++)
{
- ULONG nCount = pLine->pPrivateTnrLst->Count();
- for ( ULONG i=0; i<nCount; i++ )
+ sal_uIntPtr nCount = pLine->pPrivateTnrLst->Count();
+ for ( sal_uIntPtr i=0; i<nCount; i++ )
{
MkLine *pMkLine = pLine->pPrivateTnrLst->GetObject(i);
ByteString aLine = pMkLine->aLine;
- while( aLine.SearchAndReplace( aTnr, ByteString::CreateFromInt32( n )) != (USHORT)-1 ) ;
+ while( aLine.SearchAndReplace( aTnr, ByteString::CreateFromInt32( n )) != (sal_uInt16)-1 ) ;
fputs( aLine.GetBuffer(), pOut );
fprintf( stderr, "o" );
}
diff --git a/tools/bootstrp/cppdep.cxx b/tools/bootstrp/cppdep.cxx
index 6263c719df51..28410a575b5a 100644
--- a/tools/bootstrp/cppdep.cxx
+++ b/tools/bootstrp/cppdep.cxx
@@ -63,34 +63,34 @@ CppDep::~CppDep()
void CppDep::Execute()
{
- ULONG nCount = pSources->Count();
- for ( ULONG n=0; n<nCount;n++)
+ sal_uIntPtr nCount = pSources->Count();
+ for ( sal_uIntPtr n=0; n<nCount;n++)
{
ByteString *pStr = pSources->GetObject(n);
Search( *pStr );
}
}
-BOOL CppDep::AddSearchPath( const char* aPath )
+sal_Bool CppDep::AddSearchPath( const char* aPath )
{
ByteString *pStr = new ByteString( aPath );
pSearchPath->Insert( pStr, LIST_APPEND );
- return FALSE;
+ return sal_False;
}
-BOOL CppDep::AddSource( const char* aSource )
+sal_Bool CppDep::AddSource( const char* aSource )
{
ByteString *pStr = new ByteString( aSource );
pSources->Insert( pStr, LIST_APPEND );
- return FALSE;
+ return sal_False;
}
-BOOL CppDep::Search( ByteString aFileName )
+sal_Bool CppDep::Search( ByteString aFileName )
{
#ifdef DEBUG_VERBOSE
fprintf( stderr, "SEARCH : %s\n", aFileName.GetBuffer());
#endif
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SvFileStream aFile;
ByteString aReadLine;
@@ -100,7 +100,7 @@ BOOL CppDep::Search( ByteString aFileName )
aFile.Open( suFileName, STREAM_READ );
while ( aFile.ReadLine( aReadLine ))
{
- USHORT nPos = aReadLine.Search( "include" );
+ sal_uInt16 nPos = aReadLine.Search( "include" );
if ( nPos != STRING_NOTFOUND )
{
#ifdef DEBUG_VERBOSE
@@ -115,13 +115,13 @@ BOOL CppDep::Search( ByteString aFileName )
if ( aResult !="")
if ( (aNewFile = Exists( aResult )) != "" )
{
- BOOL bFound = FALSE;
- ULONG nCount = pFileList->Count();
- for ( ULONG i=0; i<nCount; i++ )
+ sal_Bool bFound = sal_False;
+ sal_uIntPtr nCount = pFileList->Count();
+ for ( sal_uIntPtr i=0; i<nCount; i++ )
{
ByteString *pStr = pFileList->GetObject(i);
if ( *pStr == aNewFile )
- bFound = TRUE;
+ bFound = sal_True;
}
#ifdef DEBUG_VERBOSE
fprintf( stderr, "not in list : %d %s\n", nPos, aReadLine.GetBuffer() );
@@ -151,8 +151,8 @@ ByteString CppDep::Exists( ByteString aFileName )
fprintf( stderr, "Searching %s \n", aFileName.GetBuffer() );
#endif
- ULONG nCount = pSearchPath->Count();
- for ( ULONG n=0; n<nCount; n++)
+ sal_uIntPtr nCount = pSearchPath->Count();
+ for ( sal_uIntPtr n=0; n<nCount; n++)
{
struct stat aBuf;
ByteString *pPathName = pSearchPath->GetObject(n);
@@ -217,7 +217,7 @@ ByteString CppDep::IsIncludeStatement( ByteString aLine )
if ( aTmpStr.Equals("#include") )
{
aTmpStr = aLine.Erase( 0, 8 );
- USHORT nLen = aLine.Len();
+ sal_uInt16 nLen = aLine.Len();
aLine.Erase( nLen-1, 1 );
aLine.Erase( 0, 1 );
#ifdef DEBUG_VERBOSE
diff --git a/tools/bootstrp/cppdep.hxx b/tools/bootstrp/cppdep.hxx
index cdc3ac2e9758..0744a94d8964 100644
--- a/tools/bootstrp/cppdep.hxx
+++ b/tools/bootstrp/cppdep.hxx
@@ -41,7 +41,7 @@ protected:
ByteStringList *pFileList;
ByteStringList *pSources;
- BOOL Search( ByteString aFileName );
+ sal_Bool Search( ByteString aFileName );
ByteString Exists( ByteString aFileName );
ByteString IsIncludeStatement( ByteString aLine );
@@ -52,7 +52,7 @@ public:
virtual void Execute();
ByteStringList* GetDepList(){return pFileList;}
- BOOL AddSearchPath( const char* aPath );
- BOOL AddSource( const char * aSource );
+ sal_Bool AddSearchPath( const char* aPath );
+ sal_Bool AddSource( const char * aSource );
};
diff --git a/tools/bootstrp/inimgr.cxx b/tools/bootstrp/inimgr.cxx
index a0a69f06f7af..0907f8f9e102 100644
--- a/tools/bootstrp/inimgr.cxx
+++ b/tools/bootstrp/inimgr.cxx
@@ -42,7 +42,7 @@
/****************************************************************************/
IniManager::IniManager( ByteString &rDir, ByteString &rLocalDir )
/****************************************************************************/
- : bUpdate( TRUE )
+ : bUpdate( sal_True )
{
sLocalPath = ByteString( getenv( "LOCALINI" ));
if ( !sLocalPath.Len())
@@ -59,7 +59,7 @@ IniManager::IniManager( ByteString &rDir, ByteString &rLocalDir )
/****************************************************************************/
IniManager::IniManager( ByteString &rDir )
/****************************************************************************/
- : bUpdate( TRUE )
+ : bUpdate( sal_True )
{
sLocalPath = GetLocalIni();
sGlobalDir = rDir;
@@ -73,7 +73,7 @@ IniManager::IniManager( ByteString &rDir )
/****************************************************************************/
IniManager::IniManager()
/****************************************************************************/
- : bUpdate( TRUE )
+ : bUpdate( sal_True )
{
sLocalPath = GetLocalIni();
@@ -169,7 +169,7 @@ void IniManager::ForceUpdate()
sLocalPath += "/";
#endif
- for ( USHORT i=0; i < aDir.Count(); i++ ) {
+ for ( sal_uInt16 i=0; i < aDir.Count(); i++ ) {
ByteString sEntry( aDir[i].GetName(), gsl_getSystemTextEncoding());
if (( sEntry != "." ) &&
( sEntry != ".." ))
@@ -205,6 +205,6 @@ void IniManager::Update()
if ( bUpdate )
{
ForceUpdate();
- bUpdate = FALSE;
+ bUpdate = sal_False;
}
}
diff --git a/tools/bootstrp/iserver.cxx b/tools/bootstrp/iserver.cxx
index 0b2c1df15203..63b1b333b22f 100644
--- a/tools/bootstrp/iserver.cxx
+++ b/tools/bootstrp/iserver.cxx
@@ -50,12 +50,12 @@ int _cdecl main( int argc, char *argv[] )
fprintf( stdout, " returns a list of all settings of version \"vcl364\"\n" );
}
else {
- BOOL bError = FALSE;
- BOOL bList = FALSE;
+ sal_Bool bError = sal_False;
+ sal_Bool bList = sal_False;
ByteString sInfo( "" );
ByteString sDataBase( GetDefStandList());
- BOOL bGetNow = FALSE;
+ sal_Bool bGetNow = sal_False;
int nCount = 1;
while (( nCount < argc ) &&
@@ -68,7 +68,7 @@ int _cdecl main( int argc, char *argv[] )
sInfo = ByteString( argv[nCount] );
nCount++;
}
- else bError = TRUE;
+ else bError = sal_True;
}
else if ( ByteString( argv[nCount] ).ToUpperAscii() == "-D" ) {
// requestet info path
@@ -77,20 +77,20 @@ int _cdecl main( int argc, char *argv[] )
sDataBase = ByteString( argv[nCount] );
nCount++;
}
- else bError = TRUE;
+ else bError = sal_True;
}
else if ( ByteString( argv[nCount] ).ToUpperAscii() == "-L" ) {
// request list of childs
nCount++;
- bList = TRUE;
+ bList = sal_True;
}
else if ( ByteString( argv[nCount] ).ToUpperAscii() == "-N" ) {
// request list of childs
nCount++;
- bGetNow = TRUE;
+ bGetNow = sal_True;
}
else {
- bError = TRUE;
+ bError = sal_True;
}
}
@@ -103,7 +103,7 @@ int _cdecl main( int argc, char *argv[] )
return 1;
if ( sInfo.Len()) {
- GenericInformation *pInfo = pList->GetInfo( sInfo, TRUE );
+ GenericInformation *pInfo = pList->GetInfo( sInfo, sal_True );
if ( pInfo ) {
ByteString sValue( pInfo->GetValue());
@@ -113,7 +113,7 @@ int _cdecl main( int argc, char *argv[] )
GenericInformationList *pList = pInfo->GetSubList();
if ( pList ) {
// show whole list of childs and their values
- for( ULONG i = 0; i < pList->Count(); i++ ) {
+ for( sal_uIntPtr i = 0; i < pList->Count(); i++ ) {
GenericInformation *pInfo = pList->GetObject( i );
ByteString sValue( pInfo->GetValue());
fprintf( stdout, " %s %s\n", pInfo->GetBuffer(), sValue.GetBuffer());
@@ -126,11 +126,11 @@ int _cdecl main( int argc, char *argv[] )
}
else {
// show whole list of childs and their values
- for( ULONG i = 0; i < pList->Count(); i++ ) {
+ for( sal_uIntPtr i = 0; i < pList->Count(); i++ ) {
GenericInformation *pInfo = pList->GetObject( i );
if ( bGetNow ) {
ByteString sPath( "settings/now" );
- GenericInformation *pSubInfo = pInfo->GetSubInfo( sPath, TRUE );
+ GenericInformation *pSubInfo = pInfo->GetSubInfo( sPath, sal_True );
if ( pSubInfo && pSubInfo->GetValue() == "_TRUE" )
fprintf( stdout, "%s\n", pInfo->GetBuffer());
}
diff --git a/tools/bootstrp/mkcreate.cxx b/tools/bootstrp/mkcreate.cxx
index 398a3a4c4143..adf9dde2ddaa 100644
--- a/tools/bootstrp/mkcreate.cxx
+++ b/tools/bootstrp/mkcreate.cxx
@@ -59,7 +59,7 @@ char const *LimitedPath[] = {
/*****************************************************************************/
SourceDirectory::SourceDirectory( const ByteString &rDirectoryName,
- USHORT nOperatingSystem, SourceDirectory *pParentDirectory )
+ sal_uInt16 nOperatingSystem, SourceDirectory *pParentDirectory )
/*****************************************************************************/
: ByteString( rDirectoryName ),
pParent( pParentDirectory ),
@@ -87,7 +87,7 @@ SourceDirectory::~SourceDirectory()
/*****************************************************************************/
CodedDependency *SourceDirectory::AddCodedDependency(
- const ByteString &rCodedIdentifier, USHORT nOperatingSystems )
+ const ByteString &rCodedIdentifier, sal_uInt16 nOperatingSystems )
/*****************************************************************************/
{
CodedDependency *pReturn = NULL;
@@ -98,7 +98,7 @@ CodedDependency *SourceDirectory::AddCodedDependency(
pCodedDependencies->PutString(( ByteString * ) pReturn );
}
else {
- ULONG nPos =
+ sal_uIntPtr nPos =
pCodedDependencies->IsString( (ByteString *) (& rCodedIdentifier) );
if ( nPos == NOT_THERE ) {
pReturn =
@@ -116,7 +116,7 @@ CodedDependency *SourceDirectory::AddCodedDependency(
/*****************************************************************************/
CodedDependency *SourceDirectory::AddCodedIdentifier(
- const ByteString &rCodedIdentifier, USHORT nOperatingSystems )
+ const ByteString &rCodedIdentifier, sal_uInt16 nOperatingSystems )
/*****************************************************************************/
{
CodedDependency *pReturn = NULL;
@@ -127,7 +127,7 @@ CodedDependency *SourceDirectory::AddCodedIdentifier(
pCodedIdentifier->PutString(( ByteString * ) pReturn );
}
else {
- ULONG nPos =
+ sal_uIntPtr nPos =
pCodedIdentifier->IsString( ( ByteString *) (& rCodedIdentifier) );
if ( nPos == NOT_THERE ) {
pReturn =
@@ -172,22 +172,22 @@ SourceDirectory *SourceDirectory::GetRootDirectory()
/*****************************************************************************/
SourceDirectory *SourceDirectory::GetSubDirectory(
- const ByteString &rDirectoryPath, USHORT nOperatingSystem )
+ const ByteString &rDirectoryPath, sal_uInt16 nOperatingSystem )
/*****************************************************************************/
{
ByteString sSearch;
- BOOL bSubs = TRUE;
- ULONG nIndex = 0;
+ sal_Bool bSubs = sal_True;
+ sal_uIntPtr nIndex = 0;
while ( bSubs && ByteString( LimitedPath[ nIndex ]) != "EndOf_LimitedPath" ) {
SourceDirectory *pActDir = this;
ByteString sLimitation( LimitedPath[ nIndex ]);
- BOOL bBreak = FALSE;
- for ( ULONG i = sLimitation.GetTokenCount( '\\' ); i > 0 && !bBreak; i-- ) {
- if (( !pActDir ) || ( *pActDir != sLimitation.GetToken(( USHORT )( i - 1 ), '\\' )))
- bBreak = TRUE;
+ sal_Bool bBreak = sal_False;
+ for ( sal_uIntPtr i = sLimitation.GetTokenCount( '\\' ); i > 0 && !bBreak; i-- ) {
+ if (( !pActDir ) || ( *pActDir != sLimitation.GetToken(( sal_uInt16 )( i - 1 ), '\\' )))
+ bBreak = sal_True;
else
pActDir = pActDir->pParent;
}
@@ -223,7 +223,7 @@ SourceDirectory *SourceDirectory::GetSubDirectory(
/*****************************************************************************/
SourceDirectory *SourceDirectory::GetDirectory(
- const ByteString &rDirectoryName, USHORT nOperatingSystem )
+ const ByteString &rDirectoryName, sal_uInt16 nOperatingSystem )
/*****************************************************************************/
{
ByteString sDirectoryName( rDirectoryName );
@@ -249,7 +249,7 @@ SourceDirectory *SourceDirectory::GetDirectory(
/*****************************************************************************/
SourceDirectory *SourceDirectory::Insert( const ByteString &rDirectoryName,
- USHORT nOperatingSystem )
+ sal_uInt16 nOperatingSystem )
/*****************************************************************************/
{
SourceDirectory *pSubDirectory = NULL;
@@ -271,11 +271,11 @@ Dependency *SourceDirectory::ResolvesDependency(
if ( !pCodedIdentifier )
return NULL;
- ULONG nPos = pCodedIdentifier->IsString( pCodedDependency );
+ sal_uIntPtr nPos = pCodedIdentifier->IsString( pCodedDependency );
if ( nPos != NOT_THERE ) {
CodedDependency *pIdentifier =
( CodedDependency * ) pCodedIdentifier->GetObject( nPos );
- USHORT nResult =
+ sal_uInt16 nResult =
pIdentifier->GetOperatingSystem() &
pCodedDependency->GetOperatingSystem();
Dependency *pReturn = new Dependency( *this, nResult );
@@ -294,7 +294,7 @@ void SourceDirectory::ResolveDependencies()
if ( !pSubDirectories )
return;
- for ( ULONG i = 0; i < pSubDirectories->Count(); i++ ) {
+ for ( sal_uIntPtr i = 0; i < pSubDirectories->Count(); i++ ) {
SourceDirectory *pActDirectory =
( SourceDirectory * ) pSubDirectories->GetObject( i );
if ( pActDirectory->pSubDirectories )
@@ -304,10 +304,10 @@ void SourceDirectory::ResolveDependencies()
while ( pActDirectory->pCodedDependencies->Count())
{
CodedDependency *pCodedDependency = ( CodedDependency * )
- pActDirectory->pCodedDependencies->GetObject(( ULONG ) 0 );
+ pActDirectory->pCodedDependencies->GetObject(( sal_uIntPtr ) 0 );
for (
- ULONG k = 0;
+ sal_uIntPtr k = 0;
( k < pSubDirectories->Count()) &&
( pCodedDependency->GetOperatingSystem() != OS_NONE );
k++
@@ -329,7 +329,7 @@ void SourceDirectory::ResolveDependencies()
}
else
delete pCodedDependency;
- pActDirectory->pCodedDependencies->Remove(( ULONG ) 0 );
+ pActDirectory->pCodedDependencies->Remove(( sal_uIntPtr ) 0 );
}
}
}
@@ -344,7 +344,7 @@ ByteString SourceDirectory::GetTarget()
if ( !pDependencies )
return sReturn;
- ULONG k = 0;
+ sal_uIntPtr k = 0;
while ( k < pDependencies->Count()) {
if ( *this == *pDependencies->GetObject( k ))
delete pDependencies->Remove( k );
@@ -358,18 +358,18 @@ ByteString SourceDirectory::GetTarget()
return sReturn;
}
- BOOL bDependsOnPlatform = FALSE;
- for ( ULONG i = 0; i < pDependencies->Count(); i++ )
+ sal_Bool bDependsOnPlatform = sal_False;
+ for ( sal_uIntPtr i = 0; i < pDependencies->Count(); i++ )
if ((( Dependency * ) pDependencies->GetObject( i ))->
GetOperatingSystem() != OS_ALL )
- bDependsOnPlatform = TRUE;
+ bDependsOnPlatform = sal_True;
ByteString sTarget( *this );
sTarget.SearchAndReplaceAll( "\\", "$/" );
if ( !bDependsOnPlatform ) {
sReturn = sTarget;
sReturn += " :";
- for ( ULONG i = 0; i < pDependencies->Count(); i++ ) {
+ for ( sal_uIntPtr i = 0; i < pDependencies->Count(); i++ ) {
ByteString sDependency( *pDependencies->GetObject( i ));
sDependency.SearchAndReplaceAll( "\\", "$/" );
sReturn += " ";
@@ -380,19 +380,19 @@ ByteString SourceDirectory::GetTarget()
ByteString sUNX( ".IF \"$(GUI)\" == \"UNX\"\n" );
sUNX += sTarget;
sUNX += " :";
- BOOL bUNX = FALSE;
+ sal_Bool bUNX = sal_False;
ByteString sWNT( ".IF \"$(GUI)\" == \"WNT\"\n" );
sWNT += sTarget;
sWNT += " :";
- BOOL bWNT = FALSE;
+ sal_Bool bWNT = sal_False;
ByteString sOS2( ".IF \"$(GUI)\" == \"OS2\"\n" );
sOS2 += sTarget;
sOS2 += " :";
- BOOL bOS2 = FALSE;
+ sal_Bool bOS2 = sal_False;
- for ( ULONG i = 0; i < pDependencies->Count(); i++ ) {
+ for ( sal_uIntPtr i = 0; i < pDependencies->Count(); i++ ) {
Dependency *pDependency =
( Dependency * ) pDependencies->GetObject( i );
ByteString sDependency( *pDependency );
@@ -401,17 +401,17 @@ ByteString SourceDirectory::GetTarget()
if ( pDependency->GetOperatingSystem() & OS_UNX ) {
sUNX += " ";
sUNX += sDependency;
- bUNX = TRUE;
+ bUNX = sal_True;
}
if ( pDependency->GetOperatingSystem() & OS_WIN32 ) {
sWNT += " ";
sWNT += sDependency;
- bWNT = TRUE;
+ bWNT = sal_True;
}
if ( pDependency->GetOperatingSystem() & OS_OS2 ) {
sOS2 += " ";
sOS2 += sDependency;
- bOS2 = TRUE;
+ bOS2 = sal_True;
}
}
@@ -439,16 +439,16 @@ ByteString SourceDirectory::GetSubDirsTarget()
ByteString sReturn;
if ( pSubDirectories ) {
- BOOL bDependsOnPlatform = FALSE;
- for ( ULONG i = 0; i < pSubDirectories->Count(); i++ )
+ sal_Bool bDependsOnPlatform = sal_False;
+ for ( sal_uIntPtr i = 0; i < pSubDirectories->Count(); i++ )
if ((( SourceDirectory * ) pSubDirectories->GetObject( i ))->
GetOperatingSystems() != OS_ALL )
- bDependsOnPlatform = TRUE;
+ bDependsOnPlatform = sal_True;
if ( !bDependsOnPlatform ) {
sReturn = "RC_SUBDIRS = ";
- for ( ULONG i = 0; i < pSubDirectories->Count(); i++ ) {
+ for ( sal_uIntPtr i = 0; i < pSubDirectories->Count(); i++ ) {
ByteString sSubDirectory( *pSubDirectories->GetObject( i ));
sSubDirectory.SearchAndReplaceAll( "\\", "$/" );
sReturn += " \\\n\t";
@@ -459,17 +459,17 @@ ByteString SourceDirectory::GetSubDirsTarget()
else {
ByteString sUNX( ".IF \"$(GUI)\" == \"UNX\"\n" );
sUNX += "RC_SUBDIRS = ";
- BOOL bUNX = FALSE;
+ sal_Bool bUNX = sal_False;
ByteString sWNT( ".IF \"$(GUI)\" == \"WNT\"\n" );
sWNT += "RC_SUBDIRS = ";
- BOOL bWNT = FALSE;
+ sal_Bool bWNT = sal_False;
ByteString sOS2( ".IF \"$(GUI)\" == \"OS2\"\n" );
sOS2 += "RC_SUBDIRS = ";
- BOOL bOS2 = FALSE;
+ sal_Bool bOS2 = sal_False;
- for ( ULONG i = 0; i < pSubDirectories->Count(); i++ ) {
+ for ( sal_uIntPtr i = 0; i < pSubDirectories->Count(); i++ ) {
SourceDirectory *pDirectory =
( SourceDirectory * ) pSubDirectories->GetObject( i );
ByteString sDirectory( *pDirectory );
@@ -478,17 +478,17 @@ ByteString SourceDirectory::GetSubDirsTarget()
if ( pDirectory->GetOperatingSystems() & OS_UNX ) {
sUNX += " \\\n\t";
sUNX += sDirectory;
- bUNX = TRUE;
+ bUNX = sal_True;
}
if ( pDirectory->GetOperatingSystems() & OS_WIN32 ) {
sWNT += " \\\n\t";
sWNT += sDirectory;
- bWNT = TRUE;
+ bWNT = sal_True;
}
if ( pDirectory->GetOperatingSystems() & OS_OS2 ) {
sOS2 += " \\\n\t";
sOS2 += sDirectory;
- bOS2 = TRUE;
+ bOS2 = sal_True;
}
}
if ( bUNX ) {
@@ -509,10 +509,10 @@ ByteString SourceDirectory::GetSubDirsTarget()
}
/*****************************************************************************/
-USHORT SourceDirectory::GetOSType( const ByteString &sDependExt )
+sal_uInt16 SourceDirectory::GetOSType( const ByteString &sDependExt )
/*****************************************************************************/
{
- USHORT nOSType = 0;
+ sal_uInt16 nOSType = 0;
if ( sDependExt == "" )
nOSType |= OS_ALL;
else if ( sDependExt == "N" || sDependExt == "W" )
@@ -526,7 +526,7 @@ USHORT SourceDirectory::GetOSType( const ByteString &sDependExt )
/*****************************************************************************/
SourceDirectory *SourceDirectory::CreateRootDirectory(
- const ByteString &rRoot, const ByteString &rVersion, BOOL bAll )
+ const ByteString &rRoot, const ByteString &rVersion, sal_Bool bAll )
/*****************************************************************************/
{
IniManager aIniManager;
@@ -550,7 +550,7 @@ SourceDirectory *SourceDirectory::CreateRootDirectory(
#endif
ByteString sSolarList( _SOLARLIST );
- GenericInformation *pInfo = pVerList->GetInfo( sPath, TRUE );
+ GenericInformation *pInfo = pVerList->GetInfo( sPath, sal_True );
if ( pInfo ) {
ByteString aIniRoot( GetIniRoot() );
DirEntry aIniEntry( String( aIniRoot, RTL_TEXTENCODING_ASCII_US ));
@@ -564,18 +564,18 @@ SourceDirectory *SourceDirectory::CreateRootDirectory(
*/
ByteString sVersion( rVersion );
- Star aStar( pVerList, sVersion, TRUE, rRoot.GetBuffer());
+ Star aStar( pVerList, sVersion, sal_True, rRoot.GetBuffer());
// fprintf( stderr,
// "Creating virtual directory tree ...\n" );
SourceDirectory *pSourceRoot = new SourceDirectory( rRoot, OS_ALL );
- for ( ULONG i = 0; i < aStar.Count(); i++ ) {
+ for ( sal_uIntPtr i = 0; i < aStar.Count(); i++ ) {
Prj *pPrj = aStar.GetObject( i );
- BOOL bBuildable = TRUE;
- ULONG nIndex = 0;
+ sal_Bool bBuildable = sal_True;
+ sal_uIntPtr nIndex = 0;
while ( bBuildable && ByteString( NoBuildProject[ nIndex ]) != "EndOf_NoBuildProject" ) {
bBuildable = ( ByteString( NoBuildProject[ nIndex ]) != pPrj->GetProjectName());
@@ -585,14 +585,14 @@ SourceDirectory *SourceDirectory::CreateRootDirectory(
if ( bBuildable ) {
SourceDirectory *pProject = pSourceRoot->Insert( pPrj->GetProjectName(), OS_ALL );
- SByteStringList *pPrjDependencies = pPrj->GetDependencies( FALSE );
+ SByteStringList *pPrjDependencies = pPrj->GetDependencies( sal_False );
if ( pPrjDependencies )
- for ( ULONG x = 0; x < pPrjDependencies->Count(); x++ )
+ for ( sal_uIntPtr x = 0; x < pPrjDependencies->Count(); x++ )
pProject->AddCodedDependency( *pPrjDependencies->GetObject( x ), OS_ALL );
pProject->AddCodedIdentifier( pPrj->GetProjectName(), OS_ALL );
- for ( ULONG j = 0; j < pPrj->Count(); j++ ) {
+ for ( sal_uIntPtr j = 0; j < pPrj->Count(); j++ ) {
CommandData *pData = pPrj->GetObject( j );
if ( bAll || ( pData->GetCommandType() == COMMAND_NMAKE )) {
ByteString sDirPath( rRoot );
@@ -602,7 +602,7 @@ SourceDirectory *SourceDirectory::CreateRootDirectory(
pSourceRoot->InsertFull( sDirPath, pData->GetOSType());
SByteStringList *pDependencies = pData->GetDependencies();
if ( pDependencies ) {
- for ( ULONG k = 0; k < pDependencies->Count(); k++ ) {
+ for ( sal_uIntPtr k = 0; k < pDependencies->Count(); k++ ) {
ByteString sDependency(*pDependencies->GetObject( k ));
ByteString sDependExt(sDependency.GetToken( 1, '.' ));
sDependExt.ToUpperAscii();
@@ -623,14 +623,14 @@ SourceDirectory *SourceDirectory::CreateRootDirectory(
}
/*****************************************************************************/
-BOOL SourceDirectory::RemoveDirectoryTreeAndAllDependencies()
+sal_Bool SourceDirectory::RemoveDirectoryTreeAndAllDependencies()
/*****************************************************************************/
{
if ( !pParent )
- return FALSE;
+ return sal_False;
SourceDirectoryList *pParentContent = pParent->pSubDirectories;
- ULONG i = 0;
+ sal_uIntPtr i = 0;
while ( i < pParentContent->Count()) {
SourceDirectory *pCandidate =
( SourceDirectory * )pParentContent->GetObject( i );
@@ -639,7 +639,7 @@ BOOL SourceDirectory::RemoveDirectoryTreeAndAllDependencies()
}
else {
if ( pCandidate->pDependencies ) {
- ULONG nPos = pCandidate->pDependencies->IsString( this );
+ sal_uIntPtr nPos = pCandidate->pDependencies->IsString( this );
if ( nPos != NOT_THERE )
delete pCandidate->pDependencies->Remove( nPos );
}
@@ -647,15 +647,15 @@ BOOL SourceDirectory::RemoveDirectoryTreeAndAllDependencies()
}
}
delete this;
- return TRUE;
+ return sal_True;
}
/*****************************************************************************/
-BOOL SourceDirectory::CreateRecursiveMakefile( BOOL bAllChilds )
+sal_Bool SourceDirectory::CreateRecursiveMakefile( sal_Bool bAllChilds )
/*****************************************************************************/
{
if ( !pSubDirectories )
- return TRUE;
+ return sal_True;
fprintf( stdout, "%s", GetFullPath().GetBuffer());
@@ -663,10 +663,10 @@ BOOL SourceDirectory::CreateRecursiveMakefile( BOOL bAllChilds )
DirEntry aEntry( aTmpStr );
if ( !aEntry.Exists()) {
fprintf( stdout, " ... no directory!n" );
- return FALSE;
+ return sal_False;
}
- ULONG j = 0;
+ sal_uIntPtr j = 0;
while( j < pSubDirectories->Count()) {
String sSubDirectory(
(( SourceDirectory * ) pSubDirectories->GetObject( j ))->
@@ -689,20 +689,20 @@ BOOL SourceDirectory::CreateRecursiveMakefile( BOOL bAllChilds )
DirEntry aMKEntry( aEntry );
aMKEntry += aMKFile;
- BOOL bMakefileMk = FALSE;
+ sal_Bool bMakefileMk = sal_False;
if ( aMKEntry.Exists()) {
if ( nDepth == 1 && *this == ByteString( "api" ))
fprintf( stdout, " ... makefile.mk exists, ignoring (hack: prj == api)!" );
else {
fprintf( stdout, " ... makefile.mk exists, including!" );
- bMakefileMk = TRUE;
+ bMakefileMk = sal_True;
}
}
SvFileStream aMakefile( aRCEntry.GetFull(), STREAM_STD_WRITE | STREAM_TRUNC );
if ( !aMakefile.IsOpen()) {
fprintf( stdout, " ... failed!\n" );
- return FALSE;
+ return sal_False;
}
ByteString sHeader(
@@ -866,7 +866,7 @@ BOOL SourceDirectory::CreateRecursiveMakefile( BOOL bAllChilds )
);
aMakefile.WriteLine( sComment );
- for ( ULONG i = 0; i < pSubDirectories->Count(); i++ ) {
+ for ( sal_uIntPtr i = 0; i < pSubDirectories->Count(); i++ ) {
ByteString sTarget(
(( SourceDirectory * )pSubDirectories->GetObject( i ))->
GetTarget()
@@ -908,12 +908,12 @@ BOOL SourceDirectory::CreateRecursiveMakefile( BOOL bAllChilds )
fprintf( stdout, "\n" );
- BOOL bSuccess = TRUE;
+ sal_Bool bSuccess = sal_True;
if ( bAllChilds )
- for ( ULONG k = 0; k < pSubDirectories->Count(); k++ )
+ for ( sal_uIntPtr k = 0; k < pSubDirectories->Count(); k++ )
if ( !(( SourceDirectory * ) pSubDirectories->GetObject( k ))->
- CreateRecursiveMakefile( TRUE ))
- bSuccess = FALSE;
+ CreateRecursiveMakefile( sal_True ))
+ bSuccess = sal_False;
return bSuccess;
}
@@ -926,7 +926,7 @@ BOOL SourceDirectory::CreateRecursiveMakefile( BOOL bAllChilds )
SourceDirectoryList::~SourceDirectoryList()
/*****************************************************************************/
{
- for ( ULONG i = 0; i < Count(); i++ )
+ for ( sal_uIntPtr i = 0; i < Count(); i++ )
delete GetObject( i );
}
@@ -935,7 +935,7 @@ SourceDirectory *SourceDirectoryList::Search(
const ByteString &rDirectoryName )
/*****************************************************************************/
{
- ULONG nPos = IsString( ( ByteString * ) (&rDirectoryName) );
+ sal_uIntPtr nPos = IsString( ( ByteString * ) (&rDirectoryName) );
if ( nPos != LIST_ENTRY_NOTFOUND )
return ( SourceDirectory * ) GetObject( nPos );
diff --git a/tools/bootstrp/prj.cxx b/tools/bootstrp/prj.cxx
index e5ed5b2451e9..b4dee65f9673 100644
--- a/tools/bootstrp/prj.cxx
+++ b/tools/bootstrp/prj.cxx
@@ -113,9 +113,9 @@ ByteString SimpleConfig::GetNextLine()
aTmpStr = aTmpStr.EraseTrailingChars();
while ( aTmpStr.SearchAndReplace(ByteString(' '),ByteString('\t') ) != STRING_NOTFOUND ) ;
int nLength = aTmpStr.Len();
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
ByteString aEraseString;
- for ( USHORT i = 0; i<= nLength; i++)
+ for ( sal_uInt16 i = 0; i<= nLength; i++)
{
if ( aTmpStr.GetChar( i ) == 0x20 && !bFound )
aTmpStr.SetChar( i, 0x09 );
@@ -124,7 +124,7 @@ ByteString SimpleConfig::GetNextLine()
}
/*****************************************************************************/
-ByteString SimpleConfig::GetCleanedNextLine( BOOL bReadComments )
+ByteString SimpleConfig::GetCleanedNextLine( sal_Bool bReadComments )
/*****************************************************************************/
{
@@ -142,11 +142,11 @@ ByteString SimpleConfig::GetCleanedNextLine( BOOL bReadComments )
aTmpStr = aTmpStr.EraseLeadingChars();
aTmpStr = aTmpStr.EraseTrailingChars();
-// while ( aTmpStr.SearchAndReplace(String(' '),String('\t') ) != (USHORT)-1 );
+// while ( aTmpStr.SearchAndReplace(String(' '),String('\t') ) != (sal_uInt16)-1 );
int nLength = aTmpStr.Len();
ByteString aEraseString;
- BOOL bFirstTab = TRUE;
- for ( USHORT i = 0; i<= nLength; i++)
+ sal_Bool bFirstTab = sal_True;
+ for ( sal_uInt16 i = 0; i<= nLength; i++)
{
if ( aTmpStr.GetChar( i ) == 0x20 )
aTmpStr.SetChar( i, 0x09 );
@@ -154,17 +154,18 @@ ByteString SimpleConfig::GetCleanedNextLine( BOOL bReadComments )
if ( aTmpStr.GetChar( i ) == 0x09 )
{
if ( bFirstTab )
- bFirstTab = FALSE;
+ bFirstTab = sal_False;
else
{
aTmpStr.SetChar( i, 0x20 );
}
}
else
- bFirstTab = TRUE;
+ bFirstTab = sal_True;
}
aTmpStr.EraseAllChars(' ');
return aTmpStr;
}
+
diff --git a/tools/bootstrp/rscdep.cxx b/tools/bootstrp/rscdep.cxx
index 9eddce53a678..7bcf036f6fa4 100644
--- a/tools/bootstrp/rscdep.cxx
+++ b/tools/bootstrp/rscdep.cxx
@@ -88,7 +88,7 @@ int main( int argc, char** argv )
char pOutputFileName[255];
char pSrsFileName[255];
String aSrsBaseName;
- BOOL bSource = FALSE;
+ sal_Bool bSource = sal_False;
ByteString aRespArg;
// who needs anything but '/' ?
// String aDelim = String(DirEntry::GetAccessDelimiter());
@@ -172,7 +172,7 @@ int main( int argc, char** argv )
pDep->AddSource( &aBuf2[0] );
aRespArg += " ";
aRespArg += &aBuf2[0];
- bSource = TRUE;
+ bSource = sal_True;
}
}
}
@@ -205,7 +205,7 @@ int main( int argc, char** argv )
case 'h' :
case 'H' :
case '?' :
- printf("RscDep 1.0 (c)2000 StarOffice\n");
+ printf("RscDep 1.0\n");
break;
default:
@@ -221,7 +221,7 @@ int main( int argc, char** argv )
aEntry.ToAbs();
// String aCwd = aEntry.GetName();
String aCwd(pFileNamePrefix, gsl_getSystemTextEncoding());
-/* USHORT nPos;
+/* sal_uInt16 nPos;
#ifndef UNX
while ( (nPos = aCwd.Search('\\') != STRING_NOTFOUND ))
#else
@@ -272,7 +272,7 @@ int main( int argc, char** argv )
aString += aRespArg;
pDep->Execute();
ByteStringList *pLst = pDep->GetDepList();
- ULONG nCount = pLst->Count();
+ sal_uIntPtr nCount = pLst->Count();
if ( nCount == 0 )
{
aOutStream.WriteLine( aString );
@@ -283,7 +283,7 @@ int main( int argc, char** argv )
aOutStream.WriteLine( aString );
}
- for ( ULONG j=0; j<nCount; j++ )
+ for ( sal_uIntPtr j=0; j<nCount; j++ )
{
ByteString *pStr = pLst->GetObject(j);
pStr->SearchAndReplaceAll('\\', ByteString( aDelim, RTL_TEXTENCODING_ASCII_US ));
diff --git a/tools/inc/bootstrp/inimgr.hxx b/tools/inc/bootstrp/inimgr.hxx
index 7be00ce14d48..d72df34f19af 100644
--- a/tools/inc/bootstrp/inimgr.hxx
+++ b/tools/inc/bootstrp/inimgr.hxx
@@ -39,7 +39,7 @@ Source and Destination Dir is used. Otherwise ForceUpdate has to be used
class IniManager
{
private:
- BOOL bUpdate;
+ sal_Bool bUpdate;
ByteString sGlobalDir; /// holds the org. ini dir
ByteString sLocalPath; /// holds path of local ini dir
diff --git a/tools/inc/bootstrp/mkcreate.hxx b/tools/inc/bootstrp/mkcreate.hxx
index 5510fb87f7b9..96f272533d55 100644
--- a/tools/inc/bootstrp/mkcreate.hxx
+++ b/tools/inc/bootstrp/mkcreate.hxx
@@ -46,14 +46,14 @@ class SourceDirectoryList;
class CodedDependency : public ByteString
{
private:
- USHORT nOSType; // operating systems where dependeny exists
+ sal_uInt16 nOSType; // operating systems where dependeny exists
public:
/* create a dependency instance with given coded directory name
*/
CodedDependency(
const ByteString &rCodedIdentifier, // the coded name of the directory
- USHORT nOperatingSystems // the operating systems where this dependency exists
+ sal_uInt16 nOperatingSystems // the operating systems where this dependency exists
) :
ByteString( rCodedIdentifier ),
nOSType( nOperatingSystems )
@@ -62,29 +62,29 @@ public:
/* returns the operating system
*/
- USHORT GetOperatingSystem()
+ sal_uInt16 GetOperatingSystem()
{
return nOSType;
}
/* set operating system
*/
- void SetOperatingSystem( USHORT nOperatingSystems )
+ void SetOperatingSystem( sal_uInt16 nOperatingSystems )
{
nOSType = nOperatingSystems;
}
/* add operating systems if same dependency
*/
- BOOL TryToMerge(
+ sal_Bool TryToMerge(
const ByteString &rCodedIdentifier, // the coded name of the directory
- USHORT nOperatingSystems // the operating systems where this dependency exists
+ sal_uInt16 nOperatingSystems // the operating systems where this dependency exists
)
{
if ( rCodedIdentifier != *this )
- return FALSE;
+ return sal_False;
nOSType |= nOperatingSystems;
- return TRUE;
+ return sal_True;
}
};
@@ -95,14 +95,14 @@ public:
class Dependency : public ByteString
{
private:
- USHORT nOSType; // operating systems where dependecy exists
+ sal_uInt16 nOSType; // operating systems where dependecy exists
public:
/* create a dependency instance with given directory name
*/
Dependency(
const ByteString &rDirectoryName, // the coded name of the directory
- USHORT nOperatingSystems // the operating systems where this dependency exists
+ sal_uInt16 nOperatingSystems // the operating systems where this dependency exists
) :
ByteString( rDirectoryName ),
nOSType( nOperatingSystems )
@@ -111,7 +111,7 @@ public:
/* returns the operating system
*/
- USHORT GetOperatingSystem()
+ sal_uInt16 GetOperatingSystem()
{
return nOSType;
}
@@ -126,8 +126,8 @@ class SourceDirectory : public ByteString
private:
SourceDirectory *pParent; // the parent directory
SourceDirectoryList *pSubDirectories; // list of sub directories
- USHORT nOSType; // operating systems where this directory is used
- USHORT nDepth; // depth of directory structure (root is 0)
+ sal_uInt16 nOSType; // operating systems where this directory is used
+ sal_uInt16 nDepth; // depth of directory structure (root is 0)
SByteStringList *pDependencies; // dependencies on other directories in this depth
@@ -142,13 +142,13 @@ private:
/* returns the operating systems of a coded dependency
*/
- static USHORT GetOSType(
+ static sal_uInt16 GetOSType(
const ByteString &sDependExt // the corresponding dependency extension (see also prj.hxx)
);
/* removes this and all sub directories with all dependencies
*/
- BOOL RemoveDirectoryTreeAndAllDependencies();
+ sal_Bool RemoveDirectoryTreeAndAllDependencies();
public:
@@ -157,7 +157,7 @@ public:
*/
SourceDirectory(
const ByteString &rDirectoryName, // name without parent
- USHORT nOperatingSystem, // the operating systems where this directory is used
+ sal_uInt16 nOperatingSystem, // the operating systems where this directory is used
SourceDirectory *pParentDirectory = NULL // parent (if not root)
);
~SourceDirectory();
@@ -172,20 +172,20 @@ public:
/* returns the Operating systems where this directory is used
*/
- USHORT GetOperatingSystems() { return nOSType; }
+ sal_uInt16 GetOperatingSystems() { return nOSType; }
/* returns the given directory
*/
SourceDirectory *GetDirectory(
const ByteString &rDirectoryName, // full path
- USHORT nOperatingSystem // the operating systems where this directory is used
+ sal_uInt16 nOperatingSystem // the operating systems where this directory is used
);
/* create the directory and all mandatory parents
*/
SourceDirectory *InsertFull(
const ByteString &rDirectoryName, // full path
- USHORT nOperatingSystem // the operating systems where this directory is used
+ sal_uInt16 nOperatingSystem // the operating systems where this directory is used
)
{
return GetDirectory( rDirectoryName, nOperatingSystem );
@@ -195,7 +195,7 @@ public:
*/
SourceDirectory *Insert(
const ByteString &rDirectoryName, // name without parent
- USHORT nOperatingSystem // the operating systems where this directory is used
+ sal_uInt16 nOperatingSystem // the operating systems where this directory is used
);
/* get the root directory
@@ -206,14 +206,14 @@ public:
*/
SourceDirectory *GetSubDirectory(
const ByteString &rDirectoryPath, // full sub path
- USHORT nOperatingSystem // the operating systems where this directory is used
+ sal_uInt16 nOperatingSystem // the operating systems where this directory is used
);
/* add a dependency for several platforms
*/
CodedDependency *AddCodedDependency(
const ByteString &rCodedIdentifier, // the coded name of the directory
- USHORT nOperatingSystems // the operating systems where this dependency exists
+ sal_uInt16 nOperatingSystems // the operating systems where this dependency exists
);
/* returns the dependency list
@@ -227,7 +227,7 @@ public:
*/
CodedDependency *AddCodedIdentifier(
const ByteString &rCodedIdentifier, // the coded name of the directory
- USHORT nOperatingSystems // the operating systems where this dependency exists
+ sal_uInt16 nOperatingSystems // the operating systems where this dependency exists
);
/* returns the identifier list
@@ -254,13 +254,13 @@ public:
static SourceDirectory *CreateRootDirectory(
const ByteString &rRoot, // the root directory in file system
const ByteString &rVersion, // the solar verion (r.g. SRC590, SRC591 etc.)
- BOOL bAll = FALSE // add all directories or only buildable ones
+ sal_Bool bAll = sal_False // add all directories or only buildable ones
);
/* create the makefile.rc in file system
*/
- BOOL CreateRecursiveMakefile(
- BOOL bAllChilds = FALSE // create rcursive for all sub directories
+ sal_Bool CreateRecursiveMakefile(
+ sal_Bool bAllChilds = sal_False // create rcursive for all sub directories
);
};
@@ -286,7 +286,7 @@ public:
/* insert a new directory
*/
- ULONG InsertSorted(
+ sal_uIntPtr InsertSorted(
SourceDirectory *pDirectory // directory
)
{
diff --git a/tools/inc/bootstrp/prj.hxx b/tools/inc/bootstrp/prj.hxx
index 4b1ff91feb7b..9e16ab2ee9a3 100644
--- a/tools/inc/bootstrp/prj.hxx
+++ b/tools/inc/bootstrp/prj.hxx
@@ -52,7 +52,7 @@ public:
SimpleConfig(DirEntry& rDirEntry);
~SimpleConfig();
ByteString GetNext();
- ByteString GetCleanedNextLine( BOOL bReadComments = FALSE );
+ ByteString GetCleanedNextLine( sal_Bool bReadComments = sal_False );
};
#endif
diff --git a/tools/inc/impcont.hxx b/tools/inc/impcont.hxx
index 224d5a4429ef..9be0a909474d 100644
--- a/tools/inc/impcont.hxx
+++ b/tools/inc/impcont.hxx
@@ -42,8 +42,8 @@ class CBlock
private:
CBlock* pPrev; // Vorheriger Block
CBlock* pNext; // Naechster Block
- USHORT nSize; // Groesse des Blocks
- USHORT nCount; // Anzahl Pointer
+ sal_uInt16 nSize; // Groesse des Blocks
+ sal_uInt16 nCount; // Anzahl Pointer
void** pNodes; // Pointer auf die Daten
#if defined DBG_UTIL
@@ -52,26 +52,26 @@ private:
public:
// Fuer List-Container
- CBlock( USHORT nSize, CBlock* pPrev, CBlock* pNext );
+ CBlock( sal_uInt16 nSize, CBlock* pPrev, CBlock* pNext );
// Fuer Array-Container
- CBlock( USHORT nSize, CBlock* pPrev );
+ CBlock( sal_uInt16 nSize, CBlock* pPrev );
// Copy-Ctor
CBlock( const CBlock& r, CBlock* pPrev );
~CBlock();
- void Insert( void* p, USHORT nIndex, USHORT nReSize );
- CBlock* Split( void* p, USHORT nIndex, USHORT nReSize );
- void* Remove( USHORT nIndex, USHORT nReSize );
- void* Replace( void* pNew, USHORT nIndex );
+ void Insert( void* p, sal_uInt16 nIndex, sal_uInt16 nReSize );
+ CBlock* Split( void* p, sal_uInt16 nIndex, sal_uInt16 nReSize );
+ void* Remove( sal_uInt16 nIndex, sal_uInt16 nReSize );
+ void* Replace( void* pNew, sal_uInt16 nIndex );
void** GetNodes() const { return pNodes; }
- void** GetObjectPtr( USHORT nIndex );
- void* GetObject( USHORT nIndex ) const;
+ void** GetObjectPtr( sal_uInt16 nIndex );
+ void* GetObject( sal_uInt16 nIndex ) const;
- void SetSize( USHORT nNewSize );
+ void SetSize( sal_uInt16 nNewSize );
- USHORT GetSize() const { return nCount; }
- USHORT Count() const { return nCount; }
+ sal_uInt16 GetSize() const { return nCount; }
+ sal_uInt16 Count() const { return nCount; }
void SetPrevBlock( CBlock* p ) { pPrev = p; }
void SetNextBlock( CBlock* p ) { pNext = p; }
CBlock* GetPrevBlock() const { return pPrev; }
@@ -94,7 +94,7 @@ private:
|*
*************************************************************************/
-inline void* CBlock::GetObject( USHORT nIndex ) const
+inline void* CBlock::GetObject( sal_uInt16 nIndex ) const
{
return pNodes[nIndex];
}
@@ -111,11 +111,11 @@ inline void* CBlock::GetObject( USHORT nIndex ) const
|*
*************************************************************************/
-inline void* Container::ImpGetObject( ULONG nIndex ) const
+inline void* Container::ImpGetObject( sal_uIntPtr nIndex ) const
{
if ( pFirstBlock && (nIndex < pFirstBlock->Count()) )
// Item innerhalb des gefundenen Blocks zurueckgeben
- return pFirstBlock->GetObject( (USHORT)nIndex );
+ return pFirstBlock->GetObject( (sal_uInt16)nIndex );
else
return GetObject( nIndex );
}
diff --git a/tools/inc/poly.h b/tools/inc/poly.h
index 9228715b8da7..7876398c1876 100644
--- a/tools/inc/poly.h
+++ b/tools/inc/poly.h
@@ -30,7 +30,7 @@
#include <tools/gen.hxx>
-#define MAX_64KPOINTS ((((USHORT)0xFFFF)-32)/sizeof(Point))
+#define MAX_64KPOINTS ((((sal_uInt16)0xFFFF)-32)/sizeof(Point))
// -------------------
// - ImplPolygonData -
@@ -40,9 +40,9 @@ class ImplPolygonData
{
public:
Point* mpPointAry;
- BYTE* mpFlagAry;
- USHORT mnPoints;
- ULONG mnRefCount;
+ sal_uInt8* mpFlagAry;
+ sal_uInt16 mnPoints;
+ sal_uIntPtr mnRefCount;
};
// ---------------
@@ -52,22 +52,22 @@ public:
class ImplPolygon : public ImplPolygonData
{
public:
- ImplPolygon( USHORT nInitSize, BOOL bFlags = FALSE );
- ImplPolygon( USHORT nPoints, const Point* pPtAry, const BYTE* pInitFlags = NULL );
+ ImplPolygon( sal_uInt16 nInitSize, sal_Bool bFlags = sal_False );
+ ImplPolygon( sal_uInt16 nPoints, const Point* pPtAry, const sal_uInt8* pInitFlags = NULL );
ImplPolygon( const ImplPolygon& rImplPoly );
~ImplPolygon();
- void ImplSetSize( USHORT nSize, BOOL bResize = TRUE );
+ void ImplSetSize( sal_uInt16 nSize, sal_Bool bResize = sal_True );
void ImplCreateFlagArray();
- void ImplSplit( USHORT nPos, USHORT nSpace, ImplPolygon* pInitPoly = NULL );
- void ImplRemove( USHORT nPos, USHORT nCount );
+ void ImplSplit( sal_uInt16 nPos, sal_uInt16 nSpace, ImplPolygon* pInitPoly = NULL );
+ void ImplRemove( sal_uInt16 nPos, sal_uInt16 nCount );
};
// -------------------
// - ImplPolyPolygon -
// -------------------
-#define MAX_POLYGONS ((USHORT)0x3FF0)
+#define MAX_POLYGONS ((sal_uInt16)0x3FF0)
class Polygon;
typedef Polygon* SVPPOLYGON;
@@ -76,15 +76,15 @@ class ImplPolyPolygon
{
public:
SVPPOLYGON* mpPolyAry;
- ULONG mnRefCount;
- USHORT mnCount;
- USHORT mnSize;
- USHORT mnResize;
+ sal_uIntPtr mnRefCount;
+ sal_uInt16 mnCount;
+ sal_uInt16 mnSize;
+ sal_uInt16 mnResize;
- ImplPolyPolygon( USHORT nInitSize, USHORT nResize )
+ ImplPolyPolygon( sal_uInt16 nInitSize, sal_uInt16 nResize )
{ mpPolyAry = NULL; mnCount = 0; mnRefCount = 1;
mnSize = nInitSize; mnResize = nResize; }
- ImplPolyPolygon( USHORT nInitSize );
+ ImplPolyPolygon( sal_uInt16 nInitSize );
ImplPolyPolygon( const ImplPolyPolygon& rImplPolyPoly );
~ImplPolyPolygon();
};
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
diff --git a/tools/prj/build.lst b/tools/prj/build.lst
index 3194cbb4e87c..1e5c9135145f 100644
--- a/tools/prj/build.lst
+++ b/tools/prj/build.lst
@@ -1,3 +1,2 @@
tl tools : cppu external offuh vos ZLIB:zlib EXPAT:expat basegfx comphelper i18npool NULL
-tl tools usr1 - all tl_mkout NULL
tl tools\prj nmake - all tl_prj NULL
diff --git a/tools/prj/makefile.mk b/tools/prj/makefile.mk
index c73a3d944bbf..e312a7ccab65 100644
--- a/tools/prj/makefile.mk
+++ b/tools/prj/makefile.mk
@@ -37,4 +37,4 @@ VERBOSEFLAG := -s
.ENDIF
all:
- cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET)
+ cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog
diff --git a/tools/source/communi/geninfo.cxx b/tools/source/communi/geninfo.cxx
index 97326836de2d..01a325054a69 100644
--- a/tools/source/communi/geninfo.cxx
+++ b/tools/source/communi/geninfo.cxx
@@ -55,7 +55,7 @@ GenericInformation::GenericInformation( const ByteString &rKey,
/*****************************************************************************/
GenericInformation::GenericInformation( const GenericInformation& rInf,
- BOOL bCopySubs)
+ sal_Bool bCopySubs)
/*****************************************************************************/
: ByteString( rInf ),
sValue( rInf.sValue ),
@@ -80,15 +80,15 @@ GenericInformation::~GenericInformation()
}
/*****************************************************************************/
-BOOL GenericInformation::InsertSubInfo( GenericInformation *pInfo )
+sal_Bool GenericInformation::InsertSubInfo( GenericInformation *pInfo )
/*****************************************************************************/
{
return ( pInfoList && pInfoList->InsertInfo( pInfo ));
}
/*****************************************************************************/
-BOOL GenericInformation::InsertSubInfo( const ByteString &rPathKey, const ByteString &rValue,
- BOOL bSearchByPath, BOOL bNewPath )
+sal_Bool GenericInformation::InsertSubInfo( const ByteString &rPathKey, const ByteString &rValue,
+ sal_Bool bSearchByPath, sal_Bool bNewPath )
/*****************************************************************************/
{
return (pInfoList && pInfoList->InsertInfo( rPathKey, rValue, bSearchByPath, bNewPath ));
@@ -96,14 +96,14 @@ BOOL GenericInformation::InsertSubInfo( const ByteString &rPathKey, const ByteSt
/*****************************************************************************/
void GenericInformation::RemoveSubInfo( GenericInformation *pInfo,
- BOOL bDelete )
+ sal_Bool bDelete )
/*****************************************************************************/
{
pInfoList->RemoveInfo( pInfo, bDelete );
}
/*****************************************************************************/
-//void GenericInformation::RemoveSelf( BOOL bDelete )
+//void GenericInformation::RemoveSelf( sal_Bool bDelete )
/*****************************************************************************/
/*{
if ( pParent )
@@ -118,8 +118,8 @@ void GenericInformation::RemoveSubInfo( GenericInformation *pInfo,
/*****************************************************************************/
GenericInformation *GenericInformation::GetSubInfo( ByteString &rKey,
- BOOL bSearchByPath,
- BOOL bCreatePath )
+ sal_Bool bSearchByPath,
+ sal_Bool bCreatePath )
/*****************************************************************************/
{
if ( !pInfoList && bCreatePath )
@@ -147,7 +147,7 @@ GenericInformationList::GenericInformationList(const GenericInformationList& rLi
/*****************************************************************************/
: GenericInformationList_Impl()
{
- USHORT i;
+ sal_uInt16 i;
GenericInformation* pTemp,*pWork;
pOwner = pParent;
@@ -155,7 +155,7 @@ GenericInformationList::GenericInformationList(const GenericInformationList& rLi
for(i=0;i<rList.Count();i++)
{
pTemp = rList.GetObject(i);
- pWork = new GenericInformation(*pTemp,TRUE);
+ pWork = new GenericInformation(*pTemp,sal_True);
Insert(pWork,LIST_APPEND);
}
@@ -167,7 +167,7 @@ GenericInformationList::~GenericInformationList()
{
// delete all Informations stored in this List
// ### GH: Hier werden dann wohl etwa die H�lfte der Eintr�ge gel�scht
-/* for ( ULONG i = 0; i < Count(); i++ ) {
+/* for ( sal_uIntPtr i = 0; i < Count(); i++ ) {
GetObject( i )->ListDeleted();
delete GetObject( i );
Remove( i );*/
@@ -175,13 +175,13 @@ GenericInformationList::~GenericInformationList()
while ( Count() ) {
GetObject( 0 )->ListDeleted();
delete GetObject( 0 );
- Remove( (ULONG)0 );
+ Remove( (sal_uIntPtr)0 );
}
}
/*****************************************************************************/
-GenericInformation *GenericInformationList::Search( ULONG &rPos, ByteString sKey,
- ULONG nStart, ULONG nEnd )
+GenericInformation *GenericInformationList::Search( sal_uIntPtr &rPos, ByteString sKey,
+ sal_uIntPtr nStart, sal_uIntPtr nEnd )
/*****************************************************************************/
{
if ( Count() == 0 ) {
@@ -202,7 +202,7 @@ GenericInformation *GenericInformationList::Search( ULONG &rPos, ByteString sKey
}
// search binary in existing list
- ULONG nActPos = nStart + (( nEnd - nStart ) / 2 );
+ sal_uIntPtr nActPos = nStart + (( nEnd - nStart ) / 2 );
rPos = nActPos;
ByteString sCandidate = ByteString( *GetObject( nActPos ));
@@ -218,8 +218,8 @@ GenericInformation *GenericInformationList::Search( ULONG &rPos, ByteString sKey
/*****************************************************************************/
GenericInformation *GenericInformationList::GetInfo( ByteString &rKey,
- BOOL bSearchByPath,
- BOOL bCreatePath )
+ sal_Bool bSearchByPath,
+ sal_Bool bCreatePath )
/*****************************************************************************/
{
@@ -232,7 +232,7 @@ GenericInformation *GenericInformationList::GetInfo( ByteString &rKey,
else
sKey = rKey;
- ULONG nPos = 0;
+ sal_uIntPtr nPos = 0;
GenericInformation *pReturnInfo = Search( nPos, sKey, 0, Count() - 1 );
/* wenn kein Searchpath gesetzt und kein Returninfo vorhanden,
* gib NULL zurueck
@@ -241,7 +241,7 @@ GenericInformation *GenericInformationList::GetInfo( ByteString &rKey,
* wenn searchpath gesetzt kein returninfo vorhanden und newpath gesetzt,
* mache neues Verzeichniss
*/
- USHORT nTokenCount = rKey.GetTokenCount('/');
+ sal_uInt16 nTokenCount = rKey.GetTokenCount('/');
// search for next key of path in next level of tree
if ( bSearchByPath && (nTokenCount > 1)) {
ByteString sPath = ByteString(rKey.Copy( sKey.Len() + 1 ));
@@ -251,7 +251,7 @@ GenericInformation *GenericInformationList::GetInfo( ByteString &rKey,
pReturnInfo = new GenericInformation( sKey, "", this, NULL);
pReturnInfo->SetSubList( new GenericInformationList( pReturnInfo ));
}
- return pReturnInfo->GetSubInfo( sPath, TRUE, bCreatePath );
+ return pReturnInfo->GetSubInfo( sPath, sal_True, bCreatePath );
}
if ( !pReturnInfo && bCreatePath ) {
pReturnInfo = new GenericInformation ( sKey, "", this, NULL);
@@ -261,9 +261,9 @@ GenericInformation *GenericInformationList::GetInfo( ByteString &rKey,
}
/*****************************************************************************/
-ULONG GenericInformationList::InsertSorted( GenericInformation *pInfo,
- BOOL bOverwrite,
- ULONG nStart, ULONG nEnd )
+sal_uIntPtr GenericInformationList::InsertSorted( GenericInformation *pInfo,
+ sal_Bool bOverwrite,
+ sal_uIntPtr nStart, sal_uIntPtr nEnd )
/*****************************************************************************/
{
if ( Count() == 0 ) {
@@ -292,11 +292,11 @@ ULONG GenericInformationList::InsertSorted( GenericInformation *pInfo,
if ( sCandidate.ToUpperAscii() == sKey ) {
// key allready exists in list
if ( bOverwrite )
- Replace( pInfo, ULONG(0)); // ### Laut NF scheint hier ein Memory Leak zu sein
+ Replace( pInfo, sal_uIntPtr(0)); // ### Laut NF scheint hier ein Memory Leak zu sein
return 0;
}
else if ( sCandidate > sKey ) {
- Insert( pInfo, ULONG(0));
+ Insert( pInfo, sal_uIntPtr(0));
return 0;
}
else {
@@ -306,7 +306,7 @@ ULONG GenericInformationList::InsertSorted( GenericInformation *pInfo,
}
// ### GH: /ENDE/ dieser Block schein �berfl�ssig zu sein
- ULONG nActPos = nStart + (( nEnd - nStart ) / 2 );
+ sal_uIntPtr nActPos = nStart + (( nEnd - nStart ) / 2 );
ByteString sCandidate = ByteString( *GetObject( nActPos ));
if ( sCandidate.ToUpperAscii() == sKey ) {
@@ -348,21 +348,21 @@ ULONG GenericInformationList::InsertSorted( GenericInformation *pInfo,
}
/*****************************************************************************/
-BOOL GenericInformationList::InsertInfo( GenericInformation *pInfo,
- BOOL bOverwrite )
+sal_Bool GenericInformationList::InsertInfo( GenericInformation *pInfo,
+ sal_Bool bOverwrite )
/*****************************************************************************/
{
if ( !pInfo->Len())
- return FALSE;
+ return sal_False;
InsertSorted( pInfo, bOverwrite, 0, Count() - 1 );
- return TRUE;
+ return sal_True;
}
/*****************************************************************************/
-BOOL GenericInformationList::InsertInfo( const ByteString &rPathKey, const ByteString &rValue,
- BOOL bSearchByPath, BOOL bNewPath )
+sal_Bool GenericInformationList::InsertInfo( const ByteString &rPathKey, const ByteString &rValue,
+ sal_Bool bSearchByPath, sal_Bool bNewPath )
/*****************************************************************************/
{
GenericInformation *pInfo;
@@ -374,14 +374,14 @@ BOOL GenericInformationList::InsertInfo( const ByteString &rPathKey, const ByteS
if ( pInfo ) {
pInfo->SetValue( rValue );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*****************************************************************************/
void GenericInformationList::RemoveInfo( GenericInformation *pInfo,
- BOOL bDelete )
+ sal_Bool bDelete )
/*****************************************************************************/
{
Remove( pInfo );
diff --git a/tools/source/communi/parser.cxx b/tools/source/communi/parser.cxx
index 20c2bb3ba059..f3baa37049e2 100644
--- a/tools/source/communi/parser.cxx
+++ b/tools/source/communi/parser.cxx
@@ -44,9 +44,9 @@
#define cKeyLevelChar '\t'
/*****************************************************************************/
-InformationParser::InformationParser( BOOL bReplace )
+InformationParser::InformationParser( sal_Bool bReplace )
/*****************************************************************************/
- : bRecover( FALSE ),
+ : bRecover( sal_False ),
sOldLine( "" ),
bReplaceVariables( bReplace ),
nLevel( 0 ),
@@ -73,24 +73,24 @@ ByteString &InformationParser::ReadLine()
ByteString sLine;
if ( bRecover ) {
- bRecover = FALSE;
+ bRecover = sal_False;
}
else {
if ( !pActStream->IsEof()) {
pActStream->ReadLine( sLine );
xub_StrLen nStart = 0;
xub_StrLen nEnd = sLine.Len();
- BOOL bCopy = FALSE;
+ sal_Bool bCopy = sal_False;
while ( nStart < nEnd && ( sLine.GetChar( nStart ) == ' ' || sLine.GetChar( nStart ) == 0x09 ) )
{
nStart++;
- bCopy = TRUE;
+ bCopy = sal_True;
}
while ( nStart < nEnd && ( sLine.GetChar( nEnd-1 ) == ' ' || sLine.GetChar( nEnd-1 ) == 0x09 ) )
{
nEnd--;
- bCopy = TRUE;
+ bCopy = sal_True;
}
if ( bCopy )
@@ -164,7 +164,7 @@ GenericInformation *InformationParser::ReadKey(
sCurrentComment = "";
// key separated from value by tab?
- USHORT nWSPos = sLine.Search( ' ' );
+ sal_uInt16 nWSPos = sLine.Search( ' ' );
if ( sLine.Search( '\t' ) < nWSPos ) {
nWSPos = sLine.Search( '\t' );
sLine.SearchAndReplace( "\t", " " );
@@ -213,17 +213,17 @@ GenericInformation *InformationParser::ReadKey(
void InformationParser::Recover()
/*****************************************************************************/
{
- bRecover = TRUE;
+ bRecover = sal_True;
}
/*****************************************************************************/
-BOOL InformationParser::Save( SvStream &rOutStream,
+sal_Bool InformationParser::Save( SvStream &rOutStream,
const GenericInformationList *pSaveList,
- USHORT level, BOOL bStripped )
+ sal_uInt16 level, sal_Bool bStripped )
/*****************************************************************************/
{
- USHORT i;
- ULONG nInfoListCount;
+ sal_uInt16 i;
+ sal_uIntPtr nInfoListCount;
ByteString sTmpStr;
GenericInformation *pGenericInfo;
GenericInformationList *pGenericInfoList;
@@ -250,7 +250,7 @@ BOOL InformationParser::Save( SvStream &rOutStream,
sTmpStr += ' ';
sTmpStr += pGenericInfo->GetValue();
if ( !rOutStream.WriteLine( sTmpStr ) )
- return FALSE;
+ return sal_False;
// wenn vorhanden, bearbeite recursive die Sublisten
if (( pGenericInfoList = pGenericInfo->GetSubList() ) != NULL ) {
@@ -260,20 +260,20 @@ BOOL InformationParser::Save( SvStream &rOutStream,
sTmpStr.Append( aKeyLevel.GetBuffer(), level );
sTmpStr += '{';
if ( !rOutStream.WriteLine( sTmpStr ) )
- return FALSE;
+ return sal_False;
// recursiv die sublist abarbeiten
if ( !Save( rOutStream, pGenericInfoList, level+1, bStripped ) )
- return FALSE;
+ return sal_False;
// schliessende Klammer
sTmpStr = "";
if ( !bStripped && level )
sTmpStr.Append( aKeyLevel.GetBuffer(), level );
sTmpStr += '}';
if ( !rOutStream.WriteLine( sTmpStr ) )
- return FALSE;
+ return sal_False;
}
}
- return TRUE;
+ return sal_True;
}
/*****************************************************************************/
@@ -373,7 +373,7 @@ GenericInformationList *InformationParser::Execute( Dir &rDir,
else
pList = new GenericInformationList();
- for ( USHORT i = 0; i < rDir.Count(); i++ ) {
+ for ( sal_uInt16 i = 0; i < rDir.Count(); i++ ) {
// execute this dir
UniString sNextFile( rDir[i].GetFull());
@@ -397,33 +397,33 @@ GenericInformationList *InformationParser::Execute( Dir &rDir,
}
/*****************************************************************************/
-BOOL InformationParser::Save( SvFileStream &rSourceStream,
+sal_Bool InformationParser::Save( SvFileStream &rSourceStream,
const GenericInformationList *pSaveList )
/*****************************************************************************/
{
- if ( !rSourceStream.IsOpen() || !Save( (SvStream &)rSourceStream, pSaveList, 0, FALSE ))
+ if ( !rSourceStream.IsOpen() || !Save( (SvStream &)rSourceStream, pSaveList, 0, sal_False ))
{
printf( "ERROR saving file \"%s\"\n",ByteString( rSourceStream.GetFileName(), gsl_getSystemTextEncoding()).GetBuffer() );
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
/*****************************************************************************/
-BOOL InformationParser::Save( SvMemoryStream &rSourceStream,
+sal_Bool InformationParser::Save( SvMemoryStream &rSourceStream,
const GenericInformationList *pSaveList )
/*****************************************************************************/
{
Time a;
- BOOL bRet = Save( (SvStream &)rSourceStream, pSaveList, 0, TRUE );
+ sal_Bool bRet = Save( (SvStream &)rSourceStream, pSaveList, 0, sal_True );
Time b;
b = b - a;
return bRet;
}
/*****************************************************************************/
-BOOL InformationParser::Save( const UniString &rSourceFile,
+sal_Bool InformationParser::Save( const UniString &rSourceFile,
const GenericInformationList *pSaveList )
/*****************************************************************************/
{
@@ -431,14 +431,14 @@ BOOL InformationParser::Save( const UniString &rSourceFile,
if ( !Save( *pOutFile, pSaveList )) {
delete pOutFile;
- return FALSE;
+ return sal_False;
}
delete pOutFile;
- return TRUE;
+ return sal_True;
}
/*****************************************************************************/
-USHORT InformationParser::GetErrorCode()
+sal_uInt16 InformationParser::GetErrorCode()
/*****************************************************************************/
{
return nErrorCode;
diff --git a/tools/source/datetime/datetime.cxx b/tools/source/datetime/datetime.cxx
index 8b679478c535..ffdbd25789ac 100644
--- a/tools/source/datetime/datetime.cxx
+++ b/tools/source/datetime/datetime.cxx
@@ -41,13 +41,13 @@
|*
*************************************************************************/
-BOOL DateTime::IsBetween( const DateTime& rFrom,
+sal_Bool DateTime::IsBetween( const DateTime& rFrom,
const DateTime& rTo ) const
{
if ( (*this >= rFrom) && (*this <= rTo) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -60,13 +60,13 @@ BOOL DateTime::IsBetween( const DateTime& rFrom,
|*
*************************************************************************/
-BOOL DateTime::operator >( const DateTime& rDateTime ) const
+sal_Bool DateTime::operator >( const DateTime& rDateTime ) const
{
if ( (Date::operator>( rDateTime )) ||
(Date::operator==( rDateTime ) && Time::operator>( rDateTime )) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -79,13 +79,13 @@ BOOL DateTime::operator >( const DateTime& rDateTime ) const
|*
*************************************************************************/
-BOOL DateTime::operator <( const DateTime& rDateTime ) const
+sal_Bool DateTime::operator <( const DateTime& rDateTime ) const
{
if ( (Date::operator<( rDateTime )) ||
(Date::operator==( rDateTime ) && Time::operator<( rDateTime )) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -98,13 +98,13 @@ BOOL DateTime::operator <( const DateTime& rDateTime ) const
|*
*************************************************************************/
-BOOL DateTime::operator >=( const DateTime& rDateTime ) const
+sal_Bool DateTime::operator >=( const DateTime& rDateTime ) const
{
if ( (Date::operator>( rDateTime )) ||
(Date::operator==( rDateTime ) && Time::operator>=( rDateTime )) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -117,13 +117,13 @@ BOOL DateTime::operator >=( const DateTime& rDateTime ) const
|*
*************************************************************************/
-BOOL DateTime::operator <=( const DateTime& rDateTime ) const
+sal_Bool DateTime::operator <=( const DateTime& rDateTime ) const
{
if ( (Date::operator<( rDateTime )) ||
(Date::operator==( rDateTime ) && Time::operator<=( rDateTime )) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -161,14 +161,14 @@ long DateTime::GetSecFromDateTime( const Date& rDate ) const
|*
*************************************************************************/
-void DateTime::MakeDateTimeFromSec( const Date& rDate, ULONG nSec )
+void DateTime::MakeDateTimeFromSec( const Date& rDate, sal_uIntPtr nSec )
{
long nDays = nSec / (24UL*60*60);
((Date*)this)->operator=( rDate );
nSec -= nDays * (24UL*60*60);
- USHORT nMin = (USHORT)(nSec / 60);
+ sal_uInt16 nMin = (sal_uInt16)(nSec / 60);
nSec -= nMin * 60;
- ((Time*)this)->operator=( Time( 0, nMin, (USHORT)nSec ) );
+ ((Time*)this)->operator=( Time( 0, nMin, (sal_uInt16)nSec ) );
operator+=( nDays );
}
@@ -186,7 +186,7 @@ DateTime& DateTime::operator +=( const Time& rTime )
{
Time aTime = *this;
aTime += rTime;
- USHORT nHours = aTime.GetHour();
+ sal_uInt16 nHours = aTime.GetHour();
if ( aTime.GetTime() > 0 )
{
while ( nHours >= 24 )
@@ -225,7 +225,7 @@ DateTime& DateTime::operator -=( const Time& rTime )
{
Time aTime = *this;
aTime -= rTime;
- USHORT nHours = aTime.GetHour();
+ sal_uInt16 nHours = aTime.GetHour();
if ( aTime.GetTime() > 0 )
{
while ( nHours >= 24 )
@@ -421,22 +421,22 @@ DateTime DateTime::CreateFromWin32FileDateTime( const sal_uInt32 & rLower, const
( nDays / ( 400 * 365 ) ) ) / 365;
nDays -= nYears * 365 + nYears / 4 - nYears / 100 + nYears / 400;
- USHORT nMonths = 0;
+ sal_uInt16 nMonths = 0;
for( sal_Int64 nDaysCount = nDays; nDaysCount >= 0; )
{
nDays = nDaysCount;
nMonths ++;
nDaysCount -= Date(
- 1, nMonths, sal::static_int_cast< USHORT >(1601 + nYears) ).
+ 1, nMonths, sal::static_int_cast< sal_uInt16 >(1601 + nYears) ).
GetDaysInMonth();
}
Date _aDate(
- (USHORT)( nDays + 1 ), nMonths,
- sal::static_int_cast< USHORT >(nYears + 1601) );
- Time _aTime( ULONG( ( aTime / ( a100nPerSecond * 60 * 60 ) ) % sal_Int64( 24 ) ),
- ULONG( ( aTime / ( a100nPerSecond * 60 ) ) % sal_Int64( 60 ) ),
- ULONG( ( aTime / ( a100nPerSecond ) ) % sal_Int64( 60 ) ) );
+ (sal_uInt16)( nDays + 1 ), nMonths,
+ sal::static_int_cast< sal_uInt16 >(nYears + 1601) );
+ Time _aTime( sal_uIntPtr( ( aTime / ( a100nPerSecond * 60 * 60 ) ) % sal_Int64( 24 ) ),
+ sal_uIntPtr( ( aTime / ( a100nPerSecond * 60 ) ) % sal_Int64( 60 ) ),
+ sal_uIntPtr( ( aTime / ( a100nPerSecond ) ) % sal_Int64( 60 ) ) );
return DateTime( _aDate, _aTime );
}
diff --git a/tools/source/datetime/tdate.cxx b/tools/source/datetime/tdate.cxx
index e6bb4345d9f9..2a3c36daf9ed 100644
--- a/tools/source/datetime/tdate.cxx
+++ b/tools/source/datetime/tdate.cxx
@@ -53,14 +53,14 @@ struct tm *localtime_r(const time_t *timep, struct tm *buffer);
// =======================================================================
-static USHORT aDaysInMonth[12] = { 31, 28, 31, 30, 31, 30,
+static sal_uInt16 aDaysInMonth[12] = { 31, 28, 31, 30, 31, 30,
31, 31, 30, 31, 30, 31 };
#define MAX_DAYS 3636532
// =======================================================================
-inline BOOL ImpIsLeapYear( USHORT nYear )
+inline sal_Bool ImpIsLeapYear( sal_uInt16 nYear )
{
return (
( ((nYear % 4) == 0) && ((nYear % 100) != 0) ) ||
@@ -70,7 +70,7 @@ inline BOOL ImpIsLeapYear( USHORT nYear )
// -----------------------------------------------------------------------
-inline USHORT DaysInMonth( USHORT nMonth, USHORT nYear )
+inline sal_uInt16 DaysInMonth( sal_uInt16 nMonth, sal_uInt16 nYear )
{
if ( nMonth != 2 )
return aDaysInMonth[nMonth-1];
@@ -85,13 +85,13 @@ inline USHORT DaysInMonth( USHORT nMonth, USHORT nYear )
// -----------------------------------------------------------------------
-long Date::DateToDays( USHORT nDay, USHORT nMonth, USHORT nYear )
+long Date::DateToDays( sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear )
{
long nDays;
- nDays = ((ULONG)nYear-1) * 365;
+ nDays = ((sal_uIntPtr)nYear-1) * 365;
nDays += ((nYear-1) / 4) - ((nYear-1) / 100) + ((nYear-1) / 400);
- for( USHORT i = 1; i < nMonth; i++ )
+ for( sal_uInt16 i = 1; i < nMonth; i++ )
nDays += DaysInMonth(i,nYear);
nDays += nDay;
return nDays;
@@ -100,23 +100,23 @@ long Date::DateToDays( USHORT nDay, USHORT nMonth, USHORT nYear )
// -----------------------------------------------------------------------
static void DaysToDate( long nDays,
- USHORT& rDay, USHORT& rMonth, USHORT& rYear )
+ sal_uInt16& rDay, sal_uInt16& rMonth, sal_uInt16& rYear )
{
long nTempDays;
long i = 0;
- BOOL bCalc;
+ sal_Bool bCalc;
do
{
nTempDays = (long)nDays;
- rYear = (USHORT)((nTempDays / 365) - i);
- nTempDays -= ((ULONG)rYear-1) * 365;
+ rYear = (sal_uInt16)((nTempDays / 365) - i);
+ nTempDays -= ((sal_uIntPtr)rYear-1) * 365;
nTempDays -= ((rYear-1) / 4) - ((rYear-1) / 100) + ((rYear-1) / 400);
- bCalc = FALSE;
+ bCalc = sal_False;
if ( nTempDays < 1 )
{
i++;
- bCalc = TRUE;
+ bCalc = sal_True;
}
else
{
@@ -125,7 +125,7 @@ static void DaysToDate( long nDays,
if ( (nTempDays != 366) || !ImpIsLeapYear( rYear ) )
{
i--;
- bCalc = TRUE;
+ bCalc = sal_True;
}
}
}
@@ -133,12 +133,12 @@ static void DaysToDate( long nDays,
while ( bCalc );
rMonth = 1;
- while ( (ULONG)nTempDays > DaysInMonth( rMonth, rYear ) )
+ while ( (sal_uIntPtr)nTempDays > DaysInMonth( rMonth, rYear ) )
{
nTempDays -= DaysInMonth( rMonth, rYear );
rMonth++;
}
- rDay = (USHORT)nTempDays;
+ rDay = (sal_uInt16)nTempDays;
}
// =======================================================================
@@ -150,17 +150,17 @@ Date::Date()
DosGetDateTime( &aDateTime );
// Datum zusammenbauen
- nDate = ((ULONG)aDateTime.day) +
- (((ULONG)aDateTime.month)*100) +
- (((ULONG)aDateTime.year)*10000);
+ nDate = ((sal_uIntPtr)aDateTime.day) +
+ (((sal_uIntPtr)aDateTime.month)*100) +
+ (((sal_uIntPtr)aDateTime.year)*10000);
#elif defined WNT
SYSTEMTIME aDateTime;
GetLocalTime( &aDateTime );
// Datum zusammenbauen
- nDate = ((ULONG)aDateTime.wDay) +
- (((ULONG)aDateTime.wMonth)*100) +
- (((ULONG)aDateTime.wYear)*10000);
+ nDate = ((sal_uIntPtr)aDateTime.wDay) +
+ (((sal_uIntPtr)aDateTime.wMonth)*100) +
+ (((sal_uIntPtr)aDateTime.wYear)*10000);
#else
time_t nTmpTime;
struct tm aTime;
@@ -171,65 +171,65 @@ Date::Date()
// Datum zusammenbauen
if ( localtime_r( &nTmpTime, &aTime ) )
{
- nDate = ((ULONG)aTime.tm_mday) +
- (((ULONG)(aTime.tm_mon+1))*100) +
- (((ULONG)(aTime.tm_year+1900))*10000);
+ nDate = ((sal_uIntPtr)aTime.tm_mday) +
+ (((sal_uIntPtr)(aTime.tm_mon+1))*100) +
+ (((sal_uIntPtr)(aTime.tm_year+1900))*10000);
}
else
- nDate = 1 + 100 + (((ULONG)1900)*10000);
+ nDate = 1 + 100 + (((sal_uIntPtr)1900)*10000);
#endif
}
// -----------------------------------------------------------------------
-void Date::SetDay( USHORT nNewDay )
+void Date::SetDay( sal_uInt16 nNewDay )
{
- ULONG nMonth = GetMonth();
- ULONG nYear = GetYear();
+ sal_uIntPtr nMonth = GetMonth();
+ sal_uIntPtr nYear = GetYear();
- nDate = ((ULONG)(nNewDay%100)) + (nMonth*100) + (nYear*10000);
+ nDate = ((sal_uIntPtr)(nNewDay%100)) + (nMonth*100) + (nYear*10000);
}
// -----------------------------------------------------------------------
-void Date::SetMonth( USHORT nNewMonth )
+void Date::SetMonth( sal_uInt16 nNewMonth )
{
- ULONG nDay = GetDay();
- ULONG nYear = GetYear();
+ sal_uIntPtr nDay = GetDay();
+ sal_uIntPtr nYear = GetYear();
- nDate = nDay + (((ULONG)(nNewMonth%100))*100) + (nYear*10000);
+ nDate = nDay + (((sal_uIntPtr)(nNewMonth%100))*100) + (nYear*10000);
}
// -----------------------------------------------------------------------
-void Date::SetYear( USHORT nNewYear )
+void Date::SetYear( sal_uInt16 nNewYear )
{
- ULONG nDay = GetDay();
- ULONG nMonth = GetMonth();
+ sal_uIntPtr nDay = GetDay();
+ sal_uIntPtr nMonth = GetMonth();
- nDate = nDay + (nMonth*100) + (((ULONG)(nNewYear%10000))*10000);
+ nDate = nDay + (nMonth*100) + (((sal_uIntPtr)(nNewYear%10000))*10000);
}
// -----------------------------------------------------------------------
DayOfWeek Date::GetDayOfWeek() const
{
- return (DayOfWeek)((ULONG)(DateToDays( GetDay(), GetMonth(), GetYear() )-1) % 7);
+ return (DayOfWeek)((sal_uIntPtr)(DateToDays( GetDay(), GetMonth(), GetYear() )-1) % 7);
}
// -----------------------------------------------------------------------
-USHORT Date::GetDayOfYear() const
+sal_uInt16 Date::GetDayOfYear() const
{
- USHORT nDay = GetDay();
- for( USHORT i = 1; i < GetMonth(); i++ )
+ sal_uInt16 nDay = GetDay();
+ for( sal_uInt16 i = 1; i < GetMonth(); i++ )
nDay = nDay + ::DaysInMonth( i, GetYear() ); // += yields a warning on MSVC, so don't use it
return nDay;
}
// -----------------------------------------------------------------------
-USHORT Date::GetWeekOfYear( DayOfWeek eStartDay,
+sal_uInt16 Date::GetWeekOfYear( DayOfWeek eStartDay,
sal_Int16 nMinimumNumberOfDaysInWeek ) const
{
short nWeek;
@@ -307,76 +307,76 @@ USHORT Date::GetWeekOfYear( DayOfWeek eStartDay,
// == noch gleiche Woche
long nTempDays = DateToDays( GetDay(), GetMonth(), GetYear() );
nTempDays += 6 - (GetDayOfWeek()+(7-(short)eStartDay)) % 7;
- USHORT nDay;
- USHORT nMonth;
- USHORT nYear;
+ sal_uInt16 nDay;
+ sal_uInt16 nMonth;
+ sal_uInt16 nYear;
DaysToDate( nTempDays, nDay, nMonth, nYear );
nWeek = Date( nDay, nMonth, nYear ).GetWeekOfYear( eStartDay, nMinimumNumberOfDaysInWeek );
}
}
}
- return (USHORT)nWeek;
+ return (sal_uInt16)nWeek;
}
// -----------------------------------------------------------------------
-USHORT Date::GetDaysInMonth() const
+sal_uInt16 Date::GetDaysInMonth() const
{
return DaysInMonth( GetMonth(), GetYear() );
}
// -----------------------------------------------------------------------
-BOOL Date::IsLeapYear() const
+sal_Bool Date::IsLeapYear() const
{
- USHORT nYear = GetYear();
+ sal_uInt16 nYear = GetYear();
return ImpIsLeapYear( nYear );
}
// -----------------------------------------------------------------------
-BOOL Date::IsValid() const
+sal_Bool Date::IsValid() const
{
- USHORT nDay = GetDay();
- USHORT nMonth = GetMonth();
- USHORT nYear = GetYear();
+ sal_uInt16 nDay = GetDay();
+ sal_uInt16 nMonth = GetMonth();
+ sal_uInt16 nYear = GetYear();
if ( !nMonth || (nMonth > 12) )
- return FALSE;
+ return sal_False;
if ( !nDay || (nDay > DaysInMonth( nMonth, nYear )) )
- return FALSE;
+ return sal_False;
else if ( nYear <= 1582 )
{
if ( nYear < 1582 )
- return FALSE;
+ return sal_False;
else if ( nMonth < 10 )
- return FALSE;
+ return sal_False;
else if ( (nMonth == 10) && (nDay < 15) )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
Date& Date::operator +=( long nDays )
{
- USHORT nDay;
- USHORT nMonth;
- USHORT nYear;
+ sal_uInt16 nDay;
+ sal_uInt16 nMonth;
+ sal_uInt16 nYear;
long nTempDays = DateToDays( GetDay(), GetMonth(), GetYear() );
nTempDays += nDays;
if ( nTempDays > MAX_DAYS )
- nDate = 31 + (12*100) + (((ULONG)9999)*10000);
+ nDate = 31 + (12*100) + (((sal_uIntPtr)9999)*10000);
else if ( nTempDays <= 0 )
nDate = 1 + 100;
else
{
DaysToDate( nTempDays, nDay, nMonth, nYear );
- nDate = ((ULONG)nDay) + (((ULONG)nMonth)*100) + (((ULONG)nYear)*10000);
+ nDate = ((sal_uIntPtr)nDay) + (((sal_uIntPtr)nMonth)*100) + (((sal_uIntPtr)nYear)*10000);
}
return *this;
@@ -386,20 +386,20 @@ Date& Date::operator +=( long nDays )
Date& Date::operator -=( long nDays )
{
- USHORT nDay;
- USHORT nMonth;
- USHORT nYear;
+ sal_uInt16 nDay;
+ sal_uInt16 nMonth;
+ sal_uInt16 nYear;
long nTempDays = DateToDays( GetDay(), GetMonth(), GetYear() );
nTempDays -= nDays;
if ( nTempDays > MAX_DAYS )
- nDate = 31 + (12*100) + (((ULONG)9999)*10000);
+ nDate = 31 + (12*100) + (((sal_uIntPtr)9999)*10000);
else if ( nTempDays <= 0 )
nDate = 1 + 100;
else
{
DaysToDate( nTempDays, nDay, nMonth, nYear );
- nDate = ((ULONG)nDay) + (((ULONG)nMonth)*100) + (((ULONG)nYear)*10000);
+ nDate = ((sal_uIntPtr)nDay) + (((sal_uIntPtr)nMonth)*100) + (((sal_uIntPtr)nYear)*10000);
}
return *this;
@@ -409,16 +409,16 @@ Date& Date::operator -=( long nDays )
Date& Date::operator ++()
{
- USHORT nDay;
- USHORT nMonth;
- USHORT nYear;
+ sal_uInt16 nDay;
+ sal_uInt16 nMonth;
+ sal_uInt16 nYear;
long nTempDays = DateToDays( GetDay(), GetMonth(), GetYear() );
if ( nTempDays < MAX_DAYS )
{
nTempDays++;
DaysToDate( nTempDays, nDay, nMonth, nYear );
- nDate = ((ULONG)nDay) + (((ULONG)nMonth)*100) + (((ULONG)nYear)*10000);
+ nDate = ((sal_uIntPtr)nDay) + (((sal_uIntPtr)nMonth)*100) + (((sal_uIntPtr)nYear)*10000);
}
return *this;
@@ -428,16 +428,16 @@ Date& Date::operator ++()
Date& Date::operator --()
{
- USHORT nDay;
- USHORT nMonth;
- USHORT nYear;
+ sal_uInt16 nDay;
+ sal_uInt16 nMonth;
+ sal_uInt16 nYear;
long nTempDays = DateToDays( GetDay(), GetMonth(), GetYear() );
if ( nTempDays > 1 )
{
nTempDays--;
DaysToDate( nTempDays, nDay, nMonth, nYear );
- nDate = ((ULONG)nDay) + (((ULONG)nMonth)*100) + (((ULONG)nYear)*10000);
+ nDate = ((sal_uIntPtr)nDay) + (((sal_uIntPtr)nMonth)*100) + (((sal_uIntPtr)nYear)*10000);
}
return *this;
}
@@ -486,9 +486,9 @@ Date operator -( const Date& rDate, long nDays )
long operator -( const Date& rDate1, const Date& rDate2 )
{
- ULONG nTempDays1 = Date::DateToDays( rDate1.GetDay(), rDate1.GetMonth(),
+ sal_uIntPtr nTempDays1 = Date::DateToDays( rDate1.GetDay(), rDate1.GetMonth(),
rDate1.GetYear() );
- ULONG nTempDays2 = Date::DateToDays( rDate2.GetDay(), rDate2.GetMonth(),
+ sal_uIntPtr nTempDays2 = Date::DateToDays( rDate2.GetDay(), rDate2.GetMonth(),
rDate2.GetYear() );
return nTempDays1 - nTempDays2;
}
diff --git a/tools/source/datetime/ttime.cxx b/tools/source/datetime/ttime.cxx
index 9483cc10065e..fee1c159df44 100644
--- a/tools/source/datetime/ttime.cxx
+++ b/tools/source/datetime/ttime.cxx
@@ -145,7 +145,7 @@ Time::Time( const Time& rTime )
// -----------------------------------------------------------------------
-Time::Time( ULONG nHour, ULONG nMin, ULONG nSec, ULONG n100Sec )
+Time::Time( sal_uIntPtr nHour, sal_uIntPtr nMin, sal_uIntPtr nSec, sal_uIntPtr n100Sec )
{
// Zeit normalisieren
nSec += n100Sec / 100;
@@ -161,7 +161,7 @@ Time::Time( ULONG nHour, ULONG nMin, ULONG nSec, ULONG n100Sec )
// -----------------------------------------------------------------------
-void Time::SetHour( USHORT nNewHour )
+void Time::SetHour( sal_uInt16 nNewHour )
{
short nSign = (nTime >= 0) ? +1 : -1;
sal_Int32 nMin = GetMin();
@@ -174,7 +174,7 @@ void Time::SetHour( USHORT nNewHour )
// -----------------------------------------------------------------------
-void Time::SetMin( USHORT nNewMin )
+void Time::SetMin( sal_uInt16 nNewMin )
{
short nSign = (nTime >= 0) ? +1 : -1;
sal_Int32 nHour = GetHour();
@@ -190,7 +190,7 @@ void Time::SetMin( USHORT nNewMin )
// -----------------------------------------------------------------------
-void Time::SetSec( USHORT nNewSec )
+void Time::SetSec( sal_uInt16 nNewSec )
{
short nSign = (nTime >= 0) ? +1 : -1;
sal_Int32 nHour = GetHour();
@@ -206,7 +206,7 @@ void Time::SetSec( USHORT nNewSec )
// -----------------------------------------------------------------------
-void Time::Set100Sec( USHORT nNew100Sec )
+void Time::Set100Sec( sal_uInt16 nNew100Sec )
{
short nSign = (nTime >= 0) ? +1 : -1;
sal_Int32 nHour = GetHour();
@@ -307,7 +307,7 @@ Time operator -( const Time& rTime1, const Time& rTime2 )
// -----------------------------------------------------------------------
-BOOL Time::IsEqualIgnore100Sec( const Time& rTime ) const
+sal_Bool Time::IsEqualIgnore100Sec( const Time& rTime ) const
{
sal_Int32 n1 = (nTime < 0 ? -Get100Sec() : Get100Sec() );
sal_Int32 n2 = (rTime.nTime < 0 ? -rTime.Get100Sec() : rTime.Get100Sec() );
@@ -327,7 +327,7 @@ Time Time::GetUTCOffset()
if ( aDateTime.timezone != -1 )
{
short nTempTime = (short)Abs( aDateTime.timezone );
- Time aTime( 0, (USHORT)nTempTime );
+ Time aTime( 0, (sal_uInt16)nTempTime );
if ( aDateTime.timezone > 0 )
aTime = -aTime;
return aTime;
@@ -343,14 +343,14 @@ Time Time::GetUTCOffset()
nTempTime += aTimeZone.StandardBias;
else if ( nTimeZoneRet == TIME_ZONE_ID_DAYLIGHT )
nTempTime += aTimeZone.DaylightBias;
- Time aTime( 0, (USHORT)Abs( nTempTime ) );
+ Time aTime( 0, (sal_uInt16)Abs( nTempTime ) );
if ( nTempTime > 0 )
aTime = -aTime;
return aTime;
#else
- static ULONG nCacheTicks = 0;
+ static sal_uIntPtr nCacheTicks = 0;
static sal_Int32 nCacheSecOffset = -1;
- ULONG nTicks = Time::GetSystemTicks();
+ sal_uIntPtr nTicks = Time::GetSystemTicks();
time_t nTime;
tm aTM;
sal_Int32 nLocalTime;
@@ -382,7 +382,7 @@ Time Time::GetUTCOffset()
}
nTempTime = (short)Abs( nCacheSecOffset );
- Time aTime( 0, (USHORT)nTempTime );
+ Time aTime( 0, (sal_uInt16)nTempTime );
if ( nCacheSecOffset < 0 )
aTime = -aTime;
return aTime;
@@ -392,14 +392,14 @@ Time Time::GetUTCOffset()
// -----------------------------------------------------------------------
-ULONG Time::GetSystemTicks()
+sal_uIntPtr Time::GetSystemTicks()
{
#if defined WNT
- return (ULONG)GetTickCount();
+ return (sal_uIntPtr)GetTickCount();
#elif defined( OS2 )
- ULONG nClock;
+ sal_uIntPtr nClock;
DosQuerySysInfo( QSV_MS_COUNT, QSV_MS_COUNT, &nClock, sizeof( nClock ) );
- return (ULONG)nClock;
+ return (sal_uIntPtr)nClock;
#else
timeval tv;
gettimeofday (&tv, 0);
@@ -409,37 +409,37 @@ ULONG Time::GetSystemTicks()
fTicks += ((tv.tv_usec + 500) / 1000);
fTicks = fmod (fTicks, double(ULONG_MAX));
- return ULONG(fTicks);
+ return sal_uIntPtr(fTicks);
#endif
}
// -----------------------------------------------------------------------
-ULONG Time::GetProcessTicks()
+sal_uIntPtr Time::GetProcessTicks()
{
#if defined WNT
- return (ULONG)GetTickCount();
+ return (sal_uIntPtr)GetTickCount();
#elif defined( OS2 )
- ULONG nClock;
+ sal_uIntPtr nClock;
DosQuerySysInfo( QSV_MS_COUNT, QSV_MS_COUNT, &nClock, sizeof( nClock ) );
- return (ULONG)nClock;
+ return (sal_uIntPtr)nClock;
#else
- static ULONG nImplTicksPerSecond = 0;
+ static sal_uIntPtr nImplTicksPerSecond = 0;
static double dImplTicksPerSecond;
static double dImplTicksULONGMAX;
- ULONG nTicks = (ULONG)clock();
+ sal_uIntPtr nTicks = (sal_uIntPtr)clock();
if ( !nImplTicksPerSecond )
{
nImplTicksPerSecond = CLOCKS_PER_SEC;
dImplTicksPerSecond = nImplTicksPerSecond;
- dImplTicksULONGMAX = (double)(ULONG)ULONG_MAX;
+ dImplTicksULONGMAX = (double)(sal_uIntPtr)ULONG_MAX;
}
double fTicks = nTicks;
fTicks *= 1000;
fTicks /= dImplTicksPerSecond;
fTicks = fmod (fTicks, dImplTicksULONGMAX);
- return (ULONG)fTicks;
+ return (sal_uIntPtr)fTicks;
#endif
}
diff --git a/tools/source/debug/debug.cxx b/tools/source/debug/debug.cxx
index e17457c60525..fd6f499b4036 100644
--- a/tools/source/debug/debug.cxx
+++ b/tools/source/debug/debug.cxx
@@ -94,7 +94,7 @@ static sal_Char const DbgTrace_LeaveMeth[] = "Leave method from class ";
struct PBlock
{
void* aData[PBLOCKCOUNT];
- USHORT nCount;
+ sal_uInt16 nCount;
PBlock* pPrev;
PBlock* pNext;
};
@@ -104,18 +104,18 @@ class PointerList
private:
PBlock* pFirst;
PBlock* pLast;
- ULONG nCount;
+ sal_uIntPtr nCount;
public:
PointerList() { pFirst = NULL; pLast = NULL; nCount = 0; }
~PointerList();
void Add( const void* p );
- BOOL Remove( const void* p );
+ sal_Bool Remove( const void* p );
- const void* Get( ULONG nPos ) const;
- BOOL IsIn( const void* p ) const;
- ULONG Count() const { return nCount; }
+ const void* Get( sal_uIntPtr nPos ) const;
+ sal_Bool IsIn( const void* p ) const;
+ sal_uIntPtr Count() const { return nCount; }
};
// --- Datentypen ---
@@ -124,31 +124,31 @@ public:
struct ProfType
{
- ULONG nCount;
- ULONG nTime;
- ULONG nMinTime;
- ULONG nMaxTime;
- ULONG nStart;
- ULONG nContinueTime;
- ULONG nContinueStart;
+ sal_uIntPtr nCount;
+ sal_uIntPtr nTime;
+ sal_uIntPtr nMinTime;
+ sal_uIntPtr nMaxTime;
+ sal_uIntPtr nStart;
+ sal_uIntPtr nContinueTime;
+ sal_uIntPtr nContinueStart;
sal_Char aName[DBG_MAXNAME+1];
};
struct XtorType
{
- ULONG nCtorCalls;
- ULONG nDtorCalls;
- ULONG nMaxCount;
- ULONG nStatics;
+ sal_uIntPtr nCtorCalls;
+ sal_uIntPtr nDtorCalls;
+ sal_uIntPtr nMaxCount;
+ sal_uIntPtr nStatics;
sal_Char aName[DBG_MAXNAME+1];
- BOOL bTest;
+ sal_Bool bTest;
PointerList aThisList;
};
struct DebugData
{
DbgData aDbgData;
- USHORT bInit;
+ sal_uInt16 bInit;
DbgPrintLine pDbgPrintMsgBox;
DbgPrintLine pDbgPrintWindow;
DbgPrintLine pDbgPrintTestTool;
@@ -162,8 +162,8 @@ struct DebugData
bool bOslIsHooked;
DebugData()
- :bInit( FALSE )
- ,pDbgPrintMsgBox( FALSE )
+ :bInit( sal_False )
+ ,pDbgPrintMsgBox( sal_False )
,pDbgPrintWindow( NULL )
,pDbgPrintTestTool( NULL )
,pProfList( NULL )
@@ -173,14 +173,14 @@ struct DebugData
,bOslIsHooked( false )
{
aDbgData.nTestFlags = DBG_TEST_RESOURCE | DBG_TEST_MEM_INIT;
- aDbgData.bOverwrite = TRUE;
+ aDbgData.bOverwrite = sal_True;
aDbgData.nTraceOut = DBG_OUT_NULL;
aDbgData.nWarningOut = DBG_OUT_NULL;
aDbgData.nErrorOut = DBG_OUT_MSGBOX;
aDbgData.bMemInit = 0x77;
aDbgData.bMemBound = 0x55;
aDbgData.bMemFree = 0x33;
- aDbgData.bHookOSLAssert = TRUE;
+ aDbgData.bHookOSLAssert = sal_True;
aDbgData.aDebugName[0] = 0;
aDbgData.aInclFilter[0] = 0;
aDbgData.aExclFilter[0] = 0;
@@ -201,7 +201,7 @@ static DebugData aDebugData;
static sal_Char aCurPath[260];
-static int bDbgImplInMain = FALSE;
+static int bDbgImplInMain = sal_False;
// =======================================================================
@@ -210,7 +210,7 @@ static CRITICAL_SECTION aImplCritDbgSection;
#elif defined( OS2 )
static HMTX hImplCritDbgSection = 0;
#endif
-static BOOL bImplCritDbgSectionInit = FALSE;
+static sal_Bool bImplCritDbgSectionInit = sal_False;
// -----------------------------------------------------------------------
@@ -219,9 +219,9 @@ void ImplDbgInitLock()
#if defined( WNT )
InitializeCriticalSection( &aImplCritDbgSection );
#elif defined( OS2 )
- DosCreateMutexSem( NULL, &hImplCritDbgSection, 0, FALSE );
+ DosCreateMutexSem( NULL, &hImplCritDbgSection, 0, sal_False );
#endif
- bImplCritDbgSectionInit = TRUE;
+ bImplCritDbgSectionInit = sal_True;
}
// -----------------------------------------------------------------------
@@ -233,7 +233,7 @@ void ImplDbgDeInitLock()
#elif defined( OS2 )
DosCloseMutexSem( hImplCritDbgSection );
#endif
- bImplCritDbgSectionInit = FALSE;
+ bImplCritDbgSectionInit = sal_False;
}
// -----------------------------------------------------------------------
@@ -279,7 +279,7 @@ void DbgImpMemoryInfo( sal_Char* pBuf );
// =======================================================================
-static BOOL ImplActivateDebugger( const sal_Char* pMsg )
+static sal_Bool ImplActivateDebugger( const sal_Char* pMsg )
{
#if defined( WNT )
static sal_Char aImplDbgOutBuf[DBG_BUF_MAXLEN];
@@ -287,16 +287,16 @@ static BOOL ImplActivateDebugger( const sal_Char* pMsg )
strcat( aImplDbgOutBuf, "\r\n" );
OutputDebugString( aImplDbgOutBuf );
DebugBreak();
- return TRUE;
+ return sal_True;
#else
(void) pMsg; // avoid warning about unused parameter
- return FALSE;
+ return sal_False;
#endif
}
// -----------------------------------------------------------------------
-static BOOL ImplCoreDump()
+static sal_Bool ImplCoreDump()
{
#if defined( WNT )
DebugBreak();
@@ -304,23 +304,23 @@ static BOOL ImplCoreDump()
long* pTemp = 0;
*pTemp = 0xCCCC;
#endif
- return TRUE;
+ return sal_True;
}
// =======================================================================
-static ULONG ImplGetPerfTime()
+static sal_uIntPtr ImplGetPerfTime()
{
#if defined( WNT )
- return (ULONG)GetTickCount();
+ return (sal_uIntPtr)GetTickCount();
#elif defined( OS2 )
- ULONG nClock;
+ sal_uIntPtr nClock;
DosQuerySysInfo( QSV_MS_COUNT, QSV_MS_COUNT, &nClock, sizeof( nClock ) );
- return (ULONG)nClock;
+ return (sal_uIntPtr)nClock;
#else
- static ULONG nImplTicksPerSecond = 0;
+ static sal_uIntPtr nImplTicksPerSecond = 0;
static double dImplTicksPerSecond;
- ULONG nTicks = (ULONG)clock();
+ sal_uIntPtr nTicks = (sal_uIntPtr)clock();
if ( !nImplTicksPerSecond )
{
@@ -331,7 +331,7 @@ static ULONG ImplGetPerfTime()
double fTicks = nTicks;
fTicks *= 1000;
fTicks /= dImplTicksPerSecond;
- return (ULONG)fTicks;
+ return (sal_uIntPtr)fTicks;
#endif
}
@@ -411,12 +411,12 @@ namespace
lcl_writeConfigString( _pFile, _pKeyName, _bValue ? "1" : "0" );
}
- void lcl_writeConfigFlag( FILETYPE _pFile, const sal_Char* _pKeyName, ULONG _nAllFlags, ULONG _nCheckFlag )
+ void lcl_writeConfigFlag( FILETYPE _pFile, const sal_Char* _pKeyName, sal_uIntPtr _nAllFlags, sal_uIntPtr _nCheckFlag )
{
lcl_writeConfigBoolean( _pFile, _pKeyName, ( _nAllFlags & _nCheckFlag ) != 0 );
}
- void lcl_writeConfigOutChannel( FILETYPE _pFile, const sal_Char* _pKeyName, ULONG _nValue )
+ void lcl_writeConfigOutChannel( FILETYPE _pFile, const sal_Char* _pKeyName, sal_uIntPtr _nValue )
{
const sal_Char* names[ DBG_OUT_COUNT ] =
{
@@ -424,7 +424,7 @@ namespace
};
lcl_writeConfigString( _pFile, _pKeyName, names[ _nValue ] );
}
- void lcl_writeHexByte( FILETYPE _pFile, const sal_Char* _pKeyName, BYTE _nValue )
+ void lcl_writeHexByte( FILETYPE _pFile, const sal_Char* _pKeyName, sal_uInt8 _nValue )
{
sal_Char buf[RTL_STR_MAX_VALUEOFINT32];
rtl_String* stringData = NULL;
@@ -464,14 +464,14 @@ namespace
_pValue[ ( _nValueLen > nValueLen ) ? nValueLen : _nValueLen - 1 ] = 0;
return strlen( _pValue );
}
- void lcl_tryReadConfigBoolean( const sal_Char* _pLine, size_t _nLineLen, const sal_Char* _pKeyName, ULONG* _out_pnValue )
+ void lcl_tryReadConfigBoolean( const sal_Char* _pLine, size_t _nLineLen, const sal_Char* _pKeyName, sal_uIntPtr* _out_pnValue )
{
sal_Char aBuf[2];
size_t nValueLen = lcl_tryReadConfigString( _pLine, _nLineLen, _pKeyName, aBuf, sizeof( aBuf ) );
if ( nValueLen )
- *_out_pnValue = strcmp( aBuf, "1" ) == 0 ? TRUE : FALSE;
+ *_out_pnValue = strcmp( aBuf, "1" ) == 0 ? sal_True : sal_False;
}
- void lcl_tryReadOutputChannel( const sal_Char* _pLine, size_t _nLineLen, const sal_Char* _pKeyName, ULONG* _out_pnValue )
+ void lcl_tryReadOutputChannel( const sal_Char* _pLine, size_t _nLineLen, const sal_Char* _pKeyName, sal_uIntPtr* _out_pnValue )
{
const sal_Char* names[ DBG_OUT_COUNT ] =
{
@@ -481,7 +481,7 @@ namespace
size_t nValueLen = lcl_tryReadConfigString( _pLine, _nLineLen, _pKeyName, aBuf, sizeof( aBuf ) );
if ( nValueLen )
{
- for ( ULONG name = 0; name < sizeof( names ) / sizeof( names[0] ); ++name )
+ for ( sal_uIntPtr name = 0; name < sizeof( names ) / sizeof( names[0] ); ++name )
{
if ( strcmp( aBuf, names[ name ] ) == 0 )
{
@@ -491,7 +491,7 @@ namespace
}
}
}
- void lcl_tryReadConfigFlag( const sal_Char* _pLine, size_t _nLineLen, const sal_Char* _pKeyName, ULONG* _out_pnAllFlags, ULONG _nCheckFlag )
+ void lcl_tryReadConfigFlag( const sal_Char* _pLine, size_t _nLineLen, const sal_Char* _pKeyName, sal_uIntPtr* _out_pnAllFlags, sal_uIntPtr _nCheckFlag )
{
sal_Char aBuf[2];
size_t nValueLen = lcl_tryReadConfigString( _pLine, _nLineLen, _pKeyName, aBuf, sizeof( aBuf ) );
@@ -501,12 +501,12 @@ namespace
else
*_out_pnAllFlags &= ~_nCheckFlag;
}
- void lcl_tryReadHexByte( const sal_Char* _pLine, size_t _nLineLen, const sal_Char* _pKeyName, BYTE* _out_pnValue )
+ void lcl_tryReadHexByte( const sal_Char* _pLine, size_t _nLineLen, const sal_Char* _pKeyName, sal_uInt8* _out_pnValue )
{
sal_Char aBuf[3];
size_t nValueLen = lcl_tryReadConfigString( _pLine, _nLineLen, _pKeyName, aBuf, sizeof( aBuf ) );
if ( nValueLen )
- *_out_pnValue = (BYTE)rtl_str_toInt32( aBuf, 16 );
+ *_out_pnValue = (sal_uInt8)rtl_str_toInt32( aBuf, 16 );
}
}
@@ -552,7 +552,7 @@ void PointerList::Add( const void* p )
pLast = pBlock;
}
- USHORT i = 0;
+ sal_uInt16 i = 0;
while ( pBlock->aData[i] )
i++;
@@ -563,18 +563,18 @@ void PointerList::Add( const void* p )
// -----------------------------------------------------------------------
-BOOL PointerList::Remove( const void* p )
+sal_Bool PointerList::Remove( const void* p )
{
if ( !p )
- return FALSE;
+ return sal_False;
PBlock* pBlock = pFirst;
while ( pBlock )
{
- USHORT i = 0;
+ sal_uInt16 i = 0;
while ( i < PBLOCKCOUNT )
{
- if ( ((ULONG)p) == ((ULONG)pBlock->aData[i]) )
+ if ( ((sal_uIntPtr)p) == ((sal_uIntPtr)pBlock->aData[i]) )
{
pBlock->aData[i] = NULL;
pBlock->nCount--;
@@ -593,7 +593,7 @@ BOOL PointerList::Remove( const void* p )
delete pBlock;
}
- return TRUE;
+ return sal_True;
}
i++;
}
@@ -601,21 +601,21 @@ BOOL PointerList::Remove( const void* p )
pBlock = pBlock->pNext;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-const void* PointerList::Get( ULONG nPos ) const
+const void* PointerList::Get( sal_uIntPtr nPos ) const
{
if ( nCount <= nPos )
return NULL;
PBlock* pBlock = pFirst;
- ULONG nStart = 0;
+ sal_uIntPtr nStart = 0;
while ( pBlock )
{
- USHORT i = 0;
+ sal_uInt16 i = 0;
while ( i < PBLOCKCOUNT )
{
if ( pBlock->aData[i] )
@@ -636,26 +636,26 @@ const void* PointerList::Get( ULONG nPos ) const
// -----------------------------------------------------------------------
-BOOL PointerList::IsIn( const void* p ) const
+sal_Bool PointerList::IsIn( const void* p ) const
{
if ( !p )
- return FALSE;
+ return sal_False;
PBlock* pBlock = pFirst;
while ( pBlock )
{
- USHORT i = 0;
+ sal_uInt16 i = 0;
while ( i < PBLOCKCOUNT )
{
- if ( ((ULONG)p) == ((ULONG)pBlock->aData[i]) )
- return TRUE;
+ if ( ((sal_uIntPtr)p) == ((sal_uIntPtr)pBlock->aData[i]) )
+ return sal_True;
i++;
}
pBlock = pBlock->pNext;
}
- return FALSE;
+ return sal_False;
}
@@ -723,7 +723,7 @@ static DebugData* GetDebugData()
{
if ( !aDebugData.bInit )
{
- aDebugData.bInit = TRUE;
+ aDebugData.bInit = sal_True;
// Default Debug-Namen setzen
DbgGetLogFileName( aDebugData.aDbgData.aDebugName );
@@ -737,7 +737,7 @@ static DebugData* GetDebugData()
ConfigSection eCurrentSection = eUnknown;
// no sophisticated algorithm here, assume that the whole file fits into aBuf ...
- ULONG nReallyRead = FileRead( aBuf, 1, sizeof( aBuf ) / sizeof( sal_Char ) - 1, pIniFile );
+ sal_uIntPtr nReallyRead = FileRead( aBuf, 1, sizeof( aBuf ) / sizeof( sal_Char ) - 1, pIniFile );
aBuf[ nReallyRead ] = 0;
const sal_Char* pLine = aBuf;
while ( const sal_Char* pNextLine = strstr( pLine, FILE_LINEEND ) )
@@ -838,7 +838,7 @@ inline DebugData* ImplGetDebugData()
static FILETYPE ImplDbgInitFile()
{
- static BOOL bFileInit = FALSE;
+ static sal_Bool bFileInit = sal_False;
sal_Char aBuf[4096];
getcwd( aBuf, sizeof( aBuf ) );
@@ -849,7 +849,7 @@ static FILETYPE ImplDbgInitFile()
if ( !bFileInit )
{
- bFileInit = TRUE;
+ bFileInit = sal_True;
if ( pData->aDbgData.bOverwrite )
pDebugFile = FileOpen( pData->aDbgData.aDebugName, "w" );
@@ -928,7 +928,7 @@ static int ImplDbgFilter( const sal_Char* pFilter, const sal_Char* pMsg,
if ( pTok[nTok] == ';' )
{
if ( nTok && ImplStrSearch( pTok, nTok, pMsg, nMsgLen ) )
- return TRUE;
+ return sal_True;
pTok += nTok+1;
nTok = 0;
@@ -938,9 +938,9 @@ static int ImplDbgFilter( const sal_Char* pFilter, const sal_Char* pMsg,
}
if ( nTok && ImplStrSearch( pTok, nTok, pMsg, nMsgLen ) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -948,14 +948,14 @@ static int ImplDbgFilter( const sal_Char* pFilter, const sal_Char* pMsg,
extern "C"
void SAL_CALL dbg_printOslDebugMessage( const sal_Char * pszFileName, sal_Int32 nLine, const sal_Char * pszMessage )
{
- DbgOut( pszMessage ? pszMessage : "assertion failed!", DBG_OUT_ERROR, pszFileName, (USHORT)nLine );
+ DbgOut( pszMessage ? pszMessage : "assertion failed!", DBG_OUT_ERROR, pszFileName, (sal_uInt16)nLine );
}
// -----------------------------------------------------------------------
static void DebugInit()
{
- bDbgImplInMain = TRUE;
+ bDbgImplInMain = sal_True;
ImplDbgInitLock();
DebugData* pData = GetDebugData();
@@ -971,14 +971,14 @@ static void DebugInit()
static void DebugDeInit()
{
DebugData* pData = GetDebugData();
- ULONG i;
- ULONG nCount;
- ULONG nOldOut;
+ sal_uIntPtr i;
+ sal_uIntPtr nCount;
+ sal_uIntPtr nOldOut;
if( pData->bOslIsHooked )
{
osl_setDetailedDebugMessageFunc( pData->pOldDebugMessageFunc );
- pData->bOslIsHooked = FALSE;
+ pData->bOslIsHooked = sal_False;
}
// Statistik-Ausgaben immer in File
@@ -1026,7 +1026,7 @@ static void DebugDeInit()
pData->pXtorList = NULL;
}
- // Alles auf FALSE setzen, damit globale Variablen nicht das
+ // Alles auf sal_False setzen, damit globale Variablen nicht das
// System zum Abstuerzen bringt. Dabei muessen aber die
// Memory-Flags erhalten bleiben, da sonst new/delete in globalen
// Variablen abstuerzen, da die Pointeranpassung dann nicht mehr richtig
@@ -1045,9 +1045,9 @@ static void DebugDeInit()
static void DebugGlobalDeInit()
{
DebugData* pData = GetDebugData();
- ULONG i;
- ULONG nCount;
- ULONG nOldOut;
+ sal_uIntPtr i;
+ sal_uIntPtr nCount;
+ sal_uIntPtr nOldOut;
// Statistik-Ausgaben immer in File
nOldOut = pData->aDbgData.nTraceOut;
@@ -1065,7 +1065,7 @@ static void DebugGlobalDeInit()
for( i = 0, nCount = pData->pProfList->Count(); i < nCount; i++ )
{
ProfType* pProfData = (ProfType*)pData->pProfList->Get( i );
- ULONG nAve = pProfData->nTime / pProfData->nCount;
+ sal_uIntPtr nAve = pProfData->nTime / pProfData->nCount;
DbgOutf( "%-25s : %9lu : %6lu : %6lu : %6lu : %9lu :",
pProfData->aName, pProfData->nTime,
pProfData->nMinTime, pProfData->nMaxTime, nAve,
@@ -1115,8 +1115,8 @@ void ImpDbgOutfBuf( sal_Char* pBuf, const sal_Char* pFStr, ... )
static void DebugXTorInfo( sal_Char* pBuf )
{
DebugData* pData = GetDebugData();
- ULONG i;
- ULONG nCount;
+ sal_uIntPtr i;
+ sal_uIntPtr nCount;
// Xtor-Liste ausgeben
if ( pData->pXtorList && pData->pXtorList->Count() &&
@@ -1145,19 +1145,19 @@ static void DebugXTorInfo( sal_Char* pBuf )
}
// -----------------------------------------------------------------------
-BOOL ImplDbgFilterMessage( const sal_Char* pMsg )
+sal_Bool ImplDbgFilterMessage( const sal_Char* pMsg )
{
DebugData* pData = GetDebugData();
- if ( !ImplDbgFilter( pData->aDbgData.aInclFilter, pMsg, TRUE ) )
- return TRUE;
- if ( ImplDbgFilter( pData->aDbgData.aExclFilter, pMsg, FALSE ) )
- return TRUE;
- return FALSE;
+ if ( !ImplDbgFilter( pData->aDbgData.aInclFilter, pMsg, sal_True ) )
+ return sal_True;
+ if ( ImplDbgFilter( pData->aDbgData.aExclFilter, pMsg, sal_False ) )
+ return sal_True;
+ return sal_False;
}
// -----------------------------------------------------------------------
-void* DbgFunc( USHORT nAction, void* pParam )
+void* DbgFunc( sal_uInt16 nAction, void* pParam )
{
DebugData* pDebugData = ImplGetDebugData();
@@ -1283,7 +1283,7 @@ void* DbgFunc( USHORT nAction, void* pParam )
break;
case DBG_FUNC_ALLERROROUT:
- return (void*)(ULONG)TRUE;
+ return (void*)(sal_uIntPtr)sal_True;
case DBG_FUNC_SETTESTSOLARMUTEX:
pDebugData->pDbgTestSolarMutex = (DbgTestSolarMutexProc)(long)pParam;
@@ -1304,12 +1304,12 @@ void* DbgFunc( USHORT nAction, void* pParam )
if( pDebugData->bOslIsHooked && ! pData->bHookOSLAssert )
{
osl_setDetailedDebugMessageFunc( pDebugData->pOldDebugMessageFunc );
- pDebugData->bOslIsHooked = FALSE;
+ pDebugData->bOslIsHooked = sal_False;
}
else if( ! pDebugData->bOslIsHooked && pData->bHookOSLAssert )
{
pDebugData->pOldDebugMessageFunc = osl_setDetailedDebugMessageFunc( &dbg_printOslDebugMessage );
- pDebugData->bOslIsHooked = TRUE;
+ pDebugData->bOslIsHooked = sal_True;
}
}
break;
@@ -1330,7 +1330,7 @@ DbgChannelId DbgRegisterUserChannel( DbgPrintLine pProc )
// -----------------------------------------------------------------------
-void DbgProf( USHORT nAction, DbgDataType* pDbgData )
+void DbgProf( sal_uInt16 nAction, DbgDataType* pDbgData )
{
// Ueberhaupt Profiling-Test an
DebugData* pData = ImplGetDebugData();
@@ -1340,7 +1340,7 @@ void DbgProf( USHORT nAction, DbgDataType* pDbgData )
sal_Char aBuf[DBG_BUF_MAXLEN];
ProfType* pProfData = (ProfType*)pDbgData->pData;
- ULONG nTime;
+ sal_uIntPtr nTime;
if ( (nAction != DBG_PROF_START) && !pProfData )
{
strcpy( aBuf, DbgError_ProfEnd1 );
@@ -1423,7 +1423,7 @@ void DbgProf( USHORT nAction, DbgDataType* pDbgData )
// -----------------------------------------------------------------------
-void DbgXtor( DbgDataType* pDbgData, USHORT nAction, const void* pThis,
+void DbgXtor( DbgDataType* pDbgData, sal_uInt16 nAction, const void* pThis,
DbgUsr fDbgUsr )
{
DebugData* pData = ImplGetDebugData();
@@ -1449,19 +1449,19 @@ void DbgXtor( DbgDataType* pDbgData, USHORT nAction, const void* pThis,
pXtorData->nDtorCalls = 0;
pXtorData->nMaxCount = 0;
pXtorData->nStatics = 0;
- pXtorData->bTest = TRUE;
+ pXtorData->bTest = sal_True;
pData->pXtorList->Add( (void*)pXtorData );
- if ( !ImplDbgFilter( pData->aDbgData.aInclClassFilter, pXtorData->aName, TRUE ) )
- pXtorData->bTest = FALSE;
- if ( ImplDbgFilter( pData->aDbgData.aExclClassFilter, pXtorData->aName, FALSE ) )
- pXtorData->bTest = FALSE;
+ if ( !ImplDbgFilter( pData->aDbgData.aInclClassFilter, pXtorData->aName, sal_True ) )
+ pXtorData->bTest = sal_False;
+ if ( ImplDbgFilter( pData->aDbgData.aExclClassFilter, pXtorData->aName, sal_False ) )
+ pXtorData->bTest = sal_False;
}
if ( !pXtorData->bTest )
return;
sal_Char aBuf[DBG_BUF_MAXLEN];
- USHORT nAct = nAction & ~DBG_XTOR_DTOROBJ;
+ sal_uInt16 nAct = nAction & ~DBG_XTOR_DTOROBJ;
// Trace (Enter)
if ( (pData->aDbgData.nTestFlags & DBG_TEST_XTOR_TRACE) &&
@@ -1608,16 +1608,16 @@ void DbgXtor( DbgDataType* pDbgData, USHORT nAction, const void* pThis,
// -----------------------------------------------------------------------
-void DbgOut( const sal_Char* pMsg, USHORT nDbgOut, const sal_Char* pFile, USHORT nLine )
+void DbgOut( const sal_Char* pMsg, sal_uInt16 nDbgOut, const sal_Char* pFile, sal_uInt16 nLine )
{
- static BOOL bIn = FALSE;
+ static sal_Bool bIn = sal_False;
if ( bIn )
return;
- bIn = TRUE;
+ bIn = sal_True;
DebugData* pData = GetDebugData();
sal_Char const * pStr;
- ULONG nOut;
+ sal_uIntPtr nOut;
int nBufLen = 0;
if ( nDbgOut == DBG_OUT_ERROR )
@@ -1640,13 +1640,13 @@ void DbgOut( const sal_Char* pMsg, USHORT nDbgOut, const sal_Char* pFile, USHORT
if ( nOut == DBG_OUT_NULL )
{
- bIn = FALSE;
+ bIn = sal_False;
return;
}
if ( ImplDbgFilterMessage( pMsg ) )
{
- bIn = FALSE;
+ bIn = sal_False;
return;
}
@@ -1684,7 +1684,7 @@ void DbgOut( const sal_Char* pMsg, USHORT nDbgOut, const sal_Char* pFile, USHORT
// Line in String umwandeln und dranhaengen
sal_Char aLine[9];
sal_Char* pLine = &aLine[7];
- USHORT i;
+ sal_uInt16 i;
memset( aLine, 0, sizeof( aLine ) );
do
{
@@ -1754,7 +1754,7 @@ void DbgOut( const sal_Char* pMsg, USHORT nDbgOut, const sal_Char* pFile, USHORT
ImplDbgUnlock();
- bIn = FALSE;
+ bIn = sal_False;
}
void DbgPrintShell(char const * message) {
@@ -1766,7 +1766,7 @@ void DbgPrintShell(char const * message) {
// -----------------------------------------------------------------------
-void DbgOutTypef( USHORT nDbgOut, const sal_Char* pFStr, ... )
+void DbgOutTypef( sal_uInt16 nDbgOut, const sal_Char* pFStr, ... )
{
va_list pList;
@@ -1796,13 +1796,13 @@ void DbgOutf( const sal_Char* pFStr, ... )
#else
-void* DbgFunc( USHORT, void* ) { return NULL; }
+void* DbgFunc( sal_uInt16, void* ) { return NULL; }
-void DbgProf( USHORT, DbgDataType* ) {}
-void DbgXtor( DbgDataType*, USHORT, const void*, DbgUsr ) {}
+void DbgProf( sal_uInt16, DbgDataType* ) {}
+void DbgXtor( DbgDataType*, sal_uInt16, const void*, DbgUsr ) {}
-void DbgOut( const sal_Char*, USHORT, const sal_Char*, USHORT ) {}
-void DbgOutTypef( USHORT, const sal_Char*, ... ) {}
+void DbgOut( const sal_Char*, sal_uInt16, const sal_Char*, sal_uInt16 ) {}
+void DbgOutTypef( sal_uInt16, const sal_Char*, ... ) {}
void DbgOutf( const sal_Char*, ... ) {}
#endif
diff --git a/tools/source/debug/stcktree.cxx b/tools/source/debug/stcktree.cxx
index dccc4c198852..34cda7e81119 100644
--- a/tools/source/debug/stcktree.cxx
+++ b/tools/source/debug/stcktree.cxx
@@ -42,32 +42,32 @@ struct ImpDbgStackTree
ImpDbgStackTree* pRight_;
ImpDbgStackTree* pCaller_;
ImpDbgStackTree* pSub_;
- ULONG nIP_;
- ULONG nBytesLeak_;
- ULONG nBytesPeak_;
- ULONG nBytes_;
- ULONG nCountLeak_;
- ULONG nCountPeak_;
- ULONG nCount_;
- ULONG nMax_;
- ULONG nMin_;
-
- ImpDbgStackTree( ImpDbgStackTree* pSub, ULONG nIP );
+ sal_uIntPtr nIP_;
+ sal_uIntPtr nBytesLeak_;
+ sal_uIntPtr nBytesPeak_;
+ sal_uIntPtr nBytes_;
+ sal_uIntPtr nCountLeak_;
+ sal_uIntPtr nCountPeak_;
+ sal_uIntPtr nCount_;
+ sal_uIntPtr nMax_;
+ sal_uIntPtr nMin_;
+
+ ImpDbgStackTree( ImpDbgStackTree* pSub, sal_uIntPtr nIP );
~ImpDbgStackTree();
- ImpDbgStackTree* Add( ULONG nAlloc, ULONG* pBP, ULONG nIP );
- void Print( int nLevel, ULONG nCount, ULONG nCountLeak );
+ ImpDbgStackTree* Add( sal_uIntPtr nAlloc, sal_uIntPtr* pBP, sal_uIntPtr nIP );
+ void Print( int nLevel, sal_uIntPtr nCount, sal_uIntPtr nCountLeak );
void Print( int nLevel );
};
static ImpDbgStackTree* pImpDbgStackTreeRoot = NULL;
-static ULONG* pImpDbgStackTreeBP = NULL;
-static ULONG nImpDbgStackTreeMain = 0;
+static sal_uIntPtr* pImpDbgStackTreeBP = NULL;
+static sal_uIntPtr nImpDbgStackTreeMain = 0;
static int nImpDbgStackTreeSem = 0;
// -----------------------------------------------------------------------
-ImpDbgStackTree::ImpDbgStackTree( ImpDbgStackTree* pSub, ULONG nIP )
+ImpDbgStackTree::ImpDbgStackTree( ImpDbgStackTree* pSub, sal_uIntPtr nIP )
{
pSub_ = pSub;
nIP_ = nIP;
@@ -90,7 +90,7 @@ ImpDbgStackTree::~ImpDbgStackTree()
// -----------------------------------------------------------------------
-void ImpDbgStackTree::Print( int nLevel, ULONG nCount, ULONG nCountLeak )
+void ImpDbgStackTree::Print( int nLevel, sal_uIntPtr nCount, sal_uIntPtr nCountLeak )
{
if ( pLeft_ )
pLeft_->Print( nLevel, nCount, nCountLeak );
@@ -99,7 +99,7 @@ void ImpDbgStackTree::Print( int nLevel, ULONG nCount, ULONG nCountLeak )
{
if ( nMax_ == nMin_ )
{
- ULONG nTemp = nCountLeak_ * nMin_;
+ sal_uIntPtr nTemp = nCountLeak_ * nMin_;
DbgOutf( "%*c%08lx Count=%lu/%lu/%lu Bytes=%lu/%lu/%lu Size=%lu",
nLevel, ' ', nIP_,
nCount_, nCountPeak_, nCountLeak_,
@@ -137,7 +137,7 @@ void ImpDbgStackTree::Print( int nLevel )
// -----------------------------------------------------------------------
-ImpDbgStackTree* ImpDbgStackTree::Add( ULONG nAlloc, ULONG *pBP, ULONG nIP )
+ImpDbgStackTree* ImpDbgStackTree::Add( sal_uIntPtr nAlloc, sal_uIntPtr *pBP, sal_uIntPtr nIP )
{
if ( nIP < nIP_ )
{
@@ -167,9 +167,9 @@ ImpDbgStackTree* ImpDbgStackTree::Add( ULONG nAlloc, ULONG *pBP, ULONG nIP )
else if ( nMin_ > nAlloc )
nMin_ = nAlloc;
- if ( !(pBP[0] & 3) && (ULONG)pBP < pBP[0] && pBP[0] < (ULONG)pImpDbgStackTreeBP )
+ if ( !(pBP[0] & 3) && (sal_uIntPtr)pBP < pBP[0] && pBP[0] < (sal_uIntPtr)pImpDbgStackTreeBP )
{
- pBP = (ULONG*)pBP[0];
+ pBP = (sal_uIntPtr*)pBP[0];
nIP = pBP[1];
if ( 0x01100000 <= nIP && nIP < 0x20000000 && nIP != nImpDbgStackTreeMain )
{
@@ -190,10 +190,10 @@ void DbgStartStackTree()
{
if ( !nImpDbgStackTreeMain )
{
- ULONG* pBP;
+ sal_uIntPtr* pBP;
__asm mov pBP, ebp;
- pImpDbgStackTreeBP = (ULONG*)pBP[0];
+ pImpDbgStackTreeBP = (sal_uIntPtr*)pBP[0];
nImpDbgStackTreeMain = pImpDbgStackTreeBP[1];
}
}
@@ -209,7 +209,7 @@ void DbgEndStackTree()
{
// Ausgaben ins File umleiten
DbgData* pData = DbgGetData();
- ULONG nOldOut = pData->nTraceOut;
+ sal_uIntPtr nOldOut = pData->nTraceOut;
pData->nTraceOut = DBG_OUT_FILE;
DbgOutf( "Leak-Report" );
@@ -238,7 +238,7 @@ void DbgEndStackTree()
// -----------------------------------------------------------------------
-void* DbgGetStackTree( ULONG nAlloc )
+void* DbgGetStackTree( sal_uIntPtr nAlloc )
{
ImpDbgStackTree* pReturn = NULL;
@@ -246,10 +246,10 @@ void* DbgGetStackTree( ULONG nAlloc )
{
nImpDbgStackTreeSem++;
- ULONG* pBP;
+ sal_uIntPtr* pBP;
__asm mov pBP, ebp;
- ULONG nIP = pBP[1];
+ sal_uIntPtr nIP = pBP[1];
if ( !pImpDbgStackTreeRoot )
pImpDbgStackTreeRoot = new ImpDbgStackTree( NULL, nIP );
pReturn = pImpDbgStackTreeRoot->Add( nAlloc, pBP, nIP );
@@ -261,7 +261,7 @@ void* DbgGetStackTree( ULONG nAlloc )
// -----------------------------------------------------------------------
-void DbgFreeStackTree( void* pVoid, ULONG nAlloc )
+void DbgFreeStackTree( void* pVoid, sal_uIntPtr nAlloc )
{
ImpDbgStackTree* p = (ImpDbgStackTree*)pVoid;
@@ -297,7 +297,7 @@ void DbgPrintStackTree( void* pVoid )
{
// Ausgaben ins File umleiten
DbgData* pData = DbgGetData();
- ULONG nOldOut = pData->nTraceOut;
+ sal_uIntPtr nOldOut = pData->nTraceOut;
pData->nTraceOut = DBG_OUT_FILE;
DbgOutf( "Mem-StackTree:" );
@@ -313,8 +313,8 @@ void DbgPrintStackTree( void* pVoid )
void DbgStartStackTree() {}
void DbgEndStackTree() {}
-void* DbgGetStackTree( ULONG ) { return NULL; }
-void DbgFreeStackTree( void*, ULONG ) {}
+void* DbgGetStackTree( sal_uIntPtr ) { return NULL; }
+void DbgFreeStackTree( void*, sal_uIntPtr ) {}
void DbgPrintStackTree( void* ) {}
#endif
diff --git a/tools/source/fsys/comdep.hxx b/tools/source/fsys/comdep.hxx
index 043c5815f764..cd6f8db2cd57 100644..100755
--- a/tools/source/fsys/comdep.hxx
+++ b/tools/source/fsys/comdep.hxx
@@ -74,16 +74,16 @@ struct DirReader_Impl
DirEntry* pParent;
String aPath;
ByteString aBypass;
- BOOL bReady;
- BOOL bInUse;
+ sal_Bool bReady;
+ sal_Bool bInUse;
DirReader_Impl( Dir &rDir )
: pDir( &rDir ),
pDosEntry( 0 ),
pParent( 0 ),
aPath( GUI2FSYS(rDir.GetFull()) ),
- bReady ( FALSE ),
- bInUse( FALSE )
+ bReady ( sal_False ),
+ bInUse( sal_False )
{
#ifndef BOOTSTRAP
// Redirection
@@ -111,8 +111,8 @@ struct DirReader_Impl
{ if( pDosDir ) closedir( pDosDir ); }
// die folgenden sind systemabh"angig implementiert
- USHORT Init(); // initialisiert, liest ggf. devices
- USHORT Read(); // liest 1 Eintrag, F2ugt ein falls ok
+ sal_uInt16 Init(); // initialisiert, liest ggf. devices
+ sal_uInt16 Read(); // liest 1 Eintrag, F2ugt ein falls ok
};
//--------------------------------------------------------------------
@@ -145,9 +145,9 @@ struct FileCopier_Impl
//--------------------------------------------------------------------
#if defined WNT || defined OS2
-BOOL IsRedirectable_Impl( const ByteString &rPath );
+sal_Bool IsRedirectable_Impl( const ByteString &rPath );
#else
-#define IsRedirectable_Impl( rPath ) TRUE
+#define IsRedirectable_Impl( rPath ) sal_True
#endif
//--------------------------------------------------------------------
diff --git a/tools/source/fsys/dirent.cxx b/tools/source/fsys/dirent.cxx
index 74a2142db692..0c9e45cb72f2 100644..100755
--- a/tools/source/fsys/dirent.cxx
+++ b/tools/source/fsys/dirent.cxx
@@ -130,11 +130,11 @@ int Sys2SolarError_Impl( int nSysErr )
#ifndef BOOTSTRAP
FSysRedirector* FSysRedirector::_pRedirector = 0;
-BOOL FSysRedirector::_bEnabled = TRUE;
+sal_Bool FSysRedirector::_bEnabled = sal_True;
#ifdef UNX
-BOOL bInRedirection = TRUE;
+sal_Bool bInRedirection = sal_True;
#else
-BOOL bInRedirection = FALSE;
+sal_Bool bInRedirection = sal_False;
#endif
static vos:: OMutex * pRedirectMutex = 0;
@@ -172,7 +172,7 @@ void FSysRedirector::DoRedirect( String &rPath )
return;
// dont redirect on nested calls
- bInRedirection = TRUE;
+ bInRedirection = sal_True;
// convert to URL
#ifndef UNX
@@ -186,7 +186,7 @@ void FSysRedirector::DoRedirect( String &rPath )
// do redirection
Redirector();
- bInRedirection = FALSE;
+ bInRedirection = sal_False;
return;
}
@@ -289,12 +289,12 @@ const char* ImpCheckDirEntry( const void* p )
|*
*************************************************************************/
-ByteString ImplCutPath( const ByteString& rStr, USHORT nMax, char cAccDel )
+ByteString ImplCutPath( const ByteString& rStr, sal_uInt16 nMax, char cAccDel )
{
- USHORT nMaxPathLen = nMax;
+ sal_uInt16 nMaxPathLen = nMax;
ByteString aCutPath( rStr );
- BOOL bInsertPrefix = FALSE;
- USHORT nBegin = aCutPath.Search( cAccDel );
+ sal_Bool bInsertPrefix = sal_False;
+ sal_uInt16 nBegin = aCutPath.Search( cAccDel );
if( nBegin == STRING_NOTFOUND )
nBegin = 0;
@@ -303,14 +303,14 @@ ByteString ImplCutPath( const ByteString& rStr, USHORT nMax, char cAccDel )
while( aCutPath.Len() > nMaxPathLen )
{
- USHORT nEnd = aCutPath.Search( cAccDel, nBegin + 1 );
- USHORT nCount;
+ sal_uInt16 nEnd = aCutPath.Search( cAccDel, nBegin + 1 );
+ sal_uInt16 nCount;
if ( nEnd != STRING_NOTFOUND )
{
nCount = nEnd - nBegin;
aCutPath.Erase( nBegin, nCount );
- bInsertPrefix = TRUE;
+ bInsertPrefix = sal_True;
}
else
break;
@@ -318,7 +318,7 @@ ByteString ImplCutPath( const ByteString& rStr, USHORT nMax, char cAccDel )
if ( aCutPath.Len() > nMaxPathLen )
{
- for ( USHORT n = nMaxPathLen; n > nMaxPathLen/2; --n )
+ for ( sal_uInt16 n = nMaxPathLen; n > nMaxPathLen/2; --n )
if ( !ByteString(aCutPath.GetChar(n)).IsAlphaNumericAscii() )
{
aCutPath.Erase( n );
@@ -362,7 +362,7 @@ FSysError DirEntry::ImpParseOs2Name( const ByteString& rPfad, FSysPathStyle eSty
// der Rest immer ohne die fuehrenden '\\'.
// ein ":" trennt ebenfalls, gehoert aber zum Namen
// den ersten '\\', '/' oder ':' suchen
- USHORT nPos;
+ sal_uInt16 nPos;
for ( nPos = 0;
nPos < aPfad.Len() && //?O
aPfad.GetChar(nPos) != '\\' && aPfad.GetChar(nPos) != '/' && //?O
@@ -499,7 +499,7 @@ FSysError DirEntry::ImpParseOs2Name( const ByteString& rPfad, FSysPathStyle eSty
}
while ( aPfad.Len() );
- ULONG nErr = ERRCODE_NONE;
+ sal_uIntPtr nErr = ERRCODE_NONE;
// Haupt-Entry (selbst) zuweisen
if ( aStack.Count() == 0 )
{
@@ -639,7 +639,7 @@ void DirEntry::ImpTrim( FSysPathStyle eStyle )
{
case FSYS_STYLE_FAT:
{
- USHORT nPunktPos = aName.Search( '.' );
+ sal_uInt16 nPunktPos = aName.Search( '.' );
if ( nPunktPos == STRING_NOTFOUND )
{
if ( aName.Len() > 8 )
@@ -1010,7 +1010,7 @@ DirEntry* DirEntry::ImpGetPreTopPtr()
|*
*************************************************************************/
-DirEntry* DirEntry::ImpChangeParent( DirEntry* pNewParent, BOOL bNormalize )
+DirEntry* DirEntry::ImpChangeParent( DirEntry* pNewParent, sal_Bool bNormalize )
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1037,14 +1037,14 @@ DirEntry* DirEntry::ImpChangeParent( DirEntry* pNewParent, BOOL bNormalize )
|*
*************************************************************************/
-BOOL DirEntry::Exists( FSysAccess nAccess ) const
+sal_Bool DirEntry::Exists( FSysAccess nAccess ) const
{
#ifndef BOOTSTRAP
static vos::OMutex aLocalMutex;
vos::OGuard aGuard( aLocalMutex );
#endif
if ( !IsValid() )
- return FALSE;
+ return sal_False;
#if defined WNT || defined OS2
// spezielle Filenamen sind vom System da
@@ -1060,14 +1060,14 @@ BOOL DirEntry::Exists( FSysAccess nAccess ) const
aName.CompareIgnoreCaseToAscii("LPT3") == COMPARE_EQUAL ||
aName.CompareIgnoreCaseToAscii("NUL") == COMPARE_EQUAL ||
aName.CompareIgnoreCaseToAscii("PRN") == COMPARE_EQUAL ) )
- return TRUE;
+ return sal_True;
#endif
FSysFailOnErrorImpl();
DirEntryKind eKind = FileStat( *this, nAccess ).GetKind();
if ( eKind & ( FSYS_KIND_FILE | FSYS_KIND_DIR ) )
{
- return TRUE;
+ return sal_True;
}
#if defined WNT || defined OS2
@@ -1090,7 +1090,7 @@ BOOL DirEntry::Exists( FSysAccess nAccess ) const
|*
*************************************************************************/
-BOOL DirEntry::First()
+sal_Bool DirEntry::First()
{
FSysFailOnErrorImpl();
@@ -1120,12 +1120,12 @@ BOOL DirEntry::First()
{
aName = aFound;
closedir( pDir );
- return TRUE;
+ return sal_True;
}
}
closedir( pDir );
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -1138,8 +1138,8 @@ BOOL DirEntry::First()
|*
*************************************************************************/
-String DirEntry::GetFull( FSysPathStyle eStyle, BOOL bWithDelimiter,
- USHORT nMaxChars ) const
+String DirEntry::GetFull( FSysPathStyle eStyle, sal_Bool bWithDelimiter,
+ sal_uInt16 nMaxChars ) const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1463,18 +1463,18 @@ StringCompare DirEntry::NameCompare( const DirEntry &rWith ) const
|*
*************************************************************************/
-BOOL DirEntry::operator==( const DirEntry& rEntry ) const
+sal_Bool DirEntry::operator==( const DirEntry& rEntry ) const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
// test wheather the contents are textual the same
if ( nError && ( nError == rEntry.nError ) )
- return TRUE;
+ return sal_True;
if ( nError || rEntry.nError ||
( eFlag == FSYS_FLAG_INVALID ) ||
( rEntry.eFlag == FSYS_FLAG_INVALID ) )
- return FALSE;
+ return sal_False;
#ifndef OS2
const
@@ -1547,10 +1547,10 @@ DirEntry DirEntry::operator+( const DirEntry& rEntry ) const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
#ifdef DBG_UTIL
- static BOOL bTested = FALSE;
+ static sal_Bool bTested = sal_False;
if ( !bTested )
{
- bTested = TRUE;
+ bTested = sal_True;
FSysTest();
}
#endif
@@ -1572,7 +1572,7 @@ DirEntry DirEntry::operator+( const DirEntry& rEntry ) const
(eFlag == FSYS_FLAG_RELROOT && !aName.Len()) ||
(
(pEntryTop->aName.Len() ||
- ((rEntry.Level()>1)?(rEntry[rEntry.Level()-2].aName.CompareIgnoreCaseToAscii(RFS_IDENTIFIER)==COMPARE_EQUAL):FALSE))
+ ((rEntry.Level()>1)?(rEntry[rEntry.Level()-2].aName.CompareIgnoreCaseToAscii(RFS_IDENTIFIER)==COMPARE_EQUAL):sal_False))
&&
(pEntryTop->eFlag == FSYS_FLAG_ABSROOT ||
pEntryTop->eFlag == FSYS_FLAG_RELROOT ||
@@ -1767,23 +1767,23 @@ void DirEntry::SetName( const String& rName, FSysPathStyle eFormatter )
|* Letzte Aenderung MA 02.12.91
|*
*************************************************************************/
-BOOL DirEntry::Find( const String& rPfad, char cDelim )
+sal_Bool DirEntry::Find( const String& rPfad, char cDelim )
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
if ( ImpGetTopPtr()->eFlag == FSYS_FLAG_ABSROOT )
- return TRUE;
+ return sal_True;
- BOOL bWild = aName.Search( '*' ) != STRING_NOTFOUND ||
+ sal_Bool bWild = aName.Search( '*' ) != STRING_NOTFOUND ||
aName.Search( '?' ) != STRING_NOTFOUND;
if ( !cDelim )
cDelim = SEARCHDELIM(DEFSTYLE)[0];
- USHORT nTokenCount = rPfad.GetTokenCount( cDelim );
- USHORT nIndex = 0;
+ sal_uInt16 nTokenCount = rPfad.GetTokenCount( cDelim );
+ sal_uInt16 nIndex = 0;
ByteString aThis = ACCESSDELIM(DEFSTYLE);
aThis += ByteString(GetFull(), osl_getThreadTextEncoding());
- for ( USHORT nToken = 0; nToken < nTokenCount; ++nToken )
+ for ( sal_uInt16 nToken = 0; nToken < nTokenCount; ++nToken )
{
ByteString aPath = ByteString(rPfad, osl_getThreadTextEncoding()).GetToken( 0, cDelim, nIndex );
@@ -1797,11 +1797,11 @@ BOOL DirEntry::Find( const String& rPfad, char cDelim )
( ( !bWild && aEntry.Exists() ) || ( bWild && aEntry.First() ) ) )
{
(*this) = aEntry;
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -1814,7 +1814,7 @@ BOOL DirEntry::Find( const String& rPfad, char cDelim )
|*
*************************************************************************/
-BOOL DirEntry::ImpToRel( String aCurStr )
+sal_Bool DirEntry::ImpToRel( String aCurStr )
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1831,7 +1831,7 @@ BOOL DirEntry::ImpToRel( String aCurStr )
}
// "Ubereinstimmung pr"ufen
- USHORT nPos = aThisCompareStr.Match( aCurCompareStr );
+ sal_uInt16 nPos = aThisCompareStr.Match( aCurCompareStr );
if ( nPos == STRING_MATCH && aThisStr.Len() != aCurStr.Len() )
nPos = Min( aThisStr.Len(), aCurStr.Len() );
@@ -1840,7 +1840,7 @@ BOOL DirEntry::ImpToRel( String aCurStr )
{
// dann ist der relative Pfad das aktuelle Verzeichnis
*this = DirEntry();
- return TRUE;
+ return sal_True;
}
// Sonderfall, die DirEntries sind total verschieden
@@ -1848,7 +1848,7 @@ BOOL DirEntry::ImpToRel( String aCurStr )
{
// dann ist der relativste Pfad absolut
*this = aThis;
- return FALSE;
+ return sal_False;
}
// sonst nehmen wir die identischen Einzelteile vorne weg
@@ -1864,7 +1864,7 @@ BOOL DirEntry::ImpToRel( String aCurStr )
// das ist dann unser relativer Pfad
*this = DirEntry( aThisStr, FSYS_STYLE_HPFS );
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -1877,7 +1877,7 @@ BOOL DirEntry::ImpToRel( String aCurStr )
|*
*************************************************************************/
-USHORT DirEntry::CutRelParents()
+sal_uInt16 DirEntry::CutRelParents()
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1891,7 +1891,7 @@ USHORT DirEntry::CutRelParents()
pDir = pPar;
// '..' zaehlen
- USHORT nParCount = 0;
+ sal_uInt16 nParCount = 0;
while ( pPar && pPar->eFlag == FSYS_FLAG_PARENT )
{
++nParCount;
@@ -1917,7 +1917,7 @@ USHORT DirEntry::CutRelParents()
|*
*************************************************************************/
-BOOL DirEntry::ToRel()
+sal_Bool DirEntry::ToRel()
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1936,7 +1936,7 @@ BOOL DirEntry::ToRel()
|*
*************************************************************************/
-BOOL DirEntry::ToRel( const DirEntry& rStart )
+sal_Bool DirEntry::ToRel( const DirEntry& rStart )
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -2030,7 +2030,7 @@ String DirEntry::GetSearchDelimiter( FSysPathStyle eFormatter )
|*
*************************************************************************/
-USHORT DirEntry::GetMaxNameLen( FSysPathStyle eFormatter )
+sal_uInt16 DirEntry::GetMaxNameLen( FSysPathStyle eFormatter )
{
eFormatter = GetStyle( eFormatter );
switch ( eFormatter )
@@ -2075,7 +2075,7 @@ const DirEntry& DirEntry::SetTempNameBase( const String &rBase )
{
// Create the directory and only on success give all rights to
// everyone. Use mkdir instead of DirEntry::MakeDir because
- // this returns TRUE even if directory already exists.
+ // this returns sal_True even if directory already exists.
if ( !mkdir( aName.GetBuffer(), S_IRWXU | S_IRWXG | S_IRWXO ) )
chmod( aName.GetBuffer(), S_IRWXU | S_IRWXG | S_IRWXO );
@@ -2259,7 +2259,7 @@ DirEntry DirEntry::TempName( DirEntryKind eKind ) const
|*
*************************************************************************/
-const DirEntry &DirEntry::operator[]( USHORT nParentLevel ) const
+const DirEntry &DirEntry::operator[]( sal_uInt16 nParentLevel ) const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -2295,7 +2295,7 @@ FSysError DirEntry::ImpParseUnixName( const ByteString& rPfad, FSysPathStyle eSt
// falls '/' am Anfang, ist der Name '/',
// der Rest immer ohne die fuehrenden '/'.
// den ersten '/' suchen
- USHORT nPos;
+ sal_uInt16 nPos;
for ( nPos = 0;
nPos < aPfad.Len() && aPfad.GetChar(nPos) != '/';
nPos++ )
@@ -2321,8 +2321,8 @@ FSysError DirEntry::ImpParseUnixName( const ByteString& rPfad, FSysPathStyle eSt
else if ( aName == "~" )
{
DirEntry aHome( String( (const char *) getenv( "HOME" ), osl_getThreadTextEncoding()) );
- for ( USHORT n = aHome.Level(); n; --n )
- aStack.Push( new DirEntry( aHome[ (USHORT) n-1 ] ) );
+ for ( sal_uInt16 n = aHome.Level(); n; --n )
+ aStack.Push( new DirEntry( aHome[ (sal_uInt16) n-1 ] ) );
}
#endif
@@ -2427,11 +2427,11 @@ ErrCode CreateEntry_Impl( const DirEntry &rPath, DirEntryKind eKind )
return eErr;
}
-BOOL IsValidEntry_Impl( const DirEntry &rPath,
+sal_Bool IsValidEntry_Impl( const DirEntry &rPath,
const String &rLongName,
DirEntryKind eKind,
- BOOL bIsShortened,
- BOOL bUseDelim )
+ sal_Bool bIsShortened,
+ sal_Bool bUseDelim )
{
// Parameter-Pr"uefung
DBG_ASSERT( eKind == FSYS_KIND_NONE || eKind == FSYS_KIND_ALL ||
@@ -2445,16 +2445,16 @@ BOOL IsValidEntry_Impl( const DirEntry &rPath,
DirEntry aPath(rPath);
DirEntry aName(rLongName, eStyle);
if ( !aName.IsValid() || aName.Level() != 1 )
- return FALSE;
+ return sal_False;
aPath += aName;
if ( 1 == aPath.Level() )
- return FALSE;
+ return sal_False;
if ( eStyle == FSYS_STYLE_FAT || eStyle == FSYS_STYLE_NWFS ||
eStyle == FSYS_STYLE_UNKNOWN )
{
DirEntry aDosEntry( rLongName, FSYS_STYLE_FAT );
if ( !aDosEntry.IsValid() )
- return FALSE;
+ return sal_False;
}
// Pfad-Trenner sind nicht erlaubt (bei ungek"urzten auch nicht FSYS_SHORTNAME_DELIMITER)
@@ -2464,12 +2464,12 @@ BOOL IsValidEntry_Impl( const DirEntry &rPath,
(!bIsShortened && rLongName.Search(cDelim) != STRING_NOTFOUND)
)
{
- return FALSE;
+ return sal_False;
}
// MI: Abfrage nach 'CON:' etc. wird jetzt in Exists() mitgemacht
if ( aPath.Exists() )
- return FALSE;
+ return sal_False;
return (ERRCODE_NONE == CreateEntry_Impl( aPath, eKind ));
}
@@ -2488,8 +2488,8 @@ BOOL IsValidEntry_Impl( const DirEntry &rPath,
#define MAX_LEN_MAX 255
#define INVALID_CHARS_DEF "\\/\"':|^<>?*"
-BOOL DirEntry::MakeShortName( const String& rLongName, DirEntryKind eKind,
- BOOL bUseDelim, FSysPathStyle eStyle )
+sal_Bool DirEntry::MakeShortName( const String& rLongName, DirEntryKind eKind,
+ sal_Bool bUseDelim, FSysPathStyle eStyle )
{
String aLongName(rLongName);
@@ -2507,7 +2507,7 @@ BOOL DirEntry::MakeShortName( const String& rLongName, DirEntryKind eKind,
#if 0
if ( FSYS_STYLE_NWFS == GetPathStyle( ImpGetTopPtr()->GetName() ) )
{
- for ( USHORT n = aLongName.Len(); n; --n )
+ for ( sal_uInt16 n = aLongName.Len(); n; --n )
{
short nChar = aLongName(n-1);
if ( nChar < 32 || nChar >= 127 )
@@ -2525,14 +2525,14 @@ BOOL DirEntry::MakeShortName( const String& rLongName, DirEntryKind eKind,
}
// ist der Langname direkt verwendbar?
- if ( IsValidEntry_Impl( *this, aLongName, eKind, FALSE, bUseDelim ) )
+ if ( IsValidEntry_Impl( *this, aLongName, eKind, sal_False, bUseDelim ) )
{
operator+=( DirEntry(aLongName) );
- return TRUE;
+ return sal_True;
}
// max L"angen feststellen
- USHORT nMaxExt, nMaxLen;
+ sal_uInt16 nMaxExt, nMaxLen;
if ( FSYS_STYLE_DETECT == eStyle )
eStyle = DirEntry::GetPathStyle( GetDevice().GetName() );
ByteString aInvalidChars;
@@ -2604,11 +2604,11 @@ BOOL DirEntry::MakeShortName( const String& rLongName, DirEntryKind eKind,
operator+=( DirEntry(String(aNewName, osl_getThreadTextEncoding())) );
if ( FSYS_KIND_ALL == eKind && CMP_LOWER(aName) == aOldName )
if ( FSYS_KIND_ALL == eKind && CMP_LOWER(ByteString(GetName(), osl_getThreadTextEncoding())) == aOldName )
- return TRUE;
+ return sal_True;
// kann der gek"urzte Name direkt verwendet werden?
if ( !Exists() && (ERRCODE_NONE == CreateEntry_Impl( *this, eKind )) )
- return TRUE;
+ return sal_True;
// darf '?##' verwendet werden, um eindeutigen Name zu erzeugen?
if ( bUseDelim )
@@ -2639,7 +2639,7 @@ BOOL DirEntry::MakeShortName( const String& rLongName, DirEntryKind eKind,
// keine ## mehr frei / ?## soll nicht verwendet werden
nError = ERRCODE_IO_ALREADYEXISTS;
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -2652,34 +2652,34 @@ BOOL DirEntry::MakeShortName( const String& rLongName, DirEntryKind eKind,
|*
*************************************************************************/
-BOOL DirEntry::MakeDir( BOOL bSloppy ) const
+sal_Bool DirEntry::MakeDir( sal_Bool bSloppy ) const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
// Schnellpruefung, ob vorhanden
if ( FileStat( *this ).IsKind( FSYS_KIND_DIR ) )
- return TRUE;
+ return sal_True;
if ( bSloppy && pParent )
if ( FileStat( *pParent ).IsKind( FSYS_KIND_DIR ) )
- return TRUE;
+ return sal_True;
const DirEntry *pNewDir = bSloppy ? pParent : this;
if ( pNewDir )
{
// den Path zum Dir erzeugen
- if ( pNewDir->pParent && !pNewDir->pParent->MakeDir(FALSE) )
- return FALSE;
+ if ( pNewDir->pParent && !pNewDir->pParent->MakeDir(sal_False) )
+ return sal_False;
// das Dir selbst erzeugen
if ( pNewDir->eFlag == FSYS_FLAG_ABSROOT ||
pNewDir->eFlag == FSYS_FLAG_ABSROOT ||
pNewDir->eFlag == FSYS_FLAG_VOLUME )
- return TRUE;
+ return sal_True;
else
{
//? nError = ???
if ( FileStat( *pNewDir ).IsKind( FSYS_KIND_DIR ) )
- return TRUE;
+ return sal_True;
else
{
FSysFailOnErrorImpl();
@@ -2693,7 +2693,7 @@ BOOL DirEntry::MakeDir( BOOL bSloppy ) const
#ifdef WIN32
SetLastError(0);
#endif
- BOOL bResult = (0 == _mkdir( (char*) bDirName.GetBuffer() ));
+ sal_Bool bResult = (0 == _mkdir( (char*) bDirName.GetBuffer() ));
if ( !bResult )
{
// Wer hat diese Methode const gemacht ?
@@ -2708,7 +2708,7 @@ BOOL DirEntry::MakeDir( BOOL bSloppy ) const
}
}
}
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -2820,7 +2820,7 @@ FSysError DirEntry::MoveTo( const DirEntry& rNewName ) const
// ja, also intra-device-move mit MoveFile
MoveFile( bFrom.GetBuffer(), bTo.GetBuffer() );
// MoveFile ist buggy bei cross-device operationen.
- // Der R?ckgabewert ist auch dann TRUE, wenn nur ein Teil der Operation geklappt hat.
+ // Der R?ckgabewert ist auch dann sal_True, wenn nur ein Teil der Operation geklappt hat.
// Zudem zeigt MoveFile unterschiedliches Verhalten bei unterschiedlichen NT-Versionen.
return Sys2SolarError_Impl( GetLastError() );
}
@@ -2942,10 +2942,10 @@ FSysError DirEntry::Kill( FSysAction nActions ) const
pName[bTmpName.Len()+1] = (char) 0;
//read-only files sollen auch geloescht werden koennen
- BOOL isReadOnly = FileStat::GetReadOnlyFlag(*this);
+ sal_Bool isReadOnly = FileStat::GetReadOnlyFlag(*this);
if (isReadOnly)
{
- FileStat::SetReadOnlyFlag(*this, FALSE);
+ FileStat::SetReadOnlyFlag(*this, sal_False);
}
// directory?
@@ -2955,7 +2955,7 @@ FSysError DirEntry::Kill( FSysAction nActions ) const
if ( FSYS_ACTION_RECURSIVE == (nActions & FSYS_ACTION_RECURSIVE) )
{
Dir aDir( *this, FSYS_KIND_DIR|FSYS_KIND_FILE );
- for ( USHORT n = 0; eError == FSYS_ERR_OK && n < aDir.Count(); ++n )
+ for ( sal_uInt16 n = 0; eError == FSYS_ERR_OK && n < aDir.Count(); ++n )
{
const DirEntry &rSubDir = aDir[n];
DirEntryFlag flag = rSubDir.GetFlag();
@@ -3058,20 +3058,20 @@ FSysError DirEntry::Kill( FSysAction nActions ) const
|*
*************************************************************************/
-BOOL DirEntry::Contains( const DirEntry &rSubEntry ) const
+sal_Bool DirEntry::Contains( const DirEntry &rSubEntry ) const
{
DBG_ASSERT( IsAbs() && rSubEntry.IsAbs(), "must be absolute entries" );
- USHORT nThisLevel = Level();
- USHORT nSubLevel = rSubEntry.Level();
+ sal_uInt16 nThisLevel = Level();
+ sal_uInt16 nSubLevel = rSubEntry.Level();
if ( nThisLevel < nSubLevel )
{
for ( ; nThisLevel; --nThisLevel, --nSubLevel )
if ( (*this)[nThisLevel-1] != rSubEntry[nSubLevel-1] )
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -3084,11 +3084,11 @@ BOOL DirEntry::Contains( const DirEntry &rSubEntry ) const
|*
*************************************************************************/
-USHORT DirEntry::Level() const
+sal_uInt16 DirEntry::Level() const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
- USHORT nLevel = 0;
+ sal_uInt16 nLevel = 0;
const DirEntry *pRes = this;
while ( pRes )
{
@@ -3139,7 +3139,7 @@ String DirEntry::ConvertSystemToName( const String &rName )
|*
*************************************************************************/
-BOOL DirEntry::IsValid() const
+sal_Bool DirEntry::IsValid() const
{
return (nError == FSYS_ERR_OK);
}
@@ -3154,9 +3154,9 @@ BOOL DirEntry::IsValid() const
|*
*************************************************************************/
-BOOL DirEntry::IsRFSAvailable()
+sal_Bool DirEntry::IsRFSAvailable()
{
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -3171,18 +3171,18 @@ BOOL DirEntry::IsRFSAvailable()
|*
*************************************************************************/
-BOOL DirEntry::IsLongNameOnFAT() const
+sal_Bool DirEntry::IsLongNameOnFAT() const
{
// FAT-System?
DirEntry aTempDirEntry(*this);
aTempDirEntry.ToAbs();
if (DirEntry::GetPathStyle(aTempDirEntry.GetDevice().GetName().GetChar(0)) != FSYS_STYLE_FAT)
{
- return FALSE; // nein, also false
+ return sal_False; // nein, also false
}
// DirEntry-Kette auf lange Dateinamen pr?fen
- for( USHORT iLevel = this->Level(); iLevel > 0; iLevel-- )
+ for( sal_uInt16 iLevel = this->Level(); iLevel > 0; iLevel-- )
{
const DirEntry& rEntry = (const DirEntry&) (*this)[iLevel-1];
String aBase( rEntry.GetBase() );
@@ -3190,15 +3190,15 @@ BOOL DirEntry::IsLongNameOnFAT() const
if (aBase.Len()>8) // Name > 8?
{
- return TRUE;
+ return sal_True;
}
if (aExtension.Len()>3) // Extension > 3?
{
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
//========================================================================
diff --git a/tools/source/fsys/filecopy.cxx b/tools/source/fsys/filecopy.cxx
index 62d361aa4af4..e087b6c4a4c3 100644..100755
--- a/tools/source/fsys/filecopy.cxx
+++ b/tools/source/fsys/filecopy.cxx
@@ -158,14 +158,14 @@ FileCopier& FileCopier::operator = ( const FileCopier &rCopier )
|*
*************************************************************************/
-BOOL FileCopier::Progress()
+sal_Bool FileCopier::Progress()
{
if ( !aProgressLink )
- return TRUE;
+ return sal_True;
else
{
if ( aProgressLink.Call( this ) )
- return TRUE;
+ return sal_True;
return ( 0 == Error( ERRCODE_ABORT, 0, 0 ) );
}
}
@@ -243,7 +243,7 @@ FSysError FileCopier::DoCopy_Impl(
// HPFS->FAT?
FSysPathStyle eSourceStyle = DirEntry::GetPathStyle( rSource.ImpGetTopPtr()->GetName() );
FSysPathStyle eTargetStyle = DirEntry::GetPathStyle( rTarget.ImpGetTopPtr()->GetName() );
- BOOL bMakeShortNames = ( eSourceStyle == FSYS_STYLE_HPFS && eTargetStyle == FSYS_STYLE_FAT );
+ sal_Bool bMakeShortNames = ( eSourceStyle == FSYS_STYLE_HPFS && eTargetStyle == FSYS_STYLE_FAT );
// Zieldateiname ggf. kuerzen
DirEntry aTgt;
@@ -315,7 +315,7 @@ FSysError FileCopier::DoCopy_Impl(
// recursive copy
eRet = Error( aTgt.MakeDir() ? FSYS_ERR_OK : FSYS_ERR_UNKNOWN, 0, &aTgt );
Dir aSourceDir( rSource, FSYS_KIND_DIR|FSYS_KIND_FILE );
- for ( USHORT n = 0; ERRCODE_TOERROR(eRet) == FSYS_ERR_OK && n < aSourceDir.Count(); ++n )
+ for ( sal_uInt16 n = 0; ERRCODE_TOERROR(eRet) == FSYS_ERR_OK && n < aSourceDir.Count(); ++n )
{
const DirEntry &rSubSource = aSourceDir[n];
DirEntryFlag eFlag = rSubSource.GetFlag();
diff --git a/tools/source/fsys/fstat.cxx b/tools/source/fsys/fstat.cxx
index a55c56b6efbb..6a32585b2c1e 100644..100755
--- a/tools/source/fsys/fstat.cxx
+++ b/tools/source/fsys/fstat.cxx
@@ -50,12 +50,12 @@
FileStat::FileStat()
: // don't use Default-Ctors!
- aDateCreated( ULONG(0) ),
- aTimeCreated( ULONG(0) ),
- aDateModified( ULONG(0) ),
- aTimeModified( ULONG(0) ),
- aDateAccessed( ULONG(0) ),
- aTimeAccessed( ULONG(0) )
+ aDateCreated( sal_uIntPtr(0) ),
+ aTimeCreated( sal_uIntPtr(0) ),
+ aDateModified( sal_uIntPtr(0) ),
+ aTimeModified( sal_uIntPtr(0) ),
+ aDateAccessed( sal_uIntPtr(0) ),
+ aTimeAccessed( sal_uIntPtr(0) )
{
nSize = 0;
nKindFlags = FSYS_KIND_UNKNOWN;
@@ -74,15 +74,15 @@ FileStat::FileStat()
FileStat::FileStat( const DirEntry& rDirEntry, FSysAccess nAccess )
: // don't use Default-Ctors!
- aDateCreated( ULONG(0) ),
- aTimeCreated( ULONG(0) ),
- aDateModified( ULONG(0) ),
- aTimeModified( ULONG(0) ),
- aDateAccessed( ULONG(0) ),
- aTimeAccessed( ULONG(0) )
+ aDateCreated( sal_uIntPtr(0) ),
+ aTimeCreated( sal_uIntPtr(0) ),
+ aDateModified( sal_uIntPtr(0) ),
+ aTimeModified( sal_uIntPtr(0) ),
+ aDateAccessed( sal_uIntPtr(0) ),
+ aTimeAccessed( sal_uIntPtr(0) )
{
- BOOL bCached = FSYS_ACCESS_CACHED == (nAccess & FSYS_ACCESS_CACHED);
- BOOL bFloppy = FSYS_ACCESS_FLOPPY == (nAccess & FSYS_ACCESS_FLOPPY);
+ sal_Bool bCached = FSYS_ACCESS_CACHED == (nAccess & FSYS_ACCESS_CACHED);
+ sal_Bool bFloppy = FSYS_ACCESS_FLOPPY == (nAccess & FSYS_ACCESS_FLOPPY);
#ifdef FEAT_FSYS_DOUBLESPEED
const FileStat *pStatFromDir = bCached ? rDirEntry.ImpGetStat() : 0;
@@ -115,18 +115,18 @@ FileStat::FileStat( const DirEntry& rDirEntry, FSysAccess nAccess )
|*
*************************************************************************/
-// TRUE wenn die Instanz j"unger als rIsOlder ist.
-// FALSE wenn die Instanz "alter oder gleich alt wie rIsOlder ist.
+// sal_True wenn die Instanz j"unger als rIsOlder ist.
+// sal_False wenn die Instanz "alter oder gleich alt wie rIsOlder ist.
-BOOL FileStat::IsYounger( const FileStat& rIsOlder ) const
+sal_Bool FileStat::IsYounger( const FileStat& rIsOlder ) const
{
if ( aDateModified > rIsOlder.aDateModified )
- return TRUE;
+ return sal_True;
if ( ( aDateModified == rIsOlder.aDateModified ) &&
( aTimeModified > rIsOlder.aTimeModified ) )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -138,9 +138,9 @@ BOOL FileStat::IsYounger( const FileStat& rIsOlder ) const
|*
*************************************************************************/
-BOOL FileStat::IsKind( DirEntryKind nKind ) const
+sal_Bool FileStat::IsKind( DirEntryKind nKind ) const
{
- BOOL bRet = ( ( nKind == FSYS_KIND_UNKNOWN ) &&
+ sal_Bool bRet = ( ( nKind == FSYS_KIND_UNKNOWN ) &&
( nKindFlags == FSYS_KIND_UNKNOWN ) ) ||
( ( nKindFlags & nKind ) == nKind );
return bRet;
@@ -155,12 +155,12 @@ BOOL FileStat::IsKind( DirEntryKind nKind ) const
|*
*************************************************************************/
-BOOL FileStat::HasReadOnlyFlag()
+sal_Bool FileStat::HasReadOnlyFlag()
{
#if defined WNT || defined UNX || defined OS2
- return TRUE;
+ return sal_True;
#else
- return FALSE;
+ return sal_False;
#endif
}
@@ -173,7 +173,7 @@ BOOL FileStat::HasReadOnlyFlag()
|*
*************************************************************************/
-BOOL FileStat::GetReadOnlyFlag( const DirEntry &rEntry )
+sal_Bool FileStat::GetReadOnlyFlag( const DirEntry &rEntry )
{
ByteString aFPath(rEntry.GetFull(), osl_getThreadTextEncoding());
@@ -189,17 +189,17 @@ BOOL FileStat::GetReadOnlyFlag( const DirEntry &rEntry )
case NO_ERROR:
return FILE_READONLY == ( aFileStat.attrFile & FILE_READONLY );
default:
- return FALSE;
+ return sal_False;
}
#elif defined UNX
/* could we stat the object? */
struct stat aBuf;
if (stat(aFPath.GetBuffer(), &aBuf))
- return FALSE;
+ return sal_False;
/* jupp, is writable for user? */
return((aBuf.st_mode & S_IWUSR) != S_IWUSR);
#else
- return FALSE;
+ return sal_False;
#endif
}
@@ -212,7 +212,7 @@ BOOL FileStat::GetReadOnlyFlag( const DirEntry &rEntry )
|*
*************************************************************************/
-ULONG FileStat::SetReadOnlyFlag( const DirEntry &rEntry, BOOL bRO )
+sal_uIntPtr FileStat::SetReadOnlyFlag( const DirEntry &rEntry, sal_Bool bRO )
{
ByteString aFPath(rEntry.GetFull(), osl_getThreadTextEncoding());
diff --git a/tools/source/fsys/tdir.cxx b/tools/source/fsys/tdir.cxx
index b6bf48a8cdf9..c0ebe64114b8 100644..100755
--- a/tools/source/fsys/tdir.cxx
+++ b/tools/source/fsys/tdir.cxx
@@ -48,7 +48,7 @@ DECLARE_LIST( DirEntryList, DirEntry* )
DECLARE_LIST( FSysSortList, FSysSort* )
DECLARE_LIST( FileStatList, FileStat* )
-#define APPEND (USHORT) 65535
+#define APPEND (sal_uInt16) 65535
/*************************************************************************
|*
@@ -60,9 +60,9 @@ DECLARE_LIST( FileStatList, FileStat* )
|*
*************************************************************************/
-BOOL Dir::ImpInsertPointReached( const DirEntry& rNewEntry,
+sal_Bool Dir::ImpInsertPointReached( const DirEntry& rNewEntry,
const FileStat& rNewStat,
- ULONG nCurPos, ULONG nSortIndex ) const
+ sal_uIntPtr nCurPos, sal_uIntPtr nSortIndex ) const
{
#define VALUE( nKindFlags ) \
( ( FSYS_KIND_FILE | FSYS_KIND_DIR | FSYS_KIND_DEV | \
@@ -70,7 +70,7 @@ BOOL Dir::ImpInsertPointReached( const DirEntry& rNewEntry,
// einfache Dinge erfordern einfache Loesungen
if ( !pLst->Count() )
- return TRUE;
+ return sal_True;
FSysSort nSort = *( pSortLst->GetObject( nSortIndex ) );
FileStat *pOldStat = NULL;
@@ -83,121 +83,121 @@ BOOL Dir::ImpInsertPointReached( const DirEntry& rNewEntry,
case FSYS_SORT_NAME:
case (FSYS_SORT_NAME | FSYS_SORT_ASCENDING):
if ( pCurLstObj->aName > rNewEntry.aName )
- return TRUE;
+ return sal_True;
if ( !(pCurLstObj->aName == rNewEntry.aName) )
- return FALSE;
+ return sal_False;
break;
case (FSYS_SORT_NAME | FSYS_SORT_DESCENDING):
if ( pCurLstObj->aName < rNewEntry.aName )
- return TRUE;
+ return sal_True;
if ( !(pCurLstObj->aName == rNewEntry.aName) )
- return FALSE;
+ return sal_False;
break;
case FSYS_SORT_EXT:
case (FSYS_SORT_EXT | FSYS_SORT_ASCENDING):
{
if ( pCurLstObj->GetExtension() > rNewEntry.GetExtension() )
- return TRUE;
+ return sal_True;
if ( !(pCurLstObj->GetExtension() == rNewEntry.GetExtension()) )
- return FALSE;
+ return sal_False;
break;
}
case (FSYS_SORT_EXT | FSYS_SORT_DESCENDING):
{
if ( pCurLstObj->GetExtension() < rNewEntry.GetExtension() )
- return TRUE;
+ return sal_True;
if ( !(pCurLstObj->GetExtension() == rNewEntry.GetExtension()) )
- return FALSE;
+ return sal_False;
break;
}
case FSYS_SORT_KIND:
case (FSYS_SORT_KIND | FSYS_SORT_ASCENDING ):
if ( VALUE(pOldStat->nKindFlags) > VALUE(rNewStat.nKindFlags) )
- return TRUE;
+ return sal_True;
if ( !(VALUE(pOldStat->nKindFlags) == VALUE(rNewStat.nKindFlags)) )
- return FALSE;
+ return sal_False;
break;
case (FSYS_SORT_KIND | FSYS_SORT_DESCENDING):
if ( VALUE(pOldStat->nKindFlags) < VALUE(rNewStat.nKindFlags) )
- return TRUE;
+ return sal_True;
if ( !(VALUE(pOldStat->nKindFlags) == VALUE(rNewStat.nKindFlags)) )
- return FALSE;
+ return sal_False;
break;
case FSYS_SORT_SIZE:
case (FSYS_SORT_SIZE | FSYS_SORT_ASCENDING):
if ( pOldStat->nSize > rNewStat.nSize )
- return TRUE;
+ return sal_True;
if ( !(pOldStat->nSize == rNewStat.nSize) )
- return FALSE;
+ return sal_False;
break;
case (FSYS_SORT_SIZE | FSYS_SORT_DESCENDING):
if ( pOldStat->nSize < rNewStat.nSize )
- return TRUE;
+ return sal_True;
if ( !(pOldStat->nSize == rNewStat.nSize) )
- return FALSE;
+ return sal_False;
break;
case FSYS_SORT_MODIFYED:
case (FSYS_SORT_MODIFYED | FSYS_SORT_ASCENDING):
if ( (pOldStat->aDateModified >= rNewStat.aDateModified) &&
(pOldStat->aTimeModified > rNewStat.aTimeModified) )
- return TRUE;
+ return sal_True;
if ( !((pOldStat->aDateModified == rNewStat.aDateModified) &&
(pOldStat->aTimeModified == rNewStat.aTimeModified)) )
- return FALSE;
+ return sal_False;
break;
case (FSYS_SORT_MODIFYED | FSYS_SORT_DESCENDING):
if ( (pOldStat->aDateModified <= rNewStat.aDateModified) &&
(pOldStat->aTimeModified < rNewStat.aTimeModified) )
- return TRUE;
+ return sal_True;
if ( !((pOldStat->aDateModified == rNewStat.aDateModified) &&
(pOldStat->aTimeModified == rNewStat.aTimeModified)) )
- return FALSE;
+ return sal_False;
break;
case FSYS_SORT_CREATED:
case (FSYS_SORT_CREATED | FSYS_SORT_ASCENDING):
if ( (pOldStat->aDateCreated >= rNewStat.aDateCreated) &&
(pOldStat->aTimeCreated > rNewStat.aTimeCreated) )
- return TRUE;
+ return sal_True;
if ( !((pOldStat->aDateCreated == rNewStat.aDateCreated) &&
(pOldStat->aTimeCreated == rNewStat.aTimeCreated)) )
- return FALSE;
+ return sal_False;
break;
case (FSYS_SORT_CREATED | FSYS_SORT_DESCENDING):
if ( (pOldStat->aDateCreated <= rNewStat.aDateCreated) &&
(pOldStat->aTimeCreated < rNewStat.aTimeCreated) )
- return TRUE;
+ return sal_True;
if ( !((pOldStat->aDateCreated == rNewStat.aDateCreated) &&
(pOldStat->aTimeCreated == rNewStat.aTimeCreated)) )
- return FALSE;
+ return sal_False;
break;
case FSYS_SORT_ACCESSED:
case (FSYS_SORT_ACCESSED | FSYS_SORT_ASCENDING):
if ( (pOldStat->aDateAccessed >= rNewStat.aDateAccessed) &&
(pOldStat->aTimeAccessed > rNewStat.aTimeAccessed) )
- return TRUE;
+ return sal_True;
if ( !((pOldStat->aDateAccessed == rNewStat.aDateAccessed) &&
(pOldStat->aTimeAccessed == rNewStat.aTimeAccessed)) )
- return FALSE;
+ return sal_False;
break;
case (FSYS_SORT_ACCESSED | FSYS_SORT_DESCENDING):
if ( (pOldStat->aDateAccessed <= rNewStat.aDateAccessed) &&
(pOldStat->aTimeAccessed < rNewStat.aTimeAccessed) )
- return TRUE;
+ return sal_True;
if ( !((pOldStat->aDateAccessed == rNewStat.aDateAccessed) &&
(pOldStat->aTimeAccessed == rNewStat.aTimeAccessed)) )
- return FALSE;
+ return sal_False;
break;
default: /* Kann nicht sein */;
}
if ( nSortIndex == ( pSortLst->Count() - 1 ) )
- return TRUE;
+ return sal_True;
else
//Rekursion
return ImpInsertPointReached( rNewEntry, rNewStat,
@@ -226,7 +226,7 @@ void Dir::ImpSortedInsert( const DirEntry *pNewEntry, const FileStat *pNewStat )
pLst->First();
do {
if ( ImpInsertPointReached( *pNewEntry, *pNewStat, pLst->GetCurPos(),
- (ULONG)0 ) )
+ (sal_uIntPtr)0 ) )
{
if ( pStatLst )
pStatLst->Insert( (FileStat*)pNewStat, pLst->GetCurPos() );
@@ -285,7 +285,7 @@ void Dir::Construct( DirEntryKind nKindFlags )
|*
*************************************************************************/
-BOOL Dir::Update()
+sal_Bool Dir::Update()
{
Reset();
return Scan( USHRT_MAX ) > 0;
@@ -377,10 +377,10 @@ void Dir::Reset()
|*
*************************************************************************/
-USHORT Dir::Scan( USHORT nCount )
+sal_uInt16 Dir::Scan( sal_uInt16 nCount )
{
- USHORT nRead = 0; // Anzahl in dieser Runde gelesener Eintr"age
+ sal_uInt16 nRead = 0; // Anzahl in dieser Runde gelesener Eintr"age
FSysFailOnErrorImpl();
// noch nicht fertig gewesen
@@ -390,7 +390,7 @@ USHORT Dir::Scan( USHORT nCount )
if ( !pLst->Count() )
{
// dann ggf. Laufwerke scannen
- pReader->bInUse = TRUE;
+ pReader->bInUse = sal_True;
nRead = pReader->Init();
}
@@ -548,7 +548,7 @@ Dir::~Dir()
FSysError Dir::ImpSetSort( std::va_list pArgs, int nFirstSort )
{
- BOOL bLast;
+ sal_Bool bLast;
FSysSort *pSort;
FSysSortList *pNewSortLst = new FSysSortList;
@@ -559,8 +559,8 @@ FSysError Dir::ImpSetSort( std::va_list pArgs, int nFirstSort )
bLast = FSYS_SORT_END == (*pSort & FSYS_SORT_END);
*pSort &= ~FSYS_SORT_END;
- FSysSort nSort = *pSort & ~(USHORT)FSYS_SORT_ASCENDING
- & ~(USHORT)FSYS_SORT_DESCENDING;
+ FSysSort nSort = *pSort & ~(sal_uInt16)FSYS_SORT_ASCENDING
+ & ~(sal_uInt16)FSYS_SORT_DESCENDING;
// g"utliges Sortierkriterium?
if ( ( nSort == FSYS_SORT_NAME ) ||
@@ -692,7 +692,7 @@ FSysError Dir::SetSort( FSysSort nSort, ... )
|*
*************************************************************************/
-DirEntry& Dir::operator[] ( USHORT nIndex ) const
+DirEntry& Dir::operator[] ( sal_uInt16 nIndex ) const
{
DBG_ASSERT( nIndex < Count(), "Dir::operator[] : nIndex > Count()" );
@@ -722,18 +722,18 @@ Dir& Dir::operator+=( const Dir& rDir )
pLst = new DirEntryList();
//Verlangen die Sortierkriterien FileStat's?
- BOOL bStat = FALSE;
+ sal_Bool bStat = sal_False;
if ( pSortLst ) {
pSortLst->First();
do {
if ( *(pSortLst->GetCurObject()) &
( FSYS_SORT_CREATED | FSYS_SORT_MODIFYED | FSYS_SORT_SIZE |
FSYS_SORT_ACCESSED | FSYS_SORT_KIND ) )
- bStat = TRUE;
+ bStat = sal_True;
} while ( !bStat && pSortLst->Next() );
}
FileStat * stat = NULL;
- for ( USHORT nNr = 0; nNr < rDir.Count(); nNr++ )
+ for ( sal_uInt16 nNr = 0; nNr < rDir.Count(); nNr++ )
{
if ( bStat )
{
@@ -758,11 +758,11 @@ Dir& Dir::operator+=( const Dir& rDir )
*************************************************************************/
-USHORT Dir::Count( BOOL bUpdated ) const
+sal_uInt16 Dir::Count( sal_Bool bUpdated ) const
{
// ggf. erst den Rest lesen
if ( bUpdated && pReader )
((Dir*)this)->Scan( USHRT_MAX );
- return pLst == NULL ? 0 : (USHORT) pLst->Count();
+ return pLst == NULL ? 0 : (sal_uInt16) pLst->Count();
}
diff --git a/tools/source/fsys/unx.cxx b/tools/source/fsys/unx.cxx
index 13da80f6ccca..94e2ce5950a4 100644
--- a/tools/source/fsys/unx.cxx
+++ b/tools/source/fsys/unx.cxx
@@ -95,18 +95,18 @@ struct mymnttab
#if defined(NETBSD) || defined(FREEBSD) || defined(MACOSX)
-BOOL GetMountEntry(dev_t /* dev */, struct mymnttab * /* mytab */ )
+sal_Bool GetMountEntry(dev_t /* dev */, struct mymnttab * /* mytab */ )
{
DBG_WARNING( "Sorry, not implemented: GetMountEntry" );
- return FALSE;
+ return sal_False;
}
#elif defined AIX
-BOOL GetMountEntry(dev_t dev, struct mymnttab *mytab)
+sal_Bool GetMountEntry(dev_t dev, struct mymnttab *mytab)
{
int bufsize;
if (mntctl (MCTL_QUERY, sizeof bufsize, (char*) &bufsize))
- return FALSE;
+ return sal_False;
char* buffer = (char *)malloc( bufsize * sizeof(char) );
if (mntctl (MCTL_QUERY, bufsize, buffer) != -1)
@@ -127,40 +127,40 @@ BOOL GetMountEntry(dev_t dev, struct mymnttab *mytab)
+= vmt2dataptr((struct vmount*)vmt, VMT_OBJECT);
mytab->mountdevice = dev;
free( buffer );
- return TRUE;
+ return sal_True;
}
}
free( buffer );
- return FALSE;
+ return sal_False;
}
#else
-static BOOL GetMountEntry(dev_t dev, struct mymnttab *mytab)
+static sal_Bool GetMountEntry(dev_t dev, struct mymnttab *mytab)
{
#if defined SOLARIS || defined SINIX
FILE *fp = fopen (MNTTAB, "r");
if (! fp)
- return FALSE;
+ return sal_False;
struct mnttab mnt[1];
while (getmntent (fp, mnt) != -1)
#elif defined SCO
FILE *fp = fopen (MNTTAB, "r");
if (! fp)
- return FALSE;
+ return sal_False;
struct mnttab mnt[1];
while (fread (&mnt, sizeof mnt, 1, fp) > 0)
#elif defined DECUNIX || defined AIX
FILE *fp = NULL;
if (! fp)
- return FALSE;
+ return sal_False;
struct mnttab mnt[1];
while ( 0 )
#else
FILE *fp = setmntent (MOUNTED, "r");
if (! fp)
- return FALSE;
+ return sal_False;
struct mnttab *mnt;
while ((mnt = getmntent (fp)) != NULL)
#endif
@@ -196,7 +196,7 @@ static BOOL GetMountEntry(dev_t dev, struct mymnttab *mytab)
#else
mytab->mymnttab_filesystem = "ext2"; //default ist case sensitiv unter unix
#endif
- return TRUE;
+ return sal_True;
}
# ifdef LINUX
/* #61624# dito */
@@ -204,7 +204,7 @@ static BOOL GetMountEntry(dev_t dev, struct mymnttab *mytab)
# else
fclose (fp);
# endif
- return FALSE;
+ return sal_False;
}
#endif
@@ -219,13 +219,13 @@ static BOOL GetMountEntry(dev_t dev, struct mymnttab *mytab)
|*
*************************************************************************/
-BOOL DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const
+sal_Bool DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const
{
if (eFormatter==FSYS_STYLE_HOST)
{
#ifdef NETBSD
- return TRUE;
+ return sal_True;
#else
struct stat buf;
DirEntry aPath(*this);
@@ -235,7 +235,7 @@ BOOL DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const
{
if (aPath.Level() == 1)
{
- return TRUE; // ich bin unter UNIX, also ist der default im Zweifelsfall case sensitiv
+ return sal_True; // ich bin unter UNIX, also ist der default im Zweifelsfall case sensitiv
}
aPath = aPath [1];
}
@@ -249,17 +249,17 @@ BOOL DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const
(fsmnt.mymnttab_filesystem.CompareTo("smb") ==COMPARE_EQUAL) ||
(fsmnt.mymnttab_filesystem.CompareTo("ncpfs")==COMPARE_EQUAL))
{
- return FALSE;
+ return sal_False;
}
else
{
- return TRUE;
+ return sal_True;
}
#endif
}
else
{
- BOOL isCaseSensitive = TRUE; // ich bin unter UNIX, also ist der default im Zweifelsfall case sensitiv
+ sal_Bool isCaseSensitive = sal_True; // ich bin unter UNIX, also ist der default im Zweifelsfall case sensitiv
switch ( eFormatter )
{
case FSYS_STYLE_MAC:
@@ -269,19 +269,19 @@ BOOL DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const
case FSYS_STYLE_NWFS:
case FSYS_STYLE_HPFS:
{
- isCaseSensitive = FALSE;
+ isCaseSensitive = sal_False;
break;
}
case FSYS_STYLE_SYSV:
case FSYS_STYLE_BSD:
case FSYS_STYLE_DETECT:
{
- isCaseSensitive = TRUE;
+ isCaseSensitive = sal_True;
break;
}
default:
{
- isCaseSensitive = TRUE; // ich bin unter UNIX, also ist der default im Zweifelsfall case sensitiv
+ isCaseSensitive = sal_True; // ich bin unter UNIX, also ist der default im Zweifelsfall case sensitiv
break;
}
}
@@ -299,16 +299,16 @@ BOOL DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const
|*
*************************************************************************/
-BOOL DirEntry::ToAbs()
+sal_Bool DirEntry::ToAbs()
{
if ( FSYS_FLAG_VOLUME == eFlag )
{
eFlag = FSYS_FLAG_ABSROOT;
- return TRUE;
+ return sal_True;
}
if ( IsAbs() )
- return TRUE;
+ return sal_True;
char sBuf[MAXPATHLEN + 1];
*this = DirEntry( String( getcwd( sBuf, MAXPATHLEN ), osl_getThreadTextEncoding() ) ) + *this;
@@ -379,7 +379,7 @@ DirEntry DirEntry::GetDevice() const
|*
*************************************************************************/
-BOOL DirEntry::SetCWD( BOOL bSloppy ) const
+sal_Bool DirEntry::SetCWD( sal_Bool bSloppy ) const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -387,31 +387,31 @@ BOOL DirEntry::SetCWD( BOOL bSloppy ) const
ByteString aPath( GetFull(), osl_getThreadTextEncoding());
if ( !chdir( aPath.GetBuffer() ) )
{
- return TRUE;
+ return sal_True;
}
else
{
if ( bSloppy && !chdir(aPath.GetBuffer()) )
{
- return TRUE;
+ return sal_True;
}
else
{
- return FALSE;
+ return sal_False;
}
}
}
//-------------------------------------------------------------------------
-USHORT DirReader_Impl::Init()
+sal_uInt16 DirReader_Impl::Init()
{
return 0;
}
//-------------------------------------------------------------------------
-USHORT DirReader_Impl::Read()
+sal_uInt16 DirReader_Impl::Read()
{
if (!pDosDir)
{
@@ -420,7 +420,7 @@ USHORT DirReader_Impl::Read()
if (!pDosDir)
{
- bReady = TRUE;
+ bReady = sal_True;
return 0;
}
@@ -437,7 +437,7 @@ USHORT DirReader_Impl::Read()
: FSYS_FLAG_NORMAL;
DirEntry *pTemp = new DirEntry( ByteString(pDosEntry->d_name), eFlag, FSYS_STYLE_UNX );
if ( pParent )
- pTemp->ImpChangeParent( new DirEntry( *pParent ), FALSE);
+ pTemp->ImpChangeParent( new DirEntry( *pParent ), sal_False);
FileStat aStat( *pTemp );
if ( ( ( ( pDir->eAttrMask & FSYS_KIND_DIR ) &&
( aStat.IsKind( FSYS_KIND_DIR ) ) ) ||
@@ -457,7 +457,7 @@ USHORT DirReader_Impl::Read()
}
}
else
- bReady = TRUE;
+ bReady = sal_True;
return 0;
}
@@ -490,7 +490,7 @@ FileStat::FileStat( const void *, const void * ):
|* Letzte Aenderung MA 07.11.91
|*
*************************************************************************/
-BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL )
+sal_Bool FileStat::Update( const DirEntry& rDirEntry, sal_Bool )
{
nSize = 0;
@@ -507,7 +507,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL )
if ( !rDirEntry.IsValid() )
{
nError = FSYS_ERR_NOTEXISTS;
- return FALSE;
+ return sal_False;
}
// Sonderbehandlung falls es sich um eine Root handelt
@@ -515,7 +515,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL )
{
nKindFlags = FSYS_KIND_DIR;
nError = FSYS_ERR_OK;
- return TRUE;
+ return sal_True;
}
struct stat aStat;
@@ -536,11 +536,11 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL )
{
nKindFlags = FSYS_KIND_WILD;
nError = FSYS_ERR_OK;
- return TRUE;
+ return sal_True;
}
nError = FSYS_ERR_NOTEXISTS;
- return FALSE;
+ return sal_False;
}
nError = FSYS_ERR_OK;
@@ -562,7 +562,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL )
Unx2DateAndTime( aStat.st_mtime, aTimeModified, aDateModified );
Unx2DateAndTime( aStat.st_atime, aTimeAccessed, aDateAccessed );
- return TRUE;
+ return sal_True;
}
//====================================================================
@@ -654,7 +654,7 @@ ErrCode FileStat::QueryDiskSpace( const String &, BigInt &, BigInt & )
//=========================================================================
-void FSysEnableSysErrorBox( BOOL )
+void FSysEnableSysErrorBox( sal_Bool )
{
}
diff --git a/tools/source/fsys/wldcrd.cxx b/tools/source/fsys/wldcrd.cxx
index 293d16877498..16c71cbc51d5 100644..100755
--- a/tools/source/fsys/wldcrd.cxx
+++ b/tools/source/fsys/wldcrd.cxx
@@ -48,7 +48,7 @@
*
*/
-USHORT WildCard::ImpMatch( const char *pWild, const char *pStr ) const
+sal_uInt16 WildCard::ImpMatch( const char *pWild, const char *pStr ) const
{
int pos=0;
int flag=0;
@@ -117,12 +117,12 @@ USHORT WildCard::ImpMatch( const char *pWild, const char *pStr ) const
|*
*************************************************************************/
-BOOL WildCard::Matches( const String& rString ) const
+sal_Bool WildCard::Matches( const String& rString ) const
{
ByteString aTmpWild = aWildString;
ByteString aString(rString, osl_getThreadTextEncoding());
- USHORT nSepPos;
+ sal_uInt16 nSepPos;
if ( cSepSymbol != '\0' )
{
@@ -130,14 +130,14 @@ BOOL WildCard::Matches( const String& rString ) const
{
// alle getrennten WildCard's pruefen
if ( ImpMatch( aTmpWild.Copy( 0, nSepPos ).GetBuffer(), aString.GetBuffer() ) )
- return TRUE;
+ return sal_True;
aTmpWild.Erase( 0, nSepPos + 1 ); // Trennsymbol entfernen
}
// und noch den hinter dem letzen Trennsymbol bzw. den einzigen
}
if ( ImpMatch( aTmpWild.GetBuffer(), aString.GetBuffer() ) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
diff --git a/tools/source/fsys/wntmsc.cxx b/tools/source/fsys/wntmsc.cxx
index a8cf1c1eecec..17421d83feaa 100644..100755
--- a/tools/source/fsys/wntmsc.cxx
+++ b/tools/source/fsys/wntmsc.cxx
@@ -52,7 +52,7 @@ DECLARE_LIST( FileStatList, FileStat* );
int Sys2SolarError_Impl( int nSysErr );
-static BOOL bLastCaseSensitive = FALSE;
+static sal_Bool bLastCaseSensitive = sal_False;
//--------------------------------------------------------------------
@@ -103,7 +103,7 @@ struct dirent *readdir( DIR *pDir )
int closedir( DIR *pDir )
{
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
if ( pDir )
{
bOk = 0 != pDir->p || FindClose( pDir->h );
@@ -136,7 +136,7 @@ ErrCode GetPathStyle_Impl( const String &rDevice, FSysPathStyle &rStyle )
// Windows95 hat VFAT, WindowsNT nicht
DWORD nVer = GetVersion();
- BOOL bW95 = ( nVer & 0xFF ) >= 4;
+ sal_Bool bW95 = ( nVer & 0xFF ) >= 4;
FSysFailOnErrorImpl();
rStyle = FSYS_STYLE_UNKNOWN;
@@ -185,7 +185,7 @@ FSysPathStyle DirEntry::GetPathStyle( const String &rDevice )
|*
*************************************************************************/
-BOOL DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const
+sal_Bool DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const
{
if (eFormatter==FSYS_STYLE_HOST)
@@ -194,7 +194,7 @@ BOOL DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const
DirEntry aRoot(*this);
aRoot.ToAbs();
aRoot = aRoot[Level()-1];
- String aRootDir = aRoot.GetFull(FSYS_STYLE_HOST, TRUE);
+ String aRootDir = aRoot.GetFull(FSYS_STYLE_HOST, sal_True);
char sVolumeName[256];
DWORD nVolumeSerial;
@@ -211,30 +211,30 @@ BOOL DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const
sFileSysName,
16 ))
{
- return (nFlags & FS_CASE_SENSITIVE) ? TRUE : FALSE;
+ return (nFlags & FS_CASE_SENSITIVE) ? sal_True : sal_False;
}
else
{
- return FALSE;
+ return sal_False;
}
*/
//
// guter versuch, aber FS_CASE_SENSITIVE ist D?nnsinn in T?ten:
//
// sFileSysName FS_CASE_SENSITIVE
- // FAT FALSE
- // NTFS TRUE !!!
- // NWCompat FALSE
- // Samba FALSE
+ // FAT sal_False
+ // NTFS sal_True !!!
+ // NWCompat sal_False
+ // Samba sal_False
//
// NT spricht auch NTFS lediglich case preserving an, also ist unter NT alles case insensitiv
//
- return FALSE;
+ return sal_False;
}
else
{
- BOOL isCaseSensitive = FALSE; // ich bin unter win32, also ist der default case insensitiv
+ sal_Bool isCaseSensitive = sal_False; // ich bin unter win32, also ist der default case insensitiv
switch ( eFormatter )
{
case FSYS_STYLE_MAC:
@@ -245,18 +245,18 @@ BOOL DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const
case FSYS_STYLE_HPFS:
case FSYS_STYLE_DETECT:
{
- isCaseSensitive = FALSE;
+ isCaseSensitive = sal_False;
break;
}
case FSYS_STYLE_SYSV:
case FSYS_STYLE_BSD:
{
- isCaseSensitive = TRUE;
+ isCaseSensitive = sal_True;
break;
}
default:
{
- isCaseSensitive = FALSE; // ich bin unter win32, also ist der default case insensitiv
+ isCaseSensitive = sal_False; // ich bin unter win32, also ist der default case insensitiv
break;
}
}
@@ -274,19 +274,19 @@ BOOL DirEntry::IsCaseSensitive( FSysPathStyle eFormatter ) const
|*
*************************************************************************/
-BOOL DirEntry::ToAbs()
+sal_Bool DirEntry::ToAbs()
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
if ( FSYS_FLAG_VOLUME == eFlag )
{
eFlag = FSYS_FLAG_ABSROOT;
- return TRUE;
+ return sal_True;
}
if ( IsAbs() )
{
- return TRUE;
+ return sal_True;
}
@@ -295,10 +295,10 @@ BOOL DirEntry::ToAbs()
ByteString aFullName( GetFull(), osl_getThreadTextEncoding() );
FSysFailOnErrorImpl();
if ( GetFullPathName((char*)aFullName.GetBuffer(),256,sBuf,&pOld) > 511 )
- return FALSE;
+ return sal_False;
*this = DirEntry( String(sBuf, osl_getThreadTextEncoding() ));
- return TRUE;
+ return sal_True;
}
@@ -364,27 +364,27 @@ String DirEntry::GetVolume() const
|*
*************************************************************************/
-BOOL DirEntry::SetCWD( BOOL bSloppy ) const
+sal_Bool DirEntry::SetCWD( sal_Bool bSloppy ) const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
FSysFailOnErrorImpl();
if ( eFlag == FSYS_FLAG_CURRENT && !aName.Len() )
- return TRUE;
+ return sal_True;
if ( SetCurrentDirectory(ByteString(GetFull(), osl_getThreadTextEncoding()).GetBuffer()) )
{
- return TRUE;
+ return sal_True;
}
if ( bSloppy && pParent &&
SetCurrentDirectory(ByteString(pParent->GetFull(), osl_getThreadTextEncoding()).GetBuffer()) )
{
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//-------------------------------------------------------------------------
@@ -444,7 +444,7 @@ USHORT DirReader_Impl::Read()
CharLowerBuff( (char*) aLowerName.GetBuffer(), aLowerName.Len() );
// Flags pruefen
- BOOL bIsDirAndWantsDir =
+ sal_Bool bIsDirAndWantsDir =
( ( pDir->eAttrMask & FSYS_KIND_DIR ) &&
#ifdef ICC
( pDosEntry->d_type & ( strcmp(pDosEntry->d_name,".") ||
@@ -452,7 +452,7 @@ USHORT DirReader_Impl::Read()
#else
( pDosEntry->d_type & DOS_DIRECT ) );
#endif
- BOOL bIsFileAndWantsFile =
+ sal_Bool bIsFileAndWantsFile =
( ( pDir->eAttrMask & FSYS_KIND_FILE ) &&
#ifdef ICC
!( pDosEntry->d_type & ( strcmp(pDosEntry->d_name,".") ||
@@ -461,8 +461,8 @@ USHORT DirReader_Impl::Read()
!( pDosEntry->d_type & DOS_DIRECT ) &&
#endif
!( pDosEntry->d_type & DOS_VOLUMEID ) );
- BOOL bIsHidden = (pDosEntry->d_type & _A_HIDDEN) != 0;
- BOOL bWantsHidden = 0 == ( pDir->eAttrMask & FSYS_KIND_VISIBLE );
+ sal_Bool bIsHidden = (pDosEntry->d_type & _A_HIDDEN) != 0;
+ sal_Bool bWantsHidden = 0 == ( pDir->eAttrMask & FSYS_KIND_VISIBLE );
if ( ( bIsDirAndWantsDir || bIsFileAndWantsFile ) &&
( bWantsHidden || !bIsHidden ) &&
pDir->aNameMask.Matches( String(aLowerName, osl_getThreadTextEncoding()) ) )
@@ -483,7 +483,7 @@ USHORT DirReader_Impl::Read()
pTemp->ImpSetStat( new FileStat( (void*) pDosDir, (void*) 0 ) );
#endif
if ( pParent )
- pTemp->ImpChangeParent( new DirEntry( *pParent ), FALSE );
+ pTemp->ImpChangeParent( new DirEntry( *pParent ), sal_False );
if ( pDir->pStatLst ) //Status fuer Sort gewuenscht?
{
FileStat *pNewStat = new FileStat( (void*) pDosDir, (void*) 0 );
@@ -502,7 +502,7 @@ USHORT DirReader_Impl::Read()
}
else
- bReady = TRUE;
+ bReady = sal_True;
return 0;
}
@@ -793,13 +793,13 @@ HRESULT SHResolvePath( HWND hwndOwner, LPCTSTR pszPath, LPITEMIDLIST *ppidl )
// The Wrapper
//---------------------------------------------------------------------------
-BOOL Exists_Impl( const ByteString & crPath )
+sal_Bool Exists_Impl( const ByteString & crPath )
{
// We do not know if OLE was initialized for this thread
CoInitialize( NULL );
- BOOL bSuccess = SUCCEEDED( SHResolvePath(NULL, crPath.GetBuffer(), NULL) );
+ sal_Bool bSuccess = SUCCEEDED( SHResolvePath(NULL, crPath.GetBuffer(), NULL) );
CoUninitialize();
@@ -808,7 +808,7 @@ BOOL Exists_Impl( const ByteString & crPath )
//---------------------------------------------------------------------------
-BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess )
+sal_Bool FileStat::Update( const DirEntry& rDirEntry, sal_Bool bForceAccess )
{
nSize = 0;
nKindFlags = 0;
@@ -825,7 +825,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess )
{
nError = FSYS_ERR_UNKNOWN;
nKindFlags = 0;
- return FALSE;
+ return sal_False;
}
// Sonderbehandlung falls es sich um eine Root ohne Laufwerk handelt
@@ -834,7 +834,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess )
{
nKindFlags = FSYS_KIND_DIR;
nError = FSYS_ERR_OK;
- return TRUE;
+ return sal_True;
}
// keine Error-Boxen anzeigen
@@ -849,7 +849,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess )
// ist ein Medium im Laufwerk?
HACK("wie?")
- BOOL bAccess = TRUE;
+ sal_Bool bAccess = sal_True;
const DirEntry *pTop = aDirEntry.ImpGetTopPtr();
ByteString aName = ByteString(pTop->aName).ToLowerAscii();
if ( !bForceAccess &&
@@ -857,7 +857,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess )
pTop->eFlag == FSYS_FLAG_RELROOT ||
pTop->eFlag == FSYS_FLAG_VOLUME ) )
if ( aName == "a:" || aName == "b:" )
- bAccess = FALSE;
+ bAccess = sal_False;
else
DBG_TRACE( "FSys: will access removable device!" );
if ( bAccess && ( aName == "a:" || aName == "b:" ) ) {
@@ -881,7 +881,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess )
nKindFlags |= FSYS_KIND_REMOVEABLE;
nError = FSYS_ERR_NOTEXISTS;
nKindFlags = 0;
- return FALSE;
+ return sal_False;
}
ByteString aRootDir = aDirEntry.aName;
@@ -891,7 +891,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess )
{
nError = FSYS_ERR_NOTEXISTS;
nKindFlags = 0;
- return FALSE;
+ return sal_False;
}
if ( aDirEntry.eFlag == FSYS_FLAG_VOLUME )
@@ -905,7 +905,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess )
nError = ERRCODE_NONE;
- return TRUE;
+ return sal_True;
}
// Statusinformation vom Betriebssystem holen
@@ -945,7 +945,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess )
{
nKindFlags = FSYS_KIND_UNKNOWN;
nError = FSYS_ERR_NOTEXISTS;
- return FALSE;
+ return sal_False;
}
// UNC-Volume?
@@ -959,13 +959,13 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess )
{
nKindFlags = FSYS_KIND_DIR|FSYS_KIND_REMOTE;
nError = FSYS_ERR_OK;
- return TRUE;
+ return sal_True;
}
else
{
nKindFlags = FSYS_KIND_UNKNOWN;
nError = FSYS_ERR_NOTEXISTS;
- return FALSE;
+ return sal_False;
}
}
}
@@ -984,7 +984,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess )
{
nKindFlags = FSYS_KIND_WILD;
nError = FSYS_ERR_OK;
- return TRUE;
+ return sal_True;
}
if ( bAccess )
@@ -1008,7 +1008,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess )
}
-BOOL IsRedirectable_Impl( const ByteString &rPath )
+sal_Bool IsRedirectable_Impl( const ByteString &rPath )
{
if ( rPath.Len() >= 3 && ':' == rPath.GetBuffer()[1] )
{
@@ -1017,7 +1017,7 @@ BOOL IsRedirectable_Impl( const ByteString &rPath )
SetLastError( ERROR_SUCCESS );
return DRIVE_FIXED != nType;
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -1067,7 +1067,7 @@ ErrCode FileStat::QueryDiskSpace( const String &rPath,
//=========================================================================
-void FSysEnableSysErrorBox( BOOL bEnable )
+void FSysEnableSysErrorBox( sal_Bool bEnable )
{ // Preserve other Bits!!
sal_uInt32 nErrorMode = SetErrorMode( bEnable ? 0 : SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX );
if ( bEnable )
diff --git a/tools/source/fsys/wntmsc.hxx b/tools/source/fsys/wntmsc.hxx
index a6202cc71cc6..d84e5af9680b 100644..100755
--- a/tools/source/fsys/wntmsc.hxx
+++ b/tools/source/fsys/wntmsc.hxx
@@ -51,7 +51,7 @@
//--------------------------------------------------------------------
-#define FSYS_UNIX FALSE
+#define FSYS_UNIX sal_False
#define DOS_DIRECT _A_SUBDIR
#define DOS_VOLUMEID 0x08
@@ -88,7 +88,7 @@ typedef struct
#define START_DRV 'a'
-inline BOOL DRIVE_EXISTS(char c)
+inline sal_Bool DRIVE_EXISTS(char c)
{
ByteString aDriveRoot( c );
aDriveRoot += ":\\";
diff --git a/tools/source/generic/bigint.cxx b/tools/source/generic/bigint.cxx
index 7b10f31d733f..027105767063 100644
--- a/tools/source/generic/bigint.cxx
+++ b/tools/source/generic/bigint.cxx
@@ -49,7 +49,7 @@ static const long MY_MINSHORT = -MY_MAXSHORT;
* sind diese Algorithmen im Kapitel 4.3.1. The Classical Algorithms.
*/
-// Muss auf UINT16/INT16/UINT32/INT32 umgestellt werden !!! W.P.
+// Muss auf sal_uInt16/INT16/sal_uInt32/sal_Int32 umgestellt werden !!! W.P.
// -----------------------------------------------------------------------
@@ -649,7 +649,7 @@ BigInt::BigInt( sal_uInt32 nValue )
// -----------------------------------------------------------------------
-BigInt::operator ULONG() const
+BigInt::operator sal_uIntPtr() const
{
if ( !bIsBig )
return (sal_uInt32)nVal;
diff --git a/tools/source/generic/color.cxx b/tools/source/generic/color.cxx
index 5dc41f292668..ec325b9ca3d3 100644
--- a/tools/source/generic/color.cxx
+++ b/tools/source/generic/color.cxx
@@ -63,10 +63,10 @@ Color::Color( const ResId& rResId )
pResMgr->Increment( sizeof( RSHEADER_TYPE ) );
// Daten laden
- USHORT nRed = pResMgr->ReadShort();
- USHORT nGreen = pResMgr->ReadShort();
- USHORT nBlue = pResMgr->ReadShort();
- // one more historical ULONG
+ sal_uInt16 nRed = pResMgr->ReadShort();
+ sal_uInt16 nGreen = pResMgr->ReadShort();
+ sal_uInt16 nBlue = pResMgr->ReadShort();
+ // one more historical sal_uIntPtr
pResMgr->ReadLong();
// RGB-Farbe
@@ -77,60 +77,60 @@ Color::Color( const ResId& rResId )
mnColor = RGB_COLORDATA( 0, 0, 0 );
}
}
-UINT8 Color::GetColorError( const Color& rCompareColor ) const
+sal_uInt8 Color::GetColorError( const Color& rCompareColor ) const
{
const long nErrAbs = labs( (long) rCompareColor.GetRed() - GetRed() ) +
labs( (long) rCompareColor.GetGreen() - GetGreen() ) +
labs( (long) rCompareColor.GetBlue() - GetBlue() );
- return (UINT8) _FRound( nErrAbs * 0.3333333333 );
+ return (sal_uInt8) _FRound( nErrAbs * 0.3333333333 );
}
// -----------------------------------------------------------------------
-void Color::IncreaseLuminance( UINT8 cLumInc )
+void Color::IncreaseLuminance( sal_uInt8 cLumInc )
{
- SetRed( (UINT8) VOS_BOUND( (long) COLORDATA_RED( mnColor ) + cLumInc, 0L, 255L ) );
- SetGreen( (UINT8) VOS_BOUND( (long) COLORDATA_GREEN( mnColor ) + cLumInc, 0L, 255L ) );
- SetBlue( (UINT8) VOS_BOUND( (long) COLORDATA_BLUE( mnColor ) + cLumInc, 0L, 255L ) );
+ SetRed( (sal_uInt8) VOS_BOUND( (long) COLORDATA_RED( mnColor ) + cLumInc, 0L, 255L ) );
+ SetGreen( (sal_uInt8) VOS_BOUND( (long) COLORDATA_GREEN( mnColor ) + cLumInc, 0L, 255L ) );
+ SetBlue( (sal_uInt8) VOS_BOUND( (long) COLORDATA_BLUE( mnColor ) + cLumInc, 0L, 255L ) );
}
// -----------------------------------------------------------------------
-void Color::DecreaseLuminance( UINT8 cLumDec )
+void Color::DecreaseLuminance( sal_uInt8 cLumDec )
{
- SetRed( (UINT8) VOS_BOUND( (long) COLORDATA_RED( mnColor ) - cLumDec, 0L, 255L ) );
- SetGreen( (UINT8) VOS_BOUND( (long) COLORDATA_GREEN( mnColor ) - cLumDec, 0L, 255L ) );
- SetBlue( (UINT8) VOS_BOUND( (long) COLORDATA_BLUE( mnColor ) - cLumDec, 0L, 255L ) );
+ SetRed( (sal_uInt8) VOS_BOUND( (long) COLORDATA_RED( mnColor ) - cLumDec, 0L, 255L ) );
+ SetGreen( (sal_uInt8) VOS_BOUND( (long) COLORDATA_GREEN( mnColor ) - cLumDec, 0L, 255L ) );
+ SetBlue( (sal_uInt8) VOS_BOUND( (long) COLORDATA_BLUE( mnColor ) - cLumDec, 0L, 255L ) );
}
// -----------------------------------------------------------------------
-void Color::IncreaseContrast( UINT8 cContInc )
+void Color::IncreaseContrast( sal_uInt8 cContInc )
{
if( cContInc)
{
const double fM = 128.0 / ( 128.0 - 0.4985 * cContInc );
const double fOff = 128.0 - fM * 128.0;
- SetRed( (UINT8) VOS_BOUND( _FRound( COLORDATA_RED( mnColor ) * fM + fOff ), 0L, 255L ) );
- SetGreen( (UINT8) VOS_BOUND( _FRound( COLORDATA_GREEN( mnColor ) * fM + fOff ), 0L, 255L ) );
- SetBlue( (UINT8) VOS_BOUND( _FRound( COLORDATA_BLUE( mnColor ) * fM + fOff ), 0L, 255L ) );
+ SetRed( (sal_uInt8) VOS_BOUND( _FRound( COLORDATA_RED( mnColor ) * fM + fOff ), 0L, 255L ) );
+ SetGreen( (sal_uInt8) VOS_BOUND( _FRound( COLORDATA_GREEN( mnColor ) * fM + fOff ), 0L, 255L ) );
+ SetBlue( (sal_uInt8) VOS_BOUND( _FRound( COLORDATA_BLUE( mnColor ) * fM + fOff ), 0L, 255L ) );
}
}
// -----------------------------------------------------------------------
-void Color::DecreaseContrast( UINT8 cContDec )
+void Color::DecreaseContrast( sal_uInt8 cContDec )
{
if( cContDec )
{
const double fM = ( 128.0 - 0.4985 * cContDec ) / 128.0;
const double fOff = 128.0 - fM * 128.0;
- SetRed( (UINT8) VOS_BOUND( _FRound( COLORDATA_RED( mnColor ) * fM + fOff ), 0L, 255L ) );
- SetGreen( (UINT8) VOS_BOUND( _FRound( COLORDATA_GREEN( mnColor ) * fM + fOff ), 0L, 255L ) );
- SetBlue( (UINT8) VOS_BOUND( _FRound( COLORDATA_BLUE( mnColor ) * fM + fOff ), 0L, 255L ) );
+ SetRed( (sal_uInt8) VOS_BOUND( _FRound( COLORDATA_RED( mnColor ) * fM + fOff ), 0L, 255L ) );
+ SetGreen( (sal_uInt8) VOS_BOUND( _FRound( COLORDATA_GREEN( mnColor ) * fM + fOff ), 0L, 255L ) );
+ SetBlue( (sal_uInt8) VOS_BOUND( _FRound( COLORDATA_BLUE( mnColor ) * fM + fOff ), 0L, 255L ) );
}
}
@@ -145,14 +145,14 @@ void Color::Invert()
// -----------------------------------------------------------------------
-BOOL Color::IsDark() const
+sal_Bool Color::IsDark() const
{
return GetLuminance() <= 38;
}
// -----------------------------------------------------------------------
-BOOL Color::IsBright() const
+sal_Bool Color::IsBright() const
{
return GetLuminance() >= 245;
}
@@ -161,10 +161,10 @@ BOOL Color::IsBright() const
// color space conversion
// -----------------------------------------------------------------------
-void Color::RGBtoHSB( USHORT& nHue, USHORT& nSat, USHORT& nBri ) const
+void Color::RGBtoHSB( sal_uInt16& nHue, sal_uInt16& nSat, sal_uInt16& nBri ) const
{
- UINT8 c[3];
- UINT8 cMax, cMin;
+ sal_uInt8 c[3];
+ sal_uInt8 cMax, cMin;
c[0] = GetRed();
c[1] = GetGreen();
@@ -185,7 +185,7 @@ void Color::RGBtoHSB( USHORT& nHue, USHORT& nSat, USHORT& nBri ) const
if( c[2] < cMin )
cMin = c[2];
- UINT8 cDelta = cMax - cMin;
+ sal_uInt8 cDelta = cMax - cMin;
// Saturation = max - min / max
if( nBri > 0 )
@@ -216,14 +216,14 @@ void Color::RGBtoHSB( USHORT& nHue, USHORT& nSat, USHORT& nBri ) const
if( dHue < 0.0 )
dHue += 360.0;
- nHue = (UINT16) dHue;
+ nHue = (sal_uInt16) dHue;
}
}
-ColorData Color::HSBtoRGB( USHORT nHue, USHORT nSat, USHORT nBri )
+ColorData Color::HSBtoRGB( sal_uInt16 nHue, sal_uInt16 nSat, sal_uInt16 nBri )
{
- UINT8 cR=0,cG=0,cB=0;
- UINT8 nB = (UINT8) ( nBri * 255 / 100 );
+ sal_uInt8 cR=0,cG=0,cB=0;
+ sal_uInt8 nB = (sal_uInt8) ( nBri * 255 / 100 );
if( nSat == 0 )
{
@@ -235,17 +235,17 @@ ColorData Color::HSBtoRGB( USHORT nHue, USHORT nSat, USHORT nBri )
{
double dH = nHue;
double f;
- UINT16 n;
+ sal_uInt16 n;
if( dH == 360.0 )
dH = 0.0;
dH /= 60.0;
- n = (UINT16) dH;
+ n = (sal_uInt16) dH;
f = dH - n;
- UINT8 a = (UINT8) ( nB * ( 100 - nSat ) / 100 );
- UINT8 b = (UINT8) ( nB * ( 100 - ( (double)nSat * f ) ) / 100 );
- UINT8 c = (UINT8) ( nB * ( 100 - ( (double)nSat * ( 1.0 - f ) ) ) / 100 );
+ sal_uInt8 a = (sal_uInt8) ( nB * ( 100 - nSat ) / 100 );
+ sal_uInt8 b = (sal_uInt8) ( nB * ( 100 - ( (double)nSat * f ) ) / 100 );
+ sal_uInt8 c = (sal_uInt8) ( nB * ( 100 - ( (double)nSat * ( 1.0 - f ) ) ) / 100 );
switch( n )
{
@@ -263,7 +263,7 @@ ColorData Color::HSBtoRGB( USHORT nHue, USHORT nSat, USHORT nBri )
// -----------------------------------------------------------------------
-SvStream& Color::Read( SvStream& rIStm, BOOL bNewFormat )
+SvStream& Color::Read( SvStream& rIStm, sal_Bool bNewFormat )
{
if ( bNewFormat )
rIStm >> mnColor;
@@ -275,7 +275,7 @@ SvStream& Color::Read( SvStream& rIStm, BOOL bNewFormat )
// -----------------------------------------------------------------------
-SvStream& Color::Write( SvStream& rOStm, BOOL bNewFormat )
+SvStream& Color::Write( SvStream& rOStm, sal_Bool bNewFormat )
{
if ( bNewFormat )
rOStm << mnColor;
@@ -287,13 +287,13 @@ SvStream& Color::Write( SvStream& rOStm, BOOL bNewFormat )
// -----------------------------------------------------------------------
-#define COL_NAME_USER ((USHORT)0x8000)
-#define COL_RED_1B ((USHORT)0x0001)
-#define COL_RED_2B ((USHORT)0x0002)
-#define COL_GREEN_1B ((USHORT)0x0010)
-#define COL_GREEN_2B ((USHORT)0x0020)
-#define COL_BLUE_1B ((USHORT)0x0100)
-#define COL_BLUE_2B ((USHORT)0x0200)
+#define COL_NAME_USER ((sal_uInt16)0x8000)
+#define COL_RED_1B ((sal_uInt16)0x0001)
+#define COL_RED_2B ((sal_uInt16)0x0002)
+#define COL_GREEN_1B ((sal_uInt16)0x0010)
+#define COL_GREEN_2B ((sal_uInt16)0x0020)
+#define COL_BLUE_1B ((sal_uInt16)0x0100)
+#define COL_BLUE_2B ((sal_uInt16)0x0200)
// -----------------------------------------------------------------------
@@ -301,10 +301,10 @@ SvStream& operator>>( SvStream& rIStream, Color& rColor )
{
DBG_ASSERTWARNING( rIStream.GetVersion(), "Color::>> - Solar-Version not set on rIStream" );
- USHORT nColorName;
- USHORT nRed;
- USHORT nGreen;
- USHORT nBlue;
+ sal_uInt16 nColorName;
+ sal_uInt16 nRed;
+ sal_uInt16 nGreen;
+ sal_uInt16 nBlue;
rIStream >> nColorName;
@@ -313,7 +313,7 @@ SvStream& operator>>( SvStream& rIStream, Color& rColor )
if ( rIStream.GetCompressMode() == COMPRESSMODE_FULL )
{
unsigned char cAry[6];
- USHORT i = 0;
+ sal_uInt16 i = 0;
nRed = 0;
nGreen = 0;
@@ -439,10 +439,10 @@ SvStream& operator<<( SvStream& rOStream, const Color& rColor )
{
DBG_ASSERTWARNING( rOStream.GetVersion(), "Color::<< - Solar-Version not set on rOStream" );
- USHORT nColorName = COL_NAME_USER;
- USHORT nRed = rColor.GetRed();
- USHORT nGreen = rColor.GetGreen();
- USHORT nBlue = rColor.GetBlue();
+ sal_uInt16 nColorName = COL_NAME_USER;
+ sal_uInt16 nRed = rColor.GetRed();
+ sal_uInt16 nGreen = rColor.GetGreen();
+ sal_uInt16 nBlue = rColor.GetBlue();
nRed = (nRed<<8) + nRed;
nGreen = (nGreen<<8) + nGreen;
nBlue = (nBlue<<8) + nBlue;
@@ -450,7 +450,7 @@ SvStream& operator<<( SvStream& rOStream, const Color& rColor )
if ( rOStream.GetCompressMode() == COMPRESSMODE_FULL )
{
unsigned char cAry[6];
- USHORT i = 0;
+ sal_uInt16 i = 0;
if ( nRed & 0x00FF )
{
diff --git a/tools/source/generic/config.cxx b/tools/source/generic/config.cxx
index 1a94c2b11198..ff919fcf2505 100644
--- a/tools/source/generic/config.cxx
+++ b/tools/source/generic/config.cxx
@@ -56,7 +56,7 @@ struct ImplKeyData
ImplKeyData* mpNext;
ByteString maKey;
ByteString maValue;
- BOOL mbIsComment;
+ sal_Bool mbIsComment;
};
struct ImplGroupData
@@ -64,20 +64,20 @@ struct ImplGroupData
ImplGroupData* mpNext;
ImplKeyData* mpFirstKey;
ByteString maGroupName;
- USHORT mnEmptyLines;
+ sal_uInt16 mnEmptyLines;
};
struct ImplConfigData
{
ImplGroupData* mpFirstGroup;
XubString maFileName;
- ULONG mnDataUpdateId;
- ULONG mnTimeStamp;
+ sal_uIntPtr mnDataUpdateId;
+ sal_uIntPtr mnTimeStamp;
LineEnd meLineEnd;
- USHORT mnRefCount;
- BOOL mbModified;
- BOOL mbRead;
- BOOL mbIsUTF8BOM;
+ sal_uInt16 mnRefCount;
+ sal_Bool mbModified;
+ sal_Bool mbRead;
+ sal_Bool mbIsUTF8BOM;
};
// =======================================================================
@@ -103,9 +103,9 @@ static String toUncPath( const String& rPath )
return aFileURL;
}
-static ULONG ImplSysGetConfigTimeStamp( const XubString& rFileName )
+static sal_uIntPtr ImplSysGetConfigTimeStamp( const XubString& rFileName )
{
- ULONG nTimeStamp = 0;
+ sal_uIntPtr nTimeStamp = 0;
::osl::DirectoryItem aItem;
::osl::FileStatus aStatus( osl_FileStatus_Mask_ModifyTime );
@@ -121,10 +121,10 @@ static ULONG ImplSysGetConfigTimeStamp( const XubString& rFileName )
// -----------------------------------------------------------------------
-static BYTE* ImplSysReadConfig( const XubString& rFileName,
- sal_uInt64& rRead, BOOL& rbRead, BOOL& rbIsUTF8BOM, ULONG& rTimeStamp )
+static sal_uInt8* ImplSysReadConfig( const XubString& rFileName,
+ sal_uInt64& rRead, sal_Bool& rbRead, sal_Bool& rbIsUTF8BOM, sal_uIntPtr& rTimeStamp )
{
- BYTE* pBuf = NULL;
+ sal_uInt8* pBuf = NULL;
::osl::File aFile( rFileName );
if( aFile.open( osl_File_OpenFlag_Read ) == ::osl::FileBase::E_None )
@@ -136,7 +136,7 @@ static BYTE* ImplSysReadConfig( const XubString& rFileName,
aFile.close();
return 0;
}
- pBuf = new BYTE[static_cast< std::size_t >(nPos)];
+ pBuf = new sal_uInt8[static_cast< std::size_t >(nPos)];
if( aFile.read( pBuf, nPos, nRead ) == ::osl::FileBase::E_None && nRead == nPos )
{
//skip the byte-order-mark 0xEF 0xBB 0xBF, if it was UTF8 files
@@ -144,12 +144,12 @@ static BYTE* ImplSysReadConfig( const XubString& rFileName,
if (nRead > 2 && memcmp(pBuf, BOM, 3) == 0)
{
nRead -= 3;
- rtl_moveMemory(pBuf, pBuf + 3, sal::static_int_cast<sal_Size>(nRead * sizeof(BYTE)) );
- rbIsUTF8BOM = TRUE;
+ rtl_moveMemory(pBuf, pBuf + 3, sal::static_int_cast<sal_Size>(nRead * sizeof(sal_uInt8)) );
+ rbIsUTF8BOM = sal_True;
}
rTimeStamp = ImplSysGetConfigTimeStamp( rFileName );
- rbRead = TRUE;
+ rbRead = sal_True;
rRead = nRead;
}
else
@@ -166,11 +166,11 @@ static BYTE* ImplSysReadConfig( const XubString& rFileName,
// -----------------------------------------------------------------------
-static BOOL ImplSysWriteConfig( const XubString& rFileName,
- const BYTE* pBuf, ULONG nBufLen, BOOL rbIsUTF8BOM, ULONG& rTimeStamp )
+static sal_Bool ImplSysWriteConfig( const XubString& rFileName,
+ const sal_uInt8* pBuf, sal_uIntPtr nBufLen, sal_Bool rbIsUTF8BOM, sal_uIntPtr& rTimeStamp )
{
- BOOL bSuccess = FALSE;
- BOOL bUTF8BOMSuccess = FALSE;
+ sal_Bool bSuccess = sal_False;
+ sal_Bool bUTF8BOMSuccess = sal_False;
::osl::File aFile( rFileName );
::osl::FileBase::RC eError = aFile.open( osl_File_OpenFlag_Write | osl_File_OpenFlag_Create );
@@ -189,13 +189,13 @@ static BOOL ImplSysWriteConfig( const XubString& rFileName,
sal_uInt64 nUTF8BOMWritten;
if( aFile.write( BOM, 3, nUTF8BOMWritten ) == ::osl::FileBase::E_None && 3 == nUTF8BOMWritten )
{
- bUTF8BOMSuccess = TRUE;
+ bUTF8BOMSuccess = sal_True;
}
}
if( aFile.write( pBuf, nBufLen, nWritten ) == ::osl::FileBase::E_None && nWritten == nBufLen )
{
- bSuccess = TRUE;
+ bSuccess = sal_True;
}
if ( rbIsUTF8BOM ? bSuccess && bUTF8BOMSuccess : bSuccess )
{
@@ -258,7 +258,7 @@ static String ImplMakeConfigName( const XubString* pFileName,
namespace {
-ByteString makeByteString(BYTE const * p, sal_uInt64 n) {
+ByteString makeByteString(sal_uInt8 const * p, sal_uInt64 n) {
if (n > STRING_MAXLEN) {
#ifdef WNT
abort();
@@ -274,7 +274,7 @@ ByteString makeByteString(BYTE const * p, sal_uInt64 n) {
}
static void ImplMakeConfigList( ImplConfigData* pData,
- const BYTE* pBuf, sal_uInt64 nLen )
+ const sal_uInt8* pBuf, sal_uInt64 nLen )
{
// kein Buffer, keine Daten
if ( !nLen )
@@ -286,7 +286,7 @@ static void ImplMakeConfigList( ImplConfigData* pData,
xub_StrLen nNameLen;
xub_StrLen nKeyLen;
sal_uInt64 i;
- const BYTE* pLine;
+ const sal_uInt8* pLine;
ImplKeyData* pPrevKey = NULL;
ImplKeyData* pKey;
ImplGroupData* pPrevGroup = NULL;
@@ -380,7 +380,7 @@ static void ImplMakeConfigList( ImplConfigData* pData,
while ( pGroup->mnEmptyLines )
{
pKey = new ImplKeyData;
- pKey->mbIsComment = TRUE;
+ pKey->mbIsComment = sal_True;
pPrevKey->mpNext = pKey;
pPrevKey = pKey;
pGroup->mnEmptyLines--;
@@ -398,11 +398,11 @@ static void ImplMakeConfigList( ImplConfigData* pData,
if ( pLine[0] == ';' )
{
pKey->maValue = makeByteString(pLine, nLineLen);
- pKey->mbIsComment = TRUE;
+ pKey->mbIsComment = sal_True;
}
else
{
- pKey->mbIsComment = FALSE;
+ pKey->mbIsComment = sal_False;
nNameLen = 0;
while ( (nNameLen < nLineLen) && (pLine[nNameLen] != '=') )
nNameLen++;
@@ -449,17 +449,17 @@ static void ImplMakeConfigList( ImplConfigData* pData,
// -----------------------------------------------------------------------
-static BYTE* ImplGetConfigBuffer( const ImplConfigData* pData, ULONG& rLen )
+static sal_uInt8* ImplGetConfigBuffer( const ImplConfigData* pData, sal_uIntPtr& rLen )
{
- BYTE* pWriteBuf;
- BYTE* pBuf;
- BYTE aLineEndBuf[2] = {0, 0};
+ sal_uInt8* pWriteBuf;
+ sal_uInt8* pBuf;
+ sal_uInt8 aLineEndBuf[2] = {0, 0};
ImplKeyData* pKey;
ImplGroupData* pGroup;
unsigned int nBufLen;
- USHORT nValueLen;
- USHORT nKeyLen;
- USHORT nLineEndLen;
+ sal_uInt16 nValueLen;
+ sal_uInt16 nKeyLen;
+ sal_uInt16 nLineEndLen;
if ( pData->meLineEnd == LINEEND_CR )
{
@@ -512,7 +512,7 @@ static BYTE* ImplGetConfigBuffer( const ImplConfigData* pData, ULONG& rLen )
rLen = nBufLen;
if ( !nBufLen )
{
- pWriteBuf = new BYTE[nLineEndLen];
+ pWriteBuf = new sal_uInt8[nLineEndLen];
if ( pWriteBuf )
{
pWriteBuf[0] = aLineEndBuf[0];
@@ -525,7 +525,7 @@ static BYTE* ImplGetConfigBuffer( const ImplConfigData* pData, ULONG& rLen )
}
// Schreibbuffer anlegen (wird vom Aufrufer zerstoert)
- pWriteBuf = new BYTE[nBufLen];
+ pWriteBuf = new sal_uInt8[nBufLen];
if ( !pWriteBuf )
return 0;
@@ -582,7 +582,7 @@ static BYTE* ImplGetConfigBuffer( const ImplConfigData* pData, ULONG& rLen )
}
// Leerzeile nach jeder Gruppe auch wieder speichern
- USHORT nEmptyLines = pGroup->mnEmptyLines;
+ sal_uInt16 nEmptyLines = pGroup->mnEmptyLines;
while ( nEmptyLines )
{
*pBuf = aLineEndBuf[0]; pBuf++;
@@ -604,11 +604,11 @@ static BYTE* ImplGetConfigBuffer( const ImplConfigData* pData, ULONG& rLen )
static void ImplReadConfig( ImplConfigData* pData )
{
- ULONG nTimeStamp = 0;
+ sal_uIntPtr nTimeStamp = 0;
sal_uInt64 nRead = 0;
- BOOL bRead = FALSE;
- BOOL bIsUTF8BOM =FALSE;
- BYTE* pBuf = ImplSysReadConfig( pData->maFileName, nRead, bRead, bIsUTF8BOM, nTimeStamp );
+ sal_Bool bRead = sal_False;
+ sal_Bool bIsUTF8BOM =sal_False;
+ sal_uInt8* pBuf = ImplSysReadConfig( pData->maFileName, nRead, bRead, bIsUTF8BOM, nTimeStamp );
// Aus dem Buffer die Config-Verwaltungsliste aufbauen
if ( pBuf )
@@ -617,11 +617,11 @@ static void ImplReadConfig( ImplConfigData* pData )
delete[] pBuf;
}
pData->mnTimeStamp = nTimeStamp;
- pData->mbModified = FALSE;
+ pData->mbModified = sal_False;
if ( bRead )
- pData->mbRead = TRUE;
+ pData->mbRead = sal_True;
if ( bIsUTF8BOM )
- pData->mbIsUTF8BOM = TRUE;
+ pData->mbIsUTF8BOM = sal_True;
}
// -----------------------------------------------------------------------
@@ -639,16 +639,16 @@ static void ImplWriteConfig( ImplConfigData* pData )
#endif
// Aus der Config-Liste einen Buffer zusammenbauen
- ULONG nBufLen;
- BYTE* pBuf = ImplGetConfigBuffer( pData, nBufLen );
+ sal_uIntPtr nBufLen;
+ sal_uInt8* pBuf = ImplGetConfigBuffer( pData, nBufLen );
if ( pBuf )
{
if ( ImplSysWriteConfig( pData->maFileName, pBuf, nBufLen, pData->mbIsUTF8BOM, pData->mnTimeStamp ) )
- pData->mbModified = FALSE;
+ pData->mbModified = sal_False;
delete[] pBuf;
}
else
- pData->mbModified = FALSE;
+ pData->mbModified = sal_False;
}
// -----------------------------------------------------------------------
@@ -692,8 +692,8 @@ static ImplConfigData* ImplGetConfigData( const XubString& rFileName )
pData->mnDataUpdateId = 0;
pData->meLineEnd = LINEEND_CRLF;
pData->mnRefCount = 0;
- pData->mbRead = FALSE;
- pData->mbIsUTF8BOM = FALSE;
+ pData->mbRead = sal_False;
+ pData->mbIsUTF8BOM = sal_False;
ImplReadConfig( pData );
return pData;
@@ -709,7 +709,7 @@ static void ImplFreeConfigData( ImplConfigData* pDelData )
// =======================================================================
-BOOL Config::ImplUpdateConfig() const
+sal_Bool Config::ImplUpdateConfig() const
{
// Wenn sich TimeStamp unterscheidet, dann Datei neu einlesen
if ( mpData->mnTimeStamp != ImplSysGetConfigTimeStamp( maFileName ) )
@@ -717,10 +717,10 @@ BOOL Config::ImplUpdateConfig() const
ImplDeleteConfigData( mpData );
ImplReadConfig( mpData );
mpData->mnDataUpdateId++;
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -774,7 +774,7 @@ Config::Config()
mpActGroup = NULL;
mnDataUpdateId = 0;
mnLockCount = 1;
- mbPersistence = TRUE;
+ mbPersistence = sal_True;
#ifdef DBG_UTIL
DBG_TRACE( "Config::Config()" );
@@ -791,7 +791,7 @@ Config::Config( const XubString& rFileName )
mpActGroup = NULL;
mnDataUpdateId = 0;
mnLockCount = 1;
- mbPersistence = TRUE;
+ mbPersistence = sal_True;
#ifdef DBG_UTIL
ByteString aTraceStr( "Config::Config( " );
@@ -854,7 +854,7 @@ void Config::DeleteGroup( const ByteString& rGroup )
if ( !mnLockCount || !mpData->mbRead )
{
ImplUpdateConfig();
- mpData->mbRead = TRUE;
+ mpData->mbRead = sal_True;
}
ImplGroupData* pPrevGroup = NULL;
@@ -892,7 +892,7 @@ void Config::DeleteGroup( const ByteString& rGroup )
ImplWriteConfig( mpData );
else
{
- mpData->mbModified = TRUE;
+ mpData->mbModified = sal_True;
}
// Gruppen auf ungluetig setzen
@@ -903,14 +903,14 @@ void Config::DeleteGroup( const ByteString& rGroup )
// -----------------------------------------------------------------------
-ByteString Config::GetGroupName( USHORT nGroup ) const
+ByteString Config::GetGroupName( sal_uInt16 nGroup ) const
{
// Config-Daten evt. updaten
if ( !mnLockCount )
ImplUpdateConfig();
ImplGroupData* pGroup = mpData->mpFirstGroup;
- USHORT nGroupCount = 0;
+ sal_uInt16 nGroupCount = 0;
ByteString aGroupName;
while ( pGroup )
{
@@ -929,14 +929,14 @@ ByteString Config::GetGroupName( USHORT nGroup ) const
// -----------------------------------------------------------------------
-USHORT Config::GetGroupCount() const
+sal_uInt16 Config::GetGroupCount() const
{
// Config-Daten evt. updaten
if ( !mnLockCount )
ImplUpdateConfig();
ImplGroupData* pGroup = mpData->mpFirstGroup;
- USHORT nGroupCount = 0;
+ sal_uInt16 nGroupCount = 0;
while ( pGroup )
{
nGroupCount++;
@@ -948,20 +948,20 @@ USHORT Config::GetGroupCount() const
// -----------------------------------------------------------------------
-BOOL Config::HasGroup( const ByteString& rGroup ) const
+sal_Bool Config::HasGroup( const ByteString& rGroup ) const
{
// Config-Daten evt. updaten
if ( !mnLockCount )
ImplUpdateConfig();
ImplGroupData* pGroup = mpData->mpFirstGroup;
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
while( pGroup )
{
if( pGroup->maGroupName.EqualsIgnoreCaseAscii( rGroup ) )
{
- bRet = TRUE;
+ bRet = sal_True;
break;
}
@@ -1043,7 +1043,7 @@ void Config::WriteKey( const ByteString& rKey, const ByteString& rStr )
if ( !mnLockCount || !mpData->mbRead )
{
ImplUpdateConfig();
- mpData->mbRead = TRUE;
+ mpData->mbRead = sal_True;
}
// Key suchen und Value setzen
@@ -1061,18 +1061,18 @@ void Config::WriteKey( const ByteString& rKey, const ByteString& rStr )
pKey = pKey->mpNext;
}
- BOOL bNewValue;
+ sal_Bool bNewValue;
if ( !pKey )
{
pKey = new ImplKeyData;
pKey->mpNext = NULL;
pKey->maKey = rKey;
- pKey->mbIsComment = FALSE;
+ pKey->mbIsComment = sal_False;
if ( pPrevKey )
pPrevKey->mpNext = pKey;
else
pGroup->mpFirstKey = pKey;
- bNewValue = TRUE;
+ bNewValue = sal_True;
}
else
bNewValue = pKey->maValue != rStr;
@@ -1085,7 +1085,7 @@ void Config::WriteKey( const ByteString& rKey, const ByteString& rStr )
ImplWriteConfig( mpData );
else
{
- mpData->mbModified = TRUE;
+ mpData->mbModified = sal_True;
}
}
}
@@ -1108,7 +1108,7 @@ void Config::DeleteKey( const ByteString& rKey )
if ( !mnLockCount || !mpData->mbRead )
{
ImplUpdateConfig();
- mpData->mbRead = TRUE;
+ mpData->mbRead = sal_True;
}
// Key suchen und Value setzen
@@ -1140,7 +1140,7 @@ void Config::DeleteKey( const ByteString& rKey )
ImplWriteConfig( mpData );
else
{
- mpData->mbModified = TRUE;
+ mpData->mbModified = sal_True;
}
}
}
@@ -1148,7 +1148,7 @@ void Config::DeleteKey( const ByteString& rKey )
// -----------------------------------------------------------------------
-USHORT Config::GetKeyCount() const
+sal_uInt16 Config::GetKeyCount() const
{
#ifdef DBG_UTIL
ByteString aTraceStr( "Config::GetKeyCount()" );
@@ -1164,7 +1164,7 @@ USHORT Config::GetKeyCount() const
ImplUpdateConfig();
// Key suchen und Value zurueckgeben
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
ImplGroupData* pGroup = ImplGetGroup();
if ( pGroup )
{
@@ -1183,7 +1183,7 @@ USHORT Config::GetKeyCount() const
// -----------------------------------------------------------------------
-ByteString Config::GetKeyName( USHORT nKey ) const
+ByteString Config::GetKeyName( sal_uInt16 nKey ) const
{
#ifdef DBG_UTIL
ByteString aTraceStr( "Config::GetKeyName( " );
@@ -1218,7 +1218,7 @@ ByteString Config::GetKeyName( USHORT nKey ) const
// -----------------------------------------------------------------------
-ByteString Config::ReadKey( USHORT nKey ) const
+ByteString Config::ReadKey( sal_uInt16 nKey ) const
{
#ifdef DBG_UTIL
ByteString aTraceStr( "Config::ReadKey( " );
@@ -1275,7 +1275,7 @@ void Config::LeaveLock()
// -----------------------------------------------------------------------
-BOOL Config::Update()
+sal_Bool Config::Update()
{
return ImplUpdateConfig();
}
diff --git a/tools/source/generic/fract.cxx b/tools/source/generic/fract.cxx
index 0b8231d620ce..8481fef32e05 100644
--- a/tools/source/generic/fract.cxx
+++ b/tools/source/generic/fract.cxx
@@ -634,10 +634,10 @@ void Fraction::ReduceInaccurate( unsigned nSignificantBits )
|*
*************************************************************************/
-BOOL operator == ( const Fraction& rVal1, const Fraction& rVal2 )
+sal_Bool operator == ( const Fraction& rVal1, const Fraction& rVal2 )
{
if ( !rVal1.IsValid() || !rVal2.IsValid() )
- return FALSE;
+ return sal_False;
return rVal1.nNumerator == rVal2.nNumerator
&& rVal1.nDenominator == rVal2.nDenominator;
@@ -660,10 +660,10 @@ BOOL operator == ( const Fraction& rVal1, const Fraction& rVal2 )
// und (c*b) zu vergleichen. Das Ergebnis dieses Vergleichs wird
// zurueckgegeben.
-BOOL operator < ( const Fraction& rVal1, const Fraction& rVal2 )
+sal_Bool operator < ( const Fraction& rVal1, const Fraction& rVal2 )
{
if ( !rVal1.IsValid() || !rVal2.IsValid() )
- return FALSE;
+ return sal_False;
BigInt nN( rVal1.nNumerator );
nN *= BigInt( rVal2.nDenominator );
@@ -690,10 +690,10 @@ BOOL operator < ( const Fraction& rVal1, const Fraction& rVal2 )
// und (c*b) zu vergleichen. Das Ergebnis dieses Vergleichs wird
// zurueckgegeben.
-BOOL operator > ( const Fraction& rVal1, const Fraction& rVal2 )
+sal_Bool operator > ( const Fraction& rVal1, const Fraction& rVal2 )
{
if ( !rVal1.IsValid() || !rVal2.IsValid() )
- return FALSE;
+ return sal_False;
BigInt nN( rVal1.nNumerator );
nN *= BigInt( rVal2.nDenominator );
diff --git a/tools/source/generic/gen.cxx b/tools/source/generic/gen.cxx
index b0eb57f1ab73..e4ef3ed58c82 100644
--- a/tools/source/generic/gen.cxx
+++ b/tools/source/generic/gen.cxx
@@ -44,7 +44,7 @@ SvStream& operator>>( SvStream& rIStream, Pair& rPair )
int i;
int i1;
int i2;
- UINT32 nNum;
+ sal_uInt32 nNum;
rIStream >> cId;
i1 = (cId & 0x70) >> 4;
@@ -61,7 +61,7 @@ SvStream& operator>>( SvStream& rIStream, Pair& rPair )
}
if ( cId & 0x80 )
nNum ^= 0xFFFFFFFF;
- rPair.nA = (INT32)nNum;
+ rPair.nA = (sal_Int32)nNum;
nNum = 0;
i = i1+i2;
@@ -73,7 +73,7 @@ SvStream& operator>>( SvStream& rIStream, Pair& rPair )
}
if ( cId & 0x08 )
nNum ^= 0xFFFFFFFF;
- rPair.nB = (INT32)nNum;
+ rPair.nB = (sal_Int32)nNum;
}
else
{
@@ -93,11 +93,11 @@ SvStream& operator<<( SvStream& rOStream, const Pair& rPair )
{
unsigned char cAry[9];
int i = 1;
- UINT32 nNum;
+ sal_uInt32 nNum;
cAry[0] = 0;
- nNum = (UINT32)(INT32)rPair.nA;
+ nNum = (sal_uInt32)(sal_Int32)rPair.nA;
if ( rPair.nA < 0 )
{
cAry[0] |= 0x80;
@@ -138,7 +138,7 @@ SvStream& operator<<( SvStream& rOStream, const Pair& rPair )
cAry[0] |= 0x10;
}
- nNum = (UINT32)(INT32)rPair.nB;
+ nNum = (sal_uInt32)(sal_Int32)rPair.nB;
if ( rPair.nB < 0 )
{
cAry[0] |= 0x08;
@@ -323,31 +323,31 @@ void Rectangle::Justify()
|*
*************************************************************************/
-BOOL Rectangle::IsInside( const Point& rPoint ) const
+sal_Bool Rectangle::IsInside( const Point& rPoint ) const
{
if ( IsEmpty() )
- return FALSE;
+ return sal_False;
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if ( nLeft <= nRight )
{
if ( (rPoint.X() < nLeft) || (rPoint.X() > nRight) )
- bRet = FALSE;
+ bRet = sal_False;
}
else
{
if ( (rPoint.X() > nLeft) || (rPoint.X() < nRight) )
- bRet = FALSE;
+ bRet = sal_False;
}
if ( nTop <= nBottom )
{
if ( (rPoint.Y() < nTop) || (rPoint.Y() > nBottom) )
- bRet = FALSE;
+ bRet = sal_False;
}
else
{
if ( (rPoint.Y() > nTop) || (rPoint.Y() < nBottom) )
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
@@ -362,12 +362,12 @@ BOOL Rectangle::IsInside( const Point& rPoint ) const
|*
*************************************************************************/
-BOOL Rectangle::IsInside( const Rectangle& rRect ) const
+sal_Bool Rectangle::IsInside( const Rectangle& rRect ) const
{
if ( IsInside( rRect.TopLeft() ) && IsInside( rRect.BottomRight() ) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -380,7 +380,7 @@ BOOL Rectangle::IsInside( const Rectangle& rRect ) const
|*
*************************************************************************/
-BOOL Rectangle::IsOver( const Rectangle& rRect ) const
+sal_Bool Rectangle::IsOver( const Rectangle& rRect ) const
{
// Wenn sie sich nicht schneiden, ueberlappen sie auch nicht
return !GetIntersection( rRect ).IsEmpty();
@@ -402,7 +402,7 @@ SvStream& operator>>( SvStream& rIStream, Rectangle& rRect )
int i2;
int i3;
int i4;
- UINT32 nNum;
+ sal_uInt32 nNum;
rIStream.Read( cIdAry, 2 );
i1 = (cIdAry[0] & 0x70) >> 4;
@@ -423,7 +423,7 @@ SvStream& operator>>( SvStream& rIStream, Rectangle& rRect )
iLast = i1;
if ( cIdAry[0] & 0x80 )
nNum ^= 0xFFFFFFFF;
- rRect.nLeft = (INT32)nNum;
+ rRect.nLeft = (sal_Int32)nNum;
nNum = 0;
i = iLast+i2;
@@ -436,7 +436,7 @@ SvStream& operator>>( SvStream& rIStream, Rectangle& rRect )
iLast += i2;
if ( cIdAry[0] & 0x08 )
nNum ^= 0xFFFFFFFF;
- rRect.nTop = (INT32)nNum;
+ rRect.nTop = (sal_Int32)nNum;
nNum = 0;
i = iLast+i3;
@@ -449,7 +449,7 @@ SvStream& operator>>( SvStream& rIStream, Rectangle& rRect )
iLast += i3;
if ( cIdAry[1] & 0x80 )
nNum ^= 0xFFFFFFFF;
- rRect.nRight = (INT32)nNum;
+ rRect.nRight = (sal_Int32)nNum;
nNum = 0;
i = iLast+i4;
@@ -461,7 +461,7 @@ SvStream& operator>>( SvStream& rIStream, Rectangle& rRect )
}
if ( cIdAry[1] & 0x08 )
nNum ^= 0xFFFFFFFF;
- rRect.nBottom = (INT32)nNum;
+ rRect.nBottom = (sal_Int32)nNum;
}
else
{
@@ -481,12 +481,12 @@ SvStream& operator<<( SvStream& rOStream, const Rectangle& rRect )
{
unsigned char cAry[18];
int i = 2;
- UINT32 nNum;
+ sal_uInt32 nNum;
cAry[0] = 0;
cAry[1] = 0;
- nNum = (UINT32)(INT32)rRect.nLeft;
+ nNum = (sal_uInt32)(sal_Int32)rRect.nLeft;
if ( rRect.nLeft < 0 )
{
cAry[0] |= 0x80;
@@ -527,7 +527,7 @@ SvStream& operator<<( SvStream& rOStream, const Rectangle& rRect )
cAry[0] |= 0x10;
}
- nNum = (UINT32)(INT32)rRect.nTop;
+ nNum = (sal_uInt32)(sal_Int32)rRect.nTop;
if ( rRect.nTop < 0 )
{
cAry[0] |= 0x08;
@@ -568,7 +568,7 @@ SvStream& operator<<( SvStream& rOStream, const Rectangle& rRect )
cAry[0] |= 0x01;
}
- nNum = (UINT32)(INT32)rRect.nRight;
+ nNum = (sal_uInt32)(sal_Int32)rRect.nRight;
if ( rRect.nRight < 0 )
{
cAry[1] |= 0x80;
@@ -609,7 +609,7 @@ SvStream& operator<<( SvStream& rOStream, const Rectangle& rRect )
cAry[1] |= 0x10;
}
- nNum = (UINT32)(INT32)rRect.nBottom;
+ nNum = (sal_uInt32)(sal_Int32)rRect.nBottom;
if ( rRect.nBottom < 0 )
{
cAry[1] |= 0x08;
diff --git a/tools/source/generic/line.cxx b/tools/source/generic/line.cxx
index 0c2de98d843d..ea3b92ad9005 100644
--- a/tools/source/generic/line.cxx
+++ b/tools/source/generic/line.cxx
@@ -47,50 +47,50 @@ double Line::GetLength() const
// ------------------------------------------------------------------------
-BOOL Line::Intersection( const Line& rLine, Point& rIntersection ) const
+sal_Bool Line::Intersection( const Line& rLine, Point& rIntersection ) const
{
double fX, fY;
- BOOL bRet;
+ sal_Bool bRet;
if( Intersection( rLine, fX, fY ) )
{
rIntersection.X() = FRound( fX );
rIntersection.Y() = FRound( fY );
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
// ------------------------------------------------------------------------
-BOOL Line::Intersection( const Line& rLine, double& rIntersectionX, double& rIntersectionY ) const
+sal_Bool Line::Intersection( const Line& rLine, double& rIntersectionX, double& rIntersectionY ) const
{
const double fAx = maEnd.X() - maStart.X();
const double fAy = maEnd.Y() - maStart.Y();
const double fBx = rLine.maStart.X() - rLine.maEnd.X();
const double fBy = rLine.maStart.Y() - rLine.maEnd.Y();
const double fDen = fAy * fBx - fAx * fBy;
- BOOL bOk = FALSE;
+ sal_Bool bOk = sal_False;
if( fDen != 0. )
{
const double fCx = maStart.X() - rLine.maStart.X();
const double fCy = maStart.Y() - rLine.maStart.Y();
const double fA = fBy * fCx - fBx * fCy;
- const BOOL bGreater = ( fDen > 0. );
+ const sal_Bool bGreater = ( fDen > 0. );
- bOk = TRUE;
+ bOk = sal_True;
if ( bGreater )
{
if ( ( fA < 0. ) || ( fA > fDen ) )
- bOk = FALSE;
+ bOk = sal_False;
}
else if ( ( fA > 0. ) || ( fA < fDen ) )
- bOk = FALSE;
+ bOk = sal_False;
if ( bOk )
{
@@ -99,10 +99,10 @@ BOOL Line::Intersection( const Line& rLine, double& rIntersectionX, double& rInt
if ( bGreater )
{
if ( ( fB < 0. ) || ( fB > fDen ) )
- bOk = FALSE;
+ bOk = sal_False;
}
else if ( ( fB > 0. ) || ( fB < fDen ) )
- bOk = FALSE;
+ bOk = sal_False;
if( bOk )
{
@@ -119,11 +119,11 @@ BOOL Line::Intersection( const Line& rLine, double& rIntersectionX, double& rInt
// ------------------------------------------------------------------------
-BOOL Line::Intersection( const Rectangle& rRect, Line& rIntersection ) const
+sal_Bool Line::Intersection( const Rectangle& rRect, Line& rIntersection ) const
{
- const BOOL bStartInside = rRect.IsInside( maStart );
- const BOOL bEndInside = rRect.IsInside( maEnd );
- BOOL bRet = TRUE;
+ const sal_Bool bStartInside = rRect.IsInside( maStart );
+ const sal_Bool bEndInside = rRect.IsInside( maEnd );
+ sal_Bool bRet = sal_True;
if( bStartInside && bEndInside )
{
@@ -170,7 +170,7 @@ BOOL Line::Intersection( const Rectangle& rRect, Line& rIntersection ) const
rIntersection.maEnd = rIntersection.maStart;
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
diff --git a/tools/source/generic/link.cxx b/tools/source/generic/link.cxx
index 928251306901..2d485a5036c4 100644
--- a/tools/source/generic/link.cxx
+++ b/tools/source/generic/link.cxx
@@ -39,20 +39,20 @@
|*
*************************************************************************/
-BOOL Link::operator==( const Link& rLink ) const
+sal_Bool Link::operator==( const Link& rLink ) const
{
if ( pFunc == rLink.pFunc )
{
if ( pFunc )
{
if ( pInst == rLink.pInst )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
else
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index e9f98b07adbd..73e89c73900f 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -80,19 +80,19 @@ static ImplPolygonData aStaticImplPolygon =
// =======================================================================
-ImplPolygon::ImplPolygon( USHORT nInitSize, BOOL bFlags )
+ImplPolygon::ImplPolygon( sal_uInt16 nInitSize, sal_Bool bFlags )
{
if ( nInitSize )
{
- mpPointAry = (Point*)new char[(ULONG)nInitSize*sizeof(Point)];
- memset( mpPointAry, 0, (ULONG)nInitSize*sizeof(Point) );
+ mpPointAry = (Point*)new char[(sal_uIntPtr)nInitSize*sizeof(Point)];
+ memset( mpPointAry, 0, (sal_uIntPtr)nInitSize*sizeof(Point) );
}
else
mpPointAry = NULL;
if( bFlags )
{
- mpFlagAry = new BYTE[ nInitSize ];
+ mpFlagAry = new sal_uInt8[ nInitSize ];
memset( mpPointAry, 0, nInitSize );
}
else
@@ -108,12 +108,12 @@ ImplPolygon::ImplPolygon( const ImplPolygon& rImpPoly )
{
if ( rImpPoly.mnPoints )
{
- mpPointAry = (Point*)new char[(ULONG)rImpPoly.mnPoints*sizeof(Point)];
- memcpy( mpPointAry, rImpPoly.mpPointAry, (ULONG)rImpPoly.mnPoints*sizeof(Point) );
+ mpPointAry = (Point*)new char[(sal_uIntPtr)rImpPoly.mnPoints*sizeof(Point)];
+ memcpy( mpPointAry, rImpPoly.mpPointAry, (sal_uIntPtr)rImpPoly.mnPoints*sizeof(Point) );
if( rImpPoly.mpFlagAry )
{
- mpFlagAry = new BYTE[ rImpPoly.mnPoints ];
+ mpFlagAry = new sal_uInt8[ rImpPoly.mnPoints ];
memcpy( mpFlagAry, rImpPoly.mpFlagAry, rImpPoly.mnPoints );
}
else
@@ -131,16 +131,16 @@ ImplPolygon::ImplPolygon( const ImplPolygon& rImpPoly )
// -----------------------------------------------------------------------
-ImplPolygon::ImplPolygon( USHORT nInitSize, const Point* pInitAry, const BYTE* pInitFlags )
+ImplPolygon::ImplPolygon( sal_uInt16 nInitSize, const Point* pInitAry, const sal_uInt8* pInitFlags )
{
if ( nInitSize )
{
- mpPointAry = (Point*)new char[(ULONG)nInitSize*sizeof(Point)];
- memcpy( mpPointAry, pInitAry, (ULONG)nInitSize*sizeof( Point ) );
+ mpPointAry = (Point*)new char[(sal_uIntPtr)nInitSize*sizeof(Point)];
+ memcpy( mpPointAry, pInitAry, (sal_uIntPtr)nInitSize*sizeof( Point ) );
if( pInitFlags )
{
- mpFlagAry = new BYTE[ nInitSize ];
+ mpFlagAry = new sal_uInt8[ nInitSize ];
memcpy( mpFlagAry, pInitFlags, nInitSize );
}
else
@@ -171,7 +171,7 @@ ImplPolygon::~ImplPolygon()
// -----------------------------------------------------------------------
-void ImplPolygon::ImplSetSize( USHORT nNewSize, BOOL bResize )
+void ImplPolygon::ImplSetSize( sal_uInt16 nNewSize, sal_Bool bResize )
{
if( mnPoints == nNewSize )
return;
@@ -180,7 +180,7 @@ void ImplPolygon::ImplSetSize( USHORT nNewSize, BOOL bResize )
if ( nNewSize )
{
- pNewAry = (Point*)new char[(ULONG)nNewSize*sizeof(Point)];
+ pNewAry = (Point*)new char[(sal_uIntPtr)nNewSize*sizeof(Point)];
if ( bResize )
{
@@ -188,14 +188,14 @@ void ImplPolygon::ImplSetSize( USHORT nNewSize, BOOL bResize )
if ( mnPoints < nNewSize )
{
// Neue Punkte mit 0 initialisieren
- memset( pNewAry+mnPoints, 0, (ULONG)(nNewSize-mnPoints)*sizeof(Point) );
+ memset( pNewAry+mnPoints, 0, (sal_uIntPtr)(nNewSize-mnPoints)*sizeof(Point) );
if ( mpPointAry )
memcpy( pNewAry, mpPointAry, mnPoints*sizeof(Point) );
}
else
{
if ( mpPointAry )
- memcpy( pNewAry, mpPointAry, (ULONG)nNewSize*sizeof(Point) );
+ memcpy( pNewAry, mpPointAry, (sal_uIntPtr)nNewSize*sizeof(Point) );
}
}
}
@@ -208,11 +208,11 @@ void ImplPolygon::ImplSetSize( USHORT nNewSize, BOOL bResize )
// ggf. FlagArray beruecksichtigen
if( mpFlagAry )
{
- BYTE* pNewFlagAry;
+ sal_uInt8* pNewFlagAry;
if( nNewSize )
{
- pNewFlagAry = new BYTE[ nNewSize ];
+ pNewFlagAry = new sal_uInt8[ nNewSize ];
if( bResize )
{
@@ -240,21 +240,21 @@ void ImplPolygon::ImplSetSize( USHORT nNewSize, BOOL bResize )
// -----------------------------------------------------------------------
-void ImplPolygon::ImplSplit( USHORT nPos, USHORT nSpace, ImplPolygon* pInitPoly )
+void ImplPolygon::ImplSplit( sal_uInt16 nPos, sal_uInt16 nSpace, ImplPolygon* pInitPoly )
{
- const ULONG nSpaceSize = nSpace * sizeof( Point );
+ const sal_uIntPtr nSpaceSize = nSpace * sizeof( Point );
//Can't fit this in :-(, throw ?
if (mnPoints + nSpace > USHRT_MAX)
return;
- const USHORT nNewSize = mnPoints + nSpace;
+ const sal_uInt16 nNewSize = mnPoints + nSpace;
if( nPos >= mnPoints )
{
// Hinten anhaengen
nPos = mnPoints;
- ImplSetSize( nNewSize, TRUE );
+ ImplSetSize( nNewSize, sal_True );
if( pInitPoly )
{
@@ -267,10 +267,10 @@ void ImplPolygon::ImplSplit( USHORT nPos, USHORT nSpace, ImplPolygon* pInitPoly
else
{
// PointArray ist in diesem Zweig immer vorhanden
- const USHORT nSecPos = nPos + nSpace;
- const USHORT nRest = mnPoints - nPos;
+ const sal_uInt16 nSecPos = nPos + nSpace;
+ const sal_uInt16 nRest = mnPoints - nPos;
- Point* pNewAry = (Point*) new char[ (ULONG) nNewSize * sizeof( Point ) ];
+ Point* pNewAry = (Point*) new char[ (sal_uIntPtr) nNewSize * sizeof( Point ) ];
memcpy( pNewAry, mpPointAry, nPos * sizeof( Point ) );
@@ -285,7 +285,7 @@ void ImplPolygon::ImplSplit( USHORT nPos, USHORT nSpace, ImplPolygon* pInitPoly
// ggf. FlagArray beruecksichtigen
if( mpFlagAry )
{
- BYTE* pNewFlagAry = new BYTE[ nNewSize ];
+ sal_uInt8* pNewFlagAry = new sal_uInt8[ nNewSize ];
memcpy( pNewFlagAry, mpFlagAry, nPos );
@@ -306,17 +306,17 @@ void ImplPolygon::ImplSplit( USHORT nPos, USHORT nSpace, ImplPolygon* pInitPoly
// -----------------------------------------------------------------------
-void ImplPolygon::ImplRemove( USHORT nPos, USHORT nCount )
+void ImplPolygon::ImplRemove( sal_uInt16 nPos, sal_uInt16 nCount )
{
- const USHORT nRemoveCount = Min( (USHORT) ( mnPoints - nPos ), (USHORT) nCount );
+ const sal_uInt16 nRemoveCount = Min( (sal_uInt16) ( mnPoints - nPos ), (sal_uInt16) nCount );
if( nRemoveCount )
{
- const USHORT nNewSize = mnPoints - nRemoveCount;
- const USHORT nSecPos = nPos + nRemoveCount;
- const USHORT nRest = mnPoints - nSecPos;
+ const sal_uInt16 nNewSize = mnPoints - nRemoveCount;
+ const sal_uInt16 nSecPos = nPos + nRemoveCount;
+ const sal_uInt16 nRest = mnPoints - nSecPos;
- Point* pNewAry = (Point*) new char[ (ULONG) nNewSize * sizeof( Point ) ];
+ Point* pNewAry = (Point*) new char[ (sal_uIntPtr) nNewSize * sizeof( Point ) ];
memcpy( pNewAry, mpPointAry, nPos * sizeof( Point ) );
memcpy( pNewAry + nPos, mpPointAry + nSecPos, nRest * sizeof( Point ) );
@@ -326,7 +326,7 @@ void ImplPolygon::ImplRemove( USHORT nPos, USHORT nCount )
// ggf. FlagArray beruecksichtigen
if( mpFlagAry )
{
- BYTE* pNewFlagAry = new BYTE[ nNewSize ];
+ sal_uInt8* pNewFlagAry = new sal_uInt8[ nNewSize ];
memcpy( pNewFlagAry, mpFlagAry, nPos );
memcpy( pNewFlagAry + nPos, mpFlagAry + nSecPos, nRest );
@@ -345,7 +345,7 @@ void ImplPolygon::ImplCreateFlagArray()
{
if( !mpFlagAry )
{
- mpFlagAry = new BYTE[ mnPoints ];
+ mpFlagAry = new sal_uInt8[ mnPoints ];
memset( mpFlagAry, 0, mnPoints );
}
}
@@ -381,7 +381,7 @@ Polygon::Polygon()
// -----------------------------------------------------------------------
-Polygon::Polygon( USHORT nSize )
+Polygon::Polygon( sal_uInt16 nSize )
{
DBG_CTOR( Polygon, NULL );
@@ -393,7 +393,7 @@ Polygon::Polygon( USHORT nSize )
// -----------------------------------------------------------------------
-Polygon::Polygon( USHORT nPoints, const Point* pPtAry, const BYTE* pFlagAry )
+Polygon::Polygon( sal_uInt16 nPoints, const Point* pPtAry, const sal_uInt8* pFlagAry )
{
DBG_CTOR( Polygon, NULL );
@@ -437,7 +437,7 @@ Polygon::Polygon( const Rectangle& rRect )
// -----------------------------------------------------------------------
-Polygon::Polygon( const Rectangle& rRect, ULONG nHorzRound, ULONG nVertRound )
+Polygon::Polygon( const Rectangle& rRect, sal_uIntPtr nHorzRound, sal_uIntPtr nVertRound )
{
DBG_CTOR( Polygon, NULL );
@@ -448,8 +448,8 @@ Polygon::Polygon( const Rectangle& rRect, ULONG nHorzRound, ULONG nVertRound )
Rectangle aRect( rRect );
aRect.Justify(); // SJ: i9140
- nHorzRound = Min( nHorzRound, (ULONG) labs( aRect.GetWidth() >> 1 ) );
- nVertRound = Min( nVertRound, (ULONG) labs( aRect.GetHeight() >> 1 ) );
+ nHorzRound = Min( nHorzRound, (sal_uIntPtr) labs( aRect.GetWidth() >> 1 ) );
+ nVertRound = Min( nVertRound, (sal_uIntPtr) labs( aRect.GetHeight() >> 1 ) );
if( !nHorzRound && !nVertRound )
{
@@ -467,7 +467,7 @@ Polygon::Polygon( const Rectangle& rRect, ULONG nHorzRound, ULONG nVertRound )
const Point aBR( aRect.Right() - nHorzRound, aRect.Bottom() - nVertRound );
const Point aBL( aRect.Left() + nHorzRound, aRect.Bottom() - nVertRound );
Polygon* pEllipsePoly = new Polygon( Point(), nHorzRound, nVertRound );
- USHORT i, nEnd, nSize4 = pEllipsePoly->GetSize() >> 2;
+ sal_uInt16 i, nEnd, nSize4 = pEllipsePoly->GetSize() >> 2;
mpImplPolygon = new ImplPolygon( pEllipsePoly->GetSize() + 1 );
@@ -494,7 +494,7 @@ Polygon::Polygon( const Rectangle& rRect, ULONG nHorzRound, ULONG nVertRound )
// -----------------------------------------------------------------------
-Polygon::Polygon( const Point& rCenter, long nRadX, long nRadY, USHORT nPoints )
+Polygon::Polygon( const Point& rCenter, long nRadX, long nRadY, sal_uInt16 nPoints )
{
DBG_CTOR( Polygon, NULL );
@@ -503,10 +503,10 @@ Polygon::Polygon( const Point& rCenter, long nRadX, long nRadY, USHORT nPoints )
// Default berechnen (abhaengig von Groesse)
if( !nPoints )
{
- nPoints = (USHORT) ( F_PI * ( 1.5 * ( nRadX + nRadY ) -
+ nPoints = (sal_uInt16) ( F_PI * ( 1.5 * ( nRadX + nRadY ) -
sqrt( (double) labs( nRadX * nRadY ) ) ) );
- nPoints = (USHORT) MinMax( nPoints, 32, 256 );
+ nPoints = (sal_uInt16) MinMax( nPoints, 32, 256 );
if( ( nRadX > 32 ) && ( nRadY > 32 ) && ( nRadX + nRadY ) < 8192 )
nPoints >>= 1;
@@ -516,9 +516,9 @@ Polygon::Polygon( const Point& rCenter, long nRadX, long nRadY, USHORT nPoints )
mpImplPolygon = new ImplPolygon( nPoints = (nPoints + 3) & ~3 );
Point* pPt;
- USHORT i;
- USHORT nPoints2 = nPoints >> 1;
- USHORT nPoints4 = nPoints >> 2;
+ sal_uInt16 i;
+ sal_uInt16 nPoints2 = nPoints >> 1;
+ sal_uInt16 nPoints4 = nPoints >> 2;
double nAngle;
double nAngleStep = F_PI2 / ( nPoints4 - 1 );
@@ -560,12 +560,12 @@ Polygon::Polygon( const Rectangle& rBound,
const Point aCenter( rBound.Center() );
const long nRadX = aCenter.X() - rBound.Left();
const long nRadY = aCenter.Y() - rBound.Top();
- USHORT nPoints;
+ sal_uInt16 nPoints;
- nPoints = (USHORT) ( F_PI * ( 1.5 * ( nRadX + nRadY ) -
+ nPoints = (sal_uInt16) ( F_PI * ( 1.5 * ( nRadX + nRadY ) -
sqrt( (double) labs( nRadX * nRadY ) ) ) );
- nPoints = (USHORT) MinMax( nPoints, 32, 256 );
+ nPoints = (sal_uInt16) MinMax( nPoints, 32, 256 );
if( ( nRadX > 32 ) && ( nRadY > 32 ) && ( nRadX + nRadY ) < 8192 )
nPoints >>= 1;
@@ -579,8 +579,8 @@ Polygon::Polygon( const Rectangle& rBound,
double fEnd = ImplGetAngle( aCenter, rEnd );
double fDiff = fEnd - fStart;
double fStep;
- USHORT nStart;
- USHORT nEnd;
+ sal_uInt16 nStart;
+ sal_uInt16 nEnd;
if( fDiff < 0. )
fDiff += F_2PI;
@@ -588,7 +588,7 @@ Polygon::Polygon( const Rectangle& rBound,
// Punktanzahl proportional verkleinern ( fDiff / (2PI) );
// ist eingentlich nur fuer einen Kreis richtig; wir
// machen es hier aber trotzdem
- nPoints = Max( (USHORT) ( ( fDiff * 0.1591549 ) * nPoints ), (USHORT) 16 );
+ nPoints = Max( (sal_uInt16) ( ( fDiff * 0.1591549 ) * nPoints ), (sal_uInt16) 16 );
fStep = fDiff / ( nPoints - 1 );
if( POLY_PIE == eStyle )
@@ -627,7 +627,7 @@ Polygon::Polygon( const Rectangle& rBound,
Polygon::Polygon( const Point& rBezPt1, const Point& rCtrlPt1,
const Point& rBezPt2, const Point& rCtrlPt2,
- USHORT nPoints )
+ sal_uInt16 nPoints )
{
DBG_CTOR( Polygon, NULL );
@@ -647,7 +647,7 @@ Polygon::Polygon( const Point& rBezPt1, const Point& rCtrlPt1,
mpImplPolygon = new ImplPolygon( nPoints );
- for( USHORT i = 0; i < nPoints; i++, fK_1 += fInc, fK1_1 -= fInc )
+ for( sal_uInt16 i = 0; i < nPoints; i++, fK_1 += fInc, fK1_1 -= fInc )
{
Point& rPt = mpImplPolygon->mpPointAry[ i ];
@@ -689,7 +689,7 @@ Point* Polygon::ImplGetPointAry()
// -----------------------------------------------------------------------
-BYTE* Polygon::ImplGetFlagAry()
+sal_uInt8* Polygon::ImplGetFlagAry()
{
DBG_CHKTHIS( Polygon, NULL );
@@ -708,7 +708,7 @@ const Point* Polygon::GetConstPointAry() const
// -----------------------------------------------------------------------
-const BYTE* Polygon::GetConstFlagAry() const
+const sal_uInt8* Polygon::GetConstFlagAry() const
{
DBG_CHKTHIS( Polygon, NULL );
return mpImplPolygon->mpFlagAry;
@@ -716,7 +716,7 @@ const BYTE* Polygon::GetConstFlagAry() const
// -----------------------------------------------------------------------
-void Polygon::SetPoint( const Point& rPt, USHORT nPos )
+void Polygon::SetPoint( const Point& rPt, sal_uInt16 nPos )
{
DBG_CHKTHIS( Polygon, NULL );
DBG_ASSERT( nPos < mpImplPolygon->mnPoints,
@@ -728,7 +728,7 @@ void Polygon::SetPoint( const Point& rPt, USHORT nPos )
// -----------------------------------------------------------------------
-void Polygon::SetFlags( USHORT nPos, PolyFlags eFlags )
+void Polygon::SetFlags( sal_uInt16 nPos, PolyFlags eFlags )
{
DBG_CHKTHIS( Polygon, NULL );
DBG_ASSERT( nPos < mpImplPolygon->mnPoints,
@@ -740,13 +740,13 @@ void Polygon::SetFlags( USHORT nPos, PolyFlags eFlags )
{
ImplMakeUnique();
mpImplPolygon->ImplCreateFlagArray();
- mpImplPolygon->mpFlagAry[ nPos ] = (BYTE) eFlags;
+ mpImplPolygon->mpFlagAry[ nPos ] = (sal_uInt8) eFlags;
}
}
// -----------------------------------------------------------------------
-const Point& Polygon::GetPoint( USHORT nPos ) const
+const Point& Polygon::GetPoint( sal_uInt16 nPos ) const
{
DBG_CHKTHIS( Polygon, NULL );
DBG_ASSERT( nPos < mpImplPolygon->mnPoints,
@@ -757,7 +757,7 @@ const Point& Polygon::GetPoint( USHORT nPos ) const
// -----------------------------------------------------------------------
-PolyFlags Polygon::GetFlags( USHORT nPos ) const
+PolyFlags Polygon::GetFlags( sal_uInt16 nPos ) const
{
DBG_CHKTHIS( Polygon, NULL );
DBG_ASSERT( nPos < mpImplPolygon->mnPoints,
@@ -776,7 +776,7 @@ sal_Bool Polygon::HasFlags() const
// -----------------------------------------------------------------------
-BOOL Polygon::IsControl(USHORT nPos) const
+sal_Bool Polygon::IsControl(sal_uInt16 nPos) const
{
DBG_CHKTHIS( Polygon, NULL );
DBG_ASSERT( nPos < mpImplPolygon->mnPoints,
@@ -789,7 +789,7 @@ BOOL Polygon::IsControl(USHORT nPos) const
// -----------------------------------------------------------------------
-BOOL Polygon::IsSmooth(USHORT nPos) const
+sal_Bool Polygon::IsSmooth(sal_uInt16 nPos) const
{
DBG_CHKTHIS( Polygon, NULL );
DBG_ASSERT( nPos < mpImplPolygon->mnPoints,
@@ -802,9 +802,9 @@ BOOL Polygon::IsSmooth(USHORT nPos) const
// -----------------------------------------------------------------------
-BOOL Polygon::IsRect() const
+sal_Bool Polygon::IsRect() const
{
- BOOL bIsRect = FALSE;
+ sal_Bool bIsRect = sal_False;
if ( mpImplPolygon->mpFlagAry == NULL )
{
if ( ( ( mpImplPolygon->mnPoints == 5 ) && ( mpImplPolygon->mpPointAry[ 0 ] == mpImplPolygon->mpPointAry[ 4 ] ) ) ||
@@ -814,7 +814,7 @@ BOOL Polygon::IsRect() const
( mpImplPolygon->mpPointAry[ 0 ].Y() == mpImplPolygon->mpPointAry[ 1 ].Y() ) &&
( mpImplPolygon->mpPointAry[ 1 ].X() == mpImplPolygon->mpPointAry[ 2 ].X() ) &&
( mpImplPolygon->mpPointAry[ 2 ].Y() == mpImplPolygon->mpPointAry[ 3 ].Y() ) )
- bIsRect = TRUE;
+ bIsRect = sal_True;
}
}
return bIsRect;
@@ -822,7 +822,7 @@ BOOL Polygon::IsRect() const
// -----------------------------------------------------------------------
-void Polygon::SetSize( USHORT nNewSize )
+void Polygon::SetSize( sal_uInt16 nNewSize )
{
DBG_CHKTHIS( Polygon, NULL );
@@ -835,7 +835,7 @@ void Polygon::SetSize( USHORT nNewSize )
// -----------------------------------------------------------------------
-USHORT Polygon::GetSize() const
+sal_uInt16 Polygon::GetSize() const
{
DBG_CHKTHIS( Polygon, NULL );
@@ -861,7 +861,7 @@ void Polygon::Clear()
// -----------------------------------------------------------------------
-double Polygon::CalcDistance( USHORT nP1, USHORT nP2 )
+double Polygon::CalcDistance( sal_uInt16 nP1, sal_uInt16 nP2 )
{
DBG_ASSERT( nP1 < mpImplPolygon->mnPoints,
"Polygon::CalcDistance(): nPos1 >= nPoints" );
@@ -878,12 +878,12 @@ double Polygon::CalcDistance( USHORT nP1, USHORT nP2 )
// -----------------------------------------------------------------------
-void Polygon::Optimize( ULONG nOptimizeFlags, const PolyOptimizeData* pData )
+void Polygon::Optimize( sal_uIntPtr nOptimizeFlags, const PolyOptimizeData* pData )
{
DBG_CHKTHIS( Polygon, NULL );
DBG_ASSERT( !mpImplPolygon->mpFlagAry, "Optimizing could fail with beziers!" );
- USHORT nSize = mpImplPolygon->mnPoints;
+ sal_uInt16 nSize = mpImplPolygon->mnPoints;
if( nOptimizeFlags && nSize )
{
@@ -891,7 +891,7 @@ void Polygon::Optimize( ULONG nOptimizeFlags, const PolyOptimizeData* pData )
{
const Rectangle aBound( GetBoundRect() );
const double fArea = ( aBound.GetWidth() + aBound.GetHeight() ) * 0.5;
- const USHORT nPercent = pData ? pData->GetPercentValue() : 50;
+ const sal_uInt16 nPercent = pData ? pData->GetPercentValue() : 50;
Optimize( POLY_OPTIMIZE_NO_SAME );
ImplReduceEdges( *this, fArea, nPercent );
@@ -900,7 +900,7 @@ void Polygon::Optimize( ULONG nOptimizeFlags, const PolyOptimizeData* pData )
{
Polygon aNewPoly;
const Point& rFirst = mpImplPolygon->mpPointAry[ 0 ];
- ULONG nReduce;
+ sal_uIntPtr nReduce;
if( nOptimizeFlags & ( POLY_OPTIMIZE_REDUCE ) )
nReduce = pData ? pData->GetAbsValue() : 4UL;
@@ -912,15 +912,15 @@ void Polygon::Optimize( ULONG nOptimizeFlags, const PolyOptimizeData* pData )
if( nSize > 1 )
{
- USHORT nLast = 0, nNewCount = 1;
+ sal_uInt16 nLast = 0, nNewCount = 1;
aNewPoly.SetSize( nSize );
aNewPoly[ 0 ] = rFirst;
- for( USHORT i = 1; i < nSize; i++ )
+ for( sal_uInt16 i = 1; i < nSize; i++ )
{
if( ( mpImplPolygon->mpPointAry[ i ] != mpImplPolygon->mpPointAry[ nLast ] ) &&
- ( !nReduce || ( nReduce < (ULONG) FRound( CalcDistance( nLast, i ) ) ) ) )
+ ( !nReduce || ( nReduce < (sal_uIntPtr) FRound( CalcDistance( nLast, i ) ) ) ) )
{
aNewPoly[ nNewCount++ ] = mpImplPolygon->mpPointAry[ nLast = i ];
}
@@ -1051,8 +1051,8 @@ void Polygon::AdaptiveSubdivide( Polygon& rResult, const double d ) const
}
else
{
- USHORT i;
- USHORT nPts( GetSize() );
+ sal_uInt16 i;
+ sal_uInt16 nPts( GetSize() );
::std::vector< Point > aPoints;
aPoints.reserve( nPts );
::std::back_insert_iterator< ::std::vector< Point > > aPointIter( aPoints );
@@ -1061,8 +1061,8 @@ void Polygon::AdaptiveSubdivide( Polygon& rResult, const double d ) const
{
if( ( i + 3 ) < nPts )
{
- BYTE P1( mpImplPolygon->mpFlagAry[ i ] );
- BYTE P4( mpImplPolygon->mpFlagAry[ i + 3 ] );
+ sal_uInt8 P1( mpImplPolygon->mpFlagAry[ i ] );
+ sal_uInt8 P4( mpImplPolygon->mpFlagAry[ i + 3 ] );
if( ( POLY_NORMAL == P1 || POLY_SMOOTH == P1 || POLY_SYMMTR == P1 ) &&
( POLY_CONTROL == mpImplPolygon->mpFlagAry[ i + 1 ] ) &&
@@ -1083,7 +1083,7 @@ void Polygon::AdaptiveSubdivide( Polygon& rResult, const double d ) const
}
// fill result polygon
- rResult = Polygon( (USHORT)aPoints.size() ); // ensure sufficient size for copy
+ rResult = Polygon( (sal_uInt16)aPoints.size() ); // ensure sufficient size for copy
::std::copy(aPoints.begin(), aPoints.end(), rResult.mpImplPolygon->mpPointAry);
}
}
@@ -1122,27 +1122,27 @@ void Polygon::GetXOR( const PolyPolygon& rPolyPoly, PolyPolygon& rResult ) const
// -----------------------------------------------------------------------
-void Polygon::ImplReduceEdges( Polygon& rPoly, const double& rArea, USHORT nPercent )
+void Polygon::ImplReduceEdges( Polygon& rPoly, const double& rArea, sal_uInt16 nPercent )
{
const double fBound = 2000.0 * ( 100 - nPercent ) * 0.01;
- USHORT nNumNoChange = 0, nNumRuns = 0;
+ sal_uInt16 nNumNoChange = 0, nNumRuns = 0;
while( nNumNoChange < 2 )
{
- USHORT nPntCnt = rPoly.GetSize(), nNewPos = 0;
+ sal_uInt16 nPntCnt = rPoly.GetSize(), nNewPos = 0;
Polygon aNewPoly( nPntCnt );
- BOOL bChangeInThisRun = FALSE;
+ sal_Bool bChangeInThisRun = sal_False;
- for( USHORT n = 0; n < nPntCnt; n++ )
+ for( sal_uInt16 n = 0; n < nPntCnt; n++ )
{
- BOOL bDeletePoint = FALSE;
+ sal_Bool bDeletePoint = sal_False;
if( ( n + nNumRuns ) % 2 )
{
- USHORT nIndPrev = !n ? nPntCnt - 1 : n - 1;
- USHORT nIndPrevPrev = !nIndPrev ? nPntCnt - 1 : nIndPrev - 1;
- USHORT nIndNext = ( n == nPntCnt-1 ) ? 0 : n + 1;
- USHORT nIndNextNext = ( nIndNext == nPntCnt - 1 ) ? 0 : nIndNext + 1;
+ sal_uInt16 nIndPrev = !n ? nPntCnt - 1 : n - 1;
+ sal_uInt16 nIndPrevPrev = !nIndPrev ? nPntCnt - 1 : nIndPrev - 1;
+ sal_uInt16 nIndNext = ( n == nPntCnt-1 ) ? 0 : n + 1;
+ sal_uInt16 nIndNextNext = ( nIndNext == nPntCnt - 1 ) ? 0 : nIndNext + 1;
Vector2D aVec1( rPoly[ nIndPrev ] ); aVec1 -= rPoly[ nIndPrevPrev ];
Vector2D aVec2( rPoly[ n ] ); aVec2 -= rPoly[ nIndPrev ];
Vector2D aVec3( rPoly[ nIndNext ] ); aVec3 -= rPoly[ n ];
@@ -1152,7 +1152,7 @@ void Polygon::ImplReduceEdges( Polygon& rPoly, const double& rArea, USHORT nPerc
double fTurnB = aVec2.Normalize().Scalar( aVec3.Normalize() );
if( fabs( fTurnB ) < ( 1.0 + SMALL_DVALUE ) && fabs( fTurnB ) > ( 1.0 - SMALL_DVALUE ) )
- bDeletePoint = TRUE;
+ bDeletePoint = sal_True;
else
{
Vector2D aVecB( rPoly[ nIndNext ] );
@@ -1181,7 +1181,7 @@ void Polygon::ImplReduceEdges( Polygon& rPoly, const double& rArea, USHORT nPerc
if( ( fLenFact < ( FSQRT2 + SMALL_DVALUE ) ) &&
( ( ( fDist1 + fDist4 ) / ( fDist2 + fDist3 ) ) * 2000.0 ) > fBound )
{
- bDeletePoint = TRUE;
+ bDeletePoint = sal_True;
}
}
else
@@ -1193,10 +1193,10 @@ void Polygon::ImplReduceEdges( Polygon& rPoly, const double& rArea, USHORT nPerc
else if( fRelLen > 1.0 )
fRelLen = 1.0;
- if( ( (UINT32) ( ( ( fLenFact - 1.0 ) * 1000000.0 ) + 0.5 ) < fBound ) &&
+ if( ( (sal_uInt32) ( ( ( fLenFact - 1.0 ) * 1000000.0 ) + 0.5 ) < fBound ) &&
( fabs( fGradB ) <= ( fRelLen * fBound * 0.01 ) ) )
{
- bDeletePoint = TRUE;
+ bDeletePoint = sal_True;
}
}
}
@@ -1205,7 +1205,7 @@ void Polygon::ImplReduceEdges( Polygon& rPoly, const double& rArea, USHORT nPerc
if( !bDeletePoint )
aNewPoly[ nNewPos++ ] = rPoly[ n ];
else
- bChangeInThisRun = TRUE;
+ bChangeInThisRun = sal_True;
}
if( bChangeInThisRun && nNewPos )
@@ -1234,8 +1234,8 @@ void Polygon::Move( long nHorzMove, long nVertMove )
ImplMakeUnique();
// Punkte verschieben
- USHORT nCount = mpImplPolygon->mnPoints;
- for ( USHORT i = 0; i < nCount; i++ )
+ sal_uInt16 nCount = mpImplPolygon->mnPoints;
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
Point* pPt = &(mpImplPolygon->mpPointAry[i]);
pPt->X() += nHorzMove;
@@ -1250,7 +1250,7 @@ void Polygon::Translate(const Point& rTrans)
DBG_CHKTHIS( Polygon, NULL );
ImplMakeUnique();
- for ( USHORT i = 0, nCount = mpImplPolygon->mnPoints; i < nCount; i++ )
+ for ( sal_uInt16 i = 0, nCount = mpImplPolygon->mnPoints; i < nCount; i++ )
mpImplPolygon->mpPointAry[ i ] += rTrans;
}
@@ -1261,7 +1261,7 @@ void Polygon::Scale( double fScaleX, double fScaleY )
DBG_CHKTHIS( Polygon, NULL );
ImplMakeUnique();
- for ( USHORT i = 0, nCount = mpImplPolygon->mnPoints; i < nCount; i++ )
+ for ( sal_uInt16 i = 0, nCount = mpImplPolygon->mnPoints; i < nCount; i++ )
{
Point& rPnt = mpImplPolygon->mpPointAry[i];
rPnt.X() = (long) ( fScaleX * rPnt.X() );
@@ -1271,7 +1271,7 @@ void Polygon::Scale( double fScaleX, double fScaleY )
// -----------------------------------------------------------------------
-void Polygon::Rotate( const Point& rCenter, USHORT nAngle10 )
+void Polygon::Rotate( const Point& rCenter, sal_uInt16 nAngle10 )
{
DBG_CHKTHIS( Polygon, NULL );
nAngle10 %= 3600;
@@ -1294,7 +1294,7 @@ void Polygon::Rotate( const Point& rCenter, double fSin, double fCos )
long nCenterX = rCenter.X();
long nCenterY = rCenter.Y();
- for( USHORT i = 0, nCount = mpImplPolygon->mnPoints; i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = mpImplPolygon->mnPoints; i < nCount; i++ )
{
Point& rPt = mpImplPolygon->mpPointAry[ i ];
@@ -1312,7 +1312,7 @@ void Polygon::SlantX( long nYRef, double fSin, double fCos )
DBG_CHKTHIS( Polygon, NULL );
ImplMakeUnique();
- for( USHORT i = 0, nCount = mpImplPolygon->mnPoints; i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = mpImplPolygon->mnPoints; i < nCount; i++ )
{
Point& rPnt = mpImplPolygon->mpPointAry[ i ];
const long nDy = rPnt.Y() - nYRef;
@@ -1329,7 +1329,7 @@ void Polygon::SlantY( long nXRef, double fSin, double fCos )
DBG_CHKTHIS( Polygon, NULL );
ImplMakeUnique();
- for( USHORT i = 0, nCount = mpImplPolygon->mnPoints; i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = mpImplPolygon->mnPoints; i < nCount; i++ )
{
Point& rPnt = mpImplPolygon->mpPointAry[ i ];
const long nDx = rPnt.X() - nXRef;
@@ -1368,7 +1368,7 @@ void Polygon::Distort( const Rectangle& rRefRect, const Polygon& rDistortedRect
X4 = rDistortedRect[2].X();
Y4 = rDistortedRect[2].Y();
- for( USHORT i = 0, nCount = mpImplPolygon->mnPoints; i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = mpImplPolygon->mnPoints; i < nCount; i++ )
{
Point& rPnt = mpImplPolygon->mpPointAry[ i ];
@@ -1396,9 +1396,9 @@ class ImplPolygonPointFilter : public ImplPointFilter
{
public:
ImplPolygon* mpPoly; // Nicht loeschen, wird dem Polygon zugewiesen
- USHORT mnSize;
+ sal_uInt16 mnSize;
- ImplPolygonPointFilter( USHORT nDestSize ) :
+ ImplPolygonPointFilter( sal_uInt16 nDestSize ) :
mnSize( 0 )
{
mpPoly = new ImplPolygon( nDestSize );
@@ -1434,7 +1434,7 @@ class ImplEdgePointFilter : public ImplPointFilter
const long mnHigh;
const int mnEdge;
int mnLastOutside;
- BOOL mbFirst;
+ sal_Bool mbFirst;
public:
ImplEdgePointFilter( int nEdge, long nLow, long nHigh,
@@ -1443,7 +1443,7 @@ public:
mnLow( nLow ),
mnHigh( nHigh ),
mnEdge( nEdge ),
- mbFirst( TRUE )
+ mbFirst( sal_True )
{
}
@@ -1542,7 +1542,7 @@ void ImplEdgePointFilter::Input( const Point& rPoint )
if ( mbFirst )
{
maFirstPoint = rPoint;
- mbFirst = FALSE;
+ mbFirst = sal_False;
if ( !nOutside )
mrNextFilter.Input( rPoint );
}
@@ -1580,20 +1580,20 @@ void ImplEdgePointFilter::LastPoint()
// -----------------------------------------------------------------------
-void Polygon::Clip( const Rectangle& rRect, BOOL bPolygon )
+void Polygon::Clip( const Rectangle& rRect, sal_Bool bPolygon )
{
// #105251# Justify rect befor edge filtering
Rectangle aJustifiedRect( rRect );
aJustifiedRect.Justify();
- USHORT nSourceSize = mpImplPolygon->mnPoints;
+ sal_uInt16 nSourceSize = mpImplPolygon->mnPoints;
ImplPolygonPointFilter aPolygon( nSourceSize );
ImplEdgePointFilter aHorzFilter( EDGE_HORZ, aJustifiedRect.Left(), aJustifiedRect.Right(),
aPolygon );
ImplEdgePointFilter aVertFilter( EDGE_VERT, aJustifiedRect.Top(), aJustifiedRect.Bottom(),
aHorzFilter );
- for ( USHORT i = 0; i < nSourceSize; i++ )
+ for ( sal_uInt16 i = 0; i < nSourceSize; i++ )
aVertFilter.Input( mpImplPolygon->mpPointAry[i] );
if ( bPolygon || aVertFilter.IsPolygon() )
aVertFilter.LastPoint();
@@ -1628,7 +1628,7 @@ Rectangle Polygon::GetBoundRect() const
//
// DBG_ASSERT( !mpImplPolygon->mpFlagAry, "GetBoundRect could fail with beziers!" );
- USHORT nCount = mpImplPolygon->mnPoints;
+ sal_uInt16 nCount = mpImplPolygon->mnPoints;
if( ! nCount )
return Rectangle();
@@ -1638,7 +1638,7 @@ Rectangle Polygon::GetBoundRect() const
nXMin = nXMax = pPt->X();
nYMin = nYMax = pPt->Y();
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
pPt = &(mpImplPolygon->mpPointAry[i]);
@@ -1674,9 +1674,9 @@ double Polygon::GetSignedArea() const
if( mpImplPolygon->mnPoints > 2 )
{
- const USHORT nCount1 = mpImplPolygon->mnPoints - 1;
+ const sal_uInt16 nCount1 = mpImplPolygon->mnPoints - 1;
- for( USHORT i = 0; i < nCount1; )
+ for( sal_uInt16 i = 0; i < nCount1; )
{
const Point& rPt = mpImplPolygon->mpPointAry[ i ];
const Point& rPt1 = mpImplPolygon->mpPointAry[ ++i ];
@@ -1693,15 +1693,15 @@ double Polygon::GetSignedArea() const
// -----------------------------------------------------------------------
-BOOL Polygon::IsInside( const Point& rPoint ) const
+sal_Bool Polygon::IsInside( const Point& rPoint ) const
{
DBG_CHKTHIS( Polygon, NULL );
DBG_ASSERT( !mpImplPolygon->mpFlagAry, "IsInside could fail with beziers!" );
const Rectangle aBound( GetBoundRect() );
const Line aLine( rPoint, Point( aBound.Right() + 100L, rPoint.Y() ) );
- USHORT nCount = mpImplPolygon->mnPoints;
- USHORT nPCounter = 0;
+ sal_uInt16 nCount = mpImplPolygon->mnPoints;
+ sal_uInt16 nPCounter = 0;
if ( ( nCount > 2 ) && aBound.IsInside( rPoint ) )
{
@@ -1712,7 +1712,7 @@ BOOL Polygon::IsInside( const Point& rPoint ) const
while ( ( aPt1 == mpImplPolygon->mpPointAry[ nCount - 1 ] ) && ( nCount > 3 ) )
nCount--;
- for ( USHORT i = 1; i <= nCount; i++ )
+ for ( sal_uInt16 i = 1; i <= nCount; i++ )
{
const Point& rPt2 = mpImplPolygon->mpPointAry[ ( i < nCount ) ? i : 0 ];
@@ -1745,7 +1745,7 @@ BOOL Polygon::IsInside( const Point& rPoint ) const
// -----------------------------------------------------------------------
-BOOL Polygon::IsRightOrientated() const
+sal_Bool Polygon::IsRightOrientated() const
{
DBG_CHKTHIS( Polygon, NULL );
return GetSignedArea() >= 0.0;
@@ -1753,7 +1753,7 @@ BOOL Polygon::IsRightOrientated() const
// -----------------------------------------------------------------------
-void Polygon::Insert( USHORT nPos, const Point& rPt, PolyFlags eFlags )
+void Polygon::Insert( sal_uInt16 nPos, const Point& rPt, PolyFlags eFlags )
{
DBG_CHKTHIS( Polygon, NULL );
ImplMakeUnique();
@@ -1767,16 +1767,16 @@ void Polygon::Insert( USHORT nPos, const Point& rPt, PolyFlags eFlags )
if( POLY_NORMAL != eFlags )
{
mpImplPolygon->ImplCreateFlagArray();
- mpImplPolygon->mpFlagAry[ nPos ] = (BYTE) eFlags;
+ mpImplPolygon->mpFlagAry[ nPos ] = (sal_uInt8) eFlags;
}
}
// -----------------------------------------------------------------------
-void Polygon::Insert( USHORT nPos, const Polygon& rPoly )
+void Polygon::Insert( sal_uInt16 nPos, const Polygon& rPoly )
{
DBG_CHKTHIS( Polygon, NULL );
- const USHORT nInsertCount = rPoly.mpImplPolygon->mnPoints;
+ const sal_uInt16 nInsertCount = rPoly.mpImplPolygon->mnPoints;
if( nInsertCount )
{
@@ -1794,7 +1794,7 @@ void Polygon::Insert( USHORT nPos, const Polygon& rPoly )
// -----------------------------------------------------------------------
-void Polygon::Remove( USHORT nPos, USHORT nCount )
+void Polygon::Remove( sal_uInt16 nPos, sal_uInt16 nCount )
{
DBG_CHKTHIS( Polygon, NULL );
if( nCount && ( nPos < mpImplPolygon->mnPoints ) )
@@ -1806,7 +1806,7 @@ void Polygon::Remove( USHORT nPos, USHORT nCount )
// -----------------------------------------------------------------------
-Point& Polygon::operator[]( USHORT nPos )
+Point& Polygon::operator[]( sal_uInt16 nPos )
{
DBG_CHKTHIS( Polygon, NULL );
DBG_ASSERT( nPos < mpImplPolygon->mnPoints, "Polygon::[]: nPos >= nPoints" );
@@ -1844,15 +1844,15 @@ Polygon& Polygon::operator=( const Polygon& rPoly )
// -----------------------------------------------------------------------
-BOOL Polygon::operator==( const Polygon& rPoly ) const
+sal_Bool Polygon::operator==( const Polygon& rPoly ) const
{
DBG_CHKTHIS( Polygon, NULL );
DBG_CHKOBJ( &rPoly, Polygon, NULL );
if ( (rPoly.mpImplPolygon == mpImplPolygon) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -1885,10 +1885,10 @@ SvStream& operator>>( SvStream& rIStream, Polygon& rPoly )
DBG_CHKOBJ( &rPoly, Polygon, NULL );
DBG_ASSERTWARNING( rIStream.GetVersion(), "Polygon::>> - Solar-Version not set on rIStream" );
- USHORT i;
- USHORT nStart;
- USHORT nCurPoints;
- USHORT nPoints;
+ sal_uInt16 i;
+ sal_uInt16 nStart;
+ sal_uInt16 nCurPoints;
+ sal_uInt16 nPoints;
unsigned char bShort;
short nShortX;
short nShortY;
@@ -1904,7 +1904,7 @@ SvStream& operator>>( SvStream& rIStream, Polygon& rPoly )
rPoly.mpImplPolygon = new ImplPolygon( nPoints );
}
else
- rPoly.mpImplPolygon->ImplSetSize( nPoints, FALSE );
+ rPoly.mpImplPolygon->ImplSetSize( nPoints, sal_False );
// Je nach CompressMode das Polygon einlesen
if ( rIStream.GetCompressMode() == COMPRESSMODE_FULL )
@@ -1969,9 +1969,9 @@ SvStream& operator<<( SvStream& rOStream, const Polygon& rPoly )
unsigned char bShort;
unsigned char bCurShort;
- USHORT nStart;
- USHORT i;
- USHORT nPoints = rPoly.GetSize();
+ sal_uInt16 nStart;
+ sal_uInt16 i;
+ sal_uInt16 nPoints = rPoly.GetSize();
// Anzahl der Punkte rausschreiben
rOStream << nPoints;
@@ -1989,9 +1989,9 @@ SvStream& operator<<( SvStream& rOStream, const Polygon& rPoly )
(rPoly.mpImplPolygon->mpPointAry[nStart].X() <= SHRT_MAX)) &&
((rPoly.mpImplPolygon->mpPointAry[nStart].Y() >= SHRT_MIN) &&
(rPoly.mpImplPolygon->mpPointAry[nStart].Y() <= SHRT_MAX)) )
- bShort = TRUE;
+ bShort = sal_True;
else
- bShort = FALSE;
+ bShort = sal_False;
while ( i < nPoints )
{
// Feststellen, welcher Typ geschrieben werden soll
@@ -1999,9 +1999,9 @@ SvStream& operator<<( SvStream& rOStream, const Polygon& rPoly )
(rPoly.mpImplPolygon->mpPointAry[nStart].X() <= SHRT_MAX)) &&
((rPoly.mpImplPolygon->mpPointAry[nStart].Y() >= SHRT_MIN) &&
(rPoly.mpImplPolygon->mpPointAry[nStart].Y() <= SHRT_MAX)) )
- bCurShort = TRUE;
+ bCurShort = sal_True;
else
- bCurShort = FALSE;
+ bCurShort = sal_False;
// Wenn sich die Werte in einen anderen Bereich begeben,
// muessen wir neu rausschreiben
@@ -2014,7 +2014,7 @@ SvStream& operator<<( SvStream& rOStream, const Polygon& rPoly )
i++;
}
- rOStream << bShort << (USHORT)(i-nStart);
+ rOStream << bShort << (sal_uInt16)(i-nStart);
if ( bShort )
{
@@ -2111,7 +2111,7 @@ void Polygon::Write( SvStream& rOStream ) const
// -----------------------------------------------------------------------
// #i74631# numerical correction method for B2DPolygon
-void impCorrectContinuity(basegfx::B2DPolygon& roPolygon, sal_uInt32 nIndex, BYTE nCFlag)
+void impCorrectContinuity(basegfx::B2DPolygon& roPolygon, sal_uInt32 nIndex, sal_uInt8 nCFlag)
{
const sal_uInt32 nPointCount(roPolygon.count());
OSL_ENSURE(nIndex < nPointCount, "impCorrectContinuity: index access out of range (!)");
@@ -2153,7 +2153,7 @@ basegfx::B2DPolygon Polygon::getB2DPolygon() const
{
// handling for curves. Add start point
const Point aStartPoint(mpImplPolygon->mpPointAry[0]);
- BYTE nPointFlag(mpImplPolygon->mpFlagAry[0]);
+ sal_uInt8 nPointFlag(mpImplPolygon->mpFlagAry[0]);
aRetval.append(basegfx::B2DPoint(aStartPoint.X(), aStartPoint.Y()));
Point aControlA, aControlB;
@@ -2274,7 +2274,7 @@ Polygon::Polygon(const basegfx::B2DPolygon& rPolygon)
const Point aStartPoint(FRound(aBezier.getStartPoint().getX()), FRound(aBezier.getStartPoint().getY()));
const sal_uInt32 nStartPointIndex(nArrayInsert);
mpImplPolygon->mpPointAry[nStartPointIndex] = aStartPoint;
- mpImplPolygon->mpFlagAry[nStartPointIndex] = (BYTE)POLY_NORMAL;
+ mpImplPolygon->mpFlagAry[nStartPointIndex] = (sal_uInt8)POLY_NORMAL;
nArrayInsert++;
// prepare next segment
@@ -2287,11 +2287,11 @@ Polygon::Polygon(const basegfx::B2DPolygon& rPolygon)
{
// if one is used, add always two control points due to the old schema
mpImplPolygon->mpPointAry[nArrayInsert] = Point(FRound(aBezier.getControlPointA().getX()), FRound(aBezier.getControlPointA().getY()));
- mpImplPolygon->mpFlagAry[nArrayInsert] = (BYTE)POLY_CONTROL;
+ mpImplPolygon->mpFlagAry[nArrayInsert] = (sal_uInt8)POLY_CONTROL;
nArrayInsert++;
mpImplPolygon->mpPointAry[nArrayInsert] = Point(FRound(aBezier.getControlPointB().getX()), FRound(aBezier.getControlPointB().getY()));
- mpImplPolygon->mpFlagAry[nArrayInsert] = (BYTE)POLY_CONTROL;
+ mpImplPolygon->mpFlagAry[nArrayInsert] = (sal_uInt8)POLY_CONTROL;
nArrayInsert++;
}
@@ -2302,11 +2302,11 @@ Polygon::Polygon(const basegfx::B2DPolygon& rPolygon)
if(basegfx::CONTINUITY_C1 == eCont)
{
- mpImplPolygon->mpFlagAry[nStartPointIndex] = (BYTE)POLY_SMOOTH;
+ mpImplPolygon->mpFlagAry[nStartPointIndex] = (sal_uInt8)POLY_SMOOTH;
}
else if(basegfx::CONTINUITY_C2 == eCont)
{
- mpImplPolygon->mpFlagAry[nStartPointIndex] = (BYTE)POLY_SYMMTR;
+ mpImplPolygon->mpFlagAry[nStartPointIndex] = (sal_uInt8)POLY_SYMMTR;
}
}
@@ -2318,7 +2318,7 @@ Polygon::Polygon(const basegfx::B2DPolygon& rPolygon)
{
// add first point again as closing point due to old definition
mpImplPolygon->mpPointAry[nArrayInsert] = mpImplPolygon->mpPointAry[0];
- mpImplPolygon->mpFlagAry[nArrayInsert] = (BYTE)POLY_NORMAL;
+ mpImplPolygon->mpFlagAry[nArrayInsert] = (sal_uInt8)POLY_NORMAL;
nArrayInsert++;
}
else
@@ -2327,7 +2327,7 @@ Polygon::Polygon(const basegfx::B2DPolygon& rPolygon)
const basegfx::B2DPoint aClosingPoint(rPolygon.getB2DPoint(nB2DLocalCount - 1L));
const Point aEnd(FRound(aClosingPoint.getX()), FRound(aClosingPoint.getY()));
mpImplPolygon->mpPointAry[nArrayInsert] = aEnd;
- mpImplPolygon->mpFlagAry[nArrayInsert] = (BYTE)POLY_NORMAL;
+ mpImplPolygon->mpFlagAry[nArrayInsert] = (sal_uInt8)POLY_NORMAL;
nArrayInsert++;
}
diff --git a/tools/source/generic/poly2.cxx b/tools/source/generic/poly2.cxx
index 46459353fa35..a995c66f9cf0 100644
--- a/tools/source/generic/poly2.cxx
+++ b/tools/source/generic/poly2.cxx
@@ -53,7 +53,7 @@ DBG_NAME( PolyPolygon )
// -----------------------------------------------------------------------
-ImplPolyPolygon::ImplPolyPolygon( USHORT nInitSize )
+ImplPolyPolygon::ImplPolyPolygon( sal_uInt16 nInitSize )
{
mnRefCount = 1;
mnCount = nInitSize;
@@ -74,7 +74,7 @@ ImplPolyPolygon::ImplPolyPolygon( const ImplPolyPolygon& rImplPolyPoly )
if ( rImplPolyPoly.mpPolyAry )
{
mpPolyAry = new SVPPOLYGON[mnSize];
- for ( USHORT i = 0; i < mnCount; i++ )
+ for ( sal_uInt16 i = 0; i < mnCount; i++ )
mpPolyAry[i] = new Polygon( *rImplPolyPoly.mpPolyAry[i] );
}
else
@@ -87,7 +87,7 @@ ImplPolyPolygon::~ImplPolyPolygon()
{
if ( mpPolyAry )
{
- for ( USHORT i = 0; i < mnCount; i++ )
+ for ( sal_uInt16 i = 0; i < mnCount; i++ )
delete mpPolyAry[i];
delete[] mpPolyAry;
}
@@ -95,7 +95,7 @@ ImplPolyPolygon::~ImplPolyPolygon()
// =======================================================================
-PolyPolygon::PolyPolygon( USHORT nInitSize, USHORT nResize )
+PolyPolygon::PolyPolygon( sal_uInt16 nInitSize, sal_uInt16 nResize )
{
DBG_CTOR( PolyPolygon, NULL );
@@ -127,7 +127,7 @@ PolyPolygon::PolyPolygon( const Polygon& rPoly )
// -----------------------------------------------------------------------
-PolyPolygon::PolyPolygon( USHORT nPoly, const USHORT* pPointCountAry,
+PolyPolygon::PolyPolygon( sal_uInt16 nPoly, const sal_uInt16* pPointCountAry,
const Point* pPtAry )
{
DBG_CTOR( PolyPolygon, NULL );
@@ -136,7 +136,7 @@ PolyPolygon::PolyPolygon( USHORT nPoly, const USHORT* pPointCountAry,
nPoly = MAX_POLYGONS;
mpImplPolyPolygon = new ImplPolyPolygon( nPoly );
- for ( USHORT i = 0; i < nPoly; i++ )
+ for ( sal_uInt16 i = 0; i < nPoly; i++ )
{
mpImplPolyPolygon->mpPolyAry[i] = new Polygon( *pPointCountAry, pPtAry );
pPtAry += *pPointCountAry;
@@ -170,7 +170,7 @@ PolyPolygon::~PolyPolygon()
// -----------------------------------------------------------------------
-void PolyPolygon::Insert( const Polygon& rPoly, USHORT nPos )
+void PolyPolygon::Insert( const Polygon& rPoly, sal_uInt16 nPos )
{
DBG_CHKTHIS( PolyPolygon, NULL );
@@ -190,8 +190,8 @@ void PolyPolygon::Insert( const Polygon& rPoly, USHORT nPos )
mpImplPolyPolygon->mpPolyAry = new SVPPOLYGON[mpImplPolyPolygon->mnSize];
else if ( mpImplPolyPolygon->mnCount == mpImplPolyPolygon->mnSize )
{
- USHORT nOldSize = mpImplPolyPolygon->mnSize;
- USHORT nNewSize = nOldSize + mpImplPolyPolygon->mnResize;
+ sal_uInt16 nOldSize = mpImplPolyPolygon->mnSize;
+ sal_uInt16 nNewSize = nOldSize + mpImplPolyPolygon->mnResize;
SVPPOLYGON* pNewAry;
if ( nNewSize >= MAX_POLYGONS )
@@ -217,7 +217,7 @@ void PolyPolygon::Insert( const Polygon& rPoly, USHORT nPos )
// -----------------------------------------------------------------------
-void PolyPolygon::Remove( USHORT nPos )
+void PolyPolygon::Remove( sal_uInt16 nPos )
{
DBG_CHKTHIS( PolyPolygon, NULL );
DBG_ASSERT( nPos < Count(), "PolyPolygon::Remove(): nPos >= nSize" );
@@ -237,7 +237,7 @@ void PolyPolygon::Remove( USHORT nPos )
// -----------------------------------------------------------------------
-void PolyPolygon::Replace( const Polygon& rPoly, USHORT nPos )
+void PolyPolygon::Replace( const Polygon& rPoly, sal_uInt16 nPos )
{
DBG_CHKTHIS( PolyPolygon, NULL );
DBG_ASSERT( nPos < Count(), "PolyPolygon::Replace(): nPos >= nSize" );
@@ -254,7 +254,7 @@ void PolyPolygon::Replace( const Polygon& rPoly, USHORT nPos )
// -----------------------------------------------------------------------
-const Polygon& PolyPolygon::GetObject( USHORT nPos ) const
+const Polygon& PolyPolygon::GetObject( sal_uInt16 nPos ) const
{
DBG_CHKTHIS( PolyPolygon, NULL );
DBG_ASSERT( nPos < Count(), "PolyPolygon::GetObject(): nPos >= nSize" );
@@ -264,9 +264,9 @@ const Polygon& PolyPolygon::GetObject( USHORT nPos ) const
// -----------------------------------------------------------------------
-BOOL PolyPolygon::IsRect() const
+sal_Bool PolyPolygon::IsRect() const
{
- BOOL bIsRect = FALSE;
+ sal_Bool bIsRect = sal_False;
if ( Count() == 1 )
bIsRect = mpImplPolyPolygon->mpPolyAry[ 0 ]->IsRect();
return bIsRect;
@@ -288,7 +288,7 @@ void PolyPolygon::Clear()
{
if ( mpImplPolyPolygon->mpPolyAry )
{
- for ( USHORT i = 0; i < mpImplPolyPolygon->mnCount; i++ )
+ for ( sal_uInt16 i = 0; i < mpImplPolyPolygon->mnCount; i++ )
delete mpImplPolyPolygon->mpPolyAry[i];
delete[] mpImplPolyPolygon->mpPolyAry;
mpImplPolyPolygon->mpPolyAry = NULL;
@@ -300,15 +300,15 @@ void PolyPolygon::Clear()
// -----------------------------------------------------------------------
-void PolyPolygon::Optimize( ULONG nOptimizeFlags, const PolyOptimizeData* pData )
+void PolyPolygon::Optimize( sal_uIntPtr nOptimizeFlags, const PolyOptimizeData* pData )
{
DBG_CHKTHIS( PolyPolygon, NULL );
if( nOptimizeFlags )
{
double fArea;
- const BOOL bEdges = ( nOptimizeFlags & POLY_OPTIMIZE_EDGES ) == POLY_OPTIMIZE_EDGES;
- USHORT nPercent = 0;
+ const sal_Bool bEdges = ( nOptimizeFlags & POLY_OPTIMIZE_EDGES ) == POLY_OPTIMIZE_EDGES;
+ sal_uInt16 nPercent = 0;
if( bEdges )
{
@@ -327,7 +327,7 @@ void PolyPolygon::Optimize( ULONG nOptimizeFlags, const PolyOptimizeData* pData
}
// Optimize polygons
- for( USHORT i = 0, nPolyCount = mpImplPolyPolygon->mnCount; i < nPolyCount; i++ )
+ for( sal_uInt16 i = 0, nPolyCount = mpImplPolyPolygon->mnCount; i < nPolyCount; i++ )
{
if( bEdges )
{
@@ -351,7 +351,7 @@ void PolyPolygon::AdaptiveSubdivide( PolyPolygon& rResult, const double d ) cons
Polygon aPolygon;
- for( USHORT i = 0; i < mpImplPolyPolygon->mnCount; i++ )
+ for( sal_uInt16 i = 0; i < mpImplPolyPolygon->mnCount; i++ )
{
mpImplPolyPolygon->mpPolyAry[ i ]->AdaptiveSubdivide( aPolygon, d );
rResult.Insert( aPolygon );
@@ -388,7 +388,7 @@ void PolyPolygon::GetXOR( const PolyPolygon& rPolyPoly, PolyPolygon& rResult ) c
// -----------------------------------------------------------------------
-void PolyPolygon::ImplDoOperation( const PolyPolygon& rPolyPoly, PolyPolygon& rResult, ULONG nOperation ) const
+void PolyPolygon::ImplDoOperation( const PolyPolygon& rPolyPoly, PolyPolygon& rResult, sal_uIntPtr nOperation ) const
{
// Convert to B2DPolyPolygon, temporarily. It might be
// advantageous in the future, to have a PolyPolygon adaptor that
@@ -441,7 +441,7 @@ void PolyPolygon::ImplDoOperation( const PolyPolygon& rPolyPoly, PolyPolygon& rR
// -----------------------------------------------------------------------
-USHORT PolyPolygon::Count() const
+sal_uInt16 PolyPolygon::Count() const
{
DBG_CHKTHIS( PolyPolygon, NULL );
return mpImplPolyPolygon->mnCount;
@@ -464,8 +464,8 @@ void PolyPolygon::Move( long nHorzMove, long nVertMove )
}
// Punkte verschieben
- USHORT nPolyCount = mpImplPolyPolygon->mnCount;
- for ( USHORT i = 0; i < nPolyCount; i++ )
+ sal_uInt16 nPolyCount = mpImplPolyPolygon->mnCount;
+ for ( sal_uInt16 i = 0; i < nPolyCount; i++ )
mpImplPolyPolygon->mpPolyAry[i]->Move( nHorzMove, nVertMove );
}
}
@@ -484,7 +484,7 @@ void PolyPolygon::Translate( const Point& rTrans )
}
// Punkte verschieben
- for ( USHORT i = 0, nCount = mpImplPolyPolygon->mnCount; i < nCount; i++ )
+ for ( sal_uInt16 i = 0, nCount = mpImplPolyPolygon->mnCount; i < nCount; i++ )
mpImplPolyPolygon->mpPolyAry[ i ]->Translate( rTrans );
}
@@ -502,13 +502,13 @@ void PolyPolygon::Scale( double fScaleX, double fScaleY )
}
// Punkte verschieben
- for ( USHORT i = 0, nCount = mpImplPolyPolygon->mnCount; i < nCount; i++ )
+ for ( sal_uInt16 i = 0, nCount = mpImplPolyPolygon->mnCount; i < nCount; i++ )
mpImplPolyPolygon->mpPolyAry[ i ]->Scale( fScaleX, fScaleY );
}
// -----------------------------------------------------------------------
-void PolyPolygon::Rotate( const Point& rCenter, USHORT nAngle10 )
+void PolyPolygon::Rotate( const Point& rCenter, sal_uInt16 nAngle10 )
{
DBG_CHKTHIS( PolyPolygon, NULL );
nAngle10 %= 3600;
@@ -534,7 +534,7 @@ void PolyPolygon::Rotate( const Point& rCenter, double fSin, double fCos )
}
// Punkte verschieben
- for ( USHORT i = 0, nCount = mpImplPolyPolygon->mnCount; i < nCount; i++ )
+ for ( sal_uInt16 i = 0, nCount = mpImplPolyPolygon->mnCount; i < nCount; i++ )
mpImplPolyPolygon->mpPolyAry[ i ]->Rotate( rCenter, fSin, fCos );
}
@@ -552,7 +552,7 @@ void PolyPolygon::SlantX( long nYRef, double fSin, double fCos )
}
// Punkte verschieben
- for ( USHORT i = 0, nCount = mpImplPolyPolygon->mnCount; i < nCount; i++ )
+ for ( sal_uInt16 i = 0, nCount = mpImplPolyPolygon->mnCount; i < nCount; i++ )
mpImplPolyPolygon->mpPolyAry[ i ]->SlantX( nYRef, fSin, fCos );
}
@@ -570,7 +570,7 @@ void PolyPolygon::SlantY( long nXRef, double fSin, double fCos )
}
// Punkte verschieben
- for ( USHORT i = 0, nCount = mpImplPolyPolygon->mnCount; i < nCount; i++ )
+ for ( sal_uInt16 i = 0, nCount = mpImplPolyPolygon->mnCount; i < nCount; i++ )
mpImplPolyPolygon->mpPolyAry[ i ]->SlantY( nXRef, fSin, fCos );
}
@@ -588,7 +588,7 @@ void PolyPolygon::Distort( const Rectangle& rRefRect, const Polygon& rDistortedR
}
// Punkte verschieben
- for ( USHORT i = 0, nCount = mpImplPolyPolygon->mnCount; i < nCount; i++ )
+ for ( sal_uInt16 i = 0, nCount = mpImplPolyPolygon->mnCount; i < nCount; i++ )
mpImplPolyPolygon->mpPolyAry[ i ]->Distort( rRefRect, rDistortedRect );
}
@@ -598,8 +598,8 @@ void PolyPolygon::Distort( const Rectangle& rRefRect, const Polygon& rDistortedR
void PolyPolygon::Clip( const Rectangle& rRect )
{
// Polygon-Clippen
- USHORT nPolyCount = mpImplPolyPolygon->mnCount;
- USHORT i;
+ sal_uInt16 nPolyCount = mpImplPolyPolygon->mnCount;
+ sal_uInt16 i;
if ( !nPolyCount )
return;
@@ -629,16 +629,16 @@ Rectangle PolyPolygon::GetBoundRect() const
DBG_CHKTHIS( PolyPolygon, NULL );
long nXMin=0, nXMax=0, nYMin=0, nYMax=0;
- BOOL bFirst = TRUE;
- USHORT nPolyCount = mpImplPolyPolygon->mnCount;
+ sal_Bool bFirst = sal_True;
+ sal_uInt16 nPolyCount = mpImplPolyPolygon->mnCount;
- for ( USHORT n = 0; n < nPolyCount; n++ )
+ for ( sal_uInt16 n = 0; n < nPolyCount; n++ )
{
const Polygon* pPoly = mpImplPolyPolygon->mpPolyAry[n];
const Point* pAry = pPoly->GetConstPointAry();
- USHORT nPointCount = pPoly->GetSize();
+ sal_uInt16 nPointCount = pPoly->GetSize();
- for ( USHORT i = 0; i < nPointCount; i++ )
+ for ( sal_uInt16 i = 0; i < nPointCount; i++ )
{
const Point* pPt = &pAry[ i ];
@@ -646,7 +646,7 @@ Rectangle PolyPolygon::GetBoundRect() const
{
nXMin = nXMax = pPt->X();
nYMin = nYMax = pPt->Y();
- bFirst = FALSE;
+ bFirst = sal_False;
}
else
{
@@ -670,7 +670,7 @@ Rectangle PolyPolygon::GetBoundRect() const
// -----------------------------------------------------------------------
-Polygon& PolyPolygon::operator[]( USHORT nPos )
+Polygon& PolyPolygon::operator[]( sal_uInt16 nPos )
{
DBG_CHKTHIS( PolyPolygon, NULL );
DBG_ASSERT( nPos < Count(), "PolyPolygon::[](): nPos >= nSize" );
@@ -705,15 +705,15 @@ PolyPolygon& PolyPolygon::operator=( const PolyPolygon& rPolyPoly )
// -----------------------------------------------------------------------
-BOOL PolyPolygon::operator==( const PolyPolygon& rPolyPoly ) const
+sal_Bool PolyPolygon::operator==( const PolyPolygon& rPolyPoly ) const
{
DBG_CHKTHIS( PolyPolygon, NULL );
DBG_CHKOBJ( &rPolyPoly, PolyPolygon, NULL );
if ( rPolyPoly.mpImplPolyPolygon == mpImplPolyPolygon )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -746,7 +746,7 @@ SvStream& operator>>( SvStream& rIStream, PolyPolygon& rPolyPoly )
DBG_ASSERTWARNING( rIStream.GetVersion(), "PolyPolygon::>> - Solar-Version not set on rIStream" );
Polygon* pPoly;
- USHORT nPolyCount;
+ sal_uInt16 nPolyCount;
// Anzahl der Polygone einlesen
rIStream >> nPolyCount;
@@ -762,7 +762,7 @@ SvStream& operator>>( SvStream& rIStream, PolyPolygon& rPolyPoly )
rPolyPoly.mpImplPolyPolygon = new ImplPolyPolygon( nPolyCount );
- for ( USHORT i = 0; i < nPolyCount; i++ )
+ for ( sal_uInt16 i = 0; i < nPolyCount; i++ )
{
pPoly = new Polygon;
rIStream >> *pPoly;
@@ -783,11 +783,11 @@ SvStream& operator<<( SvStream& rOStream, const PolyPolygon& rPolyPoly )
DBG_ASSERTWARNING( rOStream.GetVersion(), "PolyPolygon::<< - Solar-Version not set on rOStream" );
// Anzahl der Polygone rausschreiben
- USHORT nPolyCount = rPolyPoly.mpImplPolyPolygon->mnCount;
+ sal_uInt16 nPolyCount = rPolyPoly.mpImplPolyPolygon->mnCount;
rOStream << nPolyCount;
// Die einzelnen Polygone ausgeben
- for ( USHORT i = 0; i < nPolyCount; i++ )
+ for ( sal_uInt16 i = 0; i < nPolyCount; i++ )
rOStream << *(rPolyPoly.mpImplPolyPolygon->mpPolyAry[i]);
return rOStream;
@@ -803,7 +803,7 @@ void PolyPolygon::Read( SvStream& rIStream )
DBG_ASSERTWARNING( rIStream.GetVersion(), "PolyPolygon::>> - Solar-Version not set on rIStream" );
Polygon* pPoly;
- USHORT nPolyCount;
+ sal_uInt16 nPolyCount;
// Anzahl der Polygone einlesen
rIStream >> nPolyCount;
@@ -819,7 +819,7 @@ void PolyPolygon::Read( SvStream& rIStream )
mpImplPolyPolygon = new ImplPolyPolygon( nPolyCount );
- for ( USHORT i = 0; i < nPolyCount; i++ )
+ for ( sal_uInt16 i = 0; i < nPolyCount; i++ )
{
pPoly = new Polygon;
pPoly->ImplRead( rIStream );
@@ -840,11 +840,11 @@ void PolyPolygon::Write( SvStream& rOStream ) const
DBG_ASSERTWARNING( rOStream.GetVersion(), "PolyPolygon::<< - Solar-Version not set on rOStream" );
// Anzahl der Polygone rausschreiben
- USHORT nPolyCount = mpImplPolyPolygon->mnCount;
+ sal_uInt16 nPolyCount = mpImplPolyPolygon->mnCount;
rOStream << nPolyCount;
// Die einzelnen Polygone ausgeben
- for ( USHORT i = 0; i < nPolyCount; i++ )
+ for ( sal_uInt16 i = 0; i < nPolyCount; i++ )
mpImplPolyPolygon->mpPolyAry[i]->ImplWrite( rOStream );;
}
diff --git a/tools/source/generic/svborder.cxx b/tools/source/generic/svborder.cxx
index eb254faf2310..fa302384745f 100644
--- a/tools/source/generic/svborder.cxx
+++ b/tools/source/generic/svborder.cxx
@@ -42,7 +42,7 @@ SvBorder::SvBorder( const Rectangle & rOuter, const Rectangle & rInner )
aInner.Justify();
OSL_ENSURE( aOuter.IsInside( aInner ),
- "SvBorder::SvBorder: FALSE == aOuter.IsInside( aInner )" );
+ "SvBorder::SvBorder: sal_False == aOuter.IsInside( aInner )" );
nTop = aInner.Top() - aOuter.Top();
nRight = aOuter.Right() - aInner.Right();
nBottom = aOuter.Bottom() - aInner.Bottom();
diff --git a/tools/source/inet/inetmime.cxx b/tools/source/inet/inetmime.cxx
index 5324e9be07b8..80b6987d041f 100644
--- a/tools/source/inet/inetmime.cxx
+++ b/tools/source/inet/inetmime.cxx
@@ -4552,7 +4552,7 @@ void INetContentTypeParameterList::Clear()
const INetContentTypeParameter *
INetContentTypeParameterList::find(const ByteString & rAttribute) const
{
- for (ULONG i = 0; i < Count(); ++i)
+ for (sal_uIntPtr i = 0; i < Count(); ++i)
{
const INetContentTypeParameter * pParameter = GetObject(i);
if (pParameter->m_sAttribute.EqualsIgnoreCaseAscii(rAttribute))
diff --git a/tools/source/inet/inetmsg.cxx b/tools/source/inet/inetmsg.cxx
index feec97168b59..8432bb52e23d 100644
--- a/tools/source/inet/inetmsg.cxx
+++ b/tools/source/inet/inetmsg.cxx
@@ -80,7 +80,7 @@ INetMessage::~INetMessage (void)
void INetMessage::ListCleanup_Impl (void)
{
// Cleanup.
- ULONG i, n = m_aHeaderList.Count();
+ sal_uIntPtr i, n = m_aHeaderList.Count();
for (i = 0; i < n; i++)
delete ((HEADERFIELD*)(m_aHeaderList.GetObject(i)));
m_aHeaderList.Clear();
@@ -97,7 +97,7 @@ void INetMessage::ListCopy (const INetMessage &rMsg)
ListCleanup_Impl();
// Copy.
- ULONG i, n = rMsg.GetHeaderCount();
+ sal_uIntPtr i, n = rMsg.GetHeaderCount();
for (i = 0; i < n; i++)
{
HEADERFIELD *p = (HEADERFIELD*)(rMsg.m_aHeaderList.GetObject(i));
@@ -113,7 +113,7 @@ void INetMessage::SetHeaderField_Impl (
INetMIME::HeaderFieldType eType,
const ByteString &rName,
const UniString &rValue,
- ULONG &rnIndex)
+ sal_uIntPtr &rnIndex)
{
INetMIMEStringOutputSink aSink (0, STRING_MAXLEN);
INetMIME::writeHeaderFieldBody (
@@ -125,10 +125,10 @@ void INetMessage::SetHeaderField_Impl (
/*
* SetHeaderField.
*/
-ULONG INetMessage::SetHeaderField (
- const UniString& rName, const UniString& rValue, ULONG nIndex)
+sal_uIntPtr INetMessage::SetHeaderField (
+ const UniString& rName, const UniString& rValue, sal_uIntPtr nIndex)
{
- ULONG nResult = nIndex;
+ sal_uIntPtr nResult = nIndex;
SetHeaderField_Impl (
INetMIME::HEADER_FIELD_TEXT,
ByteString (rName, RTL_TEXTENCODING_ASCII_US), rValue,
@@ -139,10 +139,10 @@ ULONG INetMessage::SetHeaderField (
/*
* SetHeaderField.
*/
-ULONG INetMessage::SetHeaderField (
- const INetMessageHeader &rHeader, ULONG nIndex)
+sal_uIntPtr INetMessage::SetHeaderField (
+ const INetMessageHeader &rHeader, sal_uIntPtr nIndex)
{
- ULONG nResult = nIndex;
+ sal_uIntPtr nResult = nIndex;
SetHeaderField_Impl (rHeader, nResult);
return nResult;
}
@@ -156,7 +156,7 @@ SvStream& INetMessage::operator<< (SvStream& rStrm) const
rStrm << static_cast<sal_uInt32>(m_nDocSize);
rStrm.WriteByteString (m_aDocName, RTL_TEXTENCODING_UTF8);
- ULONG i, n = m_aHeaderList.Count();
+ sal_uIntPtr i, n = m_aHeaderList.Count();
rStrm << static_cast<sal_uInt32>(n);
for (i = 0; i < n; i++)
@@ -182,7 +182,7 @@ SvStream& INetMessage::operator>> (SvStream& rStrm)
m_nDocSize = nTemp;
rStrm.ReadByteString (m_aDocName, RTL_TEXTENCODING_UTF8);
- ULONG i, n = 0;
+ sal_uIntPtr i, n = 0;
rStrm >> nTemp;
n = nTemp;
@@ -205,7 +205,7 @@ SvStream& INetMessage::operator>> (SvStream& rStrm)
INetMessageHeaderIterator::INetMessageHeaderIterator (
const INetMessage& rMsg, const UniString& rHdrName)
{
- ULONG i, n = rMsg.GetHeaderCount();
+ sal_uIntPtr i, n = rMsg.GetHeaderCount();
for (i = 0; i < n; i++)
{
if (rHdrName.CompareIgnoreCaseToAscii (rMsg.GetHeaderName(i)) == 0)
@@ -219,7 +219,7 @@ INetMessageHeaderIterator::INetMessageHeaderIterator (
INetMessageHeaderIterator::~INetMessageHeaderIterator (void)
{
- ULONG i, n = aValueList.Count();
+ sal_uIntPtr i, n = aValueList.Count();
for (i = 0; i < n; i++)
delete ((UniString*)(aValueList.GetObject(i)));
aValueList.Clear();
@@ -291,14 +291,14 @@ enum _ImplINetRFC822MessageHeaderState
INetRFC822Message::INetRFC822Message (void)
: INetMessage()
{
- for (USHORT i = 0; i < INETMSG_RFC822_NUMHDR; i++)
+ for (sal_uInt16 i = 0; i < INETMSG_RFC822_NUMHDR; i++)
m_nIndex[i] = LIST_ENTRY_NOTFOUND;
}
INetRFC822Message::INetRFC822Message (const INetRFC822Message& rMsg)
: INetMessage (rMsg)
{
- for (USHORT i = 0; i < INETMSG_RFC822_NUMHDR; i++)
+ for (sal_uInt16 i = 0; i < INETMSG_RFC822_NUMHDR; i++)
m_nIndex[i] = rMsg.m_nIndex[i];
}
@@ -311,7 +311,7 @@ INetRFC822Message& INetRFC822Message::operator= (const INetRFC822Message& rMsg)
{
INetMessage::operator= (rMsg);
- for (USHORT i = 0; i < INETMSG_RFC822_NUMHDR; i++)
+ for (sal_uInt16 i = 0; i < INETMSG_RFC822_NUMHDR; i++)
m_nIndex[i] = rMsg.m_nIndex[i];
}
return *this;
@@ -358,28 +358,28 @@ static const sal_Char *wkdays[7] =
/*
* GenerateDateField.
*/
-BOOL INetRFC822Message::GenerateDateField (
+sal_Bool INetRFC822Message::GenerateDateField (
const DateTime& rDateTime, UniString& rDateFieldW)
{
// Check arguments.
if (!rDateTime.IsValid() ||
(rDateTime.GetSec() > 59) ||
(rDateTime.GetMin() > 59) ||
- (rDateTime.GetHour() > 23) ) return FALSE;
+ (rDateTime.GetHour() > 23) ) return sal_False;
// Prepare output string.
ByteString rDateField;
// Insert Date.
- rDateField += wkdays[(USHORT)(rDateTime.GetDayOfWeek())];
+ rDateField += wkdays[(sal_uInt16)(rDateTime.GetDayOfWeek())];
rDateField += ", ";
- USHORT nNum = rDateTime.GetDay();
+ sal_uInt16 nNum = rDateTime.GetDay();
if (nNum < 10) rDateField += '0';
rDateField += ByteString::CreateFromInt32(nNum);
rDateField += ' ';
- rDateField += months[(USHORT)(rDateTime.GetMonth() - 1)];
+ rDateField += months[(sal_uInt16)(rDateTime.GetMonth() - 1)];
rDateField += ' ';
rDateField += ByteString::CreateFromInt32(rDateTime.GetYear());
@@ -403,47 +403,47 @@ BOOL INetRFC822Message::GenerateDateField (
// Done.
rDateFieldW = UniString (rDateField, RTL_TEXTENCODING_ASCII_US);
- return TRUE;
+ return sal_True;
}
/*
* ParseDateField and local helper functions.
*/
-static USHORT ParseNumber (const ByteString& rStr, USHORT& nIndex)
+static sal_uInt16 ParseNumber (const ByteString& rStr, sal_uInt16& nIndex)
{
- USHORT n = nIndex;
+ sal_uInt16 n = nIndex;
while ((n < rStr.Len()) && ascii_isDigit(rStr.GetChar(n))) n++;
ByteString aNum (rStr.Copy (nIndex, (n - nIndex)));
nIndex = n;
- return (USHORT)(aNum.ToInt32());
+ return (sal_uInt16)(aNum.ToInt32());
}
-static USHORT ParseMonth (const ByteString& rStr, USHORT& nIndex)
+static sal_uInt16 ParseMonth (const ByteString& rStr, sal_uInt16& nIndex)
{
- USHORT n = nIndex;
+ sal_uInt16 n = nIndex;
while ((n < rStr.Len()) && ascii_isLetter(rStr.GetChar(n))) n++;
ByteString aMonth (rStr.Copy (nIndex, 3));
nIndex = n;
- USHORT i;
+ sal_uInt16 i;
for (i = 0; i < 12; i++)
if (aMonth.CompareIgnoreCaseToAscii (months[i]) == 0) break;
return (i + 1);
}
-BOOL INetRFC822Message::ParseDateField (
+sal_Bool INetRFC822Message::ParseDateField (
const UniString& rDateFieldW, DateTime& rDateTime)
{
ByteString rDateField (rDateFieldW, RTL_TEXTENCODING_ASCII_US);
- if (rDateField.Len() == 0) return FALSE;
+ if (rDateField.Len() == 0) return sal_False;
if (rDateField.Search (':') != STRING_NOTFOUND)
{
// Some DateTime format.
- USHORT nIndex = 0;
+ sal_uInt16 nIndex = 0;
// Skip over <Wkd> or <Weekday>, leading and trailing space.
while ((nIndex < rDateField.Len()) &&
@@ -463,7 +463,7 @@ BOOL INetRFC822Message::ParseDateField (
if (ascii_isLetter (rDateField.GetChar(nIndex)))
{
// Format: ctime().
- if ((rDateField.Len() - nIndex) < 20) return FALSE;
+ if ((rDateField.Len() - nIndex) < 20) return sal_False;
rDateTime.SetMonth (ParseMonth (rDateField, nIndex)); nIndex++;
rDateTime.SetDay (ParseNumber (rDateField, nIndex)); nIndex++;
@@ -473,19 +473,19 @@ BOOL INetRFC822Message::ParseDateField (
rDateTime.SetSec (ParseNumber (rDateField, nIndex)); nIndex++;
rDateTime.Set100Sec (0);
- USHORT nYear = ParseNumber (rDateField, nIndex);
+ sal_uInt16 nYear = ParseNumber (rDateField, nIndex);
if (nYear < 100) nYear += 1900;
rDateTime.SetYear (nYear);
}
else
{
// Format: RFC1036 or RFC1123.
- if ((rDateField.Len() - nIndex) < 17) return FALSE;
+ if ((rDateField.Len() - nIndex) < 17) return sal_False;
rDateTime.SetDay (ParseNumber (rDateField, nIndex)); nIndex++;
rDateTime.SetMonth (ParseMonth (rDateField, nIndex)); nIndex++;
- USHORT nYear = ParseNumber (rDateField, nIndex); nIndex++;
+ sal_uInt16 nYear = ParseNumber (rDateField, nIndex); nIndex++;
if (nYear < 100) nYear += 1900;
rDateTime.SetYear (nYear);
@@ -498,8 +498,8 @@ BOOL INetRFC822Message::ParseDateField (
(rDateField.GetChar(nIndex) == '-') )
{
// Offset from GMT: "(+|-)HHMM".
- BOOL bEast = (rDateField.GetChar(nIndex++) == '+');
- USHORT nOffset = ParseNumber (rDateField, nIndex);
+ sal_Bool bEast = (rDateField.GetChar(nIndex++) == '+');
+ sal_uInt16 nOffset = ParseNumber (rDateField, nIndex);
if (nOffset > 0)
{
Time aDiff;
@@ -532,7 +532,7 @@ BOOL INetRFC822Message::ParseDateField (
else
{
// Junk.
- return FALSE;
+ return sal_False;
}
return (rDateTime.IsValid() &&
@@ -545,15 +545,15 @@ BOOL INetRFC822Message::ParseDateField (
* SetHeaderField.
* (Header Field Parser).
*/
-ULONG INetRFC822Message::SetHeaderField (
- const INetMessageHeader &rHeader, ULONG nNewIndex)
+sal_uIntPtr INetRFC822Message::SetHeaderField (
+ const INetMessageHeader &rHeader, sal_uIntPtr nNewIndex)
{
ByteString aName (rHeader.GetName());
const sal_Char *pData = aName.GetBuffer();
const sal_Char *pStop = pData + aName.Len() + 1;
const sal_Char *check = "";
- ULONG nIdx = LIST_APPEND;
+ sal_uIntPtr nIdx = LIST_APPEND;
int eState = INETMSG_RFC822_BEGIN;
int eOkState = INETMSG_RFC822_OK;
@@ -921,7 +921,7 @@ SvStream& INetRFC822Message::operator<< (SvStream& rStrm) const
{
INetMessage::operator<< (rStrm);
- for (USHORT i = 0; i < INETMSG_RFC822_NUMHDR; i++)
+ for (sal_uInt16 i = 0; i < INETMSG_RFC822_NUMHDR; i++)
rStrm << static_cast<sal_uInt32>(m_nIndex[i]);
return rStrm;
@@ -935,7 +935,7 @@ SvStream& INetRFC822Message::operator>> (SvStream& rStrm)
INetMessage::operator>> (rStrm);
sal_uInt32 nTemp;
- for (USHORT i = 0; i < INETMSG_RFC822_NUMHDR; i++)
+ for (sal_uInt16 i = 0; i < INETMSG_RFC822_NUMHDR; i++)
{
rStrm >> nTemp;
m_nIndex[i] = nTemp;
@@ -999,9 +999,9 @@ INetMIMEMessage::INetMIMEMessage (void)
: INetRFC822Message (),
pParent (NULL),
nNumChildren (0),
- bHeaderParsed (FALSE)
+ bHeaderParsed (sal_False)
{
- for (USHORT i = 0; i < INETMSG_MIME_NUMHDR; i++)
+ for (sal_uInt16 i = 0; i < INETMSG_MIME_NUMHDR; i++)
m_nIndex[i] = LIST_ENTRY_NOTFOUND;
}
@@ -1058,7 +1058,7 @@ void INetMIMEMessage::CopyImp (const INetMIMEMessage& rMsg)
{
bHeaderParsed = rMsg.bHeaderParsed;
- USHORT i;
+ sal_uInt16 i;
for (i = 0; i < INETMSG_MIME_NUMHDR; i++)
m_nIndex[i] = rMsg.m_nIndex[i];
@@ -1092,15 +1092,15 @@ INetMIMEMessage *INetMIMEMessage::CreateMessage (
* SetHeaderField.
* (Header Field Parser).
*/
-ULONG INetMIMEMessage::SetHeaderField (
- const INetMessageHeader &rHeader, ULONG nNewIndex)
+sal_uIntPtr INetMIMEMessage::SetHeaderField (
+ const INetMessageHeader &rHeader, sal_uIntPtr nNewIndex)
{
ByteString aName (rHeader.GetName());
const sal_Char *pData = aName.GetBuffer();
const sal_Char *pStop = pData + aName.Len() + 1;
const sal_Char *check = "";
- ULONG nIdx = LIST_APPEND;
+ sal_uIntPtr nIdx = LIST_APPEND;
int eState = INETMSG_MIME_BEGIN;
int eOkState = INETMSG_MIME_OK;
@@ -1328,11 +1328,11 @@ void INetMIMEMessage::GetDefaultContentType (String& rContentType)
/*
* EnableAttachChild.
*/
-BOOL INetMIMEMessage::EnableAttachChild (INetMessageContainerType eType)
+sal_Bool INetMIMEMessage::EnableAttachChild (INetMessageContainerType eType)
{
// Check context.
if (IsContainer())
- return FALSE;
+ return sal_False;
// Setup Content-Type header field.
ByteString aContentType;
@@ -1392,14 +1392,14 @@ BOOL INetMIMEMessage::EnableAttachChild (INetMessageContainerType eType)
SetContentTransferEncoding (String (CONSTASCII_STRINGPARAM("7bit")));
// Done.
- return TRUE;
+ return sal_True;
}
/*
* AttachChild.
*/
-BOOL INetMIMEMessage::AttachChild (
- INetMIMEMessage& rChildMsg, BOOL bOwner)
+sal_Bool INetMIMEMessage::AttachChild (
+ INetMIMEMessage& rChildMsg, sal_Bool bOwner)
{
if (IsContainer() /*&& rChildMsg.GetContentType().Len() */)
{
@@ -1407,21 +1407,21 @@ BOOL INetMIMEMessage::AttachChild (
aChildren.Insert (&rChildMsg, LIST_APPEND);
nNumChildren = aChildren.Count();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*
* DetachChild.
*/
-BOOL INetMIMEMessage::DetachChild (
- ULONG nIndex, INetMIMEMessage& rChildMsg) const
+sal_Bool INetMIMEMessage::DetachChild (
+ sal_uIntPtr nIndex, INetMIMEMessage& rChildMsg) const
{
if (IsContainer())
{
// Check document stream.
- if (GetDocumentLB() == NULL) return FALSE;
+ if (GetDocumentLB() == NULL) return sal_False;
SvStream *pDocStrm = new SvStream (GetDocumentLB());
// Initialize message buffer.
@@ -1496,7 +1496,7 @@ BOOL INetMIMEMessage::DetachChild (
* Compare buffered line with part/close delimiter.
* Increment current part index upon match.
*/
- USHORT nLen = (USHORT)(aLineBuf.Tell() & 0xffff);
+ sal_uInt16 nLen = (sal_uInt16)(aLineBuf.Tell() & 0xffff);
if (nLen == aDelim.Len())
{
if (aDelim.CompareTo ((const sal_Char *) aLineBuf.GetData(), nLen)
@@ -1522,7 +1522,7 @@ BOOL INetMIMEMessage::DetachChild (
pMsgRead = pMsgWrite = pMsgBuffer;
// Read document stream.
- ULONG nRead = pDocStrm->Read (
+ sal_uIntPtr nRead = pDocStrm->Read (
pMsgBuffer, sizeof (pMsgBuffer));
if (nRead > 0)
{
@@ -1541,7 +1541,7 @@ BOOL INetMIMEMessage::DetachChild (
{
// Requested part not found.
delete pDocStrm;
- return FALSE;
+ return sal_False;
}
}
}
@@ -1581,7 +1581,7 @@ BOOL INetMIMEMessage::DetachChild (
pMsgRead = pMsgWrite = pMsgBuffer;
// Read document stream.
- ULONG nRead = pDocStrm->Read (
+ sal_uIntPtr nRead = pDocStrm->Read (
pMsgBuffer, sizeof (pMsgBuffer));
if (nRead > 0)
{
@@ -1600,9 +1600,9 @@ BOOL INetMIMEMessage::DetachChild (
// Done.
if (pDocStrm) delete pDocStrm;
if (pMsgStrm) delete pMsgStrm;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*
@@ -1612,7 +1612,7 @@ SvStream& INetMIMEMessage::operator<< (SvStream& rStrm) const
{
INetRFC822Message::operator<< (rStrm);
- for (USHORT i = 0; i < INETMSG_MIME_NUMHDR; i++)
+ for (sal_uInt16 i = 0; i < INETMSG_MIME_NUMHDR; i++)
rStrm << static_cast<sal_uInt32>(m_nIndex[i]);
#ifdef ENABLE_BYTESTRING_STREAM_OPERATORS
@@ -1633,7 +1633,7 @@ SvStream& INetMIMEMessage::operator>> (SvStream& rStrm)
INetRFC822Message::operator>> (rStrm);
sal_uInt32 nTemp;
- for (USHORT i = 0; i < INETMSG_MIME_NUMHDR; i++)
+ for (sal_uInt16 i = 0; i < INETMSG_MIME_NUMHDR; i++)
{
rStrm >> nTemp;
m_nIndex[i] = nTemp;
diff --git a/tools/source/inet/inetstrm.cxx b/tools/source/inet/inetstrm.cxx
index ca76d8750bf8..33ed7c8dc41f 100644
--- a/tools/source/inet/inetstrm.cxx
+++ b/tools/source/inet/inetstrm.cxx
@@ -53,23 +53,23 @@ class INetMessageEncodeQPStream_Impl : public INetMessageIStream
{
SvStream *pMsgStrm;
- ULONG nMsgBufSiz;
+ sal_uIntPtr nMsgBufSiz;
sal_Char *pMsgBuffer;
sal_Char *pMsgRead;
sal_Char *pMsgWrite;
- ULONG nTokBufSiz;
+ sal_uIntPtr nTokBufSiz;
sal_Char *pTokBuffer;
sal_Char *pTokRead;
sal_Char *pTokWrite;
INetMessageStreamState eState;
- BOOL bDone;
+ sal_Bool bDone;
- virtual int GetMsgLine (sal_Char *pData, ULONG nSize);
+ virtual int GetMsgLine (sal_Char *pData, sal_uIntPtr nSize);
public:
- INetMessageEncodeQPStream_Impl (ULONG nMsgBufferSize = 1024);
+ INetMessageEncodeQPStream_Impl (sal_uIntPtr nMsgBufferSize = 1024);
virtual ~INetMessageEncodeQPStream_Impl (void);
};
@@ -84,10 +84,10 @@ class INetMessageDecodeQPStream_Impl : public INetMessageOStream
INetMessageStreamState eState;
SvMemoryStream *pMsgBuffer;
- ULONG nTokBufLen;
+ sal_uIntPtr nTokBufLen;
sal_Char pTokBuffer[4];
- virtual int PutMsgLine (const sal_Char *pData, ULONG nSize);
+ virtual int PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize);
public:
INetMessageDecodeQPStream_Impl (void);
@@ -104,22 +104,22 @@ class INetMessageEncode64Stream_Impl : public INetMessageIStream
{
SvStream *pMsgStrm;
- ULONG nMsgBufSiz;
+ sal_uIntPtr nMsgBufSiz;
sal_uInt8 *pMsgBuffer;
sal_uInt8 *pMsgRead;
sal_uInt8 *pMsgWrite;
- ULONG nTokBufSiz;
+ sal_uIntPtr nTokBufSiz;
sal_Char *pTokBuffer;
sal_Char *pTokRead;
sal_Char *pTokWrite;
- BOOL bDone;
+ sal_Bool bDone;
- virtual int GetMsgLine (sal_Char *pData, ULONG nSize);
+ virtual int GetMsgLine (sal_Char *pData, sal_uIntPtr nSize);
public:
- INetMessageEncode64Stream_Impl (ULONG nMsgBufferSize = 2048);
+ INetMessageEncode64Stream_Impl (sal_uIntPtr nMsgBufferSize = 2048);
virtual ~INetMessageEncode64Stream_Impl (void);
};
@@ -133,15 +133,15 @@ class INetMessageDecode64Stream_Impl : public INetMessageOStream
{
INetMessageStreamState eState;
- ULONG nMsgBufSiz;
+ sal_uIntPtr nMsgBufSiz;
sal_Char *pMsgBuffer;
sal_Char *pMsgRead;
sal_Char *pMsgWrite;
- virtual int PutMsgLine (const sal_Char *pData, ULONG nSize);
+ virtual int PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize);
public:
- INetMessageDecode64Stream_Impl (ULONG nMsgBufferSize = 128);
+ INetMessageDecode64Stream_Impl (sal_uIntPtr nMsgBufferSize = 128);
virtual ~INetMessageDecode64Stream_Impl (void);
};
@@ -167,7 +167,7 @@ INetIStream::~INetIStream (void)
/*
* Read.
*/
-int INetIStream::Read (sal_Char *pData, ULONG nSize)
+int INetIStream::Read (sal_Char *pData, sal_uIntPtr nSize)
{
return GetData (pData, nSize);
}
@@ -178,7 +178,7 @@ int INetIStream::Read (sal_Char *pData, ULONG nSize)
void INetIStream::Decode64 (SvStream& rIn, SvStream& rOut)
{
INetMessage aMsg;
- aMsg.SetDocumentLB(new SvAsyncLockBytes(&rOut, FALSE));
+ aMsg.SetDocumentLB(new SvAsyncLockBytes(&rOut, sal_False));
INetMessageDecode64Stream_Impl aStream (8192);
aStream.SetTargetMessage (&aMsg);
@@ -200,7 +200,7 @@ void INetIStream::Encode64 (SvStream& rIn, SvStream& rOut)
{
INetMessage aMsg;
aMsg.SetDocumentLB (
- new SvLockBytes (&rIn, FALSE));
+ new SvLockBytes (&rIn, sal_False));
INetMessageEncode64Stream_Impl aStream (8192);
aStream.SetSourceMessage (&aMsg);
@@ -236,7 +236,7 @@ INetOStream::~INetOStream (void)
/*
* Write.
*/
-int INetOStream::Write (const sal_Char *pData, ULONG nSize)
+int INetOStream::Write (const sal_Char *pData, sal_uIntPtr nSize)
{
return PutData (pData, nSize);
}
@@ -249,9 +249,9 @@ int INetOStream::Write (const sal_Char *pData, ULONG nSize)
/*
* INetMessageIStream.
*/
-INetMessageIStream::INetMessageIStream (ULONG nBufferSize)
+INetMessageIStream::INetMessageIStream (sal_uIntPtr nBufferSize)
: pSourceMsg (NULL),
- bHeaderGenerated (FALSE),
+ bHeaderGenerated (sal_False),
nBufSiz (nBufferSize),
pMsgStrm (NULL),
pMsgBuffer (new SvMemoryStream)
@@ -274,7 +274,7 @@ INetMessageIStream::~INetMessageIStream (void)
/*
* GetData.
*/
-int INetMessageIStream::GetData (sal_Char *pData, ULONG nSize)
+int INetMessageIStream::GetData (sal_Char *pData, sal_uIntPtr nSize)
{
if (pSourceMsg == NULL) return INETSTREAM_STATUS_ERROR;
@@ -284,13 +284,13 @@ int INetMessageIStream::GetData (sal_Char *pData, ULONG nSize)
while (pWBuf < pWEnd)
{
// Caller's buffer not yet filled.
- ULONG n = pRead - pWrite;
+ sal_uIntPtr n = pRead - pWrite;
if (n > 0)
{
// Bytes still in buffer.
- ULONG m = pWEnd - pWBuf;
+ sal_uIntPtr m = pWEnd - pWBuf;
if (m < n) n = m;
- for (ULONG i = 0; i < n; i++) *pWBuf++ = *pWrite++;
+ for (sal_uIntPtr i = 0; i < n; i++) *pWBuf++ = *pWrite++;
}
else
{
@@ -309,7 +309,7 @@ int INetMessageIStream::GetData (sal_Char *pData, ULONG nSize)
if (!bHeaderGenerated)
{
// Header generated. Insert empty line.
- bHeaderGenerated = TRUE;
+ bHeaderGenerated = sal_True;
*pRead++ = '\r';
*pRead++ = '\n';
}
@@ -327,7 +327,7 @@ int INetMessageIStream::GetData (sal_Char *pData, ULONG nSize)
/*
* GetMsgLine.
*/
-int INetMessageIStream::GetMsgLine (sal_Char *pData, ULONG nSize)
+int INetMessageIStream::GetMsgLine (sal_Char *pData, sal_uIntPtr nSize)
{
if (pSourceMsg == NULL) return INETSTREAM_STATUS_ERROR;
@@ -336,7 +336,7 @@ int INetMessageIStream::GetMsgLine (sal_Char *pData, ULONG nSize)
if (!bHeaderGenerated)
{
- ULONG i, n;
+ sal_uIntPtr i, n;
if (pMsgBuffer->Tell() == 0)
{
@@ -379,7 +379,7 @@ int INetMessageIStream::GetMsgLine (sal_Char *pData, ULONG nSize)
if (pMsgStrm == NULL)
pMsgStrm = new SvStream (pSourceMsg->GetDocumentLB());
- ULONG nRead = pMsgStrm->Read (pWBuf, (pWEnd - pWBuf));
+ sal_uIntPtr nRead = pMsgStrm->Read (pWBuf, (pWEnd - pWBuf));
pWBuf += nRead;
}
}
@@ -396,7 +396,7 @@ int INetMessageIStream::GetMsgLine (sal_Char *pData, ULONG nSize)
*/
INetMessageOStream::INetMessageOStream (void)
: pTargetMsg (NULL),
- bHeaderParsed (FALSE),
+ bHeaderParsed (sal_False),
eOState (INETMSG_EOL_BEGIN),
pMsgBuffer (new SvMemoryStream)
{
@@ -427,7 +427,7 @@ INetMessageOStream::~INetMessageOStream (void)
* PutData.
* (Simple Field Parsing (RFC822, Appendix B)).
*/
-int INetMessageOStream::PutData (const sal_Char *pData, ULONG nSize)
+int INetMessageOStream::PutData (const sal_Char *pData, sal_uIntPtr nSize)
{
if (pTargetMsg == NULL) return INETSTREAM_STATUS_ERROR;
@@ -462,7 +462,7 @@ int INetMessageOStream::PutData (const sal_Char *pData, ULONG nSize)
pMsgBuffer->Seek (STREAM_SEEK_TO_BEGIN);
// Mark header parsed.
- bHeaderParsed = TRUE;
+ bHeaderParsed = sal_True;
}
else if ((*pData == ' ') || (*pData == '\t'))
{
@@ -534,7 +534,7 @@ int INetMessageOStream::PutData (const sal_Char *pData, ULONG nSize)
/*
* PutMsgLine.
*/
-int INetMessageOStream::PutMsgLine (const sal_Char *pData, ULONG nSize)
+int INetMessageOStream::PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize)
{
// Check for message container.
if (pTargetMsg == NULL) return INETSTREAM_STATUS_ERROR;
@@ -543,7 +543,7 @@ int INetMessageOStream::PutMsgLine (const sal_Char *pData, ULONG nSize)
if (!IsHeaderParsed())
{
ByteString aField (pData);
- USHORT nPos = aField.Search (':');
+ sal_uInt16 nPos = aField.Search (':');
if (nPos != STRING_NOTFOUND)
{
ByteString aName (
@@ -582,7 +582,7 @@ int INetMessageOStream::PutMsgLine (const sal_Char *pData, ULONG nSize)
/*
* INetMessageIOStream.
*/
-INetMessageIOStream::INetMessageIOStream (ULONG nBufferSize)
+INetMessageIOStream::INetMessageIOStream (sal_uIntPtr nBufferSize)
: INetMessageIStream (nBufferSize),
INetMessageOStream ()
{
@@ -614,15 +614,15 @@ static const sal_Char ebcdic[] = {
* INetMessageEncodeQPStream_Impl.
*/
INetMessageEncodeQPStream_Impl::INetMessageEncodeQPStream_Impl (
- ULONG nMsgBufferSize)
+ sal_uIntPtr nMsgBufferSize)
: INetMessageIStream (),
pMsgStrm (NULL),
nMsgBufSiz (nMsgBufferSize),
nTokBufSiz (80),
eState (INETMSG_EOL_SCR),
- bDone (FALSE)
+ bDone (sal_False)
{
- GenerateHeader (FALSE);
+ GenerateHeader (sal_False);
pMsgBuffer = new sal_Char[nMsgBufSiz];
pMsgRead = pMsgWrite = pMsgBuffer;
@@ -644,7 +644,7 @@ INetMessageEncodeQPStream_Impl::~INetMessageEncodeQPStream_Impl (void)
/*
* GetMsgLine.
*/
-int INetMessageEncodeQPStream_Impl::GetMsgLine (sal_Char *pData, ULONG nSize)
+int INetMessageEncodeQPStream_Impl::GetMsgLine (sal_Char *pData, sal_uIntPtr nSize)
{
INetMessage *pMsg = GetSourceMessage ();
if (pMsg == NULL) return INETSTREAM_STATUS_ERROR;
@@ -773,7 +773,7 @@ int INetMessageEncodeQPStream_Impl::GetMsgLine (sal_Char *pData, ULONG nSize)
pMsgRead = pMsgWrite = pMsgBuffer;
// Read next message block.
- ULONG nRead = pMsgStrm->Read (pMsgBuffer, nMsgBufSiz);
+ sal_uIntPtr nRead = pMsgStrm->Read (pMsgBuffer, nMsgBufSiz);
if (nRead > 0)
{
// Set read pointer.
@@ -788,7 +788,7 @@ int INetMessageEncodeQPStream_Impl::GetMsgLine (sal_Char *pData, ULONG nSize)
*pTokRead++ = '\r';
*pTokRead++ = '\n';
- bDone = TRUE;
+ bDone = sal_True;
}
else
{
@@ -850,7 +850,7 @@ INetMessageDecodeQPStream_Impl::INetMessageDecodeQPStream_Impl (void)
pMsgBuffer (new SvMemoryStream),
nTokBufLen (0)
{
- ParseHeader (FALSE);
+ ParseHeader (sal_False);
}
/*
@@ -865,7 +865,7 @@ INetMessageDecodeQPStream_Impl::~INetMessageDecodeQPStream_Impl (void)
* PutMsgLine.
*/
int INetMessageDecodeQPStream_Impl::PutMsgLine (
- const sal_Char *pData, ULONG nSize)
+ const sal_Char *pData, sal_uIntPtr nSize)
{
INetMessage *pMsg = GetTargetMessage();
if (pMsg == NULL) return INETSTREAM_STATUS_ERROR;
@@ -964,14 +964,14 @@ static const sal_Char six2pr[64] = {
* INetMessageEncode64Stream_Impl.
*/
INetMessageEncode64Stream_Impl::INetMessageEncode64Stream_Impl (
- ULONG nMsgBufferSize)
+ sal_uIntPtr nMsgBufferSize)
: INetMessageIStream (),
pMsgStrm (NULL),
nMsgBufSiz (nMsgBufferSize),
nTokBufSiz (80),
- bDone (FALSE)
+ bDone (sal_False)
{
- GenerateHeader (FALSE);
+ GenerateHeader (sal_False);
pMsgBuffer = new sal_uInt8[nMsgBufSiz];
pMsgRead = pMsgWrite = pMsgBuffer;
@@ -993,7 +993,7 @@ INetMessageEncode64Stream_Impl::~INetMessageEncode64Stream_Impl (void)
/*
* GetMsgLine.
*/
-int INetMessageEncode64Stream_Impl::GetMsgLine (sal_Char *pData, ULONG nSize)
+int INetMessageEncode64Stream_Impl::GetMsgLine (sal_Char *pData, sal_uIntPtr nSize)
{
INetMessage *pMsg = GetSourceMessage ();
if (pMsg == NULL) return INETSTREAM_STATUS_ERROR;
@@ -1063,7 +1063,7 @@ int INetMessageEncode64Stream_Impl::GetMsgLine (sal_Char *pData, ULONG nSize)
pMsgRead = pMsgWrite = pMsgBuffer;
// Read next message block.
- ULONG nRead = pMsgStrm->Read (pMsgBuffer, nMsgBufSiz);
+ sal_uIntPtr nRead = pMsgStrm->Read (pMsgBuffer, nMsgBufSiz);
if (nRead > 0)
{
// Set read pointer.
@@ -1092,7 +1092,7 @@ int INetMessageEncode64Stream_Impl::GetMsgLine (sal_Char *pData, ULONG nSize)
*pTokRead++ = '\n';
// Mark we're done.
- bDone = TRUE;
+ bDone = sal_True;
}
else
{
@@ -1108,7 +1108,7 @@ int INetMessageEncode64Stream_Impl::GetMsgLine (sal_Char *pData, ULONG nSize)
pTokRead = pTokWrite = pTokBuffer;
// Reset done flag, if everything has been done.
- // if (pWBuf == pData) bDone = FALSE;
+ // if (pWBuf == pData) bDone = sal_False;
// Return.
return (pWBuf - pData);
@@ -1172,12 +1172,12 @@ static const sal_uInt8 pr2six[256] = {
* INetMessageDecode64Stream_Impl.
*/
INetMessageDecode64Stream_Impl::INetMessageDecode64Stream_Impl (
- ULONG nMsgBufferSize)
+ sal_uIntPtr nMsgBufferSize)
: INetMessageOStream (),
eState (INETMSG_EOL_SCR),
nMsgBufSiz (nMsgBufferSize)
{
- ParseHeader (FALSE);
+ ParseHeader (sal_False);
pMsgBuffer = new sal_Char[nMsgBufSiz];
pMsgRead = pMsgWrite = pMsgBuffer;
@@ -1195,7 +1195,7 @@ INetMessageDecode64Stream_Impl::~INetMessageDecode64Stream_Impl (void)
* PutMsgLine.
*/
int INetMessageDecode64Stream_Impl::PutMsgLine (
- const sal_Char *pData, ULONG nSize)
+ const sal_Char *pData, sal_uIntPtr nSize)
{
INetMessage *pMsg = GetTargetMessage ();
if (pMsg == NULL) return INETSTREAM_STATUS_ERROR;
@@ -1298,7 +1298,7 @@ int INetMessageDecode64Stream_Impl::PutMsgLine (
/*
* INetMIMEMessageStream.
*/
-INetMIMEMessageStream::INetMIMEMessageStream (ULONG nBufferSize)
+INetMIMEMessageStream::INetMIMEMessageStream (sal_uIntPtr nBufferSize)
: INetMessageIOStream (nBufferSize),
eState (INETMSG_EOL_BEGIN),
nChildIndex (0),
@@ -1360,7 +1360,7 @@ INetMIMEMessageStream::GetMsgEncoding (const String& rContentType)
* GetMsgLine.
* (Message Generator).
*/
-int INetMIMEMessageStream::GetMsgLine (sal_Char *pData, ULONG nSize)
+int INetMIMEMessageStream::GetMsgLine (sal_Char *pData, sal_uIntPtr nSize)
{
// Check for message container.
INetMIMEMessage *pMsg = GetSourceMessage();
@@ -1594,7 +1594,7 @@ int INetMIMEMessageStream::GetMsgLine (sal_Char *pData, ULONG nSize)
* PutMsgLine.
* (Message Parser).
*/
-int INetMIMEMessageStream::PutMsgLine (const sal_Char *pData, ULONG nSize)
+int INetMIMEMessageStream::PutMsgLine (const sal_Char *pData, sal_uIntPtr nSize)
{
// Check for message container.
INetMIMEMessage *pMsg = GetTargetMessage();
@@ -1623,8 +1623,8 @@ int INetMIMEMessageStream::PutMsgLine (const sal_Char *pData, ULONG nSize)
pMsg->SetChildCount( pMsg->GetChildCount() + 1);
INetMIMEMessage* pNewMessage = new INetMIMEMessage;
pNewMessage->SetDocumentLB (
- new SvAsyncLockBytes(new SvCacheStream, FALSE));
- pMsg->AttachChild( *pNewMessage, TRUE );
+ new SvAsyncLockBytes(new SvCacheStream, sal_False));
+ pMsg->AttachChild( *pNewMessage, sal_True );
// Encapsulated message body. Create message parser stream.
pChildStrm = new INetMIMEMessageStream;
@@ -1656,7 +1656,7 @@ int INetMIMEMessageStream::PutMsgLine (const sal_Char *pData, ULONG nSize)
ByteString aLowerType (aType);
aLowerType.ToLowerAscii();
- USHORT nPos = aLowerType.Search ("boundary=");
+ sal_uInt16 nPos = aLowerType.Search ("boundary=");
ByteString aBoundary (aType.Copy (nPos + 9));
aBoundary.EraseLeadingAndTrailingChars (' ');
@@ -1678,7 +1678,7 @@ int INetMIMEMessageStream::PutMsgLine (const sal_Char *pData, ULONG nSize)
if (pMsgBuffer == NULL) pMsgBuffer = new SvMemoryStream;
pMsgBuffer->Write (pData, nSize);
- ULONG nBufSize = pMsgBuffer->Tell();
+ sal_uIntPtr nBufSize = pMsgBuffer->Tell();
const sal_Char* pChar;
const sal_Char* pOldPos;
@@ -1735,9 +1735,9 @@ int INetMIMEMessageStream::PutMsgLine (const sal_Char *pData, ULONG nSize)
new INetMIMEMessage;
pNewMessage->SetDocumentLB (
new SvAsyncLockBytes (
- new SvCacheStream, FALSE));
+ new SvCacheStream, sal_False));
- pMsg->AttachChild( *pNewMessage, TRUE );
+ pMsg->AttachChild( *pNewMessage, sal_True );
// Encapsulated message body. Create message parser stream.
pChildStrm = new INetMIMEMessageStream;
diff --git a/tools/source/memtools/contnr.cxx b/tools/source/memtools/contnr.cxx
index 4a4ee47886ee..63dc74e37441 100644..100755
--- a/tools/source/memtools/contnr.cxx
+++ b/tools/source/memtools/contnr.cxx
@@ -84,7 +84,7 @@ const char* CBlock::DbgCheckCBlock( const void* pBlock )
|*
*************************************************************************/
-CBlock::CBlock( USHORT nInitSize, CBlock* _pPrev, CBlock* _pNext )
+CBlock::CBlock( sal_uInt16 nInitSize, CBlock* _pPrev, CBlock* _pNext )
{
DBG_CTOR( CBlock, DbgCheckCBlock );
@@ -107,7 +107,7 @@ CBlock::CBlock( USHORT nInitSize, CBlock* _pPrev, CBlock* _pNext )
|*
*************************************************************************/
-CBlock::CBlock( USHORT _nSize, CBlock* _pPrev )
+CBlock::CBlock( sal_uInt16 _nSize, CBlock* _pPrev )
{
DBG_CTOR( CBlock, DbgCheckCBlock );
DBG_ASSERT( _nSize, "CBlock::CBlock(): nSize == 0" );
@@ -175,7 +175,7 @@ inline CBlock::~CBlock()
|*
*************************************************************************/
-void CBlock::Insert( void* p, USHORT nIndex, USHORT nReSize )
+void CBlock::Insert( void* p, sal_uInt16 nIndex, sal_uInt16 nReSize )
{
DBG_CHKTHIS( CBlock, DbgCheckCBlock );
DBG_ASSERT( nIndex <= nCount, "CBlock::Insert(): Index > nCount" );
@@ -231,12 +231,12 @@ void CBlock::Insert( void* p, USHORT nIndex, USHORT nReSize )
|*
*************************************************************************/
-CBlock* CBlock::Split( void* p, USHORT nIndex, USHORT nReSize )
+CBlock* CBlock::Split( void* p, sal_uInt16 nIndex, sal_uInt16 nReSize )
{
DBG_CHKTHIS( CBlock, DbgCheckCBlock );
- USHORT nNewSize;
- USHORT nMiddle;
+ sal_uInt16 nNewSize;
+ sal_uInt16 nMiddle;
CBlock* pNewBlock;
nMiddle = nCount/2;
@@ -368,7 +368,7 @@ CBlock* CBlock::Split( void* p, USHORT nIndex, USHORT nReSize )
|*
*************************************************************************/
-void* CBlock::Remove( USHORT nIndex, USHORT nReSize )
+void* CBlock::Remove( sal_uInt16 nIndex, sal_uInt16 nReSize )
{
DBG_CHKTHIS( CBlock, DbgCheckCBlock );
@@ -427,7 +427,7 @@ void* CBlock::Remove( USHORT nIndex, USHORT nReSize )
|*
*************************************************************************/
-inline void* CBlock::Replace( void* p, USHORT nIndex )
+inline void* CBlock::Replace( void* p, sal_uInt16 nIndex )
{
DBG_CHKTHIS( CBlock, DbgCheckCBlock );
@@ -448,7 +448,7 @@ inline void* CBlock::Replace( void* p, USHORT nIndex )
|*
*************************************************************************/
-inline void** CBlock::GetObjectPtr( USHORT nIndex )
+inline void** CBlock::GetObjectPtr( sal_uInt16 nIndex )
{
DBG_CHKTHIS( CBlock, DbgCheckCBlock );
@@ -465,7 +465,7 @@ inline void** CBlock::GetObjectPtr( USHORT nIndex )
|*
*************************************************************************/
-void CBlock::SetSize( USHORT nNewSize )
+void CBlock::SetSize( sal_uInt16 nNewSize )
{
DBG_CHKTHIS( CBlock, DbgCheckCBlock );
DBG_ASSERT( nNewSize, "CBlock::SetSize(): nNewSize == 0" );
@@ -589,7 +589,7 @@ void Container::ImpCopyContainer( const Container* pCont2 )
|*
*************************************************************************/
-Container::Container( USHORT _nBlockSize, USHORT _nInitSize, USHORT _nReSize )
+Container::Container( sal_uInt16 _nBlockSize, sal_uInt16 _nInitSize, sal_uInt16 _nReSize )
{
DBG_CTOR( Container, DbgCheckContainer );
@@ -654,7 +654,7 @@ Container::Container( USHORT _nBlockSize, USHORT _nInitSize, USHORT _nReSize )
|*
*************************************************************************/
-Container::Container( ULONG nSize )
+Container::Container( sal_uIntPtr nSize )
{
DBG_CTOR( Container, DbgCheckContainer );
@@ -675,7 +675,7 @@ Container::Container( ULONG nSize )
// Muss mehr als ein Block angelegt werden
if ( nSize <= nBlockSize )
{
- pFirstBlock = new CBlock( (USHORT)nSize, NULL );
+ pFirstBlock = new CBlock( (sal_uInt16)nSize, NULL );
pLastBlock = pFirstBlock;
}
else
@@ -696,7 +696,7 @@ Container::Container( ULONG nSize )
nSize -= nBlockSize;
}
- pLastBlock = new CBlock( (USHORT)nSize, pBlock1 );
+ pLastBlock = new CBlock( (sal_uInt16)nSize, pBlock1 );
pBlock1->SetNextBlock( pLastBlock );
}
@@ -756,7 +756,7 @@ Container::~Container()
|*
*************************************************************************/
-void Container::ImpInsert( void* p, CBlock* pBlock, USHORT nIndex )
+void Container::ImpInsert( void* p, CBlock* pBlock, sal_uInt16 nIndex )
{
DBG_CHKTHIS( Container, DbgCheckContainer );
@@ -856,7 +856,7 @@ void Container::Insert( void* p )
|*
*************************************************************************/
-void Container::Insert( void* p, ULONG nIndex )
+void Container::Insert( void* p, sal_uIntPtr nIndex )
{
if ( nCount <= nIndex )
{
@@ -875,7 +875,7 @@ void Container::Insert( void* p, ULONG nIndex )
pTemp = pTemp->GetNextBlock();
}
- ImpInsert( p, pTemp, (USHORT)nIndex );
+ ImpInsert( p, pTemp, (sal_uInt16)nIndex );
}
}
@@ -891,7 +891,7 @@ void Container::Insert( void* p, ULONG nIndex )
void Container::Insert( void* pNew, void* pOld )
{
- ULONG nIndex = GetPos( pOld );
+ sal_uIntPtr nIndex = GetPos( pOld );
if ( nIndex != CONTAINER_ENTRY_NOTFOUND )
Insert( pNew, nIndex );
}
@@ -906,7 +906,7 @@ void Container::Insert( void* pNew, void* pOld )
|*
*************************************************************************/
-void* Container::ImpRemove( CBlock* pBlock, USHORT nIndex )
+void* Container::ImpRemove( CBlock* pBlock, sal_uInt16 nIndex )
{
DBG_CHKTHIS( Container, DbgCheckContainer );
@@ -1002,7 +1002,7 @@ void* Container::Remove()
|*
*************************************************************************/
-void* Container::Remove( ULONG nIndex )
+void* Container::Remove( sal_uIntPtr nIndex )
{
// Ist Index nicht innerhalb des Containers, dann NULL zurueckgeben
if ( nCount <= nIndex )
@@ -1017,7 +1017,7 @@ void* Container::Remove( ULONG nIndex )
pTemp = pTemp->GetNextBlock();
}
- return ImpRemove( pTemp, (USHORT)nIndex );
+ return ImpRemove( pTemp, (sal_uInt16)nIndex );
}
}
@@ -1051,7 +1051,7 @@ void* Container::Replace( void* p )
|*
*************************************************************************/
-void* Container::Replace( void* p, ULONG nIndex )
+void* Container::Replace( void* p, sal_uIntPtr nIndex )
{
DBG_CHKTHIS( Container, DbgCheckContainer );
@@ -1068,7 +1068,7 @@ void* Container::Replace( void* p, ULONG nIndex )
pTemp = pTemp->GetNextBlock();
}
- return pTemp->Replace( p, (USHORT)nIndex );
+ return pTemp->Replace( p, (sal_uInt16)nIndex );
}
}
@@ -1082,7 +1082,7 @@ void* Container::Replace( void* p, ULONG nIndex )
|*
*************************************************************************/
-void Container::SetSize( ULONG nNewSize )
+void Container::SetSize( sal_uIntPtr nNewSize )
{
DBG_CHKTHIS( Container, DbgCheckContainer );
@@ -1092,7 +1092,7 @@ void Container::SetSize( ULONG nNewSize )
if ( nNewSize != nCount )
{
CBlock* pTemp;
- ULONG nTemp;
+ sal_uIntPtr nTemp;
// Wird verkleinert
if ( nNewSize < nCount )
@@ -1106,14 +1106,14 @@ void Container::SetSize( ULONG nNewSize )
}
// Alle folgenden Bloecke loeschen
- BOOL bLast = FALSE;
+ sal_Bool bLast = sal_False;
CBlock* pDelNext;
CBlock* pDelBlock = pTemp->GetNextBlock();
while ( pDelBlock )
{
// Muss CurrentBlock umgesetzt werden
if ( pDelBlock == pCurBlock )
- bLast = TRUE;
+ bLast = sal_True;
pDelNext = pDelBlock->GetNextBlock();
delete pDelBlock;
pDelBlock = pDelNext;
@@ -1124,7 +1124,7 @@ void Container::SetSize( ULONG nNewSize )
{
pLastBlock = pTemp;
pTemp->SetNextBlock( NULL );
- pTemp->SetSize( (USHORT)(nNewSize-nTemp) );
+ pTemp->SetSize( (sal_uInt16)(nNewSize-nTemp) );
}
else
{
@@ -1151,7 +1151,7 @@ void Container::SetSize( ULONG nNewSize )
// Muss mehr als ein Block angelegt werden
if ( nNewSize <= nBlockSize )
{
- pFirstBlock = new CBlock( (USHORT)nNewSize, NULL );
+ pFirstBlock = new CBlock( (sal_uInt16)nNewSize, NULL );
pLastBlock = pFirstBlock;
}
else
@@ -1172,7 +1172,7 @@ void Container::SetSize( ULONG nNewSize )
nNewSize -= nBlockSize;
}
- pLastBlock = new CBlock( (USHORT)nNewSize, pBlock1 );
+ pLastBlock = new CBlock( (sal_uInt16)nNewSize, pBlock1 );
pBlock1->SetNextBlock( pLastBlock );
}
@@ -1180,7 +1180,7 @@ void Container::SetSize( ULONG nNewSize )
}
// Reicht es, den letzen Puffer in der Groesse anzupassen
else if ( (nTemp+pTemp->Count()) <= nBlockSize )
- pTemp->SetSize( (USHORT)(nTemp+pTemp->Count()) );
+ pTemp->SetSize( (sal_uInt16)(nTemp+pTemp->Count()) );
else
{
// Puffer auf max. Blockgroesse setzen
@@ -1201,7 +1201,7 @@ void Container::SetSize( ULONG nNewSize )
// Den letzten Block anlegen
if ( nTemp )
{
- pLastBlock = new CBlock( (USHORT)nTemp, pTemp );
+ pLastBlock = new CBlock( (sal_uInt16)nTemp, pTemp );
pTemp->SetNextBlock( pLastBlock );
}
else
@@ -1278,7 +1278,7 @@ void* Container::GetCurObject() const
|*
*************************************************************************/
-ULONG Container::GetCurPos() const
+sal_uIntPtr Container::GetCurPos() const
{
DBG_CHKTHIS( Container, DbgCheckContainer );
@@ -1289,7 +1289,7 @@ ULONG Container::GetCurPos() const
{
// Block suchen
CBlock* pTemp = pFirstBlock;
- ULONG nTemp = 0;
+ sal_uIntPtr nTemp = 0;
while ( pTemp != pCurBlock )
{
nTemp += pTemp->Count();
@@ -1310,7 +1310,7 @@ ULONG Container::GetCurPos() const
|*
*************************************************************************/
-void** Container::GetObjectPtr( ULONG nIndex )
+void** Container::GetObjectPtr( sal_uIntPtr nIndex )
{
DBG_CHKTHIS( Container, DbgCheckContainer );
@@ -1328,7 +1328,7 @@ void** Container::GetObjectPtr( ULONG nIndex )
}
// Item innerhalb des gefundenen Blocks zurueckgeben
- return pTemp->GetObjectPtr( (USHORT)nIndex );
+ return pTemp->GetObjectPtr( (sal_uInt16)nIndex );
}
}
@@ -1342,7 +1342,7 @@ void** Container::GetObjectPtr( ULONG nIndex )
|*
*************************************************************************/
-void* Container::GetObject( ULONG nIndex ) const
+void* Container::GetObject( sal_uIntPtr nIndex ) const
{
DBG_CHKTHIS( Container, DbgCheckContainer );
@@ -1360,7 +1360,7 @@ void* Container::GetObject( ULONG nIndex ) const
}
// Item innerhalb des gefundenen Blocks zurueckgeben
- return pTemp->GetObject( (USHORT)nIndex );
+ return pTemp->GetObject( (sal_uInt16)nIndex );
}
}
@@ -1374,15 +1374,15 @@ void* Container::GetObject( ULONG nIndex ) const
|*
*************************************************************************/
-ULONG Container::GetPos( const void* p ) const
+sal_uIntPtr Container::GetPos( const void* p ) const
{
DBG_CHKTHIS( Container, DbgCheckContainer );
void** pNodes;
CBlock* pTemp;
- ULONG nTemp;
- USHORT nBlockCount;
- USHORT i;
+ sal_uIntPtr nTemp;
+ sal_uInt16 nBlockCount;
+ sal_uInt16 i;
// Block suchen
pTemp = pFirstBlock;
@@ -1416,8 +1416,8 @@ ULONG Container::GetPos( const void* p ) const
|*
*************************************************************************/
-ULONG Container::GetPos( const void* p, ULONG nStartIndex,
- BOOL bForward ) const
+sal_uIntPtr Container::GetPos( const void* p, sal_uIntPtr nStartIndex,
+ sal_Bool bForward ) const
{
DBG_CHKTHIS( Container, DbgCheckContainer );
@@ -1427,12 +1427,12 @@ ULONG Container::GetPos( const void* p, ULONG nStartIndex,
else
{
void** pNodes;
- USHORT nBlockCount;
- USHORT i;
+ sal_uInt16 nBlockCount;
+ sal_uInt16 i;
// Block suchen
CBlock* pTemp = pFirstBlock;
- ULONG nTemp = 0;
+ sal_uIntPtr nTemp = 0;
while ( nTemp+pTemp->Count() <= nStartIndex )
{
nTemp += pTemp->Count();
@@ -1443,7 +1443,7 @@ ULONG Container::GetPos( const void* p, ULONG nStartIndex,
if ( bForward )
{
// Alle Bloecke durchrsuchen
- i = (USHORT)(nStartIndex - nTemp);
+ i = (sal_uInt16)(nStartIndex - nTemp);
pNodes = pTemp->GetObjectPtr( i );
do
{
@@ -1465,12 +1465,12 @@ ULONG Container::GetPos( const void* p, ULONG nStartIndex,
else
break;
}
- while ( TRUE );
+ while ( sal_True );
}
else
{
// Alle Bloecke durchrsuchen
- i = (USHORT)(nStartIndex-nTemp)+1;
+ i = (sal_uInt16)(nStartIndex-nTemp)+1;
pNodes = pTemp->GetObjectPtr( i-1 );
do
{
@@ -1494,7 +1494,7 @@ ULONG Container::GetPos( const void* p, ULONG nStartIndex,
else
break;
}
- while ( TRUE );
+ while ( sal_True );
}
}
@@ -1511,7 +1511,7 @@ ULONG Container::GetPos( const void* p, ULONG nStartIndex,
|*
*************************************************************************/
-void* Container::Seek( ULONG nIndex )
+void* Container::Seek( sal_uIntPtr nIndex )
{
DBG_CHKTHIS( Container, DbgCheckContainer );
@@ -1530,7 +1530,7 @@ void* Container::Seek( ULONG nIndex )
// Item innerhalb des gefundenen Blocks zurueckgeben
pCurBlock = pTemp;
- nCurIndex = (USHORT)nIndex;
+ nCurIndex = (sal_uInt16)nIndex;
return pCurBlock->GetObject( nCurIndex );
}
}
@@ -1689,20 +1689,20 @@ Container& Container::operator =( const Container& r )
|*
*************************************************************************/
-BOOL Container::operator ==( const Container& r ) const
+sal_Bool Container::operator ==( const Container& r ) const
{
DBG_CHKTHIS( Container, DbgCheckContainer );
if ( nCount != r.nCount )
- return FALSE;
+ return sal_False;
- ULONG i = 0;
+ sal_uIntPtr i = 0;
while ( i < nCount )
{
if ( GetObject( i ) != r.GetObject( i ) )
- return FALSE;
+ return sal_False;
i++;
}
- return TRUE;
+ return sal_True;
}
diff --git a/tools/source/memtools/mempool.cxx b/tools/source/memtools/mempool.cxx
index 45d6d2ea9367..27054a3b79db 100644..100755
--- a/tools/source/memtools/mempool.cxx
+++ b/tools/source/memtools/mempool.cxx
@@ -42,7 +42,7 @@
*************************************************************************/
FixedMemPool::FixedMemPool (
- USHORT _nTypeSize, USHORT, USHORT)
+ sal_uInt16 _nTypeSize, sal_uInt16, sal_uInt16)
{
char name[RTL_CACHE_NAME_LENGTH + 1];
snprintf (name, sizeof(name), "FixedMemPool_%d", (int)_nTypeSize);
diff --git a/tools/source/memtools/multisel.cxx b/tools/source/memtools/multisel.cxx
index 1e4da74348f4..8fd94361d2a3 100644..100755
--- a/tools/source/memtools/multisel.cxx
+++ b/tools/source/memtools/multisel.cxx
@@ -63,7 +63,7 @@ static void Print( const MultiSelection* pSel )
}
DbgOutf( "SelCount: %4ld\n", pSel->nSelCount );
DbgOutf( "SubCount: %4ld\n", pSel->aSels.Count() );
- for ( ULONG nPos = 0; nPos < pSel->aSels.Count(); ++nPos )
+ for ( sal_uIntPtr nPos = 0; nPos < pSel->aSels.Count(); ++nPos )
{
DbgOutf( "SubSel #%2ld: %4ld-%4ld\n", nPos,
pSel->aSels.GetObject(nPos)->Min(),
@@ -93,10 +93,10 @@ void MultiSelection::ImplClear()
// -----------------------------------------------------------------------
-ULONG MultiSelection::ImplFindSubSelection( long nIndex ) const
+sal_uIntPtr MultiSelection::ImplFindSubSelection( long nIndex ) const
{
// iterate through the sub selections
- ULONG n = 0;
+ sal_uIntPtr n = 0;
for ( ;
n < aSels.Count() && nIndex > aSels.GetObject(n)->Max();
++n ) {} /* empty loop */
@@ -105,11 +105,11 @@ ULONG MultiSelection::ImplFindSubSelection( long nIndex ) const
// -----------------------------------------------------------------------
-BOOL MultiSelection::ImplMergeSubSelections( ULONG nPos1, ULONG nPos2 )
+sal_Bool MultiSelection::ImplMergeSubSelections( sal_uIntPtr nPos1, sal_uIntPtr nPos2 )
{
// didn't a sub selection at nPos2 exist?
if ( nPos2 >= aSels.Count() )
- return FALSE;
+ return sal_False;
// did the sub selections touch each other?
if ( (aSels.GetObject(nPos1)->Max() + 1) == aSels.GetObject(nPos2)->Min() )
@@ -117,10 +117,10 @@ BOOL MultiSelection::ImplMergeSubSelections( ULONG nPos1, ULONG nPos2 )
// merge them
aSels.GetObject(nPos1)->Max() = aSels.GetObject(nPos2)->Max();
delete aSels.Remove(nPos2);
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -129,8 +129,8 @@ MultiSelection::MultiSelection():
aTotRange( 0, -1 ),
nCurSubSel(0),
nSelCount(0),
- bCurValid(FALSE),
- bSelectNew(FALSE)
+ bCurValid(sal_False),
+ bSelectNew(sal_False)
{
}
@@ -140,8 +140,8 @@ MultiSelection::MultiSelection( const UniString& rString, sal_Unicode cRange, sa
aTotRange(0,RANGE_MAX),
nCurSubSel(0),
nSelCount(0),
- bCurValid(FALSE),
- bSelectNew(FALSE)
+ bCurValid(sal_False),
+ bSelectNew(sal_False)
{
// Dies ist nur ein Schnellschuss und sollte bald optimiert,
// an die verschiedenen Systeme (UNIX etc.)
@@ -150,8 +150,8 @@ MultiSelection::MultiSelection( const UniString& rString, sal_Unicode cRange, sa
UniString aStr( rString );
sal_Unicode* pStr = aStr.GetBufferAccess();
sal_Unicode* pOld = pStr;
- BOOL bReady = FALSE;
- BOOL bUntil = FALSE;
+ sal_Bool bReady = sal_False;
+ sal_Bool bUntil = sal_False;
xub_StrLen nCut = 0;
// Hier normieren wir den String, sodass nur Ziffern,
@@ -177,11 +177,11 @@ MultiSelection::MultiSelection( const UniString& rString, sal_Unicode cRange, sa
{
*pStr++ = ';';
nCut++;
- bReady = FALSE;
+ bReady = sal_False;
}
*pStr++ = *pOld;
nCut++;
- bUntil = FALSE;
+ bUntil = sal_False;
break;
case '-':
@@ -193,12 +193,12 @@ MultiSelection::MultiSelection( const UniString& rString, sal_Unicode cRange, sa
{
*pStr++ = '-';
nCut++;
- bUntil = TRUE;
+ bUntil = sal_True;
}
- bReady = FALSE;
+ bReady = sal_False;
}
else
- bReady = TRUE;
+ bReady = sal_True;
break;
case ' ':
@@ -214,12 +214,12 @@ MultiSelection::MultiSelection( const UniString& rString, sal_Unicode cRange, sa
{
*pStr++ = '-';
nCut++;
- bUntil = TRUE;
+ bUntil = sal_True;
}
- bReady = FALSE;
+ bReady = sal_False;
}
else
- bReady = TRUE;
+ bReady = sal_True;
break;
}
@@ -233,7 +233,7 @@ MultiSelection::MultiSelection( const UniString& rString, sal_Unicode cRange, sa
const sal_Unicode* pCStr = aStr.GetBuffer();
long nPage = 1;
long nNum = 1;
- bUntil = FALSE;
+ bUntil = sal_False;
while ( *pCStr )
{
switch ( *pCStr )
@@ -265,13 +265,13 @@ MultiSelection::MultiSelection( const UniString& rString, sal_Unicode cRange, sa
Select( nNum );
nPage = 0;
aNumStr.Erase();
- bUntil = FALSE;
+ bUntil = sal_False;
break;
case '-':
nPage = aNumStr.ToInt32();
aNumStr.Erase();
- bUntil = TRUE;
+ bUntil = sal_True;
break;
}
@@ -298,7 +298,7 @@ MultiSelection::MultiSelection( const MultiSelection& rOrig ) :
aTotRange(rOrig.aTotRange),
nSelCount(rOrig.nSelCount),
bCurValid(rOrig.bCurValid),
- bSelectNew(FALSE)
+ bSelectNew(sal_False)
{
if ( bCurValid )
{
@@ -307,7 +307,7 @@ MultiSelection::MultiSelection( const MultiSelection& rOrig ) :
}
// copy the sub selections
- for ( ULONG n = 0; n < rOrig.aSels.Count(); ++n )
+ for ( sal_uIntPtr n = 0; n < rOrig.aSels.Count(); ++n )
aSels.Insert( new Range( *rOrig.aSels.GetObject(n) ), LIST_APPEND );
}
@@ -317,8 +317,8 @@ MultiSelection::MultiSelection( const Range& rRange ):
aTotRange(rRange),
nCurSubSel(0),
nSelCount(0),
- bCurValid(FALSE),
- bSelectNew(FALSE)
+ bCurValid(sal_False),
+ bSelectNew(sal_False)
{
}
@@ -348,7 +348,7 @@ MultiSelection& MultiSelection::operator= ( const MultiSelection& rOrig )
// clear the old and copy the sub selections
ImplClear();
- for ( ULONG n = 0; n < rOrig.aSels.Count(); ++n )
+ for ( sal_uIntPtr n = 0; n < rOrig.aSels.Count(); ++n )
aSels.Insert( new Range( *rOrig.aSels.GetObject(n) ), LIST_APPEND );
nSelCount = rOrig.nSelCount;
@@ -357,24 +357,24 @@ MultiSelection& MultiSelection::operator= ( const MultiSelection& rOrig )
// -----------------------------------------------------------------------
-BOOL MultiSelection::operator== ( MultiSelection& rWith )
+sal_Bool MultiSelection::operator== ( MultiSelection& rWith )
{
if ( aTotRange != rWith.aTotRange || nSelCount != rWith.nSelCount ||
aSels.Count() != rWith.aSels.Count() )
- return FALSE;
+ return sal_False;
// compare the sub seletions
- for ( ULONG n = 0; n < aSels.Count(); ++n )
+ for ( sal_uIntPtr n = 0; n < aSels.Count(); ++n )
if ( *aSels.GetObject(n) != *rWith.aSels.GetObject(n) )
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
// -----------------------------------------------------------------------
-void MultiSelection::SelectAll( BOOL bSelect )
+void MultiSelection::SelectAll( sal_Bool bSelect )
{
- DBG(DbgOutf( "::SelectAll(%s)\n", bSelect ? "TRUE" : "FALSE" ));
+ DBG(DbgOutf( "::SelectAll(%s)\n", bSelect ? "sal_True" : "sal_False" ));
ImplClear();
if ( bSelect )
@@ -388,16 +388,16 @@ void MultiSelection::SelectAll( BOOL bSelect )
// -----------------------------------------------------------------------
-BOOL MultiSelection::Select( long nIndex, BOOL bSelect )
+sal_Bool MultiSelection::Select( long nIndex, sal_Bool bSelect )
{
DBG_ASSERT( aTotRange.IsInside(nIndex), "selected index out of range" );
// out of range?
if ( !aTotRange.IsInside(nIndex) )
- return FALSE;
+ return sal_False;
// find the virtual target position
- ULONG nSubSelPos = ImplFindSubSelection( nIndex );
+ sal_uIntPtr nSubSelPos = ImplFindSubSelection( nIndex );
if ( bSelect )
{
@@ -405,7 +405,7 @@ BOOL MultiSelection::Select( long nIndex, BOOL bSelect )
if ( nSubSelPos < aSels.Count() &&
aSels.GetObject(nSubSelPos)->IsInside( nIndex ) )
// already selected, nothing to do
- return FALSE;
+ return sal_False;
// it will become selected
++nSelCount;
@@ -441,7 +441,7 @@ BOOL MultiSelection::Select( long nIndex, BOOL bSelect )
{
// not selected, nothing to do
DBG(Print( this ));
- return FALSE;
+ return sal_False;
}
// it will become deselected
@@ -453,7 +453,7 @@ BOOL MultiSelection::Select( long nIndex, BOOL bSelect )
// remove the complete sub selection
delete aSels.Remove( nSubSelPos );
DBG(Print( this ));
- return TRUE;
+ return sal_True;
}
// is it at the beginning of the found sub selection?
@@ -475,20 +475,20 @@ BOOL MultiSelection::Select( long nIndex, BOOL bSelect )
DBG(Print( this ));
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-void MultiSelection::Select( const Range& rIndexRange, BOOL bSelect )
+void MultiSelection::Select( const Range& rIndexRange, sal_Bool bSelect )
{
Range* pRange;
long nOld;
- ULONG nTmpMin = rIndexRange.Min();
- ULONG nTmpMax = rIndexRange.Max();
- ULONG nCurMin = FirstSelected();
- ULONG nCurMax = LastSelected();
+ sal_uIntPtr nTmpMin = rIndexRange.Min();
+ sal_uIntPtr nTmpMax = rIndexRange.Max();
+ sal_uIntPtr nCurMin = FirstSelected();
+ sal_uIntPtr nCurMax = LastSelected();
DBG_ASSERT(aTotRange.IsInside(nTmpMax), "selected index out of range" );
DBG_ASSERT(aTotRange.IsInside(nTmpMin), "selected index out of range" );
@@ -512,7 +512,7 @@ void MultiSelection::Select( const Range& rIndexRange, BOOL bSelect )
if( nCurMin > (nTmpMax+1) )
{
pRange = new Range( rIndexRange );
- aSels.Insert( pRange, (ULONG)0 );
+ aSels.Insert( pRange, (sal_uIntPtr)0 );
nSelCount += pRange->Len();
}
else
@@ -522,7 +522,7 @@ void MultiSelection::Select( const Range& rIndexRange, BOOL bSelect )
pRange->Min() = (long)nTmpMin;
nSelCount += ( nOld - nTmpMin );
}
- bCurValid = FALSE;
+ bCurValid = sal_False;
}
return;
}
@@ -545,7 +545,7 @@ void MultiSelection::Select( const Range& rIndexRange, BOOL bSelect )
pRange->Max() = (long)nTmpMax;
nSelCount += ( nTmpMax - nOld );
}
- bCurValid = FALSE;
+ bCurValid = sal_False;
}
return;
}
@@ -560,10 +560,10 @@ void MultiSelection::Select( const Range& rIndexRange, BOOL bSelect )
// -----------------------------------------------------------------------
-BOOL MultiSelection::IsSelected( long nIndex ) const
+sal_Bool MultiSelection::IsSelected( long nIndex ) const
{
// find the virtual target position
- ULONG nSubSelPos = ImplFindSubSelection( nIndex );
+ sal_uIntPtr nSubSelPos = ImplFindSubSelection( nIndex );
return nSubSelPos < aSels.Count() &&
aSels.GetObject(nSubSelPos)->IsInside(nIndex);
@@ -576,7 +576,7 @@ void MultiSelection::Insert( long nIndex, long nCount )
DBG(DbgOutf( "::Insert(%ld, %ld)\n", nIndex, nCount ));
// find the virtual target position
- ULONG nSubSelPos = ImplFindSubSelection( nIndex );
+ sal_uIntPtr nSubSelPos = ImplFindSubSelection( nIndex );
// did we need to shift the sub selections?
if ( nSubSelPos < aSels.Count() )
@@ -608,14 +608,14 @@ void MultiSelection::Insert( long nIndex, long nCount )
}
// shift the sub selections behind the inserting position
- for ( ULONG nPos = nSubSelPos; nPos < aSels.Count(); ++nPos )
+ for ( sal_uIntPtr nPos = nSubSelPos; nPos < aSels.Count(); ++nPos )
{
aSels.GetObject(nPos)->Min() += nCount;
aSels.GetObject(nPos)->Max() += nCount;
}
}
- bCurValid = FALSE;
+ bCurValid = sal_False;
aTotRange.Max() += nCount;
if ( bSelectNew )
nSelCount += nCount;
@@ -630,7 +630,7 @@ void MultiSelection::Remove( long nIndex )
DBG(DbgOutf( "::Remove(%ld)\n", nIndex ));
// find the virtual target position
- ULONG nSubSelPos = ImplFindSubSelection( nIndex );
+ sal_uIntPtr nSubSelPos = ImplFindSubSelection( nIndex );
// did we remove from an existing sub selection?
if ( nSubSelPos < aSels.Count() &&
@@ -649,13 +649,13 @@ void MultiSelection::Remove( long nIndex )
}
// shift the sub selections behind the removed index
- for ( ULONG nPos = nSubSelPos; nPos < aSels.Count(); ++nPos )
+ for ( sal_uIntPtr nPos = nSubSelPos; nPos < aSels.Count(); ++nPos )
{
--( aSels.GetObject(nPos)->Min() );
--( aSels.GetObject(nPos)->Max() );
}
- bCurValid = FALSE;
+ bCurValid = sal_False;
aTotRange.Max() -= 1;
DBG(Print( this ));
@@ -713,14 +713,14 @@ long MultiSelection::ImplBwdUnselected()
// -----------------------------------------------------------------------
-long MultiSelection::FirstSelected( BOOL bInverse )
+long MultiSelection::FirstSelected( sal_Bool bInverse )
{
bInverseCur = bInverse;
nCurSubSel = 0;
if ( bInverseCur )
{
- bCurValid = nSelCount < ULONG(aTotRange.Len());
+ bCurValid = nSelCount < sal_uIntPtr(aTotRange.Len());
if ( bCurValid )
{
nCurIndex = 0;
@@ -820,7 +820,7 @@ void MultiSelection::SetTotalRange( const Range& rTotRange )
if( pRange->Max() < aTotRange.Min() )
{
delete pRange;
- aSels.Remove( (ULONG)0 );
+ aSels.Remove( (sal_uIntPtr)0 );
}
else if( pRange->Min() < aTotRange.Min() )
{
@@ -834,14 +834,14 @@ void MultiSelection::SetTotalRange( const Range& rTotRange )
}
// die obere Bereichsgrenze anpassen
- ULONG nCount = aSels.Count();
+ sal_uIntPtr nCount = aSels.Count();
while( nCount )
{
pRange = aSels.GetObject( nCount - 1 );
if( pRange->Min() > aTotRange.Max() )
{
delete pRange;
- aSels.Remove( (ULONG)(nCount - 1) );
+ aSels.Remove( (sal_uIntPtr)(nCount - 1) );
}
else if( pRange->Max() > aTotRange.Max() )
{
@@ -863,7 +863,7 @@ void MultiSelection::SetTotalRange( const Range& rTotRange )
pRange = aSels.Next();
}
- bCurValid = FALSE;
+ bCurValid = sal_False;
nCurIndex = 0;
}
diff --git a/tools/source/memtools/table.cxx b/tools/source/memtools/table.cxx
index 50ac46e99758..80b2c9747966 100644..100755
--- a/tools/source/memtools/table.cxx
+++ b/tools/source/memtools/table.cxx
@@ -37,16 +37,16 @@
// =======================================================================
-ULONG Table::ImplGetIndex( ULONG nKey, ULONG* pIndex ) const
+sal_uIntPtr Table::ImplGetIndex( sal_uIntPtr nKey, sal_uIntPtr* pIndex ) const
{
// Abpruefen, ob der erste Key groesser als der Vergleichskey ist
- if ( !nCount || (nKey < (ULONG)Container::ImpGetObject(0)) )
+ if ( !nCount || (nKey < (sal_uIntPtr)Container::ImpGetObject(0)) )
return TABLE_ENTRY_NOTFOUND;
- ULONG nLow;
- ULONG nHigh;
- ULONG nMid;
- ULONG nCompareKey;
+ sal_uIntPtr nLow;
+ sal_uIntPtr nHigh;
+ sal_uIntPtr nMid;
+ sal_uIntPtr nCompareKey;
void** pNodes = Container::ImpGetOnlyNodes();
// Binaeres Suchen
@@ -57,7 +57,7 @@ ULONG Table::ImplGetIndex( ULONG nKey, ULONG* pIndex ) const
do
{
nMid = (nLow + nHigh) / 2;
- nCompareKey = (ULONG)pNodes[nMid*2];
+ nCompareKey = (sal_uIntPtr)pNodes[nMid*2];
if ( nKey < nCompareKey )
nHigh = nMid-1;
else
@@ -75,7 +75,7 @@ ULONG Table::ImplGetIndex( ULONG nKey, ULONG* pIndex ) const
do
{
nMid = (nLow + nHigh) / 2;
- nCompareKey = (ULONG)Container::ImpGetObject( nMid*2 );
+ nCompareKey = (sal_uIntPtr)Container::ImpGetObject( nMid*2 );
if ( nKey < nCompareKey )
nHigh = nMid-1;
else
@@ -102,7 +102,7 @@ ULONG Table::ImplGetIndex( ULONG nKey, ULONG* pIndex ) const
// =======================================================================
-Table::Table( USHORT _nInitSize, USHORT _nReSize ) :
+Table::Table( sal_uInt16 _nInitSize, sal_uInt16 _nReSize ) :
Container( CONTAINER_MAXBLOCKSIZE, _nInitSize*2, _nReSize*2 )
{
DBG_ASSERT( _nInitSize <= 32767, "Table::Table(): InitSize > 32767" );
@@ -112,27 +112,27 @@ Table::Table( USHORT _nInitSize, USHORT _nReSize ) :
// -----------------------------------------------------------------------
-BOOL Table::Insert( ULONG nKey, void* p )
+sal_Bool Table::Insert( sal_uIntPtr nKey, void* p )
{
// Tabellenelement einsortieren
- ULONG i;
+ sal_uIntPtr i;
if ( nCount )
{
if ( nCount <= 24 )
{
- USHORT n = 0;
- USHORT nTempCount = (USHORT)nCount * 2;
+ sal_uInt16 n = 0;
+ sal_uInt16 nTempCount = (sal_uInt16)nCount * 2;
//<!--Modified by PengYunQuan for resolving a NULL pointer access
if( void** pNodes = Container::ImpGetOnlyNodes() )
{
- ULONG nCompareKey = (ULONG)(*pNodes);
+ sal_uIntPtr nCompareKey = (sal_uIntPtr)(*pNodes);
while ( nKey > nCompareKey )
{
n += 2;
pNodes += 2;
if ( n < nTempCount )
- nCompareKey = (ULONG)(*pNodes);
+ nCompareKey = (sal_uIntPtr)(*pNodes);
else
{
nCompareKey = 0;
@@ -142,7 +142,7 @@ BOOL Table::Insert( ULONG nKey, void* p )
// Testen, ob sich der Key schon in der Tabelle befindet
if ( nKey == nCompareKey )
- return FALSE;
+ return sal_False;
i = n;
}
@@ -150,7 +150,7 @@ BOOL Table::Insert( ULONG nKey, void* p )
{
i = 0;
if ( ImplGetIndex( nKey, &i ) != TABLE_ENTRY_NOTFOUND )
- return FALSE;
+ return sal_False;
}
//-->Modified by PengYunQuan for resolving a NULL pointer access
}
@@ -158,7 +158,7 @@ BOOL Table::Insert( ULONG nKey, void* p )
{
i = 0;
if ( ImplGetIndex( nKey, &i ) != TABLE_ENTRY_NOTFOUND )
- return FALSE;
+ return sal_False;
}
}
else
@@ -171,15 +171,15 @@ BOOL Table::Insert( ULONG nKey, void* p )
// Ein neuer Eintrag
nCount++;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-void* Table::Remove( ULONG nKey )
+void* Table::Remove( sal_uIntPtr nKey )
{
// Index besorgen
- ULONG nIndex = ImplGetIndex( nKey );
+ sal_uIntPtr nIndex = ImplGetIndex( nKey );
// Testen, ob sich der Key in der Tabelle befindet
if ( nIndex == TABLE_ENTRY_NOTFOUND )
@@ -197,10 +197,10 @@ void* Table::Remove( ULONG nKey )
// -----------------------------------------------------------------------
-void* Table::Replace( ULONG nKey, void* p )
+void* Table::Replace( sal_uIntPtr nKey, void* p )
{
// Index abfragen
- ULONG nIndex = ImplGetIndex( nKey );
+ sal_uIntPtr nIndex = ImplGetIndex( nKey );
// Existiert kein Eintrag mit dem Schluessel
if ( nIndex == TABLE_ENTRY_NOTFOUND )
@@ -211,10 +211,10 @@ void* Table::Replace( ULONG nKey, void* p )
// -----------------------------------------------------------------------
-void* Table::Get( ULONG nKey ) const
+void* Table::Get( sal_uIntPtr nKey ) const
{
// Index besorgen
- ULONG nIndex = ImplGetIndex( nKey );
+ sal_uIntPtr nIndex = ImplGetIndex( nKey );
// Testen, ob sich der Key in der Tabelle befindet
if ( nIndex == TABLE_ENTRY_NOTFOUND )
@@ -232,16 +232,16 @@ void* Table::GetCurObject() const
// -----------------------------------------------------------------------
-ULONG Table::GetKey( const void* p ) const
+sal_uIntPtr Table::GetKey( const void* p ) const
{
- ULONG nIndex = 0;
+ sal_uIntPtr nIndex = 0;
// Solange noch Eintraege Vorhanden sind
while ( nIndex < nCount )
{
// Stimmt der Pointer ueberein, wird der Key zurueckgegeben
if ( p == Container::ImpGetObject( (nIndex*2)+1 ) )
- return (ULONG)Container::ImpGetObject( nIndex*2 );
+ return (sal_uIntPtr)Container::ImpGetObject( nIndex*2 );
nIndex++;
}
@@ -251,14 +251,14 @@ ULONG Table::GetKey( const void* p ) const
// -----------------------------------------------------------------------
-BOOL Table::IsKeyValid( ULONG nKey ) const
+sal_Bool Table::IsKeyValid( sal_uIntPtr nKey ) const
{
- return (ImplGetIndex( nKey ) != TABLE_ENTRY_NOTFOUND) ? TRUE : FALSE;
+ return (ImplGetIndex( nKey ) != TABLE_ENTRY_NOTFOUND) ? sal_True : sal_False;
}
// -----------------------------------------------------------------------
-ULONG Table::GetUniqueKey( ULONG nStartKey ) const
+sal_uIntPtr Table::GetUniqueKey( sal_uIntPtr nStartKey ) const
{
DBG_ASSERT( (nStartKey > 1) && (nStartKey < 0xFFFFFFFF),
"Table::GetUniqueKey() - nStartKey == 0 or nStartKey >= 0xFFFFFFFF" );
@@ -266,7 +266,7 @@ ULONG Table::GetUniqueKey( ULONG nStartKey ) const
if ( !nCount )
return nStartKey;
- ULONG nLastKey = (ULONG)Container::GetObject( (nCount*2)-2 );
+ sal_uIntPtr nLastKey = (sal_uIntPtr)Container::GetObject( (nCount*2)-2 );
if ( nLastKey < nStartKey )
return nStartKey;
else
@@ -275,18 +275,18 @@ ULONG Table::GetUniqueKey( ULONG nStartKey ) const
return nLastKey+1;
else
{
- ULONG nPos;
- ULONG nTempPos = ImplGetIndex( nStartKey, &nPos );
+ sal_uIntPtr nPos;
+ sal_uIntPtr nTempPos = ImplGetIndex( nStartKey, &nPos );
if ( nTempPos != TABLE_ENTRY_NOTFOUND )
nPos = nTempPos;
- nLastKey = (ULONG)Container::GetObject( nPos );
+ nLastKey = (sal_uIntPtr)Container::GetObject( nPos );
if ( nStartKey < nLastKey )
return nStartKey;
while ( nLastKey < 0xFFFFFFFE )
{
nPos += 2;
nLastKey++;
- if ( nLastKey != (ULONG)Container::GetObject( nPos ) )
+ if ( nLastKey != (sal_uIntPtr)Container::GetObject( nPos ) )
return nLastKey;
}
}
@@ -297,10 +297,10 @@ ULONG Table::GetUniqueKey( ULONG nStartKey ) const
// -----------------------------------------------------------------------
-ULONG Table::SearchKey( ULONG nKey, ULONG* pPos ) const
+sal_uIntPtr Table::SearchKey( sal_uIntPtr nKey, sal_uIntPtr* pPos ) const
{
*pPos = 0;
- ULONG nPos = ImplGetIndex( nKey, pPos );
+ sal_uIntPtr nPos = ImplGetIndex( nKey, pPos );
if ( nPos != TABLE_ENTRY_NOTFOUND )
{
nPos /= 2;
@@ -313,12 +313,12 @@ ULONG Table::SearchKey( ULONG nKey, ULONG* pPos ) const
// -----------------------------------------------------------------------
-void* Table::Seek( ULONG nKey )
+void* Table::Seek( sal_uIntPtr nKey )
{
// Testen, ob ein Eintrag vorhanden ist
if ( nCount )
{
- ULONG nIndex = ImplGetIndex( nKey );
+ sal_uIntPtr nIndex = ImplGetIndex( nKey );
// Ist Key nicht enthalten
if ( nIndex == TABLE_ENTRY_NOTFOUND )
@@ -340,7 +340,7 @@ void* Table::Seek( ULONG nKey )
void* Table::Seek( void* p )
{
- ULONG nKey = GetKey( p );
+ sal_uIntPtr nKey = GetKey( p );
// Ist Key vorhanden, dann als aktuellen Eintrag setzen
if ( nKey != TABLE_ENTRY_NOTFOUND )
diff --git a/tools/source/memtools/unqidx.cxx b/tools/source/memtools/unqidx.cxx
index 94624c3ac905..020ae64dde95 100644..100755
--- a/tools/source/memtools/unqidx.cxx
+++ b/tools/source/memtools/unqidx.cxx
@@ -41,8 +41,8 @@
|*
*************************************************************************/
-UniqueIndex::UniqueIndex( ULONG _nStartIndex,
- ULONG _nInitSize, ULONG _nReSize ) :
+UniqueIndex::UniqueIndex( sal_uIntPtr _nStartIndex,
+ sal_uIntPtr _nInitSize, sal_uIntPtr _nReSize ) :
Container( _nInitSize )
{
nReSize = _nReSize;
@@ -80,7 +80,7 @@ UniqueIndex::UniqueIndex( const UniqueIndex& rIdx ) :
|*
*************************************************************************/
-ULONG UniqueIndex::Insert( void* p )
+sal_uIntPtr UniqueIndex::Insert( void* p )
{
// NULL-Pointer ist nicht erlaubt
if ( !p )
@@ -116,13 +116,13 @@ ULONG UniqueIndex::Insert( void* p )
|*
*************************************************************************/
-ULONG UniqueIndex::Insert( ULONG nIndex, void* p )
+sal_uIntPtr UniqueIndex::Insert( sal_uIntPtr nIndex, void* p )
{
// NULL-Pointer ist nicht erlaubt
if ( !p )
return UNIQUEINDEX_ENTRY_NOTFOUND;
- ULONG nContIndex = nIndex - nStartIndex;
+ sal_uIntPtr nContIndex = nIndex - nStartIndex;
// Ist Array voll, dann expandieren
if ( nContIndex >= Container::GetSize() )
SetSize( nContIndex + nReSize );
@@ -145,7 +145,7 @@ ULONG UniqueIndex::Insert( ULONG nIndex, void* p )
|*
*************************************************************************/
-void* UniqueIndex::Remove( ULONG nIndex )
+void* UniqueIndex::Remove( sal_uIntPtr nIndex )
{
// Ist Index zulaessig
if ( (nIndex >= nStartIndex) &&
@@ -172,7 +172,7 @@ void* UniqueIndex::Remove( ULONG nIndex )
|*
*************************************************************************/
-void* UniqueIndex::Replace( ULONG nIndex, void* p )
+void* UniqueIndex::Replace( sal_uIntPtr nIndex, void* p )
{
// NULL-Pointer ist nicht erlaubt
if ( !p )
@@ -198,7 +198,7 @@ void* UniqueIndex::Replace( ULONG nIndex, void* p )
|*
*************************************************************************/
-void* UniqueIndex::Get( ULONG nIndex ) const
+void* UniqueIndex::Get( sal_uIntPtr nIndex ) const
{
// Ist Index zulaessig
if ( (nIndex >= nStartIndex) &&
@@ -218,9 +218,9 @@ void* UniqueIndex::Get( ULONG nIndex ) const
|*
*************************************************************************/
-ULONG UniqueIndex::GetCurIndex() const
+sal_uIntPtr UniqueIndex::GetCurIndex() const
{
- ULONG nPos = Container::GetCurPos();
+ sal_uIntPtr nPos = Container::GetCurPos();
// Ist der Current-Index nicht belegt, dann gibt es keinen Current-Index
if ( !Container::ImpGetObject( nPos ) )
@@ -239,13 +239,13 @@ ULONG UniqueIndex::GetCurIndex() const
|*
*************************************************************************/
-ULONG UniqueIndex::GetIndex( const void* p ) const
+sal_uIntPtr UniqueIndex::GetIndex( const void* p ) const
{
// Wird ein NULL-Pointer uebergeben, dann wurde Pointer nicht gefunden
if ( !p )
return UNIQUEINDEX_ENTRY_NOTFOUND;
- ULONG nIndex = Container::GetPos( p );
+ sal_uIntPtr nIndex = Container::GetPos( p );
if ( nIndex != CONTAINER_ENTRY_NOTFOUND )
return nIndex+nStartIndex;
@@ -263,7 +263,7 @@ ULONG UniqueIndex::GetIndex( const void* p ) const
|*
*************************************************************************/
-BOOL UniqueIndex::IsIndexValid( ULONG nIndex ) const
+sal_Bool UniqueIndex::IsIndexValid( sal_uIntPtr nIndex ) const
{
// Ist Index zulaessig
if ( (nIndex >= nStartIndex) &&
@@ -271,12 +271,12 @@ BOOL UniqueIndex::IsIndexValid( ULONG nIndex ) const
{
// Index ist nur zulaessig, wenn Eintrag auch belegt ist
if ( Container::ImpGetObject( nIndex-nStartIndex ) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
else
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -289,7 +289,7 @@ BOOL UniqueIndex::IsIndexValid( ULONG nIndex ) const
|*
*************************************************************************/
-void* UniqueIndex::Seek( ULONG nIndex )
+void* UniqueIndex::Seek( sal_uIntPtr nIndex )
{
// Index-Eintrag als aktuellen setzten, wenn er gueltig ist
if ( IsIndexValid( nIndex ) )
@@ -314,7 +314,7 @@ void* UniqueIndex::Seek( void* p )
if ( !p )
return NULL;
- ULONG nIndex = GetIndex( p );
+ sal_uIntPtr nIndex = GetIndex( p );
// Ist Index vorhanden, dann als aktuellen Eintrag setzen
if ( nIndex != UNIQUEINDEX_ENTRY_NOTFOUND )
@@ -434,15 +434,15 @@ UniqueIndex& UniqueIndex::operator =( const UniqueIndex& rIdx )
|*
*************************************************************************/
-BOOL UniqueIndex::operator ==( const UniqueIndex& rIdx ) const
+sal_Bool UniqueIndex::operator ==( const UniqueIndex& rIdx ) const
{
// Neue Werte zuweisen
if ( (nStartIndex == rIdx.nStartIndex) &&
(nCount == rIdx.nCount) &&
(Container::operator ==( rIdx )) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
/*************************************************************************
|*
@@ -458,7 +458,7 @@ UniqueIdContainer::UniqueIdContainer( const UniqueIdContainer& rObj )
: UniqueIndex( rObj )
, nCollectCount( rObj.nCollectCount )
{
- ULONG nCur = GetCurIndex();
+ sal_uIntPtr nCur = GetCurIndex();
ImpUniqueId * pEle = (ImpUniqueId *)First();
while( pEle )
@@ -484,7 +484,7 @@ UniqueIdContainer& UniqueIdContainer::operator = ( const UniqueIdContainer & rOb
UniqueIndex::operator = ( rObj );
nCollectCount = rObj.nCollectCount;
- ULONG nCur = GetCurIndex();
+ sal_uIntPtr nCur = GetCurIndex();
ImpUniqueId * pEle = (ImpUniqueId *)First();
while( pEle )
@@ -506,12 +506,12 @@ UniqueIdContainer& UniqueIdContainer::operator = ( const UniqueIdContainer & rOb
|*
*************************************************************************/
-void UniqueIdContainer::Clear( BOOL bAll )
+void UniqueIdContainer::Clear( sal_Bool bAll )
{
- USHORT nFree = bAll ? 0xFFFF : 1;
+ sal_uInt16 nFree = bAll ? 0xFFFF : 1;
ImpUniqueId* pId = (ImpUniqueId*)Last();
- BOOL bLast = TRUE;
+ sal_Bool bLast = sal_True;
while ( pId )
{
if ( pId->nRefCount <= nFree )
@@ -525,7 +525,7 @@ void UniqueIdContainer::Clear( BOOL bAll )
else
{
pId = (ImpUniqueId *)Prev();
- bLast = FALSE;
+ bLast = sal_False;
}
}
}
@@ -544,7 +544,7 @@ UniqueItemId UniqueIdContainer::CreateId()
{
if( nCollectCount > 50 )
{ // aufraeumen
- Clear( FALSE );
+ Clear( sal_False );
nCollectCount = 0;
}
nCollectCount++;
@@ -565,7 +565,7 @@ UniqueItemId UniqueIdContainer::CreateId()
|*
*************************************************************************/
-UniqueItemId UniqueIdContainer::CreateFreeId( ULONG nId )
+UniqueItemId UniqueIdContainer::CreateFreeId( sal_uIntPtr nId )
{
// Einfach erzeugen, fuer abgeleitete Klasse
ImpUniqueId * pId = new ImpUniqueId;
@@ -584,7 +584,7 @@ UniqueItemId UniqueIdContainer::CreateFreeId( ULONG nId )
|*
*************************************************************************/
-UniqueItemId UniqueIdContainer::CreateIdProt( ULONG nId )
+UniqueItemId UniqueIdContainer::CreateIdProt( sal_uIntPtr nId )
{
if ( IsIndexValid( nId ) )
return UniqueItemId( (ImpUniqueId *)Get( nId ) );
diff --git a/tools/source/rc/rc.cxx b/tools/source/rc/rc.cxx
index e24b8f8824d4..f9a08a5525e6 100644
--- a/tools/source/rc/rc.cxx
+++ b/tools/source/rc/rc.cxx
@@ -65,16 +65,16 @@ Time::Time( const ResId& rResId )
ResMgr::GetResourceSkipHeader( rResId, &pResMgr );
- ULONG nObjMask = (USHORT)pResMgr->ReadLong();
+ sal_uIntPtr nObjMask = (sal_uInt16)pResMgr->ReadLong();
if ( 0x01 & nObjMask )
- SetHour( (USHORT)pResMgr->ReadShort() );
+ SetHour( (sal_uInt16)pResMgr->ReadShort() );
if ( 0x02 & nObjMask )
- SetMin( (USHORT)pResMgr->ReadShort() );
+ SetMin( (sal_uInt16)pResMgr->ReadShort() );
if ( 0x04 & nObjMask )
- SetSec( (USHORT)pResMgr->ReadShort() );
+ SetSec( (sal_uInt16)pResMgr->ReadShort() );
if ( 0x08 & nObjMask )
- Set100Sec( (USHORT)pResMgr->ReadShort() );
+ Set100Sec( (sal_uInt16)pResMgr->ReadShort() );
}
// =======================================================================
@@ -86,12 +86,12 @@ Date::Date( const ResId& rResId ) : nDate(0)
ResMgr::GetResourceSkipHeader( rResId, &pResMgr );
- ULONG nObjMask = (USHORT)pResMgr->ReadLong();
+ sal_uIntPtr nObjMask = (sal_uInt16)pResMgr->ReadLong();
if ( 0x01 & nObjMask )
- SetYear( (USHORT)pResMgr->ReadShort() );
+ SetYear( (sal_uInt16)pResMgr->ReadShort() );
if ( 0x02 & nObjMask )
- SetMonth( (USHORT)pResMgr->ReadShort() );
+ SetMonth( (sal_uInt16)pResMgr->ReadShort() );
if ( 0x04 & nObjMask )
- SetDay( (USHORT)pResMgr->ReadShort() );
+ SetDay( (sal_uInt16)pResMgr->ReadShort() );
}
diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx
index 2e6401f5a19f..4ddb753a0df3 100644
--- a/tools/source/rc/resmgr.cxx
+++ b/tools/source/rc/resmgr.cxx
@@ -95,11 +95,11 @@ class InternalResMgr
friend class ResMgrContainer;
ImpContent * pContent;
- UINT32 nOffCorrection;
- BYTE * pStringBlock;
+ sal_uInt32 nOffCorrection;
+ sal_uInt8 * pStringBlock;
SvStream * pStm;
- BOOL bEqual2Content;
- UINT32 nEntries;
+ sal_Bool bEqual2Content;
+ sal_uInt32 nEntries;
OUString aFileName;
OUString aPrefix;
OUString aResName;
@@ -112,9 +112,9 @@ class InternalResMgr
const OUString& aResName,
const com::sun::star::lang::Locale& rLocale );
~InternalResMgr();
- BOOL Create();
+ sal_Bool Create();
- BOOL IsGlobalAvailable( RESOURCE_TYPE nRT, sal_uInt32 nId ) const;
+ sal_Bool IsGlobalAvailable( RESOURCE_TYPE nRT, sal_uInt32 nId ) const;
void * LoadGlobalRes( RESOURCE_TYPE nRT, sal_uInt32 nId,
void **pResHandle );
public:
@@ -549,7 +549,7 @@ InternalResMgr::InternalResMgr( const OUString& rFileURL,
: pContent( NULL )
, pStringBlock( NULL )
, pStm( NULL )
- , bEqual2Content( TRUE )
+ , bEqual2Content( sal_True )
, nEntries( 0 )
, aFileName( rFileURL )
, aPrefix( rPrefix )
@@ -600,15 +600,15 @@ InternalResMgr::~InternalResMgr()
// -----------------------------------------------------------------------
-BOOL InternalResMgr::Create()
+sal_Bool InternalResMgr::Create()
{
ResMgrContainer::get();
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
pStm = new SvFileStream( aFileName, (STREAM_READ | STREAM_SHARE_DENYWRITE | STREAM_NOCREATE) );
if( pStm->GetError() == 0 )
{
- INT32 lContLen = 0;
+ sal_Int32 lContLen = 0;
pStm->Seek( STREAM_SEEK_TO_END );
/*
@@ -622,15 +622,15 @@ BOOL InternalResMgr::Create()
lContLen = ResMgr::GetLong( &lContLen );
pStm->SeekRel( -lContLen );
// allocate stored ImpContent data (12 bytes per unit)
- BYTE* pContentBuf = (BYTE*)rtl_allocateMemory( lContLen );
+ sal_uInt8* pContentBuf = (sal_uInt8*)rtl_allocateMemory( lContLen );
pStm->Read( pContentBuf, lContLen );
// allocate ImpContent space (sizeof(ImpContent) per unit, not necessarily 12)
pContent = (ImpContent *)rtl_allocateMemory( sizeof(ImpContent)*lContLen/12 );
// Auf die Anzahl der ImpContent k�rzen
- nEntries = (UINT32)lContLen / 12;
- bEqual2Content = TRUE; // Die Daten der Resourcen liegen
+ nEntries = (sal_uInt32)lContLen / 12;
+ bEqual2Content = sal_True; // Die Daten der Resourcen liegen
// genauso wie das Inhaltsverzeichnis
- BOOL bSorted = TRUE;
+ sal_Bool bSorted = sal_True;
if( nEntries )
{
#ifdef DBG_UTIL
@@ -652,10 +652,10 @@ BOOL InternalResMgr::Create()
pContent[j].nTypeAndId = ResMgr::GetUInt64( pContentBuf + (12*j) );
pContent[j].nOffset = ResMgr::GetLong( pContentBuf + (12*j+8) );
if( pContent[i].nTypeAndId >= pContent[j].nTypeAndId )
- bSorted = FALSE;
+ bSorted = sal_False;
if( (pContent[i].nTypeAndId & 0xFFFFFFFF00000000LL) == (pContent[j].nTypeAndId & 0xFFFFFFFF00000000LL)
&& pContent[i].nOffset >= pContent[j].nOffset )
- bEqual2Content = FALSE;
+ bEqual2Content = sal_False;
}
}
rtl_freeMemory( pContentBuf );
@@ -667,7 +667,7 @@ BOOL InternalResMgr::Create()
::std::sort(pContent,pContent+nEntries,ImpContentLessCompare());
// qsort( pContent, nEntries, sizeof( ImpContent ), Compare );
- bDone = TRUE;
+ bDone = sal_True;
}
return bDone;
@@ -675,7 +675,7 @@ BOOL InternalResMgr::Create()
// -----------------------------------------------------------------------
-BOOL InternalResMgr::IsGlobalAvailable( RESOURCE_TYPE nRT, sal_uInt32 nId ) const
+sal_Bool InternalResMgr::IsGlobalAvailable( RESOURCE_TYPE nRT, sal_uInt32 nId ) const
{
// Anfang der Strings suchen
sal_uInt64 nValue = ((sal_uInt64(nRT) << 32) | nId);
@@ -717,18 +717,18 @@ void* InternalResMgr::LoadGlobalRes( RESOURCE_TYPE nRT, sal_uInt32 nId,
while( pLast < pEnd && (pLast->nTypeAndId >> 32) == RSC_STRING )
++pLast;
nOffCorrection = pFirst->nOffset;
- UINT32 nSize;
+ sal_uInt32 nSize;
--pLast;
pStm->Seek( pLast->nOffset );
RSHEADER_TYPE aHdr;
pStm->Read( &aHdr, sizeof( aHdr ) );
nSize = pLast->nOffset + aHdr.GetGlobOff() - nOffCorrection;
- pStringBlock = (BYTE*)rtl_allocateMemory( nSize );
+ pStringBlock = (sal_uInt8*)rtl_allocateMemory( nSize );
pStm->Seek( pFirst->nOffset );
pStm->Read( pStringBlock, nSize );
}
*pResHandle = pStringBlock;
- return (BYTE*)pStringBlock + pFind->nOffset - nOffCorrection;
+ return (sal_uInt8*)pStringBlock + pFind->nOffset - nOffCorrection;
} // if( nRT == RSC_STRING && bEqual2Content )
else
{
@@ -738,7 +738,7 @@ void* InternalResMgr::LoadGlobalRes( RESOURCE_TYPE nRT, sal_uInt32 nId,
pStm->Read( &aHeader, sizeof( RSHEADER_TYPE ) );
void * pRes = rtl_allocateMemory( aHeader.GetGlobOff() );
memcpy( pRes, &aHeader, sizeof( RSHEADER_TYPE ) );
- pStm->Read( (BYTE*)pRes + sizeof( RSHEADER_TYPE ),
+ pStm->Read( (sal_uInt8*)pRes + sizeof( RSHEADER_TYPE ),
aHeader.GetGlobOff() - sizeof( RSHEADER_TYPE ) );
return pRes;
}
@@ -764,12 +764,12 @@ void InternalResMgr::FreeGlobalRes( void * pResHandle, void * pResource )
UniString GetTypeRes_Impl( const ResId& rTypeId )
{
// Funktion verlassen, falls Resourcefehler in dieser Funktion
- static int bInUse = FALSE;
+ static int bInUse = sal_False;
UniString aTypStr( UniString::CreateFromInt32( rTypeId.GetId() ) );
if ( !bInUse )
{
- bInUse = TRUE;
+ bInUse = sal_True;
ResId aResId( sal_uInt32(RSCVERSION_ID), *rTypeId.GetResMgr() );
aResId.SetRT( RSC_VERSIONCONTROL );
@@ -784,7 +784,7 @@ UniString GetTypeRes_Impl( const ResId& rTypeId )
rTypeId.GetResMgr()->Increment( sizeof( RSHEADER_TYPE ) );
}
}
- bInUse = FALSE;
+ bInUse = sal_False;
}
return aTypStr;
@@ -896,14 +896,14 @@ static RSHEADER_TYPE* LocalResource( const ImpRCStack* pStack,
if ( pStack->pResource && pStack->pClassRes )
{
pTmp = (RSHEADER_TYPE*)
- ((BYTE*)pStack->pResource + pStack->pResource->GetLocalOff());
+ ((sal_uInt8*)pStack->pResource + pStack->pResource->GetLocalOff());
pEnd = (RSHEADER_TYPE*)
- ((BYTE*)pStack->pResource + pStack->pResource->GetGlobOff());
+ ((sal_uInt8*)pStack->pResource + pStack->pResource->GetGlobOff());
while ( pTmp != pEnd )
{
if ( pTmp->GetRT() == nRTType && pTmp->GetId() == nId )
return pTmp;
- pTmp = (RSHEADER_TYPE*)((BYTE*)pTmp + pTmp->GetGlobOff());
+ pTmp = (RSHEADER_TYPE*)((sal_uInt8*)pTmp + pTmp->GetGlobOff());
}
}
@@ -1070,11 +1070,11 @@ void ResMgr::TestStack( const Resource* )
#endif
// -----------------------------------------------------------------------
-BOOL ResMgr::IsAvailable( const ResId& rId, const Resource* pResObj ) const
+sal_Bool ResMgr::IsAvailable( const ResId& rId, const Resource* pResObj ) const
{
osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
- BOOL bAvailable = FALSE;
+ sal_Bool bAvailable = sal_False;
RSHEADER_TYPE* pClassRes = rId.GetpResource();
RESOURCE_TYPE nRT = rId.GetRT2();
sal_uInt32 nId = rId.GetId();
@@ -1097,7 +1097,7 @@ BOOL ResMgr::IsAvailable( const ResId& rId, const Resource* pResObj ) const
if ( pClassRes )
{
if ( pClassRes->GetRT() == nRT )
- bAvailable = TRUE;
+ bAvailable = sal_True;
}
}
@@ -1122,7 +1122,7 @@ void* ResMgr::GetClass()
// -----------------------------------------------------------------------
-BOOL ResMgr::GetResource( const ResId& rId, const Resource* pResObj )
+sal_Bool ResMgr::GetResource( const ResId& rId, const Resource* pResObj )
{
osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
@@ -1167,7 +1167,7 @@ BOOL ResMgr::GetResource( const ResId& rId, const Resource* pResObj )
pTop->Flags |= RC_NOTFOUND;
pTop->pClassRes = getEmptyBuffer();
pTop->pResource = (RSHEADER_TYPE*)pTop->pClassRes;
- return FALSE;
+ return sal_False;
}
}
else
@@ -1213,12 +1213,12 @@ BOOL ResMgr::GetResource( const ResId& rId, const Resource* pResObj )
pTop->Flags |= RC_NOTFOUND;
pTop->pClassRes = getEmptyBuffer();
pTop->pResource = (RSHEADER_TYPE*)pTop->pClassRes;
- return FALSE;
+ return sal_False;
}
}
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -1267,7 +1267,7 @@ void ResMgr::PopContext( const Resource* pResObj )
#ifdef DBG_UTIL
if ( DbgIsResource() && !(pTop->Flags & RC_NOTFOUND) )
{
- void* pRes = (BYTE*)pTop->pResource +
+ void* pRes = (sal_uInt8*)pTop->pResource +
pTop->pResource->GetLocalOff();
if ( pTop->pClassRes != pRes )
@@ -1319,7 +1319,7 @@ RSHEADER_TYPE* ResMgr::CreateBlock( const ResId& rId )
// ------------------------------------------------------------------
-INT16 ResMgr::GetShort( void * pShort )
+sal_Int16 ResMgr::GetShort( void * pShort )
{
return ((*((sal_uInt8*)pShort + 0) << 8) |
(*((sal_uInt8*)pShort + 1) << 0) );
@@ -1327,7 +1327,7 @@ INT16 ResMgr::GetShort( void * pShort )
// ------------------------------------------------------------------
-INT32 ResMgr::GetLong( void * pLong )
+sal_Int32 ResMgr::GetLong( void * pLong )
{
return ((*((sal_uInt8*)pLong + 0) << 24) |
(*((sal_uInt8*)pLong + 1) << 16) |
@@ -1350,7 +1350,7 @@ sal_uInt64 ResMgr::GetUInt64( void* pDatum )
}
// -----------------------------------------------------------------------
-sal_uInt32 ResMgr::GetStringWithoutHook( UniString& rStr, const BYTE* pStr )
+sal_uInt32 ResMgr::GetStringWithoutHook( UniString& rStr, const sal_uInt8* pStr )
{
sal_uInt32 nLen=0;
sal_uInt32 nRet = GetStringSize( pStr, nLen );
@@ -1362,7 +1362,7 @@ sal_uInt32 ResMgr::GetStringWithoutHook( UniString& rStr, const BYTE* pStr )
return nRet;
}
-sal_uInt32 ResMgr::GetString( UniString& rStr, const BYTE* pStr )
+sal_uInt32 ResMgr::GetString( UniString& rStr, const sal_uInt8* pStr )
{
UniString aString;
sal_uInt32 nRet = GetStringWithoutHook( aString, pStr );
@@ -1372,7 +1372,7 @@ sal_uInt32 ResMgr::GetString( UniString& rStr, const BYTE* pStr )
return nRet;
}
-sal_uInt32 ResMgr::GetByteString( rtl::OString& rStr, const BYTE* pStr )
+sal_uInt32 ResMgr::GetByteString( rtl::OString& rStr, const sal_uInt8* pStr )
{
sal_uInt32 nLen=0;
sal_uInt32 nRet = GetStringSize( pStr, nLen );
@@ -1382,7 +1382,7 @@ sal_uInt32 ResMgr::GetByteString( rtl::OString& rStr, const BYTE* pStr )
// ------------------------------------------------------------------
-sal_uInt32 ResMgr::GetStringSize( const BYTE* pStr, sal_uInt32& nLen )
+sal_uInt32 ResMgr::GetStringSize( const sal_uInt8* pStr, sal_uInt32& nLen )
{
nLen = static_cast< sal_uInt32 >( strlen( (const char*)pStr ) );
return GetStringSize( nLen );
@@ -1398,9 +1398,9 @@ sal_uInt32 ResMgr::GetRemainSize()
return pFallbackResMgr->GetRemainSize();
const ImpRCStack& rTop = aStack[nCurStack];
- return (sal_uInt32)((long)(BYTE *)rTop.pResource +
+ return (sal_uInt32)((long)(sal_uInt8 *)rTop.pResource +
rTop.pResource->GetLocalOff() -
- (long)(BYTE *)rTop.pClassRes);
+ (long)(sal_uInt8 *)rTop.pClassRes);
}
// -----------------------------------------------------------------------
@@ -1416,7 +1416,7 @@ void* ResMgr::Increment( sal_uInt32 nSize )
if( (rStack.Flags & RC_NOTFOUND) )
return rStack.pClassRes;
- BYTE* pClassRes = (BYTE*)rStack.pClassRes + nSize;
+ sal_uInt8* pClassRes = (sal_uInt8*)rStack.pClassRes + nSize;
rStack.pClassRes = pClassRes;
@@ -1507,7 +1507,7 @@ ResMgr* ResMgr::CreateFallbackResMgr( const ResId& rId, const Resource* pResourc
//
//---------------------------------------------------------------------------
-const char* ResMgr::GetLang( LanguageType& nType, USHORT nPrio )
+const char* ResMgr::GetLang( LanguageType& nType, sal_uInt16 nPrio )
{
if ( nType == LANGUAGE_SYSTEM || nType == LANGUAGE_DONTKNOW )
nType = MsLangId::getSystemUILanguage();
@@ -1718,29 +1718,29 @@ ResMgr* ResMgr::SearchCreateResMgr(
// -----------------------------------------------------------------------
-INT16 ResMgr::ReadShort()
+sal_Int16 ResMgr::ReadShort()
{
osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
if( pFallbackResMgr )
return pFallbackResMgr->ReadShort();
- INT16 n = GetShort( GetClass() );
- Increment( sizeof( INT16 ) );
+ sal_Int16 n = GetShort( GetClass() );
+ Increment( sizeof( sal_Int16 ) );
return n;
}
// -----------------------------------------------------------------------
-INT32 ResMgr::ReadLong()
+sal_Int32 ResMgr::ReadLong()
{
osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
if( pFallbackResMgr )
return pFallbackResMgr->ReadLong();
- INT32 n = GetLong( GetClass() );
- Increment( sizeof( INT32 ) );
+ sal_Int32 n = GetLong( GetClass() );
+ Increment( sizeof( sal_Int32 ) );
return n;
}
@@ -1763,7 +1763,7 @@ UniString ResMgr::ReadStringWithoutHook()
#endif
}
else
- Increment( GetStringWithoutHook( aRet, (const BYTE*)GetClass() ) );
+ Increment( GetStringWithoutHook( aRet, (const sal_uInt8*)GetClass() ) );
return aRet;
}
@@ -1793,7 +1793,7 @@ rtl::OString ResMgr::ReadByteString()
#endif
}
else
- Increment( GetByteString( aRet, (const BYTE*)GetClass() ) );
+ Increment( GetByteString( aRet, (const sal_uInt8*)GetClass() ) );
return aRet;
}
@@ -2021,8 +2021,8 @@ UniString SimpleResMgr::ReadString( sal_uInt32 nId )
return sReturn;
}
- // ULONG nLen = pResHeader->GetLocalOff() - sizeof(RSHEADER_TYPE);
- ResMgr::GetString( sReturn, (const BYTE*)(pResHeader+1) );
+ // sal_uIntPtr nLen = pResHeader->GetLocalOff() - sizeof(RSHEADER_TYPE);
+ ResMgr::GetString( sReturn, (const sal_uInt8*)(pResHeader+1) );
// not neccessary with te current implementation which holds the string table permanently, but to be sure ....
// note: pFallback cannot be NULL here and is either the fallback or m_pResImpl
@@ -2098,7 +2098,7 @@ sal_uInt32 SimpleResMgr::ReadBlob( sal_uInt32 nId, void** pBuffer )
// FreeBlob doesn't know that so it would probably crash ....
sal_uInt32 nRemaining = pResHeader->GetLocalOff() - sizeof(RSHEADER_TYPE);
- *pBuffer = (void*)(((BYTE*)pResHeader) + sizeof(RSHEADER_TYPE));
+ *pBuffer = (void*)(((sal_uInt8*)pResHeader) + sizeof(RSHEADER_TYPE));
// free an eventual fallback InternalResMgr
if( m_pResImpl != pFallback )
@@ -2115,6 +2115,6 @@ sal_uInt32 SimpleResMgr::ReadBlob( sal_uInt32 nId, void** pBuffer )
void SimpleResMgr::FreeBlob( void* pBuffer )
{
- void* pCompleteBuffer = (void*)(((BYTE*)pBuffer) - sizeof(RSHEADER_TYPE));
+ void* pCompleteBuffer = (void*)(((sal_uInt8*)pBuffer) - sizeof(RSHEADER_TYPE));
rtl_freeMemory(pCompleteBuffer);
}
diff --git a/tools/source/ref/errinf.cxx b/tools/source/ref/errinf.cxx
index 2f9c75a4b71c..1587f7324556 100644
--- a/tools/source/ref/errinf.cxx
+++ b/tools/source/ref/errinf.cxx
@@ -49,11 +49,11 @@ struct EDcrData
ErrorHandler *pFirstHdl;
ErrorContext *pFirstCtx;
DisplayFnPtr pDsp;
- BOOL bIsWindowDsp;
+ sal_Bool bIsWindowDsp;
DynamicErrorInfo *ppDcr[ERRCODE_DYNAMIC_COUNT];
- USHORT nNextDcr;
+ sal_uInt16 nNextDcr;
EDcrData();
static EDcrData *GetData();
@@ -62,12 +62,12 @@ static EDcrData *GetData();
class EDcr_Impl
{
- ULONG lErrId;
- USHORT nMask;
+ sal_uIntPtr lErrId;
+ sal_uInt16 nMask;
void RegisterEDcr(DynamicErrorInfo *);
void UnRegisterEDcr(DynamicErrorInfo *);
- static ErrorInfo *GetDynamicErrorInfo(ULONG lId);
+ static ErrorInfo *GetDynamicErrorInfo(sal_uIntPtr lId);
friend class DynamicErrorInfo;
friend class ErrorInfo;
@@ -76,7 +76,7 @@ friend class ErrorInfo;
EDcrData::EDcrData()
{
- for(USHORT n=0;n<ERRCODE_DYNAMIC_COUNT;n++)
+ for(sal_uInt16 n=0;n<ERRCODE_DYNAMIC_COUNT;n++)
ppDcr[n]=0;
nNextDcr=0;
pFirstHdl=0;
@@ -105,10 +105,10 @@ void EDcr_Impl::RegisterEDcr(DynamicErrorInfo *pDcr)
//Vergibt eine dynamische Id
EDcrData* pData=EDcrData::GetData();
- lErrId= (((ULONG)pData->nNextDcr + 1) << ERRCODE_DYNAMIC_SHIFT) +
+ lErrId= (((sal_uIntPtr)pData->nNextDcr + 1) << ERRCODE_DYNAMIC_SHIFT) +
pDcr->GetErrorCode();
DynamicErrorInfo **ppDcr=pData->ppDcr;
- USHORT nNext=pData->nNextDcr;
+ sal_uInt16 nNext=pData->nNextDcr;
// bei einem Ringbuffer koennen wir uns das ASSERT wohl sparen!
// DBG_ASSERT(ppDcr[nNext]==0,"ErrHdl: Alle Errors belegt");
@@ -127,8 +127,8 @@ void EDcr_Impl::UnRegisterEDcr(DynamicErrorInfo *pDcr)
EDcrData* pData=EDcrData::GetData();
DynamicErrorInfo **ppDcr=pData->ppDcr;
- ULONG lIdx=(
- ((ULONG)(*pDcr) & ERRCODE_DYNAMIC_MASK)>>ERRCODE_DYNAMIC_SHIFT)-1;
+ sal_uIntPtr lIdx=(
+ ((sal_uIntPtr)(*pDcr) & ERRCODE_DYNAMIC_MASK)>>ERRCODE_DYNAMIC_SHIFT)-1;
DBG_ASSERT(ppDcr[lIdx]==pDcr,"ErrHdl: Error nicht gefunden");
if(ppDcr[lIdx]==pDcr)
ppDcr[lIdx]=0;
@@ -142,7 +142,7 @@ TYPEINIT1(TwoStringErrorInfo, DynamicErrorInfo);
TYPEINIT1(MessageInfo, DynamicErrorInfo);
-ErrorInfo *ErrorInfo::GetErrorInfo(ULONG lId)
+ErrorInfo *ErrorInfo::GetErrorInfo(sal_uIntPtr lId)
{
if(lId & ERRCODE_DYNAMIC_MASK)
return EDcr_Impl::GetDynamicErrorInfo(lId);
@@ -150,12 +150,12 @@ ErrorInfo *ErrorInfo::GetErrorInfo(ULONG lId)
return new ErrorInfo(lId);
}
-DynamicErrorInfo::operator ULONG() const
+DynamicErrorInfo::operator sal_uIntPtr() const
{
return pImpl->lErrId;
}
-DynamicErrorInfo::DynamicErrorInfo(ULONG lArgUserId, USHORT nMask)
+DynamicErrorInfo::DynamicErrorInfo(sal_uIntPtr lArgUserId, sal_uInt16 nMask)
: ErrorInfo(lArgUserId)
{
pImpl=new EDcr_Impl;
@@ -169,32 +169,32 @@ DynamicErrorInfo::~DynamicErrorInfo()
delete pImpl;
}
-ErrorInfo* EDcr_Impl::GetDynamicErrorInfo(ULONG lId)
+ErrorInfo* EDcr_Impl::GetDynamicErrorInfo(sal_uIntPtr lId)
{
- ULONG lIdx=((lId & ERRCODE_DYNAMIC_MASK)>>ERRCODE_DYNAMIC_SHIFT)-1;
+ sal_uIntPtr lIdx=((lId & ERRCODE_DYNAMIC_MASK)>>ERRCODE_DYNAMIC_SHIFT)-1;
DynamicErrorInfo* pDcr=EDcrData::GetData()->ppDcr[lIdx];
- if(pDcr && (ULONG)(*pDcr)==lId)
+ if(pDcr && (sal_uIntPtr)(*pDcr)==lId)
return pDcr;
else
return new ErrorInfo(lId & ~ERRCODE_DYNAMIC_MASK);
}
-USHORT DynamicErrorInfo::GetDialogMask() const
+sal_uInt16 DynamicErrorInfo::GetDialogMask() const
{
return pImpl->nMask;
}
StandardErrorInfo::StandardErrorInfo(
- ULONG UserId, ULONG lArgExtId, USHORT nFlags)
+ sal_uIntPtr UserId, sal_uIntPtr lArgExtId, sal_uInt16 nFlags)
: DynamicErrorInfo(UserId, nFlags), lExtId(lArgExtId)
{
}
StringErrorInfo::StringErrorInfo(
- ULONG UserId, const String& aStringP, USHORT nFlags)
+ sal_uIntPtr UserId, const String& aStringP, sal_uInt16 nFlags)
: DynamicErrorInfo(UserId, nFlags), aString(aStringP)
{
}
@@ -205,8 +205,8 @@ class ErrHdl_Impl
public:
ErrorHandler *pNext;
- static BOOL CreateString(const ErrorHandler *pStart,
- const ErrorInfo*, String&, USHORT&);
+ static sal_Bool CreateString(const ErrorHandler *pStart,
+ const ErrorInfo*, String&, sal_uInt16&);
};
@@ -267,19 +267,19 @@ ErrorHandler::~ErrorHandler()
void ErrorHandler::RegisterDisplay(WindowDisplayErrorFunc *aDsp)
{
EDcrData *pData=EDcrData::GetData();
- pData->bIsWindowDsp=TRUE;
+ pData->bIsWindowDsp=sal_True;
pData->pDsp = reinterpret_cast< DisplayFnPtr >(aDsp);
}
void ErrorHandler::RegisterDisplay(BasicDisplayErrorFunc *aDsp)
{
EDcrData *pData=EDcrData::GetData();
- pData->bIsWindowDsp=FALSE;
+ pData->bIsWindowDsp=sal_False;
pData->pDsp = reinterpret_cast< DisplayFnPtr >(aDsp);
}
-USHORT ErrorHandler::HandleError_Impl(
- ULONG lId, USHORT nFlags, BOOL bJustCreateString, String & rError)
+sal_uInt16 ErrorHandler::HandleError_Impl(
+ sal_uIntPtr lId, sal_uInt16 nFlags, sal_Bool bJustCreateString, String & rError)
{
/* [Beschreibung]
@@ -316,8 +316,8 @@ USHORT ErrorHandler::HandleError_Impl(
break;
}
- BOOL bWarning = ((lId & ERRCODE_WARNING_MASK) == ERRCODE_WARNING_MASK);
- USHORT nErrFlags = ERRCODE_BUTTON_DEF_OK | ERRCODE_BUTTON_OK;
+ sal_Bool bWarning = ((lId & ERRCODE_WARNING_MASK) == ERRCODE_WARNING_MASK);
+ sal_uInt16 nErrFlags = ERRCODE_BUTTON_DEF_OK | ERRCODE_BUTTON_OK;
if (bWarning)
nErrFlags |= ERRCODE_MSG_WARNING;
else
@@ -326,7 +326,7 @@ USHORT ErrorHandler::HandleError_Impl(
DynamicErrorInfo* pDynPtr=PTR_CAST(DynamicErrorInfo,pInfo);
if(pDynPtr)
{
- USHORT nDynFlags = pDynPtr->GetDialogMask();
+ sal_uInt16 nDynFlags = pDynPtr->GetDialogMask();
if( nDynFlags )
nErrFlags = nDynFlags;
}
@@ -379,12 +379,12 @@ USHORT ErrorHandler::HandleError_Impl(
}
// static
-BOOL ErrorHandler::GetErrorString(ULONG lId, String& rStr)
+sal_Bool ErrorHandler::GetErrorString(sal_uIntPtr lId, String& rStr)
{
- return (BOOL)HandleError_Impl( lId, USHRT_MAX, TRUE, rStr );
+ return (sal_Bool)HandleError_Impl( lId, USHRT_MAX, sal_True, rStr );
}
-USHORT ErrorHandler::HandleError(ULONG lId, USHORT nFlags)
+sal_uInt16 ErrorHandler::HandleError(sal_uIntPtr lId, sal_uInt16 nFlags)
{
/* [Beschreibung]
@@ -404,30 +404,30 @@ USHORT ErrorHandler::HandleError(ULONG lId, USHORT nFlags)
*/
String aDummy;
- return HandleError_Impl( lId, nFlags, FALSE, aDummy );
+ return HandleError_Impl( lId, nFlags, sal_False, aDummy );
}
-BOOL ErrorHandler::ForwCreateString(const ErrorInfo* pInfo, String& rStr, USHORT &rFlags) const
+sal_Bool ErrorHandler::ForwCreateString(const ErrorInfo* pInfo, String& rStr, sal_uInt16 &rFlags) const
{
return ErrHdl_Impl::CreateString(this->pImpl->pNext, pInfo, rStr, rFlags);
}
-BOOL ErrHdl_Impl::CreateString( const ErrorHandler *pStart,
+sal_Bool ErrHdl_Impl::CreateString( const ErrorHandler *pStart,
const ErrorInfo* pInfo, String& pStr,
- USHORT &rFlags)
+ sal_uInt16 &rFlags)
{
for(const ErrorHandler *pHdl=pStart;pHdl;pHdl=pHdl->pImpl->pNext)
{
if(pHdl->CreateString( pInfo, pStr, rFlags))
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SimpleErrorHandler::CreateString(
- const ErrorInfo *pInfo, String &rStr, USHORT &) const
+sal_Bool SimpleErrorHandler::CreateString(
+ const ErrorInfo *pInfo, String &rStr, sal_uInt16 &) const
{
- ULONG nId = pInfo->GetErrorCode();
+ sal_uIntPtr nId = pInfo->GetErrorCode();
ByteString aStr;
aStr="Id ";
aStr+=ByteString::CreateFromInt32(nId);
@@ -443,7 +443,7 @@ BOOL SimpleErrorHandler::CreateString(
if(pDyn)
{
aStr+="\nDId ";
- aStr+=ByteString::CreateFromInt32((ULONG)*pDyn);
+ aStr+=ByteString::CreateFromInt32((sal_uIntPtr)*pDyn);
}
StandardErrorInfo *pStd=PTR_CAST(StandardErrorInfo,pInfo);
if(pStd)
@@ -452,7 +452,7 @@ BOOL SimpleErrorHandler::CreateString(
aStr+=ByteString::CreateFromInt32(pStd->GetExtendedErrorCode());
}
rStr = String( aStr, RTL_TEXTENCODING_ASCII_US );
- return TRUE;
+ return sal_True;
}
SimpleErrorHandler::SimpleErrorHandler()
diff --git a/tools/source/ref/globname.cxx b/tools/source/ref/globname.cxx
index 2d45e470e688..0228aeef9e81 100644..100755
--- a/tools/source/ref/globname.cxx
+++ b/tools/source/ref/globname.cxx
@@ -52,7 +52,7 @@ ImpSvGlobalName::ImpSvGlobalName( int )
/*************************************************************************
|* ImpSvGlobalName::operator ==()
*************************************************************************/
-BOOL ImpSvGlobalName::operator == ( const ImpSvGlobalName & rObj ) const
+sal_Bool ImpSvGlobalName::operator == ( const ImpSvGlobalName & rObj ) const
{
return !memcmp( szData, rObj.szData, sizeof( szData ) );
}
@@ -75,10 +75,10 @@ struct _GUID
struct GUID
#endif
{
- UINT32 Data1;
- UINT16 Data2;
- UINT16 Data3;
- BYTE Data4[8];
+ sal_uInt32 Data1;
+ sal_uInt16 Data2;
+ sal_uInt16 Data3;
+ sal_uInt8 Data4[8];
};
SvGlobalName::SvGlobalName( const CLSID & rId )
{
@@ -87,16 +87,16 @@ SvGlobalName::SvGlobalName( const CLSID & rId )
memcpy( pImp->szData, &rId, sizeof( pImp->szData ) );
}
-SvGlobalName::SvGlobalName( UINT32 n1, USHORT n2, USHORT n3,
- BYTE b8, BYTE b9, BYTE b10, BYTE b11,
- BYTE b12, BYTE b13, BYTE b14, BYTE b15 )
+SvGlobalName::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 )
{
pImp = new ImpSvGlobalName();
pImp->nRefCount++;
- *(UINT32 *)pImp->szData = n1;
- *(USHORT *)&pImp->szData[ 4 ] = n2;
- *(USHORT *)&pImp->szData[ 6 ] = n3;
+ *(sal_uInt32 *)pImp->szData = n1;
+ *(sal_uInt16 *)&pImp->szData[ 4 ] = n2;
+ *(sal_uInt16 *)&pImp->szData[ 6 ] = n3;
pImp->szData[ 8 ] = b8;
pImp->szData[ 9 ] = b9;
pImp->szData[ 10 ] = b10;
@@ -149,9 +149,9 @@ void SvGlobalName::NewImp()
*************************************************************************/
SvStream& operator << ( SvStream& rOStr, const SvGlobalName & rObj )
{
- rOStr << *(UINT32 *)rObj.pImp->szData;
- rOStr << *(USHORT *)&rObj.pImp->szData[ 4 ];
- rOStr << *(USHORT *)&rObj.pImp->szData[ 6 ];
+ rOStr << *(sal_uInt32 *)rObj.pImp->szData;
+ rOStr << *(sal_uInt16 *)&rObj.pImp->szData[ 4 ];
+ rOStr << *(sal_uInt16 *)&rObj.pImp->szData[ 6 ];
rOStr.Write( (sal_Char *)&rObj.pImp->szData[ 8 ], 8 );
return rOStr;
}
@@ -159,9 +159,9 @@ SvStream& operator << ( SvStream& rOStr, const SvGlobalName & rObj )
SvStream& operator >> ( SvStream& rStr, SvGlobalName & rObj )
{
rObj.NewImp(); // kopieren, falls noetig
- rStr >> *(UINT32 *)rObj.pImp->szData;
- rStr >> *(USHORT *)&rObj.pImp->szData[ 4 ];
- rStr >> *(USHORT *)&rObj.pImp->szData[ 6 ];
+ rStr >> *(sal_uInt32 *)rObj.pImp->szData;
+ rStr >> *(sal_uInt16 *)&rObj.pImp->szData[ 4 ];
+ rStr >> *(sal_uInt16 *)&rObj.pImp->szData[ 6 ];
rStr.Read( (sal_Char *)&rObj.pImp->szData[ 8 ], 8 );
return rStr;
}
@@ -170,41 +170,41 @@ SvStream& operator >> ( SvStream& rStr, SvGlobalName & rObj )
/*************************************************************************
|* SvGlobalName::operator < ()
*************************************************************************/
-BOOL SvGlobalName::operator < ( const SvGlobalName & rObj ) const
+sal_Bool SvGlobalName::operator < ( const SvGlobalName & rObj ) const
{
int n = memcmp( pImp->szData +6, rObj.pImp->szData +6,
sizeof( pImp->szData ) -6);
if( n < 0 )
- return TRUE;
+ return sal_True;
else if( n > 0 )
- return FALSE;
- else if( *(USHORT *)&pImp->szData[ 4 ] < *(USHORT *)&rObj.pImp->szData[ 4 ] )
- return TRUE;
- else if( *(USHORT *)&pImp->szData[ 4 ] == *(USHORT *)&rObj.pImp->szData[ 4 ] )
- return *(UINT32 *)pImp->szData < *(UINT32 *)rObj.pImp->szData;
+ return sal_False;
+ else if( *(sal_uInt16 *)&pImp->szData[ 4 ] < *(sal_uInt16 *)&rObj.pImp->szData[ 4 ] )
+ return sal_True;
+ else if( *(sal_uInt16 *)&pImp->szData[ 4 ] == *(sal_uInt16 *)&rObj.pImp->szData[ 4 ] )
+ return *(sal_uInt32 *)pImp->szData < *(sal_uInt32 *)rObj.pImp->szData;
else
- return FALSE;
+ return sal_False;
}
/*************************************************************************
|* SvGlobalName::operator +=()
*************************************************************************/
-SvGlobalName & SvGlobalName::operator += ( UINT32 n )
+SvGlobalName & SvGlobalName::operator += ( sal_uInt32 n )
{
NewImp();
- UINT32 nOld = (*(UINT32 *)pImp->szData);
- (*(UINT32 *)pImp->szData) += n;
- if( nOld > *(UINT32 *)pImp->szData )
+ sal_uInt32 nOld = (*(sal_uInt32 *)pImp->szData);
+ (*(sal_uInt32 *)pImp->szData) += n;
+ if( nOld > *(sal_uInt32 *)pImp->szData )
// ueberlauf
- (*(USHORT *)&pImp->szData[ 4 ])++;
+ (*(sal_uInt16 *)&pImp->szData[ 4 ])++;
return *this;
}
/*************************************************************************
|* SvGlobalName::operator ==()
*************************************************************************/
-BOOL SvGlobalName::operator == ( const SvGlobalName & rObj ) const
+sal_Bool SvGlobalName::operator == ( const SvGlobalName & rObj ) const
{
return *pImp == *rObj.pImp;
}
@@ -218,7 +218,7 @@ void SvGlobalName::MakeFromMemory( void * pData )
/*************************************************************************
|* SvGlobalName::MakeId()
*************************************************************************/
-BOOL SvGlobalName::MakeId( const String & rIdStr )
+sal_Bool SvGlobalName::MakeId( const String & rIdStr )
{
ByteString aStr( rIdStr, RTL_TEXTENCODING_ASCII_US );
sal_Char * pStr = (sal_Char *)aStr.GetBuffer();
@@ -226,7 +226,7 @@ BOOL SvGlobalName::MakeId( const String & rIdStr )
&& '-' == pStr[ 8 ] && '-' == pStr[ 13 ]
&& '-' == pStr[ 18 ] && '-' == pStr[ 23 ] )
{
- UINT32 nFirst = 0;
+ sal_uInt32 nFirst = 0;
int i = 0;
for( i = 0; i < 8; i++ )
{
@@ -236,11 +236,11 @@ BOOL SvGlobalName::MakeId( const String & rIdStr )
else
nFirst = nFirst * 16 + (toupper( *pStr ) - 'A' + 10 );
else
- return FALSE;
+ return sal_False;
pStr++;
}
- UINT16 nSec = 0;
+ sal_uInt16 nSec = 0;
pStr++;
for( i = 0; i < 4; i++ )
{
@@ -248,13 +248,13 @@ BOOL SvGlobalName::MakeId( const String & rIdStr )
if( isdigit( *pStr ) )
nSec = nSec * 16 + (*pStr - '0');
else
- nSec = nSec * 16 + (UINT16)(toupper( *pStr ) - 'A' + 10 );
+ nSec = nSec * 16 + (sal_uInt16)(toupper( *pStr ) - 'A' + 10 );
else
- return FALSE;
+ return sal_False;
pStr++;
}
- UINT16 nThird = 0;
+ sal_uInt16 nThird = 0;
pStr++;
for( i = 0; i < 4; i++ )
{
@@ -262,13 +262,13 @@ BOOL SvGlobalName::MakeId( const String & rIdStr )
if( isdigit( *pStr ) )
nThird = nThird * 16 + (*pStr - '0');
else
- nThird = nThird * 16 + (UINT16)(toupper( *pStr ) - 'A' + 10 );
+ nThird = nThird * 16 + (sal_uInt16)(toupper( *pStr ) - 'A' + 10 );
else
- return FALSE;
+ return sal_False;
pStr++;
}
- BYTE szRemain[ 8 ];
+ sal_Int8 szRemain[ 8 ];
memset( szRemain, 0, sizeof( szRemain ) );
pStr++;
for( i = 0; i < 16; i++ )
@@ -277,22 +277,22 @@ BOOL SvGlobalName::MakeId( const String & rIdStr )
if( isdigit( *pStr ) )
szRemain[i/2] = szRemain[i/2] * 16 + (*pStr - '0');
else
- szRemain[i/2] = szRemain[i/2] * 16 + (BYTE)(toupper( *pStr ) - 'A' + 10 );
+ szRemain[i/2] = szRemain[i/2] * 16 + (sal_Int8)(toupper( *pStr ) - 'A' + 10 );
else
- return FALSE;
+ return sal_False;
pStr++;
if( i == 3 )
pStr++;
}
NewImp();
- *(UINT32 *)pImp->szData = nFirst;
- *(USHORT *)&pImp->szData[ 4 ] = nSec;
- *(USHORT *)&pImp->szData[ 6 ] = nThird;
+ *(sal_uInt32 *)pImp->szData = nFirst;
+ *(sal_uInt16 *)&pImp->szData[ 4 ] = nSec;
+ *(sal_uInt16 *)&pImp->szData[ 6 ] = nThird;
memcpy( &pImp->szData[ 8 ], szRemain, 8 );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -303,13 +303,13 @@ String SvGlobalName::GetctorName() const
ByteString aRet;
sal_Char buf[ 20 ];
- sprintf( buf, "0x%8.8lX", (ULONG)*(UINT32 *)pImp->szData );
+ sprintf( buf, "0x%8.8lX", (sal_uIntPtr)*(sal_uInt32 *)pImp->szData );
aRet += buf;
- USHORT i;
+ sal_uInt16 i;
for( i = 4; i < 8; i += 2 )
{
aRet += ',';
- sprintf( buf, "0x%4.4X", *(USHORT *)&pImp->szData[ i ] );
+ sprintf( buf, "0x%4.4X", *(sal_uInt16 *)&pImp->szData[ i ] );
aRet += buf;
}
for( i = 8; i < 16; i++ )
@@ -329,13 +329,13 @@ String SvGlobalName::GetHexName() const
ByteString aRet;
sal_Char buf[ 10 ];
- sprintf( buf, "%8.8lX", (ULONG)*(UINT32 *)pImp->szData );
+ sprintf( buf, "%8.8lX", (sal_uIntPtr)*(sal_uInt32 *)pImp->szData );
aRet += buf;
aRet += '-';
- USHORT i ;
+ sal_uInt16 i ;
for( i = 4; i < 8; i += 2 )
{
- sprintf( buf, "%4.4X", *(USHORT *)&pImp->szData[ i ] );
+ sprintf( buf, "%4.4X", *(sal_uInt16 *)&pImp->szData[ i ] );
aRet += buf;
aRet += '-';
}
@@ -368,7 +368,7 @@ SvGlobalNameList::SvGlobalNameList()
*************************************************************************/
SvGlobalNameList::~SvGlobalNameList()
{
- for( ULONG i = Count(); i > 0; i-- )
+ for( sal_uIntPtr i = Count(); i > 0; i-- )
{
ImpSvGlobalName * pImp = (ImpSvGlobalName *)aList.GetObject( i -1 );
pImp->nRefCount--;
@@ -389,7 +389,7 @@ void SvGlobalNameList::Append( const SvGlobalName & rName )
/*************************************************************************
|* SvGlobalNameList::GetObject()
*************************************************************************/
-SvGlobalName SvGlobalNameList::GetObject( ULONG nPos )
+SvGlobalName SvGlobalNameList::GetObject( sal_uLong nPos )
{
return SvGlobalName( (ImpSvGlobalName *)aList.GetObject( nPos ) );
}
@@ -397,14 +397,14 @@ SvGlobalName SvGlobalNameList::GetObject( ULONG nPos )
/*************************************************************************
|* SvGlobalNameList::IsEntry()
*************************************************************************/
-BOOL SvGlobalNameList::IsEntry( const SvGlobalName & rName )
+sal_Bool SvGlobalNameList::IsEntry( const SvGlobalName & rName )
{
- for( ULONG i = Count(); i > 0; i-- )
+ for( sal_uIntPtr i = Count(); i > 0; i-- )
{
if( *rName.pImp == *(ImpSvGlobalName *)aList.GetObject( i -1 ) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
com::sun::star::uno::Sequence < sal_Int8 > SvGlobalName::GetByteSequence() const
@@ -413,14 +413,14 @@ com::sun::star::uno::Sequence < sal_Int8 > SvGlobalName::GetByteSequence() const
// maybe transported remotely
com::sun::star::uno::Sequence< sal_Int8 > aResult( 16 );
- aResult[0] = (sal_Int8) (*(UINT32 *)pImp->szData >> 24);
- aResult[1] = (sal_Int8) ((*(UINT32 *)pImp->szData << 8 ) >> 24);
- aResult[2] = (sal_Int8) ((*(UINT32 *)pImp->szData << 16 ) >> 24);
- aResult[3] = (sal_Int8) ((*(UINT32 *)pImp->szData << 24 ) >> 24);
- aResult[4] = (sal_Int8) (*(USHORT *)&pImp->szData[ 4 ] >> 8);
- aResult[5] = (sal_Int8) ((*(USHORT *)&pImp->szData[ 4 ] << 8 ) >> 8);
- aResult[6] = (sal_Int8) (*(USHORT *)&pImp->szData[ 6 ] >> 8);
- aResult[7] = (sal_Int8) ((*(USHORT *)&pImp->szData[ 6 ] << 8 ) >> 8);
+ aResult[0] = (sal_Int8) (*(sal_uInt32 *)pImp->szData >> 24);
+ aResult[1] = (sal_Int8) ((*(sal_uInt32 *)pImp->szData << 8 ) >> 24);
+ aResult[2] = (sal_Int8) ((*(sal_uInt32 *)pImp->szData << 16 ) >> 24);
+ aResult[3] = (sal_Int8) ((*(sal_uInt32 *)pImp->szData << 24 ) >> 24);
+ aResult[4] = (sal_Int8) (*(sal_uInt16 *)&pImp->szData[ 4 ] >> 8);
+ aResult[5] = (sal_Int8) ((*(sal_uInt16 *)&pImp->szData[ 4 ] << 8 ) >> 8);
+ aResult[6] = (sal_Int8) (*(sal_uInt16 *)&pImp->szData[ 6 ] >> 8);
+ aResult[7] = (sal_Int8) ((*(sal_uInt16 *)&pImp->szData[ 6 ] << 8 ) >> 8);
aResult[8] = pImp->szData[ 8 ];
aResult[9] = pImp->szData[ 9 ];
aResult[10] = pImp->szData[ 10 ];
diff --git a/tools/source/ref/pstm.cxx b/tools/source/ref/pstm.cxx
index e0412fd5d675..b2a5600075cc 100644
--- a/tools/source/ref/pstm.cxx
+++ b/tools/source/ref/pstm.cxx
@@ -37,7 +37,7 @@
/************************************************************************
|* SvClassManager::Register()
*************************************************************************/
-void SvClassManager::Register( USHORT nClassId, SvCreateInstancePersist pFunc )
+void SvClassManager::Register( sal_uInt16 nClassId, SvCreateInstancePersist pFunc )
{
#ifdef DBG_UTIL
SvCreateInstancePersist p;
@@ -50,7 +50,7 @@ void SvClassManager::Register( USHORT nClassId, SvCreateInstancePersist pFunc )
/************************************************************************
|* SvClassManager::Get()
*************************************************************************/
-SvCreateInstancePersist SvClassManager::Get( USHORT nClassId )
+SvCreateInstancePersist SvClassManager::Get( sal_uInt16 nClassId )
{
Map::const_iterator i(aAssocTable.find(nClassId));
return i == aAssocTable.end() ? 0 : i->second;
@@ -63,32 +63,32 @@ TYPEINIT0( SvRttiBase );
SvPersistBaseMemberList::SvPersistBaseMemberList(){}
SvPersistBaseMemberList::SvPersistBaseMemberList(
- USHORT nInitSz, USHORT nResize )
+ sal_uInt16 nInitSz, sal_uInt16 nResize )
: SuperSvPersistBaseMemberList( nInitSz, nResize ){}
-#define PERSIST_LIST_VER (BYTE)0
-#define PERSIST_LIST_DBGUTIL (BYTE)0x80
+#define PERSIST_LIST_VER (sal_uInt8)0
+#define PERSIST_LIST_DBGUTIL (sal_uInt8)0x80
/************************************************************************
|* SvPersistBaseMemberList::WriteOnlyStreamedObjects()
*************************************************************************/
void SvPersistBaseMemberList::WriteObjects( SvPersistStream & rStm,
- BOOL bOnlyStreamed ) const
+ sal_Bool bOnlyStreamed ) const
{
#ifdef STOR_NO_OPTIMIZE
- rStm << (BYTE)(PERSIST_LIST_VER | PERSIST_LIST_DBGUTIL);
- UINT32 nObjPos = rStm.WriteDummyLen();
+ rStm << (sal_uInt8)(PERSIST_LIST_VER | PERSIST_LIST_DBGUTIL);
+ sal_uInt32 nObjPos = rStm.WriteDummyLen();
#else
- BYTE bTmp = PERSIST_LIST_VER;
+ sal_uInt8 bTmp = PERSIST_LIST_VER;
rStm << bTmp;
#endif
- UINT32 nCountMember = Count();
- ULONG nCountPos = rStm.Tell();
- UINT32 nWriteCount = 0;
+ sal_uInt32 nCountMember = Count();
+ sal_uIntPtr nCountPos = rStm.Tell();
+ sal_uInt32 nWriteCount = 0;
rStm << nCountMember;
//bloss die Liste nicht veraendern,
//wegen Seiteneffekten beim Save
- for( ULONG n = 0; n < nCountMember; n++ )
+ for( sal_uIntPtr n = 0; n < nCountMember; n++ )
{
SvPersistBase * pObj = GetObject( n );
if( !bOnlyStreamed || rStm.IsStreamed( pObj ) )
@@ -100,7 +100,7 @@ void SvPersistBaseMemberList::WriteObjects( SvPersistStream & rStm,
if( nWriteCount != nCountMember )
{
// nicht alle Objekte geschrieben, Count anpassen
- ULONG nPos = rStm.Tell();
+ sal_uIntPtr nPos = rStm.Tell();
rStm.Seek( nCountPos );
rStm << nWriteCount;
rStm.Seek( nPos );
@@ -126,7 +126,7 @@ SvPersistStream& operator << ( SvPersistStream & rStm,
SvPersistStream& operator >> ( SvPersistStream & rStm,
SvPersistBaseMemberList & rLst )
{
- BYTE nVer;
+ sal_uInt8 nVer;
rStm >> nVer;
if( (nVer & ~PERSIST_LIST_DBGUTIL) != PERSIST_LIST_VER )
@@ -135,13 +135,13 @@ SvPersistStream& operator >> ( SvPersistStream & rStm,
DBG_ERROR( "persist list, false version" );
}
- UINT32 nObjLen(0), nObjPos(0);
+ sal_uInt32 nObjLen(0), nObjPos(0);
if( nVer & PERSIST_LIST_DBGUTIL )
nObjLen = rStm.ReadLen( &nObjPos );
sal_uInt32 nCount;
rStm >> nCount;
- for( ULONG n = 0; n < nCount && rStm.GetError() == SVSTREAM_OK; n++ )
+ for( sal_uIntPtr n = 0; n < nCount && rStm.GetError() == SVSTREAM_OK; n++ )
{
SvPersistBase * pObj;
rStm >> pObj;
@@ -168,7 +168,7 @@ SvPersistStream::SvPersistStream
gespeichert werdn k"onnen */
SvStream * pStream, /* Dieser Stream wird als Medium genommen, auf
dem der PersistStream arbeitet */
- UINT32 nStartIdxP /* Ab diesem Index werden die Id's f"ur
+ sal_uInt32 nStartIdxP /* Ab diesem Index werden die Id's f"ur
die Objekte vergeben, er muss gr"osser
als Null sein. */
)
@@ -187,7 +187,7 @@ SvPersistStream::SvPersistStream
*/
{
DBG_ASSERT( nStartIdx != 0, "zero index not allowed" );
- bIsWritable = TRUE;
+ bIsWritable = sal_True;
if( pStm )
{
SetVersion( pStm->GetVersion() );
@@ -225,7 +225,7 @@ SvPersistStream::SvPersistStream
wenn das erste aus dieser Hierarchie benutzt werden soll.
*/
{
- bIsWritable = TRUE;
+ bIsWritable = sal_True;
if( pStm )
{
SetVersion( pStm->GetVersion() );
@@ -279,14 +279,14 @@ void SvPersistStream::SetStream
}
//=========================================================================
-USHORT SvPersistStream::IsA() const
+sal_uInt16 SvPersistStream::IsA() const
/* [Beschreibung]
Gibt den Identifier dieses Streamklasse zur"uck.
[R"uckgabewert]
- USHORT ID_PERSISTSTREAM wird zur"uckgegeben.
+ sal_uInt16 ID_PERSISTSTREAM wird zur"uckgegeben.
[Querverweise]
@@ -311,10 +311,10 @@ void SvPersistStream::ResetError()
/*************************************************************************
|* SvPersistStream::GetData()
*************************************************************************/
-ULONG SvPersistStream::GetData( void* pData, ULONG nSize )
+sal_uIntPtr SvPersistStream::GetData( void* pData, sal_uIntPtr nSize )
{
DBG_ASSERT( pStm, "stream not set" );
- ULONG nRet = pStm->Read( pData, nSize );
+ sal_uIntPtr nRet = pStm->Read( pData, nSize );
SetError( pStm->GetError() );
return nRet;
}
@@ -322,10 +322,10 @@ ULONG SvPersistStream::GetData( void* pData, ULONG nSize )
/*************************************************************************
|* SvPersistStream::PutData()
*************************************************************************/
-ULONG SvPersistStream::PutData( const void* pData, ULONG nSize )
+sal_uIntPtr SvPersistStream::PutData( const void* pData, sal_uIntPtr nSize )
{
DBG_ASSERT( pStm, "stream not set" );
- ULONG nRet = pStm->Write( pData, nSize );
+ sal_uIntPtr nRet = pStm->Write( pData, nSize );
SetError( pStm->GetError() );
return nRet;
}
@@ -333,10 +333,10 @@ ULONG SvPersistStream::PutData( const void* pData, ULONG nSize )
/*************************************************************************
|* SvPersistStream::Seek()
*************************************************************************/
-ULONG SvPersistStream::SeekPos( ULONG nPos )
+sal_uIntPtr SvPersistStream::SeekPos( sal_uIntPtr nPos )
{
DBG_ASSERT( pStm, "stream not set" );
- ULONG nRet = pStm->Seek( nPos );
+ sal_uIntPtr nRet = pStm->Seek( nPos );
SetError( pStm->GetError() );
return nRet;
}
@@ -351,15 +351,15 @@ void SvPersistStream::FlushData()
/*************************************************************************
|* SvPersistStream::GetCurMaxIndex()
*************************************************************************/
-ULONG SvPersistStream::GetCurMaxIndex( const SvPersistUIdx & rIdx ) const
+sal_uIntPtr SvPersistStream::GetCurMaxIndex( const SvPersistUIdx & rIdx ) const
{
// const bekomme ich nicht den hoechsten Index
SvPersistUIdx * p = (SvPersistUIdx *)&rIdx;
// alten merken
- ULONG nCurIdx = p->GetCurIndex();
+ sal_uIntPtr nCurIdx = p->GetCurIndex();
p->Last();
// Bereiche nicht ueberschneiden, deshalb nur groessere Indexe
- ULONG nMaxIdx = p->GetCurIndex();
+ sal_uIntPtr nMaxIdx = p->GetCurIndex();
// wieder herstellen
p->Seek( nCurIdx );
return nMaxIdx;
@@ -368,9 +368,9 @@ ULONG SvPersistStream::GetCurMaxIndex( const SvPersistUIdx & rIdx ) const
/*************************************************************************
|* SvPersistStream::GetIndex()
*************************************************************************/
-ULONG SvPersistStream::GetIndex( SvPersistBase * pObj ) const
+sal_uIntPtr SvPersistStream::GetIndex( SvPersistBase * pObj ) const
{
- ULONG nId = (ULONG)aPTable.Get( (ULONG)pObj );
+ sal_uIntPtr nId = (sal_uIntPtr)aPTable.Get( (sal_uIntPtr)pObj );
if( !nId && pRefStm )
return pRefStm->GetIndex( pObj );
return nId;
@@ -379,7 +379,7 @@ ULONG SvPersistStream::GetIndex( SvPersistBase * pObj ) const
/*************************************************************************
|* SvPersistStream::GetObject)
*************************************************************************/
-SvPersistBase * SvPersistStream::GetObject( ULONG nIdx ) const
+SvPersistBase * SvPersistStream::GetObject( sal_uIntPtr nIdx ) const
{
if( nIdx >= nStartIdx )
return aPUIdx.Get( nIdx );
@@ -393,7 +393,7 @@ SvPersistBase * SvPersistStream::GetObject( ULONG nIdx ) const
#define LEN_2 0x40
#define LEN_4 0x20
#define LEN_5 0x10
-UINT32 SvPersistStream::ReadCompressed
+sal_uInt32 SvPersistStream::ReadCompressed
(
SvStream & rStm /* Aus diesem Stream werden die komprimierten Daten
gelesen */
@@ -405,14 +405,14 @@ UINT32 SvPersistStream::ReadCompressed
[R"uckgabewert]
- UINT32 Das nicht komprimierte Wort wird zur"uckgegeben.
+ sal_uInt32 Das nicht komprimierte Wort wird zur"uckgegeben.
[Querverweise]
*/
{
- UINT32 nRet(0);
- BYTE nMask;
+ sal_uInt32 nRet(0);
+ sal_uInt8 nMask;
rStm >> nMask;
if( nMask & LEN_1 )
nRet = ~LEN_1 & nMask;
@@ -430,7 +430,7 @@ UINT32 SvPersistStream::ReadCompressed
rStm >> nMask;
nRet |= nMask;
nRet <<= 16;
- USHORT n;
+ sal_uInt16 n;
rStm >> n;
nRet |= n;
}
@@ -456,7 +456,7 @@ void SvPersistStream::WriteCompressed
(
SvStream & rStm,/* Aus diesem Stream werden die komprimierten Daten
gelesen */
- UINT32 nVal /* Dieser Wert wird komprimiert geschrieben */
+ sal_uInt32 nVal /* Dieser Wert wird komprimiert geschrieben */
)
/* [Beschreibung]
@@ -474,30 +474,30 @@ void SvPersistStream::WriteCompressed
{
#ifdef STOR_NO_OPTIMIZE
if( nVal < 0x80 )
- rStm << (BYTE)(LEN_1 | nVal);
+ rStm << (sal_uInt8)(LEN_1 | nVal);
else if( nVal < 0x4000 )
{
- rStm << (BYTE)(LEN_2 | (nVal >> 8));
- rStm << (BYTE)nVal;
+ rStm << (sal_uInt8)(LEN_2 | (nVal >> 8));
+ rStm << (sal_uInt8)nVal;
}
else if( nVal < 0x20000000 )
{
- // hoechstes BYTE
- rStm << (BYTE)(LEN_4 | (nVal >> 24));
- // 2. hoechstes BYTE
- rStm << (BYTE)(nVal >> 16);
- rStm << (USHORT)(nVal);
+ // hoechstes sal_uInt8
+ rStm << (sal_uInt8)(LEN_4 | (nVal >> 24));
+ // 2. hoechstes sal_uInt8
+ rStm << (sal_uInt8)(nVal >> 16);
+ rStm << (sal_uInt16)(nVal);
}
else
#endif
{
- rStm << (BYTE)LEN_5;
+ rStm << (sal_uInt8)LEN_5;
rStm << nVal;
}
}
//=========================================================================
-UINT32 SvPersistStream::WriteDummyLen()
+sal_uInt32 SvPersistStream::WriteDummyLen()
/* [Beschreibung]
Die Methode schreibt 4 Byte in den Stream und gibt die Streamposition
@@ -505,11 +505,11 @@ UINT32 SvPersistStream::WriteDummyLen()
[R"uckgabewert]
- UINT32 Die Position hinter der L"angenangabe wird zur"uckgegeben.
+ sal_uInt32 Die Position hinter der L"angenangabe wird zur"uckgegeben.
[Beispiel]
- UINT32 nObjPos = rStm.WriteDummyLen();
+ sal_uInt32 nObjPos = rStm.WriteDummyLen();
...
// Daten schreiben
...
@@ -522,13 +522,13 @@ UINT32 SvPersistStream::WriteDummyLen()
*/
{
#ifdef DBG_UTIL
- UINT32 nPos = Tell();
+ sal_uInt32 nPos = Tell();
#endif
- UINT32 n0 = 0;
+ sal_uInt32 n0 = 0;
*this << n0; // wegen Sun sp
// keine Assertion bei Streamfehler
DBG_ASSERT( GetError() != SVSTREAM_OK
- || (sizeof( UINT32 ) == Tell() -nPos),
+ || (sizeof( sal_uInt32 ) == Tell() -nPos),
"keine 4-Byte fuer Langenangabe" );
return Tell();
}
@@ -536,20 +536,20 @@ UINT32 SvPersistStream::WriteDummyLen()
//=========================================================================
void SvPersistStream::WriteLen
(
- UINT32 nObjPos /* die Position + 4, an der die L"ange geschrieben
+ sal_uInt32 nObjPos /* die Position + 4, an der die L"ange geschrieben
wird. */
)
/* [Beschreibung]
Die Methode schreibt die Differenz zwischen der aktuellen und
- nObjPos als UINT32 an die Position nObjPos -4 im Stream. Danach
+ nObjPos als sal_uInt32 an die Position nObjPos -4 im Stream. Danach
wird der Stream wieder auf die alte Position gestellt.
[Beispiel]
Die Differenz enth"alt nicht die L"angenangabe.
- UINT32 nObjPos = rStm.WriteDummyLen();
+ sal_uInt32 nObjPos = rStm.WriteDummyLen();
...
// Daten schreiben
...
@@ -561,19 +561,19 @@ void SvPersistStream::WriteLen
<SvPersistStream::ReadLen>, <SvPersistStream::WriteDummyLen>
*/
{
- UINT32 nPos = Tell();
- UINT32 nLen = nPos - nObjPos;
+ sal_uInt32 nPos = Tell();
+ sal_uInt32 nLen = nPos - nObjPos;
// die Laenge mu� im stream 4-Byte betragen
- Seek( nObjPos - sizeof( UINT32 ) );
+ Seek( nObjPos - sizeof( sal_uInt32 ) );
// Laenge schreiben
*this << nLen;
Seek( nPos );
}
//=========================================================================
-UINT32 SvPersistStream::ReadLen
+sal_uInt32 SvPersistStream::ReadLen
(
- UINT32 * pTestPos /* Die Position des Streams, nach dem Lesen der
+ sal_uInt32 * pTestPos /* Die Position des Streams, nach dem Lesen der
L"ange, wird zur"uckgegeben. Es darf auch NULL
"ubergeben werden. */
)
@@ -583,7 +583,7 @@ UINT32 SvPersistStream::ReadLen
und <SvPersistStream::WriteLen> geschrieben wurde.
*/
{
- UINT32 nLen;
+ sal_uInt32 nLen;
*this >> nLen;
if( pTestPos )
*pTestPos = Tell();
@@ -593,15 +593,15 @@ UINT32 SvPersistStream::ReadLen
//=========================================================================
// Dateirormat abw"arts kompatibel
#ifdef STOR_NO_OPTIMIZE
-#define P_VER (BYTE)0x00
+#define P_VER (sal_uInt8)0x00
#else
-#define P_VER (BYTE)0x01
+#define P_VER (sal_uInt8)0x01
#endif
-#define P_VER_MASK (BYTE)0x0F
-#define P_ID_0 (BYTE)0x80
-#define P_OBJ (BYTE)0x40
-#define P_DBGUTIL (BYTE)0x20
-#define P_ID (BYTE)0x10
+#define P_VER_MASK (sal_uInt8)0x0F
+#define P_ID_0 (sal_uInt8)0x80
+#define P_OBJ (sal_uInt8)0x40
+#define P_DBGUTIL (sal_uInt8)0x20
+#define P_ID (sal_uInt8)0x10
#ifdef STOR_NO_OPTIMIZE
#define P_STD P_DBGUTIL
#else
@@ -611,9 +611,9 @@ UINT32 SvPersistStream::ReadLen
static void WriteId
(
SvStream & rStm,
- BYTE nHdr,
- UINT32 nId,
- USHORT nClassId
+ sal_uInt8 nHdr,
+ sal_uInt32 nId,
+ sal_uInt16 nClassId
)
{
#ifdef STOR_NO_OPTIMIZE
@@ -624,12 +624,12 @@ static void WriteId
{
if( (nHdr & P_OBJ) || nId != 0 )
{ // Id nur bei Zeiger, oder DBGUTIL
- rStm << (BYTE)(nHdr);
+ rStm << (sal_uInt8)(nHdr);
SvPersistStream::WriteCompressed( rStm, nId );
}
else
{ // NULL Pointer
- rStm << (BYTE)(nHdr | P_ID_0);
+ rStm << (sal_uInt8)(nHdr | P_ID_0);
return;
}
}
@@ -646,9 +646,9 @@ static void WriteId
static void ReadId
(
SvStream & rStm,
- BYTE & nHdr,
- UINT32 & nId,
- USHORT & nClassId
+ sal_uInt8 & nHdr,
+ sal_uInt32 & nId,
+ sal_uInt16 & nClassId
)
{
nClassId = 0;
@@ -668,19 +668,19 @@ static void ReadId
nId = SvPersistStream::ReadCompressed( rStm );
if( (nHdr & P_DBGUTIL) || (nHdr & P_OBJ) )
- nClassId = (USHORT)SvPersistStream::ReadCompressed( rStm );
+ nClassId = (sal_uInt16)SvPersistStream::ReadCompressed( rStm );
}
}
//=========================================================================
void SvPersistStream::WriteObj
(
- BYTE nHdr,
+ sal_uInt8 nHdr,
SvPersistBase * pObj
)
{
#ifdef STOR_NO_OPTIMIZE
- UINT32 nObjPos = 0;
+ sal_uInt32 nObjPos = 0;
if( nHdr & P_DBGUTIL )
// Position fuer Laenge merken
nObjPos = WriteDummyLen();
@@ -698,17 +698,17 @@ SvPersistStream& SvPersistStream::WritePointer
SvPersistBase * pObj
)
{
- BYTE nP = P_STD;
+ sal_uInt8 nP = P_STD;
if( pObj )
{
- ULONG nId = GetIndex( pObj );
+ sal_uIntPtr nId = GetIndex( pObj );
if( nId )
nP |= P_ID;
else
{
nId = aPUIdx.Insert( pObj );
- aPTable.Insert( (ULONG)pObj, (void *)nId );
+ aPTable.Insert( (sal_uIntPtr)pObj, (void *)nId );
nP |= P_OBJ;
}
WriteId( *this, nP, nId, pObj->GetClassId() );
@@ -723,15 +723,15 @@ SvPersistStream& SvPersistStream::WritePointer
}
//=========================================================================
-UINT32 SvPersistStream::ReadObj
+sal_uInt32 SvPersistStream::ReadObj
(
SvPersistBase * & rpObj,
- BOOL bRegister
+ sal_Bool bRegister
)
{
- BYTE nHdr;
- UINT32 nId = 0;
- USHORT nClassId;
+ sal_uInt8 nHdr;
+ sal_uInt32 nId = 0;
+ sal_uInt16 nClassId;
rpObj = NULL; // Spezifikation: Im Fehlerfall 0.
ReadId( *this, nHdr, nId, nClassId );
@@ -751,7 +751,7 @@ UINT32 SvPersistStream::ReadObj
"object already exist" );
SvCreateInstancePersist pFunc = rClassMgr.Get( nClassId );
- UINT32 nObjLen(0), nObjPos(0);
+ sal_uInt32 nObjLen(0), nObjPos(0);
if( nHdr & P_DBGUTIL )
nObjLen = ReadLen( &nObjPos );
if( !pFunc )
@@ -772,9 +772,9 @@ UINT32 SvPersistStream::ReadObj
if( bRegister )
{
// unbedingt erst in Tabelle eintragen
- ULONG nNewId = aPUIdx.Insert( rpObj );
+ sal_uIntPtr nNewId = aPUIdx.Insert( rpObj );
// um den gleichen Zustand, wie nach dem Speichern herzustellen
- aPTable.Insert( (ULONG)rpObj, (void *)nNewId );
+ aPTable.Insert( (sal_uIntPtr)rpObj, (void *)nNewId );
DBG_ASSERT( !(nHdr & P_DBGUTIL) || nId == nNewId,
"read write id conflict: not the same" );
}
@@ -809,7 +809,7 @@ SvPersistStream& SvPersistStream::ReadPointer
SvPersistBase * & rpObj
)
{
- ReadObj( rpObj, TRUE );
+ ReadObj( rpObj, sal_True );
return *this;
}
@@ -843,14 +843,14 @@ SvStream& operator <<
SvStream * pOldStm = rThis.GetStream();
rThis.SetStream( &rStm );
- BYTE bTmp = 0;
+ sal_uInt8 bTmp = 0;
rThis << bTmp; // Version
- UINT32 nCount = (UINT32)rThis.aPUIdx.Count();
+ sal_uInt32 nCount = (sal_uInt32)rThis.aPUIdx.Count();
rThis << nCount;
SvPersistBase * pEle = rThis.aPUIdx.First();
- for( UINT32 i = 0; i < nCount; i++ )
+ for( sal_uInt32 i = 0; i < nCount; i++ )
{
- BYTE nP = P_OBJ | P_ID | P_STD;
+ sal_uInt8 nP = P_OBJ | P_ID | P_STD;
WriteId( rThis, nP, rThis.aPUIdx.GetCurIndex(),
pEle->GetClassId() );
rThis.WriteObj( nP, pEle );
@@ -870,23 +870,23 @@ SvStream& operator >>
SvStream * pOldStm = rThis.GetStream();
rThis.SetStream( &rStm );
- BYTE nVers;
+ sal_uInt8 nVers;
rThis >> nVers; // Version
if( 0 == nVers )
{
- UINT32 nCount = 0;
+ sal_uInt32 nCount = 0;
rThis >> nCount;
- for( UINT32 i = 0; i < nCount; i++ )
+ for( sal_uInt32 i = 0; i < nCount; i++ )
{
SvPersistBase * pEle;
// Lesen, ohne in die Tabellen einzutragen
- UINT32 nId = rThis.ReadObj( pEle, FALSE );
+ sal_uInt32 nId = rThis.ReadObj( pEle, sal_False );
if( rThis.GetError() )
break;
// Die Id eines Objektes wird nie modifiziert
rThis.aPUIdx.Insert( nId, pEle );
- rThis.aPTable.Insert( (ULONG)pEle, (void *)nId );
+ rThis.aPTable.Insert( (sal_uIntPtr)pEle, (void *)nId );
}
}
else
@@ -897,19 +897,19 @@ SvStream& operator >>
}
//=========================================================================
-ULONG SvPersistStream::InsertObj( SvPersistBase * pObj )
+sal_uIntPtr SvPersistStream::InsertObj( SvPersistBase * pObj )
{
- ULONG nId = aPUIdx.Insert( pObj );
- aPTable.Insert( (ULONG)pObj, (void *)nId );
+ sal_uIntPtr nId = aPUIdx.Insert( pObj );
+ aPTable.Insert( (sal_uIntPtr)pObj, (void *)nId );
return nId;
}
//=========================================================================
-ULONG SvPersistStream::RemoveObj( SvPersistBase * pObj )
+sal_uIntPtr SvPersistStream::RemoveObj( SvPersistBase * pObj )
{
- ULONG nIdx = GetIndex( pObj );
+ sal_uIntPtr nIdx = GetIndex( pObj );
aPUIdx.Remove( nIdx );
- aPTable.Remove( (ULONG)pObj );
+ aPTable.Remove( (sal_uIntPtr)pObj );
return nIdx;
}
diff --git a/tools/source/stream/cachestr.cxx b/tools/source/stream/cachestr.cxx
index 0233dc25fb52..17270048fcf4 100644
--- a/tools/source/stream/cachestr.cxx
+++ b/tools/source/stream/cachestr.cxx
@@ -43,13 +43,13 @@
|*
*************************************************************************/
-SvCacheStream::SvCacheStream( ULONG nMaxMemSize )
+SvCacheStream::SvCacheStream( sal_uIntPtr nMaxMemSize )
{
if( !nMaxMemSize )
nMaxMemSize = 20480;
- SvStream::bIsWritable = TRUE;
+ SvStream::bIsWritable = sal_True;
nMaxSize = nMaxMemSize;
- bPersistent = FALSE;
+ bPersistent = sal_False;
pSwapStream = 0;
pCurrentStream = new SvMemoryStream( nMaxMemSize );
pTempFile = 0;
@@ -66,8 +66,8 @@ SvCacheStream::SvCacheStream( ULONG nMaxMemSize )
*************************************************************************/
SvCacheStream::SvCacheStream( const String &rFileName,
- ULONG nExpectedSize,
- ULONG nMaxMemSize )
+ sal_uIntPtr nExpectedSize,
+ sal_uIntPtr nMaxMemSize )
{
if( !nMaxMemSize )
nMaxMemSize = 20480;
@@ -77,9 +77,9 @@ SvCacheStream::SvCacheStream( const String &rFileName,
else if( !nExpectedSize )
nExpectedSize = 4096;
- SvStream::bIsWritable = TRUE;
+ SvStream::bIsWritable = sal_True;
nMaxSize = nMaxMemSize;
- bPersistent = TRUE;
+ bPersistent = sal_True;
aFileName = rFileName;
pSwapStream = 0;
pCurrentStream = new SvMemoryStream( nExpectedSize );
@@ -105,7 +105,7 @@ SvCacheStream::~SvCacheStream()
if( pSwapStream && !bPersistent && pTempFile )
{
// temporaeres File loeschen
- pTempFile->EnableKillingFile( TRUE );
+ pTempFile->EnableKillingFile( sal_True );
}
delete pTempFile;
@@ -145,7 +145,7 @@ void SvCacheStream::SwapOut()
}
}
- ULONG nPos = pCurrentStream->Tell();
+ sal_uIntPtr nPos = pCurrentStream->Tell();
pCurrentStream->Seek( 0 );
if( !pSwapStream )
pSwapStream = new SvFileStream( aFileName, STREAM_READWRITE | STREAM_TRUNC );
@@ -167,7 +167,7 @@ void SvCacheStream::SwapOut()
|*
*************************************************************************/
-ULONG SvCacheStream::GetData( void* pData, ULONG nSize )
+sal_uIntPtr SvCacheStream::GetData( void* pData, sal_uIntPtr nSize )
{
return pCurrentStream->Read( pData, nSize );
}
@@ -182,7 +182,7 @@ ULONG SvCacheStream::GetData( void* pData, ULONG nSize )
|*
*************************************************************************/
-ULONG SvCacheStream::PutData( const void* pData, ULONG nSize )
+sal_uIntPtr SvCacheStream::PutData( const void* pData, sal_uIntPtr nSize )
{
// lieber unnoetig auslagern als unnoetig umkopieren
if( pCurrentStream != pSwapStream
@@ -201,7 +201,7 @@ ULONG SvCacheStream::PutData( const void* pData, ULONG nSize )
|*
*************************************************************************/
-ULONG SvCacheStream::SeekPos( ULONG nPos )
+sal_uIntPtr SvCacheStream::SeekPos( sal_uIntPtr nPos )
{
return pCurrentStream->Seek( nPos );
}
@@ -253,7 +253,7 @@ const void* SvCacheStream::GetBuffer()
|*
*************************************************************************/
-void SvCacheStream::SetSize( ULONG nSize )
+void SvCacheStream::SetSize( sal_uIntPtr nSize )
{
pCurrentStream->SetStreamSize( nSize );
}
@@ -268,13 +268,13 @@ void SvCacheStream::SetSize( ULONG nSize )
|*
*************************************************************************/
-ULONG SvCacheStream::GetSize()
+sal_uIntPtr SvCacheStream::GetSize()
{
// ACHTUNG: SvMemoryStream::GetSize() gibt Groesse
// des allozierten Buffers zurueck
Flush();
- ULONG nTemp = Tell();
- ULONG nLength = Seek( STREAM_SEEK_TO_END );
+ sal_uIntPtr nTemp = Tell();
+ sal_uIntPtr nLength = Seek( STREAM_SEEK_TO_END );
Seek( nTemp );
return nLength;
}
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 9fdef8436f1a..6e1a6401b7a0 100644..100755
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -101,7 +101,7 @@ inline static void SwapDouble( double& r )
{
if( sizeof(double) != 8 )
{
- DBG_ASSERT( FALSE, "Can only swap 8-Byte-doubles\n" );
+ DBG_ASSERT( sal_False, "Can only swap 8-Byte-doubles\n" );
}
else
{
@@ -144,7 +144,7 @@ if( (tmp==STREAM_IO_WRITE) && sizeof(datatype) <= nBufFree)\
if( nBufActualPos > nBufActualLen )\
nBufActualLen = nBufActualPos;\
pBufPos += sizeof(datatype);\
- bIsDirty = TRUE;\
+ bIsDirty = sal_True;\
}\
else\
Write( (char*)&value, sizeof(datatype) );\
@@ -420,7 +420,7 @@ void SvStream::ImpInit()
eStreamCharSet = osl_getThreadTextEncoding();
// eTargetCharSet = osl_getThreadTextEncoding();
nCryptMask = 0;
- bIsEof = FALSE;
+ bIsEof = sal_False;
#if defined UNX
eLineDelimiter = LINEEND_LF; // UNIX-Format
#else
@@ -431,9 +431,9 @@ void SvStream::ImpInit()
nBufFilePos = 0;
nBufActualPos = 0;
- bIsDirty = FALSE;
- bIsConsistent = TRUE;
- bIsWritable = TRUE;
+ bIsDirty = sal_False;
+ bIsConsistent = sal_True;
+ bIsWritable = sal_True;
pRWBuf = 0;
pBufPos = 0;
@@ -536,7 +536,7 @@ sal_uInt16 SvStream::IsA() const
void SvStream::ClearError()
{
- bIsEof = FALSE;
+ bIsEof = sal_False;
nError = SVSTREAM_OK;
}
@@ -570,13 +570,13 @@ void SvStream::SetError( sal_uInt32 nErrorCode )
void SvStream::SetNumberFormatInt( sal_uInt16 nNewFormat )
{
nNumberFormatInt = nNewFormat;
- bSwap = FALSE;
+ bSwap = sal_False;
#ifdef OSL_BIGENDIAN
if( nNumberFormatInt == NUMBERFORMAT_INT_LITTLEENDIAN )
- bSwap = TRUE;
+ bSwap = sal_True;
#else
if( nNumberFormatInt == NUMBERFORMAT_INT_BIGENDIAN )
- bSwap = TRUE;
+ bSwap = sal_True;
#endif
}
@@ -609,8 +609,8 @@ void SvStream::SetBufferSize( sal_uInt16 nBufferSize )
nBufActualPos = 0;
nBufSize = nBufferSize;
if( nBufSize )
- pRWBuf = new BYTE[ nBufSize ];
- bIsConsistent = TRUE;
+ pRWBuf = new sal_uInt8[ nBufSize ];
+ bIsConsistent = sal_True;
pBufPos = pRWBuf;
eIOMode = STREAM_IO_DONTKNOW;
if( !bDontSeek )
@@ -633,11 +633,11 @@ void SvStream::ClearBuffer()
nBufActualPos = 0;
nBufFilePos = 0;
pBufPos = pRWBuf;
- bIsDirty = FALSE;
- bIsConsistent = TRUE;
+ bIsDirty = sal_False;
+ bIsConsistent = sal_True;
eIOMode = STREAM_IO_DONTKNOW;
- bIsEof = FALSE;
+ bIsEof = sal_False;
}
/*************************************************************************
@@ -678,7 +678,7 @@ sal_Bool SvStream::ReadByteStringLine( String& rStr, rtl_TextEncoding eSrcCharSe
sal_Bool SvStream::ReadLine( ByteString& rStr )
{
sal_Char buf[256+1];
- sal_Bool bEnd = FALSE;
+ sal_Bool bEnd = sal_False;
sal_Size nOldFilePos = Tell();
sal_Char c = 0;
sal_Size nTotalLen = 0;
@@ -694,8 +694,8 @@ sal_Bool SvStream::ReadLine( ByteString& rStr )
if ( rStr.Len() == 0 )
{
// der allererste Blockread hat fehlgeschlagen -> Abflug
- bIsEof = TRUE;
- return FALSE;
+ bIsEof = sal_True;
+ return sal_False;
}
else
break;
@@ -707,7 +707,7 @@ sal_Bool SvStream::ReadLine( ByteString& rStr )
c = buf[j];
if ( c == '\n' || c == '\r' )
{
- bEnd = TRUE;
+ bEnd = sal_True;
break;
}
// erAck 26.02.01: Old behavior was no special treatment of '\0'
@@ -727,7 +727,7 @@ sal_Bool SvStream::ReadLine( ByteString& rStr )
}
if ( !bEnd && !GetError() && rStr.Len() )
- bEnd = TRUE;
+ bEnd = sal_True;
nOldFilePos += nTotalLen;
if( Tell() > nOldFilePos )
@@ -745,14 +745,14 @@ sal_Bool SvStream::ReadLine( ByteString& rStr )
}
if ( bEnd )
- bIsEof = FALSE;
+ bIsEof = sal_False;
return bEnd;
}
sal_Bool SvStream::ReadUniStringLine( String& rStr )
{
sal_Unicode buf[256+1];
- sal_Bool bEnd = FALSE;
+ sal_Bool bEnd = sal_False;
sal_Size nOldFilePos = Tell();
sal_Unicode c = 0;
sal_Size nTotalLen = 0;
@@ -771,8 +771,8 @@ sal_Bool SvStream::ReadUniStringLine( String& rStr )
if ( rStr.Len() == 0 )
{
// der allererste Blockread hat fehlgeschlagen -> Abflug
- bIsEof = TRUE;
- return FALSE;
+ bIsEof = sal_True;
+ return sal_False;
}
else
break;
@@ -786,7 +786,7 @@ sal_Bool SvStream::ReadUniStringLine( String& rStr )
c = buf[j];
if ( c == '\n' || c == '\r' )
{
- bEnd = TRUE;
+ bEnd = sal_True;
break;
}
// erAck 26.02.01: Old behavior was no special treatment of '\0'
@@ -806,7 +806,7 @@ sal_Bool SvStream::ReadUniStringLine( String& rStr )
}
if ( !bEnd && !GetError() && rStr.Len() )
- bEnd = TRUE;
+ bEnd = sal_True;
nOldFilePos += nTotalLen * sizeof(sal_Unicode);
if( Tell() > nOldFilePos )
@@ -824,7 +824,7 @@ sal_Bool SvStream::ReadUniStringLine( String& rStr )
}
if ( bEnd )
- bIsEof = FALSE;
+ bIsEof = sal_False;
return bEnd;
}
@@ -848,7 +848,7 @@ sal_Bool SvStream::ReadCString( ByteString& rStr )
rStr.Erase();
sal_Char buf[ 256 + 1 ];
- sal_Bool bEnd = FALSE;
+ sal_Bool bEnd = sal_False;
sal_Size nFilePos = Tell();
while( !bEnd && !GetError() )
@@ -1032,7 +1032,7 @@ sal_Bool SvStream::WriteUniOrByteChar( sal_Unicode ch, rtl_TextEncoding eDestCha
sal_Bool SvStream::StartWritingUnicodeText()
{
- SetEndianSwap( FALSE ); // write native format
+ SetEndianSwap( sal_False ); // write native format
// BOM, Byte Order Mark, U+FEFF, see
// http://www.unicode.org/faq/utf_bom.html#BOM
// Upon read: 0xfeff(-257) => no swap; 0xfffe(-2) => swap
@@ -1375,7 +1375,7 @@ SvStream& SvStream::operator<< ( signed char v )
if( nBufActualPos > nBufActualLen ) // Append ?
nBufActualLen = nBufActualPos;
nBufFree--; // = sizeof(char);
- bIsDirty = TRUE;
+ bIsDirty = sal_True;
}
else
Write( (char*)&v, sizeof(signed char) );
@@ -1396,7 +1396,7 @@ SvStream& SvStream::operator<< ( char v )
if( nBufActualPos > nBufActualLen ) // Append ?
nBufActualLen = nBufActualPos;
nBufFree--; // = sizeof(char);
- bIsDirty = TRUE;
+ bIsDirty = sal_True;
}
else
Write( (char*)&v, sizeof(char) );
@@ -1415,7 +1415,7 @@ SvStream& SvStream::operator<< ( unsigned char v )
if( nBufActualPos > nBufActualLen ) // Append ?
nBufActualLen = nBufActualPos;
nBufFree--;
- bIsDirty = TRUE;
+ bIsDirty = sal_True;
}
else
Write( (char*)&v, sizeof(char) );
@@ -1616,7 +1616,7 @@ sal_Size SvStream::Read( void* pData, sal_Size nCount )
CryptAndWriteBuffer(pRWBuf, nBufActualLen);
else
PutData( pRWBuf, nBufActualLen );
- bIsDirty = FALSE;
+ bIsDirty = sal_False;
}
// passt der Datenblock in den Puffer ?
@@ -1661,10 +1661,10 @@ sal_Size SvStream::Read( void* pData, sal_Size nCount )
}
}
}
- bIsEof = FALSE;
+ bIsEof = sal_False;
nBufFree = nBufActualLen - nBufActualPos;
if( nCount != nSaveCount && nError != ERRCODE_IO_PENDING )
- bIsEof = TRUE;
+ bIsEof = sal_True;
if( nCount == nSaveCount && nError == ERRCODE_IO_PENDING )
nError = ERRCODE_NONE;
return nCount;
@@ -1712,7 +1712,7 @@ sal_Size SvStream::Write( const void* pData, sal_Size nCount )
nBufActualLen = nBufActualPos;
pBufPos += nCount;
- bIsDirty = TRUE;
+ bIsDirty = sal_True;
}
else
{
@@ -1724,7 +1724,7 @@ sal_Size SvStream::Write( const void* pData, sal_Size nCount )
CryptAndWriteBuffer( pRWBuf, (sal_Size)nBufActualLen );
else
PutData( pRWBuf, nBufActualLen );
- bIsDirty = FALSE;
+ bIsDirty = sal_False;
}
// passt der Block in den Puffer ?
@@ -1752,7 +1752,7 @@ sal_Size SvStream::Write( const void* pData, sal_Size nCount )
nBufActualPos = (sal_uInt16)nCount;
pBufPos = pRWBuf + nCount;
nBufActualLen = (sal_uInt16)nCount;
- bIsDirty = TRUE;
+ bIsDirty = sal_True;
}
}
nBufFree = nBufSize - nBufActualPos;
@@ -1774,7 +1774,7 @@ sal_Size SvStream::Seek( sal_Size nFilePos )
{
eIOMode = STREAM_IO_DONTKNOW;
- bIsEof = FALSE;
+ bIsEof = sal_False;
if( !pRWBuf )
{
nBufFilePos = SeekPos( nFilePos );
@@ -1800,7 +1800,7 @@ sal_Size SvStream::Seek( sal_Size nFilePos )
CryptAndWriteBuffer( pRWBuf, nBufActualLen );
else
PutData( pRWBuf, nBufActualLen );
- bIsDirty = FALSE;
+ bIsDirty = sal_False;
}
nBufActualLen = 0;
nBufActualPos = 0;
@@ -1836,7 +1836,7 @@ void SvStream::Flush()
else
if( PutData( pRWBuf, nBufActualLen ) != nBufActualLen )
SetError( SVSTREAM_WRITE_ERROR );
- bIsDirty = FALSE;
+ bIsDirty = sal_False;
}
if( bIsWritable )
FlushData();
@@ -1880,9 +1880,9 @@ SvStream& SvStream::PutBack( char aCh )
CryptAndWriteBuffer( pRWBuf, nBufActualLen );
else
PutData( pRWBuf, nBufActualLen );
- bIsDirty = FALSE;
+ bIsDirty = sal_False;
}
- bIsConsistent = FALSE; // Puffer enthaelt jetzt TRASH
+ bIsConsistent = sal_False; // Puffer enthaelt jetzt TRASH
if( nBufActualPos )
{
// 1. Fall
@@ -1911,7 +1911,7 @@ SvStream& SvStream::PutBack( char aCh )
*pRWBuf = aCh;
}
eIOMode = STREAM_IO_DONTKNOW;
- bIsEof = FALSE;
+ bIsEof = sal_False;
return *this;
}
@@ -1954,7 +1954,7 @@ void SvStream::RefreshBuffer()
CryptAndWriteBuffer( pRWBuf, (sal_Size)nBufActualLen );
else
PutData( pRWBuf, nBufActualLen );
- bIsDirty = FALSE;
+ bIsDirty = sal_False;
}
SeekPos( nBufFilePos );
nBufActualLen = (sal_uInt16)GetData( pRWBuf, nBufSize );
@@ -1962,7 +1962,7 @@ void SvStream::RefreshBuffer()
nError = ERRCODE_NONE;
if( nCryptMask )
EncryptBuffer(pRWBuf, (sal_Size)nBufActualLen);
- bIsConsistent = TRUE;
+ bIsConsistent = sal_True;
eIOMode = STREAM_IO_DONTKNOW;
}
@@ -2038,7 +2038,7 @@ SvStream& SvStream::ReadNumber( long& rLong )
rLong = strtol( buf, &pEndPtr, (int)nRadix );
nFPtr += ( (sal_Size)pEndPtr - (sal_Size)(&(buf[0])) );
Seek( nFPtr );
- bIsEof = FALSE;
+ bIsEof = sal_False;
return *this;
}
@@ -2063,7 +2063,7 @@ SvStream& SvStream::ReadNumber( sal_uInt32& rUInt32 )
rUInt32 = strtoul( buf, &pEndPtr, (int)nRadix );
nFPtr += ( (sal_uIntPtr)pEndPtr - (sal_uIntPtr)buf );
Seek( nFPtr );
- bIsEof = FALSE;
+ bIsEof = sal_False;
return *this;
}
@@ -2088,7 +2088,7 @@ SvStream& SvStream::ReadNumber( double& rDouble )
rDouble = strtod( buf, &pEndPtr );
nFPtr += ( (sal_Size)pEndPtr - (sal_Size)buf );
Seek( nFPtr );
- bIsEof = FALSE;
+ bIsEof = sal_False;
return *this;
}
@@ -2251,7 +2251,7 @@ sal_Bool SvStream::EncryptBuffer(void* pStart, sal_Size nLen)
aCh ^= nMask;
*pTemp = aCh;
}
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -2432,12 +2432,12 @@ SvMemoryStream::SvMemoryStream( void* pBuffer, sal_Size bufSize,
StreamMode eMode )
{
if( eMode & STREAM_WRITE )
- bIsWritable = TRUE;
+ bIsWritable = sal_True;
else
- bIsWritable = FALSE;
+ bIsWritable = sal_False;
nEndOfData = bufSize;
- bOwnsData = FALSE;
- pBuf = (BYTE *) pBuffer;
+ bOwnsData = sal_False;
+ pBuf = (sal_uInt8 *) pBuffer;
nResize = 0L;
nSize = bufSize;
nPos = 0L;
@@ -2456,8 +2456,8 @@ SvMemoryStream::SvMemoryStream( void* pBuffer, sal_Size bufSize,
SvMemoryStream::SvMemoryStream( sal_Size nInitSize, sal_Size nResizeOffset )
{
- bIsWritable = TRUE;
- bOwnsData = TRUE;
+ bIsWritable = sal_True;
+ bOwnsData = sal_True;
nEndOfData = 0L;
nResize = nResizeOffset;
nPos = 0;
@@ -2535,7 +2535,7 @@ void* SvMemoryStream::SetBuffer( void* pNewBuf, sal_Size nCount,
else
pResult = pBuf;
- pBuf = (BYTE *) pNewBuf;
+ pBuf = (sal_uInt8 *) pNewBuf;
nPos = 0;
nSize = nCount;
nResize = 0;
@@ -2723,7 +2723,7 @@ void SvMemoryStream::ResetError()
sal_Bool SvMemoryStream::AllocateMemory( sal_Size nNewSize )
{
- pBuf = new BYTE[nNewSize];
+ pBuf = new sal_uInt8[nNewSize];
return( pBuf != 0 );
}
@@ -2739,18 +2739,18 @@ sal_Bool SvMemoryStream::AllocateMemory( sal_Size nNewSize )
sal_Bool SvMemoryStream::ReAllocateMemory( long nDiff )
{
- sal_Bool bRetVal = FALSE;
+ sal_Bool bRetVal = sal_False;
long nTemp = (long)nSize;
nTemp += nDiff;
sal_Size nNewSize = (sal_Size)nTemp;
if( nNewSize )
{
- BYTE* pNewBuf = new BYTE[nNewSize];
+ sal_uInt8* pNewBuf = new sal_uInt8[nNewSize];
if( pNewBuf )
{
- bRetVal = TRUE; // Success!
+ bRetVal = sal_True; // Success!
if( nNewSize < nSize ) // Verkleinern ?
{
memcpy( pNewBuf, pBuf, (size_t)nNewSize );
@@ -2772,7 +2772,7 @@ sal_Bool SvMemoryStream::ReAllocateMemory( long nDiff )
}
else
{
- bRetVal = TRUE;
+ bRetVal = sal_True;
FreeMemory();
pBuf = 0;
nSize = 0;
diff --git a/tools/source/stream/strmos2.cxx b/tools/source/stream/strmos2.cxx
index a35fc7731767..bfe1f9750f4d 100644
--- a/tools/source/stream/strmos2.cxx
+++ b/tools/source/stream/strmos2.cxx
@@ -59,20 +59,20 @@ class StreamData
{
public:
HFILE hFile;
- BOOL bIsEof;
+ sal_Bool bIsEof;
StreamData()
{
hFile = 0;
- bIsEof = TRUE;
+ bIsEof = sal_True;
}
};
// -----------------------------------------------------------------------
-ULONG GetSvError( APIRET nPMError )
+sal_uIntPtr GetSvError( APIRET nPMError )
{
- static struct { APIRET pm; ULONG sv; } errArr[] =
+ static struct { APIRET pm; sal_uIntPtr sv; } errArr[] =
{
{ ERROR_FILE_NOT_FOUND, SVSTREAM_FILE_NOT_FOUND },
{ ERROR_PATH_NOT_FOUND, SVSTREAM_PATH_NOT_FOUND },
@@ -93,7 +93,7 @@ ULONG GetSvError( APIRET nPMError )
{ 0xFFFF, SVSTREAM_GENERALERROR }
};
- ULONG nRetVal = SVSTREAM_GENERALERROR; // Standardfehler
+ sal_uIntPtr nRetVal = SVSTREAM_GENERALERROR; // Standardfehler
int i=0;
do
{
@@ -120,9 +120,9 @@ ULONG GetSvError( APIRET nPMError )
SvFileStream::SvFileStream( const String& rFileName, StreamMode nOpenMode )
{
- bIsOpen = FALSE;
+ bIsOpen = sal_False;
nLockCounter = 0;
- bIsWritable = FALSE;
+ bIsWritable = sal_False;
pInstanceData = new StreamData;
SetBufferSize( 8192 );
@@ -146,9 +146,9 @@ SvFileStream::SvFileStream( const String& rFileName, StreamMode nOpenMode )
SvFileStream::SvFileStream()
{
- bIsOpen = FALSE;
+ bIsOpen = sal_False;
nLockCounter = 0;
- bIsWritable = FALSE;
+ bIsWritable = sal_False;
pInstanceData = new StreamData;
SetBufferSize( 8192 );
}
@@ -180,9 +180,9 @@ SvFileStream::~SvFileStream()
|*
*************************************************************************/
-ULONG SvFileStream::GetFileHandle() const
+sal_uIntPtr SvFileStream::GetFileHandle() const
{
- return (ULONG)pInstanceData->hFile;
+ return (sal_uIntPtr)pInstanceData->hFile;
}
/*************************************************************************
@@ -195,7 +195,7 @@ ULONG SvFileStream::GetFileHandle() const
|*
*************************************************************************/
-USHORT SvFileStream::IsA() const
+sal_uInt16 SvFileStream::IsA() const
{
return ID_FILESTREAM;
}
@@ -210,7 +210,7 @@ USHORT SvFileStream::IsA() const
|*
*************************************************************************/
-ULONG SvFileStream::GetData( void* pData, ULONG nSize )
+sal_uIntPtr SvFileStream::GetData( void* pData, sal_uIntPtr nSize )
{
#ifdef DBG_UTIL
ByteString aTraceStr( "SvFileStream::GetData(): " );
@@ -220,7 +220,7 @@ ULONG SvFileStream::GetData( void* pData, ULONG nSize )
DBG_TRACE( aTraceStr.GetBuffer() );
#endif
- ULONG nCount = 0L;
+ sal_uIntPtr nCount = 0L;
if( IsOpen() )
{
APIRET nResult;
@@ -241,7 +241,7 @@ ULONG SvFileStream::GetData( void* pData, ULONG nSize )
|*
*************************************************************************/
-ULONG SvFileStream::PutData( const void* pData, ULONG nSize )
+sal_uIntPtr SvFileStream::PutData( const void* pData, sal_uIntPtr nSize )
{
#ifdef DBG_UTIL
ByteString aTraceStr( "SvFileStrean::PutData: " );
@@ -251,7 +251,7 @@ ULONG SvFileStream::PutData( const void* pData, ULONG nSize )
DBG_TRACE( aTraceStr.GetBuffer() );
#endif
- ULONG nCount = 0L;
+ sal_uIntPtr nCount = 0L;
if( IsOpen() )
{
APIRET nResult;
@@ -274,9 +274,9 @@ ULONG SvFileStream::PutData( const void* pData, ULONG nSize )
|*
*************************************************************************/
-ULONG SvFileStream::SeekPos( ULONG nPos )
+sal_uIntPtr SvFileStream::SeekPos( sal_uIntPtr nPos )
{
- ULONG nNewPos = 0L;
+ sal_uIntPtr nNewPos = 0L;
if( IsOpen() )
{
APIRET nResult;
@@ -306,9 +306,9 @@ ULONG SvFileStream::SeekPos( ULONG nPos )
|*
*************************************************************************/
/*
-ULONG SvFileStream::Tell()
+sal_uIntPtr SvFileStream::Tell()
{
- ULONG nPos = 0L;
+ sal_uIntPtr nPos = 0L;
if( IsOpen() )
{
@@ -352,9 +352,9 @@ void SvFileStream::FlushData()
|*
*************************************************************************/
-sal_Bool SvFileStream::LockRange( ULONG nByteOffset, ULONG nBytes )
+sal_Bool SvFileStream::LockRange( sal_uIntPtr nByteOffset, sal_uIntPtr nBytes )
{
- sal_Bool bRetVal = FALSE;
+ sal_Bool bRetVal = sal_False;
if( IsOpen() )
{
APIRET nResult;
@@ -373,7 +373,7 @@ sal_Bool SvFileStream::LockRange( ULONG nByteOffset, ULONG nBytes )
if( nResult )
SetError(::GetSvError(nResult) );
else
- bRetVal = TRUE;
+ bRetVal = sal_True;
}
return bRetVal;
}
@@ -388,9 +388,9 @@ sal_Bool SvFileStream::LockRange( ULONG nByteOffset, ULONG nBytes )
|*
*************************************************************************/
-sal_Bool SvFileStream::UnlockRange( ULONG nByteOffset, ULONG nBytes )
+sal_Bool SvFileStream::UnlockRange( sal_uIntPtr nByteOffset, sal_uIntPtr nBytes )
{
- sal_Bool bRetVal = FALSE;
+ sal_Bool bRetVal = sal_False;
if( IsOpen() )
{
APIRET nResult;
@@ -409,7 +409,7 @@ sal_Bool SvFileStream::UnlockRange( ULONG nByteOffset, ULONG nBytes )
if( nResult )
SetError(::GetSvError(nResult) );
else
- bRetVal = TRUE;
+ bRetVal = sal_True;
}
return bRetVal;
}
@@ -426,19 +426,19 @@ sal_Bool SvFileStream::UnlockRange( ULONG nByteOffset, ULONG nBytes )
sal_Bool SvFileStream::LockFile()
{
- sal_Bool bRetVal = FALSE;
+ sal_Bool bRetVal = sal_False;
if( !nLockCounter )
{
if( LockRange( 0L, LONG_MAX ) )
{
nLockCounter = 1;
- bRetVal = TRUE;
+ bRetVal = sal_True;
}
}
else
{
nLockCounter++;
- bRetVal = TRUE;
+ bRetVal = sal_True;
}
return bRetVal;
}
@@ -455,7 +455,7 @@ sal_Bool SvFileStream::LockFile()
sal_Bool SvFileStream::UnlockFile()
{
- sal_Bool bRetVal = FALSE;
+ sal_Bool bRetVal = sal_False;
if( nLockCounter > 0)
{
if( nLockCounter == 1)
@@ -463,13 +463,13 @@ sal_Bool SvFileStream::UnlockFile()
if( UnlockRange( 0L, LONG_MAX ) )
{
nLockCounter = 0;
- bRetVal = TRUE;
+ bRetVal = sal_True;
}
}
else
{
nLockCounter--;
- bRetVal = TRUE;
+ bRetVal = sal_True;
}
}
return bRetVal;
@@ -486,7 +486,7 @@ sal_Bool SvFileStream::UnlockFile()
*************************************************************************/
#if 0
-BOOL createLongNameEA ( const PCSZ pszPath, ULONG ulAttributes, const String& aLongName );
+sal_Bool createLongNameEA ( const PCSZ pszPath, sal_uIntPtr ulAttributes, const String& aLongName );
#endif
void SvFileStream::Open( const String& rFilename, StreamMode nOpenMode )
@@ -500,7 +500,7 @@ void SvFileStream::Open( const String& rFilename, StreamMode nOpenMode )
String aRealPart;
String aVirtualPath;
ItemIDPath aVirtualURL;
- ULONG nDivider = 0;
+ sal_uIntPtr nDivider = 0;
String aVirtualString(rFilename);
@@ -534,10 +534,10 @@ void SvFileStream::Open( const String& rFilename, StreamMode nOpenMode )
Close();
SvStream::ClearBuffer();
- ULONG nActionTaken;
- ULONG nOpenAction = 0L;
- ULONG nShareBits = 0L;
- ULONG nReadWriteBits = 0L;
+ sal_uIntPtr nActionTaken;
+ sal_uIntPtr nOpenAction = 0L;
+ sal_uIntPtr nShareBits = 0L;
+ sal_uIntPtr nReadWriteBits = 0L;
eStreamMode = nOpenMode;
eStreamMode &= ~STREAM_TRUNC; // beim ReOpen nicht cutten
@@ -592,7 +592,7 @@ void SvFileStream::Open( const String& rFilename, StreamMode nOpenMode )
//
// resolves long FAT names used by OS2
//
- BOOL bIsLongOS2=FALSE;
+ sal_Bool bIsLongOS2=sal_False;
if (Folder::IsAvailable())
{
DirEntry aDirEntry(rFilename);
@@ -601,7 +601,7 @@ void SvFileStream::Open( const String& rFilename, StreamMode nOpenMode )
// in kurzen Pfad wandeln
ItemIDPath aItemIDPath(rFilename);
aParsedFilename = aItemIDPath.GetHostNotationPath();
- bIsLongOS2 = TRUE;
+ bIsLongOS2 = sal_True;
}
}
#endif
@@ -623,7 +623,7 @@ void SvFileStream::Open( const String& rFilename, StreamMode nOpenMode )
if( nRet == ERROR_TOO_MANY_OPEN_FILES )
{
long nToAdd = 10;
- ULONG nCurMaxFH;
+ sal_uIntPtr nCurMaxFH;
nRet = DosSetRelMaxFH( &nToAdd, &nCurMaxFH );
nRet = DosOpen( aFileNameA.GetBuffer(), &pInstanceData->hFile,
&nActionTaken, 0L, FILE_NORMAL, nOpenAction,
@@ -641,15 +641,15 @@ void SvFileStream::Open( const String& rFilename, StreamMode nOpenMode )
if( nRet )
{
- bIsOpen = FALSE;
+ bIsOpen = sal_False;
SetError(::GetSvError(nRet) );
}
else
{
- bIsOpen = TRUE;
- pInstanceData->bIsEof = FALSE;
+ bIsOpen = sal_True;
+ pInstanceData->bIsEof = sal_False;
if( nReadWriteBits != OPEN_ACCESS_READONLY )
- bIsWritable = TRUE;
+ bIsWritable = sal_True;
}
#if 0
@@ -714,10 +714,10 @@ void SvFileStream::Close()
DosClose( pInstanceData->hFile );
}
- bIsOpen = FALSE;
+ bIsOpen = sal_False;
nLockCounter= 0;
- bIsWritable = FALSE;
- pInstanceData->bIsEof = TRUE;
+ bIsWritable = sal_False;
+ pInstanceData->bIsEof = sal_True;
SvStream::ClearBuffer();
SvStream::ClearError();
}
@@ -747,7 +747,7 @@ void SvFileStream::ResetError()
|*
*************************************************************************/
-void SvFileStream::SetSize( ULONG nSize )
+void SvFileStream::SetSize( sal_uIntPtr nSize )
{
if( IsOpen() )
{
@@ -756,5 +756,3 @@ void SvFileStream::SetSize( ULONG nSize )
SetError( ::GetSvError( nRet ) );
}
}
-
-
diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx
index f3c5d642ed6e..87e3cea4c0c7 100644
--- a/tools/source/stream/strmunx.cxx
+++ b/tools/source/stream/strmunx.cxx
@@ -123,7 +123,7 @@ sal_Bool InternalStreamLock::LockFile( sal_Size nStart, sal_Size nEnd, SvFileStr
InternalStreamLock* pLock = NULL;
InternalStreamLockList &rLockList = LockList::get();
- for( ULONG i = 0; i < rLockList.Count(); ++i )
+ for( sal_uIntPtr i = 0; i < rLockList.Count(); ++i )
{
pLock = rLockList.GetObject( i );
if( aStat.st_ino == pLock->m_aStat.st_ino )
@@ -167,7 +167,7 @@ void InternalStreamLock::UnlockFile( sal_Size nStart, sal_Size nEnd, SvFileStrea
InternalStreamLockList &rLockList = LockList::get();
if( nStart == 0 && nEnd == 0 )
{
- for( ULONG i = 0; i < rLockList.Count(); ++i )
+ for( sal_uIntPtr i = 0; i < rLockList.Count(); ++i )
{
if( ( pLock = rLockList.GetObject( i ) )->m_pStream == pStream )
{
@@ -177,7 +177,7 @@ void InternalStreamLock::UnlockFile( sal_Size nStart, sal_Size nEnd, SvFileStrea
}
return;
}
- for( ULONG i = 0; i < rLockList.Count(); ++i )
+ for( sal_uIntPtr i = 0; i < rLockList.Count(); ++i )
{
if( ( pLock = rLockList.GetObject( i ) )->m_pStream == pStream &&
nStart == pLock->m_nStartPos && nEnd == pLock->m_nEndPos )
diff --git a/tools/source/stream/strmwnt.cxx b/tools/source/stream/strmwnt.cxx
index d9e7da92296b..20443e268964 100644
--- a/tools/source/stream/strmwnt.cxx
+++ b/tools/source/stream/strmwnt.cxx
@@ -63,9 +63,9 @@ public:
// -----------------------------------------------------------------------
-static ULONG GetSvError( DWORD nWntError )
+static sal_uIntPtr GetSvError( DWORD nWntError )
{
- static struct { DWORD wnt; ULONG sv; } errArr[] =
+ static struct { DWORD wnt; sal_uIntPtr sv; } errArr[] =
{
{ ERROR_SUCCESS, SVSTREAM_OK },
{ ERROR_ACCESS_DENIED, SVSTREAM_ACCESS_DENIED },
@@ -105,7 +105,7 @@ static ULONG GetSvError( DWORD nWntError )
{ (DWORD)0xFFFFFFFF, SVSTREAM_GENERALERROR }
};
- ULONG nRetVal = SVSTREAM_GENERALERROR; // Standardfehler
+ sal_uIntPtr nRetVal = SVSTREAM_GENERALERROR; // Standardfehler
int i=0;
do
{
@@ -131,9 +131,9 @@ static ULONG GetSvError( DWORD nWntError )
SvFileStream::SvFileStream( const String& rFileName, StreamMode nMode )
{
- bIsOpen = FALSE;
+ bIsOpen = sal_False;
nLockCounter = 0;
- bIsWritable = FALSE;
+ bIsWritable = sal_False;
pInstanceData = new StreamData;
SetBufferSize( 8192 );
@@ -157,9 +157,9 @@ SvFileStream::SvFileStream( const String& rFileName, StreamMode nMode )
SvFileStream::SvFileStream()
{
- bIsOpen = FALSE;
+ bIsOpen = sal_False;
nLockCounter = 0;
- bIsWritable = FALSE;
+ bIsWritable = sal_False;
pInstanceData = new StreamData;
SetBufferSize( 8192 );
@@ -192,9 +192,9 @@ SvFileStream::~SvFileStream()
|*
*************************************************************************/
-ULONG SvFileStream::GetFileHandle() const
+sal_uIntPtr SvFileStream::GetFileHandle() const
{
- return (ULONG)pInstanceData->hFile;
+ return (sal_uIntPtr)pInstanceData->hFile;
}
/*************************************************************************
@@ -207,7 +207,7 @@ ULONG SvFileStream::GetFileHandle() const
|*
*************************************************************************/
-USHORT SvFileStream::IsA() const
+sal_uInt16 SvFileStream::IsA() const
{
return ID_FILESTREAM;
}
@@ -222,7 +222,7 @@ USHORT SvFileStream::IsA() const
|*
*************************************************************************/
-ULONG SvFileStream::GetData( void* pData, ULONG nSize )
+sal_uIntPtr SvFileStream::GetData( void* pData, sal_uIntPtr nSize )
{
DWORD nCount = 0;
if( IsOpen() )
@@ -230,7 +230,7 @@ ULONG SvFileStream::GetData( void* pData, ULONG nSize )
bool bResult = ReadFile(pInstanceData->hFile,(LPVOID)pData,nSize,&nCount,NULL);
if( !bResult )
{
- ULONG nTestError = GetLastError();
+ sal_uIntPtr nTestError = GetLastError();
SetError(::GetSvError( nTestError ) );
}
}
@@ -247,7 +247,7 @@ ULONG SvFileStream::GetData( void* pData, ULONG nSize )
|*
*************************************************************************/
-ULONG SvFileStream::PutData( const void* pData, ULONG nSize )
+sal_uIntPtr SvFileStream::PutData( const void* pData, sal_uIntPtr nSize )
{
DWORD nCount = 0;
if( IsOpen() )
@@ -268,7 +268,7 @@ ULONG SvFileStream::PutData( const void* pData, ULONG nSize )
|*
*************************************************************************/
-ULONG SvFileStream::SeekPos( ULONG nPos )
+sal_uIntPtr SvFileStream::SeekPos( sal_uIntPtr nPos )
{
DWORD nNewPos = 0;
if( IsOpen() )
@@ -287,7 +287,7 @@ ULONG SvFileStream::SeekPos( ULONG nPos )
}
else
SetError( SVSTREAM_GENERALERROR );
- return (ULONG)nNewPos;
+ return (sal_uIntPtr)nNewPos;
}
/*************************************************************************
@@ -300,9 +300,9 @@ ULONG SvFileStream::SeekPos( ULONG nPos )
|*
*************************************************************************/
/*
-ULONG SvFileStream::Tell()
+sal_uIntPtr SvFileStream::Tell()
{
- ULONG nPos = 0L;
+ sal_uIntPtr nPos = 0L;
if( IsOpen() )
{
@@ -347,7 +347,7 @@ void SvFileStream::FlushData()
|*
*************************************************************************/
-BOOL SvFileStream::LockRange( ULONG nByteOffset, ULONG nBytes )
+sal_Bool SvFileStream::LockRange( sal_uIntPtr nByteOffset, sal_uIntPtr nBytes )
{
bool bRetVal = false;
if( IsOpen() )
@@ -369,7 +369,7 @@ BOOL SvFileStream::LockRange( ULONG nByteOffset, ULONG nBytes )
|*
*************************************************************************/
-BOOL SvFileStream::UnlockRange( ULONG nByteOffset, ULONG nBytes )
+sal_Bool SvFileStream::UnlockRange( sal_uIntPtr nByteOffset, sal_uIntPtr nBytes )
{
bool bRetVal = false;
if( IsOpen() )
@@ -391,21 +391,21 @@ BOOL SvFileStream::UnlockRange( ULONG nByteOffset, ULONG nBytes )
|*
*************************************************************************/
-BOOL SvFileStream::LockFile()
+sal_Bool SvFileStream::LockFile()
{
- BOOL bRetVal = FALSE;
+ sal_Bool bRetVal = sal_False;
if( !nLockCounter )
{
if( LockRange( 0L, LONG_MAX ) )
{
nLockCounter = 1;
- bRetVal = TRUE;
+ bRetVal = sal_True;
}
}
else
{
nLockCounter++;
- bRetVal = TRUE;
+ bRetVal = sal_True;
}
return bRetVal;
}
@@ -420,9 +420,9 @@ BOOL SvFileStream::LockFile()
|*
*************************************************************************/
-BOOL SvFileStream::UnlockFile()
+sal_Bool SvFileStream::UnlockFile()
{
- BOOL bRetVal = FALSE;
+ sal_Bool bRetVal = sal_False;
if( nLockCounter > 0)
{
if( nLockCounter == 1)
@@ -430,13 +430,13 @@ BOOL SvFileStream::UnlockFile()
if( UnlockRange( 0L, LONG_MAX ) )
{
nLockCounter = 0;
- bRetVal = TRUE;
+ bRetVal = sal_True;
}
}
else
{
nLockCounter--;
- bRetVal = TRUE;
+ bRetVal = sal_True;
}
}
return bRetVal;
@@ -555,7 +555,7 @@ void SvFileStream::Open( const String& rFilename, StreamMode nMode )
if( (pInstanceData->hFile==INVALID_HANDLE_VALUE) &&
(nAccessMode & GENERIC_WRITE))
{
- ULONG nErr = ::GetSvError( GetLastError() );
+ sal_uIntPtr nErr = ::GetSvError( GetLastError() );
if(nErr==SVSTREAM_ACCESS_DENIED || nErr==SVSTREAM_SHARING_VIOLATION)
{
nMode &= (~STREAM_WRITE);
@@ -580,15 +580,15 @@ void SvFileStream::Open( const String& rFilename, StreamMode nMode )
if( GetLastError() != ERROR_SUCCESS )
{
- bIsOpen = FALSE;
+ bIsOpen = sal_False;
SetError(::GetSvError( GetLastError() ) );
}
else
{
- bIsOpen = TRUE;
- // pInstanceData->bIsEof = FALSE;
+ bIsOpen = sal_True;
+ // pInstanceData->bIsEof = sal_False;
if( nAccessMode & GENERIC_WRITE )
- bIsWritable = TRUE;
+ bIsWritable = sal_True;
}
SetErrorMode( nOldErrorMode );
}
@@ -631,9 +631,9 @@ void SvFileStream::Close()
Flush();
CloseHandle( pInstanceData->hFile );
}
- bIsOpen = FALSE;
+ bIsOpen = sal_False;
nLockCounter= 0;
- bIsWritable = FALSE;
+ bIsWritable = sal_False;
SvStream::ClearBuffer();
SvStream::ClearError();
}
@@ -663,24 +663,24 @@ void SvFileStream::ResetError()
|*
*************************************************************************/
-void SvFileStream::SetSize( ULONG nSize )
+void SvFileStream::SetSize( sal_uIntPtr nSize )
{
if( IsOpen() )
{
- int bError = FALSE;
+ int bError = sal_False;
HANDLE hFile = pInstanceData->hFile;
- ULONG nOld = SetFilePointer( hFile, 0L, NULL, FILE_CURRENT );
+ sal_uIntPtr nOld = SetFilePointer( hFile, 0L, NULL, FILE_CURRENT );
if( nOld != 0xffffffff )
{
if( SetFilePointer(hFile,nSize,NULL,FILE_BEGIN ) != 0xffffffff)
{
bool bSucc = SetEndOfFile( hFile );
if( !bSucc )
- bError = TRUE;
+ bError = sal_True;
}
if( SetFilePointer( hFile,nOld,NULL,FILE_BEGIN ) == 0xffffffff)
- bError = TRUE;
+ bError = sal_True;
}
if( bError )
SetError(::GetSvError( GetLastError() ) );
diff --git a/tools/source/stream/vcompat.cxx b/tools/source/stream/vcompat.cxx
index 8430eb17659b..fcbab9b98826 100644
--- a/tools/source/stream/vcompat.cxx
+++ b/tools/source/stream/vcompat.cxx
@@ -36,7 +36,7 @@
// - VersionCompat -
// -----------------
-VersionCompat::VersionCompat( SvStream& rStm, USHORT nStreamMode, USHORT nVersion ) :
+VersionCompat::VersionCompat( SvStream& rStm, sal_uInt16 nStreamMode, sal_uInt16 nVersion ) :
mpRWStm ( &rStm ),
mnStmMode ( nStreamMode ),
mnVersion ( nVersion )
@@ -64,7 +64,7 @@ VersionCompat::~VersionCompat()
{
if( STREAM_WRITE == mnStmMode )
{
- const UINT32 nEndPos = mpRWStm->Tell();
+ const sal_uInt32 nEndPos = mpRWStm->Tell();
mpRWStm->Seek( mnCompatPos );
*mpRWStm << ( nEndPos - mnTotalSize );
@@ -72,7 +72,7 @@ VersionCompat::~VersionCompat()
}
else
{
- const UINT32 nReadSize = mpRWStm->Tell() - mnCompatPos;
+ const sal_uInt32 nReadSize = mpRWStm->Tell() - mnCompatPos;
if( mnTotalSize > nReadSize )
mpRWStm->SeekRel( mnTotalSize - nReadSize );
diff --git a/tools/source/string/strascii.cxx b/tools/source/string/strascii.cxx
index 775e1ca7f142..e47517d93412 100644
--- a/tools/source/string/strascii.cxx
+++ b/tools/source/string/strascii.cxx
@@ -31,17 +31,17 @@
#ifdef DBG_UTIL
-static BOOL ImplDbgCheckAsciiStr( const sal_Char* pAsciiStr, sal_Int32 nLen )
+static sal_Bool ImplDbgCheckAsciiStr( const sal_Char* pAsciiStr, sal_Int32 nLen )
{
while ( nLen && *pAsciiStr )
{
if ( ((unsigned char)*pAsciiStr) > 127 )
- return FALSE;
+ return sal_False;
++pAsciiStr,
--nLen;
}
- return TRUE;
+ return sal_True;
}
#endif
@@ -504,7 +504,7 @@ StringCompare UniString::CompareIgnoreCaseToAscii( const sal_Char* pAsciiStr,
// -----------------------------------------------------------------------
-BOOL UniString::EqualsAscii( const sal_Char* pAsciiStr ) const
+sal_Bool UniString::EqualsAscii( const sal_Char* pAsciiStr ) const
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
DBG_ASSERT( ImplDbgCheckAsciiStr( pAsciiStr, STRING_LEN ),
@@ -515,7 +515,7 @@ BOOL UniString::EqualsAscii( const sal_Char* pAsciiStr ) const
// -----------------------------------------------------------------------
-BOOL UniString::EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr ) const
+sal_Bool UniString::EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr ) const
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
DBG_ASSERT( ImplDbgCheckAsciiStr( pAsciiStr, STRING_LEN ),
@@ -526,7 +526,7 @@ BOOL UniString::EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr ) const
// -----------------------------------------------------------------------
-BOOL UniString::EqualsAscii( const sal_Char* pAsciiStr,
+sal_Bool UniString::EqualsAscii( const sal_Char* pAsciiStr,
xub_StrLen nIndex, xub_StrLen nLen ) const
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
@@ -542,7 +542,7 @@ BOOL UniString::EqualsAscii( const sal_Char* pAsciiStr,
// -----------------------------------------------------------------------
-BOOL UniString::EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr,
+sal_Bool UniString::EqualsIgnoreCaseAscii( const sal_Char* pAsciiStr,
xub_StrLen nIndex, xub_StrLen nLen ) const
{
DBG_CHKTHIS( UniString, DbgCheckUniString );
diff --git a/tools/source/string/strcvt.cxx b/tools/source/string/strcvt.cxx
index ef55dee5bfe2..ce5c7ecdcad0 100644
--- a/tools/source/string/strcvt.cxx
+++ b/tools/source/string/strcvt.cxx
@@ -227,7 +227,7 @@ sal_Unicode* ImplGet1ByteUnicodeTab( rtl_TextEncoding eTextEncoding )
static sal_uChar* ImplGet1ByteConvertTab( rtl_TextEncoding eSrcTextEncoding,
rtl_TextEncoding eDestTextEncoding,
- BOOL bReplace )
+ sal_Bool bReplace )
{
#ifndef BOOTSTRAP
TOOLSINDATA* pToolsData = ImplGetToolsInData();
@@ -353,7 +353,7 @@ void ImplDeleteCharTabData()
// =======================================================================
void ByteString::ImplStringConvert(
- rtl_TextEncoding eSource, rtl_TextEncoding eTarget, BOOL bReplace )
+ rtl_TextEncoding eSource, rtl_TextEncoding eTarget, sal_Bool bReplace )
{
sal_uChar* pConvertTab = ImplGet1ByteConvertTab( eSource, eTarget, bReplace );
if ( pConvertTab )
@@ -409,7 +409,7 @@ void ByteString::ImplStringConvert(
// =======================================================================
-ByteString& ByteString::Convert( rtl_TextEncoding eSource, rtl_TextEncoding eTarget, BOOL bReplace )
+ByteString& ByteString::Convert( rtl_TextEncoding eSource, rtl_TextEncoding eTarget, sal_Bool bReplace )
{
DBG_CHKTHIS( ByteString, DbgCheckByteString );
@@ -442,7 +442,7 @@ ByteString& ByteString::Convert( rtl_TextEncoding eSource, rtl_TextEncoding eTar
char ByteString::Convert( char c,
rtl_TextEncoding eSource, rtl_TextEncoding eTarget,
- BOOL bReplace )
+ sal_Bool bReplace )
{
// TextEncoding Dontknow kann nicht konvertiert werden
if ( (eSource == RTL_TEXTENCODING_DONTKNOW) || (eTarget == RTL_TEXTENCODING_DONTKNOW) )
@@ -480,7 +480,7 @@ sal_Unicode ByteString::ConvertToUnicode( char c, rtl_TextEncoding eTextEncoding
// -----------------------------------------------------------------------
-char ByteString::ConvertFromUnicode( sal_Unicode c, rtl_TextEncoding eTextEncoding, BOOL bReplace )
+char ByteString::ConvertFromUnicode( sal_Unicode c, rtl_TextEncoding eTextEncoding, sal_Bool bReplace )
{
sal_Size nLen;
char aBuf[30];
@@ -530,7 +530,7 @@ sal_Unicode ByteString::ConvertToUnicode( const char* pChar, sal_Size* pLen, rtl
// -----------------------------------------------------------------------
sal_Size ByteString::ConvertFromUnicode( sal_Unicode c, char* pBuf, sal_Size nBufLen, rtl_TextEncoding eTextEncoding,
- BOOL bReplace )
+ sal_Bool bReplace )
{
// TextEncoding Dontknow wird nicht konvertiert
if ( eTextEncoding == RTL_TEXTENCODING_DONTKNOW )
diff --git a/tools/source/string/strimp.cxx b/tools/source/string/strimp.cxx
index 34038c576aa0..8712733c0851 100644
--- a/tools/source/string/strimp.cxx
+++ b/tools/source/string/strimp.cxx
@@ -1141,7 +1141,7 @@ STRING& STRING::ConvertLineEnd( LineEnd eLineEnd )
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
// Zeilenumbrueche ermitteln und neue Laenge berechnen
- BOOL bConvert = FALSE; // Muss konvertiert werden
+ sal_Bool bConvert = sal_False; // Muss konvertiert werden
const STRCODE* pStr = mpData->maStr; // damit es schneller geht
xub_StrLen nLineEndLen = (eLineEnd == LINEEND_CRLF) ? 2 : 1;
xub_StrLen nLen = 0; // Ziel-Laenge
@@ -1164,7 +1164,7 @@ STRING& STRING::ConvertLineEnd( LineEnd eLineEnd )
((pStr[i] == _CR) || (pStr[i+1] == _CR))) ||
((eLineEnd == LINEEND_CR) &&
((pStr[i] == _LF) || (pStr[i+1] == _LF))) )
- bConvert = TRUE;
+ bConvert = sal_True;
}
// \r\n oder \n\r, dann Zeichen ueberspringen
@@ -1327,18 +1327,18 @@ StringCompare STRING::CompareIgnoreCaseToAscii( const STRCODE* pCharStr,
// -----------------------------------------------------------------------
-BOOL STRING::Equals( const STRING& rStr ) const
+sal_Bool STRING::Equals( const STRING& rStr ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
DBG_CHKOBJ( &rStr, STRING, DBGCHECKSTRING );
// Sind die Daten gleich
if ( mpData == rStr.mpData )
- return TRUE;
+ return sal_True;
// Gleiche Laenge
if ( mpData->mnLen != rStr.mpData->mnLen )
- return FALSE;
+ return sal_False;
// String vergleichen
return (ImplStringCompareWithoutZero( mpData->maStr, rStr.mpData->maStr, mpData->mnLen ) == 0);
@@ -1346,7 +1346,7 @@ BOOL STRING::Equals( const STRING& rStr ) const
// -----------------------------------------------------------------------
-BOOL STRING::Equals( const STRCODE* pCharStr ) const
+sal_Bool STRING::Equals( const STRCODE* pCharStr ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -1355,18 +1355,18 @@ BOOL STRING::Equals( const STRCODE* pCharStr ) const
// -----------------------------------------------------------------------
-BOOL STRING::EqualsIgnoreCaseAscii( const STRING& rStr ) const
+sal_Bool STRING::EqualsIgnoreCaseAscii( const STRING& rStr ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
DBG_CHKOBJ( &rStr, STRING, DBGCHECKSTRING );
// Sind die Daten gleich
if ( mpData == rStr.mpData )
- return TRUE;
+ return sal_True;
// Gleiche Laenge
if ( mpData->mnLen != rStr.mpData->mnLen )
- return FALSE;
+ return sal_False;
// String vergleichen
return (ImplStringICompareWithoutZero( mpData->maStr, rStr.mpData->maStr, mpData->mnLen ) == 0);
@@ -1374,7 +1374,7 @@ BOOL STRING::EqualsIgnoreCaseAscii( const STRING& rStr ) const
// -----------------------------------------------------------------------
-BOOL STRING::EqualsIgnoreCaseAscii( const STRCODE* pCharStr ) const
+sal_Bool STRING::EqualsIgnoreCaseAscii( const STRCODE* pCharStr ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -1383,7 +1383,7 @@ BOOL STRING::EqualsIgnoreCaseAscii( const STRCODE* pCharStr ) const
// -----------------------------------------------------------------------
-BOOL STRING::Equals( const STRING& rStr, xub_StrLen nIndex, xub_StrLen nLen ) const
+sal_Bool STRING::Equals( const STRING& rStr, xub_StrLen nIndex, xub_StrLen nLen ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
DBG_CHKOBJ( &rStr, STRING, DBGCHECKSTRING );
@@ -1395,7 +1395,7 @@ BOOL STRING::Equals( const STRING& rStr, xub_StrLen nIndex, xub_StrLen nLen ) co
if ( nMaxLen < nLen )
{
if ( rStr.mpData->mnLen != nMaxLen )
- return FALSE;
+ return sal_False;
nLen = static_cast< xub_StrLen >(nMaxLen);
}
@@ -1405,7 +1405,7 @@ BOOL STRING::Equals( const STRING& rStr, xub_StrLen nIndex, xub_StrLen nLen ) co
// -----------------------------------------------------------------------
-BOOL STRING::Equals( const STRCODE* pCharStr, xub_StrLen nIndex, xub_StrLen nLen ) const
+sal_Bool STRING::Equals( const STRCODE* pCharStr, xub_StrLen nIndex, xub_StrLen nLen ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
@@ -1418,7 +1418,7 @@ BOOL STRING::Equals( const STRCODE* pCharStr, xub_StrLen nIndex, xub_StrLen nLen
// -----------------------------------------------------------------------
-BOOL STRING::EqualsIgnoreCaseAscii( const STRING& rStr, xub_StrLen nIndex, xub_StrLen nLen ) const
+sal_Bool STRING::EqualsIgnoreCaseAscii( const STRING& rStr, xub_StrLen nIndex, xub_StrLen nLen ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
DBG_CHKOBJ( &rStr, STRING, DBGCHECKSTRING );
@@ -1430,7 +1430,7 @@ BOOL STRING::EqualsIgnoreCaseAscii( const STRING& rStr, xub_StrLen nIndex, xub_S
if ( nMaxLen < nLen )
{
if ( rStr.mpData->mnLen != nMaxLen )
- return FALSE;
+ return sal_False;
nLen = static_cast< xub_StrLen >(nMaxLen);
}
@@ -1440,7 +1440,7 @@ BOOL STRING::EqualsIgnoreCaseAscii( const STRING& rStr, xub_StrLen nIndex, xub_S
// -----------------------------------------------------------------------
-BOOL STRING::EqualsIgnoreCaseAscii( const STRCODE* pCharStr, xub_StrLen nIndex, xub_StrLen nLen ) const
+sal_Bool STRING::EqualsIgnoreCaseAscii( const STRCODE* pCharStr, xub_StrLen nIndex, xub_StrLen nLen ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );
diff --git a/tools/source/string/tenccvt.cxx b/tools/source/string/tenccvt.cxx
index 5237b24948a7..f1f023a90502 100644
--- a/tools/source/string/tenccvt.cxx
+++ b/tools/source/string/tenccvt.cxx
@@ -84,14 +84,14 @@ rtl_TextEncoding GetOneByteTextEncoding( rtl_TextEncoding eEncoding )
// -----------------------------------------------------------------------
-rtl_TextEncoding GetSOLoadTextEncoding( rtl_TextEncoding eEncoding, USHORT /* nVersion = SOFFICE_FILEFORMAT_50 */ )
+rtl_TextEncoding GetSOLoadTextEncoding( rtl_TextEncoding eEncoding, sal_uInt16 /* nVersion = SOFFICE_FILEFORMAT_50 */ )
{
return GetExtendedCompatibilityTextEncoding( GetOneByteTextEncoding( eEncoding ) );
}
// -----------------------------------------------------------------------
-rtl_TextEncoding GetSOStoreTextEncoding( rtl_TextEncoding eEncoding, USHORT /* nVersion = SOFFICE_FILEFORMAT_50 */ )
+rtl_TextEncoding GetSOStoreTextEncoding( rtl_TextEncoding eEncoding, sal_uInt16 /* nVersion = SOFFICE_FILEFORMAT_50 */ )
{
return GetExtendedTextEncoding( GetOneByteTextEncoding( eEncoding ) );
}
diff --git a/tools/source/string/tstring.cxx b/tools/source/string/tstring.cxx
index f2525e3bca84..734e729ceccb 100644
--- a/tools/source/string/tstring.cxx
+++ b/tools/source/string/tstring.cxx
@@ -188,7 +188,7 @@ double ByteString::ToDouble() const
// -----------------------------------------------------------------------
-BOOL ByteString::IsLowerAscii() const
+sal_Bool ByteString::IsLowerAscii() const
{
DBG_CHKTHIS( ByteString, DbgCheckByteString );
@@ -198,18 +198,18 @@ BOOL ByteString::IsLowerAscii() const
while ( nIndex < nLen )
{
if ( (*pStr >= 65) && (*pStr <= 90) )
- return FALSE;
+ return sal_False;
++pStr,
++nIndex;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL ByteString::IsUpperAscii() const
+sal_Bool ByteString::IsUpperAscii() const
{
DBG_CHKTHIS( ByteString, DbgCheckByteString );
@@ -219,18 +219,18 @@ BOOL ByteString::IsUpperAscii() const
while ( nIndex < nLen )
{
if ( (*pStr >= 97) && (*pStr <= 122) )
- return FALSE;
+ return sal_False;
++pStr,
++nIndex;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL ByteString::IsAlphaAscii() const
+sal_Bool ByteString::IsAlphaAscii() const
{
DBG_CHKTHIS( ByteString, DbgCheckByteString );
@@ -241,18 +241,18 @@ BOOL ByteString::IsAlphaAscii() const
{
if ( !(((*pStr >= 97) && (*pStr <= 122)) ||
((*pStr >= 65) && (*pStr <= 90))) )
- return FALSE;
+ return sal_False;
++pStr,
++nIndex;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL ByteString::IsNumericAscii() const
+sal_Bool ByteString::IsNumericAscii() const
{
DBG_CHKTHIS( ByteString, DbgCheckByteString );
@@ -262,18 +262,18 @@ BOOL ByteString::IsNumericAscii() const
while ( nIndex < nLen )
{
if ( !((*pStr >= 48) && (*pStr <= 57)) )
- return FALSE;
+ return sal_False;
++pStr,
++nIndex;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL ByteString::IsAlphaNumericAscii() const
+sal_Bool ByteString::IsAlphaNumericAscii() const
{
DBG_CHKTHIS( ByteString, DbgCheckByteString );
@@ -285,11 +285,11 @@ BOOL ByteString::IsAlphaNumericAscii() const
if ( !(((*pStr >= 97) && (*pStr <= 122)) ||
((*pStr >= 65) && (*pStr <= 90)) ||
((*pStr >= 48) && (*pStr <= 57))) )
- return FALSE;
+ return sal_False;
++pStr,
++nIndex;
}
- return TRUE;
+ return sal_True;
}
diff --git a/tools/source/testtoolloader/testtoolloader.cxx b/tools/source/testtoolloader/testtoolloader.cxx
index 21a1a715dc08..59be94a02f4c 100644
--- a/tools/source/testtoolloader/testtoolloader.cxx
+++ b/tools/source/testtoolloader/testtoolloader.cxx
@@ -137,7 +137,7 @@ void InitTestToolLib()
if ( pInitFunc )
{
(reinterpret_cast< pfunc_CreateEventLogger >(pInitFunc))();
- bLoggerStarted = TRUE;
+ bLoggerStarted = sal_True;
}
else
{
@@ -174,7 +174,7 @@ void DeInitTestToolLib()
if ( pDeInitFunc )
{
(reinterpret_cast< pfunc_DestroyEventLogger >(pDeInitFunc))();
- bLoggerStarted = FALSE;
+ bLoggerStarted = sal_False;
}
}
diff --git a/tools/source/zcodec/zcodec.cxx b/tools/source/zcodec/zcodec.cxx
index f4f62162854a..cf62c02e0c29 100644
--- a/tools/source/zcodec/zcodec.cxx
+++ b/tools/source/zcodec/zcodec.cxx
@@ -60,7 +60,7 @@ static int gz_magic[2] = { 0x1f, 0x8b }; /* gzip magic header */
// - ZCodec -
// ----------
-ZCodec::ZCodec( ULONG nInBufSize, ULONG nOutBufSize, ULONG nMemUsage )
+ZCodec::ZCodec( sal_uIntPtr nInBufSize, sal_uIntPtr nOutBufSize, sal_uIntPtr nMemUsage )
: mnCRC(0)
{
mnMemUsage = nMemUsage;
@@ -87,11 +87,11 @@ ZCodec::~ZCodec()
// ------------------------------------------------------------------------
-void ZCodec::BeginCompression( ULONG nCompressMethod )
+void ZCodec::BeginCompression( sal_uIntPtr nCompressMethod )
{
mbInit = 0;
- mbStatus = TRUE;
- mbFinish = FALSE;
+ mbStatus = sal_True;
+ mbFinish = sal_False;
mpIStm = mpOStm = NULL;
mnInToRead = 0xffffffff;
mpInBuf = mpOutBuf = NULL;
@@ -146,8 +146,8 @@ long ZCodec::Compress( SvStream& rIStm, SvStream& rOStm )
{
mpIStm = &rIStm;
mpOStm = &rOStm;
- ImplInitBuf( FALSE );
- mpInBuf = new BYTE[ mnInBufSize ];
+ ImplInitBuf( sal_False );
+ mpInBuf = new sal_uInt8[ mnInBufSize ];
}
while (( PZSTREAM->avail_in = mpIStm->Read( PZSTREAM->next_in = mpInBuf, mnInBufSize )) != 0 )
{
@@ -155,7 +155,7 @@ long ZCodec::Compress( SvStream& rIStm, SvStream& rOStm )
ImplWriteBack();
if ( deflate( PZSTREAM, Z_NO_FLUSH ) < 0 )
{
- mbStatus = FALSE;
+ mbStatus = sal_False;
break;
}
};
@@ -167,7 +167,7 @@ long ZCodec::Compress( SvStream& rIStm, SvStream& rOStm )
long ZCodec::Decompress( SvStream& rIStm, SvStream& rOStm )
{
int err;
- ULONG nInToRead;
+ sal_uIntPtr nInToRead;
long nOldTotal_Out = PZSTREAM->total_out;
if ( mbFinish )
@@ -177,8 +177,8 @@ long ZCodec::Decompress( SvStream& rIStm, SvStream& rOStm )
{
mpIStm = &rIStm;
mpOStm = &rOStm;
- ImplInitBuf( TRUE );
- PZSTREAM->next_out = mpOutBuf = new BYTE[ PZSTREAM->avail_out = mnOutBufSize ];
+ ImplInitBuf( sal_True );
+ PZSTREAM->next_out = mpOutBuf = new sal_uInt8[ PZSTREAM->avail_out = mnOutBufSize ];
}
do
{
@@ -196,7 +196,7 @@ long ZCodec::Decompress( SvStream& rIStm, SvStream& rOStm )
err = inflate( PZSTREAM, Z_NO_FLUSH );
if ( err < 0 )
{
- mbStatus = FALSE;
+ mbStatus = sal_False;
break;
}
@@ -205,18 +205,18 @@ long ZCodec::Decompress( SvStream& rIStm, SvStream& rOStm )
ImplWriteBack();
if ( err == Z_STREAM_END )
- mbFinish = TRUE;
+ mbFinish = sal_True;
return ( mbStatus ) ? (long)(PZSTREAM->total_out - nOldTotal_Out) : -1;
}
// ------------------------------------------------------------------------
-long ZCodec::Write( SvStream& rOStm, const BYTE* pData, ULONG nSize )
+long ZCodec::Write( SvStream& rOStm, const sal_uInt8* pData, sal_uIntPtr nSize )
{
if ( mbInit == 0 )
{
mpOStm = &rOStm;
- ImplInitBuf( FALSE );
+ ImplInitBuf( sal_False );
}
PZSTREAM->avail_in = nSize;
@@ -229,7 +229,7 @@ long ZCodec::Write( SvStream& rOStm, const BYTE* pData, ULONG nSize )
if ( deflate( PZSTREAM, Z_NO_FLUSH ) < 0 )
{
- mbStatus = FALSE;
+ mbStatus = sal_False;
break;
}
}
@@ -238,10 +238,10 @@ long ZCodec::Write( SvStream& rOStm, const BYTE* pData, ULONG nSize )
// ------------------------------------------------------------------------
-long ZCodec::Read( SvStream& rIStm, BYTE* pData, ULONG nSize )
+long ZCodec::Read( SvStream& rIStm, sal_uInt8* pData, sal_uIntPtr nSize )
{
int err;
- ULONG nInToRead;
+ sal_uIntPtr nInToRead;
if ( mbFinish )
return 0; // PZSTREAM->total_out;
@@ -249,7 +249,7 @@ long ZCodec::Read( SvStream& rIStm, BYTE* pData, ULONG nSize )
mpIStm = &rIStm;
if ( mbInit == 0 )
{
- ImplInitBuf( TRUE );
+ ImplInitBuf( sal_True );
}
PZSTREAM->avail_out = nSize;
PZSTREAM->next_out = pData;
@@ -278,17 +278,17 @@ long ZCodec::Read( SvStream& rIStm, BYTE* pData, ULONG nSize )
(PZSTREAM->avail_out != 0) &&
(PZSTREAM->avail_in || mnInToRead) );
if ( err == Z_STREAM_END )
- mbFinish = TRUE;
+ mbFinish = sal_True;
return (mbStatus ? (long)(nSize - PZSTREAM->avail_out) : -1);
}
// ------------------------------------------------------------------------
-long ZCodec::ReadAsynchron( SvStream& rIStm, BYTE* pData, ULONG nSize )
+long ZCodec::ReadAsynchron( SvStream& rIStm, sal_uInt8* pData, sal_uIntPtr nSize )
{
int err = 0;
- ULONG nInToRead;
+ sal_uIntPtr nInToRead;
if ( mbFinish )
return 0; // PZSTREAM->total_out;
@@ -296,7 +296,7 @@ long ZCodec::ReadAsynchron( SvStream& rIStm, BYTE* pData, ULONG nSize )
if ( mbInit == 0 )
{
mpIStm = &rIStm;
- ImplInitBuf( TRUE );
+ ImplInitBuf( sal_True );
}
PZSTREAM->avail_out = nSize;
PZSTREAM->next_out = pData;
@@ -306,9 +306,9 @@ long ZCodec::ReadAsynchron( SvStream& rIStm, BYTE* pData, ULONG nSize )
{
nInToRead = (mnInBufSize > mnInToRead) ? mnInToRead : mnInBufSize;
- ULONG nStreamPos = rIStm.Tell();
+ sal_uIntPtr nStreamPos = rIStm.Tell();
rIStm.Seek( STREAM_SEEK_TO_END );
- ULONG nMaxPos = rIStm.Tell();
+ sal_uIntPtr nMaxPos = rIStm.Tell();
rIStm.Seek( nStreamPos );
if ( ( nMaxPos - nStreamPos ) < nInToRead )
{
@@ -337,7 +337,7 @@ long ZCodec::ReadAsynchron( SvStream& rIStm, BYTE* pData, ULONG nSize )
(PZSTREAM->avail_out != 0) &&
(PZSTREAM->avail_in || mnInToRead) );
if ( err == Z_STREAM_END )
- mbFinish = TRUE;
+ mbFinish = sal_True;
return (mbStatus ? (long)(nSize - PZSTREAM->avail_out) : -1);
}
@@ -346,7 +346,7 @@ long ZCodec::ReadAsynchron( SvStream& rIStm, BYTE* pData, ULONG nSize )
void ZCodec::ImplWriteBack()
{
- ULONG nAvail = mnOutBufSize - PZSTREAM->avail_out;
+ sal_uIntPtr nAvail = mnOutBufSize - PZSTREAM->avail_out;
if ( nAvail )
{
@@ -359,35 +359,35 @@ void ZCodec::ImplWriteBack()
// ------------------------------------------------------------------------
-void ZCodec::SetBreak( ULONG nInToRead )
+void ZCodec::SetBreak( sal_uIntPtr nInToRead )
{
mnInToRead = nInToRead;
}
// ------------------------------------------------------------------------
-ULONG ZCodec::GetBreak( void )
+sal_uIntPtr ZCodec::GetBreak( void )
{
return ( mnInToRead + PZSTREAM->avail_in );
}
// ------------------------------------------------------------------------
-void ZCodec::SetCRC( ULONG nCRC )
+void ZCodec::SetCRC( sal_uIntPtr nCRC )
{
mnCRC = nCRC;
}
// ------------------------------------------------------------------------
-ULONG ZCodec::GetCRC()
+sal_uIntPtr ZCodec::GetCRC()
{
return mnCRC;
}
// ------------------------------------------------------------------------
-void ZCodec::ImplInitBuf ( BOOL nIOFlag )
+void ZCodec::ImplInitBuf ( sal_Bool nIOFlag )
{
if ( mbInit == 0 )
{
@@ -396,19 +396,19 @@ void ZCodec::ImplInitBuf ( BOOL nIOFlag )
mbInit = 1;
if ( mbStatus && ( mnCompressMethod & ZCODEC_GZ_LIB ) )
{
- BYTE n1, n2, j, nMethod, nFlags;
+ sal_uInt8 n1, n2, j, nMethod, nFlags;
for ( int i = 0; i < 2; i++ ) // gz - magic number
{
*mpIStm >> j;
if ( j != gz_magic[ i ] )
- mbStatus = FALSE;
+ mbStatus = sal_False;
}
*mpIStm >> nMethod;
*mpIStm >> nFlags;
if ( nMethod != Z_DEFLATED )
- mbStatus = FALSE;
+ mbStatus = sal_False;
if ( ( nFlags & GZ_RESERVED ) != 0 )
- mbStatus = FALSE;
+ mbStatus = sal_False;
/* Discard time, xflags and OS code: */
mpIStm->SeekRel( 6 );
/* skip the extra field */
@@ -439,13 +439,13 @@ void ZCodec::ImplInitBuf ( BOOL nIOFlag )
if ( nFlags & GZ_HEAD_CRC )
mpIStm->SeekRel( 2 );
if ( mbStatus )
- mbStatus = ( inflateInit2( PZSTREAM, -MAX_WBITS) != Z_OK ) ? FALSE : TRUE;
+ mbStatus = ( inflateInit2( PZSTREAM, -MAX_WBITS) != Z_OK ) ? sal_False : sal_True;
}
else
{
mbStatus = ( inflateInit( PZSTREAM ) >= 0 );
}
- mpInBuf = new BYTE[ mnInBufSize ];
+ mpInBuf = new sal_uInt8[ mnInBufSize ];
}
else
{
@@ -455,14 +455,14 @@ void ZCodec::ImplInitBuf ( BOOL nIOFlag )
MAX_WBITS, mnMemUsage, ( mnCompressMethod >> 8 ) & 0xff,
ZLIB_VERSION, sizeof( z_stream ) ) >= 0 );
- PZSTREAM->next_out = mpOutBuf = new BYTE[ PZSTREAM->avail_out = mnOutBufSize ];
+ PZSTREAM->next_out = mpOutBuf = new sal_uInt8[ PZSTREAM->avail_out = mnOutBufSize ];
}
}
}
// ------------------------------------------------------------------------
-ULONG ZCodec::UpdateCRC ( ULONG nLatestCRC, ULONG nNumber )
+sal_uIntPtr ZCodec::UpdateCRC ( sal_uIntPtr nLatestCRC, sal_uIntPtr nNumber )
{
#ifdef OSL_LITENDIAN
@@ -473,14 +473,14 @@ ULONG ZCodec::UpdateCRC ( ULONG nLatestCRC, ULONG nNumber )
// ------------------------------------------------------------------------
-ULONG ZCodec::UpdateCRC ( ULONG nLatestCRC, BYTE* pSource, long nDatSize)
+sal_uIntPtr ZCodec::UpdateCRC ( sal_uIntPtr nLatestCRC, sal_uInt8* pSource, long nDatSize)
{
return rtl_crc32( nLatestCRC, pSource, nDatSize );
}
// ------------------------------------------------------------------------
-void GZCodec::BeginCompression( ULONG nCompressMethod )
+void GZCodec::BeginCompression( sal_uIntPtr nCompressMethod )
{
ZCodec::BeginCompression( nCompressMethod | ZCODEC_GZ_LIB );
};
diff --git a/tools/unx/source/dll/toolsdll.cxx b/tools/unx/source/dll/toolsdll.cxx
index 71b01e20bd4f..c008cbbc001c 100644
--- a/tools/unx/source/dll/toolsdll.cxx
+++ b/tools/unx/source/dll/toolsdll.cxx
@@ -41,7 +41,7 @@ static void* aAppData[SHL_COUNT];
|*
***************************************************************************/
-void** GetAppData( USHORT nSharedLib )
+void** GetAppData( sal_uInt16 nSharedLib )
{
return &(aAppData[nSharedLib]);
}
diff --git a/tools/util/makefile.pmk b/tools/util/makefile.pmk
deleted file mode 100644
index 9d8fc0d3ad24..000000000000
--- a/tools/util/makefile.pmk
+++ /dev/null
@@ -1,31 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-# define TOOLS_DLLIMPLEMENTATION (see @ toolsdllapi.h)
-CDEFS += -DTOOLS_DLLIMPLEMENTATION
-
-VISIBILITY_HIDDEN=TRUE
diff --git a/tools/util/tools.r b/tools/util/tools.r
deleted file mode 100644
index 0d1e8739bd42..000000000000
--- a/tools/util/tools.r
+++ /dev/null
@@ -1,17 +0,0 @@
-#include "CodeFragmentTypes.r"
-
-resource 'cfrg' (0) {
- {
- kPowerPC, /* instruction set architecture */
- kFullLib, /* base-level library */
- kNoVersionNum, /* no implementation version number */
- kNoVersionNum, /* no definition version number */
- kDefaultStackSize, /* use default stack size */
- kNoAppSubFolder, /* no library directory */
- kIsLib, /* fragment is an application */
- kOnDiskFlat, /* fragment is on disk */
- kZeroOffset, /* fragment starts at fork start */
- kWholeFork, /* fragment occupies entire fork */
- "Tools.pef" /* name of the application */
- }
-};