summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/Executable_mkunroll.mk (renamed from tools/source/datetime/makefile.mk)59
-rw-r--r--tools/Executable_rscdep.mk (renamed from tools/inc/makefile.mk)55
-rw-r--r--tools/Executable_so_checksum.mk (renamed from tools/qa/makefile.mk)45
-rw-r--r--tools/Executable_sspretty.mk (renamed from tools/source/communi/makefile.mk)57
-rw-r--r--tools/Library_tl.mk165
-rw-r--r--tools/Makefile (renamed from tools/source/inet/makefile.mk)23
-rw-r--r--tools/Module_tools.mk (renamed from tools/os2/source/dll/makefile.mk)27
-rw-r--r--tools/Package_inc.mk108
-rwxr-xr-xtools/StaticLibrary_ooopathutils.mk54
-rw-r--r--tools/bootstrp/addexes/makefile.mk47
-rw-r--r--tools/bootstrp/addexes/replace.cxx2
-rw-r--r--tools/bootstrp/addexes2/makefile.mk56
-rw-r--r--tools/bootstrp/addexes2/mkfilt.cxx24
-rw-r--r--tools/bootstrp/command.cxx639
-rw-r--r--tools/bootstrp/cppdep.cxx20
-rw-r--r--tools/bootstrp/cppdep.hxx6
-rw-r--r--tools/bootstrp/inimgr.cxx10
-rw-r--r--tools/bootstrp/makefile.mk106
-rw-r--r--tools/bootstrp/mkcreate.cxx98
-rw-r--r--tools/bootstrp/prj.cxx1408
-rw-r--r--tools/bootstrp/rscdep.cxx8
-rw-r--r--tools/bootstrp/sstring.cxx216
-rw-r--r--tools/inc/bootstrp/command.hxx166
-rw-r--r--tools/inc/bootstrp/inimgr.hxx2
-rw-r--r--tools/inc/bootstrp/mkcreate.hxx56
-rw-r--r--tools/inc/bootstrp/prj.hxx364
-rw-r--r--tools/inc/bootstrp/sstring.hxx77
-rw-r--r--tools/inc/impcont.hxx32
-rw-r--r--tools/inc/poly.h39
-rw-r--r--tools/inc/tools/StringListResource.hxx2
-rw-r--r--tools/inc/tools/agapi.hxx69
-rw-r--r--tools/inc/tools/agitem.hxx53
-rw-r--r--tools/inc/tools/bigint.hxx8
-rw-r--r--tools/inc/tools/cachestr.hxx22
-rw-r--r--tools/inc/tools/chapi.hxx71
-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/download.hxx59
-rw-r--r--tools/inc/tools/dynary.hxx32
-rw-r--r--tools/inc/tools/eacopier.hxx49
-rw-r--r--tools/inc/tools/errcode.hxx6
-rw-r--r--tools/inc/tools/errinf.hxx64
-rw-r--r--tools/inc/tools/fldunit.hxx1
-rw-r--r--tools/inc/tools/fontenum.hxx2
-rw-r--r--tools/inc/tools/fsys.hxx129
-rw-r--r--tools/inc/tools/gen.hxx52
-rw-r--r--tools/inc/tools/geninfo.hxx75
-rwxr-xr-x[-rw-r--r--]tools/inc/tools/globname.hxx30
-rwxr-xr-x[-rw-r--r--]tools/inc/tools/inetmime.hxx4
-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/mapunit.hxx1
-rw-r--r--tools/inc/tools/mempool.hxx6
-rw-r--r--tools/inc/tools/multisel.hxx34
-rw-r--r--tools/inc/tools/ownlist.hxx18
-rw-r--r--tools/inc/tools/poly.hxx102
-rw-r--r--tools/inc/tools/postsys.h7
-rw-r--r--tools/inc/tools/presys.h5
-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.h1
-rw-r--r--tools/inc/tools/rc.hxx7
-rw-r--r--tools/inc/tools/ref.hxx78
-rw-r--r--tools/inc/tools/resid.hxx6
-rw-r--r--tools/inc/tools/resmgr.hxx29
-rw-r--r--tools/inc/tools/rtti.hxx26
-rw-r--r--tools/inc/tools/shl.hxx2
-rw-r--r--tools/inc/tools/solar.h147
-rw-r--r--tools/inc/tools/stack.hxx22
-rw-r--r--tools/inc/tools/stream.hxx41
-rwxr-xr-x[-rw-r--r--]tools/inc/tools/string.hxx116
-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/urlkeys.hxx79
-rw-r--r--tools/inc/tools/urlobj.hxx6
-rw-r--r--tools/inc/tools/vcompat.hxx22
-rw-r--r--tools/inc/tools/vector2d.hxx12
-rw-r--r--tools/inc/tools/wintypes.hxx26
-rw-r--r--tools/inc/tools/wldcrd.hxx8
-rw-r--r--tools/inc/tools/zcodec.hxx50
-rw-r--r--tools/prj/build.lst32
-rw-r--r--tools/prj/d.lst120
-rw-r--r--tools/prj/makefile.mk (renamed from tools/util/makefile.pmk)15
-rw-r--r--tools/source/communi/geninfo.cxx44
-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/makefile.mk53
-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.cxx202
-rwxr-xr-x[-rw-r--r--]tools/source/fsys/filecopy.cxx10
-rwxr-xr-x[-rw-r--r--]tools/source/fsys/fstat.cxx65
-rw-r--r--tools/source/fsys/makefile.mk67
-rwxr-xr-x[-rw-r--r--]tools/source/fsys/tdir.cxx84
-rw-r--r--tools/source/fsys/unx.cxx80
-rw-r--r--tools/source/fsys/urlobj.cxx7
-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.cxx8
-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/makefile.mk71
-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/inetmsg.cxx134
-rw-r--r--tools/source/inet/inetstrm.cxx124
-rw-r--r--tools/source/makefile.mk58
-rwxr-xr-x[-rw-r--r--]tools/source/memtools/contnr.cxx116
-rw-r--r--tools/source/memtools/makefile.mk56
-rwxr-xr-x[-rw-r--r--]tools/source/memtools/mempool.cxx2
-rwxr-xr-x[-rw-r--r--]tools/source/memtools/multisel.cxx100
-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/misc/makefile.mk47
-rw-r--r--tools/source/misc/pathutils.cxx1
-rw-r--r--tools/source/rc/makefile.mk53
-rw-r--r--tools/source/rc/rc.cxx18
-rw-r--r--tools/source/rc/resmgr.cxx308
-rw-r--r--tools/source/ref/errinf.cxx84
-rwxr-xr-x[-rw-r--r--]tools/source/ref/globname.cxx70
-rw-r--r--tools/source/ref/makefile.mk53
-rw-r--r--tools/source/ref/pstm.cxx218
-rw-r--r--tools/source/solar/makefile.mk63
-rw-r--r--tools/source/solar/solar.c520
-rw-r--r--tools/source/stream/cachestr.cxx32
-rw-r--r--tools/source/stream/makefile.mk58
-rwxr-xr-x[-rw-r--r--]tools/source/stream/stream.cxx170
-rw-r--r--tools/source/stream/strmos2.cxx92
-rw-r--r--tools/source/stream/strmwnt.cxx86
-rw-r--r--tools/source/stream/vcompat.cxx6
-rw-r--r--tools/source/string/makefile.mk89
-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/makefile.mk45
-rw-r--r--tools/source/testtoolloader/testtoolloader.cxx4
-rw-r--r--tools/source/zcodec/makefile.mk47
-rw-r--r--tools/source/zcodec/zcodec.cxx82
-rw-r--r--tools/test/makefile.mk64
-rw-r--r--tools/unx/source/dll/makefile.mk48
-rw-r--r--tools/unx/source/dll/toolsdll.cxx2
-rw-r--r--tools/util/makefile.mk171
-rw-r--r--tools/util/tools.r17
-rw-r--r--tools/win/inc/dll.hxx4
-rw-r--r--tools/win/inc/parser.hxx51
-rw-r--r--tools/win/inc/shellex.h117
-rw-r--r--tools/win/inc/shutil.h217
-rw-r--r--tools/win/inc/toolsdll.hxx38
-rw-r--r--tools/win/inc/winshell.hxx389
-rw-r--r--tools/win/source/dll/makefile.mk56
-rw-r--r--tools/win/source/dll/toolsdll.cxx1
-rw-r--r--tools/win/source/fastfsys/makefile.mk71
-rw-r--r--tools/workben/makefile.mk89
177 files changed, 3652 insertions, 9451 deletions
diff --git a/tools/source/datetime/makefile.mk b/tools/Executable_mkunroll.mk
index 3d46cc6ce1b0..7dbb613c7865 100644
--- a/tools/source/datetime/makefile.mk
+++ b/tools/Executable_mkunroll.mk
@@ -14,37 +14,46 @@
#
# 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
+# 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
+# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************
-PRJ=..$/..
-
-PRJNAME=tools
-TARGET=datetime
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES= $(SLO)$/tdate.obj \
- $(SLO)$/ttime.obj \
- $(SLO)$/datetime.obj
-
-OBJFILES= $(OBJ)$/tdate.obj \
- $(OBJ)$/ttime.obj \
- $(OBJ)$/datetime.obj
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
+$(eval $(call gb_Executable_Executable,mkunroll))
+
+$(eval $(call gb_Executable_set_include,mkunroll,\
+ $$(INCLUDE) \
+ -I$(SRCDIR)/tools/inc/ \
+ -I$(SRCDIR)/tools/inc/pch \
+ -I$(SRCDIR)/tools/bootstrp/ \
+))
+
+$(eval $(call gb_Executable_set_cxxflags,mkunroll,\
+ $$(CXXFLAGS) \
+ -D_TOOLS_STRINGLIST \
+))
+
+$(eval $(call gb_Executable_add_linked_libs,mkunroll,\
+ basegfx \
+ sal \
+ tl \
+ $(gb_STDLIBS) \
+))
+
+# used to link against basegfxlx comphelp4gcc3 i18nisolang1gcc3 ucbhelper4gcc3 uno_cppu uno_cppuhelpergcc3 uno_salhelpergcc3 - seems to be superficial
+
+$(eval $(call gb_Executable_add_exception_objects,mkunroll,\
+ tools/bootstrp/addexes2/mkfilt \
+ tools/bootstrp/appdef \
+ tools/bootstrp/cppdep \
+ tools/bootstrp/inimgr \
+ tools/bootstrp/prj \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/tools/inc/makefile.mk b/tools/Executable_rscdep.mk
index a3a76dc94a11..9185b94d3a0f 100644
--- a/tools/inc/makefile.mk
+++ b/tools/Executable_rscdep.mk
@@ -14,35 +14,56 @@
#
# 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
+# 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
+# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************
-PRJ=..
-PRJNAME=tools
-TARGET=inc
+$(eval $(call gb_Executable_Executable,rscdep))
-# --- Settings -----------------------------------------------------
+$(eval $(call gb_Executable_set_include,rscdep,\
+ $$(INCLUDE) \
+ -I$(SRCDIR)/tools/inc/ \
+ -I$(SRCDIR)/tools/inc/pch \
+ -I$(SRCDIR)/tools/bootstrp/ \
+))
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
+$(eval $(call gb_Executable_set_cxxflags,rscdep,\
+ $$(CXXFLAGS) \
+ -D_TOOLS_STRINGLIST \
+))
-# --- Files --------------------------------------------------------
-# --- Targets -------------------------------------------------------
+$(eval $(call gb_Executable_add_linked_libs,rscdep,\
+ sal \
+ tl \
+ $(gb_STDLIBS) \
+))
-.INCLUDE : target.mk
+$(eval $(call gb_Executable_add_exception_objects,rscdep,\
+ tools/bootstrp/appdef \
+ tools/bootstrp/cppdep \
+ tools/bootstrp/inimgr \
+ tools/bootstrp/prj \
+ tools/bootstrp/rscdep \
+))
-.IF "$(ENABLE_PCH)"!=""
-ALLTAR : \
- $(SLO)$/precompiled.pch \
- $(SLO)$/precompiled_ex.pch
-
-.ENDIF # "$(ENABLE_PCH)"!=""
+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 \
+))
+endif
+endif
+# vim: set noet sw=4 ts=4:
diff --git a/tools/qa/makefile.mk b/tools/Executable_so_checksum.mk
index e82b39337ac2..32b95bedd6da 100644
--- a/tools/qa/makefile.mk
+++ b/tools/Executable_so_checksum.mk
@@ -14,38 +14,41 @@
#
# 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
+# 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
+# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************
-PRJ = ..
-PRJNAME = tools
-TARGET = qa
-ENABLE_EXCEPTIONS = TRUE
+$(eval $(call gb_Executable_Executable,so_checksum))
-.INCLUDE: settings.mk
+$(eval $(call gb_Executable_set_include,so_checksum,\
+ $$(INCLUDE) \
+ -I$(SRCDIR)/tools/inc/ \
+ -I$(SRCDIR)/tools/inc/pch \
+ -I$(SRCDIR)/tools/bootstrp/ \
+))
-CFLAGSCXX += $(CPPUNIT_CFLAGS)
-DLLPRE = # no leading "lib" on .so files
+$(eval $(call gb_Executable_set_cxxflags,so_checksum,\
+ $$(CXXFLAGS) \
+ -D_TOOLS_STRINGLIST \
+))
-SHL1TARGET=test_tools
-SHL1OBJS=\
- $(SLO)$/pathutils.obj \
- $(SLO)$/test_pathutils.obj \
- $(SLO)$/test_reversemap.obj
-SHL1STDLIBS = $(TOOLSLIB) $(CPPUNITLIB) $(SALLIB)
-SHL1VERSIONMAP = version.map
-SHL1IMPLIB = i$(SHL1TARGET)
-DEF1NAME = $(SHL1TARGET)
+$(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
-SLOFILES = $(SHL1OBJS)
+$(eval $(call gb_Executable_add_exception_objects,so_checksum,\
+ tools/bootstrp/md5 \
+ tools/bootstrp/so_checksum \
+))
-.INCLUDE: target.mk
-.INCLUDE: _cppunit.mk
+# vim: set noet sw=4 ts=4:
diff --git a/tools/source/communi/makefile.mk b/tools/Executable_sspretty.mk
index 1795081a9ec5..e560d7571f5f 100644
--- a/tools/source/communi/makefile.mk
+++ b/tools/Executable_sspretty.mk
@@ -14,37 +14,44 @@
#
# 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
+# 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
+# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************
-PRJ=..$/..
-
-PRJNAME=TOOLS
-TARGET=communi
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-OBJFILES= \
- $(OBJ)$/parser.obj \
- $(OBJ)$/geninfo.obj \
-
-SLOFILES= \
- $(SLO)$/parser.obj \
- $(SLO)$/geninfo.obj \
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
+$(eval $(call gb_Executable_Executable,sspretty))
+
+$(eval $(call gb_Executable_set_include,sspretty,\
+ $$(INCLUDE) \
+ -I$(SRCDIR)/tools/inc/ \
+ -I$(SRCDIR)/tools/inc/pch \
+ -I$(SRCDIR)/tools/bootstrp/ \
+))
+
+$(eval $(call gb_Executable_set_cxxflags,sspretty,\
+ $$(CXXFLAGS) \
+ -D_TOOLS_STRINGLIST \
+))
+
+$(eval $(call gb_Executable_add_linked_libs,sspretty,\
+ sal \
+ tl \
+ $(gb_STDLIBS) \
+))
+# used to link against basegfxlx comphelp4gcc3 i18nisolang1gcc3 ucbhelper4gcc3 uno_cppu uno_cppuhelpergcc3 uno_salhelpergcc3 - seems to be superficial
+
+$(eval $(call gb_Executable_add_exception_objects,sspretty,\
+ tools/bootstrp/appdef \
+ tools/bootstrp/cppdep \
+ tools/bootstrp/inimgr \
+ tools/bootstrp/prj \
+ tools/bootstrp/sspretty \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/tools/Library_tl.mk b/tools/Library_tl.mk
new file mode 100644
index 000000000000..f61f656600fc
--- /dev/null
+++ b/tools/Library_tl.mk
@@ -0,0 +1,165 @@
+#*************************************************************************
+#
+# 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.
+#
+#*************************************************************************
+
+$(eval $(call gb_Library_Library,tl))
+
+$(eval $(call gb_Library_add_package_headers,tl,tools_inc))
+
+$(eval $(call gb_Library_add_precompiled_header,tl,$(SRCDIR)/tools/inc/pch/precompiled_tools))
+
+$(eval $(call gb_Library_set_include,tl,\
+ $$(INCLUDE) \
+ -I$(SRCDIR)/tools/inc \
+ -I$(SRCDIR)/tools/inc/pch \
+ -I$(SRCDIR)/solenv/inc \
+ -I$(SRCDIR)/solenv/inc/Xp31 \
+ -I$(OUTDIR)/inc/offuh \
+))
+
+$(eval $(call gb_Library_set_defs,tl,\
+ $$(DEFS) \
+ -DTOOLS_DLLIMPLEMENTATION \
+ -DVCL \
+))
+
+$(eval $(call gb_Library_add_linked_libs,tl,\
+ basegfx \
+ comphelper \
+ i18nisolang1 \
+ cppu \
+ sal \
+ $(gb_STDLIBS) \
+))
+
+
+$(eval $(call gb_Library_add_exception_objects,tl,\
+ tools/source/communi/geninfo \
+ tools/source/communi/parser \
+ tools/source/datetime/datetime \
+ tools/source/datetime/tdate \
+ tools/source/datetime/ttime \
+ tools/source/debug/debug \
+ tools/source/debug/stcktree \
+ tools/source/fsys/comdep \
+ tools/source/fsys/dirent \
+ tools/source/fsys/filecopy \
+ tools/source/fsys/fstat \
+ tools/source/fsys/tdir \
+ tools/source/fsys/tempfile \
+ tools/source/fsys/urlobj \
+ tools/source/fsys/wldcrd \
+ tools/source/generic/b3dtrans \
+ tools/source/generic/bigint \
+ tools/source/generic/color \
+ tools/source/generic/config \
+ tools/source/generic/fract \
+ tools/source/generic/gen \
+ tools/source/generic/line \
+ tools/source/generic/link \
+ tools/source/generic/poly \
+ tools/source/generic/poly2 \
+ tools/source/generic/svborder \
+ tools/source/generic/toolsin \
+ tools/source/generic/svlibrary \
+ tools/source/inet/inetmime \
+ tools/source/inet/inetmsg \
+ tools/source/inet/inetstrm \
+ tools/source/memtools/contnr \
+ tools/source/memtools/mempool \
+ tools/source/memtools/multisel \
+ tools/source/memtools/table \
+ tools/source/memtools/unqidx \
+ tools/source/misc/appendunixshellword \
+ tools/source/misc/extendapplicationenvironment \
+ tools/source/misc/getprocessworkingdir \
+ tools/source/misc/solarmutex \
+ tools/source/rc/isofallback \
+ tools/source/rc/rc \
+ tools/source/rc/resary \
+ tools/source/rc/resmgr \
+ tools/source/ref/errinf \
+ tools/source/ref/globname \
+ tools/source/ref/pstm \
+ tools/source/ref/ref \
+ tools/source/stream/cachestr \
+ tools/source/stream/stream \
+ tools/source/stream/strmsys \
+ tools/source/stream/vcompat \
+ tools/source/string/debugprint \
+ tools/source/string/tenccvt \
+ tools/source/string/tstring \
+ tools/source/string/tustring \
+ tools/source/testtoolloader/testtoolloader \
+ tools/source/zcodec/zcodec \
+))
+
+ifeq ($(GUI),UNX)
+$(eval $(call gb_Library_add_exception_objects,tl,\
+ tools/unx/source/dll/toolsdll \
+))
+endif
+
+ifeq ($(SYSTEM_ZLIB),YES)
+$(eval $(call gb_Library_set_cxxflags,tl,\
+ $$(CXXFLAGS) \
+ -DSYSTEM_ZLIB \
+))
+$(eval $(call gb_Library_add_linked_libs,tl,\
+ z \
+))
+else
+$(eval $(call gb_Library_add_linked_static_libs,tl,\
+ zlib \
+))
+endif
+
+ifeq ($(OS),WNT)
+
+$(eval $(call gb_Library_set_include,tl,\
+ $$(INCLUDE) \
+ -I$(SRCDIR)/tools/win/inc \
+))
+
+$(eval $(call gb_Library_add_exception_objects,tl,\
+ tools/win/source/dll/toolsdll \
+))
+
+$(eval $(call gb_Library_add_linked_libs,tl,\
+ mpr \
+ ole32 \
+ shell32 \
+ user32 \
+ uuid \
+))
+
+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
+# -DEXCEPTIONS_OFF -fno-exceptions on geninfo parser datetime tdate ttime bigint color config fract gen line link poly2 svborder toolsin inetmime inetmsg inetstrm contnr mempool multisel table unqidx cachestr stream strmsys vcompat tenccvt tstring tustring testtoolloader
+# vim: set noet sw=4 ts=4:
diff --git a/tools/source/inet/makefile.mk b/tools/Makefile
index 1e0bdfdd2391..a79aff831024 100644
--- a/tools/source/inet/makefile.mk
+++ b/tools/Makefile
@@ -25,21 +25,14 @@
#
#*************************************************************************
-PRJ = ..$/..
-PRJNAME = tools
-TARGET = inet
+ifeq ($(strip $(SOLARENV)),)
+$(error No environment set!)
+endif
-.INCLUDE: settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
+gb_PARTIALBUILD := T
+GBUILDDIR := $(SOLARENV)/gbuild
+include $(GBUILDDIR)/gbuild.mk
-SLOFILES=\
- $(SLO)$/inetmime.obj \
- $(SLO)$/inetmsg.obj \
- $(SLO)$/inetstrm.obj
+$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk)))
-OBJFILES=\
- $(OBJ)$/inetmime.obj \
- $(OBJ)$/inetmsg.obj \
- $(OBJ)$/inetstrm.obj
-
-.INCLUDE: target.mk
+# vim: set noet sw=4 ts=4:
diff --git a/tools/os2/source/dll/makefile.mk b/tools/Module_tools.mk
index 97cff795defb..9e233408b317 100644
--- a/tools/os2/source/dll/makefile.mk
+++ b/tools/Module_tools.mk
@@ -25,22 +25,17 @@
#
#*************************************************************************
-PRJ=..$/..$/..
-PRJNAME=TOOLS
-TARGET=dll
+$(eval $(call gb_Module_Module,tools))
-# --- Settings -----------------------------------------------------
+$(eval $(call gb_Module_add_targets,tools,\
+ Executable_mkunroll \
+ Executable_rscdep \
+ Executable_so_checksum \
+ Executable_sspretty \
+ Library_tl \
+ Package_inc \
+ StaticLibrary_ooopathutils \
+))
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-CXXFILES= toolsdll.cxx
-
-SLOFILES= $(SLO)$/toolsdll.obj
-
-OBJFILES= $(OBJ)$/toolsdll.obj
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
+# vim: set noet sw=4 ts=4:
diff --git a/tools/Package_inc.mk b/tools/Package_inc.mk
new file mode 100644
index 000000000000..3ee8689671b1
--- /dev/null
+++ b/tools/Package_inc.mk
@@ -0,0 +1,108 @@
+#*************************************************************************
+#
+# 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.
+#
+#*************************************************************************
+
+$(eval $(call gb_Package_Package,tools_inc,$(SRCDIR)/tools/inc))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/StringListResource.hxx,tools/StringListResource.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/appendunixshellword.hxx,tools/appendunixshellword.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/b3dtrans.hxx,tools/b3dtrans.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/bigint.hxx,tools/bigint.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/cachestr.hxx,tools/cachestr.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/color.hxx,tools/color.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/config.hxx,tools/config.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/contnr.hxx,tools/contnr.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/date.hxx,tools/date.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/datetime.hxx,tools/datetime.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/debug.hxx,tools/debug.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/diagnose_ex.h,tools/diagnose_ex.h))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/dynary.hxx,tools/dynary.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/errcode.hxx,tools/errcode.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/errinf.hxx,tools/errinf.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/extendapplicationenvironment.hxx,tools/extendapplicationenvironment.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/fldunit.hxx,tools/fldunit.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/fontenum.hxx,tools/fontenum.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/fract.hxx,tools/fract.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/fsys.hxx,tools/fsys.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/gen.hxx,tools/gen.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/geninfo.hxx,tools/geninfo.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/getprocessworkingdir.hxx,tools/getprocessworkingdir.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/globname.hxx,tools/globname.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/inetdef.hxx,tools/inetdef.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/inetmime.hxx,tools/inetmime.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/inetmsg.hxx,tools/inetmsg.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/inetstrm.hxx,tools/inetstrm.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/iparser.hxx,tools/iparser.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/isofallback.hxx,tools/isofallback.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/line.hxx,tools/line.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/link.hxx,tools/link.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/list.hxx,tools/list.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/mapunit.hxx,tools/mapunit.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/mempool.hxx,tools/mempool.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/multisel.hxx,tools/multisel.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/ownlist.hxx,tools/ownlist.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/pathutils.hxx,tools/pathutils.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/poly.hxx,tools/poly.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/postsys.h,tools/postsys.h))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/postx.h,tools/postx.h))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/presys.h,tools/presys.h))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/prex.h,tools/prex.h))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/pstm.hxx,tools/pstm.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/queue.hxx,tools/queue.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/rc.h,tools/rc.h))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/rc.hxx,tools/rc.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/rcid.h,tools/rcid.h))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/ref.hxx,tools/ref.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/resary.hxx,tools/resary.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/resid.hxx,tools/resid.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/resmgr.hxx,tools/resmgr.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/rtti.hxx,tools/rtti.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/shl.hxx,tools/shl.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/simplerm.hxx,tools/simplerm.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/solar.h,tools/solar.h))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/solarmutex.hxx,tools/solarmutex.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/stack.hxx,tools/stack.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/stream.hxx,tools/stream.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/string.hxx,tools/string.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/svborder.hxx,tools/svborder.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/svlibrary.hxx,tools/svlibrary.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/svwin.h,tools/svwin.h))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/table.hxx,tools/table.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/tempfile.hxx,tools/tempfile.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/tenccvt.hxx,tools/tenccvt.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/testtoolloader.hxx,tools/testtoolloader.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/time.hxx,tools/time.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/tools.h,tools/tools.h))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/toolsdllapi.h,tools/toolsdllapi.h))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/unqid.hxx,tools/unqid.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/unqidx.hxx,tools/unqidx.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/urlobj.hxx,tools/urlobj.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/vcompat.hxx,tools/vcompat.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/vector2d.hxx,tools/vector2d.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/weakbase.h,tools/weakbase.h))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/weakbase.hxx,tools/weakbase.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/wintypes.hxx,tools/wintypes.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/wldcrd.hxx,tools/wldcrd.hxx))
+$(eval $(call gb_Package_add_file,tools_inc,inc/tools/zcodec.hxx,tools/zcodec.hxx))
diff --git a/tools/StaticLibrary_ooopathutils.mk b/tools/StaticLibrary_ooopathutils.mk
new file mode 100755
index 000000000000..e58becb175d3
--- /dev/null
+++ b/tools/StaticLibrary_ooopathutils.mk
@@ -0,0 +1,54 @@
+#*************************************************************************
+#
+# 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.
+#
+#*************************************************************************
+
+$(eval $(call gb_StaticLibrary_StaticLibrary,ooopathutils))
+
+$(eval $(call gb_StaticLibrary_add_package_headers,ooopathutils,tools_inc))
+
+$(eval $(call gb_StaticLibrary_add_exception_objects,ooopathutils,\
+ tools/source/misc/pathutils \
+))
+
+
+# HACK for now
+# We really should fix the clients of this to link against the static library
+# Instead of this evil linking of an object from $(OUTDIR)
+define StaticLibrary_ooopathutils_hack
+$(call gb_StaticLibrary_get_target,ooopathutils) : $(OUTDIR)/lib/$(1)
+$$(eval $$(call gb_Deliver_add_deliverable,$(OUTDIR)/lib/$(1),$(call gb_CxxObject_get_target,tools/source/misc/pathutils)))
+
+$(OUTDIR)/lib/$(1) : $(call gb_CxxObject_get_target,tools/source/misc/pathutils)
+ $$(call gb_Deliver_deliver,$$<,$$@)
+
+endef
+
+ifeq ($(OS),WNT)
+$(eval $(call StaticLibrary_ooopathutils_hack,pathutils-obj.obj))
+else
+$(eval $(call StaticLibrary_ooopathutils_hack,pathutils-obj.o))
+endif
+# vim: set noet sw=4 ts=4:
diff --git a/tools/bootstrp/addexes/makefile.mk b/tools/bootstrp/addexes/makefile.mk
deleted file mode 100644
index 45ba1470a060..000000000000
--- a/tools/bootstrp/addexes/makefile.mk
+++ /dev/null
@@ -1,47 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=tools
-TARGET=addexes
-TARGETTYPE=CUI
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-APP1TARGET= txtrepl
-APP1OBJS= $(OBJ)$/replace.obj
-APP1STDLIBS=$(TOOLSLIB)
-
-DEPOBJFILES = $(APP1OBJS)
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/tools/bootstrp/addexes/replace.cxx b/tools/bootstrp/addexes/replace.cxx
index 761d260a03b5..07f8be79ab71 100644
--- a/tools/bootstrp/addexes/replace.cxx
+++ b/tools/bootstrp/addexes/replace.cxx
@@ -61,7 +61,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/makefile.mk b/tools/bootstrp/addexes2/makefile.mk
deleted file mode 100644
index 8014fdb8eded..000000000000
--- a/tools/bootstrp/addexes2/makefile.mk
+++ /dev/null
@@ -1,56 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=tools
-TARGET=addexes2
-TARGETTYPE=CUI
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-APP1TARGET= mkunroll
-APP1OBJS= $(OBJ)$/mkfilt.obj
-APP1STDLIBS= $(SALLIB) $(TOOLSLIB)
-.IF "$(OS)"=="LINUX"
-APP1STDLIBS+=-lpthread
-.ENDIF
-.IF "$(OS)"=="NETBSD"
-APP1STDLIBS+=-lpthread
-.ENDIF
-APP1LIBS= $(LB)$/btstrp.lib $(LB)$/bootstrp2.lib
-APP1DEPN= $(LB)$/atools.lib $(LB)$/btstrp.lib $(LB)$/bootstrp2.lib
-
-
-DEPOBJFILES = $(APP1OBJS)
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/tools/bootstrp/addexes2/mkfilt.cxx b/tools/bootstrp/addexes2/mkfilt.cxx
index 56e4a276b819..b454f901de5b 100644
--- a/tools/bootstrp/addexes2/mkfilt.cxx
+++ b/tools/bootstrp/addexes2/mkfilt.cxx
@@ -90,16 +90,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;
}
@@ -165,32 +165,32 @@ void MkFilter::Filter()
MkLine *pMkLine = new MkLine();
ByteString *pStr = new ByteString( aLineBuf );
pMkLine->aLine = *pStr;
- pMkLine->bOut = FALSE;
+ pMkLine->bOut = sal_False;
pLst->push_back( pMkLine );
}
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->push_back( p_MkLine );
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->push_back( pMkLine );
@@ -209,14 +209,14 @@ void MkFilter::Filter()
if ( pLine->bHier )
{
// die List n - Mal abarbeiten
- for ( USHORT n=1; n<11; n++)
+ for ( sal_uInt16 n=1; n<11; n++)
{
size_t nCount = pLine->pPrivateTnrLst->size();
for ( size_t i=0; i<nCount; i++ )
{
MkLine *pMkLine = (*pLine->pPrivateTnrLst)[ 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/command.cxx b/tools/bootstrp/command.cxx
deleted file mode 100644
index 51fd7ea4e98a..000000000000
--- a/tools/bootstrp/command.cxx
+++ /dev/null
@@ -1,639 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_tools.hxx"
-
-#ifdef PRECOMPILED
-#include "first.hxx"
-#endif
-
-#include <tools/fsys.hxx>
-#include <tools/stream.hxx>
-#include "bootstrp/command.hxx"
-#include <tools/debug.hxx>
-#include "bootstrp/appdef.hxx"
-
-#ifdef _MSC_VER
-#pragma warning (push,1)
-#endif
-
-#include <iostream>
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <errno.h>
-
-#ifdef _MSC_VER
-#pragma warning (pop)
-#endif
-
-#if defined(WNT) || defined(OS2)
-#ifdef _MSC_VER
-#pragma warning (push,1)
-#endif
-#include <process.h> // for _SPAWN
-#ifdef _MSC_VER
-#pragma warning (pop)
-#endif
-#endif
-#ifdef UNX
-#include <sys/types.h>
-#include <unistd.h>
-#if ( defined NETBSD ) || defined (FREEBSD) || defined (AIX) \
- || defined (MACOSX) || defined (OPENBSD) \
- || defined(DRAGONFLY)
-#include <sys/wait.h>
-#else
-#include <wait.h>
-#endif
-#define P_WAIT 1 // erstmal einen dummz
-#endif
-
-#if defined WNT
-#include <tools/svwin.h>
-#endif
-
-#if defined(WNT) || defined(OS2)
-#define cPathSeperator ';'
-#endif
-#ifdef UNX
-#define cPathSeperator ':'
-#endif
-
-/*****************************************************************************/
-CommandLine::CommandLine(BOOL bWrite)
-/*****************************************************************************/
- : bTmpWrite(bWrite)
-{
- CommandBuffer = new char [1];
- if (CommandBuffer == NULL) {
- exit(0);
- }
- CommandBuffer[0] = '\0';
- nArgc = 0;
- ppArgv = new char * [1];
- ppArgv[0] = NULL;
-
- ComShell = new char [128];
- char* pTemp = getenv("COMMAND_SHELL");
- if(!pTemp)
- strcpy(ComShell,COMMAND_SHELL);
- else
- strcpy(ComShell,pTemp);
-
- strcpy(&ComShell[strlen(ComShell)]," -C ");
-}
-
-/*****************************************************************************/
-CommandLine::CommandLine(const char *CommandString, BOOL bWrite)
-/*****************************************************************************/
- : bTmpWrite(bWrite)
-{
- CommandBuffer = new char [1];
- if (CommandBuffer == NULL) {
- exit(0);
- }
- nArgc = 0;
- ppArgv = new char * [1];
- ppArgv[0] = NULL;
-
- ComShell = new char [128];
- char* pTemp = getenv("COMMAND_SHELL");
- if(!pTemp)
- strcpy(ComShell,COMMAND_SHELL);
- else
- strcpy(ComShell,pTemp);
-
- strcpy(&ComShell[strlen(ComShell)]," -C ");
-
- BuildCommand(CommandString);
-}
-
-/*****************************************************************************/
-CommandLine::CommandLine(const CommandLine& CCommandLine, BOOL bWrite)
-/*****************************************************************************/
- : bTmpWrite(bWrite)
-{
- CommandBuffer = new char [1];
- if (CommandBuffer == NULL) {
- exit(0);
- }
- nArgc = 0;
- ppArgv = new char * [1];
- ppArgv[0] = NULL;
-
- ComShell = new char [128];
- char* pTemp = getenv("COMMAND_SHELL");
- if(!pTemp)
- strcpy(ComShell,COMMAND_SHELL);
- else
- strcpy(ComShell,pTemp);
-
- strcpy(&ComShell[strlen(ComShell)]," -C ");
-
- BuildCommand(CCommandLine.CommandBuffer);
-}
-
-/*****************************************************************************/
-CommandLine::~CommandLine()
-/*****************************************************************************/
-{
- delete [] CommandBuffer;
- delete [] ComShell;
- for (int i = 0; ppArgv[i] != 0; i++) {
- delete [] ppArgv[i];
- }
- delete [] ppArgv;
-
-}
-
-/*****************************************************************************/
-CommandLine& CommandLine::operator=(const CommandLine& CCommandLine)
-/*****************************************************************************/
-{
- strcpy (CommandBuffer, CCommandLine.CommandBuffer);
- for (int i = 0; i != nArgc; i++) {
- delete [] ppArgv[i];
- }
- delete [] ppArgv;
- ppArgv = new char * [1];
- ppArgv[0] = NULL;
- BuildCommand(CommandBuffer);
- return *this;
-}
-
-/*****************************************************************************/
-CommandLine& CommandLine::operator=(const char *CommandString)
-/*****************************************************************************/
-{
- strcpy (CommandBuffer, CommandString);
- for (int i = 0; i != nArgc; i++) {
- delete [] ppArgv[i];
- }
- delete [] ppArgv;
- ppArgv = new char * [1];
- ppArgv[0] = NULL;
- BuildCommand(CommandBuffer);
-
- return *this;
-}
-
-/*****************************************************************************/
-void CommandLine::Print()
-/*****************************************************************************/
-{
-}
-
-/*****************************************************************************/
-void CommandLine::BuildCommand(const char *CommandString)
-/*****************************************************************************/
-{
- int index = 0, pos=0;
- char buffer[1024];
- char WorkString[1024];
-
- strcpy(WorkString,CommandString);
-
- //falls LogWindow -> in tmpfile schreiben
- if(bTmpWrite)
- {
- strcpy(&WorkString[strlen(WorkString)]," >&");
- strcpy(&WorkString[strlen(WorkString)],getenv("TMP"));
- strcpy(&WorkString[strlen(WorkString)],TMPNAME);
- }
-
- // delete old memory and get some new memory for CommandBuffer
- delete [] CommandBuffer;
- CommandBuffer = new char [strlen(ComShell)+strlen(WorkString)+1];
- if (CommandBuffer == NULL) {
- exit(0);
- }
- strcpy (CommandBuffer, ComShell);
- strcpy (&CommandBuffer[strlen(ComShell)], WorkString);
-
- CommandString = CommandBuffer;
-
- // get the number of tokens
- Strtokens(CommandString);
-
- // delete the space for the old CommandLine
- for (int i = 0; ppArgv[i] != 0; i++) {
- delete [] ppArgv[i];
- }
- delete [] ppArgv;
-
- /* get space for the new command line */
- ppArgv = (char **) new char * [nArgc+1];
- if (ppArgv == NULL) {
- exit(0);
- }
-
- // flush the white space
- while ( isspace(*CommandString) )
- CommandString++;
-
- index = 0;
-
- // start the loop to build all the individual tokens
- while (*CommandString != '\0') {
- pos = 0;
-
- // copy the token until white space is found
- while ( !isspace(*CommandString) && *CommandString != '\0') {
- buffer[pos++] = *CommandString++;
- }
-
- buffer[pos] = '\0';
-
- // get space for the individual tokens
- ppArgv[index] = (char *) new char [strlen(buffer)+1];
- if (ppArgv[index] == NULL) {
- //cout << "Error: nospace" << endl;
- exit(0);
- }
-
- // copy the token
- strcpy (ppArgv[index++], buffer);
-
- // flush while space
- while ( isspace(*CommandString) )
- CommandString++;
- }
-
- // finish by setting the las pointer to NULL
- ppArgv[nArgc]= NULL;
-
-}
-
-/*****************************************************************************/
-void CommandLine::Strtokens(const char *CommandString)
-/*****************************************************************************/
-{
- int count = 0;
- const char *temp;
-
- temp = CommandString;
-
- /* bypass white space */
- while (isspace(*temp)) temp++;
-
- for (count=0; *temp != '\0'; count++) {
- /* continue until white space of string terminator is found */
- while ((!isspace(*temp)) && (*temp != '\0')) temp++;
-
- /* bypass white space */
- while (isspace(*temp)) temp++;
-
- }
- nArgc = count;
-}
-
-/*****************************************************************************/
-CCommand::CCommand( ByteString &rString )
-/*****************************************************************************/
-{
- rString.SearchAndReplace( '\t', ' ' );
- aCommand = rString.GetToken( 0, ' ' );
- aCommandLine = Search( "PATH" );
-#ifndef UNX
- aCommandLine += " /c ";
-#else
- aCommandLine += " -c ";
-#endif
-
- ByteString sCmd( rString.GetToken( 0, ' ' ));
- ByteString sParam( rString.Copy( sCmd.Len()));
-
- aCommandLine += Search( "PATH", sCmd );
- aCommandLine += sParam;
-
- ImplInit();
-}
-
-/*****************************************************************************/
-CCommand::CCommand( const char *pChar )
-/*****************************************************************************/
-{
- ByteString aString = pChar;
- aString.SearchAndReplace( '\t', ' ' );
- aCommand = aString.GetToken( 0, ' ' );
-
- aCommandLine = Search( "PATH" );
-#ifndef UNX
- aCommandLine += " /c ";
-#else
- aCommandLine += " -c ";
-#endif
- ByteString rString( pChar );
-
- ByteString sCmd( rString.GetToken( 0, ' ' ));
- ByteString sParam( rString.Copy( sCmd.Len()));
-
- aCommandLine += Search( "PATH", sCmd );
- aCommandLine += sParam;
-
- ImplInit();
-}
-
-/*****************************************************************************/
-void CCommand::ImplInit()
-/*****************************************************************************/
-{
- char pTmpStr[255];
- size_t *pPtr;
- char *pChar;
- int nVoid = sizeof( size_t * );
- nArgc = aCommandLine.GetTokenCount(' ');
- ULONG nLen = aCommandLine.Len();
-
- ppArgv = (char **) new char[ (ULONG)(nLen + nVoid * (nArgc +2) + nArgc ) ];
- pChar = (char *) ppArgv + ( (1+nArgc) * nVoid );
- pPtr = (size_t *) ppArgv;
- for ( xub_StrLen i=0; i<nArgc; i++ )
- {
- (void) strcpy( pTmpStr, aCommandLine.GetToken(i, ' ' ).GetBuffer() );
- size_t nStrLen = strlen( pTmpStr ) + 1;
- strcpy( pChar, pTmpStr );
- *pPtr = (sal_uIntPtr) pChar;
- pChar += nStrLen;
- pPtr += 1;
-#ifdef UNX
- if ( i == 1 )
- {
- USHORT nWo = aCommandLine.Search("csh -c ");
- if (nWo != STRING_NOTFOUND)
- aCommandLine.Erase(0, nWo + 7);
- else
- aCommandLine.Erase(0, 16);
- i = nArgc;
- strcpy( pChar, aCommandLine.GetBuffer() );
- *pPtr = (sal_uIntPtr) pChar;
- pPtr += 1;
- }
-#endif
- }
- *pPtr = 0;
-}
-
-/*****************************************************************************/
-CCommand::operator int()
-/*****************************************************************************/
-{
- int nRet;
-#if defined WNT
- nRet = _spawnv( P_WAIT, ppArgv[0], (const char **) ppArgv );
-#elif defined OS2
- nRet = _spawnv( P_WAIT, ppArgv[0], ppArgv );
-#elif defined UNX
- pid_t pid;
-
- if (( pid = fork()) < 0 )
- DBG_ASSERT( FALSE, "fork error" );
- else if ( pid == 0 )
- if ( execv( ppArgv[0], (char * const *) ppArgv ) < 0 )
- DBG_ASSERT( FALSE, "execv failed" );
- if ( (nRet = waitpid( pid, NULL, 0 ) < 0) )
- DBG_ASSERT( FALSE, "wait error" );
-#endif
-
- switch ( errno )
- {
- case E2BIG :
- nError = COMMAND_TOOBIG;
- break;
- case EINVAL :
- nError = COMMAND_INVALID;
- break;
- case ENOENT:
- nError = COMMAND_NOTFOUND;
- break;
- case ENOEXEC :
- nError = COMMAND_NOEXEC;
- break;
- case ENOMEM :
- nError = COMMAND_NOMEM;
- break;
- default:
- nError = COMMAND_UNKNOWN;
- }
-
- if ( nRet )
- fprintf( stderr, "Program returned with errros\n");
- return nRet;
-}
-
-/*****************************************************************************/
-ByteString CCommand::Search(ByteString aEnv, ByteString sItem)
-/*****************************************************************************/
-{
- // default wird eine Shell im Path gesucht,
- // wenn aber compsec gestzt ist holen wir uns die
- // Shell von dort
- if ( sItem.Equals( COMMAND_SHELL ))
- {
- ByteString aComspec = GetEnv( "COMSPEC" );
- if ( !aComspec.Equals(""))
- return aComspec;
- }
-
- DirEntry aItem( String( sItem, RTL_TEXTENCODING_ASCII_US ));
- if ( aItem.Exists())
- return sItem;
-
- ByteString aEntry, sReturn;
- ByteString sEnv( aEnv );
- ByteString sEnvironment = GetEnv( sEnv.GetBuffer());
- xub_StrLen nCount = sEnvironment.GetTokenCount( cPathSeperator );
-
- BOOL bFound = FALSE;
-
- for ( xub_StrLen i=0; i<nCount && !bFound; i++ )
- {
- aEntry = sEnvironment.GetToken(i, cPathSeperator );
-#ifndef UNX
- aEntry += '\\';
-#else
- aEntry += '/';
-#endif
- aEntry += sItem;
-
- String sEntry( aEntry, RTL_TEXTENCODING_ASCII_US );
- DirEntry aDirEntry( sEntry );
- aDirEntry.ToAbs();
- if ( aDirEntry.Exists()) {
- sReturn = aEntry;
- bFound = TRUE;
- }
- }
- if ( !bFound )
- {
- sEnv = sEnv.ToUpperAscii();
- ByteString sEnvironment2 = GetEnv(sEnv.GetBuffer() );
- xub_StrLen nCount2 = sEnvironment2.GetTokenCount( cPathSeperator );
- for ( xub_StrLen i=0; i<nCount2 && !bFound; i++ )
- {
- aEntry = sEnvironment2.GetToken(i, cPathSeperator );
-#ifndef UNX
- aEntry += '\\';
-#else
- aEntry += '/';
-#endif
- aEntry += sItem;
-
- String sEntry( aEntry, RTL_TEXTENCODING_ASCII_US );
- DirEntry aDirEntry( sEntry );
- aDirEntry.ToAbs();
- if ( aDirEntry.Exists()) {
- sReturn = aEntry;
- bFound = TRUE;
- }
- }
- }
-
- if ( sReturn.Equals( "" ))
- sReturn = sItem;
-
- return sReturn;
-}
-
-/*****************************************************************************/
-CCommandd::CCommandd( ByteString &rString, CommandBits nBits )
-/*****************************************************************************/
- : CCommand( rString ),
- nFlag( nBits )
-{
-}
-
-
-/*****************************************************************************/
-CCommandd::CCommandd( const char *pChar, CommandBits nBits )
-/*****************************************************************************/
- : CCommand( pChar ),
- nFlag( nBits )
-{
-}
-
-/*****************************************************************************/
-CCommandd::operator int()
-/*****************************************************************************/
-{
- int nRet = 0;
-
-#ifdef WNT
- LPCTSTR lpApplicationName = NULL;
- LPTSTR lpCommandLine = (char *) GetCommandLine_().GetBuffer();
- LPSECURITY_ATTRIBUTES lpProcessAttributes = NULL;
- LPSECURITY_ATTRIBUTES lpThreadAttributes = NULL;
- BOOL bInheritHandles = TRUE;
-
- // wie wuenschen wir denn gestartet zu werden ??
- DWORD dwCreationFlags;
-
- if ( nFlag & COMMAND_EXECUTE_START )
- dwCreationFlags = DETACHED_PROCESS;
- else
- dwCreationFlags = CREATE_NEW_CONSOLE;
-
- // wir erben vom Vaterprozess
- LPVOID lpEnvironment = NULL;
-
- // das exe im Pfad suchen
- LPCTSTR lpCurrentDirectory = NULL;
-
- // in dieser Struktur bekommen wir die erzeugte Processinfo
- // zurueck
- PROCESS_INFORMATION aProcessInformation;
-
- // weiteres Startupinfo anlegen
- STARTUPINFO aStartupInfo;
-
- aStartupInfo.cb = sizeof( STARTUPINFO );
- aStartupInfo.lpReserved = NULL;
- aStartupInfo.lpDesktop = NULL;
-
- // das Fenster bekommt den Namen des Exes
- aStartupInfo.lpTitle = NULL;
- aStartupInfo.dwX = 100;
- aStartupInfo.dwY = 100;
- aStartupInfo.dwXCountChars = 40;
- aStartupInfo.dwYCountChars = 40;
-
- // Farben setzen
- aStartupInfo.dwFillAttribute = FOREGROUND_RED | BACKGROUND_RED |
- BACKGROUND_BLUE | BACKGROUND_GREEN;
-
- aStartupInfo.wShowWindow = SW_SHOWNOACTIVATE;
- aStartupInfo.cbReserved2 = NULL;
- aStartupInfo.lpReserved2 = NULL;
-
- if ( nFlag & COMMAND_EXECUTE_HIDDEN )
- {
- aStartupInfo.wShowWindow = SW_HIDE;
- aStartupInfo.dwFlags = aStartupInfo.dwFlags | STARTF_USESHOWWINDOW;
- }
-
- bool bProcess = CreateProcess( lpApplicationName,
- lpCommandLine, lpProcessAttributes,
- lpThreadAttributes, bInheritHandles,
- dwCreationFlags, lpEnvironment, lpCurrentDirectory,
- &aStartupInfo, &aProcessInformation );
-
- LPVOID lpMsgBuf;
-
- if ( bProcess )
- {
- FormatMessage(
- FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
- NULL,
- GetLastError(),
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
- (LPTSTR) &lpMsgBuf,
- 0,
- NULL );
-
- ByteString aErrorString = (char *) lpMsgBuf;
-
- if ( nFlag & COMMAND_EXECUTE_WAIT )
- {
- DWORD aProcessState = STILL_ACTIVE;
- while(aProcessState == STILL_ACTIVE)
- {
- GetExitCodeProcess(aProcessInformation.hProcess,&aProcessState);
- }
- }
- }
- else
- fprintf( stderr, "Can not start Process !" );
-
-#endif
- return nRet;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/bootstrp/cppdep.cxx b/tools/bootstrp/cppdep.cxx
index 7ad18a494531..ad5bb80eaffc 100644
--- a/tools/bootstrp/cppdep.cxx
+++ b/tools/bootstrp/cppdep.cxx
@@ -81,26 +81,26 @@ void CppDep::Execute()
}
}
-BOOL CppDep::AddSearchPath( const char* aPath )
+sal_Bool CppDep::AddSearchPath( const char* aPath )
{
ByteString *pStr = new ByteString( aPath );
pSearchPath->push_back( pStr );
- return FALSE;
+ return sal_False;
}
-BOOL CppDep::AddSource( const char* aSource )
+sal_Bool CppDep::AddSource( const char* aSource )
{
ByteString *pStr = new ByteString( aSource );
pSources->push_back( pStr );
- 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;
@@ -110,7 +110,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
@@ -125,13 +125,13 @@ BOOL CppDep::Search( ByteString aFileName )
if ( aResult !="")
if ( (aNewFile = Exists( aResult )) != "" )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
size_t nCount = pFileList->size();
for ( size_t i = 0; i < nCount; i++ )
{
ByteString *pStr = (*pFileList)[ i ];
if ( *pStr == aNewFile )
- bFound = TRUE;
+ bFound = sal_True;
}
#ifdef DEBUG_VERBOSE
fprintf( stderr, "not in list : %d %s\n", nPos, aReadLine.GetBuffer() );
@@ -227,7 +227,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 d180bd8b115a..d1e4397f0476 100644
--- a/tools/bootstrp/cppdep.hxx
+++ b/tools/bootstrp/cppdep.hxx
@@ -42,7 +42,7 @@ protected:
ByteStringList *pFileList;
ByteStringList *pSources;
- BOOL Search( ByteString aFileName );
+ sal_Bool Search( ByteString aFileName );
ByteString Exists( ByteString aFileName );
ByteString IsIncludeStatement( ByteString aLine );
@@ -53,8 +53,8 @@ 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 );
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/bootstrp/inimgr.cxx b/tools/bootstrp/inimgr.cxx
index ebebcd692e9b..3d9d818e1a38 100644
--- a/tools/bootstrp/inimgr.cxx
+++ b/tools/bootstrp/inimgr.cxx
@@ -43,7 +43,7 @@
/****************************************************************************/
IniManager::IniManager( ByteString &rDir, ByteString &rLocalDir )
/****************************************************************************/
- : bUpdate( TRUE )
+ : bUpdate( sal_True )
{
sLocalPath = ByteString( getenv( "LOCALINI" ));
if ( !sLocalPath.Len())
@@ -60,7 +60,7 @@ IniManager::IniManager( ByteString &rDir, ByteString &rLocalDir )
/****************************************************************************/
IniManager::IniManager( ByteString &rDir )
/****************************************************************************/
- : bUpdate( TRUE )
+ : bUpdate( sal_True )
{
sLocalPath = GetLocalIni();
sGlobalDir = rDir;
@@ -74,7 +74,7 @@ IniManager::IniManager( ByteString &rDir )
/****************************************************************************/
IniManager::IniManager()
/****************************************************************************/
- : bUpdate( TRUE )
+ : bUpdate( sal_True )
{
sLocalPath = GetLocalIni();
@@ -170,7 +170,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 != ".." ))
@@ -206,7 +206,7 @@ void IniManager::Update()
if ( bUpdate )
{
ForceUpdate();
- bUpdate = FALSE;
+ bUpdate = sal_False;
}
}
diff --git a/tools/bootstrp/makefile.mk b/tools/bootstrp/makefile.mk
deleted file mode 100644
index b4508e1aa21f..000000000000
--- a/tools/bootstrp/makefile.mk
+++ /dev/null
@@ -1,106 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..
-
-PRJNAME=tools
-TARGET=btstrp
-TARGET1=bootstrp2
-TARGETTYPE=CUI
-LIBTARGET=NO
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-.IF "$(HAVE_GETOPT)" == "YES"
-CDEFS += -DHAVE_GETOPT
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-OBJFILES= \
- $(OBJ)$/appdef.obj \
- $(OBJ)$/command.obj \
- $(OBJ)$/cppdep.obj\
- $(OBJ)$/inimgr.obj\
- $(OBJ)$/mkcreate.obj \
- $(OBJ)$/sstring.obj \
- $(OBJ)$/prj.obj
-
-SLOFILES= \
- $(SLO)$/appdef.obj \
- $(SLO)$/command.obj \
- $(SLO)$/cppdep.obj \
- $(SLO)$/inimgr.obj \
- $(SLO)$/mkcreate.obj \
- $(SLO)$/sstring.obj \
- $(SLO)$/prj.obj
-
-
-LIB1TARGET= $(LB)$/$(TARGET).lib
-LIB1ARCHIV= $(LB)$/lib$(TARGET).a
-LIB1OBJFILES=\
- $(OBJ)$/appdef.obj \
- $(OBJ)$/command.obj \
- $(OBJ)$/cppdep.obj \
- $(OBJ)$/inimgr.obj \
- $(OBJ)$/mkcreate.obj \
- $(OBJ)$/sstring.obj
-
-LIB2TARGET= $(LB)$/$(TARGET1).lib
-LIB2ARCHIV= $(LB)$/lib$(TARGET1).a
-LIB2OBJFILES=\
- $(OBJ)$/prj.obj
-
-APP1TARGET= sspretty
-APP1OBJS= $(OBJ)$/sspretty.obj
-APP1LIBS= $(LB)$/$(TARGET).lib $(LB)$/$(TARGET1).lib
-APP1STDLIBS=$(SALLIB) $(TOOLSLIB) $(BASEGFXLIB) $(UCBHELPERLIB) $(CPPULIB) $(COMPHELPERLIB) $(CPPUHELPERLIB) $(SALHELPERLIB) $(I18NISOLANGLIB)
-
-APP2TARGET= rscdep
-APP2OBJS= $(OBJ)$/rscdep.obj
-APP2LIBS= $(LB)$/$(TARGET).lib $(LB)$/$(TARGET1).lib
-APP2STDLIBS= $(SALLIB) $(TOOLSLIB) $(BASEGFXLIB) $(UCBHELPERLIB) $(CPPULIB) $(COMPHELPERLIB) $(I18NISOLANGLIB) $(CPPUHELPERLIB) $(SALHELPERLIB)
-.IF "$(HAVE_GETOPT)" != "YES"
-.IF "$(OS)"=="WNT"
-APP2STDLIBS+=gnu_getopt.lib
-.ENDIF
-.ENDIF
-APP2RPATH= NONE
-APP2RPATH= NONE
-APP2RPATH= NONE
-
-APP3TARGET= so_checksum
-APP3OBJS= $(OBJ)$/md5.obj \
- $(OBJ)$/so_checksum.obj
-APP3STDLIBS= $(TOOLSLIB) $(SALLIB) $(BASEGFXLIB) $(UCBHELPERLIB) $(CPPULIB) $(COMPHELPERLIB) $(I18NISOLANGLIB) $(CPPUHELPERLIB) $(SALHELPERLIB)
-
-DEPOBJFILES = $(APP1OBJS) $(APP2OBJS) $(APP3OBJS)
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/tools/bootstrp/mkcreate.cxx b/tools/bootstrp/mkcreate.cxx
index 2c02bd894d3c..f151464772a1 100644
--- a/tools/bootstrp/mkcreate.cxx
+++ b/tools/bootstrp/mkcreate.cxx
@@ -60,7 +60,7 @@ char const *LimitedPath[] = {
/*****************************************************************************/
SourceDirectory::SourceDirectory( const ByteString &rDirectoryName,
- USHORT nOperatingSystem, SourceDirectory *pParentDirectory )
+ sal_uInt16 nOperatingSystem, SourceDirectory *pParentDirectory )
/*****************************************************************************/
: ByteString( rDirectoryName ),
pParent( pParentDirectory ),
@@ -88,7 +88,7 @@ SourceDirectory::~SourceDirectory()
/*****************************************************************************/
CodedDependency *SourceDirectory::AddCodedDependency(
- const ByteString &rCodedIdentifier, USHORT nOperatingSystems )
+ const ByteString &rCodedIdentifier, sal_uInt16 nOperatingSystems )
/*****************************************************************************/
{
CodedDependency *pReturn = NULL;
@@ -115,7 +115,7 @@ CodedDependency *SourceDirectory::AddCodedDependency(
/*****************************************************************************/
CodedDependency *SourceDirectory::AddCodedIdentifier(
- const ByteString &rCodedIdentifier, USHORT nOperatingSystems )
+ const ByteString &rCodedIdentifier, sal_uInt16 nOperatingSystems )
/*****************************************************************************/
{
CodedDependency *pReturn = NULL;
@@ -169,22 +169,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;
}
@@ -220,7 +220,7 @@ SourceDirectory *SourceDirectory::GetSubDirectory(
/*****************************************************************************/
SourceDirectory *SourceDirectory::GetDirectory(
- const ByteString &rDirectoryName, USHORT nOperatingSystem )
+ const ByteString &rDirectoryName, sal_uInt16 nOperatingSystem )
/*****************************************************************************/
{
ByteString sDirectoryName( rDirectoryName );
@@ -246,7 +246,7 @@ SourceDirectory *SourceDirectory::GetDirectory(
/*****************************************************************************/
SourceDirectory *SourceDirectory::Insert( const ByteString &rDirectoryName,
- USHORT nOperatingSystem )
+ sal_uInt16 nOperatingSystem )
/*****************************************************************************/
{
SourceDirectory *pSubDirectory = NULL;
@@ -271,7 +271,7 @@ Dependency *SourceDirectory::ResolvesDependency(
size_t nPos = pCodedIdentifier->IsString( pCodedDependency );
if ( nPos != NOT_THERE ) {
CodedDependency *pIdentifier = ( CodedDependency* )(*pCodedIdentifier)[ nPos ];
- USHORT nResult =
+ sal_uInt16 nResult =
pIdentifier->GetOperatingSystem() &
pCodedDependency->GetOperatingSystem();
Dependency *pReturn = new Dependency( *this, nResult );
@@ -352,10 +352,10 @@ ByteString SourceDirectory::GetTarget()
return sReturn;
}
- BOOL bDependsOnPlatform = FALSE;
+ sal_Bool bDependsOnPlatform = sal_False;
for ( size_t i = 0; i < pDependencies->size(); i++ ) {
if ( ((Dependency*)(*pDependencies)[ i ])->GetOperatingSystem() != OS_ALL ) {
- bDependsOnPlatform = TRUE;
+ bDependsOnPlatform = sal_True;
break;
}
}
@@ -376,17 +376,17 @@ 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 ( size_t i = 0; i < pDependencies->size(); i++ ) {
Dependency *pDependency = (Dependency*)(*pDependencies)[ i ];
@@ -396,17 +396,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;
}
}
@@ -434,10 +434,10 @@ ByteString SourceDirectory::GetSubDirsTarget()
ByteString sReturn;
if ( pSubDirectories ) {
- BOOL bDependsOnPlatform = FALSE;
+ sal_Bool bDependsOnPlatform = sal_False;
for ( size_t i = 0; i < pSubDirectories->size(); i++ ) {
if ( ((SourceDirectory*)(*pSubDirectories)[ i ])->GetOperatingSystems() != OS_ALL ) {
- bDependsOnPlatform = TRUE;
+ bDependsOnPlatform = sal_True;
}
}
@@ -455,15 +455,15 @@ 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 ( size_t i = 0; i < pSubDirectories->size(); i++ ) {
SourceDirectory *pDirectory = (SourceDirectory*)(*pSubDirectories)[ i ];
@@ -473,17 +473,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 ) {
@@ -504,10 +504,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" )
@@ -521,7 +521,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;
@@ -534,15 +534,15 @@ SourceDirectory *SourceDirectory::CreateRootDirectory(
GenericInformationList *pVerList = aParser.Execute( s );
ByteString sVersion( rVersion );
- Star aStar( pVerList, sVersion, TRUE, rRoot.GetBuffer());
+ Star aStar( pVerList, sVersion, sal_True, rRoot.GetBuffer());
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());
@@ -552,14 +552,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 ( size_t x = 0; x < pPrjDependencies->size(); x++ )
pProject->AddCodedDependency( *(*pPrjDependencies)[ 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 );
@@ -590,11 +590,11 @@ SourceDirectory *SourceDirectory::CreateRootDirectory(
}
/*****************************************************************************/
-BOOL SourceDirectory::RemoveDirectoryTreeAndAllDependencies()
+sal_Bool SourceDirectory::RemoveDirectoryTreeAndAllDependencies()
/*****************************************************************************/
{
if ( !pParent )
- return FALSE;
+ return sal_False;
SourceDirectoryList *pParentContent = pParent->pSubDirectories;
size_t i = 0;
@@ -613,15 +613,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());
@@ -629,7 +629,7 @@ BOOL SourceDirectory::CreateRecursiveMakefile( BOOL bAllChilds )
DirEntry aEntry( aTmpStr );
if ( !aEntry.Exists()) {
fprintf( stdout, " ... no directory!\n" );
- return FALSE;
+ return sal_False;
}
size_t j = 0;
@@ -653,20 +653,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(
@@ -869,11 +869,11 @@ BOOL SourceDirectory::CreateRecursiveMakefile( BOOL bAllChilds )
fprintf( stdout, "\n" );
- BOOL bSuccess = TRUE;
+ sal_Bool bSuccess = sal_True;
if ( bAllChilds ) {
for ( size_t k = 0; k < pSubDirectories->size(); k++ ) {
if ( !((SourceDirectory*)(*pSubDirectories)[ k ])->CreateRecursiveMakefile( TRUE ) ) {
- bSuccess = FALSE;
+ bSuccess = sal_False;
break;
}
}
diff --git a/tools/bootstrp/prj.cxx b/tools/bootstrp/prj.cxx
index dabd11a9b243..c519d337464c 100644
--- a/tools/bootstrp/prj.cxx
+++ b/tools/bootstrp/prj.cxx
@@ -30,7 +30,7 @@
#include "precompiled_tools.hxx"
#include <stdlib.h>
#include <stdio.h>
-#include "bootstrp/sstring.hxx"
+//#include "bootstrp/sstring.hxx"
#include <osl/mutex.hxx>
#include <tools/stream.hxx>
@@ -38,6 +38,8 @@
#include "bootstrp/prj.hxx"
#include "bootstrp/inimgr.hxx"
+DECLARE_LIST( UniStringList, UniString* )
+
#if defined(WNT) || defined(OS2)
#define LIST_DELIMETER ';'
#define PATH_DELIMETER '\\'
@@ -46,7 +48,7 @@
#define PATH_DELIMETER '/'
#endif
-Link Star::aDBNotFoundHdl;
+//Link Star::aDBNotFoundHdl;
//
// class SimpleConfig
@@ -110,9 +112,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 );
@@ -121,7 +123,7 @@ ByteString SimpleConfig::GetNextLine()
}
/*****************************************************************************/
-ByteString SimpleConfig::GetCleanedNextLine( BOOL bReadComments )
+ByteString SimpleConfig::GetCleanedNextLine( sal_Bool bReadComments )
/*****************************************************************************/
{
@@ -141,8 +143,8 @@ ByteString SimpleConfig::GetCleanedNextLine( BOOL bReadComments )
aTmpStr = aTmpStr.EraseTrailingChars();
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 );
@@ -150,14 +152,14 @@ 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(' ');
@@ -165,1391 +167,3 @@ ByteString SimpleConfig::GetCleanedNextLine( BOOL bReadComments )
}
-
-//
-// class CommandData
-//
-
-/*****************************************************************************/
-CommandData::CommandData()
-/*****************************************************************************/
-{
- nOSType = 0;
- nCommand = 0;
- pDepList = 0;
-}
-
-/*****************************************************************************/
-CommandData::~CommandData()
-/*****************************************************************************/
-{
- if ( pDepList )
- {
- for ( size_t i = 0, n = pDepList->size(); i < n; ++i ) {
- delete (*pDepList)[ i ];
- }
- delete pDepList;
-
- pDepList = NULL;
- }
-}
-
-/*****************************************************************************/
-ByteString CommandData::GetOSTypeString()
-/*****************************************************************************/
-{
- ByteString aRetStr;
-
- switch (nOSType)
- {
- case OS_WIN16 | OS_WIN32 | OS_OS2 | OS_UNX :
- aRetStr = "all";
- break;
- case OS_WIN32 | OS_WIN16 :
- aRetStr = "w";
- break;
- case OS_OS2 :
- aRetStr = "p";
- break;
- case OS_UNX :
- aRetStr = "u";
- break;
- case OS_WIN16 :
- aRetStr = "d";
- break;
- case OS_WIN32 :
- aRetStr = "n";
- break;
- default :
- aRetStr = "none";
- }
-
- return aRetStr;
-}
-
-/*****************************************************************************/
-ByteString CommandData::GetCommandTypeString()
-/*****************************************************************************/
-{
- ByteString aRetStr;
-
- switch (nCommand)
- {
- case COMMAND_NMAKE :
- aRetStr = "nmake";
- break;
- case COMMAND_GET :
- aRetStr = "get";
- break;
- default :
- aRetStr = "usr";
- aRetStr += ByteString::CreateFromInt64( nCommand + 1 - COMMAND_USER_START );
-
- }
-
- return aRetStr;
-}
-
-/*****************************************************************************/
-CommandData* Prj::GetDirectoryList ( USHORT, USHORT )
-/*****************************************************************************/
-{
- return (CommandData *)NULL;
-}
-
-/*****************************************************************************/
-CommandData* Prj::GetDirectoryData( ByteString aLogFileName )
-/*****************************************************************************/
-{
- CommandData *pData = NULL;
- ULONG nObjCount = Count();
- for ( ULONG i=0; i<nObjCount; i++ )
- {
- pData = GetObject(i);
- if ( pData->GetLogFile() == aLogFileName )
- return pData;
- }
- return NULL;
-}
-
-//
-// class Prj
-//
-
-/*****************************************************************************/
-Prj::Prj() :
- bVisited( FALSE ),
- pPrjInitialDepList(0),
- pPrjDepList(0),
- bHardDependencies( FALSE ),
- bSorted( FALSE )
-/*****************************************************************************/
-{
-}
-
-/*****************************************************************************/
-Prj::Prj( ByteString aName ) :
- bVisited( FALSE ),
- aProjectName( aName ),
- pPrjInitialDepList(0),
- pPrjDepList(0),
- bHardDependencies( FALSE ),
- bSorted( FALSE )
-/*****************************************************************************/
-{
-}
-
-/*****************************************************************************/
-Prj::~Prj()
-/*****************************************************************************/
-{
- if ( pPrjDepList )
- {
- for ( size_t i = 0, n = maList.size(); i < n; ++i )
- delete maList[ i ];
- maList.clear();
-
- for ( size_t i = 0, n = pPrjDepList->size(); i < n; ++i )
- delete (*pPrjDepList)[ i ];
- delete pPrjDepList;
- pPrjDepList = NULL;
- }
-
- if ( pPrjInitialDepList )
- {
- for ( size_t i = 0, n = pPrjInitialDepList->size(); i < n; ++i )
- delete (*pPrjInitialDepList)[ i ];
- delete pPrjInitialDepList;
- pPrjInitialDepList = NULL;
- }
-}
-
-/*****************************************************************************/
-void Prj::AddDependencies( ByteString aStr )
-/*****************************************************************************/
-{
-
- // needs dirty flag - not expanded
- if ( !pPrjDepList )
- pPrjDepList = new SByteStringList;
-
- pPrjDepList->PutString( new ByteString(aStr) );
-
- if ( !pPrjInitialDepList )
- pPrjInitialDepList = new SByteStringList;
-
- pPrjInitialDepList->PutString( new ByteString(aStr) );
-}
-
-/*****************************************************************************/
-SByteStringList* Prj::GetDependencies( BOOL bExpanded )
-/*****************************************************************************/
-{
- if ( bExpanded )
- return pPrjDepList;
- else
- return pPrjInitialDepList;
-}
-
-
-
-/*****************************************************************************/
-BOOL Prj::InsertDirectory ( ByteString aDirName, USHORT aWhat,
- USHORT aWhatOS, ByteString aLogFileName,
- const ByteString &rClientRestriction )
-/*****************************************************************************/
-{
- CommandData* pData = new CommandData();
-
- pData->SetPath( aDirName );
- pData->SetCommandType( aWhat );
- pData->SetOSType( aWhatOS );
- pData->SetLogFile( aLogFileName );
- pData->SetClientRestriction( rClientRestriction );
-
- maList.push_back( pData );
-
- return FALSE;
-}
-
-/*****************************************************************************/
-//
-// removes directory and existing dependencies on it
-//
-CommandData* Prj::RemoveDirectory ( ByteString aLogFileName )
-/*****************************************************************************/
-{
- size_t nCountMember = maList.size();
- CommandData* pData;
- CommandData* pDataFound = NULL;
- SByteStringList* pDataDeps;
-
- for ( size_t i = 0; i < nCountMember; i++ )
- {
- pData = maList[ i ];
- if ( pData->GetLogFile() == aLogFileName )
- pDataFound = pData;
- else
- {
- pDataDeps = pData->GetDependencies();
- if ( pDataDeps )
- {
- ByteString* pString;
- size_t nDataDepsCount = pDataDeps->size();
- for ( size_t j = nDataDepsCount; j > 0; )
- {
- pString = (*pDataDeps)[ --j ];
- if ( pString->GetToken( 0, '.') == aLogFileName )
- pDataDeps->erase( j );
- }
- }
- }
- }
-
- Remove( pDataFound );
-
- return pDataFound;
-}
-
-//
-// class Star
-//
-
-/*****************************************************************************/
-Star::Star()
-/*****************************************************************************/
-{
- // this ctor is only used by StarWriter
-}
-
-/*****************************************************************************/
-Star::Star(String aFileName, USHORT nMode )
-/*****************************************************************************/
- : nStarMode( nMode )
-{
- Read( aFileName );
-}
-
-/*****************************************************************************/
-Star::Star( SolarFileList *pSolarFiles )
-/*****************************************************************************/
- : nStarMode( STAR_MODE_MULTIPLE_PARSE )
-{
- // this ctor is used by StarBuilder to get the information for the whole workspace
- Read( pSolarFiles );
-}
-
-/*****************************************************************************/
-Star::Star( GenericInformationList *pStandLst, ByteString &rVersion,
- BOOL bLocal, const char *pSourceRoot )
-/*****************************************************************************/
-{
- ByteString sPath( rVersion );
- String sSrcRoot;
- if ( pSourceRoot )
- sSrcRoot = String::CreateFromAscii( pSourceRoot );
-
-#ifdef UNX
- sPath += "/settings/UNXSOLARLIST";
-#else
- sPath += "/settings/SOLARLIST";
-#endif
- GenericInformation *pInfo = pStandLst->GetInfo( sPath, TRUE );
-
- if( pInfo && pInfo->GetValue().Len()) {
- ByteString sFile( pInfo->GetValue());
- if ( bLocal ) {
- IniManager aIniManager;
- aIniManager.ToLocal( sFile );
- }
- String sFileName( sFile, RTL_TEXTENCODING_ASCII_US );
- nStarMode = STAR_MODE_SINGLE_PARSE;
- Read( sFileName );
- }
- else {
- SolarFileList *pFileList = new SolarFileList();
-
- sPath = rVersion;
- sPath += "/drives";
-
- GenericInformation *pInfo2 = pStandLst->GetInfo( sPath, TRUE );
- if ( pInfo2 && pInfo2->GetSubList()) {
- GenericInformationList *pDrives = pInfo2->GetSubList();
- for ( size_t i = 0; i < pDrives->size(); i++ ) {
- GenericInformation *pDrive = (*pDrives)[ i ];
- if ( pDrive ) {
- DirEntry aEntry;
- BOOL bOk = FALSE;
- if ( sSrcRoot.Len()) {
- aEntry = DirEntry( sSrcRoot );
- bOk = TRUE;
- }
- else {
-#ifdef UNX
- sPath = "UnixVolume";
- GenericInformation *pUnixVolume = pDrive->GetSubInfo( sPath );
- if ( pUnixVolume ) {
- String sRoot( pUnixVolume->GetValue(), RTL_TEXTENCODING_ASCII_US );
- aEntry = DirEntry( sRoot );
- bOk = TRUE;
- }
-#else
- bOk = TRUE;
- String sRoot( *pDrive, RTL_TEXTENCODING_ASCII_US );
- sRoot += String::CreateFromAscii( "\\" );
- aEntry = DirEntry( sRoot );
-#endif
- }
- if ( bOk ) {
- sPath = "projects";
- GenericInformation *pProjectsKey = pDrive->GetSubInfo( sPath, TRUE );
- if ( pProjectsKey ) {
- if ( !sSrcRoot.Len()) {
- sPath = rVersion;
- sPath += "/settings/PATH";
- GenericInformation *pPath = pStandLst->GetInfo( sPath, TRUE );
- if( pPath ) {
- ByteString sAddPath( pPath->GetValue());
-#ifdef UNX
- sAddPath.SearchAndReplaceAll( "\\", "/" );
-#else
- sAddPath.SearchAndReplaceAll( "/", "\\" );
-#endif
- String ssAddPath( sAddPath, RTL_TEXTENCODING_ASCII_US );
- aEntry += DirEntry( ssAddPath );
- }
- }
- GenericInformationList *pProjects = pProjectsKey->GetSubList();
- if ( pProjects ) {
- String sPrjDir( String::CreateFromAscii( "prj" ));
- String sSolarFile( String::CreateFromAscii( "build.lst" ));
-
- for ( size_t j = 0; j < pProjects->size(); j++ ) {
- ByteString sProject( *(*pProjects)[ j ] );
- String ssProject( sProject, RTL_TEXTENCODING_ASCII_US );
-
- DirEntry aPrjEntry( aEntry );
-
- aPrjEntry += DirEntry( ssProject );
- aPrjEntry += DirEntry( sPrjDir );
- aPrjEntry += DirEntry( sSolarFile );
-
- pFileList->push_back( new String( aPrjEntry.GetFull()) );
-
- ByteString sFile( aPrjEntry.GetFull(), RTL_TEXTENCODING_ASCII_US );
- }
- }
- }
- }
- }
- }
- }
- Read( pFileList );
- }
-}
-
-/*****************************************************************************/
-Star::~Star()
-/*****************************************************************************/
-{
- for ( size_t i = 0, n = maStarList.size(); i < n; ++i )
- delete maStarList[ i ];
- maStarList.clear();
-}
-
-/*****************************************************************************/
-void Star::Read( String &rFileName )
-/*****************************************************************************/
-{
- ByteString aString;
- aFileList.push_back( new String( rFileName ));
-
- DirEntry aEntry( rFileName );
- aEntry.ToAbs();
- aEntry = aEntry.GetPath().GetPath().GetPath();
- sSourceRoot = aEntry.GetFull();
-
- while ( !aFileList.empty() )
- {
- StarFile *pFile = new StarFile( *aFileList.front() );
- if ( pFile->Exists())
- {
- SimpleConfig aSolarConfig( *aFileList.front() );
- while (( aString = aSolarConfig.GetNext()) != "" )
- InsertToken (( char * ) aString.GetBuffer());
- }
- delete pFile;
- delete aFileList.front();
- aFileList.erase( aFileList.begin() );
- }
- // resolve all dependencies recursive
- Expand_Impl();
-}
-
-/*****************************************************************************/
-void Star::Read( SolarFileList *pSolarFiles )
-/*****************************************************************************/
-{
- while ( !pSolarFiles->empty() )
- {
- ByteString aString;
-
- StarFile *pFile = new StarFile( *pSolarFiles->front() );
- if ( pFile->Exists())
- {
- SimpleConfig aSolarConfig( *pSolarFiles->front() );
- while (( aString = aSolarConfig.GetNext()) != "" )
- InsertToken (( char * ) aString.GetBuffer());
- }
- delete pFile;
- delete pSolarFiles->front();
- aFileList.erase( aFileList.begin() );
- }
- delete pSolarFiles;
-
- Expand_Impl();
-}
-
-/*****************************************************************************/
-String Star::CreateFileName( String sProject )
-/*****************************************************************************/
-{
- // this method is used to find solarlist parts of nabours (other projects)
- String sPrjDir( String::CreateFromAscii( "prj" ));
- String sSolarFile( String::CreateFromAscii( "build.lst" ));
-
- DirEntry aEntry( sSourceRoot );
- aEntry += DirEntry( sProject );
- aEntry += DirEntry( sPrjDir );
- aEntry += DirEntry( sSolarFile );
-
- if ( !aEntry.Exists() && aDBNotFoundHdl.IsSet())
- aDBNotFoundHdl.Call( &sProject );
-
- return aEntry.GetFull();
-}
-
-/*****************************************************************************/
-void Star::InsertSolarList( String sProject )
-/*****************************************************************************/
-{
- // inserts a new solarlist part of another project
- String sFileName( CreateFileName( sProject ));
-
- for ( SolarFileList::iterator it = aFileList.begin(); it != aFileList.end(); ++it )
- if ( *(*it) == sFileName )
- return;
-
- ByteString ssProject( sProject, RTL_TEXTENCODING_ASCII_US );
- if ( HasProject( ssProject ))
- return;
-
- aFileList.push_back( new String( sFileName ) );
-}
-
-/*****************************************************************************/
-void Star::ExpandPrj_Impl( Prj *pPrj, Prj *pDepPrj )
-/*****************************************************************************/
-{
- if ( pDepPrj->bVisited )
- return;
-
- pDepPrj->bVisited = TRUE;
-
- SByteStringList* pPrjLst = pPrj->GetDependencies();
- SByteStringList* pDepLst = NULL;
- ByteString* pDepend;
- ByteString* pPutStr;
- Prj *pNextPrj = NULL;
- size_t i, nRetPos;
-
- if ( pPrjLst ) {
- pDepLst = pDepPrj->GetDependencies();
- if ( pDepLst ) {
- for ( i = 0; i < pDepLst->size(); i++ ) {
- pDepend = (*pDepLst)[ i ];
- pPutStr = new ByteString( *pDepend );
- nRetPos = pPrjLst->PutString( pPutStr );
- if( nRetPos == NOT_THERE )
- delete pPutStr;
- pNextPrj = GetPrj( *pDepend );
- if ( pNextPrj ) {
- ExpandPrj_Impl( pPrj, pNextPrj );
- }
- }
- }
- }
-}
-
-/*****************************************************************************/
-void Star::Expand_Impl()
-/*****************************************************************************/
-{
- for ( ULONG i = 0; i < Count(); i++ ) {
- for ( ULONG j = 0; j < Count(); j++ )
- GetObject( j )->bVisited = FALSE;
-
- Prj* pPrj = GetObject( i );
- ExpandPrj_Impl( pPrj, pPrj );
- }
-}
-
-/*****************************************************************************/
-void Star::InsertToken ( char *yytext )
-/*****************************************************************************/
-{
- static int i = 0;
- static ByteString aDirName, aWhat, aWhatOS,
- sClientRestriction, aLogFileName, aProjectName, aPrefix, aCommandPara;
- static BOOL bPrjDep = FALSE;
- static BOOL bHardDep = FALSE;
- static USHORT nCommandType, nOSType;
- CommandData* pCmdData;
- static SByteStringList *pStaticDepList;
- Prj* pPrj;
-
- switch (i)
- {
- case 0:
- aPrefix = yytext;
- pStaticDepList = 0;
- break;
- case 1:
- aDirName = yytext;
- break;
- case 2:
- if ( !strcmp( yytext, ":" ))
- {
- bPrjDep = TRUE;
- bHardDep = FALSE;
- i = 9;
- }
- else if ( !strcmp( yytext, "::" ))
- {
- bPrjDep = TRUE;
- bHardDep = TRUE;
- i = 9;
- }
- else
- {
- bPrjDep = FALSE;
- bHardDep = FALSE;
-
- aWhat = yytext;
- if ( aWhat == "nmake" )
- nCommandType = COMMAND_NMAKE;
- else if ( aWhat == "get" )
- nCommandType = COMMAND_GET;
- else {
- ULONG nOffset = aWhat.Copy( 3 ).ToInt32();
- nCommandType = sal::static_int_cast< USHORT >(
- COMMAND_USER_START + nOffset - 1);
- }
- }
- break;
- case 3:
- if ( !bPrjDep )
- {
- aWhat = yytext;
- if ( aWhat == "-" )
- {
- aCommandPara = ByteString();
- }
- else
- aCommandPara = aWhat;
- }
- break;
- case 4:
- if ( !bPrjDep )
- {
- aWhatOS = yytext;
- if ( aWhatOS.GetTokenCount( ',' ) > 1 ) {
- sClientRestriction = aWhatOS.Copy( aWhatOS.GetToken( 0, ',' ).Len() + 1 );
- aWhatOS = aWhatOS.GetToken( 0, ',' );
- }
- if ( aWhatOS == "all" )
- nOSType = ( OS_WIN16 | OS_WIN32 | OS_OS2 | OS_UNX );
- else if ( aWhatOS == "w" )
- nOSType = ( OS_WIN16 | OS_WIN32 );
- else if ( aWhatOS == "p" )
- nOSType = OS_OS2;
- else if ( aWhatOS == "u" )
- nOSType = OS_UNX;
- else if ( aWhatOS == "d" )
- nOSType = OS_WIN16;
- else if ( aWhatOS == "n" )
- nOSType = OS_WIN32;
- else
- nOSType = OS_NONE;
- }
- break;
- case 5:
- if ( !bPrjDep )
- {
- aLogFileName = yytext;
- }
- break;
- default:
- if ( !bPrjDep )
- {
- ByteString aItem = yytext;
- if ( aItem == "NULL" )
- {
- // Liste zu Ende
- i = -1;
- }
- else
- {
- // ggfs. Dependency liste anlegen und ergaenzen
- if ( !pStaticDepList )
- pStaticDepList = new SByteStringList;
- pStaticDepList->PutString( new ByteString( aItem ));
- }
- }
- else
- {
- ByteString aItem = yytext;
- if ( aItem == "NULL" )
- {
- // Liste zu Ende
- i = -1;
- bPrjDep= FALSE;
- }
- else
- {
- aProjectName = aDirName.GetToken ( 0, '\\');
- if ( HasProject( aProjectName ))
- {
- pPrj = GetPrj( aProjectName );
- // Projekt exist. schon, neue Eintraege anhaengen
- }
- else
- {
- // neues Project anlegen
- pPrj = new Prj ( aProjectName );
- pPrj->SetPreFix( aPrefix );
- Insert(pPrj,LIST_APPEND);
- }
- pPrj->AddDependencies( aItem );
- pPrj->HasHardDependencies( bHardDep );
-
- if ( nStarMode == STAR_MODE_RECURSIVE_PARSE ) {
- String sItem( aItem, RTL_TEXTENCODING_ASCII_US );
- InsertSolarList( sItem );
- }
- }
- }
- break;
- }
- /* Wenn dieses Project noch nicht vertreten ist, in die Liste
- der Solar-Projekte einfuegen */
- if ( i == -1 )
- {
- aProjectName = aDirName.GetToken ( 0, '\\');
- if ( HasProject( aProjectName ))
- {
- pPrj = GetPrj( aProjectName );
- // Projekt exist. schon, neue Eintraege anhaengen
- }
- else
- {
- // neues Project anlegen
- pPrj = new Prj ( aProjectName );
- pPrj->SetPreFix( aPrefix );
- Insert(pPrj,LIST_APPEND);
- }
-
- pCmdData = new CommandData;
- pCmdData->SetPath( aDirName );
- pCmdData->SetCommandType( nCommandType );
- pCmdData->SetCommandPara( aCommandPara );
- pCmdData->SetOSType( nOSType );
- pCmdData->SetLogFile( aLogFileName );
- pCmdData->SetClientRestriction( sClientRestriction );
- if ( pStaticDepList )
- pCmdData->SetDependencies( pStaticDepList );
-
- pStaticDepList = 0;
- pPrj->Insert ( pCmdData, LIST_APPEND );
- aDirName ="";
- aWhat ="";
- aWhatOS = "";
- sClientRestriction = "";
- aLogFileName = "";
- nCommandType = 0;
- nOSType = 0;
- }
- i++;
-
- // und wer raeumt die depLst wieder ab ?
-}
-
-/*****************************************************************************/
-BOOL Star::HasProject ( ByteString aProjectName )
-/*****************************************************************************/
-{
- Prj *pPrj;
- int nCountMember;
-
- nCountMember = Count();
-
- for ( int i=0; i<nCountMember; i++)
- {
- pPrj = GetObject(i);
- if ( pPrj->GetProjectName().EqualsIgnoreCaseAscii(aProjectName) )
- return TRUE;
- }
- return FALSE;
-}
-
-/*****************************************************************************/
-Prj* Star::GetPrj ( ByteString aProjectName )
-/*****************************************************************************/
-{
- Prj* pPrj;
- int nCountMember = Count();
- for ( int i=0;i<nCountMember;i++)
- {
- pPrj = GetObject(i);
- if ( pPrj->GetProjectName().EqualsIgnoreCaseAscii(aProjectName) )
- return pPrj;
- }
- return 0L ;
-}
-
-/*****************************************************************************/
-ByteString Star::GetPrjName( DirEntry &aPath )
-/*****************************************************************************/
-{
- ByteString aRetPrj, aDirName;
- ByteString aFullPathName = ByteString( aPath.GetFull(), gsl_getSystemTextEncoding());
-
- xub_StrLen nToken = aFullPathName.GetTokenCount(PATH_DELIMETER);
- for ( xub_StrLen i=0; i< nToken; i++ )
- {
- aDirName = aFullPathName.GetToken( i, PATH_DELIMETER );
- if ( HasProject( aDirName ))
- {
- aRetPrj = aDirName;
- break;
- }
- }
-
- return aRetPrj;
-}
-
-
-//
-// class StarWriter
-//
-
-/*****************************************************************************/
-StarWriter::StarWriter( String aFileName, BOOL bReadComments, USHORT nMode )
-/*****************************************************************************/
-{
- Read ( aFileName, bReadComments, nMode );
-}
-
-/*****************************************************************************/
-StarWriter::StarWriter( SolarFileList *pSolarFiles, BOOL bReadComments )
-/*****************************************************************************/
-{
- Read( pSolarFiles, bReadComments );
-}
-
-/*****************************************************************************/
-StarWriter::StarWriter( GenericInformationList *pStandLst, ByteString &rVersion,
- BOOL bLocal, const char *pSourceRoot )
-/*****************************************************************************/
-{
- ByteString sPath( rVersion );
- String sSrcRoot;
- if ( pSourceRoot )
- sSrcRoot = String::CreateFromAscii( pSourceRoot );
-
-#ifdef UNX
- sPath += "/settings/UNXSOLARLIST";
-#else
- sPath += "/settings/SOLARLIST";
-#endif
- GenericInformation *pInfo = pStandLst->GetInfo( sPath, TRUE );
-
- if( pInfo && pInfo->GetValue().Len()) {
- ByteString sFile( pInfo->GetValue());
- if ( bLocal ) {
- IniManager aIniManager;
- aIniManager.ToLocal( sFile );
- }
- String sFileName( sFile, RTL_TEXTENCODING_ASCII_US );
- nStarMode = STAR_MODE_SINGLE_PARSE;
- Read( sFileName );
- }
- else {
- SolarFileList *pFileList = new SolarFileList();
-
- sPath = rVersion;
- sPath += "/drives";
-
- GenericInformation *pInfo2 = pStandLst->GetInfo( sPath, TRUE );
- if ( pInfo2 && pInfo2->GetSubList()) {
- GenericInformationList *pDrives = pInfo2->GetSubList();
- for ( size_t i = 0; i < pDrives->size(); i++ ) {
- GenericInformation *pDrive = (*pDrives)[ i ];
- if ( pDrive ) {
- DirEntry aEntry;
- BOOL bOk = FALSE;
- if ( sSrcRoot.Len()) {
- aEntry = DirEntry( sSrcRoot );
- bOk = TRUE;
- }
- else {
-#ifdef UNX
- sPath = "UnixVolume";
- GenericInformation *pUnixVolume = pDrive->GetSubInfo( sPath );
- if ( pUnixVolume ) {
- String sRoot( pUnixVolume->GetValue(), RTL_TEXTENCODING_ASCII_US );
- aEntry = DirEntry( sRoot );
- bOk = TRUE;
- }
-#else
- bOk = TRUE;
- String sRoot( *pDrive, RTL_TEXTENCODING_ASCII_US );
- sRoot += String::CreateFromAscii( "\\" );
- aEntry = DirEntry( sRoot );
-#endif
- }
- if ( bOk ) {
- sPath = "projects";
- GenericInformation *pProjectsKey = pDrive->GetSubInfo( sPath, TRUE );
- if ( pProjectsKey ) {
- if ( !sSrcRoot.Len()) {
- sPath = rVersion;
- sPath += "/settings/PATH";
- GenericInformation *pPath = pStandLst->GetInfo( sPath, TRUE );
- if( pPath ) {
- ByteString sAddPath( pPath->GetValue());
-#ifdef UNX
- sAddPath.SearchAndReplaceAll( "\\", "/" );
-#else
- sAddPath.SearchAndReplaceAll( "/", "\\" );
-#endif
- String ssAddPath( sAddPath, RTL_TEXTENCODING_ASCII_US );
- aEntry += DirEntry( ssAddPath );
- }
- }
- GenericInformationList *pProjects = pProjectsKey->GetSubList();
- if ( pProjects ) {
- String sPrjDir( String::CreateFromAscii( "prj" ));
- String sSolarFile( String::CreateFromAscii( "build.lst" ));
-
- for ( size_t j = 0; j < pProjects->size(); j++ ) {
- ByteString sProject( *(*pProjects)[ j ] );
- String ssProject( sProject, RTL_TEXTENCODING_ASCII_US );
-
- DirEntry aPrjEntry( aEntry );
-
- aPrjEntry += DirEntry( ssProject );
- aPrjEntry += DirEntry( sPrjDir );
- aPrjEntry += DirEntry( sSolarFile );
-
- pFileList->push_back( new String( aPrjEntry.GetFull()) );
-
- ByteString sFile( aPrjEntry.GetFull(), RTL_TEXTENCODING_ASCII_US );
- fprintf( stdout, "%s\n", sFile.GetBuffer());
- }
- }
- }
- }
- }
- }
- }
- Read( pFileList );
- }
-}
-
-/*****************************************************************************/
-void StarWriter::CleanUp()
-/*****************************************************************************/
-{
- Expand_Impl();
-}
-
-/*****************************************************************************/
-USHORT StarWriter::Read( String aFileName, BOOL bReadComments, USHORT nMode )
-/*****************************************************************************/
-{
- nStarMode = nMode;
-
- ByteString aString;
- aFileList.push_back( new String( aFileName ) );
-
- DirEntry aEntry( aFileName );
- aEntry.ToAbs();
- aEntry = aEntry.GetPath().GetPath().GetPath();
- sSourceRoot = aEntry.GetFull();
-
- while ( !aFileList.empty() )
- {
- StarFile *pFile = new StarFile( *aFileList.front() );
- if ( pFile->Exists()) {
- SimpleConfig aSolarConfig( *aFileList.front() );
- while (( aString = aSolarConfig.GetCleanedNextLine( bReadComments )) != "" )
- InsertTokenLine ( aString );
- }
- delete pFile;
- delete aFileList.front();
- aFileList.erase( aFileList.begin() );
- }
- // resolve all dependencies recursive
- Expand_Impl();
-
- // Die gefundenen Abhaengigkeiten rekursiv aufloesen
- Expand_Impl();
- return 0;
-}
-
-/*****************************************************************************/
-USHORT StarWriter::Read( SolarFileList *pSolarFiles, BOOL bReadComments )
-/*****************************************************************************/
-{
- nStarMode = STAR_MODE_MULTIPLE_PARSE;
-
- // this ctor is used by StarBuilder to get the information for the whole workspace
- while ( !pSolarFiles->empty() )
- {
- ByteString aString;
- StarFile *pFile = new StarFile( *pSolarFiles->front() );
- if ( pFile->Exists()) {
- SimpleConfig aSolarConfig( *pSolarFiles->front() );
- while (( aString = aSolarConfig.GetCleanedNextLine( bReadComments )) != "" )
- InsertTokenLine ( aString );
- }
- delete pFile;
- delete pSolarFiles->front();
- pSolarFiles->erase( pSolarFiles->begin() );
- }
- delete pSolarFiles;
-
- Expand_Impl();
- return 0;
-}
-
-/*****************************************************************************/
-USHORT StarWriter::WritePrj( Prj *pPrj, SvFileStream& rStream )
-/*****************************************************************************/
-{
- ByteString aDataString;
- ByteString aTab('\t');
- ByteString aSpace(' ');
- ByteString aEmptyString("");
- SByteStringList* pCmdDepList;
-
- CommandData* pCmdData = NULL;
- if ( pPrj->Count() > 0 )
- {
- pCmdData = pPrj->First();
- SByteStringList* pPrjDepList = pPrj->GetDependencies( FALSE );
- if ( pPrjDepList != 0 )
- {
- aDataString = pPrj->GetPreFix();
- aDataString += aTab;
- aDataString += pPrj->GetProjectName();
- aDataString += aTab;
- if ( pPrj->HasHardDependencies())
- aDataString+= ByteString("::");
- else
- aDataString+= ByteString(":");
- aDataString += aTab;
- for ( size_t i = 0; i< pPrjDepList->size(); i++ ) {
- aDataString += *(*pPrjDepList)[ i ];
- aDataString += aSpace;
- }
- aDataString+= "NULL";
-
- rStream.WriteLine( aDataString );
-
- pCmdData = pPrj->Next();
- }
- if ( pCmdData ) {
- do
- {
- if (( aDataString = pCmdData->GetComment()) == aEmptyString )
- {
- aDataString = pPrj->GetPreFix();
- aDataString += aTab;
-
- aDataString+= pCmdData->GetPath();
- aDataString += aTab;
- USHORT nPathLen = pCmdData->GetPath().Len();
- if ( nPathLen < 40 )
- for ( int i = 0; i < 9 - pCmdData->GetPath().Len() / 4 ; i++ )
- aDataString += aTab;
- else
- for ( int i = 0; i < 12 - pCmdData->GetPath().Len() / 4 ; i++ )
- aDataString += aTab;
- aDataString += pCmdData->GetCommandTypeString();
- aDataString += aTab;
- if ( pCmdData->GetCommandType() == COMMAND_GET )
- aDataString += aTab;
- if ( pCmdData->GetCommandPara() == aEmptyString )
- aDataString+= ByteString("-");
- else
- aDataString+= pCmdData->GetCommandPara();
- aDataString += aTab;
- aDataString+= pCmdData->GetOSTypeString();
- if ( pCmdData->GetClientRestriction().Len()) {
- aDataString += ByteString( "," );
- aDataString += pCmdData->GetClientRestriction();
- }
- aDataString += aTab;
- aDataString += pCmdData->GetLogFile();
- aDataString += aSpace;
-
- pCmdDepList = pCmdData->GetDependencies();
- if ( pCmdDepList )
- for ( size_t i = 0; i< pCmdDepList->size(); i++ ) {
- aDataString += *(*pCmdDepList)[ i ];
- aDataString += aSpace;
- }
- aDataString += "NULL";
- }
-
- rStream.WriteLine( aDataString );
-
- pCmdData = pPrj->Next();
- } while ( pCmdData );
- }
- }
- return 0;
-}
-
-/*****************************************************************************/
-USHORT StarWriter::Write( String aFileName )
-/*****************************************************************************/
-{
- SvFileStream aFileStream;
-
- aFileStream.Open( aFileName, STREAM_WRITE | STREAM_TRUNC);
-
- if ( Count() > 0 )
- {
- Prj* pPrj = First();
- do
- {
- WritePrj( pPrj, aFileStream );
- pPrj = Next();
- } while ( pPrj );
- }
-
- aFileStream.Close();
-
- return 0;
-}
-
-/*****************************************************************************/
-USHORT StarWriter::WriteMultiple( String rSourceRoot )
-/*****************************************************************************/
-{
- if ( Count() > 0 )
- {
- String sPrjDir( String::CreateFromAscii( "prj" ));
- String sSolarFile( String::CreateFromAscii( "build.lst" ));
-
- Prj* pPrj = First();
- do
- {
- String sName( pPrj->GetProjectName(), RTL_TEXTENCODING_ASCII_US );
-
- DirEntry aEntry( rSourceRoot );
- aEntry += DirEntry( sName );
- aEntry += DirEntry( sPrjDir );
- aEntry += DirEntry( sSolarFile );
-
- SvFileStream aFileStream;
- aFileStream.Open( aEntry.GetFull(), STREAM_WRITE | STREAM_TRUNC);
-
- WritePrj( pPrj, aFileStream );
-
- aFileStream.Close();
-
- pPrj = Next();
- } while ( pPrj );
- }
-
- return 0;
-}
-
-/*****************************************************************************/
-void StarWriter::InsertTokenLine ( ByteString& rString )
-/*****************************************************************************/
-{
- int i = 0;
- ByteString aWhat, aWhatOS,
- sClientRestriction, aLogFileName, aProjectName, aPrefix, aCommandPara;
- static ByteString aDirName;
- BOOL bPrjDep = FALSE;
- BOOL bHardDep = FALSE;
- USHORT nCommandType = 0;
- USHORT nOSType = 0;
- CommandData* pCmdData;
- SByteStringList *pDepList2 = NULL;
- Prj* pPrj;
-
- ByteString aEmptyString;
- ByteString aToken = rString.GetToken( 0, '\t' );
- ByteString aCommentString;
-
- const char* yytext = aToken.GetBuffer();
-
- while ( !( aToken == aEmptyString ) )
- {
- switch (i)
- {
- case 0:
- if ( rString.Search( "#" ) == 0 )
- {
- i = -1;
- aCommentString = rString;
- rString = aEmptyString;
- if ( Count() == 0 )
- aDirName = "null_entry" ; //comments at begin of file
- break;
- }
- aPrefix = yytext;
- pDepList2 = NULL;
- break;
- case 1:
- aDirName = yytext;
- break;
- case 2:
- if ( !strcmp( yytext, ":" ))
- {
- bPrjDep = TRUE;
- bHardDep = FALSE;
- i = 9;
- }
- else if ( !strcmp( yytext, "::" ))
- {
- bPrjDep = TRUE;
- bHardDep = TRUE;
- i = 9;
- }
- else
- {
- bPrjDep = FALSE;
- bHardDep = FALSE;
-
- aWhat = yytext;
- if ( aWhat == "nmake" )
- nCommandType = COMMAND_NMAKE;
- else if ( aWhat == "get" )
- nCommandType = COMMAND_GET;
- else {
- ULONG nOffset = aWhat.Copy( 3 ).ToInt32();
- nCommandType = sal::static_int_cast< USHORT >(
- COMMAND_USER_START + nOffset - 1);
- }
- }
- break;
- case 3:
- if ( !bPrjDep )
- {
- aWhat = yytext;
- if ( aWhat == "-" )
- {
- aCommandPara = ByteString();
- }
- else
- aCommandPara = aWhat;
- }
- break;
- case 4:
- if ( !bPrjDep )
- {
- aWhatOS = yytext;
- if ( aWhatOS.GetTokenCount( ',' ) > 1 ) {
- sClientRestriction = aWhatOS.Copy( aWhatOS.GetToken( 0, ',' ).Len() + 1 );
- aWhatOS = aWhatOS.GetToken( 0, ',' );
- }
- aWhatOS = aWhatOS.GetToken( 0, ',' );
- if ( aWhatOS == "all" )
- nOSType = ( OS_WIN16 | OS_WIN32 | OS_OS2 | OS_UNX );
- else if ( aWhatOS == "w" )
- nOSType = ( OS_WIN16 | OS_WIN32 );
- else if ( aWhatOS == "p" )
- nOSType = OS_OS2;
- else if ( aWhatOS == "u" )
- nOSType = OS_UNX;
- else if ( aWhatOS == "d" )
- nOSType = OS_WIN16;
- else if ( aWhatOS == "n" )
- nOSType = OS_WIN32;
- else
- nOSType = OS_NONE;
- }
- break;
- case 5:
- if ( !bPrjDep )
- {
- aLogFileName = yytext;
- }
- break;
- default:
- if ( !bPrjDep )
- {
- ByteString aItem = yytext;
- if ( aItem == "NULL" )
- {
- // Liste zu Ende
- i = -1;
- }
- else
- {
- // ggfs. Dependency liste anlegen und ergaenzen
- if ( !pDepList2 )
- pDepList2 = new SByteStringList;
- pDepList2->PutString( new ByteString( aItem ));
- }
- }
- else
- {
- ByteString aItem = yytext;
- if ( aItem == "NULL" )
- {
- // Liste zu Ende
- i = -1;
- bPrjDep= FALSE;
- }
- else
- {
- aProjectName = aDirName.GetToken ( 0, '\\');
- if ( HasProject( aProjectName ))
- {
- pPrj = GetPrj( aProjectName );
- // Projekt exist. schon, neue Eintraege anhaengen
- }
- else
- {
- // neues Project anlegen
- pPrj = new Prj ( aProjectName );
- pPrj->SetPreFix( aPrefix );
- Insert(pPrj,LIST_APPEND);
- }
- pPrj->AddDependencies( aItem );
- pPrj->HasHardDependencies( bHardDep );
-
- if ( nStarMode == STAR_MODE_RECURSIVE_PARSE ) {
- String sItem( aItem, RTL_TEXTENCODING_ASCII_US );
- InsertSolarList( sItem );
- }
- }
-
- }
- break;
- }
- /* Wenn dieses Project noch nicht vertreten ist, in die Liste
- der Solar-Projekte einfuegen */
- if ( i == -1 )
- {
- aProjectName = aDirName.GetToken ( 0, '\\');
- if ( HasProject( aProjectName ))
- {
- pPrj = GetPrj( aProjectName );
- // Projekt exist. schon, neue Eintraege anhaengen
- }
- else
- {
- // neues Project anlegen
- pPrj = new Prj ( aProjectName );
- pPrj->SetPreFix( aPrefix );
- Insert(pPrj,LIST_APPEND);
- }
-
- pCmdData = new CommandData;
- pCmdData->SetPath( aDirName );
- pCmdData->SetCommandType( nCommandType );
- pCmdData->SetCommandPara( aCommandPara );
- pCmdData->SetOSType( nOSType );
- pCmdData->SetLogFile( aLogFileName );
- pCmdData->SetComment( aCommentString );
- pCmdData->SetClientRestriction( sClientRestriction );
- if ( pDepList2 )
- pCmdData->SetDependencies( pDepList2 );
-
- pPrj->Insert ( pCmdData, LIST_APPEND );
-
- }
- i++;
-
- rString.Erase(0, aToken.Len()+1);
- aToken = rString.GetToken( 0, '\t' );
- yytext = aToken.GetBuffer();
-
- }
- // und wer raeumt die depLst wieder ab ?
-}
-
-/*****************************************************************************/
-BOOL StarWriter::InsertProject ( Prj* )
-/*****************************************************************************/
-{
- return FALSE;
-}
-
-/*****************************************************************************/
-Prj* StarWriter::RemoveProject ( ByteString aProjectName )
-/*****************************************************************************/
-{
- size_t nCountMember = Count();
- Prj* pPrj;
- Prj* pPrjFound = NULL;
- SByteStringList* pPrjDeps;
-
- for ( size_t i = 0; i < nCountMember; i++ )
- {
- pPrj = GetObject( i );
- if ( pPrj->GetProjectName() == aProjectName )
- pPrjFound = pPrj;
- else
- {
- pPrjDeps = pPrj->GetDependencies( FALSE );
- if ( pPrjDeps )
- {
- ByteString* pString;
- size_t nPrjDepsCount = pPrjDeps->size();
- for ( ULONG j = nPrjDepsCount; j > 0; )
- {
- pString = (*pPrjDeps)[ --j ];
- if ( pString->GetToken( 0, '.') == aProjectName )
- pPrjDeps->erase( j );
- }
- }
- }
- }
-
- Remove( pPrjFound );
-
- return pPrjFound;
-}
-
-//
-// class StarFile
-//
-
-/*****************************************************************************/
-StarFile::StarFile( const String &rFile )
-/*****************************************************************************/
- : aFileName( rFile )
-{
- DirEntry aEntry( aFileName );
- if ( aEntry.Exists()) {
- bExists = TRUE;
- FileStat aStat( aEntry );
- aDate = aStat.DateModified();
- aTime = aStat.TimeModified();
- }
- else
- bExists = FALSE;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/bootstrp/rscdep.cxx b/tools/bootstrp/rscdep.cxx
index 650f4ade4b58..1ebd9e85ac9a 100644
--- a/tools/bootstrp/rscdep.cxx
+++ b/tools/bootstrp/rscdep.cxx
@@ -78,7 +78,7 @@ void RscHrcDep::Execute()
CppDep::Execute();
}
-SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv )
+int main( int argc, char** argv )
{
int c;
char aBuf[255];
@@ -86,7 +86,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, 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());
@@ -160,7 +160,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv )
pDep->AddSource( &aBuf2[0] );
aRespArg += " ";
aRespArg += &aBuf2[0];
- bSource = TRUE;
+ bSource = sal_True;
}
}
}
@@ -193,7 +193,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv )
case 'h' :
case 'H' :
case '?' :
- printf("RscDep 1.0 (c)2000 StarOffice\n");
+ printf("RscDep 1.0\n");
break;
default:
diff --git a/tools/bootstrp/sstring.cxx b/tools/bootstrp/sstring.cxx
deleted file mode 100644
index 9d96508deb88..000000000000
--- a/tools/bootstrp/sstring.cxx
+++ /dev/null
@@ -1,216 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_tools.hxx"
-
-#define ENABLE_BYTESTRING_STREAM_OPERATORS
-#include <tools/stream.hxx>
-#include "bootstrp/sstring.hxx"
-
-SByteStringList::SByteStringList()
-{
-}
-
-SByteStringList::~SByteStringList()
-{
- CleanUp();
-}
-
-size_t SByteStringList::size() const {
- return maList.size();
-}
-
-ByteString* SByteStringList::erase( size_t i ) {
- ByteString* result = NULL;
- if ( i < maList.size() ) {
- ByteStringList::iterator it = maList.begin();
- ::std::advance( it, i );
- result = *it;
- maList.erase( it );
- }
- return result;
-}
-
-
-ByteString* SByteStringList::operator[]( size_t i ) const {
- return ( i < maList.size() ) ? maList[ i ] : NULL;
-}
-
-ByteString* SByteStringList::at( size_t i ) const {
- return ( i < maList.size() ) ? maList[ i ] : NULL;
-}
-
-size_t SByteStringList::IsString( ByteString* pStr )
-{
- size_t nRet = NOT_THERE;
- if ( (nRet = GetPrevString( pStr )) != 0 )
- {
- ByteString* pString = maList[ nRet ];
- if ( *pString == *pStr )
- return nRet;
- else
- return NOT_THERE;
- }
- else
- {
- ByteString* pString = maList.empty() ? NULL : maList[ 0 ];
- if ( pString && (*pString == *pStr) )
- return 0;
- else
- return NOT_THERE;
- }
-}
-
-size_t SByteStringList::GetPrevString( ByteString* pStr )
-{
- size_t nRet = 0;
- BOOL bFound = FALSE;
- size_t nCountMember = maList.size();
- size_t nUpper = nCountMember;
- size_t nLower = 0;
- size_t nCurrent = nUpper / 2;
- size_t nRem = 0;
- ByteString* pString;
-
- do
- {
- if ( (nCurrent == nLower) || (nCurrent == nUpper) )
- return nLower;
- pString = maList[ nCurrent ];
- StringCompare nResult = pStr->CompareTo( *pString );
- if ( nResult == COMPARE_LESS )
- {
- nUpper = nCurrent;
- nCurrent = (nCurrent + nLower) /2;
- }
- else if ( nResult == COMPARE_GREATER )
- {
- nLower = nCurrent;
- nCurrent = (nUpper + nCurrent) /2;
- }
- else if ( nResult == COMPARE_EQUAL )
- return nCurrent;
- if ( nRem == nCurrent )
- return nCurrent;
- nRem = nCurrent;
- }
- while ( !bFound );
- return nRet;
-}
-
-/**************************************************************************
-*
-* Sortiert einen ByteString in die Liste ein und gibt die Position,
-* an der einsortiert wurde, zurueck
-*
-**************************************************************************/
-
-size_t SByteStringList::PutString( ByteString* pStr )
-{
- size_t nPos = GetPrevString ( pStr );
- if ( maList.size() )
- {
- ByteString* pString = NULL;
- pString = maList[ 0 ];
- if ( pString->CompareTo( *pStr ) == COMPARE_GREATER )
- {
- maList.insert( maList.begin(), pStr );
- return 0;
- }
- pString = maList[ nPos ];
- if ( *pStr != *pString )
- {
- if ( ++nPos < maList.size() ) {
- ByteStringList::iterator it = maList.begin();
- ::std::advance( it, nPos );
- maList.insert( it, pStr );
- return nPos;
- } else {
- maList.push_back( pStr );
- return maList.size() - 1;
- }
- }
- }
- else
- {
- maList.push_back( pStr );
- return 0;
- }
-
- return NOT_THERE;
-}
-
-ByteString* SByteStringList::RemoveString( const ByteString& rName )
-{
- ByteString* pReturn = NULL;
-
- for ( ByteStringList::iterator it = maList.begin(); it < maList.end(); ++it )
- {
- if ( rName == *(*it) )
- {
- pReturn = *it;
- maList.erase( it );
- return pReturn;
- }
- }
-
- return pReturn;
-}
-
-void SByteStringList::CleanUp()
-{
- for ( size_t i = 0, n = maList.size(); i < n; ++i ) {
- delete maList[ i ];
- }
- maList.clear();
-}
-
-SByteStringList& SByteStringList::operator<< ( SvStream& rStream )
-{
- sal_uInt32 nListCount;
- rStream >> nListCount;
- for ( sal_uInt32 i = 0; i < nListCount; i++ ) {
- ByteString* pByteString = new ByteString();
- rStream >> *pByteString;
- maList.push_back( pByteString );
- }
- return *this;
-}
-
-SByteStringList& SByteStringList::operator>> ( SvStream& rStream )
-{
- sal_uInt32 nListCount = maList.size();
- rStream << nListCount;
- for ( size_t i = 0; i < nListCount; ++i ) {
- rStream << *( maList[ i ] );
- }
- return *this;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/inc/bootstrp/command.hxx b/tools/inc/bootstrp/command.hxx
deleted file mode 100644
index 1671c20bc1e3..000000000000
--- a/tools/inc/bootstrp/command.hxx
+++ /dev/null
@@ -1,166 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-#ifndef COMMAND_HXX
-#define COMMAND_HXX
-
-#include <iostream>
-
-#include <tools/stream.hxx>
-#define STRLEN 100
-#ifndef UNX
-#define TMPNAME "\\command.tmp"
-#else
-#define TMPNAME "/tmp/command.tmp"
-#endif
-
-/** Different types of spawnable programs
-*/
-enum ExeType
-{
- EXE, /// programm is a native executable
- BAT, /// programm is a DOS-Batch
- BTM /// programm is a 4DOS-Batch
-};
-
-#define COMMAND_NOTFOUND 0x0001
-#define COMMAND_TOOBIG 0x0002
-#define COMMAND_INVALID 0x0004
-#define COMMAND_NOEXEC 0x0008
-#define COMMAND_NOMEM 0x0010
-#define COMMAND_UNKNOWN 0x0020
-
-#ifdef WNT
-#define COMMAND_SHELL "4nt.exe"
-#endif
-#ifdef OS2
-#define COMMAND_SHELL "4os2.exe"
-#endif
-#ifdef UNX
-#define COMMAND_SHELL "csh"
-#endif
-
-class CommandLine;
-class LogWindow;
-
-class CommandLine
-{
-friend class ChildProcess;
-private:
- char *CommandBuffer;
- char *ComShell;
- char **ppArgv;
- BOOL bTmpWrite;
-
-public:
- CommandLine(BOOL bTmpWrite = FALSE);
- CommandLine(const char *, BOOL bTmpWrite = FALSE);
- CommandLine(const CommandLine&, BOOL bTmpWrite = FALSE);
- virtual ~CommandLine();
-
- int nArgc;
-
- CommandLine& operator=(const CommandLine&);
- CommandLine& operator=(const char *);
- void BuildCommand(const char *);
- char** GetCommand(void) { return ppArgv; }
- void Strtokens(const char *);
- void Print();
-};
-
-/** Declares and spawns a child process.
- The spawned programm could be a native executable or a schell script.
-*/
-class CCommand
-{
-private:
- ByteString aCommandLine;
- ByteString aCommand;
- char *pArgv;
- char **ppArgv;
- ULONG nArgc;
- int nError;
-
-protected:
- void ImplInit();
- void Initpp( ULONG nCount, ByteString &rStr );
-
-public:
- /** Creates the process specified without spawning it
- @param rString specifies the programm or shell scrip
- */
- CCommand( ByteString &rString );
-
- /** Creates the process specified without spawning it
- @param pChar specifies the programm or shell scrip
- */
- CCommand( const char *pChar );
-
- /** Try to find the given programm in specified path
- @param sEnv specifies the current search path, defaulted by environment
- @param sItem specifies the system shell
- @return the Location (when programm was found)
- */
- static ByteString Search( ByteString sEnv,
- ByteString sItem = COMMAND_SHELL );
-
- /** Spawns the Process
- @return 0 when spawned without errors, otherwise a error code
- */
- operator int();
-
- ByteString GetCommandLine_() { return aCommandLine; }
- ByteString GetCommand() { return aCommand; }
-
- char** GetCommandStr() { return ppArgv; }
-};
-
-#define COMMAND_EXECUTE_WINDOW 0x0000001
-#define COMMAND_EXECUTE_CONSOLE 0x0000002
-#define COMMAND_EXECUTE_HIDDEN 0x0000004
-#define COMMAND_EXECUTE_START 0x0000008
-#define COMMAND_EXECUTE_WAIT 0x0000010
-#define COMMAND_EXECUTE_REMOTE 0x1000000
-
-typedef ULONG CommandBits;
-
-/** Allowes to spawn programms hidden, waiting etc.
- @see CCommand
-*/
-class CCommandd : public CCommand
-{
- CommandBits nFlag;
-public:
- CCommandd( ByteString &rString, CommandBits nBits );
- CCommandd( const char *pChar, CommandBits nBits );
- operator int();
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/inc/bootstrp/inimgr.hxx b/tools/inc/bootstrp/inimgr.hxx
index 12a42db22c24..016eee7bcb76 100644
--- a/tools/inc/bootstrp/inimgr.hxx
+++ b/tools/inc/bootstrp/inimgr.hxx
@@ -40,7 +40,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 0178d57c6ef2..13b95074e970 100644
--- a/tools/inc/bootstrp/mkcreate.hxx
+++ b/tools/inc/bootstrp/mkcreate.hxx
@@ -30,7 +30,9 @@
#define _MK_CREATE_HXX
#include <tools/string.hxx>
-#include "bootstrp/sstring.hxx"
+//#include "bootstrp/sstring.hxx"
+
+DECLARE_LIST( UniStringList, UniString* )
#include "bootstrp/prj.hxx"
@@ -44,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 )
@@ -60,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;
}
};
@@ -93,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 )
@@ -109,7 +111,7 @@ public:
/* returns the operating system
*/
- USHORT GetOperatingSystem()
+ sal_uInt16 GetOperatingSystem()
{
return nOSType;
}
@@ -124,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
@@ -140,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:
@@ -155,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();
@@ -170,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 );
@@ -193,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
@@ -204,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
@@ -225,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
@@ -252,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
);
};
diff --git a/tools/inc/bootstrp/prj.hxx b/tools/inc/bootstrp/prj.hxx
index 5e809cd1a3c4..c85928ce11ba 100644
--- a/tools/inc/bootstrp/prj.hxx
+++ b/tools/inc/bootstrp/prj.hxx
@@ -31,94 +31,6 @@
#include <tools/fsys.hxx>
#include <tools/stream.hxx>
-#include <osl/mutex.hxx>
-#include <vector>
-#include <list>
-
-#define OS_NONE 0x0000
-#define OS_WIN16 0x0001
-#define OS_WIN32 0x0002
-#define OS_OS2 0x0004
-#define OS_UNX 0x0008
-#define OS_ALL ( OS_WIN16 | OS_WIN32 | OS_OS2 | OS_UNX )
-
-#define COMMAND_PROJECTROOT 0x0000
-#define COMMAND_NMAKE 0x0001
-#define COMMAND_GET 0x0002
-#define COMMAND_USER_START 0x0003
-#define COMMAND_USER_END 0xFFFE
-#define COMMAND_ALLDIRS 0xFFFF
-
-class SByteStringList;
-class GenericInformationList;
-
-/*********************************************************************
-*
-* Die Klasse CommandData haelte alle Informationen, die fuer die
-* Abarbeitung eines Kommandos (nmake, get) noetig sind
-*
-*********************************************************************/
-
-class CommandData
-{
- ByteString aPrj;
- ByteString aLogFileName;
- ByteString aInpath;
- ByteString aUpd;
- ByteString aUpdMinor;
- ByteString aProduct;
- ByteString aCommand;
- ByteString aPath;
- ByteString aPrePath;
- ByteString aPreFix;
- ByteString aCommandPara;
- ByteString aComment;
- ByteString sClientRestriction;
- SByteStringList *pDepList;
- USHORT nOSType;
- USHORT nCommand;
-
- ULONG nDepth; // Tiefe der Abhaenigkeit
-
-public:
- CommandData();
- ~CommandData();
- ByteString GetProjectName(){return aPrj;}
- void SetProjectName( ByteString aName ){aPrj = aName;}
- ByteString GetLogFile(){return aLogFileName;}
- void SetLogFile( ByteString aName ){aLogFileName = aName;}
- ByteString GetInpath(){return aInpath;}
- void SetInpath( ByteString aName ){aInpath = aName;}
- ByteString GetUpd(){return aUpd;}
- void SetUpd( ByteString aName ){aUpd = aName;}
- ByteString GetUpdMinor(){return aUpdMinor;}
- void SetUpdMinor( ByteString aName ){aUpdMinor = aName;}
- ByteString GetProduct(){return aProduct;}
- void SetProduct( ByteString aName ){aProduct = aName;}
- ByteString GetCommand(){return aCommand;}
- void SetCommand ( ByteString aName ){aCommand = aName;}
- ByteString GetCommandPara(){return aCommandPara;}
- void SetCommandPara ( ByteString aName ){aCommandPara = aName;}
- ByteString GetComment(){return aComment;}
- void SetComment ( ByteString aCommentString ){aComment = aCommentString;}
- ByteString GetPath(){return aPath;}
- void SetPath( ByteString aName ){aPath = aName;}
- ByteString GetPrePath(){return aPrePath;}
- void SetPrePath( ByteString aName ){aPrePath = aName;}
- USHORT GetOSType(){return nOSType;}
- ByteString GetOSTypeString();
- void SetOSType( USHORT nType ){nOSType = nType;}
- USHORT GetCommandType(){return nCommand;}
- ByteString GetCommandTypeString();
- void SetCommandType( USHORT nCommandType ){nCommand = nCommandType;}
- SByteStringList* GetDependencies(){return pDepList;}
- void SetDependencies( SByteStringList *pList ){pDepList = pList;}
- ByteString GetClientRestriction() { return sClientRestriction; }
- void SetClientRestriction( ByteString sRestriction ) { sClientRestriction = sRestriction; }
-
- void AddDepth(){nDepth++;}
- ULONG GetDepth(){return nDepth;}
-};
/*********************************************************************
*
@@ -141,281 +53,7 @@ public:
SimpleConfig(DirEntry& rDirEntry);
~SimpleConfig();
ByteString GetNext();
- ByteString GetCleanedNextLine( BOOL bReadComments = FALSE );
-};
-
-#define ENV_GUI 0x00000000
-#define ENV_OS 0x00000001
-#define ENV_UPD 0x00000002
-#define ENV_UPDMIN 0x00000004
-#define ENV_INPATH 0x00000008
-#define ENV_OUTPATH 0x00000010
-#define ENV_GUIBASE 0x00000020
-#define ENV_CVER 0x00000040
-#define ENV_GVER 0x00000080
-#define ENV_GUIENV 0x00000100
-#define ENV_CPU 0x00000200
-#define ENV_CPUNAME 0x00000400
-#define ENV_DLLSUFF 0x00000800
-#define ENV_COMEX 0x00001000
-#define ENV_COMPATH 0x00002000
-#define ENV_INCLUDE 0x00004000
-#define ENV_LIB 0x00008000
-#define ENV_PATH 0x00010000
-#define ENV_SOLVER 0x00020000
-#define ENV_SOLENV 0x00040000
-#define ENV_SOLROOT 0x00080000
-#define ENV_DEVROOT 0x00100000
-#define ENV_EMERG 0x00200000
-#define ENV_STAND 0x00400000
-
-/*********************************************************************
-*
-* class Prj
-* alle Daten eines Projektes werden hier gehalten
-*
-*********************************************************************/
-
-typedef ::std::vector< CommandData* > PrjList;
-
-class Star;
-class Prj
-{
-friend class Star;
-private:
- PrjList maList;
- size_t maCurrent;
-
- BOOL bVisited;
-
- ByteString aPrjPath;
- ByteString aProjectName;
- ByteString aProjectPrefix; // max. 2-buchstabige Abk.
- SByteStringList* pPrjInitialDepList;
- SByteStringList* pPrjDepList;
- BOOL bHardDependencies;
- BOOL bSorted;
-
-public:
- Prj();
- Prj( ByteString aName );
- ~Prj();
- void SetPreFix( ByteString aPre ){aProjectPrefix = aPre;}
- ByteString GetPreFix(){return aProjectPrefix;}
- ByteString GetProjectName()
- {return aProjectName;}
- void SetProjectName(ByteString aName)
- {aProjectName = aName;}
- BOOL InsertDirectory( ByteString aDirName , USHORT aWhat,
- USHORT aWhatOS, ByteString aLogFileName,
- const ByteString &rClientRestriction );
- CommandData* RemoveDirectory( ByteString aLogFileName );
- CommandData* GetDirectoryList ( USHORT nWhatOs, USHORT nCommand );
- CommandData* GetDirectoryData( ByteString aLogFileName );
- inline CommandData* GetData( ByteString aLogFileName )
- { return GetDirectoryData( aLogFileName ); };
-
- SByteStringList* GetDependencies( BOOL bExpanded = TRUE );
- void AddDependencies( ByteString aStr );
- void HasHardDependencies( BOOL bHard ) { bHardDependencies = bHard; }
- BOOL HasHardDependencies() { return bHardDependencies; }
-
- size_t Count() const { return maList.size(); }
-
- CommandData* GetObject( size_t i ) { return ( i < maList.size() ) ? maList[ i ] : NULL; }
-
- void Insert( CommandData* item, size_t i )
- {
- if ( i < maList.size() )
- {
- PrjList::iterator it = maList.begin();
- ::std::advance( it, i );
- maList.insert( it, item );
- maCurrent = i;
- }
- else
- {
- maCurrent = maList.size();
- maList.push_back( item );
- }
- }
-
- CommandData* First()
- {
- maCurrent = 0;
- return maList.empty() ? NULL : maList[ 0 ];
- }
-
- CommandData* Next()
- {
- if ( maCurrent+1 >= maList.size() ) return NULL;
- maCurrent++;
- return maList[ maCurrent ];
- }
-
- CommandData* Remove( CommandData* item )
- {
- for ( PrjList::iterator it = maList.begin(); it < maList.end(); ++it )
- {
- if ( *it == item )
- {
- maList.erase( it );
- return item;
- }
- }
- return NULL;
- }
-};
-
-/*********************************************************************
-*
-* class Star
-* Diese Klasse liest die Projectstruktur aller StarDivision Projekte
-* aus \\dev\data1\upenv\data\config\solar.lst aus
-*
-*********************************************************************/
-
-class StarFile
-{
-private:
- String aFileName;
- Date aDate;
- Time aTime;
-
- BOOL bExists;
-
-public:
- StarFile( const String &rFile );
- BOOL Exists() { return bExists; }
-};
-
-#define STAR_MODE_SINGLE_PARSE 0x0000
-#define STAR_MODE_RECURSIVE_PARSE 0x0001
-#define STAR_MODE_MULTIPLE_PARSE 0x0002
-
-typedef ::std::vector< Prj* > StarList;
-// todo: SolarFileList should be a linked list and not a vector.
-// also, the Read() functions need to be changed (see 1st read() in prj.cxx for notes)
-typedef ::std::list< String* > SolarFileList;
-
-class Star
-{
-private:
- StarList maStarList;
- size_t maCurrent;
-
- ByteString aStarName;
-
- static Link aDBNotFoundHdl;
-protected:
- osl::Mutex aMutex;
-
- USHORT nStarMode;
- SolarFileList aFileList;
- String sSourceRoot;
-
- void InsertSolarList( String sProject );
- String CreateFileName( String sProject );
-
- void Expand_Impl();
- void ExpandPrj_Impl( Prj *pPrj, Prj *pDepPrj );
-
-private:
- void Read( String &rFileName );
- void Read( SolarFileList *pSOlarFiles );
-
-public:
- Star();
- Star( String aFileName, USHORT nMode = STAR_MODE_SINGLE_PARSE );
- Star( SolarFileList *pSolarFiles );
- Star( GenericInformationList *pStandLst, ByteString &rVersion, BOOL bLocal = FALSE,
- const char *pSourceRoot = NULL );
-
- ~Star();
-
- static void SetDBNotFoundHdl( const Link &rLink ) { aDBNotFoundHdl = rLink; }
-
- ByteString GetName(){ return aStarName; };
-
- BOOL HasProject( ByteString aProjectName );
- Prj* GetPrj( ByteString aProjectName );
- ByteString GetPrjName( DirEntry &rPath );
-
- void InsertToken( char *pChar );
-
- USHORT GetMode() { return nStarMode; }
-
- size_t Count() const { return maStarList.size(); }
-
- Prj* GetObject( size_t i )
- { return ( i < maStarList.size() ) ? maStarList[ i ] : NULL; }
-
- void Insert( Prj* item, size_t i )
- {
- if ( i < maStarList.size() )
- {
- StarList::iterator it = maStarList.begin();
- ::std::advance( it, i );
- maStarList.insert( it, item );
- maCurrent = i;
- }
- else
- {
- maCurrent = maStarList.size();
- maStarList.push_back( item );
- }
- }
-
- Prj* First()
- {
- maCurrent = 0;
- return maStarList.empty() ? NULL : maStarList[ 0 ];
- }
-
- Prj* Next()
- {
- if ( maCurrent+1 >= maStarList.size() ) return NULL;
- maCurrent++;
- return maStarList[ maCurrent ];
- }
-
- Prj* Remove( Prj* item )
- {
- for ( StarList::iterator it = maStarList.begin(); it < maStarList.end(); ++it )
- {
- if ( *it == item )
- {
- maStarList.erase( it );
- return item;
- }
- }
- return NULL;
- }
-
-};
-
-class StarWriter : public Star
-{
-private:
- USHORT WritePrj( Prj *pPrj, SvFileStream& rStream );
-
-public:
- StarWriter( String aFileName, BOOL bReadComments = FALSE, USHORT nMode = STAR_MODE_SINGLE_PARSE );
- StarWriter( SolarFileList *pSolarFiles, BOOL bReadComments = FALSE );
- StarWriter( GenericInformationList *pStandLst, ByteString &rVersion, BOOL bLocal = FALSE,
- const char *pSourceRoot = NULL );
-
- void CleanUp();
-
- BOOL InsertProject ( Prj* pNewPrj );
- Prj* RemoveProject ( ByteString aProjectName );
-
- USHORT Read( String aFileName, BOOL bReadComments = FALSE, USHORT nMode = STAR_MODE_SINGLE_PARSE );
- USHORT Read( SolarFileList *pSolarFiles, BOOL bReadComments = FALSE );
- USHORT Write( String aFileName );
- USHORT WriteMultiple( String rSourceRoot );
-
- void InsertTokenLine( ByteString& rString );
+ ByteString GetCleanedNextLine( sal_Bool bReadComments = sal_False );
};
#endif
diff --git a/tools/inc/bootstrp/sstring.hxx b/tools/inc/bootstrp/sstring.hxx
deleted file mode 100644
index ba63b9a1c8ea..000000000000
--- a/tools/inc/bootstrp/sstring.hxx
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-#ifndef _SSTRING_HXX
-#define _SSTRING_HXX
-
-#include <tools/string.hxx>
-#include <vector>
-
-#define NOT_THERE LIST_ENTRY_NOTFOUND
-
-typedef ::std::vector< ByteString* > ByteStringList;
-
-class SvStream;
-
-// ---------------------
-// - class SStringList -
-// ---------------------
-
-class SByteStringList
-{
-private:
- ByteStringList maList;
-
-public:
- SByteStringList();
- ~SByteStringList();
-
- // neuen ByteString in Liste einfuegen
- size_t PutString( ByteString* );
- ByteString* RemoveString( const ByteString& rName );
-
- // Position des ByteString in Liste, wenn nicht enthalten, dann
- // return = NOT_THERE
- size_t IsString( ByteString* );
-
- // Vorgaenger ermitteln ( auch wenn selbst noch nicht in
- // Liste enthalten
- size_t GetPrevString( ByteString* );
- void CleanUp();
- size_t size() const;
- ByteString* erase( size_t i );
-
- SByteStringList& operator<< ( SvStream& rStream );
- SByteStringList& operator>> ( SvStream& rStream );
- ByteString* operator[]( size_t i ) const;
- ByteString* at( size_t i ) const;
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/inc/impcont.hxx b/tools/inc/impcont.hxx
index e60bd80b1318..8734f9d4ae74 100644
--- a/tools/inc/impcont.hxx
+++ b/tools/inc/impcont.hxx
@@ -43,8 +43,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
@@ -53,26 +53,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; }
@@ -93,7 +93,7 @@ private:
|*
*************************************************************************/
-inline void* CBlock::GetObject( USHORT nIndex ) const
+inline void* CBlock::GetObject( sal_uInt16 nIndex ) const
{
return pNodes[nIndex];
}
@@ -108,11 +108,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 c584a9d32700..08bb5081c726 100644
--- a/tools/inc/poly.h
+++ b/tools/inc/poly.h
@@ -31,7 +31,7 @@
#include <tools/gen.hxx>
-#define MAX_64KPOINTS ((((USHORT)0xFFFF)-32)/sizeof(Point))
+#define MAX_64KPOINTS ((((sal_uInt16)0xFFFF)-32)/sizeof(Point))
// -------------------
// - ImplPolygonData -
@@ -40,17 +40,10 @@
class ImplPolygonData
{
public:
-#ifdef WIN
- Point huge* mpPointAry;
- BYTE* mpFlagAry;
- GLOBALHANDLE mhPoints;
-#else
Point* mpPointAry;
- BYTE* mpFlagAry;
-#endif
-
- USHORT mnPoints;
- ULONG mnRefCount;
+ sal_uInt8* mpFlagAry;
+ sal_uInt16 mnPoints;
+ sal_uIntPtr mnRefCount;
};
// ---------------
@@ -60,22 +53,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;
@@ -84,15 +77,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 5b45be439230..6b199d855c87 100644
--- a/tools/inc/tools/StringListResource.hxx
+++ b/tools/inc/tools/StringListResource.hxx
@@ -40,7 +40,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/agapi.hxx b/tools/inc/tools/agapi.hxx
deleted file mode 100644
index 731594ad4df1..000000000000
--- a/tools/inc/tools/agapi.hxx
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-#ifndef _AGAPI_HXX
-#define _AGAPI_HXX
-
-#include <tools/solar.h>
-
-class INetURLObject;
-class ChannelList;
-class AgentItem;
-class String;
-
-class AgentApi
-{
-protected:
- friend class ChannelList;
-
- AgentItem* pChannelAgent;
- virtual BOOL StartAgent() = 0;
-
- AgentApi(AgentItem* pAgent) { pChannelAgent = pAgent; }
-
-public:
- virtual ~AgentApi() {}
-
- virtual void InitAgent() = 0;
- virtual void ShutDownAgent() = 0;
-
- virtual BOOL NewDataPermission(const String& rChannelName) = 0;
- virtual void NewData(const String& rChannelName,
- const INetURLObject& rURL) = 0;
- virtual void NotifyChannelObjFile(const INetURLObject& rURL,
- const String& rFileName) = 0;
- virtual void NotifyChannelObjData(const INetURLObject& rURL,
- void* pBuffer, long nOffset, long nLen, long nTotalLen) = 0;
-
- virtual void RegisterChannels() = 0;
- virtual void RegisterUpdateTransmitter() = 0;
-};
-
-#endif //_AGAPI_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/inc/tools/agitem.hxx b/tools/inc/tools/agitem.hxx
deleted file mode 100644
index 869fb99d8510..000000000000
--- a/tools/inc/tools/agitem.hxx
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-#ifndef _AGITEM_HXX
-#define _AGITEM_HXX
-
-#include <tools/solar.h>
-
-class String;
-class INetURLObject;
-class AgentApi;
-class ChApi;
-
-class AgentItem
-{
-public:
- virtual const String& GetChAgentName() const = 0;
- virtual const INetURLObject& GetLocation() const = 0;
- virtual AgentApi* GetApi() const = 0;
- virtual ChApi* GetChApi() const = 0;
-
- virtual void SetIsActive(BOOL bNew) = 0;
- virtual BOOL IsActive() const = 0;
-};
-
-#endif //_AGITEM_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/inc/tools/bigint.hxx b/tools/inc/tools/bigint.hxx
index 544b0b5ef26d..965e85fdbbdb 100644
--- a/tools/inc/tools/bigint.hxx
+++ b/tools/inc/tools/bigint.hxx
@@ -94,8 +94,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;
@@ -200,10 +200,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 cbc16e5950b4..adb9aacc28d2 100644
--- a/tools/inc/tools/cachestr.hxx
+++ b/tools/inc/tools/cachestr.hxx
@@ -43,7 +43,7 @@ class TOOLS_DLLPUBLIC SvCacheStream : public SvStream
{
private:
String aFileName;
- ULONG nMaxSize;
+ sal_uIntPtr nMaxSize;
int bPersistent;
SvStream* pSwapStream;
@@ -52,17 +52,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);
@@ -73,10 +73,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/chapi.hxx b/tools/inc/tools/chapi.hxx
deleted file mode 100644
index d83367a4a246..000000000000
--- a/tools/inc/tools/chapi.hxx
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-#ifndef _CHAPI_HXX
-#define _CHAPI_HXX
-
-#include <tools/solar.h>
-
-class ChannelAgentItem;
-class INetURLObject;
-class String;
-
-enum RequestType {
- REQTYP_LOCAL_FILE = 1,
- REQTYP_MEMORY = 2
-};
-
-class ChApi
-{
-public:
- virtual ~ChApi() {}
-
- virtual void ShutDownAgent() = 0;
- virtual void SetLastSuccUpd() = 0;
-
- virtual void GetChannelObject( const INetURLObject& rURL, RequestType eStreamType,
- const String& rFileName ) = 0;
- virtual void AddChannelItem( const String& aChName, const INetURLObject& aTransmitter,
- const String& aChannel, USHORT nUpdPeriode,
- const String& rChAgentName ) = 0;
- virtual void DelChannelItem( const String& aChName ) = 0;
- virtual void SetChTransmitter( const String& aChName, const String& rNewVal ) = 0;
- virtual void SetChannel( const String& aChName, const String& rNewVal ) = 0;
- virtual void SetChannelName( const String& aChName, const String& rNewVal ) = 0;
- virtual void SetChUpdPeriode( const String& aChName, USHORT nUpdPeriode ) = 0;
- virtual void SetChannelAgentName( const String& aChName, const String& rNewVal ) = 0;
-
- virtual void SetUpdateTransmitter(ChannelAgentItem* pAgent, const INetURLObject& rTransmitter) = 0;
-};
-
-////////////////////////////////////////////////////////////////////////////////
-//
-
-#endif //_CHAPI_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/inc/tools/color.hxx b/tools/inc/tools/color.hxx
index a46fc60ea554..a75319d89677 100644
--- a/tools/inc/tools/color.hxx
+++ b/tools/inc/tools/color.hxx
@@ -40,24 +40,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 )
@@ -107,7 +107,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 -
@@ -121,9 +121,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!
@@ -132,58 +132,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 );
@@ -192,43 +192,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 d18d410452b2..fae05fb8bc42 100644
--- a/tools/inc/tools/config.hxx
+++ b/tools/inc/tools/config.hxx
@@ -45,13 +45,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
@@ -67,9 +67,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;
@@ -77,19 +77,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 d619b8979bc1..ea70c1756f3a 100644
--- a/tools/inc/tools/contnr.hxx
+++ b/tools/inc/tools/contnr.hxx
@@ -40,7 +40,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
@@ -51,11 +51,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
@@ -64,49 +64,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();
@@ -116,8 +116,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 d87fa54b999f..183f6af43fbd 100644
--- a/tools/inc/tools/date.hxx
+++ b/tools/inc/tools/date.hxx
@@ -55,7 +55,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); }
@@ -63,40 +63,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 )
@@ -114,7 +114,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 280b5d81cef7..d12a276d0f03 100644
--- a/tools/inc/tools/datetime.hxx
+++ b/tools/inc/tools/datetime.hxx
@@ -48,29 +48,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 83587597312d..a4cec07f30c2 100644
--- a/tools/inc/tools/debug.hxx
+++ b/tools/inc/tools/debug.hxx
@@ -92,15 +92,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];
@@ -137,7 +137,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 )
{
@@ -179,7 +179,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
@@ -198,9 +198,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()
@@ -218,34 +218,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 )
@@ -254,41 +254,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 )
@@ -325,8 +325,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 ---
@@ -335,27 +335,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 );
}
@@ -372,7 +372,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
@@ -381,7 +381,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
{
@@ -389,11 +389,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/download.hxx b/tools/inc/tools/download.hxx
deleted file mode 100644
index 7f4363631ebf..000000000000
--- a/tools/inc/tools/download.hxx
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-#ifndef _DOWNLOAD_HXX
-#define _DOWNLOAD_HXX
-
-// Forward declarations
-class String;
-class Link;
-
-#define DOWNLOAD_SUCCESS 0
-#define DOWNLOAD_CONNECT 1
-#define DOWNLOAD_LOCATION 2
-#define DOWNLOAD_ABORT 3
-#define DOWNLOAD_FILEACCESS 4
-#define DOWNLOAD_INSTALL 5
-#define DOWNLOAD_ERROR 6
-
-class Downloader
-/* ***************************************************************************
-Purpose: Abstract base class for a file downloader
-*************************************************************************** */
-{
-public:
- Downloader() {};
-
- virtual void Download(const String &rDestLocation,
- const String &rSourceLocation,
- const Link &rFinishedLink) = 0;
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/inc/tools/dynary.hxx b/tools/inc/tools/dynary.hxx
index abbd7d93d2ff..fb2fcce0d17b 100644
--- a/tools/inc/tools/dynary.hxx
+++ b/tools/inc/tools/dynary.hxx
@@ -45,26 +45,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 ); }
};
@@ -80,20 +80,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 ); } \
@@ -102,9 +102,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/eacopier.hxx b/tools/inc/tools/eacopier.hxx
deleted file mode 100644
index 8009cd38209c..000000000000
--- a/tools/inc/tools/eacopier.hxx
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-#ifndef _EACOPIER_HXX
-#define _EACOPIER_HXX
-
-#include <tools/solar.h>
-
-class SvFileStream;
-
-class EA_Copier
-{
- static EA_Copier* _pCopier;
-
-public:
- static void Register( EA_Copier* pCopier );
- static EA_Copier* Get();
-
- virtual ~EA_Copier();
- virtual BOOL Copy( const SvFileStream& rFrom, const SvFileStream& rTo ) const = 0;
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/inc/tools/errcode.hxx b/tools/inc/tools/errcode.hxx
index 35e75ca33072..f2cdf4f5e533 100644
--- a/tools/inc/tools/errcode.hxx
+++ b/tools/inc/tools/errcode.hxx
@@ -94,14 +94,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 4d4779bac509..ae407e345885 100644
--- a/tools/inc/tools/errinf.hxx
+++ b/tools/inc/tools/errinf.hxx
@@ -48,18 +48,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);
};
@@ -77,11 +77,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;
};
@@ -92,14 +92,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; }
};
@@ -116,9 +116,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; }
};
@@ -132,8 +132,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() {}
@@ -150,10 +150,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; }
@@ -179,7 +179,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();
@@ -190,8 +190,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);
@@ -203,22 +203,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* );
@@ -232,8 +232,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/fldunit.hxx b/tools/inc/tools/fldunit.hxx
index 60e662e9c7a5..d98cb69185a0 100644
--- a/tools/inc/tools/fldunit.hxx
+++ b/tools/inc/tools/fldunit.hxx
@@ -33,7 +33,6 @@
// - FieldTypes -
// --------------
-// By changes you must also change: rsc/vclrsc.hxx
enum FieldUnit { FUNIT_NONE, FUNIT_MM, FUNIT_CM, FUNIT_M, FUNIT_KM,
FUNIT_TWIP, FUNIT_POINT, FUNIT_PICA,
FUNIT_INCH, FUNIT_FOOT, FUNIT_MILE, FUNIT_CHAR, FUNIT_LINE, FUNIT_CUSTOM,
diff --git a/tools/inc/tools/fontenum.hxx b/tools/inc/tools/fontenum.hxx
index d514f2b1c23c..849bb2720e5c 100644
--- a/tools/inc/tools/fontenum.hxx
+++ b/tools/inc/tools/fontenum.hxx
@@ -128,7 +128,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/fsys.hxx b/tools/inc/tools/fsys.hxx
index 0142de053602..b0854f58daa5 100644
--- a/tools/inc/tools/fsys.hxx
+++ b/tools/inc/tools/fsys.hxx
@@ -148,7 +148,7 @@ typedef int FSysAction;
#define RFS_LOWER "-rfs-"
#define RFS_UPPER "-RFS-"
-typedef ULONG FSysError;
+typedef sal_uIntPtr FSysError;
// FSysExact
enum FSysExact
@@ -161,21 +161,10 @@ enum FSysExact
// - Char-Set -
// ------------
-#if defined(WIN) || defined(W30)
-
-// MS-Windows has different char-sets for file-system and user-interface
-String Gui2FSys( const String& rStr );
-String FSys2Gui( const String& rStr );
-#define GUI2FSYS(s) Gui2FSys( s )
-#define FSYS2GUI(s) FSys2Gui( s )
-
-#else
-
-// all other OS have the same char-set for both
+// Was different for WIN, no longer needed...
#define GUI2FSYS(s) s
#define FSYS2GUI(s) s
-#endif
// ------------
// - FileStat -
@@ -189,9 +178,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;
@@ -212,16 +201,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; }
@@ -232,12 +221,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 );
@@ -264,7 +253,7 @@ friend class FileCopier;
#endif
ByteString aName;
DirEntry* pParent;
- ULONG nError;
+ sal_uIntPtr nError;
DirEntryFlag eFlag;
private:
@@ -284,13 +273,13 @@ private:
FSysPathStyle eStyle );
TOOLS_DLLPRIVATE const DirEntry* ImpGetTopPtr() const;
TOOLS_DLLPRIVATE DirEntry* ImpGetTopPtr();
- 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; }
@@ -298,7 +287,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 );
@@ -309,11 +298,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 = '.' );
@@ -329,31 +318,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;
@@ -363,8 +352,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;
@@ -379,11 +368,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();
};
// --------------
@@ -394,10 +383,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:
@@ -405,7 +394,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 );
@@ -418,11 +407,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; }
@@ -471,7 +460,7 @@ private:
#ifndef _TOOLS_HXX
protected:
- BOOL ImpInsertPointReached( const DirEntry& rIsSmaller,
+ sal_Bool ImpInsertPointReached( const DirEntry& rIsSmaller,
const FileStat& rNewStat,
size_t nCurPos,
size_t nSortIndex ) const;
@@ -493,9 +482,9 @@ public:
FSysError SetSort( FSysSort nSort, ... );
void Reset();
- USHORT Scan( USHORT nCount = 5 );
- size_t Count( BOOL bUpdated = TRUE ) const;
- BOOL Update();
+ sal_uInt16 Scan( sal_uInt16 nCount = 5 );
+ size_t Count( sal_Bool bUpdated = sal_True ) const;
+ sal_Bool Update();
Dir& operator +=( const Dir& rDir );
DirEntry& operator []( size_t nIndex ) const;
@@ -516,7 +505,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
@@ -548,9 +537,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 );
};
@@ -559,7 +548,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 c4fec945e51a..6bb133d8c32e 100644
--- a/tools/inc/tools/gen.hxx
+++ b/tools/inc/tools/gen.hxx
@@ -85,8 +85,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 );
@@ -103,12 +103,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));
}
@@ -130,10 +130,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 );
@@ -172,22 +172,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);
}
@@ -291,7 +291,7 @@ public:
long& Min() { return nA; }
long& Max() { return nB; }
- BOOL IsInside( long nIs ) const;
+ sal_Bool IsInside( long nIs ) const;
void Justify();
};
@@ -304,7 +304,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 ));
}
@@ -340,11 +340,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(); }
@@ -365,7 +365,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 ));
}
@@ -436,15 +436,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 );
@@ -502,7 +502,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));
}
@@ -655,7 +655,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 ) &&
@@ -663,7 +663,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 97a6b963cdb0..9501ac771a83 100644
--- a/tools/inc/tools/geninfo.hxx
+++ b/tools/inc/tools/geninfo.hxx
@@ -63,7 +63,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();
@@ -74,18 +74,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 )
@@ -133,43 +133,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); }
@@ -178,7 +178,7 @@ GenericLockInformation( const ByteString &rKey, const ByteString &rValue,
private:
LockState aLockState;
- UINT32 nLockKey;
+ sal_uInt32 nLockKey;
};
//
@@ -199,7 +199,7 @@ private:
protected:
// methods
- size_t InsertSorted( GenericInformation *pInfo, BOOL bOverwrite,
+ size_t InsertSorted( GenericInformation *pInfo, sal_Bool bOverwrite,
size_t nStart, size_t nEnd );
GenericInformation *Search( size_t &rPos, ByteString sKey,
size_t nStart, size_t nEnd );
@@ -210,20 +210,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 cbca2169b518..552b702c4084 100644..100755
--- a/tools/inc/tools/globname.hxx
+++ b/tools/inc/tools/globname.hxx
@@ -38,8 +38,8 @@
*************************************************************************/
struct ImpSvGlobalName
{
- BYTE szData[ 16 ];
- USHORT nRefCount;
+ sal_uInt8 szData[ 16 ];
+ sal_uInt16 nRefCount;
ImpSvGlobalName()
{
@@ -48,7 +48,7 @@ struct ImpSvGlobalName
ImpSvGlobalName( const ImpSvGlobalName & rObj );
ImpSvGlobalName( int );
- BOOL operator == ( const ImpSvGlobalName & rObj ) const;
+ sal_Bool operator == ( const ImpSvGlobalName & rObj ) const;
};
#ifdef WNT
@@ -77,9 +77,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 );
@@ -90,16 +90,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
@@ -112,7 +112,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
@@ -127,9 +127,9 @@ public:
~SvGlobalNameList();
void Append( const SvGlobalName & );
- SvGlobalName GetObject( ULONG );
- BOOL IsEntry( const SvGlobalName & rName );
- ULONG Count() const { return aList.size(); }
+ SvGlobalName GetObject( sal_uLong );
+ sal_Bool IsEntry( const SvGlobalName & rName );
+ size_t Count() const { return aList.size(); }
private:
// nicht erlaubt
SvGlobalNameList( const SvGlobalNameList & );
diff --git a/tools/inc/tools/inetmime.hxx b/tools/inc/tools/inetmime.hxx
index f02a487987ea..4c07917ebf1c 100644..100755
--- a/tools/inc/tools/inetmime.hxx
+++ b/tools/inc/tools/inetmime.hxx
@@ -1425,7 +1425,7 @@ public:
void Clear();
- void Insert(INetContentTypeParameter * pParameter, ULONG nIndex)
+ void Insert(INetContentTypeParameter * pParameter, sal_uIntPtr nIndex)
{
maEntries.insert(maEntries.begin()+nIndex,pParameter);
}
@@ -1435,7 +1435,7 @@ public:
maEntries.push_back(pParameter);
}
- inline const INetContentTypeParameter * GetObject(ULONG nIndex) const
+ inline const INetContentTypeParameter * GetObject(sal_uIntPtr nIndex) const
{
return &(maEntries[nIndex]);
}
diff --git a/tools/inc/tools/inetmsg.hxx b/tools/inc/tools/inetmsg.hxx
index 63af8114ddf8..c22e63208781 100644
--- a/tools/inc/tools/inetmsg.hxx
+++ b/tools/inc/tools/inetmsg.hxx
@@ -112,7 +112,7 @@ class INetMessage
{
List m_aHeaderList;
- ULONG m_nDocSize;
+ sal_uIntPtr m_nDocSize;
UniString m_aDocName;
SvLockBytesRef m_xDocLB;
@@ -121,7 +121,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));
@@ -132,7 +132,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));
@@ -143,7 +143,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)
@@ -162,7 +162,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);
@@ -188,19 +188,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));
@@ -210,16 +210,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; }
@@ -247,7 +247,7 @@ public:
*=====================================================================*/
class INetMessageHeaderIterator
{
- ULONG nValueCount;
+ sal_uIntPtr nValueCount;
List aValueList;
UniString aEmptyString;
@@ -256,8 +256,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)
{
@@ -297,7 +297,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;
@@ -310,14 +310,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.
*/
@@ -491,23 +491,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;
@@ -520,14 +520,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.
*/
@@ -571,34 +571,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 91fb416e1544..16de7beedd98 100644
--- a/tools/inc/tools/inetstrm.hxx
+++ b/tools/inc/tools/inetstrm.hxx
@@ -61,13 +61,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);
@@ -84,13 +84,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);
};
/*
@@ -103,7 +103,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);
};
@@ -129,9 +129,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;
@@ -141,24 +141,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; }
};
/*
@@ -167,20 +167,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);
@@ -189,8 +189,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; }
};
/*
@@ -205,7 +205,7 @@ class INetMessageIOStream
INetMessageIOStream& operator= (const INetMessageIOStream& rStrm);
public:
- INetMessageIOStream (ULONG nBufferSize = 2048);
+ INetMessageIOStream (sal_uIntPtr nBufferSize = 2048);
virtual ~INetMessageIOStream (void);
};
@@ -227,7 +227,7 @@ class TOOLS_DLLPUBLIC INetMIMEMessageStream : public INetMessageIOStream
{
int eState;
- ULONG nChildIndex;
+ sal_uIntPtr nChildIndex;
INetMIMEMessageStream *pChildStrm;
INetMessageEncoding eEncoding;
@@ -244,11 +244,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 83f4e2530bae..23f0a1b68534 100644
--- a/tools/inc/tools/iparser.hxx
+++ b/tools/inc/tools/iparser.hxx
@@ -73,18 +73,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;
@@ -92,10 +92,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();
@@ -103,15 +103,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
@@ -130,15 +130,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 592aeecce899..ffe1ceec69b1 100644
--- a/tools/inc/tools/line.hxx
+++ b/tools/inc/tools/line.hxx
@@ -61,9 +61,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 85ce0b344833..02187e339187 100644
--- a/tools/inc/tools/link.hxx
+++ b/tools/inc/tools/link.hxx
@@ -113,14 +113,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()
@@ -140,20 +140,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 dcbf54f9ae15..9f920356b489 100644
--- a/tools/inc/tools/list.hxx
+++ b/tools/inc/tools/list.hxx
@@ -57,18 +57,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 ); }
};
@@ -84,16 +84,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 ); } \
@@ -101,13 +101,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, \
@@ -115,16 +115,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(); } \
@@ -135,9 +135,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/mapunit.hxx b/tools/inc/tools/mapunit.hxx
index 53e9c61b8d26..e57316c8c380 100644
--- a/tools/inc/tools/mapunit.hxx
+++ b/tools/inc/tools/mapunit.hxx
@@ -33,7 +33,6 @@
// - MapMode-Types -
// -----------------
-// By changes you must also change: rsc/vclrsc.hxx
enum MapUnit { MAP_100TH_MM, MAP_10TH_MM, MAP_MM, MAP_CM,
MAP_1000TH_INCH, MAP_100TH_INCH, MAP_10TH_INCH, MAP_INCH,
MAP_POINT, MAP_TWIP, MAP_PIXEL, MAP_SYSFONT, MAP_APPFONT,
diff --git a/tools/inc/tools/mempool.hxx b/tools/inc/tools/mempool.hxx
index 9544f33f35fa..6bd13859c80f 100644
--- a/tools/inc/tools/mempool.hxx
+++ b/tools/inc/tools/mempool.hxx
@@ -42,9 +42,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 e077914c8eea..bb74783a7a35 100644
--- a/tools/inc/tools/multisel.hxx
+++ b/tools/inc/tools/multisel.hxx
@@ -52,17 +52,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 size_t ImplFindSubSelection( long nIndex ) const;
- TOOLS_DLLPRIVATE BOOL ImplMergeSubSelections( size_t nPos1, size_t nPos2 );
+ TOOLS_DLLPRIVATE sal_Bool ImplMergeSubSelections( size_t nPos1, size_t nPos2 );
TOOLS_DLLPRIVATE long ImplFwdUnselected();
TOOLS_DLLPRIVATE long ImplBwdUnselected();
#endif
@@ -77,18 +77,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 );
@@ -97,9 +97,9 @@ 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();
diff --git a/tools/inc/tools/ownlist.hxx b/tools/inc/tools/ownlist.hxx
index f0d708a88ba8..715734f162f6 100644
--- a/tools/inc/tools/ownlist.hxx
+++ b/tools/inc/tools/ownlist.hxx
@@ -36,8 +36,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; } \
@@ -49,18 +49,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 ) \
@@ -68,7 +68,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; \
@@ -83,7 +83,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 09cfeebfdb49..02d2355e5af9 100644
--- a/tools/inc/tools/poly.hxx
+++ b/tools/inc/tools/poly.hxx
@@ -86,16 +86,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; }
};
// -----------
@@ -124,57 +124,57 @@ 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;
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
@@ -205,21 +205,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;
@@ -232,7 +232,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;
@@ -252,32 +252,32 @@ private:
ImplPolyPolygon* mpImplPolyPolygon;
- 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 );
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
@@ -308,17 +308,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 9b7fbf729942..60c83173d6e4 100644
--- a/tools/inc/tools/postsys.h
+++ b/tools/inc/tools/postsys.h
@@ -35,6 +35,7 @@
#undef Polygon
#undef Rectangle
#undef ULONG
+#undef sal_Bool
#undef BYTE
#undef BOOL
#undef DELETE
@@ -234,9 +235,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/presys.h b/tools/inc/tools/presys.h
index fe7cc68d9460..fb88c7323019 100644
--- a/tools/inc/tools/presys.h
+++ b/tools/inc/tools/presys.h
@@ -28,15 +28,12 @@
/* nicht geschuetzt, darf nur einmal includet werden */
-// Konflíkt mit den Tools-Pair vermeiden
+// Konfl�kt mit den Tools-Pair vermeiden
#define Pair StlPair
#if defined WNT
-#define BOOL WIN_BOOL
-#define BYTE WIN_BYTE
#define ULONG WIN_ULONG
-
#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 bed32750929c..151b0fe46279 100644
--- a/tools/inc/tools/prex.h
+++ b/tools/inc/tools/prex.h
@@ -30,10 +30,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 a435fc586539..68b4932e1e51 100644
--- a/tools/inc/tools/pstm.hxx
+++ b/tools/inc/tools/pstm.hxx
@@ -49,11 +49,11 @@ typedef void * (*SvCreateInstancePersist)( SvPersistBase ** );
class TOOLS_DLLPUBLIC SvClassManager
{
- typedef boost::unordered_map< USHORT, SvCreateInstancePersist > Map;
+ typedef boost::unordered_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 **************************/
@@ -68,11 +68,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 & );
@@ -86,7 +86,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)\
{ \
@@ -109,7 +109,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,
@@ -127,9 +127,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 &);
};
@@ -163,7 +163,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>,
@@ -194,49 +194,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 );
@@ -247,8 +247,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 233ed20ff8ca..c32880b764d5 100644
--- a/tools/inc/tools/queue.hxx
+++ b/tools/inc/tools/queue.hxx
@@ -46,19 +46,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 ); }
};
@@ -73,8 +73,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 ) {} \
@@ -82,12 +82,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 ); } \
@@ -96,9 +96,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.h b/tools/inc/tools/rc.h
index dd6ddd8a548a..ce735d6a70e3 100644
--- a/tools/inc/tools/rc.h
+++ b/tools/inc/tools/rc.h
@@ -51,6 +51,7 @@ typedef short RSWND_STYLE;
#define WINDOW_EXTRALONG 0x0800
#define WINDOW_UNIQUEID 0x1000
#define WINDOW_BORDER_STYLE 0x2000
+#define WINDOW_HELPID 0x4000
// Definition der Struktur die alle "WorkWindow"-Resourcen haben
#define WORKWIN_SHOWNORMAL 0
diff --git a/tools/inc/tools/rc.hxx b/tools/inc/tools/rc.hxx
index 1720c96c4680..a6310197e442 100644
--- a/tools/inc/tools/rc.hxx
+++ b/tools/inc/tools/rc.hxx
@@ -43,7 +43,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
@@ -57,7 +57,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()
@@ -88,6 +88,9 @@ class TOOLS_DLLPUBLIC Resource
// read a string from resource data and increment pointer
UniString ReadStringRes()
{ return m_pResMgr->ReadString(); }
+ // read a byte string from resource data and increment pointer
+ rtl::OString ReadByteStringRes()
+ { return m_pResMgr->ReadByteString(); }
// Gibt die Resource frei (this-Zeiger fuer Fehlerueberpruefung)
// free the resource from m_pResMgr's stack (pass this ptr for validation)
diff --git a/tools/inc/tools/ref.hxx b/tools/inc/tools/ref.hxx
index e1e20ebe5448..9ef9fd0d1776 100644
--- a/tools/inc/tools/ref.hxx
+++ b/tools/inc/tools/ref.hxx
@@ -73,7 +73,7 @@ public: \
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; } \
@@ -101,8 +101,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) \
@@ -117,7 +117,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 =\
@@ -125,17 +125,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 & );\
};
@@ -149,12 +149,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(); } \
@@ -165,7 +165,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 ) \
@@ -187,7 +187,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; \
@@ -202,7 +202,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; \
@@ -214,7 +214,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 ) );\
}
@@ -226,23 +226,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();\
@@ -252,11 +252,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);}\
@@ -264,21 +264,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 );}\
@@ -292,10 +292,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)\
@@ -309,7 +309,7 @@ public:\
#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
@@ -328,9 +328,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;
@@ -341,14 +341,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; }
};
#ifndef EMPTYARG
@@ -419,7 +419,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 96109dad338e..99d0bc45b022 100644
--- a/tools/inc/tools/resid.hxx
+++ b/tools/inc/tools/resid.hxx
@@ -81,7 +81,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 );
}
@@ -149,7 +149,7 @@ class ResId
return *this;
}
- const ResId & SetAutoRelease(BOOL bRelease) const
+ const ResId & SetAutoRelease(sal_Bool bRelease) const
{
if( bRelease )
m_nResId &= ~RSC_DONTRELEASE;
@@ -158,7 +158,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 26d52bebbdb4..72f8d8d2827e 100644
--- a/tools/inc/tools/resmgr.hxx
+++ b/tools/inc/tools/resmgr.hxx
@@ -139,7 +139,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();
@@ -154,7 +154,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,
@@ -166,11 +166,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,20 +182,22 @@ public:
static sal_uInt32 GetObjSize( RSHEADER_TYPE* pHT )
{ return( pHT->GetGlobOff() ); }
- // Liefert einen String aus der Resource
- static sal_uInt32 GetString( UniString& rStr, const BYTE* pStr );
+ // returns a string and its length out of the resource
+ 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 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 );
+ 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();
@@ -207,12 +209,13 @@ public:
const rtl::OUString&GetFileName() const;
- INT16 ReadShort();
- INT32 ReadLong();
+ sal_Int16 ReadShort();
+ sal_Int32 ReadLong();
UniString ReadString();
+ rtl::OString ReadByteString();
- // generate auto help id for current resource stack
- ULONG GetAutoHelpId();
+ // generate auto help id for current resource stack
+ rtl::OString GetAutoHelpId();
static void SetReadStringHook( ResHookProc pProc );
static ResHookProc GetReadStringHook();
diff --git a/tools/inc/tools/rtti.hxx b/tools/inc/tools/rtti.hxx
index 98e9152502a3..34f14c59f747 100644
--- a/tools/inc/tools/rtti.hxx
+++ b/tools/inc/tools/rtti.hxx
@@ -39,25 +39,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())
@@ -68,12 +68,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) \
@@ -122,16 +122,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 4a77b1d5d14f..0abf98c25c45 100644
--- a/tools/inc/tools/shl.hxx
+++ b/tools/inc/tools/shl.hxx
@@ -110,7 +110,7 @@
#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 09ad054a8257..a68d32ef588a 100644
--- a/tools/inc/tools/solar.h
+++ b/tools/inc/tools/solar.h
@@ -35,56 +35,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; */
-
-#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 )
#ifdef WNT
@@ -110,69 +78,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
@@ -343,7 +311,6 @@ template<typename T> inline T Abs(T a) { return (a>=0?a:-a); }
// -----------------------------------------------------------------------
-#define NOOLDSTRING
#ifndef NOREPLACESTRING
#define UniString String
#define XubString String
@@ -355,7 +322,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 ----------------------------------------
@@ -369,7 +336,7 @@ template<typename T> inline T Abs(T a) { return (a>=0?a:-a); }
#define LIBRARY_CONCAT4( s1, s2, s3, s4 ) \
s1 s2 s3 s4
-#if defined WIN || defined WNT || defined OS2
+#if defined WNT || defined OS2
#define SVLIBRARY( Base ) \
LIBRARY_CONCAT3( Base, __DLLEXTENSION, ".DLL" )
#define SVLIBRARYLANG( Base, Lang ) \
diff --git a/tools/inc/tools/stack.hxx b/tools/inc/tools/stack.hxx
index 2794c554f8d3..d3c76d1a0165 100644
--- a/tools/inc/tools/stack.hxx
+++ b/tools/inc/tools/stack.hxx
@@ -45,7 +45,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 ) {}
@@ -56,9 +56,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 ); }
};
@@ -73,8 +73,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 ) {} \
@@ -83,12 +83,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 ); } \
@@ -97,9 +97,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 dc34cdc2d96c..d86df43ce93c 100644
--- a/tools/inc/tools/stream.hxx
+++ b/tools/inc/tools/stream.hxx
@@ -141,16 +141,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; }
@@ -182,7 +182,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) {}
@@ -212,7 +212,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;
@@ -227,7 +227,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);
@@ -256,8 +256,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;
@@ -461,9 +461,20 @@ public:
/// Switch to no endian swapping and write 0xfeff
sal_Bool StartWritingUnicodeText();
- /// Read 16bit, if 0xfeff do nothing, if 0xfffe switch
- /// endian swapping, if none of them put back
- sal_Bool StartReadingUnicodeText();
+
+ /** If eReadBomCharSet==RTL_TEXTENCODING_DONTKNOW: read 16bit,
+ if 0xfeff do nothing (UTF-16), if 0xfffe switch endian
+ swapping (UTF-16), if 0xefbb or 0xbbef read another byte
+ and check for UTF-8. If no UTF-* BOM was detected put all
+ read bytes back. This means that if 2 bytes were read it
+ was an UTF-16 BOM, if 3 bytes were read it was an UTF-8
+ BOM. There is no UTF-7, UTF-32 or UTF-EBCDIC BOM detection!
+
+ If eReadBomCharSet!=RTL_TEXTENCODING_DONTKNOW: only read a
+ BOM of that encoding and switch endian swapping if UTF-16
+ and 0xfffe.
+ */
+ sal_Bool StartReadingUnicodeText( rtl_TextEncoding eReadBomCharSet );
/// Read a line of Unicode
sal_Bool ReadUniStringLine( String& rStr );
@@ -649,7 +660,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;
@@ -685,7 +696,7 @@ inline SvStream& SvStream::WriteNumber( int nInt )
/*
inline SvStream& SvStream::WriteNumber( unsigned int nUInt )
{
- WriteNumber( (ULONG)nUInt );
+ WriteNumber( (sal_uIntPtr)nUInt );
return *this;
}
*/
@@ -825,7 +836,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 ad2afc842b6b..e10e7288d1e8 100644..100755
--- a/tools/inc/tools/string.hxx
+++ b/tools/inc/tools/string.hxx
@@ -168,7 +168,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
@@ -270,29 +270,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();
@@ -305,17 +305,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;
@@ -354,41 +354,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 )); }
};
@@ -438,14 +438,6 @@ typedef struct _UniStringData
#pragma pack()
#endif
-// -------------------
-// - UniString-Types -
-// -------------------
-
-#ifndef NOOLDSTRING
-#define WSTRING_MAXLEN STRING_MAXLEN
-#endif
-
// -------------
// - UniString -
// -------------
@@ -603,23 +595,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;
@@ -663,17 +655,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 daba02272a05..86c5feb4f4dc 100644
--- a/tools/inc/tools/svborder.hxx
+++ b/tools/inc/tools/svborder.hxx
@@ -43,12 +43,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 )
{
@@ -74,7 +74,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 b29c5a955826..bfb91fbe7dc6 100644
--- a/tools/inc/tools/table.hxx
+++ b/tools/inc/tools/table.hxx
@@ -41,34 +41,34 @@
class TOOLS_DLLPUBLIC Table : private Container
{
private:
- ULONG nCount;
- TOOLS_DLLPRIVATE ULONG ImplGetIndex( ULONG nKey, ULONG* pIndex = NULL ) const;
+ sal_uIntPtr nCount;
+ TOOLS_DLLPRIVATE sal_uIntPtr ImplGetIndex( sal_uIntPtr nKey, sal_uIntPtr* pIndex = NULL ) const;
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();
@@ -77,9 +77,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 ); }
};
@@ -106,30 +106,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 ); } \
@@ -142,9 +142,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 f5ca13191e49..a5840d77b34d 100644
--- a/tools/inc/tools/tenccvt.hxx
+++ b/tools/inc/tools/tenccvt.hxx
@@ -51,8 +51,8 @@ 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 );
/*
* Given a Unicode character, return a legacy Microsoft Encoding which
diff --git a/tools/inc/tools/time.hxx b/tools/inc/tools/time.hxx
index 6fb93f2e718c..9b2534013af6 100644
--- a/tools/inc/tools/time.hxx
+++ b/tools/inc/tools/time.hxx
@@ -47,28 +47,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 );
@@ -76,27 +76,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 7758612556fb..9e05b44b4437 100644
--- a/tools/inc/tools/unqid.hxx
+++ b/tools/inc/tools/unqid.hxx
@@ -37,8 +37,8 @@
struct ImpUniqueId
{
- ULONG nId;
- USHORT nRefCount;
+ sal_uIntPtr nId;
+ sal_uInt16 nRefCount;
void Release()
{
nRefCount--;
@@ -72,7 +72,7 @@ public:
pId = rId.pId;
return *this;
}
- ULONG GetId() const { return pId ? pId->nId : 0; }
+ sal_uIntPtr GetId() const { return pId ? pId->nId : 0; }
};
// ---------------------
@@ -81,30 +81,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 1e957aeaa80f..74aa57d54d1a 100644
--- a/tools/inc/tools/unqidx.hxx
+++ b/tools/inc/tools/unqidx.hxx
@@ -41,47 +41,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 )); }
};
@@ -107,30 +107,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 ); } \
@@ -143,9 +143,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/urlkeys.hxx b/tools/inc/tools/urlkeys.hxx
deleted file mode 100644
index 0182e2f2cae5..000000000000
--- a/tools/inc/tools/urlkeys.hxx
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-#ifndef __URLKEYS_HXX
-#define __URLKEYS_HXX
-
-// Defines for common keys in URL files
-
-// ANSI version
-
-#define A_URLSECTION_SHORTCUT "InternetShortcut"
-#define A_URLKEY_URL "URL"
-#define A_URLKEY_TITLE "Title"
-#define A_URLKEY_TARGET "Target"
-#define A_URLKEY_FRAME "Frame"
-#define A_URLKEY_OPENAS "OpenAs"
-#define A_URLKEY_SOICON "SOIcon"
-#define A_URLKEY_WIN_ICONFILE "IconFile"
-#define A_URLKEY_WIN_ICONINDEX "IconIndex"
-#define A_URLKEY_WORKDIR "WorkingDirectory"
-#define A_URLKEY_ARGUMENTS "Arguments"
-#define A_URLKEY_INTERN_ORIGURL "[URL]"
-
-// Unicode version
-
-#define U_URLSECTION_SHORTCUT L"InternetShortcut"
-#define U_URLKEY_URL L"URL"
-#define U_URLKEY_TITLE L"Title"
-#define U_URLKEY_TARGET L"Target"
-#define U_URLKEY_FRAME L"Frame"
-#define U_URLKEY_OPENAS L"OpenAs"
-#define U_URLKEY_SOICON L"SOIcon"
-#define U_URLKEY_WIN_ICONFILE L"IconFile"
-#define U_URLKEY_WIN_ICONINDEX L"IconIndex"
-#define U_URLKEY_WORKDIR L"WorkingDirectory"
-#define U_URLKEY_ARGUMENTS L"Arguments"
-#define U_URLKEY_INTERN_ORIGURL L"[URL]"
-
-# define URLSECTION_SHORTCUT U_URLSECTION_SHORTCUT
-# define URLKEY_URL U_URLKEY_URL
-# define URLKEY_TITLE U_URLKEY_TITLE
-# define URLKEY_TARGET U_URLKEY_TARGET
-# define URLKEY_FRAME U_URLKEY_FRAME
-# define URLKEY_OPENAS U_URLKEY_OPENAS
-# define URLKEY_SOICON U_URLKEY_SOICON
-# define URLKEY_WIN_ICONFILE U_URLKEY_WIN_ICONFILE
-# define URLKEY_WIN_ICONINDEX U_URLKEY_WIN_ICONINDEX
-# define URLKEY_WORKDIR U_URLKEY_WORKDIR
-# define URLKEY_ARGUMENTS U_URLKEY_ARGUMENTS
-# define URLKEY_INTERN_ORIGURL U_URLKEY_INTERN_ORIGURL
-
-#endif // __URLKEYS_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/inc/tools/urlobj.hxx b/tools/inc/tools/urlobj.hxx
index b2a29af841a6..67342db5d161 100644
--- a/tools/inc/tools/urlobj.hxx
+++ b/tools/inc/tools/urlobj.hxx
@@ -82,6 +82,7 @@ namespace com { namespace sun { namespace star { namespace util {
#define INET_DB_SCHEME "db:"
#define INET_BUGID_SCHEME "bugid:"
#define INET_TELNET_SCHEME "telnet://"
+#define INET_HID_SCHEME "hid:"
#define URL_PREFIX_PRIV_SOFFICE "private:"
enum
@@ -140,8 +141,9 @@ enum INetProtocol
INET_PROT_VND_SUN_STAR_TDOC = 29,
INET_PROT_GENERIC = 30,
INET_PROT_SMB = 31,
- INET_PROT_SFTP = 32,
- INET_PROT_END = 33
+ INET_PROT_HID = 32,
+ INET_PROT_SFTP = 33,
+ INET_PROT_END = 34
};
//============================================================================
diff --git a/tools/inc/tools/vcompat.hxx b/tools/inc/tools/vcompat.hxx
index 8fbc897ec62c..dcac766aaf78 100644
--- a/tools/inc/tools/vcompat.hxx
+++ b/tools/inc/tools/vcompat.hxx
@@ -36,10 +36,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 -
@@ -50,22 +50,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 e6d98b7cbb98..4b6d6473ff0b 100644
--- a/tools/inc/tools/vector2d.hxx
+++ b/tools/inc/tools/vector2d.hxx
@@ -88,8 +88,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; }
@@ -98,11 +98,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 a590183c5154..e4f0a0daf7f1 100644
--- a/tools/inc/tools/wintypes.hxx
+++ b/tools/inc/tools/wintypes.hxx
@@ -35,7 +35,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)
@@ -118,14 +118,14 @@ typedef USHORT WindowType;
#define WINDOW_INTROWINDOW (WINDOW_FIRST + 0x4f)
#define WINDOW_LISTBOXWINDOW (WINDOW_FIRST + 0x50)
#define WINDOW_DOCKINGAREA (WINDOW_FIRST + 0x51)
-#define WINDOW_LAST (WINDOW_DOCKINGAREA)
+#define WINDOW_RULER (WINDOW_FIRST + 0x52)
+#define WINDOW_LAST (WINDOW_RULER)
// ---------------
// - Window-Bits -
// ---------------
-// By changes you must also change: rsc/vclrsc.hxx
typedef sal_Int64 WinBits;
// Window-Bits fuer Window
@@ -241,9 +241,6 @@ typedef sal_Int64 WinBits;
#define WB_SCROLL ((WinBits)0x02000000)
#define WB_FORCETABCYCLE ((WinBits)0x04000000)
-// Window-Bits for TabControl
-#define WB_SINGLELINE ((WinBits)0x02000000)
-
// Window-Bits for DockingWindows
#define WB_DOCKBORDER ((WinBits)0x00001000)
@@ -277,9 +274,16 @@ typedef sal_Int64 WinBits;
#define WB_STDPOPUP (WB_BORDER | WB_POPUP | WB_SYSTEMWINDOW | WB_3DLOOK | WB_DIALOGCONTROL)
// For TreeListBox
-#define WB_HASBUTTONS ((WinBits)0x00800000)
-#define WB_HASLINES ((WinBits)0x01000000)
-#define WB_HASLINESATROOT ((WinBits)0x02000000)
+#define WB_HASBUTTONS ((WinBits)SAL_CONST_INT64(0x000100000000))
+#define WB_HASLINES ((WinBits)SAL_CONST_INT64(0x000200000000))
+#define WB_HASLINESATROOT ((WinBits)SAL_CONST_INT64(0x000400000000))
+#define WB_HASBUTTONSATROOT ((WinBits)SAL_CONST_INT64(0x000800000000))
+#define WB_NOINITIALSELECTION ((WinBits)SAL_CONST_INT64(0x001000000000))
+#define WB_HIDESELECTION ((WinBits)SAL_CONST_INT64(0x002000000000))
+#define WB_FORCE_MAKEVISIBLE ((WinBits)SAL_CONST_INT64(0x004000000000))
+// DO NOT USE: 0x008000000000, that's WB_SYSTEMCHILDWINDOW
+#define WB_QUICK_SEARCH ((WinBits)SAL_CONST_INT64(0x010000000000))
+
// For FileOpen Dialog
#define WB_PATH ((WinBits)0x00100000)
@@ -301,7 +305,6 @@ typedef sal_Int64 WinBits;
// - WindowAlign -
// ---------------
-// By changes you must also change: rsc/vclrsc.hxx
enum WindowAlign { WINDOWALIGN_LEFT, WINDOWALIGN_TOP, WINDOWALIGN_RIGHT, WINDOWALIGN_BOTTOM };
enum ImageAlign { IMAGEALIGN_LEFT, IMAGEALIGN_TOP, IMAGEALIGN_RIGHT, IMAGEALIGN_BOTTOM,
IMAGEALIGN_LEFT_TOP, IMAGEALIGN_LEFT_BOTTOM, IMAGEALIGN_TOP_LEFT,
@@ -313,7 +316,6 @@ enum SymbolAlign { SYMBOLALIGN_LEFT, SYMBOLALIGN_RIGHT };
// - TriState -
// ------------
-// By changes you must also change: rsc/vclrsc.hxx
enum TriState { STATE_NOCHECK, STATE_CHECK, STATE_DONTKNOW };
@@ -321,7 +323,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 3e200b2e7f0f..c1c6a33fcaa0 100644
--- a/tools/inc/tools/wldcrd.hxx
+++ b/tools/inc/tools/wldcrd.hxx
@@ -43,7 +43,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();
@@ -53,11 +53,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 9d3a7e4739e2..578f367b4cdd 100644
--- a/tools/inc/tools/zcodec.hxx
+++ b/tools/inc/tools/zcodec.hxx
@@ -74,47 +74,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
@@ -123,7 +123,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 0c602a1e8890..6130f54183d3 100644
--- a/tools/prj/build.lst
+++ b/tools/prj/build.lst
@@ -1,31 +1,3 @@
-tl tools : cppu external offuh ZLIB:zlib EXPAT:expat basegfx comphelper i18npool NULL
-tl tools usr1 - all tl_mkout NULL
-tl tools\bootstrp\isdll get - all tl_bsisdll NULL
-tl tools\bootstrp\addexes get - all tl_bsexes NULL
-tl tools\inc nmake - all tl_inc NULL
-tl tools\prj get - all tl_prj NULL
-tl tools\prj usr7 - all tl_deliver NULL
-tl tools\prj usr42 - all tl_zn NULL
-tl tools\workben get - all tl_wben NULL
-tl tools\source\testtoolloader nmake - all tl_ttloader tl_inc NULL
-tl tools\source\generic nmake - all tl_gen tl_fsys tl_inc NULL
-tl tools\source\memtools nmake - all tl_mem tl_fsys tl_inc NULL
-tl tools\source\debug nmake - all tl_deb tl_fsys tl_inc NULL
-tl tools\source\datetime nmake - all tl_dat tl_fsys tl_inc NULL
-tl tools\source\stream nmake - all tl_str tl_fsys tl_inc NULL
-tl tools\source\rc nmake - all tl_rc tl_fsys tl_inc NULL
-tl tools\source\ref nmake - all tl_ref tl_fsys tl_inc NULL
-tl tools\source\fsys nmake - all tl_fsys tl_inc NULL
-tl tools\source\zcodec nmake - all tl_zco tl_fsys tl_inc NULL
-tl tools\source\communi nmake - all tl_com tl_fsys tl_inc NULL
-tl tools\source\inet nmake - all tl_inet tl_fsys tl_inc NULL
-tl tools\source\reversemap nmake - all tl_reversemap NULL
-tl tools\source\string nmake - all tl_string tl_reversemap tl_fsys tl_inc NULL
-tl tools\source\misc nmake - all tl_misc tl_inc NULL
-tl tools\win\source\dll nmake - w tl_dllw tl_inc NULL
-tl tools\os2\source\dll nmake - p tl_dllp tl_inc NULL
-tl tools\unx\source\dll nmake - u tl_dllu tl_inc NULL
-tl tools\util nmake - all tl_utl tl_com tl_dat tl_deb tl_dllu.u tl_dllp.p tl_dllw.w tl_fsys tl_gen tl_inet tl_mem tl_rc tl_ref tl_str tl_string tl_misc tl_zco tl_ttloader NULL
-tl tools\bootstrp nmake - all tl_bstrp tl_utl tl_inc NULL
-tl tools\bootstrp\addexes2 nmake - all tl_bsexes2 tl_bstrp tl_inc NULL
+tl tools : cppu external offuh ZLIB:zlib EXPAT:expat basegfx comphelper i18npool NULL
+tl tools\prj nmake - all tl_prj NULL
tl tools\qa nmake - all tl_qa tl_utl NULL
diff --git a/tools/prj/d.lst b/tools/prj/d.lst
index 375f2456a0fa..e69de29bb2d1 100644
--- a/tools/prj/d.lst
+++ b/tools/prj/d.lst
@@ -1,120 +0,0 @@
-mkdir: %_DEST%\inc%_EXT%\bootstrp
-
-..\%__SRC%\misc\_ooo_st_btstrp.pdb %_DEST%\lib%_EXT%\_ooo_st_btstrp.pdb
-..\%__SRC%\bin\mkunroll* %_DEST%\bin%_EXT%
-..\%__SRC%\bin\tl?????.dll %_DEST%\bin%_EXT%\tl?????.dll
-..\%__SRC%\bin\tl?????.sym %_DEST%\bin%_EXT%\tl?????.sym
-..\%__SRC%\lib\atools.lib %_DEST%\lib%_EXT%\atools.lib
-..\%__SRC%\lib\btstrp.lib %_DEST%\lib%_EXT%\btstrp.lib
-..\%__SRC%\lib\bootstrp2.lib %_DEST%\lib%_EXT%\bootstrp2.lib
-..\%__SRC%\lib\itools.lib %_DEST%\lib%_EXT%\itools.lib
-..\%__SRC%\lib\lib*.a %_DEST%\lib%_EXT%\lib*.a
-..\%__SRC%\lib\lib*.sl %_DEST%\lib%_EXT%\lib*.sl
-..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT%\lib*.so
-..\%__SRC%\lib\lib*.so.* %_DEST%\lib%_EXT%\lib*.so.*
-..\%__SRC%\lib\lib*.dylib %_DEST%\lib%_EXT%\lib*.dylib
-..\%__SRC%\lib\stdstrm.lib %_DEST%\lib%_EXT%\stdstrm.lib
-..\%__SRC%\misc\tl?????.map %_DEST%\bin%_EXT%\tl?????.map
-..\%__SRC%\slb\btstrpsh.lib %_DEST%\lib%_EXT%\btstrpsh.lib
-
-..\inc\bootstrp\command.hxx %_DEST%\inc%_EXT%\bootstrp\command.hxx
-..\inc\bootstrp\inimgr.hxx %_DEST%\inc%_EXT%\bootstrp\inimgr.hxx
-..\inc\bootstrp\mkcreate.hxx %_DEST%\inc%_EXT%\bootstrp\mkcreate.hxx
-..\inc\bootstrp\prj.hxx %_DEST%\inc%_EXT%\bootstrp\prj.hxx
-
-..\inc\tools\toolsdllapi.h %_DEST%\inc%_EXT%\tools\toolsdllapi.h
-..\inc\tools\weakbase.hxx %_DEST%\inc%_EXT%\tools\weakbase.hxx
-..\inc\tools\weakbase.h %_DEST%\inc%_EXT%\tools\weakbase.h
-
-..\inc\tools\postx.h %_DEST%\inc%_EXT%\tools\postx.h
-..\inc\tools\prex.h %_DEST%\inc%_EXT%\tools\prex.h
-
-..\inc\tools\svlibrary.hxx %_DEST%\inc%_EXT%\tools\svlibrary.hxx
-..\inc\tools\solarmutex.hxx %_DEST%\inc%_EXT%\tools\solarmutex.hxx
-..\inc\tools\wintypes.hxx %_DEST%\inc%_EXT%\tools\wintypes.hxx
-..\inc\tools\mapunit.hxx %_DEST%\inc%_EXT%\tools\mapunit.hxx
-..\inc\tools\fldunit.hxx %_DEST%\inc%_EXT%\tools\fldunit.hxx
-..\inc\tools\fontenum.hxx %_DEST%\inc%_EXT%\tools\fontenum.hxx
-..\inc\tools\agapi.hxx %_DEST%\inc%_EXT%\tools\agapi.hxx
-..\inc\tools\agitem.hxx %_DEST%\inc%_EXT%\tools\agitem.hxx
-..\inc\tools\appendunixshellword.hxx %_DEST%\inc%_EXT%\tools\appendunixshellword.hxx
-..\inc\tools\bigint.hxx %_DEST%\inc%_EXT%\tools\bigint.hxx
-..\inc\tools\cachestr.hxx %_DEST%\inc%_EXT%\tools\cachestr.hxx
-..\inc\tools\chapi.hxx %_DEST%\inc%_EXT%\tools\chapi.hxx
-..\inc\tools\color.hxx %_DEST%\inc%_EXT%\tools\color.hxx
-..\inc\tools\contnr.hxx %_DEST%\inc%_EXT%\tools\contnr.hxx
-..\inc\tools\date.hxx %_DEST%\inc%_EXT%\tools\date.hxx
-..\inc\tools\datetime.hxx %_DEST%\inc%_EXT%\tools\datetime.hxx
-..\inc\tools\debug.hxx %_DEST%\inc%_EXT%\tools\debug.hxx
-..\inc\tools\diagnose_ex.h %_DEST%\inc%_EXT%\tools\diagnose_ex.h
-..\inc\tools\download.hxx %_DEST%\inc%_EXT%\tools\download.hxx
-..\inc\tools\dynary.hxx %_DEST%\inc%_EXT%\tools\dynary.hxx
-..\inc\tools\errcode.hxx %_DEST%\inc%_EXT%\tools\errcode.hxx
-..\inc\tools\errinf.hxx %_DEST%\inc%_EXT%\tools\errinf.hxx
-..\inc\tools\extendapplicationenvironment.hxx %_DEST%\inc%_EXT%\tools\extendapplicationenvironment.hxx
-..\inc\tools\fract.hxx %_DEST%\inc%_EXT%\tools\fract.hxx
-..\inc\tools\fsys.hxx %_DEST%\inc%_EXT%\tools\fsys.hxx
-..\inc\tools\eacopier.hxx %_DEST%\inc%_EXT%\tools\eacopier.hxx
-..\inc\tools\gen.hxx %_DEST%\inc%_EXT%\tools\gen.hxx
-..\inc\tools\globname.hxx %_DEST%\inc%_EXT%\tools\globname.hxx
-..\inc\tools\inetdef.hxx %_DEST%\inc%_EXT%\tools\inetdef.hxx
-..\inc\tools\inetmime.hxx %_DEST%\inc%_EXT%\tools\inetmime.hxx
-..\inc\tools\inetmsg.hxx %_DEST%\inc%_EXT%\tools\inetmsg.hxx
-..\inc\tools\inetstrm.hxx %_DEST%\inc%_EXT%\tools\inetstrm.hxx
-..\inc\tools\link.hxx %_DEST%\inc%_EXT%\tools\link.hxx
-..\inc\tools\list.hxx %_DEST%\inc%_EXT%\tools\list.hxx
-..\inc\tools\mempool.hxx %_DEST%\inc%_EXT%\tools\mempool.hxx
-..\inc\tools\multisel.hxx %_DEST%\inc%_EXT%\tools\multisel.hxx
-..\inc\tools\ownlist.hxx %_DEST%\inc%_EXT%\tools\ownlist.hxx
-..\inc\tools\postsys.h %_DEST%\inc%_EXT%\tools\postsys.h
-..\inc\tools\presys.h %_DEST%\inc%_EXT%\tools\presys.h
-..\inc\tools\pstm.hxx %_DEST%\inc%_EXT%\tools\pstm.hxx
-..\inc\tools\queue.hxx %_DEST%\inc%_EXT%\tools\queue.hxx
-..\inc\tools\rc.h %_DEST%\inc%_EXT%\tools\rc.h
-..\inc\tools\rc.hxx %_DEST%\inc%_EXT%\tools\rc.hxx
-..\inc\tools\rcid.h %_DEST%\inc%_EXT%\tools\rcid.h
-..\inc\tools\ref.hxx %_DEST%\inc%_EXT%\tools\ref.hxx
-..\inc\tools\resid.hxx %_DEST%\inc%_EXT%\tools\resid.hxx
-..\inc\tools\resmgr.hxx %_DEST%\inc%_EXT%\tools\resmgr.hxx
-..\inc\tools\StringListResource.hxx %_DEST%\inc%_EXT%\tools\StringListResource.hxx
-..\inc\tools\isofallback.hxx %_DEST%\inc%_EXT%\tools\isofallback.hxx
-..\inc\tools\rtti.hxx %_DEST%\inc%_EXT%\tools\rtti.hxx
-..\inc\tools\shl.hxx %_DEST%\inc%_EXT%\tools\shl.hxx
-..\inc\tools\simplerm.hxx %_DEST%\inc%_EXT%\tools\simplerm.hxx
-..\inc\tools\solar.h %_DEST%\inc%_EXT%\tools\solar.h
-..\inc\tools\stack.hxx %_DEST%\inc%_EXT%\tools\stack.hxx
-..\inc\tools\stream.hxx %_DEST%\inc%_EXT%\tools\stream.hxx
-..\inc\tools\string.hxx %_DEST%\inc%_EXT%\tools\string.hxx
-..\inc\tools\svwin.h %_DEST%\inc%_EXT%\tools\svwin.h
-..\inc\tools\table.hxx %_DEST%\inc%_EXT%\tools\table.hxx
-..\inc\tools\tenccvt.hxx %_DEST%\inc%_EXT%\tools\tenccvt.hxx
-..\inc\tools\time.hxx %_DEST%\inc%_EXT%\tools\time.hxx
-..\inc\tools\tools.h %_DEST%\inc%_EXT%\tools\tools.h
-..\inc\tools\unqid.hxx %_DEST%\inc%_EXT%\tools\unqid.hxx
-..\inc\tools\unqidx.hxx %_DEST%\inc%_EXT%\tools\unqidx.hxx
-..\inc\tools\urlkeys.hxx %_DEST%\inc%_EXT%\tools\urlkeys.hxx
-..\inc\tools\urlobj.hxx %_DEST%\inc%_EXT%\tools\urlobj.hxx
-..\inc\tools\vcompat.hxx %_DEST%\inc%_EXT%\tools\vcompat.hxx
-..\inc\tools\wldcrd.hxx %_DEST%\inc%_EXT%\tools\wldcrd.hxx
-..\inc\tools\zcodec.hxx %_DEST%\inc%_EXT%\tools\zcodec.hxx
-..\inc\tools\tempfile.hxx %_DEST%\inc%_EXT%\tools\tempfile.hxx
-..\inc\tools\geninfo.hxx %_DEST%\inc%_EXT%\tools\geninfo.hxx
-..\inc\tools\iparser.hxx %_DEST%\inc%_EXT%\tools\iparser.hxx
-..\inc\tools\config.hxx %_DEST%\inc%_EXT%\tools\config.hxx
-..\inc\tools\resary.hxx %_DEST%\inc%_EXT%\tools\resary.hxx
-..\inc\tools\poly.hxx %_DEST%\inc%_EXT%\tools\poly.hxx
-..\inc\tools\line.hxx %_DEST%\inc%_EXT%\tools\line.hxx
-..\inc\tools\vector2d.hxx %_DEST%\inc%_EXT%\tools\vector2d.hxx
-..\inc\tools\testtoolloader.hxx %_DEST%\inc%_EXT%\tools\testtoolloader.hxx
-..\inc\tools\svborder.hxx %_DEST%\inc%_EXT%\tools\svborder.hxx
-..\inc\tools\getprocessworkingdir.hxx %_DEST%\inc%_EXT%\tools\getprocessworkingdir.hxx
-..\inc\tools\b3dtrans.hxx %_DEST%\inc%_EXT%\tools\b3dtrans.hxx
-
-..\%__SRC%\bin\rscdep.exe %_DEST%\bin%_EXT%\rscdep.exe
-..\%__SRC%\bin\rscdep %_DEST%\bin%_EXT%\rscdep
-..\%__SRC%\bin\so_checksum.exe %_DEST%\bin%_EXT%\so_checksum.exe
-..\%__SRC%\bin\so_checksum %_DEST%\bin%_EXT%\so_checksum
-
-..\inc\tools\pathutils.hxx %_DEST%\inc%_EXT%\tools\pathutils.hxx
-..\%__SRC%\obj\pathutils.obj %_DEST%\lib%_EXT%\pathutils-obj.obj
-..\%__SRC%\slo\pathutils.obj %_DEST%\lib%_EXT%\pathutils-slo.obj
diff --git a/tools/util/makefile.pmk b/tools/prj/makefile.mk
index 9d8fc0d3ad24..e312a7ccab65 100644
--- a/tools/util/makefile.pmk
+++ b/tools/prj/makefile.mk
@@ -25,7 +25,16 @@
#
#*************************************************************************
-# define TOOLS_DLLIMPLEMENTATION (see @ toolsdllapi.h)
-CDEFS += -DTOOLS_DLLIMPLEMENTATION
+PRJ=..
+TARGET=prj
-VISIBILITY_HIDDEN=TRUE
+.INCLUDE : settings.mk
+
+.IF "$(VERBOSE)"!=""
+VERBOSEFLAG :=
+.ELSE
+VERBOSEFLAG := -s
+.ENDIF
+
+all:
+ 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 988816111def..bc05827ab622 100644
--- a/tools/source/communi/geninfo.cxx
+++ b/tools/source/communi/geninfo.cxx
@@ -56,7 +56,7 @@ GenericInformation::GenericInformation( const ByteString &rKey,
/*****************************************************************************/
GenericInformation::GenericInformation( const GenericInformation& rInf,
- BOOL bCopySubs)
+ sal_Bool bCopySubs)
/*****************************************************************************/
: ByteString( rInf ),
sValue( rInf.sValue ),
@@ -81,15 +81,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 ));
@@ -97,7 +97,7 @@ BOOL GenericInformation::InsertSubInfo( const ByteString &rPathKey, const ByteSt
/*****************************************************************************/
void GenericInformation::RemoveSubInfo( GenericInformation *pInfo,
- BOOL bDelete )
+ sal_Bool bDelete )
/*****************************************************************************/
{
pInfoList->RemoveInfo( pInfo, bDelete );
@@ -105,8 +105,8 @@ void GenericInformation::RemoveSubInfo( GenericInformation *pInfo,
/*****************************************************************************/
GenericInformation *GenericInformation::GetSubInfo( ByteString &rKey,
- BOOL bSearchByPath,
- BOOL bCreatePath )
+ sal_Bool bSearchByPath,
+ sal_Bool bCreatePath )
/*****************************************************************************/
{
if ( !pInfoList && bCreatePath )
@@ -142,7 +142,7 @@ GenericInformationList::GenericInformationList(
for( size_t i = 0; i < rList.size(); i++ )
{
pTemp = rList[ i ];
- pWork = new GenericInformation( *pTemp, TRUE );
+ pWork = new GenericInformation(*pTemp,sal_True);
maList.push_back( pWork );
}
@@ -203,8 +203,8 @@ GenericInformation *GenericInformationList::Search(
/*****************************************************************************/
GenericInformation *GenericInformationList::GetInfo( ByteString &rKey,
- BOOL bSearchByPath,
- BOOL bCreatePath )
+ sal_Bool bSearchByPath,
+ sal_Bool bCreatePath )
/*****************************************************************************/
{
@@ -226,7 +226,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 ));
@@ -236,7 +236,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);
@@ -248,7 +248,7 @@ GenericInformation *GenericInformationList::GetInfo( ByteString &rKey,
/*****************************************************************************/
size_t GenericInformationList::InsertSorted(
GenericInformation *pInfo,
- BOOL bOverwrite,
+ sal_Bool bOverwrite,
size_t nStart,
size_t nEnd
)
@@ -346,21 +346,21 @@ size_t GenericInformationList::InsertSorted(
}
/*****************************************************************************/
-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, maList.size() - 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;
@@ -372,14 +372,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 )
/*****************************************************************************/
{
for (
diff --git a/tools/source/communi/parser.cxx b/tools/source/communi/parser.cxx
index bd2c87846aaf..f0e3534a8dce 100644
--- a/tools/source/communi/parser.cxx
+++ b/tools/source/communi/parser.cxx
@@ -43,9 +43,9 @@
#define cKeyLevelChar '\t'
/*****************************************************************************/
-InformationParser::InformationParser( BOOL bReplace )
+InformationParser::InformationParser( sal_Bool bReplace )
/*****************************************************************************/
- : bRecover( FALSE ),
+ : bRecover( sal_False ),
sOldLine( "" ),
bReplaceVariables( bReplace ),
nLevel( 0 ),
@@ -72,24 +72,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 )
@@ -163,7 +163,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", " " );
@@ -212,17 +212,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;
@@ -249,7 +249,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 ) {
@@ -259,20 +259,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;
}
/*****************************************************************************/
@@ -372,7 +372,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());
@@ -396,33 +396,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 )
/*****************************************************************************/
{
@@ -430,14 +430,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 593d709626d3..05d25edd91b9 100644
--- a/tools/source/datetime/datetime.cxx
+++ b/tools/source/datetime/datetime.cxx
@@ -38,13 +38,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;
}
/*************************************************************************
@@ -53,13 +53,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;
}
/*************************************************************************
@@ -68,13 +68,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;
}
/*************************************************************************
@@ -83,13 +83,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;
}
/*************************************************************************
@@ -134,14 +134,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 );
}
@@ -155,7 +155,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 )
@@ -190,7 +190,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 )
@@ -370,22 +370,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 eca1ab40b49e..fcd739bfda68 100644
--- a/tools/source/datetime/tdate.cxx
+++ b/tools/source/datetime/tdate.cxx
@@ -54,14 +54,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) ) ||
@@ -71,7 +71,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];
@@ -86,13 +86,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;
@@ -101,23 +101,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
{
@@ -126,7 +126,7 @@ static void DaysToDate( long nDays,
if ( (nTempDays != 366) || !ImpIsLeapYear( rYear ) )
{
i--;
- bCalc = TRUE;
+ bCalc = sal_True;
}
}
}
@@ -134,12 +134,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;
}
// =======================================================================
@@ -151,17 +151,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;
@@ -172,65 +172,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;
@@ -308,76 +308,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;
@@ -387,20 +387,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;
@@ -410,16 +410,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;
@@ -429,16 +429,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;
}
@@ -487,9 +487,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 44a626284456..a7efa63c9290 100644
--- a/tools/source/datetime/ttime.cxx
+++ b/tools/source/datetime/ttime.cxx
@@ -146,7 +146,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;
@@ -162,7 +162,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();
@@ -175,7 +175,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();
@@ -191,7 +191,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();
@@ -207,7 +207,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();
@@ -308,7 +308,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() );
@@ -328,7 +328,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;
@@ -344,14 +344,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;
@@ -383,7 +383,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;
@@ -393,14 +393,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);
@@ -410,38 +410,38 @@ 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 11a77ae0b86e..5e10224bc83d 100644
--- a/tools/source/debug/debug.cxx
+++ b/tools/source/debug/debug.cxx
@@ -96,7 +96,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;
};
@@ -106,18 +106,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 ---
@@ -126,31 +126,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;
@@ -164,8 +164,8 @@ struct DebugData
bool bOslIsHooked;
DebugData()
- :bInit( FALSE )
- ,pDbgPrintMsgBox( FALSE )
+ :bInit( sal_False )
+ ,pDbgPrintMsgBox( sal_False )
,pDbgPrintWindow( NULL )
,pDbgPrintTestTool( NULL )
,pProfList( NULL )
@@ -175,7 +175,7 @@ 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;
#ifdef UNX
@@ -186,7 +186,7 @@ struct DebugData
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;
@@ -207,7 +207,7 @@ static DebugData aDebugData;
static sal_Char aCurPath[260];
-static int bDbgImplInMain = FALSE;
+static int bDbgImplInMain = sal_False;
// =======================================================================
@@ -216,7 +216,7 @@ static CRITICAL_SECTION aImplCritDbgSection;
#elif defined( OS2 )
static HMTX hImplCritDbgSection = 0;
#endif
-static BOOL bImplCritDbgSectionInit = FALSE;
+static sal_Bool bImplCritDbgSectionInit = sal_False;
// -----------------------------------------------------------------------
@@ -225,9 +225,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;
}
// -----------------------------------------------------------------------
@@ -239,7 +239,7 @@ void ImplDbgDeInitLock()
#elif defined( OS2 )
DosCloseMutexSem( hImplCritDbgSection );
#endif
- bImplCritDbgSectionInit = FALSE;
+ bImplCritDbgSectionInit = sal_False;
}
// -----------------------------------------------------------------------
@@ -285,7 +285,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];
@@ -293,16 +293,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();
@@ -310,23 +310,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 )
{
@@ -337,7 +337,7 @@ static ULONG ImplGetPerfTime()
double fTicks = nTicks;
fTicks *= 1000;
fTicks /= dImplTicksPerSecond;
- return (ULONG)fTicks;
+ return (sal_uIntPtr)fTicks;
#endif
}
@@ -417,12 +417,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 ] =
{
@@ -430,7 +430,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;
@@ -470,14 +470,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 ] =
{
@@ -487,7 +487,7 @@ namespace
size_t nValueLen = lcl_tryReadConfigString( _pLine, _nLineLen, _pKeyName, aBuf, sizeof( aBuf ) );
if ( nValueLen )
{
- for ( ULONG name = 0; name < SAL_N_ELEMENTS( names ); ++name )
+ for ( size_t name = 0; name < SAL_N_ELEMENTS( names ); ++name )
{
if ( strcmp( aBuf, names[ name ] ) == 0 )
{
@@ -497,7 +497,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 ) );
@@ -509,12 +509,12 @@ namespace
*_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 );
}
}
@@ -560,7 +560,7 @@ void PointerList::Add( const void* p )
pLast = pBlock;
}
- USHORT i = 0;
+ sal_uInt16 i = 0;
while ( pBlock->aData[i] )
i++;
@@ -571,18 +571,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--;
@@ -601,7 +601,7 @@ BOOL PointerList::Remove( const void* p )
delete pBlock;
}
- return TRUE;
+ return sal_True;
}
i++;
}
@@ -609,21 +609,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] )
@@ -644,26 +644,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;
}
@@ -731,7 +731,7 @@ static DebugData* GetDebugData()
{
if ( !aDebugData.bInit )
{
- aDebugData.bInit = TRUE;
+ aDebugData.bInit = sal_True;
// Default Debug-Namen setzen
DbgGetLogFileName( aDebugData.aDbgData.aDebugName );
@@ -745,7 +745,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 ) )
@@ -846,7 +846,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 ) );
@@ -857,7 +857,7 @@ static FILETYPE ImplDbgInitFile()
if ( !bFileInit )
{
- bFileInit = TRUE;
+ bFileInit = sal_True;
if ( pData->aDbgData.bOverwrite )
pDebugFile = FileOpen( pData->aDbgData.aDebugName, "w" );
@@ -936,7 +936,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;
@@ -946,9 +946,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;
}
// -----------------------------------------------------------------------
@@ -956,14 +956,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();
@@ -979,14 +979,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
@@ -1034,7 +1034,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
@@ -1053,9 +1053,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;
@@ -1073,7 +1073,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,
@@ -1123,8 +1123,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() &&
@@ -1153,19 +1153,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();
@@ -1291,7 +1291,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;
@@ -1312,12 +1312,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;
@@ -1338,7 +1338,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();
@@ -1348,7 +1348,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 );
@@ -1431,7 +1431,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();
@@ -1457,19 +1457,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) &&
@@ -1616,16 +1616,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 )
@@ -1648,13 +1648,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;
}
@@ -1692,7 +1692,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
{
@@ -1762,7 +1762,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) {
@@ -1774,7 +1774,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;
@@ -1804,13 +1804,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/makefile.mk b/tools/source/debug/makefile.mk
deleted file mode 100644
index 925ae90f333d..000000000000
--- a/tools/source/debug/makefile.mk
+++ /dev/null
@@ -1,53 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=tools
-TARGET=debug
-
-ENABLE_EXCEPTIONS := TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-CXXFILES= debug.cxx \
- stcktree.cxx
-
-SLOFILES= $(SLO)$/debug.obj \
- $(SLO)$/stcktree.obj
-
-OBJFILES= $(OBJ)$/debug.obj \
- $(OBJ)$/stcktree.obj
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/tools/source/debug/stcktree.cxx b/tools/source/debug/stcktree.cxx
index aa32a26c0184..d2dcbc5fb7a8 100644
--- a/tools/source/debug/stcktree.cxx
+++ b/tools/source/debug/stcktree.cxx
@@ -43,32 +43,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;
@@ -91,7 +91,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 );
@@ -100,7 +100,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_,
@@ -138,7 +138,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_ )
{
@@ -168,9 +168,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 )
{
@@ -191,10 +191,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];
}
}
@@ -210,7 +210,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" );
@@ -239,7 +239,7 @@ void DbgEndStackTree()
// -----------------------------------------------------------------------
-void* DbgGetStackTree( ULONG nAlloc )
+void* DbgGetStackTree( sal_uIntPtr nAlloc )
{
ImpDbgStackTree* pReturn = NULL;
@@ -247,10 +247,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 );
@@ -262,7 +262,7 @@ void* DbgGetStackTree( ULONG nAlloc )
// -----------------------------------------------------------------------
-void DbgFreeStackTree( void* pVoid, ULONG nAlloc )
+void DbgFreeStackTree( void* pVoid, sal_uIntPtr nAlloc )
{
ImpDbgStackTree* p = (ImpDbgStackTree*)pVoid;
@@ -298,7 +298,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:" );
@@ -314,8 +314,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 bcb3d6b89e00..895216f8f3da 100644..100755
--- a/tools/source/fsys/comdep.hxx
+++ b/tools/source/fsys/comdep.hxx
@@ -75,16 +75,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
@@ -112,8 +112,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
};
//--------------------------------------------------------------------
@@ -146,9 +146,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 17b719298132..3bbfae5c6b5d 100644..100755
--- a/tools/source/fsys/dirent.cxx
+++ b/tools/source/fsys/dirent.cxx
@@ -128,11 +128,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 osl::Mutex* pRedirectMutex = 0;
@@ -170,7 +170,7 @@ void FSysRedirector::DoRedirect( String &rPath )
return;
// dont redirect on nested calls
- bInRedirection = TRUE;
+ bInRedirection = sal_True;
// convert to URL
#ifndef UNX
@@ -184,7 +184,7 @@ void FSysRedirector::DoRedirect( String &rPath )
// do redirection
Redirector();
- bInRedirection = FALSE;
+ bInRedirection = sal_False;
return;
}
@@ -279,12 +279,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;
@@ -293,14 +293,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;
@@ -308,7 +308,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 );
@@ -348,7 +348,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
@@ -485,7 +485,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 )
{
@@ -615,7 +615,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 )
@@ -930,7 +930,7 @@ DirEntry* DirEntry::ImpGetTopPtr()
|*
*************************************************************************/
-DirEntry* DirEntry::ImpChangeParent( DirEntry* pNewParent, BOOL bNormalize )
+DirEntry* DirEntry::ImpChangeParent( DirEntry* pNewParent, sal_Bool bNormalize )
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -953,14 +953,14 @@ DirEntry* DirEntry::ImpChangeParent( DirEntry* pNewParent, BOOL bNormalize )
|*
*************************************************************************/
-BOOL DirEntry::Exists( FSysAccess nAccess ) const
+sal_Bool DirEntry::Exists( FSysAccess nAccess ) const
{
#ifndef BOOTSTRAP
static osl::Mutex aLocalMutex;
osl::MutexGuard aGuard( aLocalMutex );
#endif
if ( !IsValid() )
- return FALSE;
+ return sal_False;
#if defined WNT || defined OS2
// spezielle Filenamen sind vom System da
@@ -976,14 +976,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
@@ -1002,7 +1002,7 @@ BOOL DirEntry::Exists( FSysAccess nAccess ) const
|*
*************************************************************************/
-BOOL DirEntry::First()
+sal_Bool DirEntry::First()
{
FSysFailOnErrorImpl();
@@ -1032,12 +1032,12 @@ BOOL DirEntry::First()
{
aName = aFound;
closedir( pDir );
- return TRUE;
+ return sal_True;
}
}
closedir( pDir );
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -1046,8 +1046,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 );
@@ -1341,18 +1341,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
@@ -1417,10 +1417,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
@@ -1442,7 +1442,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 ||
@@ -1613,23 +1613,23 @@ void DirEntry::SetName( const String& rName, FSysPathStyle eFormatter )
|* DirEntry::Find()
|*
*************************************************************************/
-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 );
@@ -1643,11 +1643,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;
}
/*************************************************************************
@@ -1656,7 +1656,7 @@ BOOL DirEntry::Find( const String& rPfad, char cDelim )
|*
*************************************************************************/
-BOOL DirEntry::ImpToRel( String aCurStr )
+sal_Bool DirEntry::ImpToRel( String aCurStr )
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1673,7 +1673,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() );
@@ -1682,7 +1682,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
@@ -1690,7 +1690,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
@@ -1706,7 +1706,7 @@ BOOL DirEntry::ImpToRel( String aCurStr )
// das ist dann unser relativer Pfad
*this = DirEntry( aThisStr, FSYS_STYLE_HPFS );
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -1715,7 +1715,7 @@ BOOL DirEntry::ImpToRel( String aCurStr )
|*
*************************************************************************/
-USHORT DirEntry::CutRelParents()
+sal_uInt16 DirEntry::CutRelParents()
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1729,7 +1729,7 @@ USHORT DirEntry::CutRelParents()
pDir = pPar;
// '..' zaehlen
- USHORT nParCount = 0;
+ sal_uInt16 nParCount = 0;
while ( pPar && pPar->eFlag == FSYS_FLAG_PARENT )
{
++nParCount;
@@ -1751,7 +1751,7 @@ USHORT DirEntry::CutRelParents()
|*
*************************************************************************/
-BOOL DirEntry::ToRel()
+sal_Bool DirEntry::ToRel()
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1766,7 +1766,7 @@ BOOL DirEntry::ToRel()
|*
*************************************************************************/
-BOOL DirEntry::ToRel( const DirEntry& rStart )
+sal_Bool DirEntry::ToRel( const DirEntry& rStart )
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -1846,7 +1846,7 @@ String DirEntry::GetSearchDelimiter( FSysPathStyle eFormatter )
|*
*************************************************************************/
-USHORT DirEntry::GetMaxNameLen( FSysPathStyle eFormatter )
+sal_uInt16 DirEntry::GetMaxNameLen( FSysPathStyle eFormatter )
{
eFormatter = GetStyle( eFormatter );
switch ( eFormatter )
@@ -1889,7 +1889,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 );
@@ -2066,7 +2066,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 );
@@ -2098,7 +2098,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++ )
@@ -2124,8 +2124,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
@@ -2226,11 +2226,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 ||
@@ -2244,16 +2244,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)
@@ -2263,12 +2263,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 ));
}
@@ -2287,8 +2287,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);
@@ -2308,14 +2308,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;
@@ -2387,11 +2387,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 )
@@ -2422,7 +2422,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;
}
/*************************************************************************
@@ -2431,34 +2431,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();
@@ -2472,7 +2472,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 ?
@@ -2487,7 +2487,7 @@ BOOL DirEntry::MakeDir( BOOL bSloppy ) const
}
}
}
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -2591,7 +2591,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() );
}
@@ -2709,10 +2709,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?
@@ -2722,7 +2722,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();
@@ -2823,20 +2823,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;
}
/*************************************************************************
@@ -2845,11 +2845,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 )
{
@@ -2888,7 +2888,7 @@ String DirEntry::ConvertSystemToName( const String &rName )
|*
*************************************************************************/
-BOOL DirEntry::IsValid() const
+sal_Bool DirEntry::IsValid() const
{
return (nError == FSYS_ERR_OK);
}
@@ -2899,9 +2899,9 @@ BOOL DirEntry::IsValid() const
|*
*************************************************************************/
-BOOL DirEntry::IsRFSAvailable()
+sal_Bool DirEntry::IsRFSAvailable()
{
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -2914,18 +2914,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() );
@@ -2933,15 +2933,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 3a7787c93159..82f776b5854a 100644..100755
--- a/tools/source/fsys/filecopy.cxx
+++ b/tools/source/fsys/filecopy.cxx
@@ -143,14 +143,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 ) );
}
}
@@ -224,7 +224,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;
@@ -296,7 +296,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 60b45bd8ebdd..221ed2c0377b 100644..100755
--- a/tools/source/fsys/fstat.cxx
+++ b/tools/source/fsys/fstat.cxx
@@ -29,11 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_tools.hxx"
-#if defined( WIN)
-#include <stdio.h>
-#include <dos.h>
-#endif
-
#ifdef UNX
#include <errno.h>
#endif
@@ -52,12 +47,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;
@@ -72,15 +67,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;
@@ -109,18 +104,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;
}
/*************************************************************************
@@ -129,9 +124,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;
@@ -143,12 +138,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
}
@@ -158,7 +153,7 @@ BOOL FileStat::HasReadOnlyFlag()
|*
*************************************************************************/
-BOOL FileStat::GetReadOnlyFlag( const DirEntry &rEntry )
+sal_Bool FileStat::GetReadOnlyFlag( const DirEntry &rEntry )
{
ByteString aFPath(rEntry.GetFull(), osl_getThreadTextEncoding());
@@ -174,17 +169,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
}
@@ -194,7 +189,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/makefile.mk b/tools/source/fsys/makefile.mk
deleted file mode 100644
index b1d34d6347f3..000000000000
--- a/tools/source/fsys/makefile.mk
+++ /dev/null
@@ -1,67 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=tools
-TARGET=fsys
-ENABLE_EXCEPTIONS=true
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-.IF "$(COM)"=="GCC"
-CFLAGSCXX+=-fexceptions
-.ENDIF
-
-
-# --- Files --------------------------------------------------------
-
-SLOFILES= \
- $(SLO)$/tempfile.obj \
- $(SLO)$/wldcrd.obj \
- $(SLO)$/fstat.obj \
- $(SLO)$/comdep.obj \
- $(SLO)$/filecopy.obj \
- $(SLO)$/dirent.obj \
- $(SLO)$/tdir.obj \
- $(SLO)$/urlobj.obj
-
-OBJFILES= $(OBJ)$/wldcrd.obj \
- $(OBJ)$/fstat.obj \
- $(OBJ)$/comdep.obj \
- $(OBJ)$/filecopy.obj \
- $(OBJ)$/dirent.obj \
- $(OBJ)$/tdir.obj \
- $(OBJ)$/urlobj.obj
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/tools/source/fsys/tdir.cxx b/tools/source/fsys/tdir.cxx
index cf9bd901abc4..575d2c492c5b 100644..100755
--- a/tools/source/fsys/tdir.cxx
+++ b/tools/source/fsys/tdir.cxx
@@ -41,7 +41,7 @@
DBG_NAME( Dir )
-#define APPEND (USHORT) 65535
+#define APPEND (sal_uInt16) 65535
/*************************************************************************
|*
@@ -51,7 +51,7 @@ DBG_NAME( Dir )
|*
*************************************************************************/
-BOOL Dir::ImpInsertPointReached( const DirEntry& rNewEntry,
+sal_Bool Dir::ImpInsertPointReached( const DirEntry& rNewEntry,
const FileStat& rNewStat,
size_t nCurPos, size_t nSortIndex ) const
{
@@ -61,7 +61,7 @@ BOOL Dir::ImpInsertPointReached( const DirEntry& rNewEntry,
// einfache Dinge erfordern einfache Loesungen
if ( pLst->empty() )
- return TRUE;
+ return sal_True;
FSysSort nSort = (*pSortLst)[ nSortIndex ];
FileStat *pOldStat = NULL;
@@ -74,121 +74,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->size() - 1 ) )
- return TRUE;
+ return sal_True;
else
//Rekursion
return ImpInsertPointReached( rNewEntry, rNewStat,
@@ -272,7 +272,7 @@ void Dir::Construct( DirEntryKind nKindFlags )
|*
*************************************************************************/
-BOOL Dir::Update()
+sal_Bool Dir::Update()
{
Reset();
return Scan( USHRT_MAX ) > 0;
@@ -350,10 +350,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
@@ -363,7 +363,7 @@ USHORT Dir::Scan( USHORT nCount )
if ( pLst->empty() )
{
// dann ggf. Laufwerke scannen
- pReader->bInUse = TRUE;
+ pReader->bInUse = sal_True;
nRead = pReader->Init();
}
@@ -484,7 +484,7 @@ Dir::~Dir()
FSysError Dir::ImpSetSort( std::va_list pArgs, int nFirstSort )
{
- BOOL bLast;
+ sal_Bool bLast;
FSysSort aSort;
FSysSortList *pNewSortLst = new FSysSortList;
@@ -495,8 +495,8 @@ FSysError Dir::ImpSetSort( std::va_list pArgs, int nFirstSort )
bLast = FSYS_SORT_END == (aSort & FSYS_SORT_END);
aSort &= ~FSYS_SORT_END;
- FSysSort nSort = aSort & ~(USHORT)FSYS_SORT_ASCENDING
- & ~(USHORT)FSYS_SORT_DESCENDING;
+ FSysSort nSort = aSort & ~(sal_uInt16)FSYS_SORT_ASCENDING
+ & ~(sal_uInt16)FSYS_SORT_DESCENDING;
// g"utliges Sortierkriterium?
if ( ( nSort == FSYS_SORT_NAME ) ||
@@ -630,7 +630,7 @@ Dir& Dir::operator+=( const Dir& rDir )
pLst = new DirEntryList();
//Verlangen die Sortierkriterien FileStat's?
- BOOL bStat = FALSE;
+ sal_Bool bStat = sal_False;
if ( pSortLst ) {
for ( size_t i = 0, n = pSortLst->size(); i < n && !bStat; ++i ) {
if ( (*pSortLst)[ i ]
@@ -638,7 +638,7 @@ Dir& Dir::operator+=( const Dir& rDir )
| FSYS_SORT_ACCESSED | FSYS_SORT_KIND
)
) {
- bStat = TRUE;
+ bStat = sal_True;
}
}
}
@@ -664,7 +664,7 @@ Dir& Dir::operator+=( const Dir& rDir )
*************************************************************************/
-size_t Dir::Count( BOOL bUpdated ) const
+size_t Dir::Count( sal_Bool bUpdated ) const
{
// ggf. erst den Rest lesen
if ( bUpdated && pReader )
diff --git a/tools/source/fsys/unx.cxx b/tools/source/fsys/unx.cxx
index 471d1275ab64..53d319800319 100644
--- a/tools/source/fsys/unx.cxx
+++ b/tools/source/fsys/unx.cxx
@@ -86,18 +86,18 @@ struct mymnttab
#if defined(NETBSD) || defined(FREEBSD) || defined(MACOSX) || \
defined(OPENBSD) || defined(DRAGONFLY)
-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)
@@ -118,34 +118,34 @@ 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
FILE *fp = fopen (MNTTAB, "r");
if (! fp)
- return FALSE;
+ return sal_False;
struct mnttab mnt[1];
while (getmntent (fp, mnt) != -1)
#elif 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
@@ -178,7 +178,7 @@ static BOOL GetMountEntry(dev_t dev, struct mymnttab *mytab)
mytab->mountdevice = dev;
mytab->mymnttab_filesystem = mnt->MOUNTFS;
- return TRUE;
+ return sal_True;
}
# ifdef LINUX
/* #61624# dito */
@@ -186,7 +186,7 @@ static BOOL GetMountEntry(dev_t dev, struct mymnttab *mytab)
# else
fclose (fp);
# endif
- return FALSE;
+ return sal_False;
}
#endif
@@ -197,13 +197,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)
{
#if defined(NETBSD) || defined(DRAGONFLY)
- return TRUE;
+ return sal_True;
#else
struct stat buf;
DirEntry aPath(*this);
@@ -213,7 +213,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];
}
@@ -227,17 +227,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:
@@ -247,19 +247,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;
}
}
@@ -273,16 +273,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;
@@ -345,7 +345,7 @@ DirEntry DirEntry::GetDevice() const
|*
*************************************************************************/
-BOOL DirEntry::SetCWD( BOOL bSloppy ) const
+sal_Bool DirEntry::SetCWD( sal_Bool bSloppy ) const
{
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
@@ -353,31 +353,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)
{
@@ -386,7 +386,7 @@ USHORT DirReader_Impl::Read()
if (!pDosDir)
{
- bReady = TRUE;
+ bReady = sal_True;
return 0;
}
@@ -403,7 +403,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 ) ) ) ||
@@ -423,7 +423,7 @@ USHORT DirReader_Impl::Read()
}
}
else
- bReady = TRUE;
+ bReady = sal_True;
return 0;
}
@@ -448,7 +448,7 @@ FileStat::FileStat( const void *, const void * ):
|* FileStat::Update()
|*
*************************************************************************/
-BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL )
+sal_Bool FileStat::Update( const DirEntry& rDirEntry, sal_Bool )
{
nSize = 0;
@@ -465,7 +465,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
@@ -473,7 +473,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL )
{
nKindFlags = FSYS_KIND_DIR;
nError = FSYS_ERR_OK;
- return TRUE;
+ return sal_True;
}
struct stat aStat;
@@ -494,11 +494,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;
@@ -520,7 +520,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;
}
//====================================================================
@@ -605,7 +605,7 @@ ErrCode FileStat::QueryDiskSpace( const String &, BigInt &, BigInt & )
//=========================================================================
-void FSysEnableSysErrorBox( BOOL )
+void FSysEnableSysErrorBox( sal_Bool )
{
}
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index d313169d127d..1a649747e41c 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -426,6 +426,8 @@ static INetURLObject::SchemeInfo const aSchemeInfoMap[INET_PROT_END]
{ "", "", 0, false, false, false, false, true, true, true, false },
{ "smb", "smb://", 139, true, true, false, true, true, true, true,
true },
+ { "hid", "hid:", 0, false, false, false, false, false, false,
+ false, true },
{ "sftp", "sftp://", 22, true, true, false, true, true, true, true,
true } };
@@ -2136,6 +2138,8 @@ INetURLObject::getPrefix(sal_Unicode const *& rBegin,
{ "db:", "staroffice.db:", INET_PROT_DB, PrefixInfo::INTERNAL },
{ "file:", 0, INET_PROT_FILE, PrefixInfo::OFFICIAL },
{ "ftp:", 0, INET_PROT_FTP, PrefixInfo::OFFICIAL },
+ { "hid:", "staroffice.hid:", INET_PROT_HID,
+ PrefixInfo::INTERNAL },
{ "http:", 0, INET_PROT_HTTP, PrefixInfo::OFFICIAL },
{ "https:", 0, INET_PROT_HTTPS, PrefixInfo::OFFICIAL },
{ "imap:", 0, INET_PROT_IMAP, PrefixInfo::OFFICIAL },
@@ -2171,6 +2175,8 @@ INetURLObject::getPrefix(sal_Unicode const *& rBegin,
INET_PROT_PRIV_SOFFICE, PrefixInfo::EXTERNAL },
{ "staroffice.helpid:", "private:helpid/", INET_PROT_PRIV_SOFFICE,
PrefixInfo::EXTERNAL },
+ { "staroffice.hid:", "hid:", INET_PROT_HID,
+ PrefixInfo::EXTERNAL },
{ "staroffice.java:", "private:java/", INET_PROT_PRIV_SOFFICE,
PrefixInfo::EXTERNAL },
{ "staroffice.macro:", "macro:", INET_PROT_MACRO,
@@ -3164,6 +3170,7 @@ bool INetURLObject::parsePath(INetProtocol eScheme,
case INET_PROT_PRIV_SOFFICE:
case INET_PROT_SLOT:
+ case INET_PROT_HID:
case INET_PROT_MACRO:
case INET_PROT_UNO:
case INET_PROT_COMPONENT:
diff --git a/tools/source/fsys/wldcrd.cxx b/tools/source/fsys/wldcrd.cxx
index e391dd5020c3..acc1ce9a2071 100644..100755
--- a/tools/source/fsys/wldcrd.cxx
+++ b/tools/source/fsys/wldcrd.cxx
@@ -45,7 +45,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;
@@ -110,12 +110,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' )
{
@@ -123,16 +123,16 @@ 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;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/source/fsys/wntmsc.cxx b/tools/source/fsys/wntmsc.cxx
index 1b2d892ec1a2..2ddea1cbe540 100644..100755
--- a/tools/source/fsys/wntmsc.cxx
+++ b/tools/source/fsys/wntmsc.cxx
@@ -48,7 +48,7 @@
int Sys2SolarError_Impl( int nSysErr );
-static BOOL bLastCaseSensitive = FALSE;
+static sal_Bool bLastCaseSensitive = sal_False;
//--------------------------------------------------------------------
@@ -99,7 +99,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 );
@@ -128,7 +128,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;
@@ -173,7 +173,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)
@@ -182,7 +182,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;
@@ -199,30 +199,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:
@@ -233,18 +233,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;
}
}
@@ -258,19 +258,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;
}
@@ -279,10 +279,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;
}
@@ -340,27 +340,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;
}
//-------------------------------------------------------------------------
@@ -420,7 +420,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,".") ||
@@ -428,7 +428,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,".") ||
@@ -437,8 +437,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()) ) )
@@ -459,7 +459,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 );
@@ -478,7 +478,7 @@ USHORT DirReader_Impl::Read()
}
else
- bReady = TRUE;
+ bReady = sal_True;
return 0;
}
@@ -761,13 +761,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();
@@ -776,7 +776,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;
@@ -793,7 +793,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
@@ -802,7 +802,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
@@ -817,7 +817,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 &&
@@ -825,7 +825,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:" ) ) {
@@ -849,7 +849,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;
@@ -859,7 +859,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 )
@@ -873,7 +873,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess )
nError = ERRCODE_NONE;
- return TRUE;
+ return sal_True;
}
// Statusinformation vom Betriebssystem holen
@@ -913,7 +913,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess )
{
nKindFlags = FSYS_KIND_UNKNOWN;
nError = FSYS_ERR_NOTEXISTS;
- return FALSE;
+ return sal_False;
}
// UNC-Volume?
@@ -927,13 +927,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;
}
}
}
@@ -952,7 +952,7 @@ BOOL FileStat::Update( const DirEntry& rDirEntry, BOOL bForceAccess )
{
nKindFlags = FSYS_KIND_WILD;
nError = FSYS_ERR_OK;
- return TRUE;
+ return sal_True;
}
if ( bAccess )
@@ -976,7 +976,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] )
{
@@ -985,7 +985,7 @@ BOOL IsRedirectable_Impl( const ByteString &rPath )
SetLastError( ERROR_SUCCESS );
return DRIVE_FIXED != nType;
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -1033,7 +1033,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 a50498bb0fd9..beeac31ef6fe 100644..100755
--- a/tools/source/fsys/wntmsc.hxx
+++ b/tools/source/fsys/wntmsc.hxx
@@ -52,7 +52,7 @@
//--------------------------------------------------------------------
-#define FSYS_UNIX FALSE
+#define FSYS_UNIX sal_False
#define DOS_DIRECT _A_SUBDIR
#define DOS_VOLUMEID 0x08
@@ -80,7 +80,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 ae99ab7ed886..724ec724748b 100644
--- a/tools/source/generic/bigint.cxx
+++ b/tools/source/generic/bigint.cxx
@@ -50,7 +50,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.
// -----------------------------------------------------------------------
@@ -645,7 +645,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 88bfda6a1a04..9a209b38f754 100644
--- a/tools/source/generic/color.cxx
+++ b/tools/source/generic/color.cxx
@@ -61,10 +61,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
@@ -75,60 +75,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) SAL_BOUND( (long) COLORDATA_RED( mnColor ) + cLumInc, 0L, 255L ) );
- SetGreen( (UINT8) SAL_BOUND( (long) COLORDATA_GREEN( mnColor ) + cLumInc, 0L, 255L ) );
- SetBlue( (UINT8) SAL_BOUND( (long) COLORDATA_BLUE( mnColor ) + cLumInc, 0L, 255L ) );
+ SetRed( (sal_uInt8) SAL_BOUND( (long) COLORDATA_RED( mnColor ) + cLumInc, 0L, 255L ) );
+ SetGreen( (sal_uInt8) SAL_BOUND( (long) COLORDATA_GREEN( mnColor ) + cLumInc, 0L, 255L ) );
+ SetBlue( (sal_uInt8) SAL_BOUND( (long) COLORDATA_BLUE( mnColor ) + cLumInc, 0L, 255L ) );
}
// -----------------------------------------------------------------------
-void Color::DecreaseLuminance( UINT8 cLumDec )
+void Color::DecreaseLuminance( sal_uInt8 cLumDec )
{
- SetRed( (UINT8) SAL_BOUND( (long) COLORDATA_RED( mnColor ) - cLumDec, 0L, 255L ) );
- SetGreen( (UINT8) SAL_BOUND( (long) COLORDATA_GREEN( mnColor ) - cLumDec, 0L, 255L ) );
- SetBlue( (UINT8) SAL_BOUND( (long) COLORDATA_BLUE( mnColor ) - cLumDec, 0L, 255L ) );
+ SetRed( (sal_uInt8) SAL_BOUND( (long) COLORDATA_RED( mnColor ) - cLumDec, 0L, 255L ) );
+ SetGreen( (sal_uInt8) SAL_BOUND( (long) COLORDATA_GREEN( mnColor ) - cLumDec, 0L, 255L ) );
+ SetBlue( (sal_uInt8) SAL_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) SAL_BOUND( _FRound( COLORDATA_RED( mnColor ) * fM + fOff ), 0L, 255L ) );
- SetGreen( (UINT8) SAL_BOUND( _FRound( COLORDATA_GREEN( mnColor ) * fM + fOff ), 0L, 255L ) );
- SetBlue( (UINT8) SAL_BOUND( _FRound( COLORDATA_BLUE( mnColor ) * fM + fOff ), 0L, 255L ) );
+ SetRed( (sal_uInt8) SAL_BOUND( _FRound( COLORDATA_RED( mnColor ) * fM + fOff ), 0L, 255L ) );
+ SetGreen( (sal_uInt8) SAL_BOUND( _FRound( COLORDATA_GREEN( mnColor ) * fM + fOff ), 0L, 255L ) );
+ SetBlue( (sal_uInt8) SAL_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) SAL_BOUND( _FRound( COLORDATA_RED( mnColor ) * fM + fOff ), 0L, 255L ) );
- SetGreen( (UINT8) SAL_BOUND( _FRound( COLORDATA_GREEN( mnColor ) * fM + fOff ), 0L, 255L ) );
- SetBlue( (UINT8) SAL_BOUND( _FRound( COLORDATA_BLUE( mnColor ) * fM + fOff ), 0L, 255L ) );
+ SetRed( (sal_uInt8) SAL_BOUND( _FRound( COLORDATA_RED( mnColor ) * fM + fOff ), 0L, 255L ) );
+ SetGreen( (sal_uInt8) SAL_BOUND( _FRound( COLORDATA_GREEN( mnColor ) * fM + fOff ), 0L, 255L ) );
+ SetBlue( (sal_uInt8) SAL_BOUND( _FRound( COLORDATA_BLUE( mnColor ) * fM + fOff ), 0L, 255L ) );
}
}
@@ -143,14 +143,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;
}
@@ -159,10 +159,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();
@@ -183,7 +183,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 )
@@ -214,14 +214,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 )
{
@@ -233,17 +233,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 + 0.5 ) ) / 100 );
- UINT8 c = (UINT8) ( nB * ( 100 - ( (double)nSat * ( 1.0 - f ) + 0.5 ) ) / 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 )
{
@@ -261,7 +261,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;
@@ -273,7 +273,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;
@@ -285,13 +285,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)
// -----------------------------------------------------------------------
@@ -299,10 +299,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;
@@ -311,7 +311,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;
@@ -437,10 +437,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;
@@ -448,7 +448,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 1dadb4edb55f..d44b0b26ddf1 100644
--- a/tools/source/generic/config.cxx
+++ b/tools/source/generic/config.cxx
@@ -57,7 +57,7 @@ struct ImplKeyData
ImplKeyData* mpNext;
ByteString maKey;
ByteString maValue;
- BOOL mbIsComment;
+ sal_Bool mbIsComment;
};
struct ImplGroupData
@@ -65,20 +65,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;
};
// =======================================================================
@@ -104,9 +104,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 );
@@ -122,10 +122,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 )
@@ -137,7 +137,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)];
sal_uInt64 nRead = 0;
if( aFile.read( pBuf, nPos, nRead ) == ::osl::FileBase::E_None && nRead == nPos )
{
@@ -146,12 +146,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
@@ -168,11 +168,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 );
@@ -191,13 +191,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 )
{
@@ -260,7 +260,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();
@@ -276,7 +276,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 )
@@ -288,7 +288,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;
@@ -382,7 +382,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--;
@@ -400,11 +400,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++;
@@ -451,17 +451,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 )
{
@@ -514,7 +514,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];
@@ -527,7 +527,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;
@@ -584,7 +584,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++;
@@ -606,11 +606,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 )
@@ -619,11 +619,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;
}
// -----------------------------------------------------------------------
@@ -641,16 +641,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;
}
// -----------------------------------------------------------------------
@@ -694,8 +694,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;
@@ -711,7 +711,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 ) )
@@ -719,10 +719,10 @@ BOOL Config::ImplUpdateConfig() const
ImplDeleteConfigData( mpData );
ImplReadConfig( mpData );
mpData->mnDataUpdateId++;
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -776,7 +776,7 @@ Config::Config()
mpActGroup = NULL;
mnDataUpdateId = 0;
mnLockCount = 1;
- mbPersistence = TRUE;
+ mbPersistence = sal_True;
#ifdef DBG_UTIL
DBG_TRACE( "Config::Config()" );
@@ -793,7 +793,7 @@ Config::Config( const XubString& rFileName )
mpActGroup = NULL;
mnDataUpdateId = 0;
mnLockCount = 1;
- mbPersistence = TRUE;
+ mbPersistence = sal_True;
#ifdef DBG_UTIL
ByteString aTraceStr( "Config::Config( " );
@@ -856,7 +856,7 @@ void Config::DeleteGroup( const ByteString& rGroup )
if ( !mnLockCount || !mpData->mbRead )
{
ImplUpdateConfig();
- mpData->mbRead = TRUE;
+ mpData->mbRead = sal_True;
}
ImplGroupData* pPrevGroup = NULL;
@@ -894,7 +894,7 @@ void Config::DeleteGroup( const ByteString& rGroup )
ImplWriteConfig( mpData );
else
{
- mpData->mbModified = TRUE;
+ mpData->mbModified = sal_True;
}
// Gruppen auf ungluetig setzen
@@ -905,14 +905,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 )
{
@@ -931,14 +931,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++;
@@ -950,20 +950,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;
}
@@ -1045,7 +1045,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
@@ -1063,18 +1063,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;
@@ -1087,7 +1087,7 @@ void Config::WriteKey( const ByteString& rKey, const ByteString& rStr )
ImplWriteConfig( mpData );
else
{
- mpData->mbModified = TRUE;
+ mpData->mbModified = sal_True;
}
}
}
@@ -1110,7 +1110,7 @@ void Config::DeleteKey( const ByteString& rKey )
if ( !mnLockCount || !mpData->mbRead )
{
ImplUpdateConfig();
- mpData->mbRead = TRUE;
+ mpData->mbRead = sal_True;
}
// Key suchen und Value setzen
@@ -1142,7 +1142,7 @@ void Config::DeleteKey( const ByteString& rKey )
ImplWriteConfig( mpData );
else
{
- mpData->mbModified = TRUE;
+ mpData->mbModified = sal_True;
}
}
}
@@ -1150,7 +1150,7 @@ void Config::DeleteKey( const ByteString& rKey )
// -----------------------------------------------------------------------
-USHORT Config::GetKeyCount() const
+sal_uInt16 Config::GetKeyCount() const
{
#ifdef DBG_UTIL
ByteString aTraceStr( "Config::GetKeyCount()" );
@@ -1166,7 +1166,7 @@ USHORT Config::GetKeyCount() const
ImplUpdateConfig();
// Key suchen und Value zurueckgeben
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
ImplGroupData* pGroup = ImplGetGroup();
if ( pGroup )
{
@@ -1185,7 +1185,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( " );
@@ -1220,7 +1220,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( " );
@@ -1277,7 +1277,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 7dbdbaf3f419..104662b4ff7b 100644
--- a/tools/source/generic/fract.cxx
+++ b/tools/source/generic/fract.cxx
@@ -49,7 +49,7 @@
// Die Funktion GetGGT berechnet den groessten gemeinsamen Teiler der
// beiden als Parameter uebergebenen Werte nVal1 und nVal2 nach dem
// Algorithmus von Euklid. Hat einer der beiden Parameter den Wert 0 oder
-// 1, so wird als Ergebnis der Wert 1 zurŸckgegeben. Da der Algorithmus
+// 1, so wird als Ergebnis der Wert 1 zur�ckgegeben. Da der Algorithmus
// nur mit positiven Zahlen arbeitet, werden die beiden Parameter
// entsprechend umgewandelt.
// Zum Algorithmus: die beiden Parameter werden solange ducheinander
@@ -594,7 +594,7 @@ void Fraction::ReduceInaccurate( unsigned nSignificantBits )
bool operator == ( const Fraction& rVal1, const Fraction& rVal2 )
{
if ( !rVal1.IsValid() || !rVal2.IsValid() )
- return FALSE;
+ return false;
return rVal1.nNumerator == rVal2.nNumerator
&& rVal1.nDenominator == rVal2.nDenominator;
@@ -616,7 +616,7 @@ bool operator == ( const Fraction& rVal1, const Fraction& rVal2 )
bool operator < ( const Fraction& rVal1, const Fraction& rVal2 )
{
if ( !rVal1.IsValid() || !rVal2.IsValid() )
- return FALSE;
+ return false;
BigInt nN( rVal1.nNumerator );
nN *= BigInt( rVal2.nDenominator );
@@ -642,7 +642,7 @@ bool operator < ( const Fraction& rVal1, const Fraction& rVal2 )
bool operator > ( const Fraction& rVal1, const Fraction& rVal2 )
{
if ( !rVal1.IsValid() || !rVal2.IsValid() )
- return FALSE;
+ return false;
BigInt nN( rVal1.nNumerator );
nN *= BigInt( rVal2.nDenominator );
diff --git a/tools/source/generic/gen.cxx b/tools/source/generic/gen.cxx
index 591873558ca5..8d72b1ab4cff 100644
--- a/tools/source/generic/gen.cxx
+++ b/tools/source/generic/gen.cxx
@@ -45,7 +45,7 @@ SvStream& operator>>( SvStream& rIStream, Pair& rPair )
int i;
int i1;
int i2;
- UINT32 nNum;
+ sal_uInt32 nNum;
rIStream >> cId;
i1 = (cId & 0x70) >> 4;
@@ -62,7 +62,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;
@@ -74,7 +74,7 @@ SvStream& operator>>( SvStream& rIStream, Pair& rPair )
}
if ( cId & 0x08 )
nNum ^= 0xFFFFFFFF;
- rPair.nB = (INT32)nNum;
+ rPair.nB = (sal_Int32)nNum;
}
else
{
@@ -94,11 +94,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;
@@ -139,7 +139,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;
@@ -304,31 +304,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;
}
@@ -339,12 +339,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;
}
/*************************************************************************
@@ -353,7 +353,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();
@@ -375,7 +375,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;
@@ -396,7 +396,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;
@@ -409,7 +409,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;
@@ -422,7 +422,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;
@@ -434,7 +434,7 @@ SvStream& operator>>( SvStream& rIStream, Rectangle& rRect )
}
if ( cIdAry[1] & 0x08 )
nNum ^= 0xFFFFFFFF;
- rRect.nBottom = (INT32)nNum;
+ rRect.nBottom = (sal_Int32)nNum;
}
else
{
@@ -454,12 +454,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;
@@ -500,7 +500,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;
@@ -541,7 +541,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;
@@ -582,7 +582,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 54422858a995..c8558b7bf949 100644
--- a/tools/source/generic/line.cxx
+++ b/tools/source/generic/line.cxx
@@ -48,50 +48,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 )
{
@@ -100,10 +100,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 )
{
@@ -120,11 +120,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 )
{
@@ -171,7 +171,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 60231889556e..8b5615e964bd 100644
--- a/tools/source/generic/link.cxx
+++ b/tools/source/generic/link.cxx
@@ -36,22 +36,22 @@
|*
*************************************************************************/
-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;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/source/generic/makefile.mk b/tools/source/generic/makefile.mk
deleted file mode 100644
index 07bab82f32b0..000000000000
--- a/tools/source/generic/makefile.mk
+++ /dev/null
@@ -1,71 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=tools
-TARGET=gen
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-EXCEPTIONSFILES = $(SLO)$/poly.obj $(OBJ)$/poly.obj $(SLO)$/svlibrary.obj
-
-SLOFILES= $(SLO)$/toolsin.obj \
- $(SLO)$/svlibrary.obj \
- $(SLO)$/b3dtrans.obj \
- $(SLO)$/link.obj \
- $(SLO)$/bigint.obj \
- $(SLO)$/fract.obj \
- $(SLO)$/color.obj \
- $(SLO)$/gen.obj \
- $(SLO)$/config.obj \
- $(SLO)$/poly.obj \
- $(SLO)$/poly2.obj \
- $(SLO)$/svborder.obj \
- $(SLO)$/line.obj
-
-OBJFILES= $(OBJ)$/toolsin.obj \
- $(OBJ)$/b3dtrans.obj \
- $(OBJ)$/link.obj \
- $(OBJ)$/bigint.obj \
- $(OBJ)$/fract.obj \
- $(OBJ)$/color.obj \
- $(OBJ)$/gen.obj \
- $(OBJ)$/config.obj \
- $(OBJ)$/poly.obj \
- $(OBJ)$/poly2.obj \
- $(OBJ)$/svborder.obj \
- $(OBJ)$/line.obj
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index ccf35d259bc5..ea1fbb3b8e14 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -77,19 +77,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
@@ -105,12 +105,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
@@ -128,16 +128,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
@@ -168,7 +168,7 @@ ImplPolygon::~ImplPolygon()
// -----------------------------------------------------------------------
-void ImplPolygon::ImplSetSize( USHORT nNewSize, BOOL bResize )
+void ImplPolygon::ImplSetSize( sal_uInt16 nNewSize, sal_Bool bResize )
{
if( mnPoints == nNewSize )
return;
@@ -177,7 +177,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 )
{
@@ -185,14 +185,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) );
}
}
}
@@ -205,11 +205,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 )
{
@@ -237,21 +237,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 )
{
@@ -264,10 +264,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 ) );
@@ -282,7 +282,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 );
@@ -303,17 +303,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 ) );
@@ -323,7 +323,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 );
@@ -342,7 +342,7 @@ void ImplPolygon::ImplCreateFlagArray()
{
if( !mpFlagAry )
{
- mpFlagAry = new BYTE[ mnPoints ];
+ mpFlagAry = new sal_uInt8[ mnPoints ];
memset( mpFlagAry, 0, mnPoints );
}
}
@@ -378,7 +378,7 @@ Polygon::Polygon()
// -----------------------------------------------------------------------
-Polygon::Polygon( USHORT nSize )
+Polygon::Polygon( sal_uInt16 nSize )
{
DBG_CTOR( Polygon, NULL );
@@ -390,7 +390,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 );
@@ -434,7 +434,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 );
@@ -445,8 +445,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 )
{
@@ -464,7 +464,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 );
@@ -491,7 +491,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 );
@@ -500,10 +500,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;
@@ -513,9 +513,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 );
@@ -557,12 +557,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;
@@ -576,8 +576,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;
@@ -585,7 +585,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 )
@@ -624,7 +624,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 );
@@ -644,7 +644,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 ];
@@ -686,7 +686,7 @@ Point* Polygon::ImplGetPointAry()
// -----------------------------------------------------------------------
-BYTE* Polygon::ImplGetFlagAry()
+sal_uInt8* Polygon::ImplGetFlagAry()
{
DBG_CHKTHIS( Polygon, NULL );
@@ -705,7 +705,7 @@ const Point* Polygon::GetConstPointAry() const
// -----------------------------------------------------------------------
-const BYTE* Polygon::GetConstFlagAry() const
+const sal_uInt8* Polygon::GetConstFlagAry() const
{
DBG_CHKTHIS( Polygon, NULL );
return mpImplPolygon->mpFlagAry;
@@ -713,7 +713,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,
@@ -725,7 +725,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,
@@ -737,13 +737,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,
@@ -754,7 +754,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,
@@ -773,7 +773,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,
@@ -786,7 +786,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,
@@ -799,9 +799,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 ] ) ) ||
@@ -811,7 +811,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;
@@ -819,7 +819,7 @@ BOOL Polygon::IsRect() const
// -----------------------------------------------------------------------
-void Polygon::SetSize( USHORT nNewSize )
+void Polygon::SetSize( sal_uInt16 nNewSize )
{
DBG_CHKTHIS( Polygon, NULL );
@@ -832,7 +832,7 @@ void Polygon::SetSize( USHORT nNewSize )
// -----------------------------------------------------------------------
-USHORT Polygon::GetSize() const
+sal_uInt16 Polygon::GetSize() const
{
DBG_CHKTHIS( Polygon, NULL );
@@ -858,7 +858,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" );
@@ -875,12 +875,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 )
{
@@ -888,7 +888,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 );
@@ -897,7 +897,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;
@@ -909,15 +909,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 ];
}
@@ -1048,8 +1048,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 );
@@ -1058,8 +1058,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 ] ) &&
@@ -1080,7 +1080,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);
}
}
@@ -1119,27 +1119,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 ];
@@ -1149,7 +1149,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 ] );
@@ -1178,7 +1178,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
@@ -1190,10 +1190,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;
}
}
}
@@ -1202,7 +1202,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 )
@@ -1231,8 +1231,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;
@@ -1247,7 +1247,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;
}
@@ -1258,7 +1258,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() );
@@ -1268,7 +1268,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;
@@ -1291,7 +1291,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 ];
@@ -1309,7 +1309,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;
@@ -1326,7 +1326,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;
@@ -1365,7 +1365,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 ];
@@ -1393,9 +1393,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 );
@@ -1431,7 +1431,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,
@@ -1440,7 +1440,7 @@ public:
mnLow( nLow ),
mnHigh( nHigh ),
mnEdge( nEdge ),
- mbFirst( TRUE )
+ mbFirst( sal_True )
{
}
@@ -1539,7 +1539,7 @@ void ImplEdgePointFilter::Input( const Point& rPoint )
if ( mbFirst )
{
maFirstPoint = rPoint;
- mbFirst = FALSE;
+ mbFirst = sal_False;
if ( !nOutside )
mrNextFilter.Input( rPoint );
}
@@ -1577,20 +1577,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();
@@ -1625,7 +1625,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();
@@ -1635,7 +1635,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]);
@@ -1671,9 +1671,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 ];
@@ -1690,15 +1690,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 ) )
{
@@ -1709,7 +1709,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 ];
@@ -1742,7 +1742,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;
@@ -1750,7 +1750,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();
@@ -1764,16 +1764,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 )
{
@@ -1791,7 +1791,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 ) )
@@ -1803,7 +1803,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" );
@@ -1841,15 +1841,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;
}
// -----------------------------------------------------------------------
@@ -1882,10 +1882,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;
@@ -1901,7 +1901,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 )
@@ -1966,9 +1966,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;
@@ -1986,9 +1986,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
@@ -1996,9 +1996,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
@@ -2011,7 +2011,7 @@ SvStream& operator<<( SvStream& rOStream, const Polygon& rPoly )
i++;
}
- rOStream << bShort << (USHORT)(i-nStart);
+ rOStream << bShort << (sal_uInt16)(i-nStart);
if ( bShort )
{
@@ -2108,7 +2108,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 (!)");
@@ -2150,7 +2150,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;
@@ -2272,7 +2272,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
@@ -2285,11 +2285,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++;
}
@@ -2300,11 +2300,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;
}
}
@@ -2316,7 +2316,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
@@ -2325,7 +2325,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 9fc7be7c0dcf..fac5cf8c2d20 100644
--- a/tools/source/generic/poly2.cxx
+++ b/tools/source/generic/poly2.cxx
@@ -54,7 +54,7 @@ DBG_NAME( PolyPolygon )
// -----------------------------------------------------------------------
-ImplPolyPolygon::ImplPolyPolygon( USHORT nInitSize )
+ImplPolyPolygon::ImplPolyPolygon( sal_uInt16 nInitSize )
{
mnRefCount = 1;
mnCount = nInitSize;
@@ -75,7 +75,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
@@ -88,7 +88,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;
}
@@ -96,7 +96,7 @@ ImplPolyPolygon::~ImplPolyPolygon()
// =======================================================================
-PolyPolygon::PolyPolygon( USHORT nInitSize, USHORT nResize )
+PolyPolygon::PolyPolygon( sal_uInt16 nInitSize, sal_uInt16 nResize )
{
DBG_CTOR( PolyPolygon, NULL );
@@ -128,7 +128,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 );
@@ -137,7 +137,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;
@@ -171,7 +171,7 @@ PolyPolygon::~PolyPolygon()
// -----------------------------------------------------------------------
-void PolyPolygon::Insert( const Polygon& rPoly, USHORT nPos )
+void PolyPolygon::Insert( const Polygon& rPoly, sal_uInt16 nPos )
{
DBG_CHKTHIS( PolyPolygon, NULL );
@@ -191,8 +191,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 )
@@ -218,7 +218,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" );
@@ -238,7 +238,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" );
@@ -255,7 +255,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" );
@@ -265,9 +265,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;
@@ -289,7 +289,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;
@@ -301,15 +301,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 )
{
@@ -328,7 +328,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 )
{
@@ -352,7 +352,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 );
@@ -389,7 +389,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
@@ -442,7 +442,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;
@@ -465,8 +465,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 );
}
}
@@ -485,7 +485,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 );
}
@@ -503,13 +503,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;
@@ -535,7 +535,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 );
}
@@ -553,7 +553,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 );
}
@@ -571,7 +571,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 );
}
@@ -589,7 +589,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 );
}
@@ -599,8 +599,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;
@@ -630,16 +630,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 ];
@@ -647,7 +647,7 @@ Rectangle PolyPolygon::GetBoundRect() const
{
nXMin = nXMax = pPt->X();
nYMin = nYMax = pPt->Y();
- bFirst = FALSE;
+ bFirst = sal_False;
}
else
{
@@ -671,7 +671,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" );
@@ -706,15 +706,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;
}
// -----------------------------------------------------------------------
@@ -747,7 +747,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;
@@ -763,7 +763,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;
@@ -784,11 +784,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;
@@ -804,7 +804,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;
@@ -820,7 +820,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 );
@@ -841,11 +841,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 b9912a97d853..86df3dcffd82 100644
--- a/tools/source/generic/svborder.cxx
+++ b/tools/source/generic/svborder.cxx
@@ -43,7 +43,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/inetmsg.cxx b/tools/source/inet/inetmsg.cxx
index cc3f587e3e90..749efd8d0964 100644
--- a/tools/source/inet/inetmsg.cxx
+++ b/tools/source/inet/inetmsg.cxx
@@ -79,7 +79,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();
@@ -96,7 +96,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));
@@ -112,7 +112,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 (
@@ -124,10 +124,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,
@@ -138,10 +138,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;
}
@@ -155,7 +155,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++)
@@ -181,7 +181,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;
@@ -204,7 +204,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)
@@ -218,7 +218,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();
@@ -290,14 +290,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];
}
@@ -310,7 +310,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;
@@ -357,28 +357,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());
@@ -402,47 +402,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()) &&
@@ -462,7 +462,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++;
@@ -472,19 +472,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);
@@ -497,8 +497,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;
@@ -531,7 +531,7 @@ BOOL INetRFC822Message::ParseDateField (
else
{
// Junk.
- return FALSE;
+ return sal_False;
}
return (rDateTime.IsValid() &&
@@ -544,15 +544,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;
@@ -913,7 +913,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;
@@ -927,7 +927,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;
@@ -991,9 +991,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;
}
@@ -1050,7 +1050,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];
@@ -1084,15 +1084,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;
@@ -1320,11 +1320,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;
@@ -1384,14 +1384,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() */)
{
@@ -1399,21 +1399,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.
@@ -1488,7 +1488,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)
@@ -1514,7 +1514,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)
{
@@ -1533,7 +1533,7 @@ BOOL INetMIMEMessage::DetachChild (
{
// Requested part not found.
delete pDocStrm;
- return FALSE;
+ return sal_False;
}
}
}
@@ -1573,7 +1573,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)
{
@@ -1592,9 +1592,9 @@ BOOL INetMIMEMessage::DetachChild (
// Done.
if (pDocStrm) delete pDocStrm;
if (pMsgStrm) delete pMsgStrm;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*
@@ -1604,7 +1604,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
@@ -1625,7 +1625,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 19434d323d10..9390cdd12a9e 100644
--- a/tools/source/inet/inetstrm.cxx
+++ b/tools/source/inet/inetstrm.cxx
@@ -54,23 +54,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);
};
@@ -85,10 +85,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);
@@ -105,22 +105,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);
};
@@ -134,15 +134,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);
};
@@ -168,7 +168,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);
}
@@ -179,7 +179,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);
@@ -201,7 +201,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);
@@ -237,7 +237,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);
}
@@ -250,9 +250,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)
@@ -275,7 +275,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;
@@ -285,13 +285,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
{
@@ -310,7 +310,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';
}
@@ -328,7 +328,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;
@@ -337,7 +337,7 @@ int INetMessageIStream::GetMsgLine (sal_Char *pData, ULONG nSize)
if (!bHeaderGenerated)
{
- ULONG i, n;
+ sal_uIntPtr i, n;
if (pMsgBuffer->Tell() == 0)
{
@@ -380,7 +380,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;
}
}
@@ -397,7 +397,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)
{
@@ -428,7 +428,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;
@@ -463,7 +463,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'))
{
@@ -535,7 +535,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;
@@ -544,7 +544,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 (
@@ -583,7 +583,7 @@ int INetMessageOStream::PutMsgLine (const sal_Char *pData, ULONG nSize)
/*
* INetMessageIOStream.
*/
-INetMessageIOStream::INetMessageIOStream (ULONG nBufferSize)
+INetMessageIOStream::INetMessageIOStream (sal_uIntPtr nBufferSize)
: INetMessageIStream (nBufferSize),
INetMessageOStream ()
{
@@ -615,15 +615,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;
@@ -645,7 +645,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;
@@ -774,7 +774,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.
@@ -789,7 +789,7 @@ int INetMessageEncodeQPStream_Impl::GetMsgLine (sal_Char *pData, ULONG nSize)
*pTokRead++ = '\r';
*pTokRead++ = '\n';
- bDone = TRUE;
+ bDone = sal_True;
}
else
{
@@ -851,7 +851,7 @@ INetMessageDecodeQPStream_Impl::INetMessageDecodeQPStream_Impl (void)
pMsgBuffer (new SvMemoryStream),
nTokBufLen (0)
{
- ParseHeader (FALSE);
+ ParseHeader (sal_False);
}
/*
@@ -866,7 +866,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;
@@ -965,14 +965,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;
@@ -994,7 +994,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;
@@ -1064,7 +1064,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.
@@ -1093,7 +1093,7 @@ int INetMessageEncode64Stream_Impl::GetMsgLine (sal_Char *pData, ULONG nSize)
*pTokRead++ = '\n';
// Mark we're done.
- bDone = TRUE;
+ bDone = sal_True;
}
else
{
@@ -1109,7 +1109,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);
@@ -1173,12 +1173,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;
@@ -1196,7 +1196,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;
@@ -1299,7 +1299,7 @@ int INetMessageDecode64Stream_Impl::PutMsgLine (
/*
* INetMIMEMessageStream.
*/
-INetMIMEMessageStream::INetMIMEMessageStream (ULONG nBufferSize)
+INetMIMEMessageStream::INetMIMEMessageStream (sal_uIntPtr nBufferSize)
: INetMessageIOStream (nBufferSize),
eState (INETMSG_EOL_BEGIN),
nChildIndex (0),
@@ -1361,7 +1361,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();
@@ -1595,7 +1595,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();
@@ -1624,8 +1624,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;
@@ -1657,7 +1657,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 (' ');
@@ -1679,7 +1679,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;
@@ -1736,9 +1736,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/makefile.mk b/tools/source/makefile.mk
deleted file mode 100644
index 8c3f3167635e..000000000000
--- a/tools/source/makefile.mk
+++ /dev/null
@@ -1,58 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..
-
-TARGET=source
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-.IF "$(GUI)" == "UNX"
-SUBDIRS+= solar
-.ENDIF
-
-SUBDIRS+= \
- datetime \
- timestamp \
- debug \
- fsys \
- generic \
- intntl \
- memtools \
- misc \
- rc \
- ref \
- stream \
- zcodec
-
-
-.INCLUDE : target.mk
-
diff --git a/tools/source/memtools/contnr.cxx b/tools/source/memtools/contnr.cxx
index 3aff098aa3bc..9fe9babc5f05 100644..100755
--- a/tools/source/memtools/contnr.cxx
+++ b/tools/source/memtools/contnr.cxx
@@ -75,7 +75,7 @@ const char* CBlock::DbgCheckCBlock( const void* pBlock )
|*
*************************************************************************/
-CBlock::CBlock( USHORT nInitSize, CBlock* _pPrev, CBlock* _pNext )
+CBlock::CBlock( sal_uInt16 nInitSize, CBlock* _pPrev, CBlock* _pNext )
{
DBG_CTOR( CBlock, DbgCheckCBlock );
@@ -96,7 +96,7 @@ CBlock::CBlock( USHORT nInitSize, CBlock* _pPrev, CBlock* _pNext )
|*
*************************************************************************/
-CBlock::CBlock( USHORT _nSize, CBlock* _pPrev )
+CBlock::CBlock( sal_uInt16 _nSize, CBlock* _pPrev )
{
DBG_CTOR( CBlock, DbgCheckCBlock );
DBG_ASSERT( _nSize, "CBlock::CBlock(): nSize == 0" );
@@ -158,7 +158,7 @@ inline CBlock::~CBlock()
|*
*************************************************************************/
-void CBlock::Insert( void* p, USHORT nIndex, USHORT nReSize )
+void CBlock::Insert( void* p, sal_uInt16 nIndex, sal_uInt16 nReSize )
{
DBG_CHKTHIS( CBlock, DbgCheckCBlock );
DBG_ASSERT( nIndex <= nCount, "CBlock::Insert(): Index > nCount" );
@@ -212,12 +212,12 @@ void CBlock::Insert( void* p, USHORT nIndex, USHORT nReSize )
|*
*************************************************************************/
-CBlock* CBlock::Split( void* p, USHORT nIndex, USHORT nReSize )
+CBlock* CBlock::Split( void* p, sal_uInt16 nIndex, sal_uInt16 nReSize )
{
DBG_CHKTHIS( CBlock, DbgCheckCBlock );
- USHORT nNewSize;
- USHORT nMiddle;
+ sal_uInt16 nNewSize;
+ sal_uInt16 nMiddle;
CBlock* pNewBlock;
nMiddle = nCount/2;
@@ -347,7 +347,7 @@ CBlock* CBlock::Split( void* p, USHORT nIndex, USHORT nReSize )
|*
*************************************************************************/
-void* CBlock::Remove( USHORT nIndex, USHORT nReSize )
+void* CBlock::Remove( sal_uInt16 nIndex, sal_uInt16 nReSize )
{
DBG_CHKTHIS( CBlock, DbgCheckCBlock );
@@ -404,7 +404,7 @@ void* CBlock::Remove( USHORT nIndex, USHORT nReSize )
|*
*************************************************************************/
-inline void* CBlock::Replace( void* p, USHORT nIndex )
+inline void* CBlock::Replace( void* p, sal_uInt16 nIndex )
{
DBG_CHKTHIS( CBlock, DbgCheckCBlock );
@@ -423,7 +423,7 @@ inline void* CBlock::Replace( void* p, USHORT nIndex )
|*
*************************************************************************/
-inline void** CBlock::GetObjectPtr( USHORT nIndex )
+inline void** CBlock::GetObjectPtr( sal_uInt16 nIndex )
{
DBG_CHKTHIS( CBlock, DbgCheckCBlock );
@@ -438,7 +438,7 @@ inline void** CBlock::GetObjectPtr( USHORT nIndex )
|*
*************************************************************************/
-void CBlock::SetSize( USHORT nNewSize )
+void CBlock::SetSize( sal_uInt16 nNewSize )
{
DBG_CHKTHIS( CBlock, DbgCheckCBlock );
DBG_ASSERT( nNewSize, "CBlock::SetSize(): nNewSize == 0" );
@@ -554,7 +554,7 @@ void Container::ImpCopyContainer( const Container* pCont2 )
|*
*************************************************************************/
-Container::Container( USHORT _nBlockSize, USHORT _nInitSize, USHORT _nReSize )
+Container::Container( sal_uInt16 _nBlockSize, sal_uInt16 _nInitSize, sal_uInt16 _nReSize )
{
DBG_CTOR( Container, DbgCheckContainer );
@@ -615,7 +615,7 @@ Container::Container( USHORT _nBlockSize, USHORT _nInitSize, USHORT _nReSize )
|*
*************************************************************************/
-Container::Container( ULONG nSize )
+Container::Container( sal_uIntPtr nSize )
{
DBG_CTOR( Container, DbgCheckContainer );
@@ -636,7 +636,7 @@ Container::Container( ULONG nSize )
// Muss mehr als ein Block angelegt werden
if ( nSize <= nBlockSize )
{
- pFirstBlock = new CBlock( (USHORT)nSize, NULL );
+ pFirstBlock = new CBlock( (sal_uInt16)nSize, NULL );
pLastBlock = pFirstBlock;
}
else
@@ -657,7 +657,7 @@ Container::Container( ULONG nSize )
nSize -= nBlockSize;
}
- pLastBlock = new CBlock( (USHORT)nSize, pBlock1 );
+ pLastBlock = new CBlock( (sal_uInt16)nSize, pBlock1 );
pBlock1->SetNextBlock( pLastBlock );
}
@@ -707,7 +707,7 @@ Container::~Container()
|*
*************************************************************************/
-void Container::ImpInsert( void* p, CBlock* pBlock, USHORT nIndex )
+void Container::ImpInsert( void* p, CBlock* pBlock, sal_uInt16 nIndex )
{
DBG_CHKTHIS( Container, DbgCheckContainer );
@@ -799,7 +799,7 @@ void Container::Insert( void* p )
|*
*************************************************************************/
-void Container::Insert( void* p, ULONG nIndex )
+void Container::Insert( void* p, sal_uIntPtr nIndex )
{
if ( nCount <= nIndex )
{
@@ -818,7 +818,7 @@ void Container::Insert( void* p, ULONG nIndex )
pTemp = pTemp->GetNextBlock();
}
- ImpInsert( p, pTemp, (USHORT)nIndex );
+ ImpInsert( p, pTemp, (sal_uInt16)nIndex );
}
}
@@ -830,7 +830,7 @@ void Container::Insert( void* p, ULONG nIndex )
void Container::Insert( void* pNew, void* pOld )
{
- ULONG nIndex = GetPos( pOld );
+ sal_uIntPtr nIndex = GetPos( pOld );
if ( nIndex != CONTAINER_ENTRY_NOTFOUND )
Insert( pNew, nIndex );
}
@@ -843,7 +843,7 @@ void Container::Insert( void* pNew, void* pOld )
|*
*************************************************************************/
-void* Container::ImpRemove( CBlock* pBlock, USHORT nIndex )
+void* Container::ImpRemove( CBlock* pBlock, sal_uInt16 nIndex )
{
DBG_CHKTHIS( Container, DbgCheckContainer );
@@ -931,7 +931,7 @@ void* Container::Remove()
|*
*************************************************************************/
-void* Container::Remove( ULONG nIndex )
+void* Container::Remove( sal_uIntPtr nIndex )
{
// Ist Index nicht innerhalb des Containers, dann NULL zurueckgeben
if ( nCount <= nIndex )
@@ -946,7 +946,7 @@ void* Container::Remove( ULONG nIndex )
pTemp = pTemp->GetNextBlock();
}
- return ImpRemove( pTemp, (USHORT)nIndex );
+ return ImpRemove( pTemp, (sal_uInt16)nIndex );
}
}
@@ -972,7 +972,7 @@ void* Container::Replace( void* p )
|*
*************************************************************************/
-void* Container::Replace( void* p, ULONG nIndex )
+void* Container::Replace( void* p, sal_uIntPtr nIndex )
{
DBG_CHKTHIS( Container, DbgCheckContainer );
@@ -989,7 +989,7 @@ void* Container::Replace( void* p, ULONG nIndex )
pTemp = pTemp->GetNextBlock();
}
- return pTemp->Replace( p, (USHORT)nIndex );
+ return pTemp->Replace( p, (sal_uInt16)nIndex );
}
}
@@ -999,7 +999,7 @@ void* Container::Replace( void* p, ULONG nIndex )
|*
*************************************************************************/
-void Container::SetSize( ULONG nNewSize )
+void Container::SetSize( sal_uIntPtr nNewSize )
{
DBG_CHKTHIS( Container, DbgCheckContainer );
@@ -1009,7 +1009,7 @@ void Container::SetSize( ULONG nNewSize )
if ( nNewSize != nCount )
{
CBlock* pTemp;
- ULONG nTemp;
+ sal_uIntPtr nTemp;
// Wird verkleinert
if ( nNewSize < nCount )
@@ -1023,14 +1023,14 @@ void Container::SetSize( ULONG nNewSize )
}
// Alle folgenden Bloecke loeschen
- BOOL bLast = FALSE;
+ sal_Bool bLast = sal_False;
CBlock* pDelNext;
CBlock* pDelBlock = pTemp->GetNextBlock();
while ( pDelBlock )
{
// Muss CurrentBlock umgesetzt werden
if ( pDelBlock == pCurBlock )
- bLast = TRUE;
+ bLast = sal_True;
pDelNext = pDelBlock->GetNextBlock();
delete pDelBlock;
pDelBlock = pDelNext;
@@ -1041,7 +1041,7 @@ void Container::SetSize( ULONG nNewSize )
{
pLastBlock = pTemp;
pTemp->SetNextBlock( NULL );
- pTemp->SetSize( (USHORT)(nNewSize-nTemp) );
+ pTemp->SetSize( (sal_uInt16)(nNewSize-nTemp) );
}
else
{
@@ -1068,7 +1068,7 @@ void Container::SetSize( ULONG nNewSize )
// Muss mehr als ein Block angelegt werden
if ( nNewSize <= nBlockSize )
{
- pFirstBlock = new CBlock( (USHORT)nNewSize, NULL );
+ pFirstBlock = new CBlock( (sal_uInt16)nNewSize, NULL );
pLastBlock = pFirstBlock;
}
else
@@ -1089,7 +1089,7 @@ void Container::SetSize( ULONG nNewSize )
nNewSize -= nBlockSize;
}
- pLastBlock = new CBlock( (USHORT)nNewSize, pBlock1 );
+ pLastBlock = new CBlock( (sal_uInt16)nNewSize, pBlock1 );
pBlock1->SetNextBlock( pLastBlock );
}
@@ -1097,7 +1097,7 @@ void Container::SetSize( ULONG nNewSize )
}
// Reicht es, den letzen Puffer in der Groesse anzupassen
else if ( (nTemp+pTemp->Count()) <= nBlockSize )
- pTemp->SetSize( (USHORT)(nTemp+pTemp->Count()) );
+ pTemp->SetSize( (sal_uInt16)(nTemp+pTemp->Count()) );
else
{
// Puffer auf max. Blockgroesse setzen
@@ -1118,7 +1118,7 @@ void Container::SetSize( ULONG nNewSize )
// Den letzten Block anlegen
if ( nTemp )
{
- pLastBlock = new CBlock( (USHORT)nTemp, pTemp );
+ pLastBlock = new CBlock( (sal_uInt16)nTemp, pTemp );
pTemp->SetNextBlock( pLastBlock );
}
else
@@ -1183,7 +1183,7 @@ void* Container::GetCurObject() const
|*
*************************************************************************/
-ULONG Container::GetCurPos() const
+sal_uIntPtr Container::GetCurPos() const
{
DBG_CHKTHIS( Container, DbgCheckContainer );
@@ -1194,7 +1194,7 @@ ULONG Container::GetCurPos() const
{
// Block suchen
CBlock* pTemp = pFirstBlock;
- ULONG nTemp = 0;
+ sal_uIntPtr nTemp = 0;
while ( pTemp != pCurBlock )
{
nTemp += pTemp->Count();
@@ -1213,7 +1213,7 @@ ULONG Container::GetCurPos() const
|*
*************************************************************************/
-void** Container::GetObjectPtr( ULONG nIndex )
+void** Container::GetObjectPtr( sal_uIntPtr nIndex )
{
DBG_CHKTHIS( Container, DbgCheckContainer );
@@ -1231,7 +1231,7 @@ void** Container::GetObjectPtr( ULONG nIndex )
}
// Item innerhalb des gefundenen Blocks zurueckgeben
- return pTemp->GetObjectPtr( (USHORT)nIndex );
+ return pTemp->GetObjectPtr( (sal_uInt16)nIndex );
}
}
@@ -1241,7 +1241,7 @@ void** Container::GetObjectPtr( ULONG nIndex )
|*
*************************************************************************/
-void* Container::GetObject( ULONG nIndex ) const
+void* Container::GetObject( sal_uIntPtr nIndex ) const
{
DBG_CHKTHIS( Container, DbgCheckContainer );
@@ -1259,7 +1259,7 @@ void* Container::GetObject( ULONG nIndex ) const
}
// Item innerhalb des gefundenen Blocks zurueckgeben
- return pTemp->GetObject( (USHORT)nIndex );
+ return pTemp->GetObject( (sal_uInt16)nIndex );
}
}
@@ -1269,15 +1269,15 @@ void* Container::GetObject( ULONG nIndex ) const
|*
*************************************************************************/
-ULONG Container::GetPos( const void* p ) const
+sal_uIntPtr Container::GetPos( const void* p ) const
{
DBG_CHKTHIS( Container, DbgCheckContainer );
void** pNodes;
CBlock* pTemp;
- ULONG nTemp;
- USHORT nBlockCount;
- USHORT i;
+ sal_uIntPtr nTemp;
+ sal_uInt16 nBlockCount;
+ sal_uInt16 i;
// Block suchen
pTemp = pFirstBlock;
@@ -1307,8 +1307,8 @@ ULONG Container::GetPos( const void* p ) const
|*
*************************************************************************/
-ULONG Container::GetPos( const void* p, ULONG nStartIndex,
- BOOL bForward ) const
+sal_uIntPtr Container::GetPos( const void* p, sal_uIntPtr nStartIndex,
+ sal_Bool bForward ) const
{
DBG_CHKTHIS( Container, DbgCheckContainer );
@@ -1318,12 +1318,12 @@ ULONG Container::GetPos( const void* p, ULONG nStartIndex,
else
{
void** pNodes;
- USHORT nBlockCount;
- USHORT i;
+ sal_uInt16 nBlockCount;
+ sal_uInt16 i;
// Block suchen
CBlock* pTemp = pFirstBlock;
- ULONG nTemp = 0;
+ sal_uIntPtr nTemp = 0;
while ( nTemp+pTemp->Count() <= nStartIndex )
{
nTemp += pTemp->Count();
@@ -1334,7 +1334,7 @@ ULONG Container::GetPos( const void* p, ULONG nStartIndex,
if ( bForward )
{
// Alle Bloecke durchrsuchen
- i = (USHORT)(nStartIndex - nTemp);
+ i = (sal_uInt16)(nStartIndex - nTemp);
pNodes = pTemp->GetObjectPtr( i );
do
{
@@ -1356,12 +1356,12 @@ ULONG Container::GetPos( const void* p, ULONG nStartIndex,
else
break;
}
- while ( TRUE );
+ while ( sal_True );
}
else
{
// Alle Bloecke durchrsuchen
- i = (USHORT)(nStartIndex-nTemp)+1;
+ i = (sal_uInt16)(nStartIndex-nTemp)+1;
pNodes = pTemp->GetObjectPtr( i-1 );
do
{
@@ -1385,7 +1385,7 @@ ULONG Container::GetPos( const void* p, ULONG nStartIndex,
else
break;
}
- while ( TRUE );
+ while ( sal_True );
}
}
@@ -1398,7 +1398,7 @@ ULONG Container::GetPos( const void* p, ULONG nStartIndex,
|*
*************************************************************************/
-void* Container::Seek( ULONG nIndex )
+void* Container::Seek( sal_uIntPtr nIndex )
{
DBG_CHKTHIS( Container, DbgCheckContainer );
@@ -1417,7 +1417,7 @@ void* Container::Seek( ULONG nIndex )
// Item innerhalb des gefundenen Blocks zurueckgeben
pCurBlock = pTemp;
- nCurIndex = (USHORT)nIndex;
+ nCurIndex = (sal_uInt16)nIndex;
return pCurBlock->GetObject( nCurIndex );
}
}
@@ -1552,22 +1552,22 @@ Container& Container::operator =( const Container& r )
|*
*************************************************************************/
-BOOL Container::operator ==( const Container& r ) const
+sal_Bool Container::operator ==( const Container& r ) const
{
DBG_CHKTHIS( Container, DbgCheckContainer );
if ( nCount != r.nCount )
- return FALSE;
+ return sal_False;
- ULONG i = 0;
+ sal_uIntPtr i = 0;
while ( i < nCount )
{
if ( GetObject( i ) != r.GetObject( i ) )
- return FALSE;
+ return sal_False;
i++;
}
- return TRUE;
+ return sal_True;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/source/memtools/makefile.mk b/tools/source/memtools/makefile.mk
deleted file mode 100644
index de03a0d50cc3..000000000000
--- a/tools/source/memtools/makefile.mk
+++ /dev/null
@@ -1,56 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=tools
-TARGET=mtools
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES= $(SLO)$/contnr.obj \
- $(SLO)$/table.obj \
- $(SLO)$/unqidx.obj \
- $(SLO)$/mempool.obj \
- $(SLO)$/multisel.obj
-
-EXCEPTIONSFILES= $(SLO)$/multisel.obj $(OBJ)$/multisel.obj
-
-OBJFILES= $(OBJ)$/contnr.obj \
- $(OBJ)$/table.obj \
- $(OBJ)$/unqidx.obj \
- $(OBJ)$/mempool.obj \
- $(OBJ)$/multisel.obj
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/tools/source/memtools/mempool.cxx b/tools/source/memtools/mempool.cxx
index 4e4886bb8ea9..006c5de7b6e0 100644..100755
--- a/tools/source/memtools/mempool.cxx
+++ b/tools/source/memtools/mempool.cxx
@@ -41,7 +41,7 @@
*************************************************************************/
FixedMemPool::FixedMemPool (
- USHORT _nTypeSize, USHORT, USHORT)
+ sal_uInt16 _nTypeSize, sal_uInt16, sal_uInt16)
{
char name[RTL_CACHE_NAME_LENGTH + 1];
snprintf (name, sizeof(name), "FixedMemPool_%d", (int)_nTypeSize);
diff --git a/tools/source/memtools/multisel.cxx b/tools/source/memtools/multisel.cxx
index 6b4187de1ef3..295b8376d366 100644..100755
--- a/tools/source/memtools/multisel.cxx
+++ b/tools/source/memtools/multisel.cxx
@@ -64,7 +64,7 @@ static void Print( const MultiSelection* pSel )
}
DbgOutf( "SelCount: %4ld\n", pSel->nSelCount );
DbgOutf( "SubCount: %4ld\n", pSel->aSels.Count() );
- for ( ULONG nPos = 0; nPos < pSel->aSels.Count(); ++nPos )
+ for ( sal_uIntPtr nPos = 0; nPos < pSel->aSels.Count(); ++nPos )
{
DbgOutf( "SubSel #%2ld: %4ld-%4ld\n", nPos,
pSel->aSels.GetObject(nPos)->Min(),
@@ -103,11 +103,11 @@ size_t MultiSelection::ImplFindSubSelection( long nIndex ) const
// -----------------------------------------------------------------------
-BOOL MultiSelection::ImplMergeSubSelections( size_t nPos1, size_t nPos2 )
+sal_Bool MultiSelection::ImplMergeSubSelections( size_t nPos1, size_t nPos2 )
{
// didn't a sub selection at nPos2 exist?
if ( nPos2 >= aSels.size() )
- return FALSE;
+ return sal_False;
// did the sub selections touch each other?
if ( (aSels[ nPos1 ]->Max() + 1) == aSels[ nPos2 ]->Min() )
@@ -118,10 +118,10 @@ BOOL MultiSelection::ImplMergeSubSelections( size_t nPos1, size_t nPos2 )
::std::advance( it, nPos2 );
delete *it;
aSels.erase( it );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -130,8 +130,8 @@ MultiSelection::MultiSelection():
aTotRange( 0, -1 ),
nCurSubSel(0),
nSelCount(0),
- bCurValid(FALSE),
- bSelectNew(FALSE)
+ bCurValid(sal_False),
+ bSelectNew(sal_False)
{
}
@@ -141,8 +141,8 @@ MultiSelection::MultiSelection( const UniString& rString, sal_Unicode cRange, sa
aTotRange(0,RANGE_MAX),
nCurSubSel(0),
nSelCount(0),
- bCurValid(FALSE),
- bSelectNew(FALSE)
+ bCurValid(sal_False),
+ bSelectNew(sal_False)
{
// Dies ist nur ein Schnellschuss und sollte bald optimiert,
// an die verschiedenen Systeme (UNIX etc.)
@@ -151,8 +151,8 @@ MultiSelection::MultiSelection( const UniString& rString, sal_Unicode cRange, sa
UniString aStr( rString );
sal_Unicode* pStr = aStr.GetBufferAccess();
sal_Unicode* pOld = pStr;
- BOOL bReady = FALSE;
- BOOL bUntil = FALSE;
+ sal_Bool bReady = sal_False;
+ sal_Bool bUntil = sal_False;
xub_StrLen nCut = 0;
// Hier normieren wir den String, sodass nur Ziffern,
@@ -178,11 +178,11 @@ MultiSelection::MultiSelection( const UniString& rString, sal_Unicode cRange, sa
{
*pStr++ = ';';
nCut++;
- bReady = FALSE;
+ bReady = sal_False;
}
*pStr++ = *pOld;
nCut++;
- bUntil = FALSE;
+ bUntil = sal_False;
break;
case '-':
@@ -194,12 +194,12 @@ MultiSelection::MultiSelection( const UniString& rString, sal_Unicode cRange, sa
{
*pStr++ = '-';
nCut++;
- bUntil = TRUE;
+ bUntil = sal_True;
}
- bReady = FALSE;
+ bReady = sal_False;
}
else
- bReady = TRUE;
+ bReady = sal_True;
break;
case ' ':
@@ -215,12 +215,12 @@ MultiSelection::MultiSelection( const UniString& rString, sal_Unicode cRange, sa
{
*pStr++ = '-';
nCut++;
- bUntil = TRUE;
+ bUntil = sal_True;
}
- bReady = FALSE;
+ bReady = sal_False;
}
else
- bReady = TRUE;
+ bReady = sal_True;
break;
}
@@ -234,7 +234,7 @@ MultiSelection::MultiSelection( const UniString& rString, sal_Unicode cRange, sa
const sal_Unicode* pCStr = aStr.GetBuffer();
long nPage = 1;
long nNum = 1;
- bUntil = FALSE;
+ bUntil = sal_False;
while ( *pCStr )
{
switch ( *pCStr )
@@ -266,13 +266,13 @@ MultiSelection::MultiSelection( const UniString& rString, sal_Unicode cRange, sa
Select( nNum );
nPage = 0;
aNumStr.Erase();
- bUntil = FALSE;
+ bUntil = sal_False;
break;
case '-':
nPage = aNumStr.ToInt32();
aNumStr.Erase();
- bUntil = TRUE;
+ bUntil = sal_True;
break;
}
@@ -299,7 +299,7 @@ MultiSelection::MultiSelection( const MultiSelection& rOrig ) :
aTotRange(rOrig.aTotRange),
nSelCount(rOrig.nSelCount),
bCurValid(rOrig.bCurValid),
- bSelectNew(FALSE)
+ bSelectNew(sal_False)
{
if ( bCurValid )
{
@@ -318,8 +318,8 @@ MultiSelection::MultiSelection( const Range& rRange ):
aTotRange(rRange),
nCurSubSel(0),
nSelCount(0),
- bCurValid(FALSE),
- bSelectNew(FALSE)
+ bCurValid(sal_False),
+ bSelectNew(sal_False)
{
}
@@ -355,24 +355,24 @@ MultiSelection& MultiSelection::operator= ( const MultiSelection& rOrig )
// -----------------------------------------------------------------------
-BOOL MultiSelection::operator== ( MultiSelection& rWith )
+sal_Bool MultiSelection::operator== ( MultiSelection& rWith )
{
if ( aTotRange != rWith.aTotRange || nSelCount != rWith.nSelCount ||
aSels.size() != rWith.aSels.size() )
- return FALSE;
+ return sal_False;
// compare the sub seletions
for ( size_t n = 0; n < aSels.size(); ++n )
if ( *aSels[ n ] != *rWith.aSels[ n ] )
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
// -----------------------------------------------------------------------
-void MultiSelection::SelectAll( BOOL bSelect )
+void MultiSelection::SelectAll( sal_Bool bSelect )
{
- DBG(DbgOutf( "::SelectAll(%s)\n", bSelect ? "TRUE" : "FALSE" ));
+ DBG(DbgOutf( "::SelectAll(%s)\n", bSelect ? "sal_True" : "sal_False" ));
ImplClear();
if ( bSelect )
@@ -386,13 +386,13 @@ void MultiSelection::SelectAll( BOOL bSelect )
// -----------------------------------------------------------------------
-BOOL MultiSelection::Select( long nIndex, BOOL bSelect )
+sal_Bool MultiSelection::Select( long nIndex, sal_Bool bSelect )
{
DBG_ASSERT( aTotRange.IsInside(nIndex), "selected index out of range" );
// out of range?
if ( !aTotRange.IsInside(nIndex) )
- return FALSE;
+ return sal_False;
// find the virtual target position
size_t nSubSelPos = ImplFindSubSelection( nIndex );
@@ -402,7 +402,7 @@ BOOL MultiSelection::Select( long nIndex, BOOL bSelect )
// is it included in the found sub selection?
if ( nSubSelPos < aSels.size() && aSels[ nSubSelPos ]->IsInside( nIndex ) )
// already selected, nothing to do
- return FALSE;
+ return sal_False;
// it will become selected
++nSelCount;
@@ -445,7 +445,7 @@ BOOL MultiSelection::Select( long nIndex, BOOL bSelect )
) {
// not selected, nothing to do
DBG(Print( this ));
- return FALSE;
+ return sal_False;
}
// it will become deselected
@@ -460,7 +460,7 @@ BOOL MultiSelection::Select( long nIndex, BOOL bSelect )
delete *it;
aSels.erase( it );
DBG(Print( this ));
- return TRUE;
+ return sal_True;
}
// is it at the beginning of the found sub selection?
@@ -486,20 +486,20 @@ BOOL MultiSelection::Select( long nIndex, BOOL bSelect )
DBG(Print( this ));
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-void MultiSelection::Select( const Range& rIndexRange, BOOL bSelect )
+void MultiSelection::Select( const Range& rIndexRange, sal_Bool bSelect )
{
Range* pRange;
long nOld;
- ULONG nTmpMin = rIndexRange.Min();
- ULONG nTmpMax = rIndexRange.Max();
- ULONG nCurMin = FirstSelected();
- ULONG nCurMax = LastSelected();
+ sal_uIntPtr nTmpMin = rIndexRange.Min();
+ sal_uIntPtr nTmpMax = rIndexRange.Max();
+ sal_uIntPtr nCurMin = FirstSelected();
+ sal_uIntPtr nCurMax = LastSelected();
DBG_ASSERT(aTotRange.IsInside(nTmpMax), "selected index out of range" );
DBG_ASSERT(aTotRange.IsInside(nTmpMin), "selected index out of range" );
@@ -533,7 +533,7 @@ void MultiSelection::Select( const Range& rIndexRange, BOOL bSelect )
pRange->Min() = (long)nTmpMin;
nSelCount += ( nOld - nTmpMin );
}
- bCurValid = FALSE;
+ bCurValid = sal_False;
}
return;
}
@@ -556,7 +556,7 @@ void MultiSelection::Select( const Range& rIndexRange, BOOL bSelect )
pRange->Max() = (long)nTmpMax;
nSelCount += ( nTmpMax - nOld );
}
- bCurValid = FALSE;
+ bCurValid = sal_False;
}
return;
}
@@ -571,7 +571,7 @@ void MultiSelection::Select( const Range& rIndexRange, BOOL bSelect )
// -----------------------------------------------------------------------
-BOOL MultiSelection::IsSelected( long nIndex ) const
+sal_Bool MultiSelection::IsSelected( long nIndex ) const
{
// find the virtual target position
size_t nSubSelPos = ImplFindSubSelection( nIndex );
@@ -629,7 +629,7 @@ void MultiSelection::Insert( long nIndex, long nCount )
}
}
- bCurValid = FALSE;
+ bCurValid = sal_False;
aTotRange.Max() += nCount;
if ( bSelectNew )
nSelCount += nCount;
@@ -673,7 +673,7 @@ void MultiSelection::Remove( long nIndex )
--( aSels[ nPos ]->Max() );
}
- bCurValid = FALSE;
+ bCurValid = sal_False;
aTotRange.Max() -= 1;
DBG(Print( this ));
@@ -731,14 +731,14 @@ long MultiSelection::ImplBwdUnselected()
// -----------------------------------------------------------------------
-long MultiSelection::FirstSelected( BOOL bInverse )
+long MultiSelection::FirstSelected( sal_Bool bInverse )
{
bInverseCur = bInverse;
nCurSubSel = 0;
if ( bInverseCur )
{
- bCurValid = nSelCount < ULONG(aTotRange.Len());
+ bCurValid = nSelCount < sal_uIntPtr(aTotRange.Len());
if ( bCurValid )
{
nCurIndex = 0;
@@ -878,7 +878,7 @@ void MultiSelection::SetTotalRange( const Range& rTotRange )
nSelCount += pRange->Len();
}
- bCurValid = FALSE;
+ bCurValid = sal_False;
nCurIndex = 0;
}
diff --git a/tools/source/memtools/table.cxx b/tools/source/memtools/table.cxx
index 5e38574464f3..75119ba6f142 100644..100755
--- a/tools/source/memtools/table.cxx
+++ b/tools/source/memtools/table.cxx
@@ -38,16 +38,16 @@
// =======================================================================
-ULONG Table::ImplGetIndex( ULONG nKey, ULONG* pIndex ) const
+sal_uIntPtr Table::ImplGetIndex( sal_uIntPtr nKey, sal_uIntPtr* pIndex ) const
{
// Abpruefen, ob der erste Key groesser als der Vergleichskey ist
- if ( !nCount || (nKey < (ULONG)Container::ImpGetObject(0)) )
+ if ( !nCount || (nKey < (sal_uIntPtr)Container::ImpGetObject(0)) )
return TABLE_ENTRY_NOTFOUND;
- ULONG nLow;
- ULONG nHigh;
- ULONG nMid;
- ULONG nCompareKey;
+ sal_uIntPtr nLow;
+ sal_uIntPtr nHigh;
+ sal_uIntPtr nMid;
+ sal_uIntPtr nCompareKey;
void** pNodes = Container::ImpGetOnlyNodes();
// Binaeres Suchen
@@ -58,7 +58,7 @@ ULONG Table::ImplGetIndex( ULONG nKey, ULONG* pIndex ) const
do
{
nMid = (nLow + nHigh) / 2;
- nCompareKey = (ULONG)pNodes[nMid*2];
+ nCompareKey = (sal_uIntPtr)pNodes[nMid*2];
if ( nKey < nCompareKey )
nHigh = nMid-1;
else
@@ -76,7 +76,7 @@ ULONG Table::ImplGetIndex( ULONG nKey, ULONG* pIndex ) const
do
{
nMid = (nLow + nHigh) / 2;
- nCompareKey = (ULONG)Container::ImpGetObject( nMid*2 );
+ nCompareKey = (sal_uIntPtr)Container::ImpGetObject( nMid*2 );
if ( nKey < nCompareKey )
nHigh = nMid-1;
else
@@ -103,7 +103,7 @@ ULONG Table::ImplGetIndex( ULONG nKey, ULONG* pIndex ) const
// =======================================================================
-Table::Table( USHORT _nInitSize, USHORT _nReSize ) :
+Table::Table( sal_uInt16 _nInitSize, sal_uInt16 _nReSize ) :
Container( CONTAINER_MAXBLOCKSIZE, _nInitSize*2, _nReSize*2 )
{
DBG_ASSERT( _nInitSize <= 32767, "Table::Table(): InitSize > 32767" );
@@ -113,26 +113,26 @@ Table::Table( USHORT _nInitSize, USHORT _nReSize ) :
// -----------------------------------------------------------------------
-BOOL Table::Insert( ULONG nKey, void* p )
+sal_Bool Table::Insert( sal_uIntPtr nKey, void* p )
{
// Tabellenelement einsortieren
- ULONG i;
+ sal_uIntPtr i;
if ( nCount )
{
if ( nCount <= 24 )
{
- USHORT n = 0;
- USHORT nTempCount = (USHORT)nCount * 2;
+ sal_uInt16 n = 0;
+ sal_uInt16 nTempCount = (sal_uInt16)nCount * 2;
if( void** pNodes = Container::ImpGetOnlyNodes() )
{
- ULONG nCompareKey = (ULONG)(*pNodes);
+ sal_uIntPtr nCompareKey = (sal_uIntPtr)(*pNodes);
while ( nKey > nCompareKey )
{
n += 2;
pNodes += 2;
if ( n < nTempCount )
- nCompareKey = (ULONG)(*pNodes);
+ nCompareKey = (sal_uIntPtr)(*pNodes);
else
{
nCompareKey = 0;
@@ -142,7 +142,7 @@ BOOL Table::Insert( ULONG nKey, void* p )
// Testen, ob sich der Key schon in der Tabelle befindet
if ( nKey == nCompareKey )
- return FALSE;
+ return sal_False;
i = n;
}
@@ -150,14 +150,14 @@ BOOL Table::Insert( ULONG nKey, void* p )
{
i = 0;
if ( ImplGetIndex( nKey, &i ) != TABLE_ENTRY_NOTFOUND )
- return FALSE;
+ return sal_False;
}
}
else
{
i = 0;
if ( ImplGetIndex( nKey, &i ) != TABLE_ENTRY_NOTFOUND )
- return FALSE;
+ return sal_False;
}
}
else
@@ -170,15 +170,15 @@ BOOL Table::Insert( ULONG nKey, void* p )
// Ein neuer Eintrag
nCount++;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-void* Table::Remove( ULONG nKey )
+void* Table::Remove( sal_uIntPtr nKey )
{
// Index besorgen
- ULONG nIndex = ImplGetIndex( nKey );
+ sal_uIntPtr nIndex = ImplGetIndex( nKey );
// Testen, ob sich der Key in der Tabelle befindet
if ( nIndex == TABLE_ENTRY_NOTFOUND )
@@ -196,10 +196,10 @@ void* Table::Remove( ULONG nKey )
// -----------------------------------------------------------------------
-void* Table::Replace( ULONG nKey, void* p )
+void* Table::Replace( sal_uIntPtr nKey, void* p )
{
// Index abfragen
- ULONG nIndex = ImplGetIndex( nKey );
+ sal_uIntPtr nIndex = ImplGetIndex( nKey );
// Existiert kein Eintrag mit dem Schluessel
if ( nIndex == TABLE_ENTRY_NOTFOUND )
@@ -210,10 +210,10 @@ void* Table::Replace( ULONG nKey, void* p )
// -----------------------------------------------------------------------
-void* Table::Get( ULONG nKey ) const
+void* Table::Get( sal_uIntPtr nKey ) const
{
// Index besorgen
- ULONG nIndex = ImplGetIndex( nKey );
+ sal_uIntPtr nIndex = ImplGetIndex( nKey );
// Testen, ob sich der Key in der Tabelle befindet
if ( nIndex == TABLE_ENTRY_NOTFOUND )
@@ -231,16 +231,16 @@ void* Table::GetCurObject() const
// -----------------------------------------------------------------------
-ULONG Table::GetKey( const void* p ) const
+sal_uIntPtr Table::GetKey( const void* p ) const
{
- ULONG nIndex = 0;
+ sal_uIntPtr nIndex = 0;
// Solange noch Eintraege Vorhanden sind
while ( nIndex < nCount )
{
// Stimmt der Pointer ueberein, wird der Key zurueckgegeben
if ( p == Container::ImpGetObject( (nIndex*2)+1 ) )
- return (ULONG)Container::ImpGetObject( nIndex*2 );
+ return (sal_uIntPtr)Container::ImpGetObject( nIndex*2 );
nIndex++;
}
@@ -250,14 +250,14 @@ ULONG Table::GetKey( const void* p ) const
// -----------------------------------------------------------------------
-BOOL Table::IsKeyValid( ULONG nKey ) const
+sal_Bool Table::IsKeyValid( sal_uIntPtr nKey ) const
{
- return (ImplGetIndex( nKey ) != TABLE_ENTRY_NOTFOUND) ? TRUE : FALSE;
+ return (ImplGetIndex( nKey ) != TABLE_ENTRY_NOTFOUND) ? sal_True : sal_False;
}
// -----------------------------------------------------------------------
-ULONG Table::GetUniqueKey( ULONG nStartKey ) const
+sal_uIntPtr Table::GetUniqueKey( sal_uIntPtr nStartKey ) const
{
DBG_ASSERT( (nStartKey > 1) && (nStartKey < 0xFFFFFFFF),
"Table::GetUniqueKey() - nStartKey == 0 or nStartKey >= 0xFFFFFFFF" );
@@ -265,7 +265,7 @@ ULONG Table::GetUniqueKey( ULONG nStartKey ) const
if ( !nCount )
return nStartKey;
- ULONG nLastKey = (ULONG)Container::GetObject( (nCount*2)-2 );
+ sal_uIntPtr nLastKey = (sal_uIntPtr)Container::GetObject( (nCount*2)-2 );
if ( nLastKey < nStartKey )
return nStartKey;
else
@@ -274,18 +274,18 @@ ULONG Table::GetUniqueKey( ULONG nStartKey ) const
return nLastKey+1;
else
{
- ULONG nPos;
- ULONG nTempPos = ImplGetIndex( nStartKey, &nPos );
+ sal_uIntPtr nPos;
+ sal_uIntPtr nTempPos = ImplGetIndex( nStartKey, &nPos );
if ( nTempPos != TABLE_ENTRY_NOTFOUND )
nPos = nTempPos;
- nLastKey = (ULONG)Container::GetObject( nPos );
+ nLastKey = (sal_uIntPtr)Container::GetObject( nPos );
if ( nStartKey < nLastKey )
return nStartKey;
while ( nLastKey < 0xFFFFFFFE )
{
nPos += 2;
nLastKey++;
- if ( nLastKey != (ULONG)Container::GetObject( nPos ) )
+ if ( nLastKey != (sal_uIntPtr)Container::GetObject( nPos ) )
return nLastKey;
}
}
@@ -296,10 +296,10 @@ ULONG Table::GetUniqueKey( ULONG nStartKey ) const
// -----------------------------------------------------------------------
-ULONG Table::SearchKey( ULONG nKey, ULONG* pPos ) const
+sal_uIntPtr Table::SearchKey( sal_uIntPtr nKey, sal_uIntPtr* pPos ) const
{
*pPos = 0;
- ULONG nPos = ImplGetIndex( nKey, pPos );
+ sal_uIntPtr nPos = ImplGetIndex( nKey, pPos );
if ( nPos != TABLE_ENTRY_NOTFOUND )
{
nPos /= 2;
@@ -312,12 +312,12 @@ ULONG Table::SearchKey( ULONG nKey, ULONG* pPos ) const
// -----------------------------------------------------------------------
-void* Table::Seek( ULONG nKey )
+void* Table::Seek( sal_uIntPtr nKey )
{
// Testen, ob ein Eintrag vorhanden ist
if ( nCount )
{
- ULONG nIndex = ImplGetIndex( nKey );
+ sal_uIntPtr nIndex = ImplGetIndex( nKey );
// Ist Key nicht enthalten
if ( nIndex == TABLE_ENTRY_NOTFOUND )
@@ -339,7 +339,7 @@ void* Table::Seek( ULONG nKey )
void* Table::Seek( void* p )
{
- ULONG nKey = GetKey( p );
+ sal_uIntPtr nKey = GetKey( p );
// Ist Key vorhanden, dann als aktuellen Eintrag setzen
if ( nKey != TABLE_ENTRY_NOTFOUND )
diff --git a/tools/source/memtools/unqidx.cxx b/tools/source/memtools/unqidx.cxx
index b4b733f9452b..278199333e37 100644..100755
--- a/tools/source/memtools/unqidx.cxx
+++ b/tools/source/memtools/unqidx.cxx
@@ -38,8 +38,8 @@
|*
*************************************************************************/
-UniqueIndex::UniqueIndex( ULONG _nStartIndex,
- ULONG _nInitSize, ULONG _nReSize ) :
+UniqueIndex::UniqueIndex( sal_uIntPtr _nStartIndex,
+ sal_uIntPtr _nInitSize, sal_uIntPtr _nReSize ) :
Container( _nInitSize )
{
nReSize = _nReSize;
@@ -69,7 +69,7 @@ UniqueIndex::UniqueIndex( const UniqueIndex& rIdx ) :
|*
*************************************************************************/
-ULONG UniqueIndex::Insert( void* p )
+sal_uIntPtr UniqueIndex::Insert( void* p )
{
// NULL-Pointer ist nicht erlaubt
if ( !p )
@@ -101,13 +101,13 @@ ULONG UniqueIndex::Insert( void* p )
|*
*************************************************************************/
-ULONG UniqueIndex::Insert( ULONG nIndex, void* p )
+sal_uIntPtr UniqueIndex::Insert( sal_uIntPtr nIndex, void* p )
{
// NULL-Pointer ist nicht erlaubt
if ( !p )
return UNIQUEINDEX_ENTRY_NOTFOUND;
- ULONG nContIndex = nIndex - nStartIndex;
+ sal_uIntPtr nContIndex = nIndex - nStartIndex;
// Ist Array voll, dann expandieren
if ( nContIndex >= Container::GetSize() )
SetSize( nContIndex + nReSize );
@@ -126,7 +126,7 @@ ULONG UniqueIndex::Insert( ULONG nIndex, void* p )
|*
*************************************************************************/
-void* UniqueIndex::Remove( ULONG nIndex )
+void* UniqueIndex::Remove( sal_uIntPtr nIndex )
{
// Ist Index zulaessig
if ( (nIndex >= nStartIndex) &&
@@ -149,7 +149,7 @@ void* UniqueIndex::Remove( ULONG nIndex )
|*
*************************************************************************/
-void* UniqueIndex::Replace( ULONG nIndex, void* p )
+void* UniqueIndex::Replace( sal_uIntPtr nIndex, void* p )
{
// NULL-Pointer ist nicht erlaubt
if ( !p )
@@ -171,7 +171,7 @@ void* UniqueIndex::Replace( ULONG nIndex, void* p )
|*
*************************************************************************/
-void* UniqueIndex::Get( ULONG nIndex ) const
+void* UniqueIndex::Get( sal_uIntPtr nIndex ) const
{
// Ist Index zulaessig
if ( (nIndex >= nStartIndex) &&
@@ -187,9 +187,9 @@ void* UniqueIndex::Get( ULONG nIndex ) const
|*
*************************************************************************/
-ULONG UniqueIndex::GetCurIndex() const
+sal_uIntPtr UniqueIndex::GetCurIndex() const
{
- ULONG nPos = Container::GetCurPos();
+ sal_uIntPtr nPos = Container::GetCurPos();
// Ist der Current-Index nicht belegt, dann gibt es keinen Current-Index
if ( !Container::ImpGetObject( nPos ) )
@@ -204,13 +204,13 @@ ULONG UniqueIndex::GetCurIndex() const
|*
*************************************************************************/
-ULONG UniqueIndex::GetIndex( const void* p ) const
+sal_uIntPtr UniqueIndex::GetIndex( const void* p ) const
{
// Wird ein NULL-Pointer uebergeben, dann wurde Pointer nicht gefunden
if ( !p )
return UNIQUEINDEX_ENTRY_NOTFOUND;
- ULONG nIndex = Container::GetPos( p );
+ sal_uIntPtr nIndex = Container::GetPos( p );
if ( nIndex != CONTAINER_ENTRY_NOTFOUND )
return nIndex+nStartIndex;
@@ -224,7 +224,7 @@ ULONG UniqueIndex::GetIndex( const void* p ) const
|*
*************************************************************************/
-BOOL UniqueIndex::IsIndexValid( ULONG nIndex ) const
+sal_Bool UniqueIndex::IsIndexValid( sal_uIntPtr nIndex ) const
{
// Ist Index zulaessig
if ( (nIndex >= nStartIndex) &&
@@ -232,12 +232,12 @@ BOOL UniqueIndex::IsIndexValid( ULONG nIndex ) const
{
// Index ist nur zulaessig, wenn Eintrag auch belegt ist
if ( Container::ImpGetObject( nIndex-nStartIndex ) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
else
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -246,7 +246,7 @@ BOOL UniqueIndex::IsIndexValid( ULONG nIndex ) const
|*
*************************************************************************/
-void* UniqueIndex::Seek( ULONG nIndex )
+void* UniqueIndex::Seek( sal_uIntPtr nIndex )
{
// Index-Eintrag als aktuellen setzten, wenn er gueltig ist
if ( IsIndexValid( nIndex ) )
@@ -267,7 +267,7 @@ void* UniqueIndex::Seek( void* p )
if ( !p )
return NULL;
- ULONG nIndex = GetIndex( p );
+ sal_uIntPtr nIndex = GetIndex( p );
// Ist Index vorhanden, dann als aktuellen Eintrag setzen
if ( nIndex != UNIQUEINDEX_ENTRY_NOTFOUND )
@@ -363,15 +363,15 @@ UniqueIndex& UniqueIndex::operator =( const UniqueIndex& rIdx )
|*
*************************************************************************/
-BOOL UniqueIndex::operator ==( const UniqueIndex& rIdx ) const
+sal_Bool UniqueIndex::operator ==( const UniqueIndex& rIdx ) const
{
// Neue Werte zuweisen
if ( (nStartIndex == rIdx.nStartIndex) &&
(nCount == rIdx.nCount) &&
(Container::operator ==( rIdx )) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
/*************************************************************************
|*
@@ -383,7 +383,7 @@ UniqueIdContainer::UniqueIdContainer( const UniqueIdContainer& rObj )
: UniqueIndex( rObj )
, nCollectCount( rObj.nCollectCount )
{
- ULONG nCur = GetCurIndex();
+ sal_uIntPtr nCur = GetCurIndex();
ImpUniqueId * pEle = (ImpUniqueId *)First();
while( pEle )
@@ -405,7 +405,7 @@ UniqueIdContainer& UniqueIdContainer::operator = ( const UniqueIdContainer & rOb
UniqueIndex::operator = ( rObj );
nCollectCount = rObj.nCollectCount;
- ULONG nCur = GetCurIndex();
+ sal_uIntPtr nCur = GetCurIndex();
ImpUniqueId * pEle = (ImpUniqueId *)First();
while( pEle )
@@ -423,12 +423,12 @@ UniqueIdContainer& UniqueIdContainer::operator = ( const UniqueIdContainer & rOb
|*
*************************************************************************/
-void UniqueIdContainer::Clear( BOOL bAll )
+void UniqueIdContainer::Clear( sal_Bool bAll )
{
- USHORT nFree = bAll ? 0xFFFF : 1;
+ sal_uInt16 nFree = bAll ? 0xFFFF : 1;
ImpUniqueId* pId = (ImpUniqueId*)Last();
- BOOL bLast = TRUE;
+ sal_Bool bLast = sal_True;
while ( pId )
{
if ( pId->nRefCount <= nFree )
@@ -442,7 +442,7 @@ void UniqueIdContainer::Clear( BOOL bAll )
else
{
pId = (ImpUniqueId *)Prev();
- bLast = FALSE;
+ bLast = sal_False;
}
}
}
@@ -457,7 +457,7 @@ UniqueItemId UniqueIdContainer::CreateId()
{
if( nCollectCount > 50 )
{ // aufraeumen
- Clear( FALSE );
+ Clear( sal_False );
nCollectCount = 0;
}
nCollectCount++;
@@ -474,7 +474,7 @@ UniqueItemId UniqueIdContainer::CreateId()
|*
*************************************************************************/
-UniqueItemId UniqueIdContainer::CreateFreeId( ULONG nId )
+UniqueItemId UniqueIdContainer::CreateFreeId( sal_uIntPtr nId )
{
// Einfach erzeugen, fuer abgeleitete Klasse
ImpUniqueId * pId = new ImpUniqueId;
@@ -489,7 +489,7 @@ UniqueItemId UniqueIdContainer::CreateFreeId( ULONG nId )
|*
*************************************************************************/
-UniqueItemId UniqueIdContainer::CreateIdProt( ULONG nId )
+UniqueItemId UniqueIdContainer::CreateIdProt( sal_uIntPtr nId )
{
if ( IsIndexValid( nId ) )
return UniqueItemId( (ImpUniqueId *)Get( nId ) );
diff --git a/tools/source/misc/makefile.mk b/tools/source/misc/makefile.mk
deleted file mode 100644
index a426bb4053c3..000000000000
--- a/tools/source/misc/makefile.mk
+++ /dev/null
@@ -1,47 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ = ..$/..
-PRJNAME = tools
-TARGET = misc
-LIBTARGET = NO
-ENABLE_EXCEPTIONS = TRUE
-
-.INCLUDE: settings.mk
-.INCLUDE: $(PRJ)$/util$/makefile.pmk
-
-LIB1TARGET = $(SLB)$/$(TARGET).lib
-LIB1OBJFILES = \
- $(SLO)$/appendunixshellword.obj \
- $(SLO)$/extendapplicationenvironment.obj \
- $(SLO)$/solarmutex.obj \
- $(SLO)$/getprocessworkingdir.obj
-
-OBJFILES = $(OBJ)$/pathutils.obj
-SLOFILES = $(SLO)$/pathutils.obj $(LIB1OBJFILES) $(SLO)$/solarmutex.obj
-
-.INCLUDE: target.mk
diff --git a/tools/source/misc/pathutils.cxx b/tools/source/misc/pathutils.cxx
index 387abd397efb..0f0d0b767356 100644
--- a/tools/source/misc/pathutils.cxx
+++ b/tools/source/misc/pathutils.cxx
@@ -26,7 +26,6 @@
*
************************************************************************/
-#include "precompiled_tools.hxx"
#include "sal/config.h"
#if defined WNT
diff --git a/tools/source/rc/makefile.mk b/tools/source/rc/makefile.mk
deleted file mode 100644
index f8b46f38a0f7..000000000000
--- a/tools/source/rc/makefile.mk
+++ /dev/null
@@ -1,53 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=tools
-TARGET=rc
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES= $(SLO)$/rc.obj \
- $(SLO)$/isofallback.obj \
- $(SLO)$/resmgr.obj \
- $(SLO)$/resary.obj
-
-OBJFILES= $(OBJ)$/rc.obj \
- $(OBJ)$/isofallback.obj \
- $(OBJ)$/resmgr.obj \
- $(OBJ)$/resary.obj
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/tools/source/rc/rc.cxx b/tools/source/rc/rc.cxx
index face720c701a..e2ada0d111ac 100644
--- a/tools/source/rc/rc.cxx
+++ b/tools/source/rc/rc.cxx
@@ -66,16 +66,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() );
}
// =======================================================================
@@ -87,14 +87,14 @@ 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() );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx
index ab8fbe585432..2d906854d035 100644
--- a/tools/source/rc/resmgr.cxx
+++ b/tools/source/rc/resmgr.cxx
@@ -45,6 +45,7 @@
#include <osl/mutex.hxx>
#include <osl/signal.h>
#include <rtl/ustrbuf.hxx>
+#include <rtl/strbuf.hxx>
#include <tools/urlobj.hxx>
#include <rtl/instance.hxx>
#include <rtl/bootstrap.hxx>
@@ -97,11 +98,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;
@@ -114,9 +115,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:
@@ -551,7 +552,7 @@ InternalResMgr::InternalResMgr( const OUString& rFileURL,
: pContent( NULL )
, pStringBlock( NULL )
, pStm( NULL )
- , bEqual2Content( TRUE )
+ , bEqual2Content( sal_True )
, nEntries( 0 )
, aFileName( rFileURL )
, aPrefix( rPrefix )
@@ -602,15 +603,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 );
/*
@@ -624,15 +625,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
@@ -654,10 +655,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 );
@@ -669,7 +670,7 @@ BOOL InternalResMgr::Create()
::std::sort(pContent,pContent+nEntries,ImpContentLessCompare());
// qsort( pContent, nEntries, sizeof( ImpContent ), Compare );
- bDone = TRUE;
+ bDone = sal_True;
}
return bDone;
@@ -677,7 +678,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);
@@ -719,18 +720,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
{
@@ -740,7 +741,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;
}
@@ -766,12 +767,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 );
@@ -786,7 +787,7 @@ UniString GetTypeRes_Impl( const ResId& rTypeId )
rTypeId.GetResMgr()->Increment( sizeof( RSHEADER_TYPE ) );
}
}
- bInUse = FALSE;
+ bInUse = sal_False;
}
return aTypStr;
@@ -899,14 +900,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());
}
}
@@ -1073,11 +1074,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();
@@ -1100,7 +1101,7 @@ BOOL ResMgr::IsAvailable( const ResId& rId, const Resource* pResObj ) const
if ( pClassRes )
{
if ( pClassRes->GetRT() == nRT )
- bAvailable = TRUE;
+ bAvailable = sal_True;
}
}
@@ -1125,7 +1126,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() );
@@ -1170,7 +1171,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
@@ -1216,12 +1217,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;
}
// -----------------------------------------------------------------------
@@ -1270,7 +1271,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 )
@@ -1322,7 +1323,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) );
@@ -1330,7 +1331,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) |
@@ -1353,9 +1354,10 @@ 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 nRet = GetStringSize( pStr );
+ sal_uInt32 nLen=0;
+ sal_uInt32 nRet = GetStringSize( pStr, nLen );
UniString aString( (sal_Char*)pStr, RTL_TEXTENCODING_UTF8,
RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_MAPTOPRIVATE |
RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_DEFAULT |
@@ -1364,7 +1366,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 );
@@ -1374,11 +1376,20 @@ sal_uInt32 ResMgr::GetString( UniString& rStr, const BYTE* pStr )
return nRet;
}
+sal_uInt32 ResMgr::GetByteString( rtl::OString& rStr, const sal_uInt8* pStr )
+{
+ sal_uInt32 nLen=0;
+ sal_uInt32 nRet = GetStringSize( pStr, nLen );
+ rStr = rtl::OString( (const sal_Char*)pStr, nLen );
+ return nRet;
+}
+
// ------------------------------------------------------------------
-sal_uInt32 ResMgr::GetStringSize( const BYTE* pStr )
+sal_uInt32 ResMgr::GetStringSize( const sal_uInt8* pStr, sal_uInt32& nLen )
{
- return GetStringSize( strlen( (const char*)pStr ) );
+ nLen = static_cast< sal_uInt32 >( strlen( (const char*)pStr ) );
+ return GetStringSize( nLen );
}
// -----------------------------------------------------------------------
@@ -1391,9 +1402,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);
}
// -----------------------------------------------------------------------
@@ -1409,7 +1420,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;
@@ -1500,7 +1511,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();
@@ -1711,29 +1722,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;
}
@@ -1756,7 +1767,7 @@ UniString ResMgr::ReadStringWithoutHook()
#endif
}
else
- Increment( GetStringWithoutHook( aRet, (const BYTE*)GetClass() ) );
+ Increment( GetStringWithoutHook( aRet, (const sal_uInt8*)GetClass() ) );
return aRet;
}
@@ -1769,90 +1780,125 @@ UniString ResMgr::ReadString()
return aRet;
}
+rtl::OString ResMgr::ReadByteString()
+{
+ osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
+
+ if( pFallbackResMgr )
+ return pFallbackResMgr->ReadByteString();
+
+ rtl::OString aRet;
+
+ const ImpRCStack& rTop = aStack[nCurStack];
+ if( (rTop.Flags & RC_NOTFOUND) )
+ {
+ #if OSL_DEBUG_LEVEL > 0
+ aRet = OString( "<resource not found>" );
+ #endif
+ }
+ else
+ Increment( GetByteString( aRet, (const sal_uInt8*)GetClass() ) );
+
+ return aRet;
+}
+
// -----------------------------------------------------------------------
-ULONG ResMgr::GetAutoHelpId()
+rtl::OString ResMgr::GetAutoHelpId()
{
osl::Guard<osl::Mutex> aGuard( getResMgrMutex() );
if( pFallbackResMgr )
return pFallbackResMgr->GetAutoHelpId();
- DBG_ASSERT( nCurStack, "resource stack empty in Auto help id generation" );
+ OSL_ENSURE( nCurStack, "resource stack empty in Auto help id generation" );
if( nCurStack < 1 || nCurStack > 2 )
- return 0;
-
- const ImpRCStack *pRC = StackTop( nCurStack==1 ? 0 : 1 );
-
- DBG_ASSERT( pRC->pResource, "MM hat gesagt, dass der immer einen hat" );
- ULONG nGID = pRC->pResource->GetId();
-
- if( !nGID || nGID > 32767 )
- return 0;
-
- ULONG nHID = 0;
-
- // GGGg gggg::gggg gggg::ggLL LLLl::llll llll
- switch( pRC->pResource->GetRT() ) { // maximal 7
- case RSC_DOCKINGWINDOW:
- nHID += 0x20000000L;
- case RSC_WORKWIN:
- nHID += 0x20000000L;
- case RSC_MODELESSDIALOG:
- nHID += 0x20000000L;
- case RSC_FLOATINGWINDOW:
- nHID += 0x20000000L;
- case RSC_MODALDIALOG:
- nHID += 0x20000000L;
- case RSC_TABPAGE:
- nHID += 0x20000000L;
-
- if( nCurStack == 2 ) {
- pRC = StackTop();
- ULONG nLID = pRC->pResource->GetId();
-
- if( !nLID || nLID > 511 )
- return 0;
-
- switch( pRC->pResource->GetRT() ) { // maximal 32
- case RSC_TABCONTROL: nHID |= 0x0000; break;
- case RSC_RADIOBUTTON: nHID |= 0x0200; break;
- case RSC_CHECKBOX: nHID |= 0x0400; break;
- case RSC_TRISTATEBOX: nHID |= 0x0600; break;
- case RSC_EDIT: nHID |= 0x0800; break;
- case RSC_MULTILINEEDIT: nHID |= 0x0A00; break;
- case RSC_MULTILISTBOX: nHID |= 0x0C00; break;
- case RSC_LISTBOX: nHID |= 0x0E00; break;
- case RSC_COMBOBOX: nHID |= 0x1000; break;
- case RSC_PUSHBUTTON: nHID |= 0x1200; break;
- case RSC_SPINFIELD: nHID |= 0x1400; break;
- case RSC_PATTERNFIELD: nHID |= 0x1600; break;
- case RSC_NUMERICFIELD: nHID |= 0x1800; break;
- case RSC_METRICFIELD: nHID |= 0x1A00; break;
- case RSC_CURRENCYFIELD: nHID |= 0x1C00; break;
- case RSC_DATEFIELD: nHID |= 0x1E00; break;
- case RSC_TIMEFIELD: nHID |= 0x2000; break;
- case RSC_IMAGERADIOBUTTON: nHID |= 0x2200; break;
- case RSC_NUMERICBOX: nHID |= 0x2400; break;
- case RSC_METRICBOX: nHID |= 0x2600; break;
- case RSC_CURRENCYBOX: nHID |= 0x2800; break;
- case RSC_DATEBOX: nHID |= 0x2A00; break;
- case RSC_TIMEBOX: nHID |= 0x2C00; break;
- case RSC_IMAGEBUTTON: nHID |= 0x2E00; break;
- case RSC_MENUBUTTON: nHID |= 0x3000; break;
- case RSC_MOREBUTTON: nHID |= 0x3200; break;
+ return rtl::OString();
+
+ // prepare HID, start with resource prefix
+ rtl::OStringBuffer aHID( 32 );
+ aHID.append( rtl::OUStringToOString( pImpRes->aPrefix, RTL_TEXTENCODING_UTF8 ) );
+ aHID.append( '.' );
+
+ // append type
+ const ImpRCStack *pRC = StackTop();
+ OSL_ENSURE( pRC, "missing resource stack level" );
+
+ if ( nCurStack == 1 )
+ {
+ // auto help ids for top level windows
+ switch( pRC->pResource->GetRT() ) {
+ case RSC_DOCKINGWINDOW: aHID.append( "DockingWindow" ); break;
+ case RSC_WORKWIN: aHID.append( "WorkWindow" ); break;
+ case RSC_MODELESSDIALOG: aHID.append( "ModelessDialog" ); break;
+ case RSC_FLOATINGWINDOW: aHID.append( "FloatingWindow" ); break;
+ case RSC_MODALDIALOG: aHID.append( "ModalDialog" ); break;
+ case RSC_TABPAGE: aHID.append( "TabPage" ); break;
+ default: return rtl::OString();
+ }
+ }
+ else
+ {
+ // only controls with the following parents get auto help ids
+ const ImpRCStack *pRC1 = StackTop(1);
+ switch( pRC1->pResource->GetRT() ) {
+ case RSC_DOCKINGWINDOW:
+ case RSC_WORKWIN:
+ case RSC_MODELESSDIALOG:
+ case RSC_FLOATINGWINDOW:
+ case RSC_MODALDIALOG:
+ case RSC_TABPAGE:
+ // intentionally no breaks!
+ // auto help ids for controls
+ switch( pRC->pResource->GetRT() ) {
+ case RSC_TABCONTROL: aHID.append( "TabControl" ); break;
+ case RSC_RADIOBUTTON: aHID.append( "RadioButton" ); break;
+ case RSC_CHECKBOX: aHID.append( "CheckBox" ); break;
+ case RSC_TRISTATEBOX: aHID.append( "TriStateBox" ); break;
+ case RSC_EDIT: aHID.append( "Edit" ); break;
+ case RSC_MULTILINEEDIT: aHID.append( "MultiLineEdit" ); break;
+ case RSC_MULTILISTBOX: aHID.append( "MultiListBox" ); break;
+ case RSC_LISTBOX: aHID.append( "ListBox" ); break;
+ case RSC_COMBOBOX: aHID.append( "ComboBox" ); break;
+ case RSC_PUSHBUTTON: aHID.append( "PushButton" ); break;
+ case RSC_SPINFIELD: aHID.append( "SpinField" ); break;
+ case RSC_PATTERNFIELD: aHID.append( "PatternField" ); break;
+ case RSC_NUMERICFIELD: aHID.append( "NumericField" ); break;
+ case RSC_METRICFIELD: aHID.append( "MetricField" ); break;
+ case RSC_CURRENCYFIELD: aHID.append( "CurrencyField" ); break;
+ case RSC_DATEFIELD: aHID.append( "DateField" ); break;
+ case RSC_TIMEFIELD: aHID.append( "TimeField" ); break;
+ case RSC_IMAGERADIOBUTTON: aHID.append( "ImageRadioButton" ); break;
+ case RSC_NUMERICBOX: aHID.append( "NumericBox" ); break;
+ case RSC_METRICBOX: aHID.append( "MetricBox" ); break;
+ case RSC_CURRENCYBOX: aHID.append( "CurrencyBox" ); break;
+ case RSC_DATEBOX: aHID.append( "DateBox" ); break;
+ case RSC_TIMEBOX: aHID.append( "TimeBox" ); break;
+ case RSC_IMAGEBUTTON: aHID.append( "ImageButton" ); break;
+ case RSC_MENUBUTTON: aHID.append( "MenuButton" ); break;
+ case RSC_MOREBUTTON: aHID.append( "MoreButton" ); break;
default:
- return 0;
- } // of switch
- nHID |= nLID;
- } // of if
- break;
- default:
- return 0;
- } // of switch
- nHID |= nGID << 14;
+ // no type, no auto HID
+ return rtl::OString();
+ }
+ break;
+ default:
+ return rtl::OString();
+ }
+ }
+
+ // append resource id hierarchy
+ for( int nOff = nCurStack-1; nOff >= 0; nOff-- )
+ {
+ aHID.append( '.' );
+ pRC = StackTop( nOff );
+
+ OSL_ENSURE( pRC->pResource, "missing resource in resource stack level !" );
+ if( pRC->pResource )
+ aHID.append( sal_Int32( pRC->pResource->GetId() ) );
+ }
- return nHID;
+ return aHID.makeStringAndClear();
}
// -----------------------------------------------------------------------
@@ -1979,8 +2025,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
@@ -2056,7 +2102,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 )
@@ -2073,7 +2119,7 @@ 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 ce2e3f7fa36f..9d027780e5df 100644
--- a/tools/source/ref/errinf.cxx
+++ b/tools/source/ref/errinf.cxx
@@ -50,11 +50,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();
@@ -63,12 +63,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;
@@ -77,7 +77,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;
@@ -106,10 +106,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");
@@ -128,8 +128,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;
@@ -143,7 +143,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);
@@ -151,12 +151,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;
@@ -170,32 +170,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)
{
}
@@ -206,8 +206,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&);
};
@@ -268,19 +268,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]
@@ -317,8 +317,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
@@ -327,7 +327,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;
}
@@ -380,12 +380,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]
@@ -405,30 +405,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);
@@ -444,7 +444,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)
@@ -453,7 +453,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 c220fbe1af92..05c7709931e6 100644..100755
--- a/tools/source/ref/globname.cxx
+++ b/tools/source/ref/globname.cxx
@@ -53,7 +53,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 ) );
}
@@ -76,10 +76,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 )
{
@@ -88,9 +88,9 @@ 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++;
@@ -188,14 +188,14 @@ 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;
+ return sal_False;
sal_uInt16 Data2_a;
memcpy(&Data2_a, pImp->szData+4, sizeof(sal_uInt16));
@@ -204,7 +204,7 @@ BOOL SvGlobalName::operator < ( const SvGlobalName & rObj ) const
memcpy(&Data2_b, rObj.pImp->szData+4, sizeof(sal_uInt16));
if( Data2_a < Data2_b )
- return TRUE;
+ return sal_True;
else if( Data2_a == Data2_b )
{
sal_uInt32 Data1_a;
@@ -216,14 +216,14 @@ BOOL SvGlobalName::operator < ( const SvGlobalName & rObj ) const
return Data1_a < Data1_b;
}
else
- return FALSE;
+ return sal_False;
}
/*************************************************************************
|* SvGlobalName::operator +=()
*************************************************************************/
-SvGlobalName & SvGlobalName::operator += ( UINT32 n )
+SvGlobalName & SvGlobalName::operator += ( sal_uInt32 n )
{
NewImp();
@@ -246,7 +246,7 @@ SvGlobalName & SvGlobalName::operator += ( UINT32 n )
/*************************************************************************
|* SvGlobalName::operator ==()
*************************************************************************/
-BOOL SvGlobalName::operator == ( const SvGlobalName & rObj ) const
+sal_Bool SvGlobalName::operator == ( const SvGlobalName & rObj ) const
{
return *pImp == *rObj.pImp;
}
@@ -260,7 +260,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();
@@ -268,7 +268,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++ )
{
@@ -278,11 +278,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++ )
{
@@ -290,13 +290,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++ )
{
@@ -304,13 +304,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++ )
@@ -319,9 +319,9 @@ 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++;
@@ -332,9 +332,9 @@ BOOL SvGlobalName::MakeId( const String & rIdStr )
memcpy(&pImp->szData[4], &nSec, sizeof(nSec));
memcpy(&pImp->szData[6], &nThird, sizeof(nThird));
memcpy(&pImp->szData[ 8 ], szRemain, 8);
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -349,7 +349,7 @@ String SvGlobalName::GetctorName() const
memcpy(&Data1, pImp->szData, sizeof(sal_uInt32));
sprintf( buf, "0x%8.8" SAL_PRIXUINT32, Data1 );
aRet += buf;
- USHORT i;
+ sal_uInt16 i;
for( i = 4; i < 8; i += 2 )
{
aRet += ',';
@@ -380,7 +380,7 @@ String SvGlobalName::GetHexName() const
sprintf( buf, "%8.8" SAL_PRIXUINT32, Data1 );
aRet += buf;
aRet += '-';
- USHORT i ;
+ sal_uInt16 i ;
for( i = 4; i < 8; i += 2 )
{
sal_uInt16 Data2;
@@ -442,7 +442,7 @@ void SvGlobalNameList::Append( const SvGlobalName & rName )
/*************************************************************************
|* SvGlobalNameList::GetObject()
*************************************************************************/
-SvGlobalName SvGlobalNameList::GetObject( ULONG nPos )
+SvGlobalName SvGlobalNameList::GetObject( sal_uLong nPos )
{
return SvGlobalName(nPos < aList.size() ? aList[nPos] : NULL);
}
@@ -450,16 +450,16 @@ SvGlobalName SvGlobalNameList::GetObject( ULONG nPos )
/*************************************************************************
|* SvGlobalNameList::IsEntry()
*************************************************************************/
-BOOL SvGlobalNameList::IsEntry( const SvGlobalName & rName )
+sal_Bool SvGlobalNameList::IsEntry( const SvGlobalName & rName )
{
std::vector<ImpSvGlobalName*>::iterator piter;
for (piter = aList.begin(); piter != aList.end(); ++piter)
{
if (*rName.pImp == *(*piter))
- return true;
+ return sal_True;
}
- return false;
+ return sal_False;
}
com::sun::star::uno::Sequence < sal_Int8 > SvGlobalName::GetByteSequence() const
diff --git a/tools/source/ref/makefile.mk b/tools/source/ref/makefile.mk
deleted file mode 100644
index c87f8a740a4f..000000000000
--- a/tools/source/ref/makefile.mk
+++ /dev/null
@@ -1,53 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=tools
-TARGET=ref
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES= $(SLO)$/ref.obj \
- $(SLO)$/pstm.obj \
- $(SLO)$/globname.obj \
- $(SLO)$/errinf.obj
-
-OBJFILES= $(OBJ)$/ref.obj \
- $(OBJ)$/pstm.obj \
- $(OBJ)$/globname.obj \
- $(OBJ)$/errinf.obj
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/tools/source/ref/pstm.cxx b/tools/source/ref/pstm.cxx
index 31c37b3086b6..3def8c1b19c8 100644
--- a/tools/source/ref/pstm.cxx
+++ b/tools/source/ref/pstm.cxx
@@ -38,7 +38,7 @@
/************************************************************************
|* SvClassManager::Register()
*************************************************************************/
-void SvClassManager::Register( USHORT nClassId, SvCreateInstancePersist pFunc )
+void SvClassManager::Register( sal_uInt16 nClassId, SvCreateInstancePersist pFunc )
{
#ifdef DBG_UTIL
SvCreateInstancePersist p;
@@ -51,7 +51,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;
@@ -64,32 +64,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 ) )
@@ -101,7 +101,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 );
@@ -127,7 +127,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 )
@@ -136,13 +136,13 @@ SvPersistStream& operator >> ( SvPersistStream & rStm,
OSL_FAIL( "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;
@@ -171,7 +171,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. */
)
@@ -190,7 +190,7 @@ SvPersistStream::SvPersistStream
*/
{
DBG_ASSERT( nStartIdx != 0, "zero index not allowed" );
- bIsWritable = TRUE;
+ bIsWritable = sal_True;
if( pStm )
{
SetVersion( pStm->GetVersion() );
@@ -228,7 +228,7 @@ SvPersistStream::SvPersistStream
wenn das erste aus dieser Hierarchie benutzt werden soll.
*/
{
- bIsWritable = TRUE;
+ bIsWritable = sal_True;
if( pStm )
{
SetVersion( pStm->GetVersion() );
@@ -282,14 +282,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]
@@ -314,10 +314,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;
}
@@ -325,10 +325,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;
}
@@ -336,10 +336,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;
}
@@ -354,15 +354,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;
@@ -371,9 +371,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;
@@ -382,7 +382,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 );
@@ -396,7 +396,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 */
@@ -408,14 +408,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;
@@ -433,7 +433,7 @@ UINT32 SvPersistStream::ReadCompressed
rStm >> nMask;
nRet |= nMask;
nRet <<= 16;
- USHORT n;
+ sal_uInt16 n;
rStm >> n;
nRet |= n;
}
@@ -459,7 +459,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]
@@ -477,30 +477,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
@@ -508,11 +508,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
...
@@ -525,13 +525,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();
}
@@ -539,20 +539,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
...
@@ -564,19 +564,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. */
)
@@ -586,7 +586,7 @@ UINT32 SvPersistStream::ReadLen
und <SvPersistStream::WriteLen> geschrieben wurde.
*/
{
- UINT32 nLen;
+ sal_uInt32 nLen;
*this >> nLen;
if( pTestPos )
*pTestPos = Tell();
@@ -596,15 +596,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
@@ -614,9 +614,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
@@ -627,12 +627,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;
}
}
@@ -649,9 +649,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;
@@ -671,19 +671,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();
@@ -701,17 +701,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() );
@@ -726,15 +726,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 );
@@ -754,7 +754,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 )
@@ -777,9 +777,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" );
}
@@ -814,7 +814,7 @@ SvPersistStream& SvPersistStream::ReadPointer
SvPersistBase * & rpObj
)
{
- ReadObj( rpObj, TRUE );
+ ReadObj( rpObj, sal_True );
return *this;
}
@@ -848,14 +848,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 );
@@ -875,23 +875,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
- sal_uIntPtr nId = rThis.ReadObj( pEle, FALSE );
+ sal_uIntPtr 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
@@ -902,19 +902,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/solar/makefile.mk b/tools/source/solar/makefile.mk
deleted file mode 100644
index 6f5dd85c608b..000000000000
--- a/tools/source/solar/makefile.mk
+++ /dev/null
@@ -1,63 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=tools
-TARGET=mksvconf
-TARGETTYPE=CUI
-
-LIBSALCPPRT=$(0)
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-CFILES= solar.c
-
-OBJFILES= $(OBJ)$/solar.obj
-
-APP1TARGET= $(TARGET)
-APP1OBJS= $(OBJFILES)
-APP1STDLIBS=
-APP1DEPN=
-APP1DEF=
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-.IF "$(L10N-framework)"==""
-ALLTAR : $(INCCOM)$/svconf.h
-.ENDIF # "$(L10N-framework)"==""
-
-$(INCCOM)$/svconf.h : $(BIN)$/$(TARGET)
- $(BIN)$/$(TARGET) $@
-
diff --git a/tools/source/solar/solar.c b/tools/source/solar/solar.c
deleted file mode 100644
index 5d1549459bbf..000000000000
--- a/tools/source/solar/solar.c
+++ /dev/null
@@ -1,520 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-/* POSIX defines that a program is undefined after a SIG_SEGV. The
- * code stopped working on Linux Kernel 2.6 so I have moved this back to
- * use FORK.
- * If at a later time the signals work correctly with the Linux Kernel 2.6
- * then this change may be reverted although not strictly posix safe. */
-#define USE_FORK_TO_CHECK 1
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-
-#include <unistd.h>
-#include <sys/types.h>
-
-#define I_STDARG
-#ifdef I_STDARG
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
-
-#define NO_USE_FORK_TO_CHECK
-#ifdef USE_FORK_TO_CHECK
-#include <sys/wait.h>
-#else
-#include <signal.h>
-#include <setjmp.h>
-#endif
-
-#define printTypeSize(Type,Name) printf( "sizeof(%s)\t= %d\n", Name, sizeof (Type) )
-
-#define isSignedType(Type) (((Type)-1) < 0)
-#define printTypeSign(Type,Name) printf( "%s\t= %s %s\n", Name, ( isSignedType(Type) ? "signed" : "unsigned" ), Name )
-
-
-/*************************************************************************
-|*
-|* IsBigEndian()
-|*
-|* Beschreibung True, wenn CPU BigEndian ist
-|*
-*************************************************************************/
-int IsBigEndian()
-{
- long l = 1;
- return ! *(char*)&l;
-}
-
-/*************************************************************************
-|*
-|* IsStackGrowingDown()
-|*
-|* Beschreibung True, wenn der Stack nach unten waechst
-|*
-*************************************************************************/
-int IsStackGrowingDown_2( int * pI )
-{
- int i = 1;
- return ((unsigned long)&i) < (unsigned long)pI;
-}
-
-int IsStackGrowingDown()
-{
- int i = 1;
- return IsStackGrowingDown_2(&i);
-}
-
-/*************************************************************************
-|*
-|* GetStackAlignment()
-|*
-|* Beschreibung Alignment von char Parametern, die (hoffentlich)
-|* ueber den Stack uebergeben werden
-|*
-*************************************************************************/
-int GetStackAlignment_3( char*p, long l, int i, short s, char b, char c, ... )
-{
- if ( IsStackGrowingDown() )
- return &c - &b;
- else
- return &b - &c;
-}
-
-int GetStackAlignment_2( char*p, long l, int i, short s, char b, char c )
-{
- if ( IsStackGrowingDown() )
- return &c - &b;
- else
- return &b - &c;
-}
-
-int GetStackAlignment()
-{
- int nStackAlignment = GetStackAlignment_3(0,1,2,3,4,5);
- if ( nStackAlignment != GetStackAlignment_2(0,1,2,3,4,5) )
- printf( "Pascal calling convention\n" );
- return nStackAlignment;
-}
-
-
-/*************************************************************************
-|*
-|* Typdeclarations for memory access test functions
-|*
-*************************************************************************/
-typedef enum { t_char, t_short, t_int, t_long, t_double } Type;
-typedef int (*TestFunc)( Type, void* );
-
-
-/*************************************************************************
-|*
-|* PrintArgs()
-|*
-|* Beschreibung Testfunktion fuer variable Parameter
-|*
-*************************************************************************/
-#ifdef I_STDARG
-void PrintArgs( int p, ... )
-#else
-void PrintArgs( p, va_alist )
-int p;
-va_dcl
-#endif
-{
- int value;
- va_list ap;
-
-#ifdef I_STDARG
- va_start( ap, p );
-#else
- va_start( ap );
-#endif
-
- printf( "value = %d", p );
-
- while ( ( value = va_arg(ap, int) ) != 0 )
- printf( " %d", value );
-
- printf( "\n" );
- va_end(ap);
-}
-
-#ifndef USE_FORK_TO_CHECK
-/*************************************************************************
-|*
-|* SignalHdl()
-|*
-|* Beschreibung faengt SIGBUS und SIGSEGV in check() ab
-|*
-*************************************************************************/
-static jmp_buf check_env;
-static int bSignal;
-void SignalHdl( int sig )
-{
- bSignal = 1;
-
- fprintf( stderr, "Signal %d caught\n", sig );
- signal( SIGSEGV, SIG_DFL );
- signal( SIGBUS, SIG_DFL );
- siglongjmp( check_env, sig );
-}
-#endif
-
-/*************************************************************************
-|*
-|* check()
-|*
-|* Beschreibung Testet MemoryZugriff (read/write)
-|*
-*************************************************************************/
-int check( TestFunc func, Type eT, void* p )
-{
-#ifdef USE_FORK_TO_CHECK
- pid_t nChild = fork();
- if ( nChild )
- {
- int exitVal;
- wait( &exitVal );
- if ( exitVal & 0xff )
- return -1;
- else
- return exitVal >> 8;
- }
- else
- {
- exit( func( eT, p ) );
- }
-#else
- int result;
-
- bSignal = 0;
-
- if ( !sigsetjmp( check_env, 1 ) )
- {
- signal( SIGSEGV, SignalHdl );
- signal( SIGBUS, SignalHdl );
- result = func( eT, p );
- signal( SIGSEGV, SIG_DFL );
- signal( SIGBUS, SIG_DFL );
- }
-
- if ( bSignal )
- return -1;
- else
- return 0;
-#endif
-}
-
-/*************************************************************************
-|*
-|* GetAtAddress()
-|*
-|* Beschreibung memory read access
-|*
-*************************************************************************/
-int GetAtAddress( Type eT, void* p )
-{
- switch ( eT )
- {
- case t_char: return *((char*)p);
- case t_short: return *((short*)p);
- case t_int: return *((int*)p);
- case t_long: return *((long*)p);
- case t_double: return *((double*)p);
- }
- abort();
-}
-
-/*************************************************************************
-|*
-|* SetAtAddress()
-|*
-|* Beschreibung memory write access
-|*
-*************************************************************************/
-int SetAtAddress( Type eT, void* p )
-{
- switch ( eT )
- {
- case t_char: return *((char*)p) = 0;
- case t_short: return *((short*)p) = 0;
- case t_int: return *((int*)p) = 0;
- case t_long: return *((long*)p) = 0;
- case t_double: return *((double*)p)= 0;
- }
- abort();
-}
-
-char* TypeName( Type eT )
-{
- switch ( eT )
- {
- case t_char: return "char";
- case t_short: return "short";
- case t_int: return "int";
- case t_long: return "long";
- case t_double: return "double";
- }
- abort();
-}
-
-/*************************************************************************
-|*
-|* Check(Get|Set)Access()
-|*
-|* Beschreibung Testet MemoryZugriff (read/write)
-|* Zugriffsverletzungen werden abgefangen
-|*
-*************************************************************************/
-int CheckGetAccess( Type eT, void* p )
-{
- int b;
- b = -1 != check( (TestFunc)GetAtAddress, eT, p );
-#if OSL_DEBUG_LEVEL > 1
- fprintf( stderr,
- "%s read %s at %p\n",
- (b? "can" : "can not" ), TypeName(eT), p );
-#endif
- return b;
-}
-int CheckSetAccess( Type eT, void* p )
-{
- int b;
-
- b = -1 != check( (TestFunc)SetAtAddress, eT, p );
-#if OSL_DEBUG_LEVEL > 1
- fprintf( stderr,
- "%s write %s at %p\n",
- (b? "can" : "can not" ), TypeName(eT), p );
-#endif
- return b;
-}
-
-/*************************************************************************
-|*
-|* GetAlignment()
-|*
-|* Beschreibung Bestimmt das Alignment verschiedener Typen
-|*
-*************************************************************************/
-int GetAlignment( Type eT )
-{
- char a[ 16*8 ];
- long p = (long)(void*)a;
- int i;
-
- /* clear a[...] to set legal value for double access */
- for ( i = 0; i < 16*8; i++ )
- a[i] = 0;
-
- p = ( p + 0xF ) & ~0xF;
- for ( i = 1; i < 16; i++ )
- if ( CheckGetAccess( eT, (void*)(p+i) ) )
- return i;
- return 0;
-}
-
-/*************************************************************************
-|*
-|* struct Description
-|*
-|* Beschreibung Beschreibt die Parameter der Architektur
-|*
-*************************************************************************/
-struct Description
-{
- int bBigEndian;
- int bStackGrowsDown;
- int nStackAlignment;
- int nAlignment[3]; /* 2,4,8 */
-};
-
-/*************************************************************************
-|*
-|* Description_Ctor()
-|*
-|* Beschreibung Bestimmt die Parameter der Architektur
-|*
-*************************************************************************/
-void Description_Ctor( struct Description* pThis )
-{
- pThis->bBigEndian = IsBigEndian();
- pThis->bStackGrowsDown = IsStackGrowingDown();
- pThis->nStackAlignment = GetStackAlignment();
-
- if ( sizeof(short) != 2 )
- abort();
- pThis->nAlignment[0] = GetAlignment( t_short );
- if ( sizeof(int) != 4 )
- abort();
- pThis->nAlignment[1] = GetAlignment( t_int );
-
- if ( sizeof(long) == 8 )
- pThis->nAlignment[2] = GetAlignment( t_long );
- else if ( sizeof(double) == 8 )
- pThis->nAlignment[2] = GetAlignment( t_double );
- else
- abort();
-}
-
-/*************************************************************************
-|*
-|* Description_Print()
-|*
-|* Beschreibung Schreibt die Parameter der Architektur als Header
-|*
-*************************************************************************/
-void Description_Print( struct Description* pThis, char* name )
-{
- int i;
- FILE* f = fopen( name, "w" );
- if( ! f ) {
- fprintf( stderr, "Unable to open file %s: %s\n", name, strerror( errno ) );
- exit( 99 );
- }
- fprintf( f, "#define __%s\n",
- pThis->bBigEndian ? "BIGENDIAN" : "LITTLEENDIAN" );
- for ( i = 0; i < 3; i++ )
- fprintf( f, "#define __ALIGNMENT%d\t%d\n",
- 1 << (i+1), pThis->nAlignment[i] );
- fprintf( f, "/* Stack alignment is not used... */\n" );
- fprintf( f, "#define __STACKALIGNMENT\t%d\n", pThis->nStackAlignment );
- fprintf( f, "#define __STACKDIRECTION\t%d\n",
- pThis->bStackGrowsDown ? -1 : 1 );
- fprintf( f, "#define __SIZEOFCHAR\t%d\n", sizeof( char ) );
- fprintf( f, "#define __SIZEOFSHORT\t%d\n", sizeof( short ) );
- fprintf( f, "#define __SIZEOFINT\t%d\n", sizeof( int ) );
- fprintf( f, "#define __SIZEOFLONG\t%d\n", sizeof( long ) );
- fprintf( f, "#define __SIZEOFPOINTER\t%d\n", sizeof( void* ) );
- fprintf( f, "#define __SIZEOFDOUBLE\t%d\n", sizeof( double ) );
- fprintf( f, "#define __IEEEDOUBLE\n" );
- fclose( f );
-}
-
-/*************************************************************************
-|*
-|* InfoMemoryAccess()
-|*
-|* Beschreibung Informeller Bytezugriffstest
-|*
-*************************************************************************/
-void InfoMemoryAccess( char* p )
-{
- if ( CheckGetAccess( t_char, p ) )
- printf( "can read address %p\n", p );
- else
- printf( "can not read address %p\n", p );
-
- if ( CheckSetAccess( t_char, p ) )
- printf( "can write address %p\n", p );
- else
- printf( "can not write address %p\n", p );
-}
-
-/*************************************************************************
-|*
-|* InfoMemoryTypeAccess()
-|*
-|* Beschreibung Informeller Zugriffstest verschiedener Typen
-|*
-*************************************************************************/
-void InfoMemoryTypeAccess( Type eT )
-{
- char a[64];
- int i;
-
- /* clear a[...] to set legal value for double access */
- for ( i = 0; i < 64; i++ )
- a[i] = 0;
-
- for ( i = 56; i >= 7; i >>= 1 )
- {
- printf( "Zugriff %s auf %i-Aligned Adresse : ", TypeName( eT ), i / 7 );
- printf( ( CheckGetAccess( eT, (long*)&a[i] ) ? "OK\n" : "ERROR\n" ) );
- }
-}
-/************************************************************************
- *
- * Use C code to determine the characteristics of the building platform.
- *
- ************************************************************************/
-int main( int argc, char* argv[] )
-{
- printTypeSign( char, "char" );
- printTypeSign( short, "short" );
- printTypeSign( int, "int" );
- printTypeSign( long, "long" );
-
- printTypeSize( char, "char" );
- printTypeSize( short, "short" );
- printTypeSize( int, "int" );
- printTypeSize( long, "long" );
- printTypeSize( float, "float" );
- printTypeSize( double, "double" );
- printTypeSize( void *, "void *" );
-
- if ( IsBigEndian() )
- printf( "BIGENDIAN (Sparc, MC680x0, RS6000, IP22, IP32, g3)\n" );
- else
- printf( "LITTLEENDIAN (Intel, VAX, PowerPC)\n" );
-
- if( IsStackGrowingDown() )
- printf( "Stack waechst nach unten\n" );
- else
- printf( "Stack waechst nach oben\n" );
-
- printf( "STACKALIGNMENT : %d\n", GetStackAlignment() );
-
- /* PrintArgs( 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 ); */
-
- if ( argc > 1 )
- {
- struct Description description;
- Description_Ctor( &description );
- Description_Print( &description, argv[1] );
- }
- {
- char* p = NULL;
- InfoMemoryAccess( p );
- p = (char*)&p;
- InfoMemoryAccess( p );
- InfoMemoryTypeAccess( t_short );
- InfoMemoryTypeAccess( t_int );
- InfoMemoryTypeAccess( t_long );
- InfoMemoryTypeAccess( t_double );
- }
-
- exit( 0 );
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/source/stream/cachestr.cxx b/tools/source/stream/cachestr.cxx
index f68f563d427c..ab8a2e7c7806 100644
--- a/tools/source/stream/cachestr.cxx
+++ b/tools/source/stream/cachestr.cxx
@@ -40,13 +40,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;
@@ -59,8 +59,8 @@ SvCacheStream::SvCacheStream( ULONG nMaxMemSize )
*************************************************************************/
SvCacheStream::SvCacheStream( const String &rFileName,
- ULONG nExpectedSize,
- ULONG nMaxMemSize )
+ sal_uIntPtr nExpectedSize,
+ sal_uIntPtr nMaxMemSize )
{
if( !nMaxMemSize )
nMaxMemSize = 20480;
@@ -70,9 +70,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 );
@@ -94,7 +94,7 @@ SvCacheStream::~SvCacheStream()
if( pSwapStream && !bPersistent && pTempFile )
{
// temporaeres File loeschen
- pTempFile->EnableKillingFile( TRUE );
+ pTempFile->EnableKillingFile( sal_True );
}
delete pTempFile;
@@ -130,7 +130,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 );
@@ -148,7 +148,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 );
}
@@ -159,7 +159,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
@@ -174,7 +174,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 );
}
@@ -214,7 +214,7 @@ const void* SvCacheStream::GetBuffer()
|*
*************************************************************************/
-void SvCacheStream::SetSize( ULONG nSize )
+void SvCacheStream::SetSize( sal_uIntPtr nSize )
{
pCurrentStream->SetStreamSize( nSize );
}
@@ -225,13 +225,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/makefile.mk b/tools/source/stream/makefile.mk
deleted file mode 100644
index ee548934c6c6..000000000000
--- a/tools/source/stream/makefile.mk
+++ /dev/null
@@ -1,58 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=tools
-TARGET=stream
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES= $(SLO)$/stream.obj \
- $(SLO)$/strmsys.obj \
- $(SLO)$/cachestr.obj \
- $(SLO)$/vcompat.obj
-
-OBJFILES+= $(OBJ)$/stream.obj \
- $(OBJ)$/strmsys.obj \
- $(OBJ)$/cachestr.obj \
- $(OBJ)$/vcompat.obj
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
-$(SLO)$/strmsys.obj : \
- strmwnt.cxx \
- strmos2.cxx \
- strmunx.cxx
-
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 879ce44d6d83..bdaf4422f4bf 100644..100755
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -118,7 +118,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
{
@@ -168,7 +168,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) );\
@@ -444,7 +444,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
@@ -455,9 +455,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;
@@ -544,7 +544,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
}
@@ -605,8 +605,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 )
@@ -625,11 +625,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;
}
/*************************************************************************
@@ -662,7 +662,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;
@@ -678,8 +678,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;
@@ -691,7 +691,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'
@@ -711,7 +711,7 @@ sal_Bool SvStream::ReadLine( ByteString& rStr )
}
if ( !bEnd && !GetError() && rStr.Len() )
- bEnd = TRUE;
+ bEnd = sal_True;
nOldFilePos += nTotalLen;
if( Tell() > nOldFilePos )
@@ -729,14 +729,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;
@@ -755,8 +755,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;
@@ -770,7 +770,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'
@@ -790,7 +790,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 )
@@ -808,7 +808,7 @@ sal_Bool SvStream::ReadUniStringLine( String& rStr )
}
if ( bEnd )
- bIsEof = FALSE;
+ bIsEof = sal_False;
return bEnd;
}
@@ -832,7 +832,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() )
@@ -1008,7 +1008,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
@@ -1022,21 +1022,59 @@ sal_Bool SvStream::StartWritingUnicodeText()
|*
*************************************************************************/
-sal_Bool SvStream::StartReadingUnicodeText()
+sal_Bool SvStream::StartReadingUnicodeText( rtl_TextEncoding eReadBomCharSet )
{
+ if (!( eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW ||
+ eReadBomCharSet == RTL_TEXTENCODING_UNICODE ||
+ eReadBomCharSet == RTL_TEXTENCODING_UTF8))
+ return sal_True; // nothing to read
+
+ bool bTryUtf8 = false;
sal_uInt16 nFlag;
+ sal_sSize nBack = sizeof(nFlag);
*this >> nFlag;
switch ( nFlag )
{
case 0xfeff :
- // native
+ // native UTF-16
+ if ( eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW ||
+ eReadBomCharSet == RTL_TEXTENCODING_UNICODE)
+ nBack = 0;
break;
case 0xfffe :
- SetEndianSwap( !bSwap );
+ // swapped UTF-16
+ if ( eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW ||
+ eReadBomCharSet == RTL_TEXTENCODING_UNICODE)
+ {
+ SetEndianSwap( !bSwap );
+ nBack = 0;
+ }
+ break;
+ case 0xefbb :
+ if (nNumberFormatInt == NUMBERFORMAT_INT_BIGENDIAN &&
+ (eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW ||
+ eReadBomCharSet == RTL_TEXTENCODING_UTF8))
+ bTryUtf8 = true;
+ break;
+ case 0xbbef :
+ if (nNumberFormatInt == NUMBERFORMAT_INT_LITTLEENDIAN &&
+ (eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW ||
+ eReadBomCharSet == RTL_TEXTENCODING_UTF8))
+ bTryUtf8 = true;
break;
default:
- SeekRel( -((sal_sSize)sizeof(nFlag)) ); // no BOM, pure data
+ ; // nothing
+ }
+ if (bTryUtf8)
+ {
+ sal_uChar nChar;
+ nBack += sizeof(nChar);
+ *this >> nChar;
+ if (nChar == 0xbf)
+ nBack = 0; // it is UTF-8
}
+ if (nBack)
+ SeekRel( -nBack ); // no BOM, pure data
return nError == SVSTREAM_OK;
}
@@ -1370,7 +1408,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) );
@@ -1391,7 +1429,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) );
@@ -1410,7 +1448,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) );
@@ -1607,7 +1645,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 ?
@@ -1652,10 +1690,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;
@@ -1699,7 +1737,7 @@ sal_Size SvStream::Write( const void* pData, sal_Size nCount )
nBufActualLen = nBufActualPos;
pBufPos += nCount;
- bIsDirty = TRUE;
+ bIsDirty = sal_True;
}
else
{
@@ -1711,7 +1749,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 ?
@@ -1739,7 +1777,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;
@@ -1757,7 +1795,7 @@ sal_Size SvStream::Seek( sal_Size nFilePos )
{
eIOMode = STREAM_IO_DONTKNOW;
- bIsEof = FALSE;
+ bIsEof = sal_False;
if( !pRWBuf )
{
nBufFilePos = SeekPos( nFilePos );
@@ -1783,7 +1821,7 @@ sal_Size SvStream::Seek( sal_Size nFilePos )
CryptAndWriteBuffer( pRWBuf, nBufActualLen );
else
PutData( pRWBuf, nBufActualLen );
- bIsDirty = FALSE;
+ bIsDirty = sal_False;
}
nBufActualLen = 0;
nBufActualPos = 0;
@@ -1815,7 +1853,7 @@ void SvStream::Flush()
else
if( PutData( pRWBuf, nBufActualLen ) != nBufActualLen )
SetError( SVSTREAM_WRITE_ERROR );
- bIsDirty = FALSE;
+ bIsDirty = sal_False;
}
if( bIsWritable )
FlushData();
@@ -1855,9 +1893,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
@@ -1886,7 +1924,7 @@ SvStream& SvStream::PutBack( char aCh )
*pRWBuf = aCh;
}
eIOMode = STREAM_IO_DONTKNOW;
- bIsEof = FALSE;
+ bIsEof = sal_False;
return *this;
}
@@ -1921,7 +1959,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 );
@@ -1929,7 +1967,7 @@ void SvStream::RefreshBuffer()
nError = ERRCODE_NONE;
if( nCryptMask )
EncryptBuffer(pRWBuf, (sal_Size)nBufActualLen);
- bIsConsistent = TRUE;
+ bIsConsistent = sal_True;
eIOMode = STREAM_IO_DONTKNOW;
}
@@ -1999,7 +2037,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;
}
@@ -2024,7 +2062,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;
}
@@ -2049,7 +2087,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;
}
@@ -2204,7 +2242,7 @@ sal_Bool SvStream::EncryptBuffer(void* pStart, sal_Size nLen)
aCh ^= nMask;
*pTemp = aCh;
}
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -2361,12 +2399,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;
@@ -2381,8 +2419,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;
@@ -2448,7 +2486,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;
@@ -2612,7 +2650,7 @@ void SvMemoryStream::ResetError()
sal_Bool SvMemoryStream::AllocateMemory( sal_Size nNewSize )
{
- pBuf = new BYTE[nNewSize];
+ pBuf = new sal_uInt8[nNewSize];
return( pBuf != 0 );
}
@@ -2624,18 +2662,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 );
@@ -2657,7 +2695,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 90224ccbc91f..b41c2548a2cd 100644
--- a/tools/source/stream/strmos2.cxx
+++ b/tools/source/stream/strmos2.cxx
@@ -58,20 +58,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 },
@@ -92,7 +92,7 @@ ULONG GetSvError( APIRET nPMError )
{ 0xFFFF, SVSTREAM_GENERALERROR }
};
- ULONG nRetVal = SVSTREAM_GENERALERROR; // Standardfehler
+ sal_uIntPtr nRetVal = SVSTREAM_GENERALERROR; // Standardfehler
int i=0;
do
{
@@ -115,9 +115,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 );
@@ -137,9 +137,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 );
}
@@ -163,9 +163,9 @@ SvFileStream::~SvFileStream()
|*
*************************************************************************/
-ULONG SvFileStream::GetFileHandle() const
+sal_uIntPtr SvFileStream::GetFileHandle() const
{
- return (ULONG)pInstanceData->hFile;
+ return (sal_uIntPtr)pInstanceData->hFile;
}
/*************************************************************************
@@ -174,7 +174,7 @@ ULONG SvFileStream::GetFileHandle() const
|*
*************************************************************************/
-USHORT SvFileStream::IsA() const
+sal_uInt16 SvFileStream::IsA() const
{
return ID_FILESTREAM;
}
@@ -187,7 +187,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(): " );
@@ -197,7 +197,7 @@ ULONG SvFileStream::GetData( void* pData, ULONG nSize )
DBG_TRACE( aTraceStr.GetBuffer() );
#endif
- ULONG nCount = 0L;
+ sal_uIntPtr nCount = 0L;
if( IsOpen() )
{
APIRET nResult;
@@ -214,7 +214,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: " );
@@ -224,7 +224,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;
@@ -243,9 +243,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;
@@ -271,9 +271,9 @@ ULONG SvFileStream::SeekPos( ULONG nPos )
|*
*************************************************************************/
/*
-ULONG SvFileStream::Tell()
+sal_uIntPtr SvFileStream::Tell()
{
- ULONG nPos = 0L;
+ sal_uIntPtr nPos = 0L;
if( IsOpen() )
{
@@ -309,9 +309,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;
@@ -330,7 +330,7 @@ sal_Bool SvFileStream::LockRange( ULONG nByteOffset, ULONG nBytes )
if( nResult )
SetError(::GetSvError(nResult) );
else
- bRetVal = TRUE;
+ bRetVal = sal_True;
}
return bRetVal;
}
@@ -341,9 +341,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;
@@ -362,7 +362,7 @@ sal_Bool SvFileStream::UnlockRange( ULONG nByteOffset, ULONG nBytes )
if( nResult )
SetError(::GetSvError(nResult) );
else
- bRetVal = TRUE;
+ bRetVal = sal_True;
}
return bRetVal;
}
@@ -375,19 +375,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;
}
@@ -400,7 +400,7 @@ sal_Bool SvFileStream::LockFile()
sal_Bool SvFileStream::UnlockFile()
{
- sal_Bool bRetVal = FALSE;
+ sal_Bool bRetVal = sal_False;
if( nLockCounter > 0)
{
if( nLockCounter == 1)
@@ -408,13 +408,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;
@@ -437,10 +437,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
@@ -508,7 +508,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,
@@ -526,15 +526,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;
}
}
@@ -575,10 +575,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();
}
@@ -602,7 +602,7 @@ void SvFileStream::ResetError()
|*
*************************************************************************/
-void SvFileStream::SetSize( ULONG nSize )
+void SvFileStream::SetSize( sal_uIntPtr nSize )
{
if( IsOpen() )
{
@@ -612,4 +612,4 @@ void SvFileStream::SetSize( ULONG nSize )
}
}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/tools/source/stream/strmwnt.cxx b/tools/source/stream/strmwnt.cxx
index 992bad47e62a..d05f54c728bd 100644
--- a/tools/source/stream/strmwnt.cxx
+++ b/tools/source/stream/strmwnt.cxx
@@ -64,9 +64,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 },
@@ -106,7 +106,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
{
@@ -128,9 +128,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 );
@@ -150,9 +150,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 );
@@ -177,17 +177,9 @@ SvFileStream::~SvFileStream()
|*
*************************************************************************/
-sal_uInt32 SvFileStream::GetFileHandle() const
+sal_uIntPtr SvFileStream::GetFileHandle() const
{
- // Note that this method is broken on 64-bit as it would return
- // only the lower 32 bits of a file handle. (As such, it might be
- // that on 64-bit Windows, even in a 64-bit process, the upper 32
- // bits of handles are always zero? But surely we should not rely
- // on that.) On the other hand, this method is private in
- // SvFileStream and isn't used anywhere for Windows. So make sure
- // it doesn't get used in the future either, just abort().
- abort( );
- return 0;
+ return (sal_uIntPtr)pInstanceData->hFile;
}
/*************************************************************************
@@ -196,7 +188,7 @@ sal_uInt32 SvFileStream::GetFileHandle() const
|*
*************************************************************************/
-USHORT SvFileStream::IsA() const
+sal_uInt16 SvFileStream::IsA() const
{
return ID_FILESTREAM;
}
@@ -209,7 +201,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() )
@@ -217,7 +209,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 ) );
}
}
@@ -230,7 +222,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() )
@@ -247,7 +239,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() )
@@ -266,7 +258,7 @@ ULONG SvFileStream::SeekPos( ULONG nPos )
}
else
SetError( SVSTREAM_GENERALERROR );
- return (ULONG)nNewPos;
+ return (sal_uIntPtr)nNewPos;
}
/*************************************************************************
@@ -275,9 +267,9 @@ ULONG SvFileStream::SeekPos( ULONG nPos )
|*
*************************************************************************/
/*
-ULONG SvFileStream::Tell()
+sal_uIntPtr SvFileStream::Tell()
{
- ULONG nPos = 0L;
+ sal_uIntPtr nPos = 0L;
if( IsOpen() )
{
@@ -314,7 +306,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() )
@@ -332,7 +324,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() )
@@ -350,21 +342,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;
}
@@ -375,9 +367,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)
@@ -385,13 +377,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;
@@ -506,7 +498,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);
@@ -531,15 +523,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 );
}
@@ -574,9 +566,9 @@ void SvFileStream::Close()
Flush();
CloseHandle( pInstanceData->hFile );
}
- bIsOpen = FALSE;
+ bIsOpen = sal_False;
nLockCounter= 0;
- bIsWritable = FALSE;
+ bIsWritable = sal_False;
SvStream::ClearBuffer();
SvStream::ClearError();
}
@@ -600,24 +592,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 77ab0ef5f840..227c3e05ddca 100644
--- a/tools/source/stream/vcompat.cxx
+++ b/tools/source/stream/vcompat.cxx
@@ -37,7 +37,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 )
@@ -65,7 +65,7 @@ VersionCompat::~VersionCompat()
{
if( STREAM_WRITE == mnStmMode )
{
- const UINT32 nEndPos = mpRWStm->Tell();
+ const sal_uInt32 nEndPos = mpRWStm->Tell();
mpRWStm->Seek( mnCompatPos );
*mpRWStm << ( nEndPos - mnTotalSize );
@@ -73,7 +73,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/makefile.mk b/tools/source/string/makefile.mk
deleted file mode 100644
index d99ef7be8c4a..000000000000
--- a/tools/source/string/makefile.mk
+++ /dev/null
@@ -1,89 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=tools
-TARGET=str
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-.IF "$(OS)"!="AIX"
-ALWAYSDBGFILES = $(SLO)$/debugprint.obj
-.ENDIF
-
-.IF "$(ALWAYSDBGFILES)" != ""
-ALWAYSDBGTARGET=do_it_alwaysdebug
-.ENDIF
-
-SLOFILES= $(SLO)$/tstring.obj \
- $(SLO)$/tustring.obj \
- $(SLO)$/tenccvt.obj \
- $(SLO)$/reversemap.obj \
- $(SLO)$/debugprint.obj
-
-OBJFILES= $(OBJ)$/tstring.obj \
- $(OBJ)$/tustring.obj \
- $(OBJ)$/tenccvt.obj \
- $(OBJ)$/reversemap.obj \
- $(OBJ)$/debugprint.obj
-
-# --- Targets ------------------------------------------------------
-
-.IF "$(ALWAYSDBG_FLAG)"==""
-TARGETDEPS+=$(ALWAYSDBGTARGET)
-.ENDIF
-
-.INCLUDE : target.mk
-
-$(INCCOM)$/reversemap.hxx: $(BIN)$/bestreversemap
- $(AUGMENT_LIBRARY_PATH) $(BIN)$/bestreversemap > $@
-
-$(SLO)$/reversemap.obj: $(INCCOM)$/reversemap.hxx
-$(OBJ)$/reversemap.obj: $(INCCOM)$/reversemap.hxx
-
-.IF "$(ALWAYSDBGTARGET)" != ""
-.IF "$(ALWAYSDBG_FLAG)" == ""
-# --------------------------------------------------
-# - ALWAYSDBG - files always compiled with debugging
-# --------------------------------------------------
-$(ALWAYSDBGTARGET):
- @echo --- ALWAYSDBGFILES ---
- @dmake $(MFLAGS) $(MAKEFILE) debug=true $(ALWAYSDBGFILES) ALWAYSDBG_FLAG=TRUE $(CALLMACROS)
- @echo --- ALWAYSDBGFILES OVER ---
-
-$(ALWAYSDBGFILES):
- @echo --- ALWAYSDBG ---
- @dmake $(MFLAGS) $(MAKEFILE) debug=true ALWAYSDBG_FLAG=TRUE $(CALLMACROS) $@
- @echo --- ALWAYSDBG OVER ---
-.ENDIF
-.ENDIF
diff --git a/tools/source/string/strascii.cxx b/tools/source/string/strascii.cxx
index 95fc092ad799..f7729c99b305 100644
--- a/tools/source/string/strascii.cxx
+++ b/tools/source/string/strascii.cxx
@@ -32,17 +32,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
@@ -505,7 +505,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 ),
@@ -516,7 +516,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 ),
@@ -527,7 +527,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 );
@@ -543,7 +543,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 81588c48e6cf..54169c3c0716 100644
--- a/tools/source/string/strcvt.cxx
+++ b/tools/source/string/strcvt.cxx
@@ -228,7 +228,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();
@@ -354,7 +354,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 )
@@ -410,7 +410,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 );
@@ -443,7 +443,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) )
@@ -481,7 +481,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];
@@ -531,7 +531,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 dd7ad23326c1..21065f999958 100644
--- a/tools/source/string/strimp.cxx
+++ b/tools/source/string/strimp.cxx
@@ -1142,7 +1142,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
@@ -1165,7 +1165,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
@@ -1328,18 +1328,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);
@@ -1347,7 +1347,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 );
@@ -1356,18 +1356,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);
@@ -1375,7 +1375,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 );
@@ -1384,7 +1384,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 );
@@ -1396,7 +1396,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);
}
@@ -1406,7 +1406,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 );
@@ -1419,7 +1419,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 );
@@ -1431,7 +1431,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);
}
@@ -1441,7 +1441,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 c259e63817c7..e4ffa7791180 100644
--- a/tools/source/string/tenccvt.cxx
+++ b/tools/source/string/tenccvt.cxx
@@ -85,14 +85,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 8a0ecb8a8529..02ab2cd6d0b1 100644
--- a/tools/source/string/tstring.cxx
+++ b/tools/source/string/tstring.cxx
@@ -181,7 +181,7 @@ double ByteString::ToDouble() const
// -----------------------------------------------------------------------
-BOOL ByteString::IsLowerAscii() const
+sal_Bool ByteString::IsLowerAscii() const
{
DBG_CHKTHIS( ByteString, DbgCheckByteString );
@@ -191,18 +191,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 );
@@ -212,18 +212,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 );
@@ -234,18 +234,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 );
@@ -255,18 +255,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 );
@@ -278,13 +278,13 @@ 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;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/source/testtoolloader/makefile.mk b/tools/source/testtoolloader/makefile.mk
deleted file mode 100644
index 3d5cb8223e3f..000000000000
--- a/tools/source/testtoolloader/makefile.mk
+++ /dev/null
@@ -1,45 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=TOOLS
-TARGET=testtoolloader
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES= \
- $(SLO)$/testtoolloader.obj
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/tools/source/testtoolloader/testtoolloader.cxx b/tools/source/testtoolloader/testtoolloader.cxx
index c62abdb4584d..fb09c247aaf6 100644
--- a/tools/source/testtoolloader/testtoolloader.cxx
+++ b/tools/source/testtoolloader/testtoolloader.cxx
@@ -135,7 +135,7 @@ void InitTestToolLib()
if ( pInitFunc )
{
(reinterpret_cast< pfunc_CreateEventLogger >(pInitFunc))();
- bLoggerStarted = TRUE;
+ bLoggerStarted = sal_True;
}
else
{
@@ -172,7 +172,7 @@ void DeInitTestToolLib()
if ( pDeInitFunc )
{
(reinterpret_cast< pfunc_DestroyEventLogger >(pDeInitFunc))();
- bLoggerStarted = FALSE;
+ bLoggerStarted = sal_False;
}
}
diff --git a/tools/source/zcodec/makefile.mk b/tools/source/zcodec/makefile.mk
deleted file mode 100644
index 9067b45c3b5d..000000000000
--- a/tools/source/zcodec/makefile.mk
+++ /dev/null
@@ -1,47 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=tools
-TARGET=zcodec
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-.IF "$(SYSTEM_ZLIB)" == "YES"
-CFLAGS+=-DSYSTEM_ZLIB
-.ENDIF
-SLOFILES= $(SLO)$/zcodec.obj
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/tools/source/zcodec/zcodec.cxx b/tools/source/zcodec/zcodec.cxx
index c86983d41799..2386415a4266 100644
--- a/tools/source/zcodec/zcodec.cxx
+++ b/tools/source/zcodec/zcodec.cxx
@@ -61,7 +61,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;
@@ -88,11 +88,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;
@@ -147,8 +147,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 )
{
@@ -156,7 +156,7 @@ long ZCodec::Compress( SvStream& rIStm, SvStream& rOStm )
ImplWriteBack();
if ( deflate( PZSTREAM, Z_NO_FLUSH ) < 0 )
{
- mbStatus = FALSE;
+ mbStatus = sal_False;
break;
}
};
@@ -168,7 +168,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 )
@@ -178,8 +178,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
{
@@ -197,7 +197,7 @@ long ZCodec::Decompress( SvStream& rIStm, SvStream& rOStm )
err = inflate( PZSTREAM, Z_NO_FLUSH );
if ( err < 0 )
{
- mbStatus = FALSE;
+ mbStatus = sal_False;
break;
}
@@ -206,18 +206,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;
@@ -230,7 +230,7 @@ long ZCodec::Write( SvStream& rOStm, const BYTE* pData, ULONG nSize )
if ( deflate( PZSTREAM, Z_NO_FLUSH ) < 0 )
{
- mbStatus = FALSE;
+ mbStatus = sal_False;
break;
}
}
@@ -239,10 +239,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;
@@ -250,7 +250,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;
@@ -279,17 +279,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;
@@ -297,7 +297,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;
@@ -307,9 +307,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 )
{
@@ -338,7 +338,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);
}
@@ -347,7 +347,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 )
{
@@ -360,35 +360,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 )
{
@@ -397,19 +397,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 */
@@ -440,13 +440,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
{
@@ -456,14 +456,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
@@ -474,14 +474,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/test/makefile.mk b/tools/test/makefile.mk
deleted file mode 100644
index 573dd91f736d..000000000000
--- a/tools/test/makefile.mk
+++ /dev/null
@@ -1,64 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..
-
-PRJNAME=tools
-TARGET=tests
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-CFLAGSCXX += $(CPPUNIT_CFLAGS)
-
-# --- Common ----------------------------------------------------------
-
-SHL1OBJS= \
- $(SLO)$/tests.obj
-
-SHL1TARGET= tests
-SHL1STDLIBS= $(SALLIB) \
- $(TOOLSLIB) \
- $(CPPUNITLIB)
-
-SHL1IMPLIB= i$(SHL1TARGET)
-
-DEF1NAME =$(SHL1TARGET)
-SHL1VERSIONMAP = export.map
-
-#------------------------------- All object files ----------------------------
-
-# do this here, so we get right dependencies
-SLOFILES=$(SHL1OBJS)
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-.INCLUDE : _cppunit.mk
diff --git a/tools/unx/source/dll/makefile.mk b/tools/unx/source/dll/makefile.mk
deleted file mode 100644
index da1d73f04682..000000000000
--- a/tools/unx/source/dll/makefile.mk
+++ /dev/null
@@ -1,48 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=TOOLS
-TARGET=dll
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-CXXFILES= toolsdll.cxx
-
-SLOFILES= $(SLO)$/toolsdll.obj
-
-OBJFILES= $(OBJ)$/toolsdll.obj
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/tools/unx/source/dll/toolsdll.cxx b/tools/unx/source/dll/toolsdll.cxx
index 1d09e371afd2..c5bf8ecd8282 100644
--- a/tools/unx/source/dll/toolsdll.cxx
+++ b/tools/unx/source/dll/toolsdll.cxx
@@ -40,7 +40,7 @@ static void* aAppData[SHL_COUNT];
|*
***************************************************************************/
-void** GetAppData( USHORT nSharedLib )
+void** GetAppData( sal_uInt16 nSharedLib )
{
return &(aAppData[nSharedLib]);
}
diff --git a/tools/util/makefile.mk b/tools/util/makefile.mk
deleted file mode 100644
index 9d6a4ac43fa8..000000000000
--- a/tools/util/makefile.mk
+++ /dev/null
@@ -1,171 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..
-
-PRJNAME=TOOLS
-TARGET=tools
-ENABLE_EXCEPTIONS=true
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Allgemein ----------------------------------------------------
-
-# --- STDSTRM.LIB ---
-LIB3TARGET= $(LB)$/stdstrm.lib
-LIB3ARCHIV= $(LB)$/libstdstrm.a
-LIB3FILES= $(LB)$/stream.lib
-
-LIB7TARGET= $(LB)$/a$(TARGET).lib
-LIB7ARCHIV= $(LB)$/liba$(TARGET).a
-LIB7FILES= $(LB)$/gen.lib \
- $(LB)$/str.lib \
- $(LB)$/mtools.lib \
- $(LB)$/datetime.lib \
- $(LB)$/fsys.lib \
- $(LB)$/communi.lib \
- $(LB)$/stream.lib \
- $(LB)$/ref.lib \
- $(LB)$/rc.lib \
- $(LB)$/inet.lib \
- $(LB)$/debug.lib
-
-
-LIB7FILES+= $(LB)$/dll.lib
-
-# --- TOOLS.LIB ---
-LIB1TARGET:= $(SLB)$/$(TARGET).lib
-LIB1FILES+= \
- $(SLB)$/gen.lib \
- $(SLB)$/str.lib \
- $(SLB)$/mtools.lib \
- $(SLB)$/datetime.lib \
- $(SLB)$/fsys.lib \
- $(SLB)$/communi.lib \
- $(SLB)$/stream.lib \
- $(SLB)$/ref.lib \
- $(SLB)$/rc.lib \
- $(SLB)$/debug.lib \
- $(SLB)$/zcodec.lib \
- $(SLB)$/inet.lib \
- $(SLB)$/testtoolloader.lib \
- $(SLB)$/misc.lib
-
-.IF "$(OS)"=="MACOSX"
-SHL1STDLIBS += $(CPPULIB) \
- $(ZLIB3RDLIB)
-.ELSE
-SHL1STDLIBS += $(ZLIB3RDLIB) \
- $(CPPULIB)
-.ENDIF
-
-LIB1FILES+= $(SLB)$/dll.lib
-
-
-.IF "$(BIG_TOOLS)"!=""
-.IF "$(GUI)"=="WNT"
-# bei lokalen osl rtl oder vos das SOLARLIBDIR bitte patchen !
-LIB1FILES+= $(SOLARLIBDIR)\xosl.lib \
- $(SOLARLIBDIR)\xrtl.lib
-
-SHL1STDLIBS+= $(WSOCK32LIB)
-.ENDIF
-.ENDIF # "$(BIG_TOOLS)"!=""
-
-# --- TOOLS.DLL ---
-
-SHL1TARGET= tl$(DLLPOSTFIX)
-SHL1LIBS= $(LIB1TARGET)
-SHL1DEF= $(MISC)$/$(SHL1TARGET).def
-SHL1IMPLIB= itools
-SHL1USE_EXPORTS=name
-SHL1STDLIBS+= $(SALLIB) $(BASEGFXLIB) $(I18NISOLANGLIB) $(COMPHELPERLIB)
-
-.IF "$(GUI)"=="WNT"
-SHL1STDLIBS+= $(SHELL32LIB) \
- $(MPRLIB) \
- $(OLE32LIB) \
- $(UUIDLIB) \
- $(ADVAPI32LIB)
-.ENDIF
-
-DEF1NAME =$(SHL1TARGET)
-DEF1DEPN = \
- $(MISC)$/$(SHL1TARGET).flt \
- $(HXX1FILES) \
- $(HXX2FILES) \
- $(HXX3FILES) \
- $(HXX4FILES) \
- $(HXX5FILES) \
- $(HXX6FILES) \
- $(HXX7FILES) \
- $(HXX8FILES) \
- $(HXX9FILES) \
- $(HXX10FILES) \
- $(HXX11FILES) \
- $(HXX12FILES) \
- $(HXX13FILES) \
- $(HXX14FILES) \
- $(HXX15FILES) \
- $(HXX16FILES) \
- $(HXX17FILES) \
- $(HXX18FILES) \
- $(HXX19FILES) \
- $(HXX20FILES) \
- makefile.mk
-
-DEFLIB1NAME =tools
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-# --- TOOLS.FLT ---
-$(MISC)$/$(SHL1TARGET).flt: makefile.mk
- @echo ------------------------------
- @echo Making: $@
- @echo Imp>$@
- @echo PointerList>>$@
- @echo DbgCheck>>$@
- @echo LabelList>>$@
- @echo ActionList>>$@
- @echo CBlock>>$@
- @echo DirEntryStack>>$@
- @echo readdir>>$@
- @echo closedir>>$@
- @echo opendir>>$@
- @echo volumeid>>$@
- @echo MsDos2Time>>$@
- @echo MsDos2Date>>$@
- @echo __new_alloc>>$@
- @echo __CT>>$@
- @echo unnamed>>$@
-.IF "$(COM)"=="BLC"
- @echo WEP>>$@
-.ENDIF
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 */
- }
-};
diff --git a/tools/win/inc/dll.hxx b/tools/win/inc/dll.hxx
index 99cd3202c8a5..7444bba02854 100644
--- a/tools/win/inc/dll.hxx
+++ b/tools/win/inc/dll.hxx
@@ -29,10 +29,6 @@
#ifndef _DLL_HXX
#define _DLL_HXX
-// -------------------------------
-// - Sonstige Funktionen fuer SV -
-// -------------------------------
-
// Um Resourcen wieder freizugeben
inline void ImpDeInitWinTools() {}
diff --git a/tools/win/inc/parser.hxx b/tools/win/inc/parser.hxx
deleted file mode 100644
index 0c3f448db0a9..000000000000
--- a/tools/win/inc/parser.hxx
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-#ifndef _PARSER_HXX
-#define _PARSER_HXX
-
-#if defined WNT
-
-#include <tools/string.hxx>
-#include <winshell.hxx>
-
-void * NewBinaryFromString( const String & rBinStr );
-String CreateStringFromData( const void *pData, ULONG nBytes );
-
-String CreateStringFromItemIDList( const CItemIDList & rIDList );
-
-String GetURLFromHostNotation( const String & rPath );
-String GetHostNotationFromURL( const String & rURL );
-
-CItemIDList MakeIDToken( const String &rToken );
-CItemIDList ParseSpecialURL( const String & rURL );
-
-#endif
-
-#endif // _PARSER_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/win/inc/shellex.h b/tools/win/inc/shellex.h
deleted file mode 100644
index 8aa68a5c8d5e..000000000000
--- a/tools/win/inc/shellex.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-#ifndef _SHELLEX_H_
-#define _SHELLEX_H_
-
-#ifndef _SHLOBJ_H_
-#include <shlobj.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#define WINSHELLCALL inline
-#else
-#define WINSHELLCALL static
-#endif
-
-#define SHChangeNotifyRegister_PROC_STR MAKEINTRESOURCE(2)
-#define SHChangeNotifyDeregister_PROC_STR MAKEINTRESOURCE(4)
-
-#define SHCNF_ACCEPT_INTERRUPTS 0x0001
-#define SHCNF_ACCEPT_NON_INTERRUPTS 0x0002
-#define SHCNF_NO_PROXY 0x8000
-
-#define SHCNF_ACCEPT_ALL (SHCNF_ACCEPT_INTERRUPTS | SHCNF_ACCEPT_NON_INTERRUPTS)
-
-typedef struct tagNOTIFYREGISTER {
- LPCITEMIDLIST pidlPath;
- BOOL bWatchSubtree;
-} NOTIFYREGISTER;
-
-typedef NOTIFYREGISTER *LPNOTIFYREGISTER;
-typedef NOTIFYREGISTER const *LPCNOTIFYREGISTER;
-
-typedef HANDLE (WINAPI *SHChangeNotifyRegister_PROC)(
- HWND hWnd,
- DWORD dwFlags,
- LONG wEventMask,
- UINT uMsg,
- ULONG cItems,
- LPCNOTIFYREGISTER lpItems);
-
-
-WINSHELLCALL HANDLE WINAPI SHChangeNotifyRegister(
- HWND hWnd,
- DWORD dwFlags,
- LONG wEventMask,
- UINT uMsg,
- ULONG cItems,
- LPCNOTIFYREGISTER lpItems)
-
-{
- HMODULE hModule = GetModuleHandle( "SHELL32" );
- HANDLE hNotify = NULL;
-
- if ( hModule )
- {
- SHChangeNotifyRegister_PROC lpfnSHChangeNotifyRegister = (SHChangeNotifyRegister_PROC)GetProcAddress( hModule, SHChangeNotifyRegister_PROC_STR );
- if ( lpfnSHChangeNotifyRegister )
- hNotify = lpfnSHChangeNotifyRegister( hWnd, dwFlags, wEventMask, uMsg, cItems, lpItems );
- }
-
- return hNotify;
-}
-
-
-
-typedef BOOL (WINAPI *SHChangeNotifyDeregister_PROC)(
- HANDLE hNotify);
-
-WINSHELLCALL BOOL WINAPI SHChangeNotifyDeregister( HANDLE hNotify )
-{
- HMODULE hModule = GetModuleHandle( "SHELL32" );
- BOOL fSuccess = FALSE;
-
- if ( hModule )
- {
- SHChangeNotifyDeregister_PROC lpfnSHChangeNotifyDeregister = (SHChangeNotifyDeregister_PROC)GetProcAddress( hModule, SHChangeNotifyDeregister_PROC_STR );
- if ( lpfnSHChangeNotifyDeregister )
- fSuccess = lpfnSHChangeNotifyDeregister( hNotify );
- }
-
- return fSuccess;
-}
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/win/inc/shutil.h b/tools/win/inc/shutil.h
deleted file mode 100644
index 0edd1dd2cb6c..000000000000
--- a/tools/win/inc/shutil.h
+++ /dev/null
@@ -1,217 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-#ifndef _SHUTIL_H_
-#define _SHUTIL_H_
-
-#if defined WNT
-
-#ifndef _SHOBJ_H
-#include <shlobj.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define PROTOCOL_FILE "file:"
-#define MAX_URL (MAX_PATH + sizeof(PROTOCOL_FILE))
-
-#define SHUTIL_TO_DELIVER
-
-//--------------------------------------------------------------------------
-
-void * WINAPI WIN_SHAlloc( ULONG cb );
-void * WINAPI WIN_SHRealloc( void *pv, ULONG cb );
-void WINAPI WIN_SHFree( void *pv );
-
-//--------------------------------------------------------------------------
-
-ULONG WINAPI WIN_SHGetIDListSize( LPCITEMIDLIST pidl );
-BOOL WINAPI WIN_SHCloneIDList( LPCITEMIDLIST pidl, LPITEMIDLIST *ppidl );
-BOOL WINAPI WIN_SHAppendIDList( LPCITEMIDLIST pidl, LPITEMIDLIST *ppidl );
-LONG WINAPI WIN_SHCompareIDList( LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2 );
-
-LONG WINAPI WIN_SHGetIDListTokenCount( LPCITEMIDLIST pidl );
-BOOL WINAPI WIN_SHGetIDListToken( LPCITEMIDLIST pidl, ULONG nToken, LPITEMIDLIST *ppidl );
-
-BOOL WINAPI WIN_SHSplitIDList(
- LPCITEMIDLIST pidl,
- LPITEMIDLIST * pidlFolder,
- LPITEMIDLIST * pidlItem
- );
-
-BOOL WINAPI WIN_SHSplitIDListEx(
- LPCITEMIDLIST pidl,
- LPITEMIDLIST * pidlParent,
- LPITEMIDLIST * pidlChild,
- ULONG nLevel
- );
-
-//--------------------------------------------------------------------------
-
-#define WIN_SHGetSpecialFolderLocation( nFolder, ppidl ) \
- ((BOOL)(NOERROR == SHGetSpecialFolderLocation( GetFocus(), nFolder, ppidl )))
-
-#define WIN_SHGetPathFromIDList( pidl, pszPath ) \
- SHGetPathFromIDList( pidl, pszPath )
-
-// #define SHGP_CLSID 0x00000001
-
-// BOOL WINAPI WIN_SHGetPathFromIDListEx( LPCITEMIDLIST pidl, LPSTR pszBuffer, UINT uFlags );
-
-BOOL WINAPI WIN_SHGetIDListFromPath( LPCSTR pszPath, LPITEMIDLIST *ppidl );
-
-BOOL WINAPI WIN_SHGetPathFromURL( LPCSTR pszURL, LPSTR pszPath );
-BOOL WINAPI WIN_SHGetURLFromPath( LPCSTR pszPath, LPSTR pszURL );
-
-BOOL WINAPI WIN_SHGetFolderFromIDList( LPCITEMIDLIST pidl, LPSHELLFOLDER *ppshf );
-BOOL WINAPI WIN_SHGetSpecialFolder( int nFolder, LPSHELLFOLDER *ppshf );
-BOOL WINAPI WIN_SHGetFolderFromPath( LPCSTR pszPath, LPSHELLFOLDER *ppshf );
-
-BOOL WINAPI WIN_SHGetSpecialFolderPath( int nFolder, LPSTR pszPath );
-
-HRESULT WINAPI WIN_SHGetDataFromIDList(
- LPSHELLFOLDER psf,
- LPCITEMIDLIST pidl,
- int nFormat,
- PVOID pv,
- int cb
- );
-
-
-//--------------------------------------------------------------------------
-
-#define SHIC_PIDL 0x00000001
-#define SHIC_NO_UI 0x00000002
-
-#define CMDSTR_OPENA "open"
-#define CMDSTR_EXPLOREA "explore"
-#define CMDSTR_FINDA "find"
-
-#define CMDSTR_OPENW L"open"
-#define CMDSTR_EXPLOREW L"explore"
-#define CMDSTR_FINDW L"find"
-
-#ifdef UNICODE
-#define CMDSTR_OPEN CMDSTR_OPENW
-#define CMDSTR_EXPLORE CMDSTR_EXPLOREW
-#define CMDSTR_FIND CMDSTR_FINDW
-#else
-#define CMDSTR_OPEN CMDSTR_OPENA
-#define CMDSTR_EXPLORE CMDSTR_EXPLOREA
-#define CMDSTR_FIND CMDSTR_FINDA
-#endif
-
-#define CMDSTR_DEFAULT MAKEINTRESOURCE(0x00)
-
-#define CMDSTR_LINK MAKEINTRESOURCE(0x10)
-#define CMDSTR_DELETE MAKEINTRESOURCE(0x11)
-#define CMDSTR_RENAME MAKEINTRESOURCE(0x12)
-#define CMDSTR_PROPERTIES MAKEINTRESOURCE(0x13)
-#define CMDSTR_CUT MAKEINTRESOURCE(0x18)
-#define CMDSTR_COPY MAKEINTRESOURCE(0x19)
-
-BOOL WINAPI WIN_SHInvokeCommand(
- HWND hwndOwner,
- DWORD dwFlags,
- LPCTSTR lpPath,
- LPCSTR lpVerb,
- LPCSTR lpParameters,
- LPCSTR lpDirectory,
- int nShow
- );
-
-//--------------------------------------------------------------------------
-
-BOOL WINAPI WIN_SHStrRetToMultiByte(
- LPCITEMIDLIST pidl,
- const STRRET * pStr,
- LPSTR lpMultiByte,
- int cchMultiByte
- );
-
-DWORD WIN_SHBuildCRC( LPVOID pBytes, ULONG nBytes );
-
-DWORD WINAPI WIN_GetShellVersion(VOID);
-
-HIMAGELIST WINAPI WIN_SHGetSystemImageList( UINT uFlags );
-
-//--------------------------------------------------------------------------
-
-/*
-
-ULONG WINAPI WIN_CreateStringFromBinary (
- LPCVOID pv,
- ULONG cbSize,
- LPSTR pszString,
- ULONG cbStringSize
- );
-
-ULONG WINAPI WIN_CreateBinaryFromString(
- LPCSTR pszStr,
- LPVOID pBuffer,
- ULONG cbSize
- );
-*/
-
-//--------------------------------------------------------------------------
-
-DWORD WINAPI WIN_SHSetValue(
- HKEY hKey,
- LPCTSTR pszSubKey,
- LPCTSTR pszValue,
- DWORD dwType,
- LPCVOID pvData,
- DWORD cbData
- );
-
-DWORD WINAPI WIN_SHGetValue(
- HKEY hKey,
- LPCTSTR pszSubKey,
- LPCTSTR pszValue,
- LPDWORD pdwType,
- LPVOID pvData,
- LPDWORD pcbData
- );
-
-DWORD WINAPI WIN_SHDeleteValue(
- HKEY hKey,
- LPCTSTR pszSubKey,
- LPCTSTR pszValue
- );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-#endif // _SHUTIL_H_
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/win/inc/toolsdll.hxx b/tools/win/inc/toolsdll.hxx
deleted file mode 100644
index 0c8a1fd11d68..000000000000
--- a/tools/win/inc/toolsdll.hxx
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-#ifndef _TOOLSDLL_HXX
-#define _TOOLSDLL_HXX
-
-/* Yes, this file is now effectively empty. Remove it completely in a
- * later commit.
- */
-
-#endif // _DLL_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/win/inc/winshell.hxx b/tools/win/inc/winshell.hxx
deleted file mode 100644
index dce848f31daf..000000000000
--- a/tools/win/inc/winshell.hxx
+++ /dev/null
@@ -1,389 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-#ifndef _WINSHELL_HXX
-#define _WINSHELL_HXX
-
-#if defined WNT
-
-#include <prewin.h>
-#include "shutil.h"
-#include <postwin.h>
-
-#include <tools/string.hxx>
-
-//----------------------------------------------------------------------------
-// CItemIDList
-//----------------------------------------------------------------------------
-
-class CItemIDList
-{
-public:
- CItemIDList();
- CItemIDList( const CItemIDList & );
- CItemIDList( LPCITEMIDLIST );
- CItemIDList( const String & );
- CItemIDList( int nFolder );
- ~CItemIDList();
-
- CItemIDList & operator = ( const CItemIDList & );
- CItemIDList & operator += ( const CItemIDList & );
- CItemIDList operator + ( const CItemIDList & ) const;
-
- int operator == ( const CItemIDList & ) const;
- int operator != ( const CItemIDList & rIDList ) const
- { return ! operator == ( rIDList ); };
-
- operator LPCITEMIDLIST() const
- { return m_pidl; };
-
- int GetTokenCount() const;
- CItemIDList GetToken( int nIndex ) const;
- CItemIDList GetParent( int nLevelFromBottom = 1) const;
- CItemIDList GetChild( int nLevelFromBottom = 1 ) const;
- void Split( CItemIDList & rParent, CItemIDList & rChild, int nLevelFromBottom = 1 ) const;
-
- CItemIDList operator []( int nIndex ) const
- { return GetToken( nIndex ); };
-
- String GetFilePath() const;
-
- BOOL IsValid() const
- { return m_pidl != NULL && m_pidl->mkid.cb != sizeof(USHORT); }
-
- int GetRootID() const
- { return m_nFolder; }
-
-protected:
- ITEMIDLIST *m_pidl;
- int m_nFolder;
-};
-
-
-inline CItemIDList CItemIDList::operator + ( const CItemIDList & rIDList ) const
-{
- CItemIDList aCopy( *this );
- aCopy += rIDList;
- return aCopy;
-}
-
-//----------------------------------------------------------------------------
-// Types for CShellFolder
-//----------------------------------------------------------------------------
-
-// Notification Events fuer CShellFolder
-
-enum NotificationEvent
-{
- NotificationEvent_Error,
- NotificationEvent_Signaled,
- NotificationEvent_Canceled
-};
-
-// Volume information
-
-typedef struct _WIN32_VOLUME_DATA
-{
- TCHAR cDeviceName[MAX_PATH];
- TCHAR cVolumeName[MAX_PATH];
- TCHAR cFileSystemName[MAX_PATH];
- DWORD dwSerialNumber;
- DWORD dwFileSystemFlags;
- DWORD nMaxComponentLength;
-} WIN32_VOLUME_DATA;
-
-// Bekannte Class-IDs fuer wichtige Ordner
-
-// {871C5380-42A0-1069-A2EA-08002B30309D} Internet Explorer 4.0
-static const GUID CLSID_IE4 =
-{ 0x871C5380, 0x42A0, 0x1069, { 0xA2, 0xEA, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D } };
-
-// {208D2C60-3AEA-1069-A2D7-08002B30309D} Netzwerkumgebung
-static const GUID CLSID_Network =
-{ 0x208D2C60, 0x3AEA, 0x1069, { 0xA2, 0xD7, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D } };
-
-// {645FF040-5081-101B-9F08-00AA002F954E} Papierkorb
-static const GUID CLSID_RecycleBin =
-{ 0x645FF040, 0x5081, 0x101B, { 0x9F, 0x08, 0x00, 0xAA, 0x00, 0x2F, 0x95, 0x4E } };
-
-// {20D04FE0-3AEA-1069-A2D8-08002B30309D} Arbeitsplatz
-static const GUID CLSID_MyComputer =
-{ 0x20D04FE0, 0x3AEA, 0x1069, { 0xA2, 0xD8, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D } };
-
-// {D6277990-4C6A-11CF-8D87-00AA0060F5BF} Geplante Vorgänge
-static const GUID CLSID_Tasks =
-{ 0xD6277990, 0x4C6A, 0x11CF, { 0x8D, 0x87, 0x00, 0xAA, 0x00, 0x60, 0xF5, 0xBF } };
-
-// Fehlt im Header
-
-#define SHGDN_INCLUDE_NONFILESYS 0x2000
-
-#define CSIDL_UNKNOWN -1
-#define CSIDL_ROOT -2
-#define CSIDL_SYSTEM -3
-
-// Suchmaske fuer IEnumIDList
-
-#define SHCONTF_ALL (SHCONTF_FOLDERS | SHCONTF_NONFOLDERS | SHCONTF_INCLUDEHIDDEN)
-
-// SHITEM Prefix Kinds
-
-#define SHGII_CONTAINER_MASK 0x70
-
-#define SHGII_COMPUTER 0x20
-
-#define SHGII_COMPUTER_REMOVABLE 0x22
-#define SHGII_COMPUTER_FIXED 0x23
-#define SHGII_COMPUTER_REMOTE 0x24
-#define SHGII_COMPUTER_CDROM 0x25
-#define SHGII_COMPUTER_RAMDISK 0x26
-#define SHGII_COMPUTER_FLOPPY525 0x28
-#define SHGII_COMPUTER_FLOPPY35 0x29
-#define SHGII_COMPUTER_NETWORK 0x2A
-#define SHGII_COMPUTER_REGITEM 0x2E
-
-#define SHGII_ROOT 0x10
-#define SHGII_ROOT_REGITEM 0x1F
-
-#define SHGII_NETWORK 0x40
-#define SHGII_NETWORK_TREE 0x47
-#define SHGII_NETWORK_SERVER 0x42
-#define SHGII_NETWORK_DIRECTORY 0x43
-#define SHGII_NETWORK_PRINTER 0x41
-
-#define SHGII_FILESYSTEM 0x30
-#define SHGII_FILESYSTEM_FILE 0x31
-#define SHGII_FILESYSTEM_DIRECTORY 0x32
-
-#define SHGII_ANCESTOR 0x80
-
-#define SHITEMCONTAINER( pidl ) ((pidl)->mkid.abID[0] & SHGII_CONTAINER_MASK)
-#define SHITEMKIND( pidl ) ((pidl)->mkid.abID[0] & 0x7F)
-
-//----------------------------------------------------------------------------
-// CShellFolderData
-//----------------------------------------------------------------------------
-
-class CShellFolderData
-{
-protected:
- CShellFolderData();
- virtual ~CShellFolderData();
-
- IShellFolder *m_pShellFolder;
- IEnumIDList *m_pEnumIDList;
- IShellIcon *m_pShellIcon;
- BOOL m_bIsOpen;
- HANDLE m_hCancelEvent;
- DWORD m_dwContentFlags;
-};
-
-//----------------------------------------------------------------------------
-// CShellFolder
-//----------------------------------------------------------------------------
-
-// Ganz "normaler" Ordner basierend auf dem IShellFolder Interface
-
-class CShellFolder : public CShellFolderData
-{
-public:
- CShellFolder( const CItemIDList & );
- CShellFolder( const CShellFolder & );
- CShellFolder( IShellFolder * );
-
- // Retrieval of Item IDs
-
- virtual BOOL Reset();
-
- BOOL GetNextValidID( CItemIDList & );
-
- virtual BOOL GetNextID( CItemIDList & );
- virtual BOOL ValidateID( const CItemIDList & );
-
- // Getting information about Items
-
- virtual BOOL GetAttributesOf( const CItemIDList &, LPDWORD pdwInOut );
- virtual BOOL GetNameOf( const CItemIDList &, String & );
-
- virtual BOOL GetFileInfo( const CItemIDList &, WIN32_FIND_DATA * );
- virtual BOOL GetVolumeInfo( const CItemIDList & rIDList, WIN32_VOLUME_DATA * );
-
- // Modifying the folder contents
-
- virtual BOOL SetNameOf( const CItemIDList &, const String &, CItemIDList & );
- virtual BOOL DeleteItem( const CItemIDList & );
-
- // Comparison of IDs
-
- virtual int CompareIDs( const CItemIDList &, const CItemIDList & );
-
- // UI Components
-
- virtual IContextMenu *GetContextMenu( int nItems, const CItemIDList * );
- virtual String GetIconLocation( const CItemIDList & );
-
- // Notifications
-
- virtual NotificationEvent WaitForChanges();
- virtual void CancelWaitNotifications();
-
-protected:
- CShellFolder() : CShellFolderData() {};
-
- void Initialize( IShellFolder *pShellFolder );
- void Initialize( LPCITEMIDLIST );
-};
-
-//----------------------------------------------------------------------------
-// CFileSystemFolder
-//----------------------------------------------------------------------------
-
-// Reiner !!! Filesystem-Ordner. Benutzt optimierten Notification Mechanismus
-
-class CFileSystemFolder : public CShellFolder
-{
-public:
- CFileSystemFolder( LPCSTR pszPath );
-
- virtual NotificationEvent WaitForChanges();
-
-protected:
- CFileSystemFolder() : CShellFolder() {};
-
- void Initialize( LPCTSTR pszPath );
-
- TCHAR m_szPath[MAX_PATH];
-};
-
-//----------------------------------------------------------------------------
-// CSpecialFolder
-//----------------------------------------------------------------------------
-
-// Wie SHellFolder, aber andere Konstruktion ueber definierte Junktion-Points
-
-class CSpecialFolder : public CShellFolder
-{
-public:
- CSpecialFolder( int nFolder );
-
-protected:
- CSpecialFolder() : CShellFolder() {};
-
- void Initialize( int nFolder );
-
- int m_nFolder;
-};
-
-//----------------------------------------------------------------------------
-// CMyComputerFolder
-//----------------------------------------------------------------------------
-
-// Der MS-Windows "Arbeitsplatz"
-
-class CMyComputerFolder : public CSpecialFolder
-{
-public:
- CMyComputerFolder() : CSpecialFolder( CSIDL_DRIVES ) {};
-};
-
-//----------------------------------------------------------------------------
-// CVolumesFolder
-//----------------------------------------------------------------------------
-
-// Wie CMyComputersFolder, enthält aber nur die Laufwerke
-
-class CVolumesFolder : public CMyComputerFolder
-{
-public:
- CVolumesFolder() : CMyComputerFolder() {};
-
- virtual BOOL ValidateID( const CItemIDList & );
- virtual NotificationEvent WaitForChanges();
-};
-
-//----------------------------------------------------------------------------
-// CWorkplaceFolder
-//----------------------------------------------------------------------------
-
-// Wie CMyComputersFolder, enthält aber keine!!! Laufwerke
-
-class CWorkplaceFolder : public CMyComputerFolder
-{
- CWorkplaceFolder() : CMyComputerFolder() {};
-
- virtual BOOL ValidateID( const CItemIDList & );
- virtual NotificationEvent WaitForChanges();
-};
-
-//----------------------------------------------------------------------------
-// CDesktopFolder
-//----------------------------------------------------------------------------
-
-// Der MS-Windows Desktop
-
-class CDesktopFolder : public CSpecialFolder
-{
-public:
- CDesktopFolder() : CSpecialFolder( CSIDL_DESKTOP ) {};
-};
-
-//----------------------------------------------------------------------------
-// CDesktopAncestorsFolder
-//----------------------------------------------------------------------------
-
-// Wie CDesktopFolder, enthält aber nur Arbeitsplatz und Netzwerk
-
-class CDesktopAncestorsFolder : public CDesktopFolder
-{
-public:
- CDesktopAncestorsFolder() : CDesktopFolder() {};
-
- virtual BOOL ValidateID( const CItemIDList & );
- virtual NotificationEvent WaitForChanges();
-};
-
-//----------------------------------------------------------------------------
-// CDesktopContentsFolder
-//----------------------------------------------------------------------------
-
-// Wie CDesktopFolder, aber ohne!!! Arbeitsplatz und Netzwerk
-
-class CDesktopContentsFolder : public CDesktopFolder
-{
-public:
- CDesktopContentsFolder() : CDesktopFolder() {};
-
- virtual BOOL ValidateID( const CItemIDList & );
- virtual NotificationEvent WaitForChanges();
-};
-
-#endif
-
-#endif // _WINSHELL_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/win/source/dll/makefile.mk b/tools/win/source/dll/makefile.mk
deleted file mode 100644
index 403da065d653..000000000000
--- a/tools/win/source/dll/makefile.mk
+++ /dev/null
@@ -1,56 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=TOOLS
-TARGET=dll
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-.INCLUDE: $(PRJ)$/util$/makefile.pmk
-
-# --- WNT ----------------------------------------------------------
-
-.IF "$(GUI)" == "WNT"
-
-# --- Files --------------------------------------------------------
-
-CXXFILES= toolsdll.cxx
-
-SLOFILES= $(SLO)$/toolsdll.obj
-
-OBJFILES= $(OBJ)$/toolsdll.obj
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-.ENDIF
-
diff --git a/tools/win/source/dll/toolsdll.cxx b/tools/win/source/dll/toolsdll.cxx
index 2c9f09b2fc57..fe104751c81e 100644
--- a/tools/win/source/dll/toolsdll.cxx
+++ b/tools/win/source/dll/toolsdll.cxx
@@ -30,7 +30,6 @@
#include "precompiled_tools.hxx"
#include <tools/svwin.h>
#include <dll.hxx>
-#include <toolsdll.hxx>
#include <tools/shl.hxx>
// =======================================================================
diff --git a/tools/win/source/fastfsys/makefile.mk b/tools/win/source/fastfsys/makefile.mk
deleted file mode 100644
index 12df85d6a2f3..000000000000
--- a/tools/win/source/fastfsys/makefile.mk
+++ /dev/null
@@ -1,71 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..\..\..
-
-PRJNAME=TOOLS
-TARGET=fastfsys
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- WNT ----------------------------------------------------------
-
-.IF "$(GUI)" == "WNT"
-
-# --- Files --------------------------------------------------------
-
-
-OBJFILES= $(OBJ)$/shutil.obj \
- $(OBJ)$/shidl.obj \
- $(OBJ)$/shmalloc.obj \
- $(OBJ)$/fffolder.obj \
- $(OBJ)$/ffmenu.obj \
- $(OBJ)$/ffitem.obj \
- $(OBJ)$/fflink.obj \
- $(OBJ)$/ffparser.obj \
- $(OBJ)$/wincidl.obj \
- $(OBJ)$/wincshf.obj
-
-
-SLOFILES= $(SLO)$/shutil.obj \
- $(SLO)$/shidl.obj \
- $(SLO)$/shmalloc.obj \
- $(SLO)$/fffolder.obj \
- $(SLO)$/ffmenu.obj \
- $(SLO)$/ffitem.obj \
- $(SLO)$/fflink.obj \
- $(SLO)$/ffparser.obj \
- $(SLO)$/wincidl.obj \
- $(SLO)$/wincshf.obj
-
-# --- Targets ------------------------------------------------------
-
-.ENDIF
-
-.INCLUDE : target.mk
diff --git a/tools/workben/makefile.mk b/tools/workben/makefile.mk
deleted file mode 100644
index 97e7ebfa9a15..000000000000
--- a/tools/workben/makefile.mk
+++ /dev/null
@@ -1,89 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ = ..
-PRJNAME = tl
-TARGET = tldem
-LIBTARGET = NO
-TARGETTYPE = CUI
-ENABLE_EXCEPTIONS=TRUE
-
-.INCLUDE: settings.mk
-
-OBJFILES = \
- $(OBJ)$/solar.obj \
- $(OBJ)$/urltest.obj \
- $(OBJ)$/inetmimetest.obj
-# $(OBJ)$/demostor.obj \
-# $(OBJ)$/fstest.obj \
-# $(OBJ)$/tldem.obj \
-
-APP1TARGET = solar
-APP1OBJS = $(OBJ)$/solar.obj
-.IF "$(GUI)" == "UNX" || "$(GUI)" == "OS2"
-APP1STDLIBS = $(TOOLSLIB)
-.ELSE
-APP1LIBS = $(LB)$/itools.lib
-.ENDIF
-
-APP2TARGET = urltest
-APP2OBJS = $(OBJ)$/urltest.obj
-.IF "$(GUI)" == "UNX" || "$(GUI)" == "OS2"
-APP2STDLIBS = $(TOOLSLIB) $(SALLIB) $(CPPULIB) $(CPPUHELPERLIB)
-.ELSE
-APP2STDLIBS = $(LB)$/itools.lib $(SALLIB) $(CPPULIB) $(CPPUHELPERLIB)
-.ENDIF
-
-APP3TARGET = inetmimetest
-APP3OBJS = $(OBJ)$/inetmimetest.obj
-APP3STDLIBS = $(SALLIB) $(TOOLSLIB)
-
-# APP3TARGET = tldem
-# APP3OBJS = $(OBJ)$/tldem.obj
-# .IF "$(GUI)" == "UNX"
-# APP3STDLIBS = $(TOOLSLIB)
-# .ELSE
-# APP3STDLIBS = $(LB)$/itools.lib
-# .ENDIF
-
-# APP4TARGET = demostor
-# APP4OBJS = $(OBJ)$/demostor.obj
-# .IF "$(GUI)" == "UNX"
-# APP4STDLIBS = $(TOOLSLIB) $(SALLIB)
-# .ELSE
-# APP4STDLIBS = $(LB)$/itools.lib $(SALLIB)
-# .ENDIF
-
-# APP5TARGET = fstest
-# APP5OBJS = $(OBJ)$/fstest.obj
-# .IF "$(GUI)" == "UNX"
-# APP5STDLIBS = $(TOOLSLIB) $(SALLIB)
-# .ELSE
-# APP5STDLIBS = $(LB)$/itools.lib $(SALLIB)
-# .ENDIF
-
-.INCLUDE: target.mk