summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
Diffstat (limited to 'svl')
-rw-r--r--svl/AllLangResTarget_svl.mk6
-rwxr-xr-xsvl/JunitTest_svl_complex.mk59
-rw-r--r--svl/Library_fsstorage.mk23
-rw-r--r--svl/Library_passwordcontainer.mk23
-rw-r--r--svl/Library_svl.mk26
-rw-r--r--svl/Module_svl.mk10
-rw-r--r--svl/Package_inc.mk6
-rw-r--r--svl/inc/svl/aeitem.hxx30
-rw-r--r--svl/inc/svl/brdcst.hxx8
-rw-r--r--svl/inc/svl/broadcast.hxx2
-rw-r--r--svl/inc/svl/cenumitm.hxx64
-rw-r--r--svl/inc/svl/cintitem.hxx112
-rw-r--r--svl/inc/svl/cntnrsrt.hxx38
-rw-r--r--svl/inc/svl/cntwall.hxx24
-rw-r--r--svl/inc/svl/converter.hxx4
-rw-r--r--svl/inc/svl/ctypeitm.hxx18
-rw-r--r--svl/inc/svl/custritm.hxx12
-rw-r--r--svl/inc/svl/dateitem.hxx20
-rw-r--r--svl/inc/svl/eitem.hxx10
-rw-r--r--svl/inc/svl/filerec.hxx304
-rw-r--r--svl/inc/svl/flagitem.hxx24
-rw-r--r--svl/inc/svl/globalnameitem.hxx10
-rw-r--r--svl/inc/svl/hint.hxx10
-rw-r--r--svl/inc/svl/httpcook.hxx10
-rw-r--r--svl/inc/svl/ilstitem.hxx6
-rw-r--r--svl/inc/svl/imageitm.hxx12
-rw-r--r--svl/inc/svl/inethist.hxx12
-rw-r--r--svl/inc/svl/instrm.hxx16
-rw-r--r--svl/inc/svl/intitem.hxx52
-rw-r--r--svl/inc/svl/itemiter.hxx12
-rw-r--r--svl/inc/svl/itempool.hxx116
-rw-r--r--svl/inc/svl/itemprop.hxx16
-rw-r--r--svl/inc/svl/itemset.hxx72
-rw-r--r--svl/inc/svl/lckbitem.hxx16
-rw-r--r--svl/inc/svl/listener.hxx8
-rw-r--r--svl/inc/svl/lngmisc.hxx14
-rw-r--r--svl/inc/svl/lstner.hxx12
-rw-r--r--svl/inc/svl/macitem.hxx36
-rw-r--r--svl/inc/svl/mailenum.hxx8
-rw-r--r--svl/inc/svl/metitem.hxx4
-rw-r--r--svl/inc/svl/nranges.hxx14
-rw-r--r--svl/inc/svl/outstrm.hxx10
-rw-r--r--svl/inc/svl/ownlist.hxx4
-rw-r--r--svl/inc/svl/poolcach.hxx2
-rw-r--r--svl/inc/svl/poolitem.hxx66
-rw-r--r--svl/inc/svl/ptitem.hxx16
-rw-r--r--svl/inc/svl/rectitem.hxx16
-rw-r--r--svl/inc/svl/rngitem.hxx22
-rw-r--r--svl/inc/svl/sfontitm.hxx8
-rw-r--r--svl/inc/svl/slstitm.hxx18
-rw-r--r--svl/inc/svl/smplhint.hxx10
-rw-r--r--svl/inc/svl/srchitem.hxx10
-rw-r--r--svl/inc/svl/stritem.hxx8
-rw-r--r--svl/inc/svl/strmadpt.hxx16
-rw-r--r--svl/inc/svl/style.hxx120
-rw-r--r--svl/inc/svl/svarray.hxx234
-rw-r--r--svl/inc/svl/svdde.hxx64
-rw-r--r--svl/inc/svl/svldata.hxx2
-rw-r--r--svl/inc/svl/svstdarr.hxx38
-rw-r--r--svl/inc/svl/szitem.hxx16
-rw-r--r--svl/inc/svl/undo.hxx377
-rw-r--r--svl/inc/svl/visitem.hxx24
-rw-r--r--svl/inc/svl/whiter.hxx16
-rw-r--r--svl/inc/svl/zforlist.hxx176
-rw-r--r--svl/inc/svl/zformat.hxx220
-rw-r--r--svl/prj/build.lst1
-rw-r--r--svl/prj/makefile.mk2
-rw-r--r--svl/source/config/languageoptions.cxx2
-rw-r--r--svl/source/filerec/filerec.cxx204
-rw-r--r--svl/source/inc/passwordcontainer.hxx6
-rw-r--r--svl/source/inc/poolio.hxx92
-rw-r--r--svl/source/items/aeitem.cxx50
-rw-r--r--svl/source/items/cenumitm.cxx54
-rw-r--r--svl/source/items/cintitem.cxx88
-rw-r--r--svl/source/items/cntwall.cxx32
-rw-r--r--svl/source/items/ctypeitm.cxx24
-rw-r--r--svl/source/items/custritm.cxx6
-rw-r--r--svl/source/items/dateitem.cxx26
-rw-r--r--svl/source/items/flagitem.cxx22
-rw-r--r--svl/source/items/globalnameitem.cxx12
-rw-r--r--svl/source/items/ilstitem.cxx16
-rw-r--r--svl/source/items/imageitm.cxx24
-rw-r--r--svl/source/items/intitem.cxx28
-rw-r--r--svl/source/items/itempool.cxx134
-rw-r--r--svl/source/items/itemprop.cxx22
-rw-r--r--svl/source/items/itemset.cxx542
-rw-r--r--svl/source/items/lckbitem.cxx30
-rw-r--r--svl/source/items/macitem.cxx26
-rw-r--r--svl/source/items/nranges.cxx32
-rw-r--r--svl/source/items/poolcach.cxx2
-rw-r--r--svl/source/items/poolio.cxx316
-rw-r--r--svl/source/items/poolitem.cxx40
-rw-r--r--svl/source/items/ptitem.cxx24
-rw-r--r--svl/source/items/rectitem.cxx24
-rw-r--r--svl/source/items/rngitem.cxx2
-rwxr-xr-x[-rw-r--r--]svl/source/items/rngitem_inc.cxx20
-rw-r--r--svl/source/items/sfontitm.cxx12
-rw-r--r--svl/source/items/sitem.cxx10
-rw-r--r--svl/source/items/slstitm.cxx48
-rw-r--r--svl/source/items/srchitem.cxx12
-rw-r--r--svl/source/items/stritem.cxx6
-rw-r--r--svl/source/items/style.cxx238
-rw-r--r--svl/source/items/stylepool.cxx4
-rw-r--r--svl/source/items/szitem.cxx22
-rw-r--r--svl/source/items/visitem.cxx24
-rw-r--r--svl/source/items/whiter.cxx18
-rw-r--r--svl/source/memtools/svarray.cxx104
-rw-r--r--svl/source/misc/adrparse.cxx2
-rw-r--r--svl/source/misc/fstathelper.cxx6
-rw-r--r--svl/source/misc/inethist.cxx98
-rw-r--r--svl/source/misc/inettype.cxx22
-rw-r--r--svl/source/misc/lngmisc.cxx44
-rw-r--r--svl/source/misc/ownlist.cxx40
-rw-r--r--svl/source/misc/strmadpt.cxx60
-rw-r--r--svl/source/notify/brdcst.cxx28
-rw-r--r--svl/source/notify/broadcast.cxx8
-rw-r--r--svl/source/notify/listener.cxx14
-rw-r--r--svl/source/notify/lstner.cxx20
-rw-r--r--svl/source/notify/smplhint.cxx2
-rw-r--r--svl/source/numbers/numfmuno.cxx56
-rw-r--r--svl/source/numbers/numfmuno.hxx4
-rw-r--r--svl/source/numbers/numhead.cxx38
-rw-r--r--svl/source/numbers/numhead.hxx22
-rw-r--r--svl/source/numbers/zforfind.cxx448
-rw-r--r--svl/source/numbers/zforfind.hxx132
-rw-r--r--svl/source/numbers/zforlist.cxx504
-rw-r--r--svl/source/numbers/zformat.cxx632
-rw-r--r--svl/source/numbers/zforscan.cxx164
-rw-r--r--svl/source/numbers/zforscan.hxx84
-rw-r--r--svl/source/svdde/ddecli.cxx28
-rw-r--r--svl/source/svdde/ddedata.cxx12
-rw-r--r--svl/source/svdde/ddeimp.hxx26
-rw-r--r--svl/source/svdde/ddesvr.cxx102
-rw-r--r--svl/source/svsql/converter.cxx4
-rw-r--r--svl/source/undo/undo.cxx1243
-rw-r--r--svl/unx/source/svdde/ddedummy.cxx52
-rw-r--r--svl/util/svl.pmk31
137 files changed, 5001 insertions, 4098 deletions
diff --git a/svl/AllLangResTarget_svl.mk b/svl/AllLangResTarget_svl.mk
index 6759202a5fa4..1ecd4dcff389 100644
--- a/svl/AllLangResTarget_svl.mk
+++ b/svl/AllLangResTarget_svl.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2009 by Sun Microsystems, Inc.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -14,12 +14,12 @@
#
# 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.
#
diff --git a/svl/JunitTest_svl_complex.mk b/svl/JunitTest_svl_complex.mk
new file mode 100755
index 000000000000..f141dadc342b
--- /dev/null
+++ b/svl/JunitTest_svl_complex.mk
@@ -0,0 +1,59 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2011 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_JunitTest_JunitTest,svl_complex))
+
+$(eval $(call gb_JunitTest_set_defs,svl_complex,\
+ $$(DEFS) \
+ -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/svl/qa/complex/broken_document/test_documents \
+))
+
+$(eval $(call gb_JunitTest_add_jars,svl_complex,\
+ $(OUTDIR)/bin/OOoRunner.jar \
+ $(OUTDIR)/bin/ridl.jar \
+ $(OUTDIR)/bin/test.jar \
+ $(OUTDIR)/bin/unoil.jar \
+ $(OUTDIR)/bin/jurt.jar \
+ $(OUTDIR)/bin/ConnectivityTools.jar \
+))
+
+$(eval $(call gb_JunitTest_add_sourcefiles,svl_complex,\
+ svl/qa/complex/ConfigItems/CheckConfigItems \
+ svl/qa/complex/passwordcontainer/PasswordContainerUnitTest \
+ svl/qa/complex/passwordcontainer/TestHelper \
+ svl/qa/complex/passwordcontainer/Test03 \
+ svl/qa/complex/passwordcontainer/Test02 \
+ svl/qa/complex/passwordcontainer/Test01 \
+ svl/qa/complex/passwordcontainer/PasswordContainerTest \
+ svl/qa/complex/passwordcontainer/MasterPasswdHandler \
+))
+
+$(eval $(call gb_JunitTest_add_classes,svl_complex,\
+ complex.passwordcontainer.PasswordContainerUnitTest \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/svl/Library_fsstorage.mk b/svl/Library_fsstorage.mk
index f109e0620d5e..f3b8f41e3c69 100644
--- a/svl/Library_fsstorage.mk
+++ b/svl/Library_fsstorage.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2009 by Sun Microsystems, Inc.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -14,12 +14,12 @@
#
# 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.
#
@@ -50,13 +50,7 @@ $(eval $(call gb_Library_add_linked_libs,fsstorage,\
tl \
ucbhelper \
utl \
-))
-
-$(eval $(call gb_Library_add_linked_system_libs,fsstorage,\
- dl \
- icuuc \
- m \
- pthread \
+ $(gb_STDLIBS) \
))
$(eval $(call gb_Library_add_exception_objects,fsstorage,\
@@ -66,13 +60,4 @@ $(eval $(call gb_Library_add_exception_objects,fsstorage,\
svl/source/fsstor/ostreamcontainer \
))
-ifeq ($(OS),WNT)
-$(eval $(call gb_Library_add_linked_libs,fsstorage,\
- kernel32 \
- msvcrt \
- oldnames \
- user32 \
- uwinapi \
-))
-endif
# vim: set noet sw=4 ts=4:
diff --git a/svl/Library_passwordcontainer.mk b/svl/Library_passwordcontainer.mk
index d0b35552e18a..08acae0930ec 100644
--- a/svl/Library_passwordcontainer.mk
+++ b/svl/Library_passwordcontainer.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2009 by Sun Microsystems, Inc.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -14,12 +14,12 @@
#
# 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.
#
@@ -48,13 +48,7 @@ $(eval $(call gb_Library_add_linked_libs,passwordcontainer,\
stl \
ucbhelper \
utl \
-))
-
-$(eval $(call gb_Library_add_linked_system_libs,passwordcontainer,\
- icuuc \
- dl \
- m \
- pthread \
+ $(gb_STDLIBS) \
))
$(eval $(call gb_Library_add_exception_objects,passwordcontainer,\
@@ -62,13 +56,4 @@ $(eval $(call gb_Library_add_exception_objects,passwordcontainer,\
svl/source/passwordcontainer/syscreds \
))
-ifeq ($(OS),WNT)
-$(eval $(call gb_Library_add_linked_libs,passwordcontainer,\
- kernel32 \
- msvcrt \
- oldnames \
- user32 \
- uwinapi \
-))
-endif
# vim: set noet sw=4 ts=4:
diff --git a/svl/Library_svl.mk b/svl/Library_svl.mk
index 7faf5caa7f65..0ad3ecc4aa87 100644
--- a/svl/Library_svl.mk
+++ b/svl/Library_svl.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2009 by Sun Microsystems, Inc.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -14,12 +14,12 @@
#
# 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.
#
@@ -35,13 +35,9 @@ $(eval $(call gb_Library_set_componentfile,svl,svl/util/svl))
$(eval $(call gb_Library_set_include,svl,\
$$(SOLARINC) \
- -I$(WORKDIR)/inc/svl \
- -I$(WORKDIR)/inc/ \
- -I$(SRCDIR)/svl/inc \
-I$(SRCDIR)/svl/source/inc \
-I$(SRCDIR)/svl/inc/pch \
-I$(OUTDIR)/inc/offuh \
- -I$(OUTDIR)/inc \
))
$(eval $(call gb_Library_set_defs,svl,\
@@ -64,16 +60,9 @@ $(eval $(call gb_Library_add_linked_libs,svl,\
ucbhelper \
utl \
vos3 \
+ $(gb_STDLIBS) \
))
-$(eval $(call gb_Library_add_linked_system_libs,svl,\
- dl \
- icuuc \
- m \
- pthread \
-))
-
-
$(eval $(call gb_Library_add_exception_objects,svl,\
svl/inc/pch/precompiled_svl \
svl/source/config/asiancfg \
@@ -170,14 +159,9 @@ $(eval $(call gb_Library_add_exception_objects,svl,\
))
$(eval $(call gb_Library_add_linked_libs,svl,\
- advapi32 \
- kernel32 \
- gdi32 \
- msvcrt \
- shell32 \
user32 \
- uwinapi \
))
+
else
$(eval $(call gb_Library_add_exception_objects,svl,\
svl/unx/source/svdde/ddedummy \
diff --git a/svl/Module_svl.mk b/svl/Module_svl.mk
index 6bba7a0836f7..108d487c8e0d 100644
--- a/svl/Module_svl.mk
+++ b/svl/Module_svl.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2009 by Sun Microsystems, Inc.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -14,12 +14,12 @@
#
# 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.
#
@@ -35,6 +35,10 @@ $(eval $(call gb_Module_add_targets,svl,\
Package_inc \
))
+$(eval $(call gb_Module_add_subsequentcheck_targets,svl,\
+ JunitTest_svl_complex \
+))
+
#todo: dde platform dependent
#todo: package_inc
#todo: map file
diff --git a/svl/Package_inc.mk b/svl/Package_inc.mk
index 888cdc38cfa6..c070c9ee5a6f 100644
--- a/svl/Package_inc.mk
+++ b/svl/Package_inc.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2009 by Sun Microsystems, Inc.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -14,12 +14,12 @@
#
# 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.
#
diff --git a/svl/inc/svl/aeitem.hxx b/svl/inc/svl/aeitem.hxx
index 34029c7563f4..b9ff02a69e78 100644
--- a/svl/inc/svl/aeitem.hxx
+++ b/svl/inc/svl/aeitem.hxx
@@ -40,32 +40,32 @@ class SVL_DLLPUBLIC SfxAllEnumItem: public SfxEnumItem
SvUShorts* pDisabledValues;
protected:
- USHORT _GetPosByValue( USHORT nValue ) const;
+ sal_uInt16 _GetPosByValue( sal_uInt16 nValue ) const;
public:
TYPEINFO();
SfxAllEnumItem();
- SfxAllEnumItem( USHORT nWhich);
- SfxAllEnumItem( USHORT nWhich, USHORT nVal );
- SfxAllEnumItem( USHORT nWhich, USHORT nVal, const XubString &rText );
- SfxAllEnumItem( USHORT nWhich, SvStream &rStream );
+ SfxAllEnumItem( sal_uInt16 nWhich);
+ SfxAllEnumItem( sal_uInt16 nWhich, sal_uInt16 nVal );
+ SfxAllEnumItem( sal_uInt16 nWhich, sal_uInt16 nVal, const XubString &rText );
+ SfxAllEnumItem( sal_uInt16 nWhich, SvStream &rStream );
SfxAllEnumItem( const SfxAllEnumItem & );
~SfxAllEnumItem();
- void InsertValue( USHORT nValue );
- void InsertValue( USHORT nValue, const XubString &rText );
- void RemoveValue( USHORT nValue );
+ void InsertValue( sal_uInt16 nValue );
+ void InsertValue( sal_uInt16 nValue, const XubString &rText );
+ void RemoveValue( sal_uInt16 nValue );
void RemoveAllValues();
- USHORT GetPosByValue( USHORT nValue ) const;
+ sal_uInt16 GetPosByValue( sal_uInt16 nValue ) const;
- virtual USHORT GetValueCount() const;
- virtual USHORT GetValueByPos( USHORT nPos ) const;
- virtual XubString GetValueTextByPos( USHORT nPos ) const;
+ virtual sal_uInt16 GetValueCount() const;
+ virtual sal_uInt16 GetValueByPos( sal_uInt16 nPos ) const;
+ virtual XubString GetValueTextByPos( sal_uInt16 nPos ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT nVersion) const;
- virtual BOOL IsEnabled( USHORT ) const;
- void DisableValue( USHORT );
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16 nVersion) const;
+ virtual sal_Bool IsEnabled( sal_uInt16 ) const;
+ void DisableValue( sal_uInt16 );
};
#endif
diff --git a/svl/inc/svl/brdcst.hxx b/svl/inc/svl/brdcst.hxx
index b55d78f99540..87eeab351b3c 100644
--- a/svl/inc/svl/brdcst.hxx
+++ b/svl/inc/svl/brdcst.hxx
@@ -47,7 +47,7 @@ friend class SfxListener;
SfxListenerArr_Impl aListeners;
private:
- BOOL AddListener( SfxListener& rListener );
+ sal_Bool AddListener( SfxListener& rListener );
void RemoveListener( SfxListener& rListener );
const SfxBroadcaster& operator=(const SfxBroadcaster &); // verboten
@@ -66,9 +66,9 @@ public:
void BroadcastDelayed( const SfxHint& rHint );
void BroadcastInIdle( const SfxHint& rHint );
- BOOL HasListeners() const;
- USHORT GetListenerCount() const { return aListeners.Count(); }
- SfxListener* GetListener( USHORT nNo ) const
+ sal_Bool HasListeners() const;
+ sal_uInt16 GetListenerCount() const { return aListeners.Count(); }
+ SfxListener* GetListener( sal_uInt16 nNo ) const
{ return (SfxListener*) aListeners[nNo]; }
};
diff --git a/svl/inc/svl/broadcast.hxx b/svl/inc/svl/broadcast.hxx
index 2acddb5e4f6b..758906877bc1 100644
--- a/svl/inc/svl/broadcast.hxx
+++ b/svl/inc/svl/broadcast.hxx
@@ -59,7 +59,7 @@ public:
void Broadcast( const SfxHint &rHint );
- BOOL HasListeners() const { return 0 != pRoot; }
+ sal_Bool HasListeners() const { return 0 != pRoot; }
};
diff --git a/svl/inc/svl/cenumitm.hxx b/svl/inc/svl/cenumitm.hxx
index 42c9d60373db..0d0cf3d7c053 100644
--- a/svl/inc/svl/cenumitm.hxx
+++ b/svl/inc/svl/cenumitm.hxx
@@ -38,7 +38,7 @@ DBG_NAMEEX(SfxEnumItemInterface)
class SVL_DLLPUBLIC SfxEnumItemInterface: public SfxPoolItem
{
protected:
- SfxEnumItemInterface(USHORT which): SfxPoolItem(which) {}
+ SfxEnumItemInterface(sal_uInt16 which): SfxPoolItem(which) {}
SfxEnumItemInterface(const SfxEnumItemInterface & rItem):
SfxPoolItem(rItem) {}
@@ -54,15 +54,15 @@ public:
const IntlWrapper * = 0)
const;
- virtual BOOL QueryValue(com::sun::star::uno::Any & rVal, BYTE = 0) const;
+ virtual sal_Bool QueryValue(com::sun::star::uno::Any & rVal, sal_uInt8 = 0) const;
- virtual BOOL PutValue(const com::sun::star::uno::Any & rVal, BYTE = 0);
+ virtual sal_Bool PutValue(const com::sun::star::uno::Any & rVal, sal_uInt8 = 0);
- virtual USHORT GetValueCount() const = 0;
+ virtual sal_uInt16 GetValueCount() const = 0;
- virtual XubString GetValueTextByPos(USHORT nPos) const;
+ virtual XubString GetValueTextByPos(sal_uInt16 nPos) const;
- virtual USHORT GetValueByPos(USHORT nPos) const;
+ virtual sal_uInt16 GetValueByPos(sal_uInt16 nPos) const;
/// Return the position of some value within this enumeration.
///
@@ -74,19 +74,19 @@ public:
///
/// @return The position of nValue within this enumeration, or USHRT_MAX
/// if not included.
- virtual USHORT GetPosByValue(USHORT nValue) const;
+ virtual sal_uInt16 GetPosByValue(sal_uInt16 nValue) const;
- virtual BOOL IsEnabled(USHORT nValue) const;
+ virtual sal_Bool IsEnabled(sal_uInt16 nValue) const;
- virtual USHORT GetEnumValue() const = 0;
+ virtual sal_uInt16 GetEnumValue() const = 0;
- virtual void SetEnumValue(USHORT nValue) = 0;
+ virtual void SetEnumValue(sal_uInt16 nValue) = 0;
virtual int HasBoolValue() const;
- virtual BOOL GetBoolValue() const;
+ virtual sal_Bool GetBoolValue() const;
- virtual void SetBoolValue(BOOL bValue);
+ virtual void SetBoolValue(sal_Bool bValue);
};
//============================================================================
@@ -94,13 +94,13 @@ DBG_NAMEEX(CntEnumItem)
class SVL_DLLPUBLIC CntEnumItem: public SfxEnumItemInterface
{
- USHORT m_nValue;
+ sal_uInt16 m_nValue;
protected:
- CntEnumItem(USHORT which = 0, USHORT nTheValue = 0):
+ CntEnumItem(sal_uInt16 which = 0, sal_uInt16 nTheValue = 0):
SfxEnumItemInterface(which), m_nValue(nTheValue) {}
- CntEnumItem(USHORT which, SvStream & rStream);
+ CntEnumItem(sal_uInt16 which, SvStream & rStream);
CntEnumItem(const CntEnumItem & rItem):
SfxEnumItemInterface(rItem), m_nValue(rItem.m_nValue) {}
@@ -108,18 +108,18 @@ protected:
public:
TYPEINFO();
- virtual SvStream & Store(SvStream & rStream, USHORT) const;
+ virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
- virtual USHORT GetEnumValue() const;
+ virtual sal_uInt16 GetEnumValue() const;
- virtual void SetEnumValue(USHORT nTheValue);
+ virtual void SetEnumValue(sal_uInt16 nTheValue);
- USHORT GetValue() const { return m_nValue; }
+ sal_uInt16 GetValue() const { return m_nValue; }
- inline void SetValue(USHORT nTheValue);
+ inline void SetValue(sal_uInt16 nTheValue);
};
-inline void CntEnumItem::SetValue(USHORT nTheValue)
+inline void CntEnumItem::SetValue(sal_uInt16 nTheValue)
{
DBG_ASSERT(GetRefCount() == 0, "CntEnumItem::SetValue(): Pooled item");
m_nValue = nTheValue;
@@ -130,15 +130,15 @@ DBG_NAMEEX(CntBoolItem)
class SVL_DLLPUBLIC CntBoolItem: public SfxPoolItem
{
- BOOL m_bValue;
+ sal_Bool m_bValue;
public:
TYPEINFO();
- CntBoolItem(USHORT which = 0, BOOL bTheValue = FALSE):
+ CntBoolItem(sal_uInt16 which = 0, sal_Bool bTheValue = sal_False):
SfxPoolItem(which), m_bValue(bTheValue) {}
- CntBoolItem(USHORT nWhich, SvStream & rStream);
+ CntBoolItem(sal_uInt16 nWhich, SvStream & rStream);
CntBoolItem(const CntBoolItem & rItem):
SfxPoolItem(rItem), m_bValue(rItem.m_bValue) {}
@@ -154,23 +154,23 @@ public:
const IntlWrapper * = 0)
const;
- virtual BOOL QueryValue(com::sun::star::uno::Any& rVal, BYTE = 0) const;
+ virtual sal_Bool QueryValue(com::sun::star::uno::Any& rVal, sal_uInt8 = 0) const;
- virtual BOOL PutValue(const com::sun::star::uno::Any& rVal, BYTE = 0);
+ virtual sal_Bool PutValue(const com::sun::star::uno::Any& rVal, sal_uInt8 = 0);
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
- virtual SvStream & Store(SvStream & rStream, USHORT) const;
+ virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
- virtual USHORT GetValueCount() const;
+ virtual sal_uInt16 GetValueCount() const;
- virtual UniString GetValueTextByVal(BOOL bTheValue) const;
+ virtual UniString GetValueTextByVal(sal_Bool bTheValue) const;
- BOOL GetValue() const { return m_bValue; }
+ sal_Bool GetValue() const { return m_bValue; }
- void SetValue(BOOL bTheValue) { m_bValue = bTheValue; }
+ void SetValue(sal_Bool bTheValue) { m_bValue = bTheValue; }
};
#endif // _SVTOOLS_CENUMITM_HXX
diff --git a/svl/inc/svl/cintitem.hxx b/svl/inc/svl/cintitem.hxx
index 929521d57cb1..68a532cee613 100644
--- a/svl/inc/svl/cintitem.hxx
+++ b/svl/inc/svl/cintitem.hxx
@@ -37,15 +37,15 @@ DBG_NAMEEX_VISIBILITY(CntByteItem, SVL_DLLPUBLIC)
class SVL_DLLPUBLIC CntByteItem: public SfxPoolItem
{
- BYTE m_nValue;
+ sal_uInt8 m_nValue;
public:
TYPEINFO();
- CntByteItem(USHORT which = 0, BYTE nTheValue = 0):
+ CntByteItem(sal_uInt16 which = 0, sal_uInt8 nTheValue = 0):
SfxPoolItem(which), m_nValue(nTheValue) { DBG_CTOR(CntByteItem, 0); }
- CntByteItem(USHORT which, SvStream & rStream);
+ CntByteItem(sal_uInt16 which, SvStream & rStream);
CntByteItem(const CntByteItem & rItem):
SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
@@ -64,30 +64,30 @@ public:
const IntlWrapper * = 0)
const;
- virtual BOOL QueryValue(com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0) const;
+ virtual sal_Bool QueryValue(com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0) const;
- virtual BOOL PutValue(const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0);
+ virtual sal_Bool PutValue(const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0);
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
- virtual SvStream & Store(SvStream & rStream, USHORT) const;
+ virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
- virtual BYTE GetMin() const;
+ virtual sal_uInt8 GetMin() const;
- virtual BYTE GetMax() const;
+ virtual sal_uInt8 GetMax() const;
virtual SfxFieldUnit GetUnit() const;
- BYTE GetValue() const { return m_nValue; }
+ sal_uInt8 GetValue() const { return m_nValue; }
- inline void SetValue(BYTE nTheValue);
+ inline void SetValue(sal_uInt8 nTheValue);
};
-inline void CntByteItem::SetValue(BYTE nTheValue)
+inline void CntByteItem::SetValue(sal_uInt8 nTheValue)
{
DBG_ASSERT(GetRefCount() == 0, "CntByteItem::SetValue(): Pooled item");
m_nValue = nTheValue;
@@ -98,16 +98,16 @@ DBG_NAMEEX_VISIBILITY(CntUInt16Item, SVL_DLLPUBLIC)
class SVL_DLLPUBLIC CntUInt16Item: public SfxPoolItem
{
- UINT16 m_nValue;
+ sal_uInt16 m_nValue;
public:
TYPEINFO();
- CntUInt16Item(USHORT which = 0, UINT16 nTheValue = 0):
+ CntUInt16Item(sal_uInt16 which = 0, sal_uInt16 nTheValue = 0):
SfxPoolItem(which), m_nValue(nTheValue)
{ DBG_CTOR(CntUInt16Item, 0); }
- CntUInt16Item(USHORT which, SvStream & rStream);
+ CntUInt16Item(sal_uInt16 which, SvStream & rStream);
CntUInt16Item(const CntUInt16Item & rItem):
SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
@@ -126,30 +126,30 @@ public:
const IntlWrapper * = 0)
const;
- virtual BOOL QueryValue(com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0) const;
+ virtual sal_Bool QueryValue(com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0) const;
- virtual BOOL PutValue(const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0);
+ virtual sal_Bool PutValue(const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0);
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
- virtual SvStream & Store(SvStream & rStream, USHORT) const;
+ virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
- virtual UINT16 GetMin() const;
+ virtual sal_uInt16 GetMin() const;
- virtual UINT16 GetMax() const;
+ virtual sal_uInt16 GetMax() const;
virtual SfxFieldUnit GetUnit() const;
- INT16 GetValue() const { return m_nValue; }
+ sal_Int16 GetValue() const { return m_nValue; }
- inline void SetValue(UINT16 nTheValue);
+ inline void SetValue(sal_uInt16 nTheValue);
};
-inline void CntUInt16Item::SetValue(UINT16 nTheValue)
+inline void CntUInt16Item::SetValue(sal_uInt16 nTheValue)
{
DBG_ASSERT(GetRefCount() == 0, "CntUInt16Item::SetValue(): Pooled item");
m_nValue = nTheValue;
@@ -160,16 +160,16 @@ DBG_NAMEEX_VISIBILITY(CntInt32Item, SVL_DLLPUBLIC)
class SVL_DLLPUBLIC CntInt32Item: public SfxPoolItem
{
- INT32 m_nValue;
+ sal_Int32 m_nValue;
public:
TYPEINFO();
- CntInt32Item(USHORT which = 0, INT32 nTheValue = 0):
+ CntInt32Item(sal_uInt16 which = 0, sal_Int32 nTheValue = 0):
SfxPoolItem(which), m_nValue(nTheValue)
{ DBG_CTOR(CntInt32Item, 0); }
- CntInt32Item(USHORT which, SvStream & rStream);
+ CntInt32Item(sal_uInt16 which, SvStream & rStream);
CntInt32Item(const CntInt32Item & rItem):
SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
@@ -188,30 +188,30 @@ public:
const IntlWrapper * = 0)
const;
- virtual BOOL QueryValue(com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0) const;
+ virtual sal_Bool QueryValue(com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0) const;
- virtual BOOL PutValue(const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0);
+ virtual sal_Bool PutValue(const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0);
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
- virtual SvStream & Store(SvStream &, USHORT) const;
+ virtual SvStream & Store(SvStream &, sal_uInt16) const;
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
- virtual INT32 GetMin() const;
+ virtual sal_Int32 GetMin() const;
- virtual INT32 GetMax() const;
+ virtual sal_Int32 GetMax() const;
virtual SfxFieldUnit GetUnit() const;
- INT32 GetValue() const { return m_nValue; }
+ sal_Int32 GetValue() const { return m_nValue; }
- inline void SetValue(INT32 nTheValue);
+ inline void SetValue(sal_Int32 nTheValue);
};
-inline void CntInt32Item::SetValue(INT32 nTheValue)
+inline void CntInt32Item::SetValue(sal_Int32 nTheValue)
{
DBG_ASSERT(GetRefCount() == 0, "CntInt32Item::SetValue(): Pooled item");
m_nValue = nTheValue;
@@ -222,16 +222,16 @@ DBG_NAMEEX_VISIBILITY(CntUInt32Item, SVL_DLLPUBLIC)
class SVL_DLLPUBLIC CntUInt32Item: public SfxPoolItem
{
- UINT32 m_nValue;
+ sal_uInt32 m_nValue;
public:
TYPEINFO();
- CntUInt32Item(USHORT which = 0, UINT32 nTheValue = 0):
+ CntUInt32Item(sal_uInt16 which = 0, sal_uInt32 nTheValue = 0):
SfxPoolItem(which), m_nValue(nTheValue)
{ DBG_CTOR(CntUInt32Item, 0); }
- CntUInt32Item(USHORT nWhich, SvStream & rStream);
+ CntUInt32Item(sal_uInt16 nWhich, SvStream & rStream);
CntUInt32Item(const CntUInt32Item & rItem):
SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
@@ -250,30 +250,30 @@ public:
const IntlWrapper * = 0)
const;
- virtual BOOL QueryValue(com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0) const;
+ virtual sal_Bool QueryValue(com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0) const;
- virtual BOOL PutValue(const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0);
+ virtual sal_Bool PutValue(const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0);
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
- virtual SvStream & Store(SvStream & rStream, USHORT) const;
+ virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
- virtual UINT32 GetMin() const;
+ virtual sal_uInt32 GetMin() const;
- virtual UINT32 GetMax() const;
+ virtual sal_uInt32 GetMax() const;
virtual SfxFieldUnit GetUnit() const;
- UINT32 GetValue() const { return m_nValue; }
+ sal_uInt32 GetValue() const { return m_nValue; }
- inline void SetValue(UINT32 nTheValue);
+ inline void SetValue(sal_uInt32 nTheValue);
};
-inline void CntUInt32Item::SetValue(UINT32 nTheValue)
+inline void CntUInt32Item::SetValue(sal_uInt32 nTheValue)
{
DBG_ASSERT(GetRefCount() == 0, "CntUInt32Item::SetValue(): Pooled item");
m_nValue = nTheValue;
diff --git a/svl/inc/svl/cntnrsrt.hxx b/svl/inc/svl/cntnrsrt.hxx
index 48ebef50ea58..7c0dc6863371 100644
--- a/svl/inc/svl/cntnrsrt.hxx
+++ b/svl/inc/svl/cntnrsrt.hxx
@@ -63,17 +63,17 @@
public: \
using Container::Count; \
\
- ClassName( USHORT InitSize, USHORT ReSize ) : \
+ ClassName( sal_uInt16 InitSize, sal_uInt16 ReSize ) : \
Container( CONTAINER_MAXBLOCKSIZE, InitSize, ReSize ) {} \
\
- BOOL Insert( Type* pObj ); \
+ sal_Bool Insert( Type* pObj ); \
\
- Type *Remove( ULONG nPos ) \
+ Type *Remove( sal_uLong nPos ) \
{ return (Type *)Container::Remove( nPos ); } \
\
Type *Remove( Type* pObj ); \
\
- void DeleteAndDestroy( ULONG nPos ) \
+ void DeleteAndDestroy( sal_uLong nPos ) \
{ \
Type *pObj = Remove( nPos ); \
if( pObj ) \
@@ -83,15 +83,15 @@ public: \
void DeleteAndDestroy() \
{ while( Count() ) DeleteAndDestroy( 0 ); } \
\
- Type* GetObject( ULONG nPos ) const \
+ Type* GetObject( sal_uLong nPos ) const \
{ return (Type *)Container::GetObject( nPos ); } \
\
- Type* operator[]( ULONG nPos ) const \
+ Type* operator[]( sal_uLong nPos ) const \
{ return GetObject(nPos); } \
\
- BOOL Seek_Entry( const Type *pObj, ULONG* pPos ) const; \
+ sal_Bool Seek_Entry( const Type *pObj, sal_uLong* pPos ) const; \
\
- ULONG GetPos( const Type* pObj ) const; \
+ sal_uLong GetPos( const Type* pObj ) const; \
#define DECLARE_CONTAINER_SORT( ClassName, Type ) \
@@ -111,10 +111,10 @@ class ClassName : private Container \
#define IMPL_CONTAINER_SORT( ClassName, Type, SortFunc ) \
-BOOL ClassName::Insert( Type *pObj ) \
+sal_Bool ClassName::Insert( Type *pObj ) \
{ \
- ULONG nPos; \
- BOOL bExist = Seek_Entry( pObj, &nPos ); \
+ sal_uLong nPos; \
+ sal_Bool bExist = Seek_Entry( pObj, &nPos ); \
if( !bExist ) \
Container::Insert( pObj, nPos ); \
return !bExist; \
@@ -122,25 +122,25 @@ BOOL ClassName::Insert( Type *pObj ) \
\
Type *ClassName::Remove( Type* pObj ) \
{ \
- ULONG nPos; \
+ sal_uLong nPos; \
if( Seek_Entry( pObj, &nPos ) ) \
return Remove( nPos ); \
else \
return 0; \
} \
\
-ULONG ClassName::GetPos( const Type* pObj ) const \
+sal_uLong ClassName::GetPos( const Type* pObj ) const \
{ \
- ULONG nPos; \
+ sal_uLong nPos; \
if( Seek_Entry( pObj, &nPos ) ) \
return nPos; \
else \
return CONTAINER_ENTRY_NOTFOUND; \
} \
\
-BOOL ClassName::Seek_Entry( const Type* pObj, ULONG* pPos ) const \
+sal_Bool ClassName::Seek_Entry( const Type* pObj, sal_uLong* pPos ) const \
{ \
- register ULONG nO = Count(), \
+ register sal_uLong nO = Count(), \
nM, \
nU = 0; \
if( nO > 0 ) \
@@ -154,21 +154,21 @@ BOOL ClassName::Seek_Entry( const Type* pObj, ULONG* pPos ) const \
if( 0 == nCmp ) \
{ \
if( pPos ) *pPos = nM; \
- return TRUE; \
+ return sal_True; \
} \
else if( nCmp < 0 ) \
nU = nM + 1; \
else if( nM == 0 ) \
{ \
if( pPos ) *pPos = nU; \
- return FALSE; \
+ return sal_False; \
} \
else \
nO = nM - 1; \
} \
} \
if( pPos ) *pPos = nU; \
- return FALSE; \
+ return sal_False; \
} \
#endif
diff --git a/svl/inc/svl/cntwall.hxx b/svl/inc/svl/cntwall.hxx
index a7f3dd0111a6..070795e6faf3 100644
--- a/svl/inc/svl/cntwall.hxx
+++ b/svl/inc/svl/cntwall.hxx
@@ -43,35 +43,35 @@ class SVL_DLLPUBLIC CntWallpaperItem : public SfxPoolItem
private:
UniString _aURL;
Color _nColor;
- USHORT _nStyle;
+ sal_uInt16 _nStyle;
public:
TYPEINFO();
- CntWallpaperItem( USHORT nWhich );
- CntWallpaperItem( USHORT nWhich, SvStream& rStream, USHORT nVersion );
+ CntWallpaperItem( sal_uInt16 nWhich );
+ CntWallpaperItem( sal_uInt16 nWhich, SvStream& rStream, sal_uInt16 nVersion );
CntWallpaperItem( const CntWallpaperItem& rCpy );
~CntWallpaperItem();
- virtual USHORT GetVersion(USHORT) const;
+ virtual sal_uInt16 GetVersion(sal_uInt16) const;
virtual int operator==( const SfxPoolItem& ) const;
- virtual SfxPoolItem* Create( SvStream&, USHORT nItemVersion ) const;
- virtual SvStream& Store( SvStream&, USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create( SvStream&, sal_uInt16 nItemVersion ) const;
+ virtual SvStream& Store( SvStream&, sal_uInt16 nItemVersion ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
- virtual BOOL PutValue ( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue ( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 );
void SetBitmapURL( const UniString& rURL ) { _aURL = rURL; }
void SetColor( Color nColor ) { _nColor = nColor; }
- void SetStyle( USHORT nStyle ) { _nStyle = nStyle; }
+ void SetStyle( sal_uInt16 nStyle ) { _nStyle = nStyle; }
const UniString& GetBitmapURL() const { return _aURL; }
Color GetColor() const { return _nColor; }
- USHORT GetStyle() const { return _nStyle; }
+ sal_uInt16 GetStyle() const { return _nStyle; }
};
////////////////////////////////////////////////////////////////////////////////
diff --git a/svl/inc/svl/converter.hxx b/svl/inc/svl/converter.hxx
index 062feafe6f29..c208a370bceb 100644
--- a/svl/inc/svl/converter.hxx
+++ b/svl/inc/svl/converter.hxx
@@ -33,8 +33,8 @@
class SvDbaseConverter
{
public:
- SVL_DLLPUBLIC static INT32 ConvertPrecisionToDbase(INT32 _nLen, INT32 _nScale);
- SVL_DLLPUBLIC static INT32 ConvertPrecisionToOdbc(INT32 _nLen, INT32 _nScale);
+ SVL_DLLPUBLIC static sal_Int32 ConvertPrecisionToDbase(sal_Int32 _nLen, sal_Int32 _nScale);
+ SVL_DLLPUBLIC static sal_Int32 ConvertPrecisionToOdbc(sal_Int32 _nLen, sal_Int32 _nScale);
};
#endif //_CONVERTER_HXX_
diff --git a/svl/inc/svl/ctypeitm.hxx b/svl/inc/svl/ctypeitm.hxx
index e83d37b8925e..bb3efc756187 100644
--- a/svl/inc/svl/ctypeitm.hxx
+++ b/svl/inc/svl/ctypeitm.hxx
@@ -42,17 +42,17 @@ public:
TYPEINFO();
CntContentTypeItem();
- CntContentTypeItem( USHORT nWhich, const XubString& rType );
- CntContentTypeItem( USHORT nWhich, const INetContentType eType );
+ CntContentTypeItem( sal_uInt16 nWhich, const XubString& rType );
+ CntContentTypeItem( sal_uInt16 nWhich, const INetContentType eType );
CntContentTypeItem( const CntContentTypeItem& rOrig );
virtual SfxPoolItem* Create( SvStream& rStream,
- USHORT nItemVersion ) const;
- virtual SvStream & Store(SvStream & rStream, USHORT) const;
+ sal_uInt16 nItemVersion ) const;
+ virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
virtual int operator==( const SfxPoolItem& rOrig ) const;
- virtual USHORT GetVersion(USHORT) const;
+ virtual sal_uInt16 GetVersion(sal_uInt16) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = NULL ) const;
@@ -68,10 +68,10 @@ public:
XubString &rText,
const IntlWrapper* pIntlWrapper = 0 ) const;
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
- virtual BOOL PutValue ( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0);
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue ( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0);
INetContentType GetEnumValue() const;
diff --git a/svl/inc/svl/custritm.hxx b/svl/inc/svl/custritm.hxx
index a24135e392c2..f0e01a6a7c32 100644
--- a/svl/inc/svl/custritm.hxx
+++ b/svl/inc/svl/custritm.hxx
@@ -42,10 +42,10 @@ class SVL_DLLPUBLIC CntUnencodedStringItem: public SfxPoolItem
public:
TYPEINFO();
- CntUnencodedStringItem(USHORT which = 0): SfxPoolItem(which)
+ CntUnencodedStringItem(sal_uInt16 which = 0): SfxPoolItem(which)
{ DBG_CTOR(CntUnencodedStringItem, 0); }
- CntUnencodedStringItem(USHORT which, const XubString & rTheValue):
+ CntUnencodedStringItem(sal_uInt16 which, const XubString & rTheValue):
SfxPoolItem(which), m_aValue(rTheValue)
{ DBG_CTOR(CntUnencodedStringItem, 0); }
@@ -68,11 +68,11 @@ public:
const IntlWrapper * = 0)
const;
- virtual BOOL QueryValue(com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0) const;
+ virtual sal_Bool QueryValue(com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0) const;
- virtual BOOL PutValue(const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0);
+ virtual sal_Bool PutValue(const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0);
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
diff --git a/svl/inc/svl/dateitem.hxx b/svl/inc/svl/dateitem.hxx
index 3ae5506d809a..bf2c7a3c6e54 100644
--- a/svl/inc/svl/dateitem.hxx
+++ b/svl/inc/svl/dateitem.hxx
@@ -46,8 +46,8 @@ private:
public:
TYPEINFO();
- SfxDateTimeItem( USHORT nWhich );
- SfxDateTimeItem( USHORT nWhich,
+ SfxDateTimeItem( sal_uInt16 nWhich );
+ SfxDateTimeItem( sal_uInt16 nWhich,
const DateTime& rDT );
SfxDateTimeItem( const SfxDateTimeItem& rCpy );
@@ -57,8 +57,8 @@ public:
virtual int operator==( const SfxPoolItem& ) const;
using SfxPoolItem::Compare;
virtual int Compare( const SfxPoolItem &rWith ) const;
- virtual SfxPoolItem* Create( SvStream&, USHORT nItemVersion ) const;
- virtual SvStream& Store( SvStream&, USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create( SvStream&, sal_uInt16 nItemVersion ) const;
+ virtual SvStream& Store( SvStream&, sal_uInt16 nItemVersion ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -74,10 +74,10 @@ public:
"SetDateTime() with pooled item" );
aDateTime = rDT; }
- virtual BOOL PutValue ( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue ( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 ) const;
};
class SfxColumnDateTimeItem : public SfxDateTimeItem
@@ -85,8 +85,8 @@ class SfxColumnDateTimeItem : public SfxDateTimeItem
public:
TYPEINFO();
- SfxColumnDateTimeItem( USHORT nWhich );
- SfxColumnDateTimeItem( USHORT nWhich,
+ SfxColumnDateTimeItem( sal_uInt16 nWhich );
+ SfxColumnDateTimeItem( sal_uInt16 nWhich,
const DateTime& rDT );
SfxColumnDateTimeItem( const SfxDateTimeItem& rCpy );
diff --git a/svl/inc/svl/eitem.hxx b/svl/inc/svl/eitem.hxx
index bc65db9c31dc..f6dbb9951d84 100644
--- a/svl/inc/svl/eitem.hxx
+++ b/svl/inc/svl/eitem.hxx
@@ -35,10 +35,10 @@
class SVL_DLLPUBLIC SfxEnumItem: public CntEnumItem
{
protected:
- SfxEnumItem(USHORT which = 0, USHORT nValue = 0):
+ SfxEnumItem(sal_uInt16 which = 0, sal_uInt16 nValue = 0):
CntEnumItem(which, nValue) {}
- SfxEnumItem(USHORT which, SvStream & rStream):
+ SfxEnumItem(sal_uInt16 which, SvStream & rStream):
CntEnumItem(which, rStream) {}
public:
@@ -52,13 +52,13 @@ class SVL_DLLPUBLIC SfxBoolItem: public CntBoolItem
public:
TYPEINFO();
- SfxBoolItem(USHORT which = 0, BOOL bValue = FALSE):
+ SfxBoolItem(sal_uInt16 which = 0, sal_Bool bValue = sal_False):
CntBoolItem(which, bValue) {}
- SfxBoolItem(USHORT which, SvStream & rStream):
+ SfxBoolItem(sal_uInt16 which, SvStream & rStream):
CntBoolItem(which, rStream) {}
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const
{ return new SfxBoolItem(Which(), rStream); }
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const
diff --git a/svl/inc/svl/filerec.hxx b/svl/inc/svl/filerec.hxx
index d0cc27b94b96..eef347ab772b 100644
--- a/svl/inc/svl/filerec.hxx
+++ b/svl/inc/svl/filerec.hxx
@@ -35,24 +35,24 @@
#include <tools/stream.hxx>
#include <svl/svarray.hxx>
-SV_DECL_VARARR( SfxUINT32s, UINT32, 8, 8 )
+SV_DECL_VARARR( SfxUINT32s, sal_uInt32, 8, 8 )
//------------------------------------------------------------------------
-#define SFX_BOOL_DONTCARE BOOL(2) // Don't-Care-Wert f"ur BOOLs
+#define SFX_BOOL_DONTCARE sal_Bool(2) // Don't-Care-Wert f"ur BOOLs
-#define SFX_REC_PRETAG_EXT BYTE(0x00) // Pre-Tag f"ur Extended-Records
-#define SFX_REC_PRETAG_EOR BYTE(0xFF) // Pre-Tag f"ur End-Of-Records
+#define SFX_REC_PRETAG_EXT sal_uInt8(0x00) // Pre-Tag f"ur Extended-Records
+#define SFX_REC_PRETAG_EOR sal_uInt8(0xFF) // Pre-Tag f"ur End-Of-Records
-#define SFX_REC_TYPE_NONE BYTE(0x00) // unbekannter Record-Typ
-#define SFX_REC_TYPE_FIRST BYTE(0x01)
-#define SFX_REC_TYPE_SINGLE BYTE(0x01) // Single-Content-Record
-#define SFX_REC_TYPE_FIXSIZE BYTE(0x02) // Fix-Size-Multi-Content-Record
-#define SFX_REC_TYPE_VARSIZE_RELOC BYTE(0x03) // variable Rec-Size
-#define SFX_REC_TYPE_VARSIZE BYTE(0x04) // alt (nicht verschiebbar)
-#define SFX_REC_TYPE_MIXTAGS_RELOC BYTE(0x07) // Mixed Tag Content-Record
-#define SFX_REC_TYPE_MIXTAGS BYTE(0x08) // alt (nicht verschiebbar)
-#define SFX_REC_TYPE_LAST BYTE(0x08)
+#define SFX_REC_TYPE_NONE sal_uInt8(0x00) // unbekannter Record-Typ
+#define SFX_REC_TYPE_FIRST sal_uInt8(0x01)
+#define SFX_REC_TYPE_SINGLE sal_uInt8(0x01) // Single-Content-Record
+#define SFX_REC_TYPE_FIXSIZE sal_uInt8(0x02) // Fix-Size-Multi-Content-Record
+#define SFX_REC_TYPE_VARSIZE_RELOC sal_uInt8(0x03) // variable Rec-Size
+#define SFX_REC_TYPE_VARSIZE sal_uInt8(0x04) // alt (nicht verschiebbar)
+#define SFX_REC_TYPE_MIXTAGS_RELOC sal_uInt8(0x07) // Mixed Tag Content-Record
+#define SFX_REC_TYPE_MIXTAGS sal_uInt8(0x08) // alt (nicht verschiebbar)
+#define SFX_REC_TYPE_LAST sal_uInt8(0x08)
#define SFX_REC_TYPE_MINI 0x100 // Mini-Record
#define SFX_REC_TYPE_DRAWENG 0x400 // Drawing-Engine-Record
#define SFX_REC_TYPE_EOR 0xF00 // End-Of-Records
@@ -124,9 +124,9 @@ SV_DECL_VARARR( SfxUINT32s, UINT32, 8, 8 )
Struktur des Mini-Records:
- 1 BYTE Pre-Tag
- 3 BYTE OffsetToEndOfRec
- OffsetToEndOfRec* 1 BYTE Content
+ 1 sal_uInt8 Pre-Tag
+ 3 sal_uInt8 OffsetToEndOfRec
+ OffsetToEndOfRec* 1 sal_uInt8 Content
Bei den Extended-Reords folgt auf diesen 4-Byte-Header ein erweiterter
Header, der zun"achst den o.g. Record-Typ, dann eine Versions-Kennung
@@ -134,13 +134,13 @@ SV_DECL_VARARR( SfxUINT32s, UINT32, 8, 8 )
Struktur des Extended-Records:
- 1 BYTE Pre-Tag (==0x00)
- 3 BYTE OffsetToEndOfRec
- OffsetToEndOfRec* 1 BYTE Content
- 1 BYTE Record-Type
- 1 BYTE Version
- 2 BYTE Tag
- ContentSize* 1 BYTE Content
+ 1 sal_uInt8 Pre-Tag (==0x00)
+ 3 sal_uInt8 OffsetToEndOfRec
+ OffsetToEndOfRec* 1 sal_uInt8 Content
+ 1 sal_uInt8 Record-Type
+ 1 sal_uInt8 Version
+ 2 sal_uInt8 Tag
+ ContentSize* 1 sal_uInt8 Content
(ContentSize = OffsetToEndOfRec - 8)
@@ -160,7 +160,7 @@ SV_DECL_VARARR( SfxUINT32s, UINT32, 8, 8 )
m"ussen.
=> die Bytes 2-4 werden bei allen Records als Offset zum Ende des
Records interpretiert, so da\s die Gesamt-Recors-Size sich wie
- folgt berechnet: sizeof(UINT32) + OffsetToEndOfRec
+ folgt berechnet: sizeof(sal_uInt32) + OffsetToEndOfRec
Die Records sollten einfach zu parsen un einheitlich aufgebaut sein.
=> Sie bauen aufeinander auf, so ist z.B. der SfxMiniRecord in jedem
@@ -191,7 +191,7 @@ class SVL_DLLPUBLIC SfxMiniRecordWriter
/* [Beschreibung]
Mit Instanzen dieser Klasse kann ein einfacher Record in einen Stream
- geschrieben werden, der sich durch ein BYTE-Tag identifiziert, sowie
+ geschrieben werden, der sich durch ein sal_uInt8-Tag identifiziert, sowie
seine eigene L"ange speichert und somit auch von "alteren Versionen
bzw. Readern, die diesen Record-Type (Tag) nicht kennen, "ubersprungen
werden kann. Es wird keine Version-Nummer gespeichert.
@@ -206,9 +206,9 @@ class SVL_DLLPUBLIC SfxMiniRecordWriter
[Fileformat]
- 1* BYTE Content-Tag (!= 0)
- 1* 3-BYTE OffsetToEndOfRec in Bytes
- SizeOfContent* BYTE Content
+ 1* sal_uInt8 Content-Tag (!= 0)
+ 1* 3-sal_uInt8 OffsetToEndOfRec in Bytes
+ SizeOfContent* sal_uInt8 Content
[Beispiel]
@@ -222,18 +222,18 @@ class SVL_DLLPUBLIC SfxMiniRecordWriter
{
protected:
SvStream* _pStream; // <SvStream>, in dem der Record liegt
- UINT32 _nStartPos; // Start-Position des Gesamt-Records im Stream
- FASTBOOL _bHeaderOk; /* TRUE, wenn der Header schon geschrieben ist;
+ sal_uInt32 _nStartPos; // Start-Position des Gesamt-Records im Stream
+ FASTBOOL _bHeaderOk; /* sal_True, wenn der Header schon geschrieben ist;
bei DBG_UTIL wird SFX_BOOL_DONTCARE ver-
wendet, um die Gr"o\se von Fix-Sized-Records
zu pr"ufen. */
- BYTE _nPreTag; // in den Header zu schreibendes 'Pre-Tag'
+ sal_uInt8 _nPreTag; // in den Header zu schreibendes 'Pre-Tag'
public:
inline SfxMiniRecordWriter( SvStream *pStream,
- BYTE nTag );
- inline SfxMiniRecordWriter( SvStream *pStream, BYTE nTag,
- UINT32 nSize );
+ sal_uInt8 nTag );
+ inline SfxMiniRecordWriter( SvStream *pStream, sal_uInt8 nTag,
+ sal_uInt32 nSize );
inline ~SfxMiniRecordWriter();
@@ -241,7 +241,7 @@ public:
inline void Reset();
- UINT32 Close( FASTBOOL bSeekToEndOfRec = TRUE );
+ sal_uInt32 Close( FASTBOOL bSeekToEndOfRec = sal_True );
private:
// not implementend, not allowed
@@ -280,35 +280,35 @@ class SVL_DLLPUBLIC SfxMiniRecordReader
{
protected:
SvStream* _pStream; // <SvStream>, aus dem gelesen wird
- UINT32 _nEofRec; // Position direkt hinter dem Record
- FASTBOOL _bSkipped; // TRUE: der Record wurde explizit geskippt
- BYTE _nPreTag; // aus dem Header gelesenes Pre-Tag
+ sal_uInt32 _nEofRec; // Position direkt hinter dem Record
+ FASTBOOL _bSkipped; // sal_True: der Record wurde explizit geskippt
+ sal_uInt8 _nPreTag; // aus dem Header gelesenes Pre-Tag
// Drei-Phasen-Ctor f"ur Subklassen
SfxMiniRecordReader() {}
- void Construct_Impl( SvStream *pStream, BYTE nTag )
+ void Construct_Impl( SvStream *pStream, sal_uInt8 nTag )
{
_pStream = pStream;
- _bSkipped = FALSE;
+ _bSkipped = sal_False;
_nPreTag = nTag;
}
- inline FASTBOOL SetHeader_Impl( UINT32 nHeader );
+ inline FASTBOOL SetHeader_Impl( sal_uInt32 nHeader );
// als ung"ultig markieren und zur"uck-seeken
- void SetInvalid_Impl( UINT32 nRecordStartPos )
+ void SetInvalid_Impl( sal_uInt32 nRecordStartPos )
{
_nPreTag = SFX_REC_PRETAG_EOR;
_pStream->Seek( nRecordStartPos );
}
public:
- static USHORT ScanRecordType( SvStream *pStream );
+ static sal_uInt16 ScanRecordType( SvStream *pStream );
SfxMiniRecordReader( SvStream *pStream );
- SfxMiniRecordReader( SvStream *pStream, BYTE nTag );
+ SfxMiniRecordReader( SvStream *pStream, sal_uInt8 nTag );
inline ~SfxMiniRecordReader();
- inline BYTE GetTag() const;
+ inline sal_uInt8 GetTag() const;
inline FASTBOOL IsValid() const;
inline SvStream& operator*() const;
@@ -328,8 +328,8 @@ class SVL_DLLPUBLIC SfxSingleRecordWriter: public SfxMiniRecordWriter
/* [Beschreibung]
Mit Instanzen dieser Klasse kann ein Record in einen Stream geschrieben
- werden, dessen einziger Inhalt sich durch ein UINT16-Tag und eine
- BYTE-Versions-Nummer identifiziert, sowie seine eigene L"ange speichert
+ werden, dessen einziger Inhalt sich durch ein sal_uInt16-Tag und eine
+ sal_uInt8-Versions-Nummer identifiziert, sowie seine eigene L"ange speichert
und somit auch von "alteren Versionen bzw. Readern, die diesen
Record-Type (Tag) nicht kennen, "ubersprungen werden kann.
@@ -343,12 +343,12 @@ class SVL_DLLPUBLIC SfxSingleRecordWriter: public SfxMiniRecordWriter
[Fileformat]
- 1* BYTE Pre-Tag (!= 0)
- 1* 3-BYTE OffsetToEndOfRec in Bytes
- 1* BYTE Record-Type (==SFX_REC_TYPE_SINGLE)
- 1* BYTE Content-Version
- 1* USHORT Content-Tag
- SizeOfContent* BYTE Content
+ 1* sal_uInt8 Pre-Tag (!= 0)
+ 1* 3-sal_uInt8 OffsetToEndOfRec in Bytes
+ 1* sal_uInt8 Record-Type (==SFX_REC_TYPE_SINGLE)
+ 1* sal_uInt8 Content-Version
+ 1* sal_uInt16 Content-Tag
+ SizeOfContent* sal_uInt8 Content
[Beispiel]
@@ -361,20 +361,20 @@ class SVL_DLLPUBLIC SfxSingleRecordWriter: public SfxMiniRecordWriter
{
protected:
- SfxSingleRecordWriter( BYTE nRecordType,
+ SfxSingleRecordWriter( sal_uInt8 nRecordType,
SvStream *pStream,
- UINT16 nTag, BYTE nCurVer );
+ sal_uInt16 nTag, sal_uInt8 nCurVer );
public:
SfxSingleRecordWriter( SvStream *pStream,
- UINT16 nTag, BYTE nCurVer );
+ sal_uInt16 nTag, sal_uInt8 nCurVer );
SfxSingleRecordWriter( SvStream *pStream,
- UINT16 nTag, BYTE nCurVer,
- UINT32 nSize );
+ sal_uInt16 nTag, sal_uInt8 nCurVer,
+ sal_uInt32 nSize );
inline void Reset();
- UINT32 Close( FASTBOOL bSeekToEndOfRec = TRUE );
+ sal_uInt32 Close( FASTBOOL bSeekToEndOfRec = sal_True );
};
//------------------------------------------------------------------------
@@ -409,9 +409,9 @@ class SVL_DLLPUBLIC SfxSingleRecordReader: public SfxMiniRecordReader
{
protected:
- UINT16 _nRecordTag; // Art des Gesamt-Inhalts
- BYTE _nRecordVer; // Version des Gesamt-Inhalts
- BYTE _nRecordType; // Record Type aus dem Header
+ sal_uInt16 _nRecordTag; // Art des Gesamt-Inhalts
+ sal_uInt8 _nRecordVer; // Version des Gesamt-Inhalts
+ sal_uInt8 _nRecordType; // Record Type aus dem Header
// Drei-Phasen-Ctor f"ur Subklassen
SfxSingleRecordReader() {}
@@ -420,17 +420,17 @@ protected:
SfxMiniRecordReader::Construct_Impl(
pStream, SFX_REC_PRETAG_EXT );
}
- FASTBOOL FindHeader_Impl( UINT16 nTypes, UINT16 nTag );
- FASTBOOL ReadHeader_Impl( USHORT nTypes );
+ FASTBOOL FindHeader_Impl( sal_uInt16 nTypes, sal_uInt16 nTag );
+ FASTBOOL ReadHeader_Impl( sal_uInt16 nTypes );
public:
SfxSingleRecordReader( SvStream *pStream );
- SfxSingleRecordReader( SvStream *pStream, USHORT nTag );
+ SfxSingleRecordReader( SvStream *pStream, sal_uInt16 nTag );
- inline UINT16 GetTag() const;
+ inline sal_uInt16 GetTag() const;
- inline BYTE GetVersion() const;
- inline FASTBOOL HasVersion( USHORT nVersion ) const;
+ inline sal_uInt8 GetVersion() const;
+ inline FASTBOOL HasVersion( sal_uInt16 nVersion ) const;
};
//------------------------------------------------------------------------
@@ -458,22 +458,22 @@ class SVL_DLLPUBLIC SfxMultiFixRecordWriter: public SfxSingleRecordWriter
[Fileformat]
- 1* BYTE Pre-Tag (==0)
- 1* 3-BYTE OffsetToEndOfRec in Bytes
- 1* BYTE Record-Type (==SFX_REC_TYPE_FIXSIZE)
- 1* BYTE Content-Version
- 1* UINT16 Content-Tag
- 1* UINT16 NumberOfContents
- 1* UINT32 SizeOfEachContent
+ 1* sal_uInt8 Pre-Tag (==0)
+ 1* 3-sal_uInt8 OffsetToEndOfRec in Bytes
+ 1* sal_uInt8 Record-Type (==SFX_REC_TYPE_FIXSIZE)
+ 1* sal_uInt8 Content-Version
+ 1* sal_uInt16 Content-Tag
+ 1* sal_uInt16 NumberOfContents
+ 1* sal_uInt32 SizeOfEachContent
NumberOfContents* (
- SizeOfEachContent BYTE Content
+ SizeOfEachContent sal_uInt8 Content
)
[Beispiel]
{
SfxMultiFixRecordWriter aRecord( pStream, MY_TAG_X, MY_VERSION );
- for ( USHORT n = 0; n < Count(); ++n )
+ for ( sal_uInt16 n = 0; n < Count(); ++n )
{
aRecord.NewContent();
*aRecord << aMember1[n];
@@ -484,28 +484,28 @@ class SVL_DLLPUBLIC SfxMultiFixRecordWriter: public SfxSingleRecordWriter
{
protected:
- UINT32 _nContentStartPos; /* Startposition des jeweiligen
+ sal_uInt32 _nContentStartPos; /* Startposition des jeweiligen
Contents - nur bei DBG_UTIL
und f"ur Subklassen */
- UINT32 _nContentSize; // Gr"o\se jedes Contents
- UINT16 _nContentCount; // jeweilige Anzahl der Contents
+ sal_uInt32 _nContentSize; // Gr"o\se jedes Contents
+ sal_uInt16 _nContentCount; // jeweilige Anzahl der Contents
- SfxMultiFixRecordWriter( BYTE nRecordType,
+ SfxMultiFixRecordWriter( sal_uInt8 nRecordType,
SvStream *pStream,
- UINT16 nTag, BYTE nCurVer,
- UINT32 nContentSize );
+ sal_uInt16 nTag, sal_uInt8 nCurVer,
+ sal_uInt32 nContentSize );
public:
SfxMultiFixRecordWriter( SvStream *pStream,
- UINT16 nTag, BYTE nCurVer,
- UINT32 nContentSize );
+ sal_uInt16 nTag, sal_uInt8 nCurVer,
+ sal_uInt32 nContentSize );
inline ~SfxMultiFixRecordWriter();
inline void NewContent();
inline void Reset();
- UINT32 Close( FASTBOOL bSeekToEndOfRec = TRUE );
+ sal_uInt32 Close( FASTBOOL bSeekToEndOfRec = sal_True );
};
//------------------------------------------------------------------------
@@ -531,23 +531,23 @@ class SVL_DLLPUBLIC SfxMultiVarRecordWriter: public SfxMultiFixRecordWriter
[Fileformat]
- 1* BYTE Pre-Tag (==0)
- 1* 3-BYTE OffsetToEndOfRec in Bytes
- 1* BYTE Record-Type (==SFX_FILETYPE_TYPE_VARSIZE)
- 1* BYTE Content-Version
- 1* USHORT Content-Tag
- 1* UINT16 NumberOfContents
- 1* UINT32 OffsetToOfsTable
+ 1* sal_uInt8 Pre-Tag (==0)
+ 1* 3-sal_uInt8 OffsetToEndOfRec in Bytes
+ 1* sal_uInt8 Record-Type (==SFX_FILETYPE_TYPE_VARSIZE)
+ 1* sal_uInt8 Content-Version
+ 1* sal_uInt16 Content-Tag
+ 1* sal_uInt16 NumberOfContents
+ 1* sal_uInt32 OffsetToOfsTable
NumberOfContents* (
- ContentSize* BYTE Content
+ ContentSize* sal_uInt8 Content
)
- NumberOfContents* UINT32 ContentOfs (je per <<8 verschoben)
+ NumberOfContents* sal_uInt32 ContentOfs (je per <<8 verschoben)
[Beispiel]
{
SfxMultiVarRecordWriter aRecord( pStream, MY_TAG_X, MY_VERSION );
- for ( USHORT n = 0; n < Count(); ++n )
+ for ( sal_uInt16 n = 0; n < Count(); ++n )
{
aRecord.NewContent();
*aRecord << aMember1[n];
@@ -559,24 +559,24 @@ class SVL_DLLPUBLIC SfxMultiVarRecordWriter: public SfxMultiFixRecordWriter
{
protected:
SfxUINT32s _aContentOfs;
- USHORT _nContentVer; // nur f"ur SfxMultiMixRecordWriter
+ sal_uInt16 _nContentVer; // nur f"ur SfxMultiMixRecordWriter
- SfxMultiVarRecordWriter( BYTE nRecordType,
+ SfxMultiVarRecordWriter( sal_uInt8 nRecordType,
SvStream *pStream,
- USHORT nRecordTag,
- BYTE nRecordVer );
+ sal_uInt16 nRecordTag,
+ sal_uInt8 nRecordVer );
void FlushContent_Impl();
public:
SfxMultiVarRecordWriter( SvStream *pStream,
- USHORT nRecordTag,
- BYTE nRecordVer );
+ sal_uInt16 nRecordTag,
+ sal_uInt8 nRecordVer );
virtual ~SfxMultiVarRecordWriter();
void NewContent();
- virtual UINT32 Close( FASTBOOL bSeekToEndOfRec = TRUE );
+ virtual sal_uInt32 Close( FASTBOOL bSeekToEndOfRec = sal_True );
};
//------------------------------------------------------------------------
@@ -601,27 +601,27 @@ class SVL_DLLPUBLIC SfxMultiMixRecordWriter: public SfxMultiVarRecordWriter
[Fileformat]
- 1* BYTE Pre-Tag (==0)
- 1* 3-BYTE OffsetToEndOfRec in Bytes
- 1* BYTE Record-Type (==SFX_REC_TYPE_MIXTAGS)
- 1* BYTE Content-Version
- 1* USHORT Record-Tag
- 1* UINT16 NumberOfContents
- 1* UINT32 OffsetToOfsTable
+ 1* sal_uInt8 Pre-Tag (==0)
+ 1* 3-sal_uInt8 OffsetToEndOfRec in Bytes
+ 1* sal_uInt8 Record-Type (==SFX_REC_TYPE_MIXTAGS)
+ 1* sal_uInt8 Content-Version
+ 1* sal_uInt16 Record-Tag
+ 1* sal_uInt16 NumberOfContents
+ 1* sal_uInt32 OffsetToOfsTable
NumberOfContents* (
- 1* USHORT Content-Tag
- ContentSize* BYTE Content
+ 1* sal_uInt16 Content-Tag
+ ContentSize* sal_uInt8 Content
)
- NumberOfContents* UINT32 ( ContentOfs << 8 + Version )
+ NumberOfContents* sal_uInt32 ( ContentOfs << 8 + Version )
*/
{
public:
inline SfxMultiMixRecordWriter( SvStream *pStream,
- USHORT nRecordTag,
- BYTE nRecordVer );
+ sal_uInt16 nRecordTag,
+ sal_uInt8 nRecordVer );
- void NewContent( USHORT nTag, BYTE nVersion );
+ void NewContent( sal_uInt16 nTag, sal_uInt8 nVersion );
// private: geht nicht, da einige Compiler dann auch vorherige privat machen
void NewContent()
@@ -646,7 +646,7 @@ class SVL_DLLPUBLIC SfxMultiRecordReader: public SfxSingleRecordReader
{
SfxMultiRecordReader aRecord( pStream );
- for ( USHORT nRecNo = 0; aRecord.GetContent(); ++nRecNo )
+ for ( sal_uInt16 nRecNo = 0; aRecord.GetContent(); ++nRecNo )
{
switch ( aRecord.GetTag() )
{
@@ -665,30 +665,30 @@ class SVL_DLLPUBLIC SfxMultiRecordReader: public SfxSingleRecordReader
*/
{
- UINT32 _nStartPos; // Start-Position des Records
- UINT32* _pContentOfs; // Offsets der Startpositionen
- UINT32 _nContentSize; // Size jedes einzelnen / Tabellen-Pos
- UINT16 _nContentCount; // Anzahl der Contents im Record
- UINT16 _nContentNo; /* der Index des aktuellen Contents
+ sal_uInt32 _nStartPos; // Start-Position des Records
+ sal_uInt32* _pContentOfs; // Offsets der Startpositionen
+ sal_uInt32 _nContentSize; // Size jedes einzelnen / Tabellen-Pos
+ sal_uInt16 _nContentCount; // Anzahl der Contents im Record
+ sal_uInt16 _nContentNo; /* der Index des aktuellen Contents
enth"alt jeweils den Index des
Contents, der beim n"achsten
GetContent() geholt wird */
- UINT16 _nContentTag; // Art-Kennung des aktuellen Contents
- BYTE _nContentVer; // Versions-Kennung des akt. Contents
+ sal_uInt16 _nContentTag; // Art-Kennung des aktuellen Contents
+ sal_uInt8 _nContentVer; // Versions-Kennung des akt. Contents
FASTBOOL ReadHeader_Impl();
public:
SfxMultiRecordReader( SvStream *pStream );
- SfxMultiRecordReader( SvStream *pStream, UINT16 nTag );
+ SfxMultiRecordReader( SvStream *pStream, sal_uInt16 nTag );
~SfxMultiRecordReader();
FASTBOOL GetContent();
- inline UINT16 GetContentTag();
- inline BYTE GetContentVersion() const;
- inline FASTBOOL HasContentVersion( USHORT nVersion ) const;
+ inline sal_uInt16 GetContentTag();
+ inline sal_uInt8 GetContentVersion() const;
+ inline FASTBOOL HasContentVersion( sal_uInt16 nVersion ) const;
- inline UINT32 ContentCount() const;
+ inline sal_uInt32 ContentCount() const;
};
//=========================================================================
@@ -696,7 +696,7 @@ public:
inline SfxMiniRecordWriter::SfxMiniRecordWriter
(
SvStream* pStream, // Stream, in dem der Record angelegt wird
- BYTE nTag // Record-Tag zwischen 0x01 und 0xFE
+ sal_uInt8 nTag // Record-Tag zwischen 0x01 und 0xFE
)
/* [Beschreibung]
@@ -708,7 +708,7 @@ inline SfxMiniRecordWriter::SfxMiniRecordWriter
: _pStream( pStream ),
_nStartPos( pStream->Tell() ),
- _bHeaderOk(FALSE),
+ _bHeaderOk(sal_False),
_nPreTag( nTag )
{
DBG_ASSERT( _nPreTag != 0xFF, "invalid Tag" );
@@ -722,8 +722,8 @@ inline SfxMiniRecordWriter::SfxMiniRecordWriter
inline SfxMiniRecordWriter::SfxMiniRecordWriter
(
SvStream* pStream, // Stream, in dem der Record angelegt wird
- BYTE nTag, // Record-Tag zwischen 0x01 und 0xFE
- UINT32 nSize // Gr"o\se der Daten in Bytes
+ sal_uInt8 nTag, // Record-Tag zwischen 0x01 und 0xFE
+ sal_uInt32 nSize // Gr"o\se der Daten in Bytes
)
/* [Beschreibung]
@@ -757,7 +757,7 @@ inline SfxMiniRecordWriter::~SfxMiniRecordWriter()
{
// wurde der Header noch nicht geschrieben oder mu\s er gepr"uft werden
- if ( !_bHeaderOk DBG(||TRUE) )
+ if ( !_bHeaderOk DBG(||sal_True) )
Close();
}
@@ -781,7 +781,7 @@ inline SvStream& SfxMiniRecordWriter::operator*() const
inline void SfxMiniRecordWriter::Reset()
{
_pStream->Seek( _nStartPos + SFX_REC_HEADERSIZE_MINI );
- _bHeaderOk = FALSE;
+ _bHeaderOk = sal_False;
}
//=========================================================================
@@ -813,12 +813,12 @@ inline void SfxMiniRecordReader::Skip()
{
_pStream->Seek(_nEofRec);
- _bSkipped = TRUE;
+ _bSkipped = sal_True;
}
//-------------------------------------------------------------------------
-inline BYTE SfxMiniRecordReader::GetTag() const
+inline sal_uInt8 SfxMiniRecordReader::GetTag() const
/* [Beschreibung]
@@ -865,18 +865,18 @@ inline SvStream& SfxMiniRecordReader::operator*() const
//=========================================================================
-inline UINT32 SfxSingleRecordWriter::Close( FASTBOOL bSeekToEndOfRec )
+inline sal_uInt32 SfxSingleRecordWriter::Close( FASTBOOL bSeekToEndOfRec )
// siehe <SfxMiniRecordWriter::Close(FASTBOOL)>
{
- UINT32 nRet = 0;
+ sal_uInt32 nRet = 0;
// wurde der Header noch nicht geschrieben?
if ( !_bHeaderOk )
{
// Basisklassen-Header schreiben
- UINT32 nEndPos = SfxMiniRecordWriter::Close( bSeekToEndOfRec );
+ sal_uInt32 nEndPos = SfxMiniRecordWriter::Close( bSeekToEndOfRec );
// ggf. ans Ende des eigenen Headers seeken oder hinter Rec bleiben
if ( !bSeekToEndOfRec )
@@ -900,12 +900,12 @@ inline void SfxSingleRecordWriter::Reset()
{
_pStream->Seek( _nStartPos + SFX_REC_HEADERSIZE_MINI +
SFX_REC_HEADERSIZE_SINGLE );
- _bHeaderOk = FALSE;
+ _bHeaderOk = sal_False;
}
//=========================================================================
-inline UINT16 SfxSingleRecordReader::GetTag() const
+inline sal_uInt16 SfxSingleRecordReader::GetTag() const
/* [Beschreibung]
@@ -918,7 +918,7 @@ inline UINT16 SfxSingleRecordReader::GetTag() const
//-------------------------------------------------------------------------
-inline BYTE SfxSingleRecordReader::GetVersion() const
+inline sal_uInt8 SfxSingleRecordReader::GetVersion() const
/* [Beschreibung]
@@ -931,7 +931,7 @@ inline BYTE SfxSingleRecordReader::GetVersion() const
//-------------------------------------------------------------------------
-inline FASTBOOL SfxSingleRecordReader::HasVersion( USHORT nVersion ) const
+inline FASTBOOL SfxSingleRecordReader::HasVersion( sal_uInt16 nVersion ) const
/* [Beschreibung]
@@ -973,7 +973,7 @@ inline void SfxMultiFixRecordWriter::NewContent()
{
#ifdef DBG_UTIL
- ULONG nOldStartPos;
+ sal_uLong nOldStartPos;
// Startposition des aktuellen Contents merken - Achtung Subklassen!
nOldStartPos = _nContentStartPos;
#endif
@@ -998,8 +998,8 @@ inline void SfxMultiFixRecordWriter::NewContent()
inline SfxMultiMixRecordWriter::SfxMultiMixRecordWriter
(
SvStream* pStream, // Stream, in dem der Record angelegt wird
- USHORT nRecordTag, // Gesamt-Record-Art-Kennung
- BYTE nRecordVer // Gesamt-Record-Versions-Kennung
+ sal_uInt16 nRecordTag, // Gesamt-Record-Art-Kennung
+ sal_uInt8 nRecordVer // Gesamt-Record-Versions-Kennung
)
/* [Beschreibung]
@@ -1021,12 +1021,12 @@ inline void SfxMultiFixRecordWriter::Reset()
_pStream->Seek( _nStartPos + SFX_REC_HEADERSIZE_MINI +
SFX_REC_HEADERSIZE_SINGLE +
SFX_REC_HEADERSIZE_MULTI );
- _bHeaderOk = FALSE;
+ _bHeaderOk = sal_False;
}
//=========================================================================
-inline UINT16 SfxMultiRecordReader::GetContentTag()
+inline sal_uInt16 SfxMultiRecordReader::GetContentTag()
/* [Beschreibung]
@@ -1040,7 +1040,7 @@ inline UINT16 SfxMultiRecordReader::GetContentTag()
//-------------------------------------------------------------------------
-inline BYTE SfxMultiRecordReader::GetContentVersion() const
+inline sal_uInt8 SfxMultiRecordReader::GetContentVersion() const
/* [Beschreibung]
@@ -1054,7 +1054,7 @@ inline BYTE SfxMultiRecordReader::GetContentVersion() const
//-------------------------------------------------------------------------
-inline FASTBOOL SfxMultiRecordReader::HasContentVersion( USHORT nVersion ) const
+inline FASTBOOL SfxMultiRecordReader::HasContentVersion( sal_uInt16 nVersion ) const
/* [Beschreibung]
@@ -1069,7 +1069,7 @@ inline FASTBOOL SfxMultiRecordReader::HasContentVersion( USHORT nVersion ) const
//-------------------------------------------------------------------------
-inline UINT32 SfxMultiRecordReader::ContentCount() const
+inline sal_uInt32 SfxMultiRecordReader::ContentCount() const
/* [Beschreibung]
diff --git a/svl/inc/svl/flagitem.hxx b/svl/inc/svl/flagitem.hxx
index f7fd52d2e714..ce9d3cb635e7 100644
--- a/svl/inc/svl/flagitem.hxx
+++ b/svl/inc/svl/flagitem.hxx
@@ -34,7 +34,7 @@
class SvStream;
-extern USHORT nSfxFlagVal[16];
+extern sal_uInt16 nSfxFlagVal[16];
// -----------------------------------------------------------------------
@@ -42,24 +42,24 @@ DBG_NAMEEX_VISIBILITY(SfxFlagItem, SVL_DLLPUBLIC)
class SVL_DLLPUBLIC SfxFlagItem: public SfxPoolItem
{
- USHORT nVal;
+ sal_uInt16 nVal;
public:
TYPEINFO();
- SfxFlagItem( USHORT nWhich = 0, USHORT nValue = 0 );
- SfxFlagItem( USHORT nWhich, SvStream & );
+ SfxFlagItem( sal_uInt16 nWhich = 0, sal_uInt16 nValue = 0 );
+ SfxFlagItem( sal_uInt16 nWhich, SvStream & );
SfxFlagItem( const SfxFlagItem& );
~SfxFlagItem() {
DBG_DTOR(SfxFlagItem, 0); }
- virtual BYTE GetFlagCount() const;
- virtual XubString GetFlagText( BYTE nFlag ) const;
+ virtual sal_uInt8 GetFlagCount() const;
+ virtual XubString GetFlagText( sal_uInt8 nFlag ) const;
virtual int operator==( const SfxPoolItem& ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT nVersion) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16 nVersion) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -67,14 +67,14 @@ public:
SfxMapUnit ePresMetric,
XubString &rText,
const IntlWrapper * = 0 ) const;
- USHORT GetValue() const { return nVal; }
- void SetValue( USHORT nNewVal ) {
+ sal_uInt16 GetValue() const { return nVal; }
+ void SetValue( sal_uInt16 nNewVal ) {
DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" );
nVal = nNewVal;
}
- int GetFlag( BYTE nFlag ) const {
+ int GetFlag( sal_uInt8 nFlag ) const {
return ( (nVal & nSfxFlagVal[nFlag]) != 0 ); }
- void SetFlag( BYTE nFlag, int bVal );
+ void SetFlag( sal_uInt8 nFlag, int bVal );
};
#endif
diff --git a/svl/inc/svl/globalnameitem.hxx b/svl/inc/svl/globalnameitem.hxx
index 727f06681b45..897bb09fc8ba 100644
--- a/svl/inc/svl/globalnameitem.hxx
+++ b/svl/inc/svl/globalnameitem.hxx
@@ -42,17 +42,17 @@ class SVL_DLLPUBLIC SfxGlobalNameItem: public SfxPoolItem
public:
TYPEINFO();
SfxGlobalNameItem();
- SfxGlobalNameItem( USHORT nWhich, const SvGlobalName& );
+ SfxGlobalNameItem( sal_uInt16 nWhich, const SvGlobalName& );
~SfxGlobalNameItem();
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
SvGlobalName GetValue() const { return m_aName; }
- virtual BOOL PutValue ( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue ( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 ) const;
};
#endif
diff --git a/svl/inc/svl/hint.hxx b/svl/inc/svl/hint.hxx
index f8f64fbd759b..a523ac68224f 100644
--- a/svl/inc/svl/hint.hxx
+++ b/svl/inc/svl/hint.hxx
@@ -44,26 +44,26 @@ public:
class Visibility Name: public SfxHint \
{ \
Type* pObj; \
- BOOL bIsOwner; \
+ sal_Bool bIsOwner; \
\
public: \
TYPEINFO(); \
- Name( Type* Object, BOOL bOwnedByHint = FALSE ); \
+ Name( Type* Object, sal_Bool bOwnedByHint = sal_False ); \
~Name(); \
\
Type* GetObject() const { return pObj; } \
- BOOL IsOwner() const { return bIsOwner; } \
+ sal_Bool IsOwner() const { return bIsOwner; } \
}
#define IMPL_PTRHINT_AUTODELETE(Name, Type) \
TYPEINIT1(Name, SfxHint); \
- Name::Name( Type* pObject, BOOL bOwnedByHint ) \
+ Name::Name( Type* pObject, sal_Bool bOwnedByHint ) \
{ pObj = pObject; bIsOwner = bOwnedByHint; } \
Name::~Name() { if ( bIsOwner ) delete pObj; }
#define IMPL_PTRHINT(Name, Type) \
TYPEINIT1(Name, SfxHint); \
- Name::Name( Type* pObject, BOOL bOwnedByHint ) \
+ Name::Name( Type* pObject, sal_Bool bOwnedByHint ) \
{ pObj = pObject; bIsOwner = bOwnedByHint; } \
Name::~Name() {}
diff --git a/svl/inc/svl/httpcook.hxx b/svl/inc/svl/httpcook.hxx
index b7b4a3cb0e90..9d2555d77848 100644
--- a/svl/inc/svl/httpcook.hxx
+++ b/svl/inc/svl/httpcook.hxx
@@ -61,8 +61,8 @@ struct CntHTTPCookie
String m_aDomain;
String m_aPath;
DateTime m_aExpires;
- USHORT m_nFlags;
- USHORT m_nPolicy;
+ sal_uInt16 m_nFlags;
+ sal_uInt16 m_nPolicy;
CntHTTPCookie (void)
: m_aExpires (Date(0), Time(0)),
@@ -70,14 +70,14 @@ struct CntHTTPCookie
m_nPolicy (CNTHTTP_COOKIE_POLICY_INTERACTIVE)
{}
- BOOL replaces (const CntHTTPCookie& rOther) const
+ sal_Bool replaces (const CntHTTPCookie& rOther) const
{
return ((m_aDomain == rOther.m_aDomain) &&
(m_aPath == rOther.m_aPath ) &&
(m_aName == rOther.m_aName ) );
}
- BOOL operator== (const CntHTTPCookie& rOther) const
+ sal_Bool operator== (const CntHTTPCookie& rOther) const
{
return ((m_aName == rOther.m_aName ) &&
(m_aValue == rOther.m_aValue ) &&
@@ -136,7 +136,7 @@ struct CntHTTPCookieRequest
const String& m_rURL;
List& m_rCookieList;
CntHTTPCookieRequestType m_eType;
- USHORT m_nRet;
+ sal_uInt16 m_nRet;
CntHTTPCookieRequest (
const String& rURL,
diff --git a/svl/inc/svl/ilstitem.hxx b/svl/inc/svl/ilstitem.hxx
index 6ecc317f7299..eddbe9e0efaa 100644
--- a/svl/inc/svl/ilstitem.hxx
+++ b/svl/inc/svl/ilstitem.hxx
@@ -42,7 +42,7 @@ public:
TYPEINFO();
SfxIntegerListItem();
- SfxIntegerListItem( USHORT nWhich, const SvULongs& rList );
+ SfxIntegerListItem( sal_uInt16 nWhich, const SvULongs& rList );
SfxIntegerListItem( const SfxIntegerListItem& rItem );
~SfxIntegerListItem();
@@ -55,8 +55,8 @@ public:
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual BOOL PutValue ( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue ( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
};
#endif // _SFXINTITEM_HXX
diff --git a/svl/inc/svl/imageitm.hxx b/svl/inc/svl/imageitm.hxx
index 63dc4c470a55..4dff6f5faebe 100644
--- a/svl/inc/svl/imageitm.hxx
+++ b/svl/inc/svl/imageitm.hxx
@@ -39,20 +39,20 @@ class SVL_DLLPUBLIC SfxImageItem : public SfxInt16Item
SfxImageItem_Impl* pImp;
public:
TYPEINFO();
- SfxImageItem( USHORT nWhich = 0, UINT16 nImage = 0 );
- SfxImageItem( USHORT nWhich, const String& rURL );
+ SfxImageItem( sal_uInt16 nWhich = 0, sal_uInt16 nImage = 0 );
+ SfxImageItem( sal_uInt16 nWhich, const String& rURL );
SfxImageItem( const SfxImageItem& );
virtual ~SfxImageItem();
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
virtual int operator==( const SfxPoolItem& ) const;
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
void SetRotation( long nValue );
long GetRotation() const;
- void SetMirrored( BOOL bSet );
- BOOL IsMirrored() const;
+ void SetMirrored( sal_Bool bSet );
+ sal_Bool IsMirrored() const;
String GetURL() const;
};
diff --git a/svl/inc/svl/inethist.hxx b/svl/inc/svl/inethist.hxx
index aceac630924f..65e9f026a072 100644
--- a/svl/inc/svl/inethist.hxx
+++ b/svl/inc/svl/inethist.hxx
@@ -62,7 +62,7 @@ class INetURLHistory : public SfxBroadcaster
static void NormalizeUrl_Impl (INetURLObject &rUrl);
SVL_DLLPUBLIC void PutUrl_Impl (const INetURLObject &rUrl);
- SVL_DLLPUBLIC BOOL QueryUrl_Impl (const INetURLObject &rUrl);
+ SVL_DLLPUBLIC sal_Bool QueryUrl_Impl (const INetURLObject &rUrl);
/** Not implemented.
*/
@@ -76,7 +76,7 @@ public:
/** QueryProtocol.
*/
- BOOL QueryProtocol (INetProtocol eProto) const
+ sal_Bool QueryProtocol (INetProtocol eProto) const
{
return ((eProto == INET_PROT_FILE ) ||
(eProto == INET_PROT_FTP ) ||
@@ -86,22 +86,22 @@ public:
/** QueryUrl.
*/
- BOOL QueryUrl (const INetURLObject &rUrl)
+ sal_Bool QueryUrl (const INetURLObject &rUrl)
{
if (QueryProtocol (rUrl.GetProtocol()))
return QueryUrl_Impl (rUrl);
else
- return FALSE;
+ return sal_False;
}
- BOOL QueryUrl (const String &rUrl)
+ sal_Bool QueryUrl (const String &rUrl)
{
INetProtocol eProto =
INetURLObject::CompareProtocolScheme (rUrl);
if (QueryProtocol (eProto))
return QueryUrl_Impl (INetURLObject (rUrl));
else
- return FALSE;
+ return sal_False;
}
/** PutUrl.
diff --git a/svl/inc/svl/instrm.hxx b/svl/inc/svl/instrm.hxx
index d7585c13c3b7..124c80a21630 100644
--- a/svl/inc/svl/instrm.hxx
+++ b/svl/inc/svl/instrm.hxx
@@ -47,19 +47,19 @@ class SVL_DLLPUBLIC SvInputStream: public SvStream
com::sun::star::uno::Reference< com::sun::star::io::XSeekable >
m_xSeekable;
SvDataPipe_Impl * m_pPipe;
- ULONG m_nSeekedFrom;
+ sal_uLong m_nSeekedFrom;
SVL_DLLPRIVATE bool open();
- SVL_DLLPRIVATE virtual ULONG GetData(void * pData, ULONG nSize);
+ SVL_DLLPRIVATE virtual sal_uLong GetData(void * pData, sal_uLong nSize);
- SVL_DLLPRIVATE virtual ULONG PutData(void const *, ULONG);
+ SVL_DLLPRIVATE virtual sal_uLong PutData(void const *, sal_uLong);
- SVL_DLLPRIVATE virtual ULONG SeekPos(ULONG nPos);
+ SVL_DLLPRIVATE virtual sal_uLong SeekPos(sal_uLong nPos);
SVL_DLLPRIVATE virtual void FlushData();
- SVL_DLLPRIVATE virtual void SetSize(ULONG);
+ SVL_DLLPRIVATE virtual void SetSize(sal_uLong);
public:
SvInputStream(
@@ -69,11 +69,11 @@ public:
virtual ~SvInputStream();
- virtual USHORT IsA() const;
+ virtual sal_uInt16 IsA() const;
- virtual void AddMark(ULONG nPos);
+ virtual void AddMark(sal_uLong nPos);
- virtual void RemoveMark(ULONG nPos);
+ virtual void RemoveMark(sal_uLong nPos);
};
#endif // SVTOOLS_INSTRM_HXX
diff --git a/svl/inc/svl/intitem.hxx b/svl/inc/svl/intitem.hxx
index f0fff8440518..0ee15d1738e5 100644
--- a/svl/inc/svl/intitem.hxx
+++ b/svl/inc/svl/intitem.hxx
@@ -37,13 +37,13 @@ class SVL_DLLPUBLIC SfxByteItem: public CntByteItem
public:
TYPEINFO();
- SfxByteItem(USHORT which = 0, BYTE nValue = 0):
+ SfxByteItem(sal_uInt16 which = 0, sal_uInt8 nValue = 0):
CntByteItem(which, nValue) {}
- SfxByteItem(USHORT which, SvStream & rStream):
+ SfxByteItem(sal_uInt16 which, SvStream & rStream):
CntByteItem(which, rStream) {}
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const
{ return new SfxByteItem(*this); }
@@ -54,16 +54,16 @@ DBG_NAMEEX_VISIBILITY(SfxInt16Item, SVL_DLLPUBLIC)
class SVL_DLLPUBLIC SfxInt16Item: public SfxPoolItem
{
- INT16 m_nValue;
+ sal_Int16 m_nValue;
public:
TYPEINFO();
- SfxInt16Item(USHORT which = 0, INT16 nTheValue = 0):
+ SfxInt16Item(sal_uInt16 which = 0, sal_Int16 nTheValue = 0):
SfxPoolItem(which), m_nValue(nTheValue)
{ DBG_CTOR(SfxInt16Item, 0); }
- SfxInt16Item(USHORT nWhich, SvStream & rStream);
+ SfxInt16Item(sal_uInt16 nWhich, SvStream & rStream);
SfxInt16Item(const SfxInt16Item & rItem):
SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
@@ -82,30 +82,30 @@ public:
const IntlWrapper * = 0)
const;
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 );
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
- virtual SvStream & Store(SvStream & rStream, USHORT) const;
+ virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
- virtual INT16 GetMin() const;
+ virtual sal_Int16 GetMin() const;
- virtual INT16 GetMax() const;
+ virtual sal_Int16 GetMax() const;
virtual SfxFieldUnit GetUnit() const;
- INT16 GetValue() const { return m_nValue; }
+ sal_Int16 GetValue() const { return m_nValue; }
- inline void SetValue(INT16 nTheValue);
+ inline void SetValue(sal_Int16 nTheValue);
};
-inline void SfxInt16Item::SetValue(INT16 nTheValue)
+inline void SfxInt16Item::SetValue(sal_Int16 nTheValue)
{
DBG_ASSERT(GetRefCount() == 0, "SfxInt16Item::SetValue(); Pooled item");
m_nValue = nTheValue;
@@ -117,13 +117,13 @@ class SVL_DLLPUBLIC SfxUInt16Item: public CntUInt16Item
public:
TYPEINFO();
- SfxUInt16Item(USHORT which = 0, UINT16 nValue = 0):
+ SfxUInt16Item(sal_uInt16 which = 0, sal_uInt16 nValue = 0):
CntUInt16Item(which, nValue) {}
- SfxUInt16Item(USHORT which, SvStream & rStream):
+ SfxUInt16Item(sal_uInt16 which, SvStream & rStream):
CntUInt16Item(which, rStream) {}
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const
{ return new SfxUInt16Item(Which(), rStream); }
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const
@@ -136,13 +136,13 @@ class SVL_DLLPUBLIC SfxInt32Item: public CntInt32Item
public:
TYPEINFO();
- SfxInt32Item(USHORT which = 0, INT32 nValue = 0):
+ SfxInt32Item(sal_uInt16 which = 0, sal_Int32 nValue = 0):
CntInt32Item(which, nValue) {}
- SfxInt32Item(USHORT which, SvStream & rStream):
+ SfxInt32Item(sal_uInt16 which, SvStream & rStream):
CntInt32Item(which, rStream) {}
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const
{ return new SfxInt32Item(Which(), rStream); }
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const
@@ -156,13 +156,13 @@ class SVL_DLLPUBLIC SfxUInt32Item: public CntUInt32Item
public:
TYPEINFO();
- SfxUInt32Item(USHORT which = 0, UINT32 nValue = 0):
+ SfxUInt32Item(sal_uInt16 which = 0, sal_uInt32 nValue = 0):
CntUInt32Item(which, nValue) {}
- SfxUInt32Item(USHORT which, SvStream & rStream):
+ SfxUInt32Item(sal_uInt16 which, SvStream & rStream):
CntUInt32Item(which, rStream) {}
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const
{ return new SfxUInt32Item(Which(), rStream); }
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const
diff --git a/svl/inc/svl/itemiter.hxx b/svl/inc/svl/itemiter.hxx
index f80031871caf..db3f8d4cea8d 100644
--- a/svl/inc/svl/itemiter.hxx
+++ b/svl/inc/svl/itemiter.hxx
@@ -39,7 +39,7 @@ class SVL_DLLPUBLIC SfxItemIter
{
// Item-Feld - Start & Ende
const SfxItemSet& _rSet;
- USHORT _nStt, _nEnd, _nAkt;
+ sal_uInt16 _nStt, _nEnd, _nAkt;
public:
SfxItemIter( const SfxItemSet& rSet );
@@ -57,12 +57,12 @@ public:
const SfxPoolItem* NextItem();
const SfxPoolItem* PrevItem();
- BOOL IsAtStart() const { return _nAkt == _nStt; }
- BOOL IsAtEnd() const { return _nAkt == _nEnd; }
+ sal_Bool IsAtStart() const { return _nAkt == _nStt; }
+ sal_Bool IsAtEnd() const { return _nAkt == _nEnd; }
- USHORT GetCurPos() const { return _nAkt; }
- USHORT GetFirstPos() const { return _nStt; }
- USHORT GetLastPos() const { return _nEnd; }
+ sal_uInt16 GetCurPos() const { return _nAkt; }
+ sal_uInt16 GetFirstPos() const { return _nStt; }
+ sal_uInt16 GetLastPos() const { return _nEnd; }
};
#endif
diff --git a/svl/inc/svl/itempool.hxx b/svl/inc/svl/itempool.hxx
index daaa2b481ba3..735f9b1162aa 100644
--- a/svl/inc/svl/itempool.hxx
+++ b/svl/inc/svl/itempool.hxx
@@ -70,8 +70,8 @@ DBG_NAMEEX(SfxItemPool)
struct SfxItemInfo
{
- USHORT _nSID;
- USHORT _nFlags;
+ sal_uInt16 _nSID;
+ sal_uInt16 _nFlags;
};
//====================================================================
@@ -104,23 +104,23 @@ class SVL_DLLPUBLIC SfxItemPool
*/
{
- SVL_DLLPRIVATE void readTheItems(SvStream & rStream, sal_uInt32 nCount, USHORT nVersion,
+ SVL_DLLPRIVATE void readTheItems(SvStream & rStream, sal_uInt32 nCount, sal_uInt16 nVersion,
SfxPoolItem * pDefItem, SfxPoolItemArray_Impl ** pArr);
UniString aName;
- USHORT nStart, nEnd;
- USHORT _nFileFormatVersion;
+ sal_uInt16 nStart, nEnd;
+ sal_uInt16 _nFileFormatVersion;
#ifdef TF_POOLABLE
const SfxItemInfo* pItemInfos;
#else
- USHORT* pSlotIds;
+ sal_uInt16* pSlotIds;
#endif
SfxItemPool_Impl* pImp;
SfxPoolItem** ppStaticDefaults;
SfxPoolItem** ppPoolDefaults;
SfxItemPool* pSecondary;
SfxItemPool* pMaster;
- USHORT* _pPoolRanges;
+ sal_uInt16* _pPoolRanges;
FASTBOOL bPersistentRefCounts;
private:
@@ -137,16 +137,16 @@ public:
friend class SfxPoolWhichMap;
private:
- inline USHORT GetIndex_Impl(USHORT nWhich) const;
- inline USHORT GetSize_Impl() const { return nEnd - nStart + 1; }
+ inline sal_uInt16 GetIndex_Impl(sal_uInt16 nWhich) const;
+ inline sal_uInt16 GetSize_Impl() const { return nEnd - nStart + 1; }
SVL_DLLPRIVATE SvStream& Load1_Impl( SvStream &rStream );
- SVL_DLLPRIVATE FASTBOOL IsItemFlag_Impl( USHORT nWhich, USHORT nFlag ) const;
+ SVL_DLLPRIVATE FASTBOOL IsItemFlag_Impl( sal_uInt16 nWhich, sal_uInt16 nFlag ) const;
public:
// fuer dflt. SfxItemSet::CTOR, setze dflt. WhichRanges
- void FillItemIdRanges_Impl( USHORT*& pWhichRanges ) const;
- const USHORT* GetFrozenIdRanges() const
+ void FillItemIdRanges_Impl( sal_uInt16*& pWhichRanges ) const;
+ const sal_uInt16* GetFrozenIdRanges() const
{ return _pPoolRanges; }
FASTBOOL IsVer2_Impl() const;
@@ -154,23 +154,23 @@ public:
//---------------------------------------------------------------------
protected:
- static inline void SetRefCount( SfxPoolItem& rItem, ULONG n );
- static inline ULONG AddRef( const SfxPoolItem& rItem, ULONG n = 1 );
- static inline ULONG ReleaseRef( const SfxPoolItem& rItem, ULONG n = 1);
+ static inline void SetRefCount( SfxPoolItem& rItem, sal_uLong n );
+ static inline sal_uLong AddRef( const SfxPoolItem& rItem, sal_uLong n = 1 );
+ static inline sal_uLong ReleaseRef( const SfxPoolItem& rItem, sal_uLong n = 1);
public:
SfxItemPool( const SfxItemPool &rPool,
- BOOL bCloneStaticDefaults = FALSE );
+ sal_Bool bCloneStaticDefaults = sal_False );
SfxItemPool( const UniString &rName,
- USHORT nStart, USHORT nEnd,
+ sal_uInt16 nStart, sal_uInt16 nEnd,
#ifdef TF_POOLABLE
const SfxItemInfo *pItemInfos,
#endif
SfxPoolItem **pDefaults = 0,
#ifndef TF_POOLABLE
- USHORT *pSlotIds = 0,
+ sal_uInt16 *pSlotIds = 0,
#endif
- FASTBOOL bLoadRefCounts = TRUE );
+ FASTBOOL bLoadRefCounts = sal_True );
protected:
virtual ~SfxItemPool();
public:
@@ -179,14 +179,14 @@ public:
SfxBroadcaster& BC();
void SetPoolDefaultItem( const SfxPoolItem& );
- const SfxPoolItem* GetPoolDefaultItem( USHORT nWhich ) const;
- void ResetPoolDefaultItem( USHORT nWhich );
+ const SfxPoolItem* GetPoolDefaultItem( sal_uInt16 nWhich ) const;
+ void ResetPoolDefaultItem( sal_uInt16 nWhich );
void SetDefaults( SfxPoolItem **pDefaults );
- void ReleaseDefaults( BOOL bDelete = FALSE );
- static void ReleaseDefaults( SfxPoolItem **pDefaults, USHORT nCount, BOOL bDelete = FALSE );
+ void ReleaseDefaults( sal_Bool bDelete = sal_False );
+ static void ReleaseDefaults( SfxPoolItem **pDefaults, sal_uInt16 nCount, sal_Bool bDelete = sal_False );
- virtual SfxMapUnit GetMetric( USHORT nWhich ) const;
+ virtual SfxMapUnit GetMetric( sal_uInt16 nWhich ) const;
void SetDefaultMetric( SfxMapUnit eNewMetric );
virtual SfxItemPresentation GetPresentation( const SfxPoolItem& rItem,
SfxItemPresentation ePresentation,
@@ -197,22 +197,22 @@ public:
virtual SfxItemPool* Clone() const;
UniString const & GetName() const { return aName; }
- virtual const SfxPoolItem& Put( const SfxPoolItem&, USHORT nWhich = 0 );
+ virtual const SfxPoolItem& Put( const SfxPoolItem&, sal_uInt16 nWhich = 0 );
virtual void Remove( const SfxPoolItem& );
- virtual const SfxPoolItem& GetDefaultItem( USHORT nWhich ) const;
+ virtual const SfxPoolItem& GetDefaultItem( sal_uInt16 nWhich ) const;
const SfxPoolItem* LoadItem( SvStream &rStream,
- FASTBOOL bDirect = FALSE,
+ FASTBOOL bDirect = sal_False,
const SfxItemPool *pRefPool = 0 );
FASTBOOL StoreItem( SvStream &rStream,
const SfxPoolItem &rItem,
- FASTBOOL bDirect = FALSE ) const;
+ FASTBOOL bDirect = sal_False ) const;
sal_uInt32 GetSurrogate(const SfxPoolItem *) const;
- const SfxPoolItem * GetItem2(USHORT nWhich, sal_uInt32 nSurrogate) const;
- sal_uInt32 GetItemCount2(USHORT nWhich) const;
+ const SfxPoolItem * GetItem2(sal_uInt16 nWhich, sal_uInt32 nSurrogate) const;
+ sal_uInt32 GetItemCount2(sal_uInt16 nWhich) const;
const SfxPoolItem* LoadSurrogate(SvStream& rStream,
- USHORT &rWhich, USHORT nSlotId,
+ sal_uInt16 &rWhich, sal_uInt16 nSlotId,
const SfxItemPool* pRefPool = 0 );
FASTBOOL StoreSurrogate(SvStream& rStream,
const SfxPoolItem *pItem ) const;
@@ -223,14 +223,14 @@ public:
return bPersistentRefCounts; }
void LoadCompleted();
- USHORT GetFirstWhich() const { return nStart; }
- USHORT GetLastWhich() const { return nEnd; }
- FASTBOOL IsInRange( USHORT nWhich ) const {
+ sal_uInt16 GetFirstWhich() const { return nStart; }
+ sal_uInt16 GetLastWhich() const { return nEnd; }
+ FASTBOOL IsInRange( sal_uInt16 nWhich ) const {
return nWhich >= nStart &&
nWhich <= nEnd; }
- FASTBOOL IsInVersionsRange( USHORT nWhich ) const;
- FASTBOOL IsInStoringRange( USHORT nWhich ) const;
- void SetStoringRange( USHORT nFrom, USHORT nTo );
+ FASTBOOL IsInVersionsRange( sal_uInt16 nWhich ) const;
+ FASTBOOL IsInStoringRange( sal_uInt16 nWhich ) const;
+ void SetStoringRange( sal_uInt16 nFrom, sal_uInt16 nTo );
void SetSecondaryPool( SfxItemPool *pPool );
SfxItemPool* GetSecondaryPool() const {
return pSecondary; }
@@ -242,35 +242,35 @@ public:
void Delete();
#ifdef TF_POOLABLE
- FASTBOOL IsItemFlag( USHORT nWhich, USHORT nFlag ) const;
- FASTBOOL IsItemFlag( const SfxPoolItem &rItem, USHORT nFlag ) const
+ FASTBOOL IsItemFlag( sal_uInt16 nWhich, sal_uInt16 nFlag ) const;
+ FASTBOOL IsItemFlag( const SfxPoolItem &rItem, sal_uInt16 nFlag ) const
{ return IsItemFlag( rItem.Which(), nFlag ); }
void SetItemInfos( const SfxItemInfo *pInfos )
{ pItemInfos = pInfos; }
#else
int HasMap() const { return 0 != pSlotIds; }
- void SetMap( USHORT *pNewSlotIds )
+ void SetMap( sal_uInt16 *pNewSlotIds )
{ pSlotIds = pNewSlotIds; }
#endif
- USHORT GetWhich( USHORT nSlot, BOOL bDeep = TRUE ) const;
- USHORT GetSlotId( USHORT nWhich, BOOL bDeep = TRUE ) const;
- USHORT GetTrueWhich( USHORT nSlot, BOOL bDeep = TRUE ) const;
- USHORT GetTrueSlotId( USHORT nWhich, BOOL bDeep = TRUE ) const;
-
- void SetVersionMap( USHORT nVer,
- USHORT nOldStart, USHORT nOldEnd,
- USHORT *pWhichIdTab );
- USHORT GetNewWhich( USHORT nOldWhich ) const;
- USHORT GetVersion() const;
- USHORT GetFileFormatVersion() const
+ sal_uInt16 GetWhich( sal_uInt16 nSlot, sal_Bool bDeep = sal_True ) const;
+ sal_uInt16 GetSlotId( sal_uInt16 nWhich, sal_Bool bDeep = sal_True ) const;
+ sal_uInt16 GetTrueWhich( sal_uInt16 nSlot, sal_Bool bDeep = sal_True ) const;
+ sal_uInt16 GetTrueSlotId( sal_uInt16 nWhich, sal_Bool bDeep = sal_True ) const;
+
+ void SetVersionMap( sal_uInt16 nVer,
+ sal_uInt16 nOldStart, sal_uInt16 nOldEnd,
+ sal_uInt16 *pWhichIdTab );
+ sal_uInt16 GetNewWhich( sal_uInt16 nOldWhich ) const;
+ sal_uInt16 GetVersion() const;
+ sal_uInt16 GetFileFormatVersion() const
{ return _nFileFormatVersion; }
- void SetFileFormatVersion( USHORT nFileFormatVersion );
- USHORT GetLoadingVersion() const;
+ void SetFileFormatVersion( sal_uInt16 nFileFormatVersion );
+ sal_uInt16 GetLoadingVersion() const;
FASTBOOL IsCurrentVersionLoading() const;
- static int IsWhich(USHORT nId) {
+ static int IsWhich(sal_uInt16 nId) {
return nId && nId <= SFX_WHICH_MAX; }
- static int IsSlot(USHORT nId) {
+ static int IsSlot(sal_uInt16 nId) {
return nId && nId > SFX_WHICH_MAX; }
static const SfxItemPool* GetStoringPool();
@@ -283,19 +283,19 @@ private:
// --------------- Inline Implementierungen ------------------------------
// nur der Pool darf den Referenz-Zaehler manipulieren !!!
-inline void SfxItemPool::SetRefCount( SfxPoolItem& rItem, ULONG n )
+inline void SfxItemPool::SetRefCount( SfxPoolItem& rItem, sal_uLong n )
{
rItem.SetRefCount(n);
}
// nur der Pool darf den Referenz-Zaehler manipulieren !!!
-inline ULONG SfxItemPool::AddRef( const SfxPoolItem& rItem, ULONG n )
+inline sal_uLong SfxItemPool::AddRef( const SfxPoolItem& rItem, sal_uLong n )
{
return rItem.AddRef(n);
}
// nur der Pool darf den Referenz-Zaehler manipulieren !!!
-inline ULONG SfxItemPool::ReleaseRef( const SfxPoolItem& rItem, ULONG n )
+inline sal_uLong SfxItemPool::ReleaseRef( const SfxPoolItem& rItem, sal_uLong n )
{
return rItem.ReleaseRef(n);
}
diff --git a/svl/inc/svl/itemprop.hxx b/svl/inc/svl/itemprop.hxx
index 3a993b47ed47..c755f6e93f34 100644
--- a/svl/inc/svl/itemprop.hxx
+++ b/svl/inc/svl/itemprop.hxx
@@ -44,20 +44,20 @@
struct SfxItemPropertyMapEntry
{
const char* pName;
- USHORT nNameLen;
- USHORT nWID;
+ sal_uInt16 nNameLen;
+ sal_uInt16 nWID;
const com::sun::star::uno::Type* pType;
long nFlags;
- BYTE nMemberId;
+ sal_uInt8 nMemberId;
};
struct SfxItemPropertySimpleEntry
{
- USHORT nWID;
+ sal_uInt16 nWID;
const com::sun::star::uno::Type* pType;
long nFlags;
- BYTE nMemberId;
+ sal_uInt8 nMemberId;
SfxItemPropertySimpleEntry() :
nWID( 0 ),
@@ -65,8 +65,8 @@ struct SfxItemPropertySimpleEntry
nFlags( 0 ),
nMemberId( 0 ){}
- SfxItemPropertySimpleEntry(USHORT _nWID, const com::sun::star::uno::Type* _pType,
- long _nFlags, BYTE _nMemberId) :
+ SfxItemPropertySimpleEntry(sal_uInt16 _nWID, const com::sun::star::uno::Type* _pType,
+ long _nFlags, sal_uInt8 _nMemberId) :
nWID( _nWID ),
pType( _pType ),
nFlags( _nFlags ),
@@ -116,7 +116,7 @@ class SVL_DLLPUBLIC SfxItemPropertySet
SfxItemPropertyMap m_aMap;
mutable com::sun::star::uno::Reference<com::sun::star::beans::XPropertySetInfo> m_xInfo;
protected:
- virtual BOOL FillItem(SfxItemSet& rSet, USHORT nWhich, BOOL bGetProperty) const;
+ virtual sal_Bool FillItem(SfxItemSet& rSet, sal_uInt16 nWhich, sal_Bool bGetProperty) const;
public:
SfxItemPropertySet( const SfxItemPropertyMapEntry *pMap ) :
diff --git a/svl/inc/svl/itemset.hxx b/svl/inc/svl/itemset.hxx
index 30c4cc411fad..7e6429ca37ab 100644
--- a/svl/inc/svl/itemset.hxx
+++ b/svl/inc/svl/itemset.hxx
@@ -50,8 +50,8 @@ typedef SfxPoolItem const** SfxItemArray;
#ifndef DBG
#ifdef DBG_UTILx
#define DBG(s) s
-#define _pChildCount(THIS) ( *(USHORT**)SfxPointerServer::GetServer()->GetPointer(THIS) )
-#define _pChildCountCtor ( (*(USHORT**)SfxPointerServer::GetServer()->CreatePointer(this)) = new USHORT )
+#define _pChildCount(THIS) ( *(sal_uInt16**)SfxPointerServer::GetServer()->GetPointer(THIS) )
+#define _pChildCountCtor ( (*(sal_uInt16**)SfxPointerServer::GetServer()->CreatePointer(this)) = new sal_uInt16 )
#define _pChildCountDtor ( SfxPointerServer::GetServer()->ReleasePointer(this) )
#else
#define DBG(s)
@@ -79,8 +79,8 @@ class SVL_DLLPUBLIC SfxItemSet
SfxItemPool* _pPool; // der verwendete Pool
const SfxItemSet* _pParent; // Ableitung
SfxItemArray _aItems; // Item-Feld
- USHORT* _pWhichRanges; // Array von Which-Bereichen
- USHORT _nCount; // Anzahl Items
+ sal_uInt16* _pWhichRanges; // Array von Which-Bereichen
+ sal_uInt16 _nCount; // Anzahl Items
//---------------------------------------------------------------------
#ifndef _SFXITEMS_HXX
@@ -90,9 +90,9 @@ friend class SfxAllItemSet;
friend const char *DbgCheckItemSet( const void* );
private:
- SVL_DLLPRIVATE void InitRanges_Impl(const USHORT *nWhichPairTable);
- SVL_DLLPRIVATE void InitRanges_Impl(va_list pWhich, USHORT n1, USHORT n2, USHORT n3);
- SVL_DLLPRIVATE void InitRanges_Impl(USHORT nWh1, USHORT nWh2);
+ SVL_DLLPRIVATE void InitRanges_Impl(const sal_uInt16 *nWhichPairTable);
+ SVL_DLLPRIVATE void InitRanges_Impl(va_list pWhich, sal_uInt16 n1, sal_uInt16 n2, sal_uInt16 n3);
+ SVL_DLLPRIVATE void InitRanges_Impl(sal_uInt16 nWh1, sal_uInt16 nWh2);
public:
SfxItemArray GetItems_Impl() const { return _aItems; }
@@ -113,64 +113,64 @@ protected:
public:
SfxItemSet( const SfxItemSet& );
- SfxItemSet( SfxItemPool&, BOOL bTotalPoolRanges = FALSE );
- SfxItemSet( SfxItemPool&, USHORT nWhich1, USHORT nWhich2 );
+ SfxItemSet( SfxItemPool&, sal_Bool bTotalPoolRanges = sal_False );
+ SfxItemSet( SfxItemPool&, sal_uInt16 nWhich1, sal_uInt16 nWhich2 );
SfxItemSet( SfxItemPool&, USHORT_ARG nWh1, USHORT_ARG nWh2, USHORT_ARG nNull, ... );
- SfxItemSet( SfxItemPool&, const USHORT* nWhichPairTable );
+ SfxItemSet( SfxItemPool&, const sal_uInt16* nWhichPairTable );
virtual ~SfxItemSet();
- virtual SfxItemSet * Clone(BOOL bItems = TRUE, SfxItemPool *pToPool = 0) const;
+ virtual SfxItemSet * Clone(sal_Bool bItems = sal_True, SfxItemPool *pToPool = 0) const;
// Items erfragen
- USHORT Count() const { return _nCount; }
- USHORT TotalCount() const;
+ sal_uInt16 Count() const { return _nCount; }
+ sal_uInt16 TotalCount() const;
- virtual const SfxPoolItem& Get( USHORT nWhich, BOOL bSrchInParent = TRUE ) const;
- const SfxPoolItem* GetItem( USHORT nWhich, BOOL bSrchInParent = TRUE,
+ virtual const SfxPoolItem& Get( sal_uInt16 nWhich, sal_Bool bSrchInParent = sal_True ) const;
+ const SfxPoolItem* GetItem( sal_uInt16 nWhich, sal_Bool bSrchInParent = sal_True,
TypeId aItemType = 0 ) const;
// Which-Wert des Items an der Position nPos erfragen
- USHORT GetWhichByPos(USHORT nPos) const;
+ sal_uInt16 GetWhichByPos(sal_uInt16 nPos) const;
// Item-Status erfragen
- SfxItemState GetItemState( USHORT nWhich,
- BOOL bSrchInParent = TRUE,
+ SfxItemState GetItemState( sal_uInt16 nWhich,
+ sal_Bool bSrchInParent = sal_True,
const SfxPoolItem **ppItem = 0 ) const;
- virtual void DisableItem(USHORT nWhich);
- virtual void InvalidateItem( USHORT nWhich );
- virtual USHORT ClearItem( USHORT nWhich = 0);
- virtual void ClearInvalidItems( BOOL bHardDefault = FALSE );
+ virtual void DisableItem(sal_uInt16 nWhich);
+ virtual void InvalidateItem( sal_uInt16 nWhich );
+ virtual sal_uInt16 ClearItem( sal_uInt16 nWhich = 0);
+ virtual void ClearInvalidItems( sal_Bool bHardDefault = sal_False );
void InvalidateAllItems(); HACK(via nWhich = 0)
inline void SetParent( const SfxItemSet* pNew );
// Items hinzufuegen, loeschen etc.
- virtual const SfxPoolItem* Put( const SfxPoolItem&, USHORT nWhich );
+ virtual const SfxPoolItem* Put( const SfxPoolItem&, sal_uInt16 nWhich );
const SfxPoolItem* Put( const SfxPoolItem& rItem )
{ return Put(rItem, rItem.Which()); }
virtual int Put( const SfxItemSet&,
- BOOL bInvalidAsDefault = TRUE );
+ sal_Bool bInvalidAsDefault = sal_True );
void PutExtended( const SfxItemSet&,
SfxItemState eDontCareAs = SFX_ITEM_UNKNOWN,
SfxItemState eDefaultAs = SFX_ITEM_UNKNOWN );
- virtual int Set( const SfxItemSet&, BOOL bDeep = TRUE );
+ virtual int Set( const SfxItemSet&, sal_Bool bDeep = sal_True );
virtual void Intersect( const SfxItemSet& rSet );
- virtual void MergeValues( const SfxItemSet& rSet, BOOL bOverwriteDefaults = FALSE );
+ virtual void MergeValues( const SfxItemSet& rSet, sal_Bool bOverwriteDefaults = sal_False );
virtual void Differentiate( const SfxItemSet& rSet );
- virtual void MergeValue( const SfxPoolItem& rItem, BOOL bOverwriteDefaults = FALSE );
+ virtual void MergeValue( const SfxPoolItem& rItem, sal_Bool bOverwriteDefaults = sal_False );
SfxItemPool* GetPool() const { return _pPool; }
- const USHORT* GetRanges() const { return _pWhichRanges; }
- void SetRanges( const USHORT *pRanges );
- void MergeRange( USHORT nFrom, USHORT nTo );
+ const sal_uInt16* GetRanges() const { return _pWhichRanges; }
+ void SetRanges( const sal_uInt16 *pRanges );
+ void MergeRange( sal_uInt16 nFrom, sal_uInt16 nTo );
const SfxItemSet* GetParent() const { return _pParent; }
- virtual SvStream & Load( SvStream &, FASTBOOL bDirect = FALSE,
+ virtual SvStream & Load( SvStream &, FASTBOOL bDirect = sal_False,
const SfxItemPool *pRefPool = 0 );
- virtual SvStream & Store( SvStream &, FASTBOOL bDirect = FALSE ) const;
+ virtual SvStream & Store( SvStream &, FASTBOOL bDirect = sal_False ) const;
virtual int operator==(const SfxItemSet &) const;
};
@@ -194,19 +194,19 @@ class SVL_DLLPUBLIC SfxAllItemSet: public SfxItemSet
{
SfxVoidItem aDefault;
- USHORT nFree;
+ sal_uInt16 nFree;
public:
SfxAllItemSet( SfxItemPool &rPool );
SfxAllItemSet( const SfxItemSet & );
SfxAllItemSet( const SfxAllItemSet & );
- virtual SfxItemSet * Clone( BOOL bItems = TRUE, SfxItemPool *pToPool = 0 ) const;
- virtual const SfxPoolItem* Put( const SfxPoolItem&, USHORT nWhich );
+ virtual SfxItemSet * Clone( sal_Bool bItems = sal_True, SfxItemPool *pToPool = 0 ) const;
+ virtual const SfxPoolItem* Put( const SfxPoolItem&, sal_uInt16 nWhich );
const SfxPoolItem* Put( const SfxPoolItem& rItem )
{ return Put(rItem, rItem.Which()); }
virtual int Put( const SfxItemSet&,
- BOOL bInvalidAsDefault = TRUE );
+ sal_Bool bInvalidAsDefault = sal_True );
};
#endif // #ifndef _SFXITEMSET_HXX
diff --git a/svl/inc/svl/lckbitem.hxx b/svl/inc/svl/lckbitem.hxx
index 2204a57c17d4..6535264eeb78 100644
--- a/svl/inc/svl/lckbitem.hxx
+++ b/svl/inc/svl/lckbitem.hxx
@@ -42,23 +42,23 @@ class SVL_DLLPUBLIC SfxLockBytesItem : public SfxPoolItem
public:
TYPEINFO();
SfxLockBytesItem();
- SfxLockBytesItem( USHORT nWhich,
+ SfxLockBytesItem( sal_uInt16 nWhich,
SvLockBytes *pLockBytes );
- SfxLockBytesItem( USHORT nWhich, SvStream & );
+ SfxLockBytesItem( sal_uInt16 nWhich, SvStream & );
SfxLockBytesItem( const SfxLockBytesItem& );
~SfxLockBytesItem();
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT nItemVersion) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16 nItemVersion) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const;
SvLockBytes* GetValue() const { return _xVal; }
- virtual BOOL PutValue ( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue ( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 ) const;
};
#endif
diff --git a/svl/inc/svl/listener.hxx b/svl/inc/svl/listener.hxx
index 3107f5ceee56..e3bdea45169e 100644
--- a/svl/inc/svl/listener.hxx
+++ b/svl/inc/svl/listener.hxx
@@ -50,12 +50,12 @@ public:
SvtListener( const SvtListener &rCopy );
virtual ~SvtListener();
- BOOL StartListening( SvtBroadcaster& rBroadcaster );
- BOOL EndListening( SvtBroadcaster& rBroadcaster );
+ sal_Bool StartListening( SvtBroadcaster& rBroadcaster );
+ sal_Bool EndListening( SvtBroadcaster& rBroadcaster );
void EndListeningAll();
- BOOL IsListening( SvtBroadcaster& rBroadcaster ) const;
+ sal_Bool IsListening( SvtBroadcaster& rBroadcaster ) const;
- BOOL HasBroadcaster() const { return 0 != pBrdCastLst; }
+ sal_Bool HasBroadcaster() const { return 0 != pBrdCastLst; }
virtual void Notify( SvtBroadcaster& rBC, const SfxHint& rHint );
};
diff --git a/svl/inc/svl/lngmisc.hxx b/svl/inc/svl/lngmisc.hxx
index 5143d147227d..9dbe2d4740d0 100644
--- a/svl/inc/svl/lngmisc.hxx
+++ b/svl/inc/svl/lngmisc.hxx
@@ -45,29 +45,29 @@
namespace linguistic
{
-inline BOOL IsHyphen( sal_Unicode cChar )
+inline sal_Bool IsHyphen( sal_Unicode cChar )
{
return cChar == SVT_SOFT_HYPHEN || cChar == SVT_HARD_HYPHEN;
}
-inline BOOL IsControlChar( sal_Unicode cChar )
+inline sal_Bool IsControlChar( sal_Unicode cChar )
{
return cChar < (sal_Unicode) ' ';
}
-inline BOOL HasHyphens( const rtl::OUString &rTxt )
+inline sal_Bool HasHyphens( const rtl::OUString &rTxt )
{
return rTxt.indexOf( SVT_SOFT_HYPHEN ) != -1 ||
rTxt.indexOf( SVT_HARD_HYPHEN ) != -1;
}
-SVL_DLLPUBLIC INT32 GetNumControlChars( const rtl::OUString &rTxt );
-SVL_DLLPUBLIC BOOL RemoveHyphens( rtl::OUString &rTxt );
-SVL_DLLPUBLIC BOOL RemoveControlChars( rtl::OUString &rTxt );
+SVL_DLLPUBLIC sal_Int32 GetNumControlChars( const rtl::OUString &rTxt );
+SVL_DLLPUBLIC sal_Bool RemoveHyphens( rtl::OUString &rTxt );
+SVL_DLLPUBLIC sal_Bool RemoveControlChars( rtl::OUString &rTxt );
-SVL_DLLPUBLIC BOOL ReplaceControlChars( rtl::OUString &rTxt, sal_Char aRplcChar = ' ' );
+SVL_DLLPUBLIC sal_Bool ReplaceControlChars( rtl::OUString &rTxt, sal_Char aRplcChar = ' ' );
SVL_DLLPUBLIC String GetThesaurusReplaceText( const String &rText );
diff --git a/svl/inc/svl/lstner.hxx b/svl/inc/svl/lstner.hxx
index bc95573228f5..963ab3f2b654 100644
--- a/svl/inc/svl/lstner.hxx
+++ b/svl/inc/svl/lstner.hxx
@@ -57,15 +57,15 @@ public:
SfxListener( const SfxListener &rCopy );
virtual ~SfxListener();
- BOOL StartListening( SfxBroadcaster& rBroadcaster, BOOL bPreventDups = FALSE );
- BOOL EndListening( SfxBroadcaster& rBroadcaster, BOOL bAllDups = FALSE );
- void EndListening( USHORT nNo );
+ sal_Bool StartListening( SfxBroadcaster& rBroadcaster, sal_Bool bPreventDups = sal_False );
+ sal_Bool EndListening( SfxBroadcaster& rBroadcaster, sal_Bool bAllDups = sal_False );
+ void EndListening( sal_uInt16 nNo );
void EndListeningAll();
- BOOL IsListening( SfxBroadcaster& rBroadcaster ) const;
+ sal_Bool IsListening( SfxBroadcaster& rBroadcaster ) const;
- USHORT GetBroadcasterCount() const
+ sal_uInt16 GetBroadcasterCount() const
{ return aBCs.Count(); }
- SfxBroadcaster* GetBroadcasterJOE( USHORT nNo ) const
+ SfxBroadcaster* GetBroadcasterJOE( sal_uInt16 nNo ) const
{ return (SfxBroadcaster*) aBCs.GetObject(nNo); }
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
diff --git a/svl/inc/svl/macitem.hxx b/svl/inc/svl/macitem.hxx
index 48bc55cd1aa0..a82f4d11d58c 100644
--- a/svl/inc/svl/macitem.hxx
+++ b/svl/inc/svl/macitem.hxx
@@ -93,7 +93,7 @@ public:
ScriptType GetScriptType() const { return eType; }
- BOOL HasMacro() const { return aMacName.Len() ? TRUE : FALSE; }
+ sal_Bool HasMacro() const { return aMacName.Len() ? sal_True : sal_False; }
#ifdef SOLAR_JAVA
// JavaScript-Function-Objekt holen
@@ -125,7 +125,7 @@ DECLARE_TABLE( _SvxMacroTableDtor, SvxMacro* )
class SVL_DLLPUBLIC SvxMacroTableDtor : public _SvxMacroTableDtor
{
public:
- inline SvxMacroTableDtor( const USHORT nInitSz = 0, const USHORT nReSz = 1 );
+ inline SvxMacroTableDtor( const sal_uInt16 nInitSz = 0, const sal_uInt16 nReSz = 1 );
inline SvxMacroTableDtor( const SvxMacroTableDtor &rCpy ) : _SvxMacroTableDtor() { *this = rCpy; }
inline ~SvxMacroTableDtor() { DelDtor(); }
SvxMacroTableDtor& operator=( const SvxMacroTableDtor &rCpy );
@@ -133,14 +133,14 @@ public:
// loescht alle Eintraege
void DelDtor();
- SvStream& Read( SvStream &, USHORT nVersion = SVX_MACROTBL_AKTVERSION );
+ SvStream& Read( SvStream &, sal_uInt16 nVersion = SVX_MACROTBL_AKTVERSION );
SvStream& Write( SvStream & ) const;
- USHORT GetVersion() const { return SVX_MACROTBL_AKTVERSION; }
+ sal_uInt16 GetVersion() const { return SVX_MACROTBL_AKTVERSION; }
};
-inline SvxMacroTableDtor::SvxMacroTableDtor( const USHORT nInitSz,
- const USHORT nReSz)
+inline SvxMacroTableDtor::SvxMacroTableDtor( const sal_uInt16 nInitSz,
+ const sal_uInt16 nReSz)
: _SvxMacroTableDtor( nInitSz, nReSz )
{}
@@ -154,7 +154,7 @@ class SVL_DLLPUBLIC SvxMacroItem: public SfxPoolItem
public:
TYPEINFO();
- inline SvxMacroItem ( const USHORT nId /*= ITEMID_MACRO*/ );
+ inline SvxMacroItem ( const sal_uInt16 nId /*= ITEMID_MACRO*/ );
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==( const SfxPoolItem& ) const;
@@ -164,17 +164,17 @@ public:
XubString &rText,
const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
- virtual USHORT GetVersion( USHORT nFileFormatVersion ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion ) const;
+ virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const;
inline const SvxMacroTableDtor& GetMacroTable() const { return aMacroTable;}
inline void SetMacroTable( const SvxMacroTableDtor& rTbl ) { aMacroTable = rTbl; }
- inline const SvxMacro& GetMacro( USHORT nEvent ) const;
- inline BOOL HasMacro( USHORT nEvent ) const;
- void SetMacro( USHORT nEvent, const SvxMacro& );
- inline BOOL DelMacro( USHORT nEvent );
+ inline const SvxMacro& GetMacro( sal_uInt16 nEvent ) const;
+ inline sal_Bool HasMacro( sal_uInt16 nEvent ) const;
+ void SetMacro( sal_uInt16 nEvent, const SvxMacro& );
+ inline sal_Bool DelMacro( sal_uInt16 nEvent );
private:
SvxMacroTableDtor aMacroTable;
@@ -183,7 +183,7 @@ private:
SvxMacroItem &operator=( const SvxMacroItem & );
};
-inline SvxMacroItem::SvxMacroItem( const USHORT nId )
+inline SvxMacroItem::SvxMacroItem( const sal_uInt16 nId )
: SfxPoolItem( nId )
{}
inline SvxMacroItem::SvxMacroItem( const SvxMacroItem &rCpy )
@@ -191,15 +191,15 @@ inline SvxMacroItem::SvxMacroItem( const SvxMacroItem &rCpy )
aMacroTable( rCpy.GetMacroTable() )
{}
-inline BOOL SvxMacroItem::HasMacro( USHORT nEvent ) const
+inline sal_Bool SvxMacroItem::HasMacro( sal_uInt16 nEvent ) const
{
return aMacroTable.IsKeyValid( nEvent );
}
-inline const SvxMacro& SvxMacroItem::GetMacro( USHORT nEvent ) const
+inline const SvxMacro& SvxMacroItem::GetMacro( sal_uInt16 nEvent ) const
{
return *(aMacroTable.Get(nEvent));
}
-inline BOOL SvxMacroItem::DelMacro( USHORT nEvent )
+inline sal_Bool SvxMacroItem::DelMacro( sal_uInt16 nEvent )
{
SvxMacro *pMacro = aMacroTable.Remove( nEvent );
delete pMacro;
diff --git a/svl/inc/svl/mailenum.hxx b/svl/inc/svl/mailenum.hxx
index e25fd2cfdcd2..bfce28ed00db 100644
--- a/svl/inc/svl/mailenum.hxx
+++ b/svl/inc/svl/mailenum.hxx
@@ -85,10 +85,10 @@ enum MailAction
// Textformat zum Versenden von Nachrichten ------------------------------
-#define TXTFORMAT_ASCII ((BYTE)0x01)
-#define TXTFORMAT_HTML ((BYTE)0x02)
-#define TXTFORMAT_RTF ((BYTE)0x04)
-#define TXTFORMAT_OFFICE ((BYTE)0x08)
+#define TXTFORMAT_ASCII ((sal_uInt8)0x01)
+#define TXTFORMAT_HTML ((sal_uInt8)0x02)
+#define TXTFORMAT_RTF ((sal_uInt8)0x04)
+#define TXTFORMAT_OFFICE ((sal_uInt8)0x08)
#endif
diff --git a/svl/inc/svl/metitem.hxx b/svl/inc/svl/metitem.hxx
index 5e7e792b61e7..a5eecbebfa61 100644
--- a/svl/inc/svl/metitem.hxx
+++ b/svl/inc/svl/metitem.hxx
@@ -38,8 +38,8 @@ class SVL_DLLPUBLIC SfxMetricItem: public SfxInt32Item
{
public:
TYPEINFO();
- SfxMetricItem( USHORT nWhich = 0, UINT32 nValue = 0 );
- SfxMetricItem( USHORT nWhich, SvStream & );
+ SfxMetricItem( sal_uInt16 nWhich = 0, sal_uInt32 nValue = 0 );
+ SfxMetricItem( sal_uInt16 nWhich, SvStream & );
SfxMetricItem( const SfxMetricItem& );
~SfxMetricItem() {
DBG_DTOR(SfxMetricItem, 0); }
diff --git a/svl/inc/svl/nranges.hxx b/svl/inc/svl/nranges.hxx
index b04f131d6e89..c7ba2029f5a6 100644
--- a/svl/inc/svl/nranges.hxx
+++ b/svl/inc/svl/nranges.hxx
@@ -35,12 +35,12 @@
#ifndef NUMTYPE
-#define NUMTYPE USHORT
+#define NUMTYPE sal_uInt16
#define SfxNumRanges SfxUShortRanges
#include <svl/nranges.hxx>
#undef NUMTYPE
-#define NUMTYPE ULONG
+#define NUMTYPE sal_uLong
#define SfxNumRanges SfxULongRanges
#include <svl/nranges.hxx>
@@ -66,8 +66,8 @@ public:
~SfxNumRanges()
{ delete [] _pRanges; }
- BOOL operator == ( const SfxNumRanges & ) const;
- BOOL operator != ( const SfxNumRanges & rRanges ) const
+ sal_Bool operator == ( const SfxNumRanges & ) const;
+ sal_Bool operator != ( const SfxNumRanges & rRanges ) const
{ return !( *this == rRanges ); }
SfxNumRanges& operator = ( const SfxNumRanges & );
@@ -77,10 +77,10 @@ public:
SfxNumRanges& operator /= ( const SfxNumRanges & );
NUMTYPE Count() const;
- BOOL IsEmpty() const
+ sal_Bool IsEmpty() const
{ return !_pRanges || 0 == *_pRanges; }
- BOOL Contains( NUMTYPE n ) const;
- BOOL Intersects( const SfxNumRanges & ) const;
+ sal_Bool Contains( NUMTYPE n ) const;
+ sal_Bool Intersects( const SfxNumRanges & ) const;
operator const NUMTYPE* () const
{ return _pRanges; }
diff --git a/svl/inc/svl/outstrm.hxx b/svl/inc/svl/outstrm.hxx
index f80f6f2c9616..b48cea2e04da 100644
--- a/svl/inc/svl/outstrm.hxx
+++ b/svl/inc/svl/outstrm.hxx
@@ -42,15 +42,15 @@ class SVL_DLLPUBLIC SvOutputStream: public SvStream
com::sun::star::uno::Reference< com::sun::star::io::XOutputStream >
m_xStream;
- SVL_DLLPRIVATE virtual ULONG GetData(void *, ULONG);
+ SVL_DLLPRIVATE virtual sal_uLong GetData(void *, sal_uLong);
- SVL_DLLPRIVATE virtual ULONG PutData(void const * pData, ULONG nSize);
+ SVL_DLLPRIVATE virtual sal_uLong PutData(void const * pData, sal_uLong nSize);
- SVL_DLLPRIVATE virtual ULONG SeekPos(ULONG);
+ SVL_DLLPRIVATE virtual sal_uLong SeekPos(sal_uLong);
SVL_DLLPRIVATE virtual void FlushData();
- SVL_DLLPRIVATE virtual void SetSize(ULONG);
+ SVL_DLLPRIVATE virtual void SetSize(sal_uLong);
public:
SvOutputStream(com::sun::star::uno::Reference<
@@ -59,7 +59,7 @@ public:
virtual ~SvOutputStream();
- virtual USHORT IsA() const;
+ virtual sal_uInt16 IsA() const;
};
#endif // SVTOOLS_OUTSTRM_HXX
diff --git a/svl/inc/svl/ownlist.hxx b/svl/inc/svl/ownlist.hxx
index 41f6cbff40d1..801441c297a1 100644
--- a/svl/inc/svl/ownlist.hxx
+++ b/svl/inc/svl/ownlist.hxx
@@ -86,10 +86,10 @@ class SVL_DLLPUBLIC SvCommandList
{
PRV_SV_DECL_OWNER_LIST(SvCommandList,SvCommand);
SvCommand & Append( const String & rCommand, const String & rArg );
- BOOL AppendCommands( const String & rCmd, USHORT * pEaten );
+ sal_Bool AppendCommands( const String & rCmd, sal_uInt16 * pEaten );
String GetCommands() const;
- BOOL FillFromSequence( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& );
+ sal_Bool FillFromSequence( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& );
void FillSequence( com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& );
SVL_DLLPUBLIC friend SvStream& operator >> ( SvStream& rStm, SvCommandList & );
diff --git a/svl/inc/svl/poolcach.hxx b/svl/inc/svl/poolcach.hxx
index 78bdca8177e6..182c9739f0cf 100644
--- a/svl/inc/svl/poolcach.hxx
+++ b/svl/inc/svl/poolcach.hxx
@@ -61,7 +61,7 @@ public:
const SfxItemSet *pPutSet );
~SfxItemPoolCache();
- const SfxSetItem& ApplyTo( const SfxSetItem& rSetItem, BOOL bNew = FALSE );
+ const SfxSetItem& ApplyTo( const SfxSetItem& rSetItem, sal_Bool bNew = sal_False );
};
diff --git a/svl/inc/svl/poolitem.hxx b/svl/inc/svl/poolitem.hxx
index d78e32877440..48e5a80166b7 100644
--- a/svl/inc/svl/poolitem.hxx
+++ b/svl/inc/svl/poolitem.hxx
@@ -143,7 +143,7 @@ enum SfxItemPresentation
// -----------------------------------------------------------------------
-typedef USHORT SfxItemState;
+typedef sal_uInt16 SfxItemState;
#define SFX_ITEM_UNKNOWN 0x0000
@@ -183,17 +183,17 @@ friend class SfxItemPoolCache;
friend class SfxItemSet;
friend class SfxVoidItem;
- ULONG nRefCount; // Referenzzaehler
- USHORT nWhich;
- USHORT nKind;
+ sal_uLong nRefCount; // Referenzzaehler
+ sal_uInt16 nWhich;
+ sal_uInt16 nKind;
private:
- inline void SetRefCount( ULONG n );
- inline void SetKind( USHORT n );
+ inline void SetRefCount( sal_uLong n );
+ inline void SetKind( sal_uInt16 n );
public:
- inline ULONG AddRef( ULONG n = 1 ) const;
+ inline sal_uLong AddRef( sal_uLong n = 1 ) const;
private:
- inline ULONG ReleaseRef( ULONG n = 1 ) const;
+ inline sal_uLong ReleaseRef( sal_uLong n = 1 ) const;
SVL_DLLPRIVATE long Delete_Impl(void*);
#if 0
@@ -203,17 +203,17 @@ private:
#endif
protected:
- SfxPoolItem( USHORT nWhich = 0 );
+ SfxPoolItem( sal_uInt16 nWhich = 0 );
SfxPoolItem( const SfxPoolItem& );
public:
TYPEINFO();
virtual ~SfxPoolItem();
- void SetWhich( USHORT nId ) {
+ void SetWhich( sal_uInt16 nId ) {
DBG_CHKTHIS(SfxPoolItem, 0);
nWhich = nId; }
- USHORT Which() const {
+ sal_uInt16 Which() const {
DBG_CHKTHIS(SfxPoolItem, 0);
return nWhich; }
virtual int operator==( const SfxPoolItem& ) const = 0;
@@ -228,19 +228,19 @@ public:
XubString &rText,
const IntlWrapper * pIntlWrapper = 0 ) const;
- virtual USHORT GetVersion( USHORT nFileFormatVersion ) const;
+ virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const;
virtual int ScaleMetrics( long lMult, long lDiv );
virtual int HasMetrics() const;
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
- virtual SfxPoolItem* Create( SvStream &, USHORT nItemVersion ) const;
- virtual SvStream& Store( SvStream &, USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create( SvStream &, sal_uInt16 nItemVersion ) const;
+ virtual SvStream& Store( SvStream &, sal_uInt16 nItemVersion ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const = 0;
- ULONG GetRefCount() const { return nRefCount; }
- inline USHORT GetKind() const { return nKind; }
+ sal_uLong GetRefCount() const { return nRefCount; }
+ inline sal_uInt16 GetKind() const { return nKind; }
/** Read in a Unicode string from a streamed byte string representation.
@@ -295,21 +295,21 @@ private:
// -----------------------------------------------------------------------
-inline void SfxPoolItem::SetRefCount( ULONG n )
+inline void SfxPoolItem::SetRefCount( sal_uLong n )
{
DBG_CHKTHIS( SfxPoolItem, 0 );
nRefCount = n;
nKind = 0;
}
-inline void SfxPoolItem::SetKind( USHORT n )
+inline void SfxPoolItem::SetKind( sal_uInt16 n )
{
DBG_CHKTHIS( SfxPoolItem, 0 );
nRefCount = SFX_ITEMS_SPECIAL;
nKind = n;
}
-inline ULONG SfxPoolItem::AddRef( ULONG n ) const
+inline sal_uLong SfxPoolItem::AddRef( sal_uLong n ) const
{
DBG_CHKTHIS( SfxPoolItem, 0 );
DBG_ASSERT( nRefCount <= SFX_ITEMS_MAXREF, "AddRef mit nicht-Pool-Item" );
@@ -317,7 +317,7 @@ inline ULONG SfxPoolItem::AddRef( ULONG n ) const
return ( ((SfxPoolItem *)this)->nRefCount += n );
}
-inline ULONG SfxPoolItem::ReleaseRef( ULONG n ) const
+inline sal_uLong SfxPoolItem::ReleaseRef( sal_uLong n ) const
{
DBG_CHKTHIS( SfxPoolItem, 0 );
DBG_ASSERT( nRefCount <= SFX_ITEMS_MAXREF, "AddRef mit nicht-Pool-Item" );
@@ -360,8 +360,8 @@ class SVL_DLLPUBLIC SfxVoidItem: public SfxPoolItem
SfxVoidItem & operator=( const SfxVoidItem& ); // not implemented.
public:
TYPEINFO();
- SfxVoidItem( USHORT nWhich );
- SfxVoidItem( USHORT nWhich, SvStream & );
+ SfxVoidItem( sal_uInt16 nWhich );
+ SfxVoidItem( sal_uInt16 nWhich, SvStream & );
SfxVoidItem( const SfxVoidItem& );
~SfxVoidItem();
@@ -375,7 +375,7 @@ public:
// von sich selbst eine Kopie erzeugen
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- void SetWhich(USHORT nWh) { nWhich = nWh; }
+ void SetWhich(sal_uInt16 nWh) { nWhich = nWh; }
};
// -----------------------------------------------------------------------
@@ -388,8 +388,8 @@ class SVL_DLLPUBLIC SfxSetItem: public SfxPoolItem
public:
TYPEINFO();
- SfxSetItem( USHORT nWhich, SfxItemSet *pSet );
- SfxSetItem( USHORT nWhich, const SfxItemSet &rSet );
+ SfxSetItem( sal_uInt16 nWhich, SfxItemSet *pSet );
+ SfxSetItem( sal_uInt16 nWhich, const SfxItemSet &rSet );
SfxSetItem( const SfxSetItem&, SfxItemPool *pPool = 0 );
~SfxSetItem();
@@ -403,8 +403,8 @@ public:
// von sich selbst eine Kopie erzeugen
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const = 0;
- virtual SfxPoolItem* Create(SvStream &, USHORT nVersion) const = 0;
- virtual SvStream& Store(SvStream &, USHORT nVer) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16 nVersion) const = 0;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nVer) const;
const SfxItemSet& GetItemSet() const
{ return *pSet; }
@@ -423,7 +423,7 @@ friend class SfxItemSet;
private:
TYPEINFO();
- SfxInvalidItem( USHORT nWhich, const SfxPoolItem &rDefault );
+ SfxInvalidItem( sal_uInt16 nWhich, const SfxPoolItem &rDefault );
SfxInvalidItem( const SfxInvalidItem& );
virtual ~SfxInvalidItem();
@@ -439,8 +439,8 @@ public:
// von sich selbst eine Kopie erzeugen
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT nVersion) const;
- virtual SvStream& Store(SvStream &, USHORT nVer ) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16 nVersion) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nVer ) const;
};
#endif /* @@@ NOT USED @@@ */
@@ -449,7 +449,7 @@ public:
class SVL_DLLPUBLIC SfxItemHandle
{
- USHORT *pRef;
+ sal_uInt16 *pRef;
SfxPoolItem *pItem;
public:
SfxItemHandle( SfxPoolItem& );
diff --git a/svl/inc/svl/ptitem.hxx b/svl/inc/svl/ptitem.hxx
index 1911ac997527..c3072acdb933 100644
--- a/svl/inc/svl/ptitem.hxx
+++ b/svl/inc/svl/ptitem.hxx
@@ -44,8 +44,8 @@ class SVL_DLLPUBLIC SfxPointItem: public SfxPoolItem
public:
TYPEINFO();
SfxPointItem();
- SfxPointItem( USHORT nWhich, const Point& rVal );
- SfxPointItem( USHORT nWhich, SvStream & );
+ SfxPointItem( sal_uInt16 nWhich, const Point& rVal );
+ SfxPointItem( sal_uInt16 nWhich, SvStream & );
SfxPointItem( const SfxPointItem& );
~SfxPointItem() {
DBG_DTOR(SfxPointItem, 0); }
@@ -59,8 +59,8 @@ public:
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT nItemVersion) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16 nItemVersion) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
const Point& GetValue() const { return aVal; }
void SetValue( const Point& rNewVal ) {
@@ -68,10 +68,10 @@ public:
aVal = rNewVal;
}
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 );
};
#endif
diff --git a/svl/inc/svl/rectitem.hxx b/svl/inc/svl/rectitem.hxx
index da080ac95e11..b63d06096bd8 100644
--- a/svl/inc/svl/rectitem.hxx
+++ b/svl/inc/svl/rectitem.hxx
@@ -45,8 +45,8 @@ class SVL_DLLPUBLIC SfxRectangleItem: public SfxPoolItem
public:
TYPEINFO();
SfxRectangleItem();
- SfxRectangleItem( USHORT nWhich, const Rectangle& rVal );
- SfxRectangleItem( USHORT nWhich, SvStream & );
+ SfxRectangleItem( sal_uInt16 nWhich, const Rectangle& rVal );
+ SfxRectangleItem( sal_uInt16 nWhich, SvStream & );
SfxRectangleItem( const SfxRectangleItem& );
~SfxRectangleItem() {
DBG_DTOR(SfxRectangleItem, 0); }
@@ -59,18 +59,18 @@ public:
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT nItemVersion) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16 nItemVersion) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
const Rectangle& GetValue() const { return aVal; }
void SetValue( const Rectangle& rNewVal ) {
DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" );
aVal = rNewVal;
}
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 );
};
#endif
diff --git a/svl/inc/svl/rngitem.hxx b/svl/inc/svl/rngitem.hxx
index 890c9d4438c0..320c358f5520 100644
--- a/svl/inc/svl/rngitem.hxx
+++ b/svl/inc/svl/rngitem.hxx
@@ -29,7 +29,7 @@
#ifndef NUMTYPE
-#define NUMTYPE USHORT
+#define NUMTYPE sal_uInt16
#define SfxXRangeItem SfxRangeItem
#define SfxXRangesItem SfxUShortRangesItem
#include <svl/rngitem.hxx>
@@ -38,7 +38,7 @@
#undef SfxXRangesItem
#ifndef _SFXITEMS_HXX
-#define NUMTYPE ULONG
+#define NUMTYPE sal_uLong
#define SfxXRangeItem SfxULongRangeItem
#define SfxXRangesItem SfxULongRangesItem
#include <svl/rngitem.hxx>
@@ -65,8 +65,8 @@ private:
public:
TYPEINFO();
SfxXRangeItem();
- SfxXRangeItem( USHORT nWID, NUMTYPE nFrom, NUMTYPE nTo );
- SfxXRangeItem( USHORT nWID, SvStream &rStream );
+ SfxXRangeItem( sal_uInt16 nWID, NUMTYPE nFrom, NUMTYPE nTo );
+ SfxXRangeItem( sal_uInt16 nWID, SvStream &rStream );
SfxXRangeItem( const SfxXRangeItem& rItem );
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -79,9 +79,9 @@ public:
inline NUMTYPE From() const { return nFrom; }
inline NUMTYPE& To() { return nTo; }
inline NUMTYPE To() const { return nTo; }
- inline BOOL HasRange() const { return nTo>nFrom; }
- virtual SfxPoolItem* Create( SvStream &, USHORT nVersion ) const;
- virtual SvStream& Store( SvStream &, USHORT nItemVersion ) const;
+ inline sal_Bool HasRange() const { return nTo>nFrom; }
+ virtual SfxPoolItem* Create( SvStream &, sal_uInt16 nVersion ) const;
+ virtual SvStream& Store( SvStream &, sal_uInt16 nItemVersion ) const;
};
// -----------------------------------------------------------------------
@@ -94,8 +94,8 @@ private:
public:
TYPEINFO();
SfxXRangesItem();
- SfxXRangesItem( USHORT nWID, const NUMTYPE *pRanges );
- SfxXRangesItem( USHORT nWID, SvStream &rStream );
+ SfxXRangesItem( sal_uInt16 nWID, const NUMTYPE *pRanges );
+ SfxXRangesItem( sal_uInt16 nWID, SvStream &rStream );
SfxXRangesItem( const SfxXRangesItem& rItem );
virtual ~SfxXRangesItem();
virtual int operator==( const SfxPoolItem& ) const;
@@ -106,8 +106,8 @@ public:
const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
inline const NUMTYPE* GetRanges() const { return _pRanges; }
- virtual SfxPoolItem* Create( SvStream &, USHORT nVersion ) const;
- virtual SvStream& Store( SvStream &, USHORT nItemVersion ) const;
+ virtual SfxPoolItem* Create( SvStream &, sal_uInt16 nVersion ) const;
+ virtual SvStream& Store( SvStream &, sal_uInt16 nItemVersion ) const;
};
#endif
diff --git a/svl/inc/svl/sfontitm.hxx b/svl/inc/svl/sfontitm.hxx
index e7a6ecb366d0..3ce183ecbead 100644
--- a/svl/inc/svl/sfontitm.hxx
+++ b/svl/inc/svl/sfontitm.hxx
@@ -62,13 +62,13 @@ class SfxFontItem: public SfxPoolItem
public:
TYPEINFO();
- inline SfxFontItem(USHORT nWhich);
+ inline SfxFontItem(sal_uInt16 nWhich);
virtual int operator ==(const SfxPoolItem & rItem) const;
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
- virtual SvStream & Store(SvStream & rStream, USHORT) const;
+ virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const
{ return new SfxFontItem(*this); }
@@ -142,7 +142,7 @@ public:
inline void setLanguage(LanguageType nTheLanguage);
};
-inline SfxFontItem::SfxFontItem(USHORT which):
+inline SfxFontItem::SfxFontItem(sal_uInt16 which):
SfxPoolItem(which),
m_nCharSet(RTL_TEXTENCODING_DONTKNOW),
m_nLanguage(LANGUAGE_DONTKNOW),
diff --git a/svl/inc/svl/slstitm.hxx b/svl/inc/svl/slstitm.hxx
index 0936524c298a..d3f0249c18ea 100644
--- a/svl/inc/svl/slstitm.hxx
+++ b/svl/inc/svl/slstitm.hxx
@@ -44,8 +44,8 @@ public:
TYPEINFO();
SfxStringListItem();
- SfxStringListItem( USHORT nWhich, const List* pList=NULL );
- SfxStringListItem( USHORT nWhich, SvStream& rStream );
+ SfxStringListItem( sal_uInt16 nWhich, const List* pList=NULL );
+ SfxStringListItem( sal_uInt16 nWhich, SvStream& rStream );
SfxStringListItem( const SfxStringListItem& rItem );
~SfxStringListItem();
@@ -72,13 +72,13 @@ public:
XubString &rText,
const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create( SvStream &, USHORT nVersion ) const;
- virtual SvStream& Store( SvStream &, USHORT nItemVersion ) const;
- void Sort( BOOL bAscending = TRUE, List* pParallelList = 0 );
+ virtual SfxPoolItem* Create( SvStream &, sal_uInt16 nVersion ) const;
+ virtual SvStream& Store( SvStream &, sal_uInt16 nItemVersion ) const;
+ void Sort( sal_Bool bAscending = sal_True, List* pParallelList = 0 );
- virtual BOOL PutValue ( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
+ virtual sal_Bool PutValue ( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 ) const;
};
#endif
diff --git a/svl/inc/svl/smplhint.hxx b/svl/inc/svl/smplhint.hxx
index cf705b41c5ae..9e3e867b1703 100644
--- a/svl/inc/svl/smplhint.hxx
+++ b/svl/inc/svl/smplhint.hxx
@@ -68,11 +68,11 @@
class SVL_DLLPUBLIC SfxSimpleHint: public SfxHint
{
private:
- ULONG nId;
+ sal_uLong nId;
public:
TYPEINFO();
- SfxSimpleHint( ULONG nId );
- ULONG GetId() const { return nId; }
+ SfxSimpleHint( sal_uLong nId );
+ sal_uLong GetId() const { return nId; }
};
//--------------------------------------------------------------------
@@ -84,14 +84,14 @@ public:
\
public: \
TYPEINFO(); \
- Name( USHORT nId, const Type& rObject ); \
+ Name( sal_uInt16 nId, const Type& rObject ); \
~Name(); \
const Type& GetObject() const { return aObj; } \
}
#define IMPL_OBJHINT(Name, Type) \
TYPEINIT1(Name, SfxSimpleHint); \
- Name::Name( USHORT nID, const Type& rObject ): \
+ Name::Name( sal_uInt16 nID, const Type& rObject ): \
SfxSimpleHint( nID ), aObj(rObject) \
{ } \
Name::~Name() {}
diff --git a/svl/inc/svl/srchitem.hxx b/svl/inc/svl/srchitem.hxx
index 3974a8f57b80..8053a204881a 100644
--- a/svl/inc/svl/srchitem.hxx
+++ b/svl/inc/svl/srchitem.hxx
@@ -89,8 +89,8 @@ public:
SvxSearchItem( const SvxSearchItem& rItem );
virtual ~SvxSearchItem();
- virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
- virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
virtual int operator == ( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
@@ -234,7 +234,7 @@ sal_Bool SvxSearchItem::IsLEVRelaxed() const
sal_uInt16 SvxSearchItem::GetLEVOther() const
{
- return (INT16) aSearchOpt.changedChars;
+ return (sal_Int16) aSearchOpt.changedChars;
}
void SvxSearchItem::SetLEVOther( sal_uInt16 nVal )
@@ -244,7 +244,7 @@ void SvxSearchItem::SetLEVOther( sal_uInt16 nVal )
sal_uInt16 SvxSearchItem::GetLEVShorter() const
{
- return (INT16) aSearchOpt.insertedChars;
+ return (sal_Int16) aSearchOpt.insertedChars;
}
void SvxSearchItem::SetLEVShorter( sal_uInt16 nVal )
@@ -254,7 +254,7 @@ void SvxSearchItem::SetLEVShorter( sal_uInt16 nVal )
sal_uInt16 SvxSearchItem::GetLEVLonger() const
{
- return (INT16) aSearchOpt.deletedChars;
+ return (sal_Int16) aSearchOpt.deletedChars;
}
void SvxSearchItem::SetLEVLonger( sal_uInt16 nVal )
diff --git a/svl/inc/svl/stritem.hxx b/svl/inc/svl/stritem.hxx
index 5604eb3de6ed..e7885f9065da 100644
--- a/svl/inc/svl/stritem.hxx
+++ b/svl/inc/svl/stritem.hxx
@@ -39,14 +39,14 @@ public:
SfxStringItem() {}
- SfxStringItem(USHORT which, const XubString & rValue):
+ SfxStringItem(sal_uInt16 which, const XubString & rValue):
CntUnencodedStringItem(which, rValue) {}
- SfxStringItem(USHORT nWhich, SvStream & rStream);
+ SfxStringItem(sal_uInt16 nWhich, SvStream & rStream);
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
- virtual SvStream & Store(SvStream & rStream, USHORT) const;
+ virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
};
diff --git a/svl/inc/svl/strmadpt.hxx b/svl/inc/svl/strmadpt.hxx
index 76ecf0223543..936e33071706 100644
--- a/svl/inc/svl/strmadpt.hxx
+++ b/svl/inc/svl/strmadpt.hxx
@@ -51,23 +51,23 @@ public:
rTheOutputStream):
m_xOutputStream(rTheOutputStream), m_nPosition(0) {}
- virtual ErrCode ReadAt(ULONG, void *, ULONG, ULONG *) const;
+ virtual ErrCode ReadAt(sal_uLong, void *, sal_uLong, sal_uLong *) const;
- virtual ErrCode WriteAt(ULONG nPos, const void * pBuffer, ULONG nCount,
- ULONG * pWritten);
+ virtual ErrCode WriteAt(sal_uLong nPos, const void * pBuffer, sal_uLong nCount,
+ sal_uLong * pWritten);
virtual ErrCode Flush() const;
- virtual ErrCode SetSize(ULONG);
+ virtual ErrCode SetSize(sal_uLong);
virtual ErrCode Stat(SvLockBytesStat * pStat, SvLockBytesStatFlag) const;
- virtual ErrCode FillAppend(const void * pBuffer, ULONG nCount,
- ULONG * pWritten);
+ virtual ErrCode FillAppend(const void * pBuffer, sal_uLong nCount,
+ sal_uLong * pWritten);
- virtual ULONG Tell() const;
+ virtual sal_uLong Tell() const;
- virtual ULONG Seek(ULONG);
+ virtual sal_uLong Seek(sal_uLong);
virtual void Terminate();
};
diff --git a/svl/inc/svl/style.hxx b/svl/inc/svl/style.hxx
index b3138309293f..5ae5cb8e673b 100644
--- a/svl/inc/svl/style.hxx
+++ b/svl/inc/svl/style.hxx
@@ -76,7 +76,7 @@ SfxSimpleHint(SFX_HINT_DYING) from:
SfxStyleSheetHint( SFX_STYLESHEET_CREATED, *p ) from:
SfxStyleSheetBasePool::Make( const String& rName,
- SfxStyleFamily eFam, USHORT mask, USHORT nPos)
+ SfxStyleFamily eFam, sal_uInt16 mask, sal_uInt16 nPos)
SfxStyleSheetHint( SFX_STYLESHEET_CHANGED, *pNew ) from:
SfxStyleSheetBasePool::Add( SfxStyleSheetBase& rSheet )
@@ -100,17 +100,17 @@ protected:
rtl::OUString maDisplayName;
String aHelpFile; // Name der Hilfedatei
SfxItemSet* pSet; // ItemSet
- USHORT nMask; // Flags
+ sal_uInt16 nMask; // Flags
- ULONG nHelpId; // Hilfe-ID
+ sal_uLong nHelpId; // Hilfe-ID
- BOOL bMySet; // TRUE: Set loeschen im dtor
+ sal_Bool bMySet; // sal_True: Set loeschen im dtor
SfxStyleSheetBase(); // do not use!
- SfxStyleSheetBase( const UniString&, SfxStyleSheetBasePool&, SfxStyleFamily eFam, USHORT mask );
+ SfxStyleSheetBase( const UniString&, SfxStyleSheetBasePool&, SfxStyleFamily eFam, sal_uInt16 mask );
SfxStyleSheetBase( const SfxStyleSheetBase& );
virtual ~SfxStyleSheetBase();
- virtual void Load( SvStream&, USHORT );
+ virtual void Load( SvStream&, sal_uInt16 );
virtual void Store( SvStream& );
public:
@@ -120,7 +120,7 @@ public:
virtual const UniString& GetName() const;
// sets the internal name of this style
- virtual BOOL SetName( const UniString& );
+ virtual sal_Bool SetName( const UniString& );
/** returns the display name of this style, it is used at the user interface.
If the display name is empty, this method returns the internal name. */
@@ -130,13 +130,13 @@ public:
virtual void SetDisplayName( const rtl::OUString& );
virtual const UniString& GetParent() const;
- virtual BOOL SetParent( const UniString& );
+ virtual sal_Bool SetParent( const UniString& );
virtual const UniString& GetFollow() const;
- virtual BOOL SetFollow( const UniString& );
- virtual BOOL HasFollowSupport() const; // Default TRUE
- virtual BOOL HasParentSupport() const; // Default TRUE
- virtual BOOL HasClearParentSupport() const; // Default FALSE
- virtual BOOL IsUsed() const; // Default TRUE
+ virtual sal_Bool SetFollow( const UniString& );
+ virtual sal_Bool HasFollowSupport() const; // Default sal_True
+ virtual sal_Bool HasParentSupport() const; // Default sal_True
+ virtual sal_Bool HasClearParentSupport() const; // Default sal_False
+ virtual sal_Bool IsUsed() const; // Default sal_True
// Default aus dem Itemset; entweder dem uebergebenen
// oder aus dem per GetItemSet() zurueckgelieferten Set
virtual UniString GetDescription();
@@ -144,16 +144,16 @@ public:
SfxStyleSheetBasePool& GetPool() { return rPool; }
SfxStyleFamily GetFamily() const { return nFamily; }
- USHORT GetMask() const { return nMask; }
- void SetMask( USHORT mask) { nMask = mask; }
- BOOL IsUserDefined() const
- { return BOOL( ( nMask & SFXSTYLEBIT_USERDEF) != 0 ); }
+ sal_uInt16 GetMask() const { return nMask; }
+ void SetMask( sal_uInt16 mask) { nMask = mask; }
+ sal_Bool IsUserDefined() const
+ { return sal_Bool( ( nMask & SFXSTYLEBIT_USERDEF) != 0 ); }
- virtual ULONG GetHelpId( String& rFile );
- virtual void SetHelpId( const String& r, ULONG nId );
+ virtual sal_uLong GetHelpId( String& rFile );
+ virtual void SetHelpId( const String& r, sal_uLong nId );
virtual SfxItemSet& GetItemSet();
- virtual USHORT GetVersion() const;
+ virtual sal_uInt16 GetVersion() const;
};
//=========================================================================
@@ -173,11 +173,11 @@ class SVL_DLLPUBLIC SfxStyleSheetIterator
{
public:
SfxStyleSheetIterator(SfxStyleSheetBasePool *pBase,
- SfxStyleFamily eFam, USHORT n=0xFFFF );
- virtual USHORT GetSearchMask() const;
+ SfxStyleFamily eFam, sal_uInt16 n=0xFFFF );
+ virtual sal_uInt16 GetSearchMask() const;
virtual SfxStyleFamily GetSearchFamily() const;
- virtual USHORT Count();
- virtual SfxStyleSheetBase *operator[](USHORT nIdx);
+ virtual sal_uInt16 Count();
+ virtual SfxStyleSheetBase *operator[](sal_uInt16 nIdx);
virtual SfxStyleSheetBase* First();
virtual SfxStyleSheetBase* Next();
virtual SfxStyleSheetBase* Find(const UniString& rStr);
@@ -187,18 +187,18 @@ protected:
SfxStyleSheetBasePool* pBasePool;
SfxStyleFamily nSearchFamily;
- USHORT nMask;
- BOOL SearchUsed() const { return bSearchUsed; }
+ sal_uInt16 nMask;
+ sal_Bool SearchUsed() const { return bSearchUsed; }
private:
- USHORT GetPos(){return nAktPosition;}
- SVL_DLLPRIVATE BOOL IsTrivialSearch();
- SVL_DLLPRIVATE BOOL DoesStyleMatch(SfxStyleSheetBase *pStyle);
+ sal_uInt16 GetPos(){return nAktPosition;}
+ SVL_DLLPRIVATE sal_Bool IsTrivialSearch();
+ SVL_DLLPRIVATE sal_Bool DoesStyleMatch(SfxStyleSheetBase *pStyle);
void* pImp;
SfxStyleSheetBase* pAktStyle;
- USHORT nAktPosition;
- BOOL bSearchUsed;
+ sal_uInt16 nAktPosition;
+ sal_Bool bSearchUsed;
friend class SfxStyleSheetBasePool;
};
@@ -215,18 +215,18 @@ friend class SfxStyleSheetBase;
SfxStyleSheetBasePool_Impl *pImp;
private:
- SVL_DLLPRIVATE BOOL Load1_Impl( SvStream& );
+ SVL_DLLPRIVATE sal_Bool Load1_Impl( SvStream& );
SVL_DLLPRIVATE SfxStyleSheetIterator& GetIterator_Impl();
protected:
String aAppName;
SfxItemPool& rPool;
SfxStyles aStyles;
SfxStyleFamily nSearchFamily;
- USHORT nMask;
+ sal_uInt16 nMask;
SfxStyleSheetBase& Add( SfxStyleSheetBase& );
- void ChangeParent( const UniString&, const UniString&, BOOL bVirtual = TRUE );
- virtual SfxStyleSheetBase* Create( const UniString&, SfxStyleFamily, USHORT );
+ void ChangeParent( const UniString&, const UniString&, sal_Bool bVirtual = sal_True );
+ virtual SfxStyleSheetBase* Create( const UniString&, SfxStyleFamily, sal_uInt16 );
virtual SfxStyleSheetBase* Create( const SfxStyleSheetBase& );
~SfxStyleSheetBasePool();
@@ -242,14 +242,14 @@ public:
SfxItemPool& GetPool();
const SfxItemPool& GetPool() const;
- virtual SfxStyleSheetIterator* CreateIterator(SfxStyleFamily, USHORT nMask);
- virtual USHORT Count();
- virtual SfxStyleSheetBase* operator[](USHORT nIdx);
+ virtual SfxStyleSheetIterator* CreateIterator(SfxStyleFamily, sal_uInt16 nMask);
+ virtual sal_uInt16 Count();
+ virtual SfxStyleSheetBase* operator[](sal_uInt16 nIdx);
virtual SfxStyleSheetBase& Make(const UniString&,
SfxStyleFamily eFam,
- USHORT nMask = 0xffff ,
- USHORT nPos = 0xffff);
+ sal_uInt16 nMask = 0xffff ,
+ sal_uInt16 nPos = 0xffff);
virtual void Replace(
SfxStyleSheetBase& rSource, SfxStyleSheetBase& rTarget );
@@ -265,21 +265,21 @@ public:
const SfxStyles& GetStyles();
virtual SfxStyleSheetBase* First();
virtual SfxStyleSheetBase* Next();
- virtual SfxStyleSheetBase* Find( const UniString&, SfxStyleFamily eFam, USHORT n=0xFFFF );
+ virtual SfxStyleSheetBase* Find( const UniString&, SfxStyleFamily eFam, sal_uInt16 n=0xFFFF );
- virtual BOOL SetParent(SfxStyleFamily eFam,
+ virtual sal_Bool SetParent(SfxStyleFamily eFam,
const UniString &rStyle,
const UniString &rParent);
SfxStyleSheetBase* Find(const UniString& rStr)
{ return Find(rStr, nSearchFamily, nMask); }
- void SetSearchMask(SfxStyleFamily eFam, USHORT n=0xFFFF );
- USHORT GetSearchMask() const;
+ void SetSearchMask(SfxStyleFamily eFam, sal_uInt16 n=0xFFFF );
+ sal_uInt16 GetSearchMask() const;
SfxStyleFamily GetSearchFamily() const { return nSearchFamily; }
- BOOL Load( SvStream& );
- BOOL Store( SvStream&, BOOL bUsed = TRUE );
+ sal_Bool Load( SvStream& );
+ sal_Bool Store( SvStream&, sal_Bool bUsed = sal_True );
};
//=========================================================================
@@ -290,11 +290,11 @@ class SVL_DLLPUBLIC SfxStyleSheet: public SfxStyleSheetBase,
public:
TYPEINFO();
- SfxStyleSheet( const UniString&, const SfxStyleSheetBasePool&, SfxStyleFamily, USHORT );
+ SfxStyleSheet( const UniString&, const SfxStyleSheetBasePool&, SfxStyleFamily, sal_uInt16 );
SfxStyleSheet( const SfxStyleSheet& );
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
- virtual BOOL SetParent( const UniString& );
+ virtual sal_Bool SetParent( const UniString& );
protected:
SfxStyleSheet(); // do not use!
@@ -307,13 +307,13 @@ class SVL_DLLPUBLIC SfxStyleSheetPool: public SfxStyleSheetBasePool
{
protected:
using SfxStyleSheetBasePool::Create;
- virtual SfxStyleSheetBase* Create(const UniString&, SfxStyleFamily, USHORT mask);
+ virtual SfxStyleSheetBase* Create(const UniString&, SfxStyleFamily, sal_uInt16 mask);
virtual SfxStyleSheetBase* Create(const SfxStyleSheet &);
public:
SfxStyleSheetPool( SfxItemPool const& );
-// virtual BOOL CopyTo(SfxStyleSheetPool &rDest, const String &rSourceName);
+// virtual sal_Bool CopyTo(SfxStyleSheetPool &rDest, const String &rSourceName);
};
//=========================================================================
@@ -333,13 +333,13 @@ public:
class SVL_DLLPUBLIC SfxStyleSheetPoolHint : public SfxHint
{
- USHORT nHint;
+ sal_uInt16 nHint;
public:
TYPEINFO();
- SfxStyleSheetPoolHint(USHORT nArgHint) : nHint(nArgHint){}
- USHORT GetHint() const
+ SfxStyleSheetPoolHint(sal_uInt16 nArgHint) : nHint(nArgHint){}
+ sal_uInt16 GetHint() const
{ return nHint; }
};
@@ -348,16 +348,16 @@ public:
class SVL_DLLPUBLIC SfxStyleSheetHint: public SfxHint
{
SfxStyleSheetBase* pStyleSh;
- USHORT nHint;
+ sal_uInt16 nHint;
public:
TYPEINFO();
- SfxStyleSheetHint( USHORT );
- SfxStyleSheetHint( USHORT, SfxStyleSheetBase& );
+ SfxStyleSheetHint( sal_uInt16 );
+ SfxStyleSheetHint( sal_uInt16, SfxStyleSheetBase& );
SfxStyleSheetBase* GetStyleSheet() const
{ return pStyleSh; }
- USHORT GetHint() const
+ sal_uInt16 GetHint() const
{ return nHint; }
};
@@ -369,9 +369,9 @@ public:
TYPEINFO();
SfxStyleSheetHintExtended(
- USHORT, const String& rOld );
+ sal_uInt16, const String& rOld );
SfxStyleSheetHintExtended(
- USHORT, const String& rOld,
+ sal_uInt16, const String& rOld,
SfxStyleSheetBase& );
const String& GetOldName() { return aName; }
};
@@ -379,7 +379,7 @@ public:
class SVL_DLLPUBLIC SfxUnoStyleSheet : public ::cppu::ImplInheritanceHelper2< SfxStyleSheet, ::com::sun::star::style::XStyle, ::com::sun::star::lang::XUnoTunnel >
{
public:
- SfxUnoStyleSheet( const UniString& _rName, const SfxStyleSheetBasePool& _rPool, SfxStyleFamily _eFamily, USHORT _nMaske );
+ SfxUnoStyleSheet( const UniString& _rName, const SfxStyleSheetBasePool& _rPool, SfxStyleFamily _eFamily, sal_uInt16 _nMaske );
SfxUnoStyleSheet( const SfxStyleSheet& _rSheet );
static SfxUnoStyleSheet* getUnoStyleSheet( const ::com::sun::star::uno::Reference< ::com::sun::star::style::XStyle >& xStyle );
diff --git a/svl/inc/svl/svarray.hxx b/svl/inc/svl/svarray.hxx
index d48998247eeb..19ee3a9e5077 100644
--- a/svl/inc/svl/svarray.hxx
+++ b/svl/inc/svl/svarray.hxx
@@ -118,15 +118,15 @@ inline void operator delete( void*, DummyType* ) {}
#if defined(PRODUCT)
#define _SVVARARR_DEF_GET_OP_INLINE( nm, ArrElem ) \
-ArrElem& operator[](USHORT nP) const { return *(pData+nP); }\
+ArrElem& operator[](sal_uInt16 nP) const { return *(pData+nP); }\
\
-void Insert( const nm * pI, USHORT nP,\
- USHORT nS = 0, USHORT nE = USHRT_MAX )\
+void Insert( const nm * pI, sal_uInt16 nP,\
+ sal_uInt16 nS = 0, sal_uInt16 nE = USHRT_MAX )\
{\
if( USHRT_MAX == nE ) \
nE = pI->nA; \
if( nS < nE ) \
- Insert( (const ArrElem*)pI->pData+nS, (USHORT)nE-nS, nP );\
+ Insert( (const ArrElem*)pI->pData+nS, (sal_uInt16)nE-nS, nP );\
}
#define _SVVARARR_IMPL_GET_OP_INLINE( nm, ArrElem )
@@ -134,64 +134,64 @@ void Insert( const nm * pI, USHORT nP,\
#else
#define _SVVARARR_DEF_GET_OP_INLINE( nm,ArrElem )\
-ArrElem& operator[](USHORT nP) const;\
-void Insert( const nm *pI, USHORT nP,\
- USHORT nS = 0, USHORT nE = USHRT_MAX );
+ArrElem& operator[](sal_uInt16 nP) const;\
+void Insert( const nm *pI, sal_uInt16 nP,\
+ sal_uInt16 nS = 0, sal_uInt16 nE = USHRT_MAX );
#define _SVVARARR_IMPL_GET_OP_INLINE( nm, ArrElem )\
-ArrElem& nm::operator[](USHORT nP) const\
+ArrElem& nm::operator[](sal_uInt16 nP) const\
{\
DBG_ASSERT( pData && nP < nA,"Op[]");\
return *(pData+nP);\
}\
-void nm::Insert( const nm *pI, USHORT nP, USHORT nStt, USHORT nE)\
+void nm::Insert( const nm *pI, sal_uInt16 nP, sal_uInt16 nStt, sal_uInt16 nE)\
{\
DBG_ASSERT(nP<=nA,"Ins,Ar[Start.End]");\
if( USHRT_MAX == nE ) \
nE = pI->nA; \
if( nStt < nE ) \
- Insert( (const ArrElem*)pI->pData+nStt, (USHORT)nE-nStt, nP );\
+ Insert( (const ArrElem*)pI->pData+nStt, (sal_uInt16)nE-nStt, nP );\
}
#endif
#define _SV_DECL_VARARR_GEN(nm, AE, IS, GS, AERef, vis )\
-typedef BOOL (*FnForEach_##nm)( const AERef, void* );\
+typedef sal_Bool (*FnForEach_##nm)( const AERef, void* );\
class vis nm\
{\
protected:\
AE *pData;\
- USHORT nFree;\
- USHORT nA;\
+ sal_uInt16 nFree;\
+ sal_uInt16 nA;\
\
void _resize(size_t n);\
\
public:\
- nm( USHORT= IS, BYTE= GS );\
+ nm( sal_uInt16= IS, sal_uInt8= GS );\
~nm() { rtl_freeMemory( pData ); }\
\
_SVVARARR_DEF_GET_OP_INLINE(nm, AE )\
- AERef GetObject(USHORT nP) const { return (*this)[nP]; } \
+ AERef GetObject(sal_uInt16 nP) const { return (*this)[nP]; } \
\
- void Insert( const AERef aE, USHORT nP );\
- void Insert( const AE *pE, USHORT nL, USHORT nP );\
- void Remove( USHORT nP, USHORT nL = 1 );\
- void Replace( const AERef aE, USHORT nP );\
- void Replace( const AE *pE, USHORT nL, USHORT nP );\
- USHORT Count() const { return nA; }\
+ void Insert( const AERef aE, sal_uInt16 nP );\
+ void Insert( const AE *pE, sal_uInt16 nL, sal_uInt16 nP );\
+ void Remove( sal_uInt16 nP, sal_uInt16 nL = 1 );\
+ void Replace( const AERef aE, sal_uInt16 nP );\
+ void Replace( const AE *pE, sal_uInt16 nL, sal_uInt16 nP );\
+ sal_uInt16 Count() const { return nA; }\
const AE* GetData() const { return (const AE*)pData; }\
\
void ForEach( CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( 0, nA, fnForEach, pArgs );\
}\
- void ForEach( USHORT nS, USHORT nE, \
+ void ForEach( sal_uInt16 nS, sal_uInt16 nE, \
CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( nS, nE, fnForEach, pArgs );\
}\
\
- void _ForEach( USHORT nStt, USHORT nE, \
+ void _ForEach( sal_uInt16 nStt, sal_uInt16 nE, \
CONCAT( FnForEach_, nm ) fnCall, void* pArgs = 0 );\
\
@@ -212,7 +212,7 @@ SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE &, )
SV_DECL_VARARR_GEN(nm, AE, IS, GS, AE &, vis )
#define SV_IMPL_VARARR_GEN( nm, AE, AERef )\
-nm::nm( USHORT nInit, BYTE )\
+nm::nm( sal_uInt16 nInit, sal_uInt8 )\
: pData (0),\
nFree (nInit),\
nA (0)\
@@ -226,7 +226,7 @@ nm::nm( USHORT nInit, BYTE )\
\
void nm::_resize (size_t n)\
{\
- USHORT nL = ((n < USHRT_MAX) ? USHORT(n) : USHRT_MAX);\
+ sal_uInt16 nL = ((n < USHRT_MAX) ? sal_uInt16(n) : USHRT_MAX);\
AE* pE = (AE*)(rtl_reallocateMemory (pData, sizeof(AE) * nL));\
if ((pE != 0) || (nL == 0))\
{\
@@ -235,7 +235,7 @@ void nm::_resize (size_t n)\
}\
}\
\
-void nm::Insert( const AERef aE, USHORT nP )\
+void nm::Insert( const AERef aE, sal_uInt16 nP )\
{\
DBG_ASSERT(nP <= nA && nA < USHRT_MAX, "Ins 1");\
if (nFree < 1)\
@@ -246,7 +246,7 @@ void nm::Insert( const AERef aE, USHORT nP )\
++nA; --nFree;\
}\
\
-void nm::Insert( const AE* pE, USHORT nL, USHORT nP )\
+void nm::Insert( const AE* pE, sal_uInt16 nL, sal_uInt16 nP )\
{\
DBG_ASSERT(nP<=nA && ((long)nA+nL)<USHRT_MAX,"Ins n");\
if (nFree < nL)\
@@ -258,13 +258,13 @@ void nm::Insert( const AE* pE, USHORT nL, USHORT nP )\
nA = nA + nL; nFree = nFree - nL;\
}\
\
-void nm::Replace( const AERef aE, USHORT nP )\
+void nm::Replace( const AERef aE, sal_uInt16 nP )\
{\
if( nP < nA )\
*(pData+nP) = (AE&)aE;\
}\
\
-void nm::Replace( const AE *pE, USHORT nL, USHORT nP )\
+void nm::Replace( const AE *pE, sal_uInt16 nL, sal_uInt16 nP )\
{\
if( pE && nP < nA )\
{\
@@ -278,7 +278,7 @@ void nm::Replace( const AE *pE, USHORT nL, USHORT nP )\
}\
else \
{\
- USHORT nTmpLen = nA + nFree - nP; \
+ sal_uInt16 nTmpLen = nA + nFree - nP; \
memcpy( pData + nP, pE, nTmpLen * sizeof( AE ));\
nA = nA + nFree; \
nFree = 0; \
@@ -287,7 +287,7 @@ void nm::Replace( const AE *pE, USHORT nL, USHORT nP )\
}\
}\
\
-void nm::Remove( USHORT nP, USHORT nL )\
+void nm::Remove( sal_uInt16 nP, sal_uInt16 nL )\
{\
if( !nL )\
return;\
@@ -299,7 +299,7 @@ void nm::Remove( USHORT nP, USHORT nL )\
_resize (nA);\
}\
\
-void nm::_ForEach( USHORT nStt, USHORT nE, \
+void nm::_ForEach( sal_uInt16 nStt, sal_uInt16 nE, \
CONCAT( FnForEach_, nm ) fnCall, void* pArgs )\
{\
if( nStt >= nE || nE > nA )\
@@ -315,36 +315,36 @@ SV_IMPL_VARARR_GEN( nm, AE, AE & )
#define _SV_DECL_PTRARR_DEF_GEN( nm, AE, IS, GS, AERef, vis )\
_SV_DECL_VARARR_GEN( nm, AE, IS, GS, AERef, vis)\
-USHORT GetPos( const AERef aE ) const;\
+sal_uInt16 GetPos( const AERef aE ) const;\
};
#define _SV_DECL_PTRARR_DEF( nm, AE, IS, GS, vis )\
_SV_DECL_PTRARR_DEF_GEN( nm, AE, IS, GS, AE &, vis )
#define SV_DECL_PTRARR_GEN(nm, AE, IS, GS, Base, AERef, VPRef, vis )\
-typedef BOOL (*FnForEach_##nm)( const AERef, void* );\
+typedef sal_Bool (*FnForEach_##nm)( const AERef, void* );\
class vis nm: public Base \
{\
public:\
- nm( USHORT nIni=IS, BYTE nG=GS )\
+ nm( sal_uInt16 nIni=IS, sal_uInt8 nG=GS )\
: Base(nIni,nG) {}\
- void Insert( const nm *pI, USHORT nP, \
- USHORT nS = 0, USHORT nE = USHRT_MAX ) {\
+ void Insert( const nm *pI, sal_uInt16 nP, \
+ sal_uInt16 nS = 0, sal_uInt16 nE = USHRT_MAX ) {\
Base::Insert((const Base*)pI, nP, nS, nE);\
}\
- void Insert( const AERef aE, USHORT nP ) {\
+ void Insert( const AERef aE, sal_uInt16 nP ) {\
Base::Insert( (const VPRef )aE, nP );\
}\
- void Insert( const AE *pE, USHORT nL, USHORT nP ) {\
+ void Insert( const AE *pE, sal_uInt16 nL, sal_uInt16 nP ) {\
Base::Insert( (const VoidPtr*)pE, nL, nP );\
}\
- void Replace( const AERef aE, USHORT nP ) {\
+ void Replace( const AERef aE, sal_uInt16 nP ) {\
Base::Replace( (const VPRef)aE, nP );\
}\
- void Replace( const AE *pE, USHORT nL, USHORT nP ) {\
+ void Replace( const AE *pE, sal_uInt16 nL, sal_uInt16 nP ) {\
Base::Replace( (const VoidPtr*)pE, nL, nP );\
}\
- void Remove( USHORT nP, USHORT nL = 1) {\
+ void Remove( sal_uInt16 nP, sal_uInt16 nL = 1) {\
Base::Remove(nP,nL);\
}\
const AE* GetData() const {\
@@ -354,20 +354,20 @@ public:\
{\
_ForEach( 0, nA, (FnForEach_##Base)fnForEach, pArgs );\
}\
- void ForEach( USHORT nS, USHORT nE, \
+ void ForEach( sal_uInt16 nS, sal_uInt16 nE, \
CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( nS, nE, (FnForEach_##Base)fnForEach, pArgs );\
}\
- AE operator[]( USHORT nP )const { \
+ AE operator[]( sal_uInt16 nP )const { \
return (AE)Base::operator[](nP); }\
- AE GetObject(USHORT nP) const { \
+ AE GetObject(sal_uInt16 nP) const { \
return (AE)Base::GetObject(nP); }\
\
- USHORT GetPos( const AERef aE ) const { \
+ sal_uInt16 GetPos( const AERef aE ) const { \
return Base::GetPos((const VPRef)aE);\
}\
- void DeleteAndDestroy( USHORT nP, USHORT nL=1 );\
+ void DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL=1 );\
private:\
nm( const nm& );\
nm& operator=( const nm& );\
@@ -380,30 +380,30 @@ SV_DECL_PTRARR_GEN(nm, AE, IS, GS, SvPtrarr, AE &, VoidPtr &, )
SV_DECL_PTRARR_GEN(nm, AE, IS, GS, SvPtrarr, AE &, VoidPtr &, vis )
#define SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, GS, Base, AERef, VPRef, vis )\
-typedef BOOL (*FnForEach_##nm)( const AERef, void* );\
+typedef sal_Bool (*FnForEach_##nm)( const AERef, void* );\
class vis nm: public Base \
{\
public:\
- nm( USHORT nIni=IS, BYTE nG=GS )\
+ nm( sal_uInt16 nIni=IS, sal_uInt8 nG=GS )\
: Base(nIni,nG) {}\
~nm() { DeleteAndDestroy( 0, Count() ); }\
- void Insert( const nm *pI, USHORT nP, \
- USHORT nS = 0, USHORT nE = USHRT_MAX ) {\
+ void Insert( const nm *pI, sal_uInt16 nP, \
+ sal_uInt16 nS = 0, sal_uInt16 nE = USHRT_MAX ) {\
Base::Insert((const Base*)pI, nP, nS, nE);\
}\
- void Insert( const AERef aE, USHORT nP ) {\
+ void Insert( const AERef aE, sal_uInt16 nP ) {\
Base::Insert((const VPRef)aE, nP );\
}\
- void Insert( const AE *pE, USHORT nL, USHORT nP ) {\
+ void Insert( const AE *pE, sal_uInt16 nL, sal_uInt16 nP ) {\
Base::Insert( (const VoidPtr *)pE, nL, nP );\
}\
- void Replace( const AERef aE, USHORT nP ) {\
+ void Replace( const AERef aE, sal_uInt16 nP ) {\
Base::Replace( (const VPRef)aE, nP );\
}\
- void Replace( const AE *pE, USHORT nL, USHORT nP ) {\
+ void Replace( const AE *pE, sal_uInt16 nL, sal_uInt16 nP ) {\
Base::Replace( (const VoidPtr*)pE, nL, nP );\
}\
- void Remove( USHORT nP, USHORT nL = 1) {\
+ void Remove( sal_uInt16 nP, sal_uInt16 nL = 1) {\
Base::Remove(nP,nL);\
}\
const AE* GetData() const {\
@@ -413,20 +413,20 @@ public:\
{\
_ForEach( 0, nA, (FnForEach_##Base)fnForEach, pArgs );\
}\
- void ForEach( USHORT nS, USHORT nE, \
+ void ForEach( sal_uInt16 nS, sal_uInt16 nE, \
CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( nS, nE, (FnForEach_##Base)fnForEach, pArgs );\
}\
- AE operator[]( USHORT nP )const { \
+ AE operator[]( sal_uInt16 nP )const { \
return (AE)Base::operator[](nP); }\
- AE GetObject( USHORT nP )const { \
+ AE GetObject( sal_uInt16 nP )const { \
return (AE)Base::GetObject(nP); }\
\
- USHORT GetPos( const AERef aE ) const { \
+ sal_uInt16 GetPos( const AERef aE ) const { \
return Base::GetPos((const VPRef)aE);\
} \
- void DeleteAndDestroy( USHORT nP, USHORT nL=1 );\
+ void DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL=1 );\
private:\
nm( const nm& );\
nm& operator=( const nm& );\
@@ -439,11 +439,11 @@ SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, GS, SvPtrarr, AE &, VoidPtr &, )
SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, GS, SvPtrarr, AE &, VoidPtr &, vis)
#define SV_IMPL_PTRARR_GEN(nm, AE, Base)\
-void nm::DeleteAndDestroy( USHORT nP, USHORT nL )\
+void nm::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL )\
{ \
if( nL ) {\
DBG_ASSERT( nP < nA && nP + nL <= nA,"Del");\
- for( USHORT n=nP; n < nP + nL; n++ ) \
+ for( sal_uInt16 n=nP; n < nP + nL; n++ ) \
delete *((AE*)pData+n); \
Base::Remove( nP, nL ); \
} \
@@ -464,27 +464,27 @@ _SV_DECL_PTRARR_DEF( SvPtrarr, VoidPtr, 0, 1, SVL_DLLPUBLIC )
#endif
#define _SORT_CLASS_DEF(nm, AE, IS, GS, vis)\
-typedef BOOL (*FnForEach_##nm)( const AE&, void* );\
+typedef sal_Bool (*FnForEach_##nm)( const AE&, void* );\
class vis nm : __MWERKS__PRIVATE nm##_SAR \
{\
public:\
- nm(USHORT nSize = IS, BYTE nG = GS)\
+ nm(sal_uInt16 nSize = IS, sal_uInt8 nG = GS)\
: nm##_SAR(nSize,nG) {}\
- void Insert( const nm *pI, USHORT nS=0, USHORT nE=USHRT_MAX );\
- BOOL Insert( const AE& aE );\
- BOOL Insert( const AE& aE, USHORT& rP );\
- void Insert( const AE *pE, USHORT nL );\
- void Remove( USHORT nP, USHORT nL = 1 );\
- void Remove( const AE& aE, USHORT nL = 1 );\
- USHORT Count() const { return nm##_SAR::Count(); }\
+ void Insert( const nm *pI, sal_uInt16 nS=0, sal_uInt16 nE=USHRT_MAX );\
+ sal_Bool Insert( const AE& aE );\
+ sal_Bool Insert( const AE& aE, sal_uInt16& rP );\
+ void Insert( const AE *pE, sal_uInt16 nL );\
+ void Remove( sal_uInt16 nP, sal_uInt16 nL = 1 );\
+ void Remove( const AE& aE, sal_uInt16 nL = 1 );\
+ sal_uInt16 Count() const { return nm##_SAR::Count(); }\
const AE* GetData() const { return (const AE*)pData; }\
\
/* Das Ende stehe im DECL-Makro !!! */
#define _SV_SEEK_PTR(nm,AE)\
-BOOL nm::Seek_Entry( const AE aE, USHORT* pP ) const\
+sal_Bool nm::Seek_Entry( const AE aE, sal_uInt16* pP ) const\
{\
- register USHORT nO = nm##_SAR::Count(),\
+ register sal_uInt16 nO = nm##_SAR::Count(),\
nM, \
nU = 0;\
if( nO > 0 )\
@@ -497,27 +497,27 @@ BOOL nm::Seek_Entry( const AE aE, USHORT* pP ) const\
if( (long)*(pData + nM) == rCmp )\
{\
if( pP ) *pP = nM;\
- return TRUE;\
+ return sal_True;\
}\
else if( (long)*(pData+ nM) < (long)aE )\
nU = nM + 1;\
else if( nM == 0 )\
{\
if( pP ) *pP = nU;\
- return FALSE;\
+ return sal_False;\
}\
else\
nO = nM - 1;\
}\
}\
if( pP ) *pP = nU;\
- return FALSE;\
+ return sal_False;\
}
#define _SV_SEEK_PTR_TO_OBJECT( nm,AE )\
-BOOL nm::Seek_Entry( const AE aE, USHORT* pP ) const\
+sal_Bool nm::Seek_Entry( const AE aE, sal_uInt16* pP ) const\
{\
- register USHORT nO = nm##_SAR::Count(),\
+ register sal_uInt16 nO = nm##_SAR::Count(),\
nM, \
nU = 0;\
if( nO > 0 )\
@@ -529,27 +529,27 @@ BOOL nm::Seek_Entry( const AE aE, USHORT* pP ) const\
if( *(*((AE*)pData + nM)) == *(aE) )\
{\
if( pP ) *pP = nM;\
- return TRUE;\
+ return sal_True;\
}\
else if( *(*((AE*)pData + nM)) < *(aE) )\
nU = nM + 1;\
else if( nM == 0 )\
{\
if( pP ) *pP = nU;\
- return FALSE;\
+ return sal_False;\
}\
else\
nO = nM - 1;\
}\
}\
if( pP ) *pP = nU;\
- return FALSE;\
+ return sal_False;\
}
#define _SV_SEEK_OBJECT( nm,AE )\
-BOOL nm::Seek_Entry( const AE & aE, USHORT* pP ) const\
+sal_Bool nm::Seek_Entry( const AE & aE, sal_uInt16* pP ) const\
{\
- register USHORT nO = nm##_SAR::Count(),\
+ register sal_uInt16 nO = nm##_SAR::Count(),\
nM, \
nU = 0;\
if( nO > 0 )\
@@ -561,29 +561,29 @@ BOOL nm::Seek_Entry( const AE & aE, USHORT* pP ) const\
if( *(pData + nM) == aE )\
{\
if( pP ) *pP = nM;\
- return TRUE;\
+ return sal_True;\
}\
else if( *(pData + nM) < aE )\
nU = nM + 1;\
else if( nM == 0 )\
{\
if( pP ) *pP = nU;\
- return FALSE;\
+ return sal_False;\
}\
else\
nO = nM - 1;\
}\
}\
if( pP ) *pP = nU;\
- return FALSE;\
+ return sal_False;\
}
#define _SV_IMPL_SORTAR_ALG(nm, AE)\
-void nm::Insert( const nm * pI, USHORT nS, USHORT nE )\
+void nm::Insert( const nm * pI, sal_uInt16 nS, sal_uInt16 nE )\
{\
if( USHRT_MAX == nE )\
nE = pI->Count();\
- USHORT nP;\
+ sal_uInt16 nP;\
const AE * pIArr = pI->GetData();\
for( ; nS < nE; ++nS )\
{\
@@ -597,39 +597,39 @@ void nm::Insert( const nm * pI, USHORT nS, USHORT nE )\
}\
}\
\
-BOOL nm::Insert( const AE & aE )\
+sal_Bool nm::Insert( const AE & aE )\
{\
- USHORT nP;\
- BOOL bExist;\
+ sal_uInt16 nP;\
+ sal_Bool bExist;\
bExist = Seek_Entry( aE, &nP );\
if( ! bExist )\
nm##_SAR::Insert( aE, nP );\
return !bExist;\
}\
-BOOL nm::Insert( const AE & aE, USHORT& rP )\
+sal_Bool nm::Insert( const AE & aE, sal_uInt16& rP )\
{\
- BOOL bExist;\
+ sal_Bool bExist;\
bExist = Seek_Entry( aE, &rP );\
if( ! bExist )\
nm##_SAR::Insert( aE, rP );\
return !bExist;\
}\
-void nm::Insert( const AE* pE, USHORT nL)\
+void nm::Insert( const AE* pE, sal_uInt16 nL)\
{\
- USHORT nP;\
- for( USHORT n = 0; n < nL; ++n )\
+ sal_uInt16 nP;\
+ for( sal_uInt16 n = 0; n < nL; ++n )\
if( ! Seek_Entry( *(pE+n), &nP ))\
nm##_SAR::Insert( *(pE+n), nP );\
}\
-void nm::Remove( USHORT nP, USHORT nL )\
+void nm::Remove( sal_uInt16 nP, sal_uInt16 nL )\
{\
if( nL )\
nm##_SAR::Remove( nP, nL);\
}\
\
-void nm::Remove( const AE &aE, USHORT nL )\
+void nm::Remove( const AE &aE, sal_uInt16 nL )\
{\
- USHORT nP;\
+ sal_uInt16 nP;\
if( nL && Seek_Entry( aE, &nP ) ) \
nm##_SAR::Remove( nP, nL);\
}\
@@ -637,20 +637,20 @@ void nm::Remove( const AE &aE, USHORT nL )\
#if defined(TCPP)
#define _SORTARR_BLC_CASTS(nm, AE )\
- BOOL Insert( AE &aE ) {\
+ sal_Bool Insert( AE &aE ) {\
return Insert( (const AE&)aE );\
}\
- USHORT GetPos( AE& aE ) const { \
+ sal_uInt16 GetPos( AE& aE ) const { \
return SvPtrarr::GetPos((const VoidPtr&)aE);\
}\
- void Remove( AE& aE, USHORT nL = 1 ) { \
+ void Remove( AE& aE, sal_uInt16 nL = 1 ) { \
Remove( (const AE&) aE, nL );\
}
#else
#define _SORTARR_BLC_CASTS(nm, AE )\
- USHORT GetPos( const AE& aE ) const { \
+ sal_uInt16 GetPos( const AE& aE ) const { \
return SvPtrarr::GetPos((const VoidPtr&)aE);\
}
@@ -659,23 +659,23 @@ void nm::Remove( const AE &aE, USHORT nL )\
#define _SV_DECL_PTRARR_SORT_ALG(nm, AE, IS, GS, vis)\
SV_DECL_PTRARR_VISIBILITY(nm##_SAR, AE, IS, GS, vis)\
_SORT_CLASS_DEF(nm, AE, IS, GS, vis)\
- AE operator[](USHORT nP) const {\
+ AE operator[](sal_uInt16 nP) const {\
return nm##_SAR::operator[]( nP );\
}\
- AE GetObject(USHORT nP) const {\
+ AE GetObject(sal_uInt16 nP) const {\
return nm##_SAR::GetObject( nP );\
}\
- BOOL Seek_Entry( const AE aE, USHORT* pP = 0 ) const;\
+ sal_Bool Seek_Entry( const AE aE, sal_uInt16* pP = 0 ) const;\
void ForEach( CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( 0, nA, (FnForEach_SvPtrarr)fnForEach, pArgs );\
}\
- void ForEach( USHORT nS, USHORT nE, \
+ void ForEach( sal_uInt16 nS, sal_uInt16 nE, \
CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( nS, nE, (FnForEach_SvPtrarr)fnForEach, pArgs );\
}\
- void DeleteAndDestroy( USHORT nP, USHORT nL=1 ); \
+ void DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL=1 ); \
_SORTARR_BLC_CASTS(nm, AE )\
\
/* Das Ende stehe im DECL-Makro !!! */
@@ -711,18 +711,18 @@ _SV_DECL_PTRARR_SORT_DEL(nm, AE, IS, GS, vis)
#define _SV_DECL_VARARR_SORT(nm, AE, IS, GS, vis)\
SV_DECL_VARARR_VISIBILITY(nm##_SAR, AE, IS, GS, vis)\
_SORT_CLASS_DEF(nm, AE, IS, GS, vis) \
- const AE& operator[](USHORT nP) const {\
+ const AE& operator[](sal_uInt16 nP) const {\
return nm##_SAR::operator[]( nP );\
}\
- const AE& GetObject(USHORT nP) const {\
+ const AE& GetObject(sal_uInt16 nP) const {\
return nm##_SAR::GetObject( nP );\
}\
- BOOL Seek_Entry( const AE & aE, USHORT* pP = 0 ) const;\
+ sal_Bool Seek_Entry( const AE & aE, sal_uInt16* pP = 0 ) const;\
void ForEach( CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( 0, nA, (FnForEach_##nm##_SAR)fnForEach, pArgs );\
}\
- void ForEach( USHORT nS, USHORT nE, \
+ void ForEach( sal_uInt16 nS, sal_uInt16 nE, \
CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
{\
_ForEach( nS, nE, (FnForEach_##nm##_SAR)fnForEach, pArgs );\
@@ -740,10 +740,10 @@ _SV_DECL_VARARR_SORT(nm, AE, IS, GS, vis)
#define SV_IMPL_PTRARR_SORT( nm,AE )\
_SV_IMPL_SORTAR_ALG( nm,AE )\
- void nm::DeleteAndDestroy( USHORT nP, USHORT nL ) { \
+ void nm::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL ) { \
if( nL ) {\
DBG_ASSERT( nP < nA && nP + nL <= nA, "ERR_VAR_DEL" );\
- for( USHORT n=nP; n < nP + nL; n++ ) \
+ for( sal_uInt16 n=nP; n < nP + nL; n++ ) \
delete *((AE*)pData+n); \
SvPtrarr::Remove( nP, nL ); \
} \
@@ -752,10 +752,10 @@ _SV_SEEK_PTR( nm, AE )
#define SV_IMPL_OP_PTRARR_SORT( nm,AE )\
_SV_IMPL_SORTAR_ALG( nm,AE )\
- void nm::DeleteAndDestroy( USHORT nP, USHORT nL ) { \
+ void nm::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL ) { \
if( nL ) {\
DBG_ASSERT( nP < nA && nP + nL <= nA, "ERR_VAR_DEL" );\
- for( USHORT n=nP; n < nP + nL; n++ ) \
+ for( sal_uInt16 n=nP; n < nP + nL; n++ ) \
delete *((AE*)pData+n); \
SvPtrarr::Remove( nP, nL ); \
} \
diff --git a/svl/inc/svl/svdde.hxx b/svl/inc/svl/svdde.hxx
index bb14d0fcdcdf..35448521c459 100644
--- a/svl/inc/svl/svdde.hxx
+++ b/svl/inc/svl/svdde.hxx
@@ -92,11 +92,11 @@ class SVL_DLLPUBLIC DdeData
//#if 0 // _SOLAR__PRIVATE
SVL_DLLPRIVATE void Lock();
//#endif
- void SetFormat( ULONG nFmt );
+ void SetFormat( sal_uLong nFmt );
public:
DdeData();
- DdeData( const void*, long, ULONG = FORMAT_STRING );
+ DdeData( const void*, long, sal_uLong = FORMAT_STRING );
DdeData( const String& );
DdeData( const DdeData& );
~DdeData();
@@ -104,12 +104,12 @@ public:
operator const void*() const;
operator long() const;
- ULONG GetFormat() const;
+ sal_uLong GetFormat() const;
DdeData& operator = ( const DdeData& );
- static ULONG GetExternalFormat( ULONG nFmt );
- static ULONG GetInternalFormat( ULONG nFmt );
+ static sal_uLong GetExternalFormat( sal_uLong nFmt );
+ static sal_uLong GetInternalFormat( sal_uLong nFmt );
};
// ------------------
// - DdeServiceList -
@@ -156,7 +156,7 @@ class SVL_DLLPUBLIC DdeTransaction
{
public:
virtual void Data( const DdeData* );
- virtual void Done( BOOL bDataValid );
+ virtual void Done( sal_Bool bDataValid );
protected:
DdeConnection& rDde;
DdeData aDdeData;
@@ -166,14 +166,14 @@ protected:
long nTime;
Link aData;
Link aDone;
- BOOL bBusy;
+ sal_Bool bBusy;
DdeTransaction( DdeConnection&, const String&, long = 0 );
public:
virtual ~DdeTransaction();
- BOOL IsBusy() { return bBusy; }
+ sal_Bool IsBusy() { return bBusy; }
const String& GetName() const;
void Execute();
@@ -184,8 +184,8 @@ public:
void SetDoneHdl( const Link& rLink ) { aDone = rLink; }
const Link& GetDoneHdl() const { return aDone; }
- void SetFormat( ULONG nFmt ) { aDdeData.SetFormat( nFmt ); }
- ULONG GetFormat() const { return aDdeData.GetFormat(); }
+ void SetFormat( sal_uLong nFmt ) { aDdeData.SetFormat( nFmt ); }
+ sal_uLong GetFormat() const { return aDdeData.GetFormat(); }
long GetError();
@@ -253,7 +253,7 @@ class SVL_DLLPUBLIC DdePoke : public DdeTransaction
{
public:
DdePoke( DdeConnection&, const String&, const char*, long,
- ULONG = FORMAT_STRING, long = 0 );
+ sal_uLong = FORMAT_STRING, long = 0 );
DdePoke( DdeConnection&, const String&, const DdeData&, long = 0 );
DdePoke( DdeConnection&, const String&, const String&, long = 0 );
};
@@ -290,7 +290,7 @@ public:
static const DdeConnections& GetConnections();
- BOOL IsConnected();
+ sal_Bool IsConnected();
const String& GetServiceName();
const String& GetTopicName();
@@ -312,11 +312,11 @@ class SVL_DLLPUBLIC DdeItem
DdeTopic* pMyTopic;
DdeItemImp* pImpData;
- void IncMonitor( ULONG );
- void DecMonitor( ULONG );
+ void IncMonitor( sal_uLong );
+ void DecMonitor( sal_uLong );
protected:
- BYTE nType;
+ sal_uInt8 nType;
public:
DdeItem( const sal_Unicode* );
@@ -340,9 +340,9 @@ public:
DdeGetPutItem( const String& rStr );
DdeGetPutItem( const DdeItem& rItem );
- virtual DdeData* Get( ULONG );
- virtual BOOL Put( const DdeData* );
- virtual void AdviseLoop( BOOL ); // AdviseLoop starten/stoppen
+ virtual DdeData* Get( sal_uLong );
+ virtual sal_Bool Put( const DdeData* );
+ virtual void AdviseLoop( sal_Bool ); // AdviseLoop starten/stoppen
};
// ------------
@@ -356,16 +356,16 @@ class SVL_DLLPUBLIC DdeTopic
public:
virtual void Connect( long );
virtual void Disconnect( long );
- virtual DdeData* Get( ULONG );
- virtual BOOL Put( const DdeData* );
- virtual BOOL Execute( const String* );
+ virtual DdeData* Get( sal_uLong );
+ virtual sal_Bool Put( const DdeData* );
+ virtual sal_Bool Execute( const String* );
// evt. ein neues anlegen; return 0 -> es konnte nicht angelegt werden
- virtual BOOL MakeItem( const String& rItem );
+ virtual sal_Bool MakeItem( const String& rItem );
// es wird ein Warm-/Hot-Link eingerichtet. Return-Wert
// besagt ob es geklappt hat
- virtual BOOL StartAdviseLoop();
- virtual BOOL StopAdviseLoop();
+ virtual sal_Bool StartAdviseLoop();
+ virtual sal_Bool StopAdviseLoop();
private:
friend class DdeInternal;
@@ -401,7 +401,7 @@ public:
const Link& GetExecuteHdl() const { return aExecLink; }
void NotifyClient( const String& );
- BOOL IsSystemTopic();
+ sal_Bool IsSystemTopic();
void InsertItem( DdeItem* ); // fuer eigene Ableitungen!
DdeItem* AddItem( const DdeItem& ); // werden kopiert !
@@ -423,10 +423,10 @@ class SVL_DLLPUBLIC DdeService
friend class DdeInternal;
public:
- virtual BOOL IsBusy();
+ virtual sal_Bool IsBusy();
virtual String GetHelp();
// evt. ein neues anlegen; return 0 -> es konnte nicht angelegt werden
- virtual BOOL MakeTopic( const String& rItem );
+ virtual sal_Bool MakeTopic( const String& rItem );
protected:
virtual String Topics();
@@ -434,7 +434,7 @@ protected:
virtual String SysItems();
virtual String Status();
virtual String SysTopicGet( const String& );
- virtual BOOL SysTopicExecute( const String* );
+ virtual sal_Bool SysTopicExecute( const String* );
const DdeTopic* GetSysTopic() const { return pSysTopic; }
private:
@@ -445,7 +445,7 @@ private:
ConvList* pConv;
short nStatus;
- SVL_DLLPRIVATE BOOL HasCbFormat( USHORT );
+ SVL_DLLPRIVATE sal_Bool HasCbFormat( sal_uInt16 );
public:
DdeService( const String& );
@@ -460,9 +460,9 @@ public:
void AddTopic( const DdeTopic& );
void RemoveTopic( const DdeTopic& );
- void AddFormat( ULONG );
- void RemoveFormat( ULONG );
- BOOL HasFormat( ULONG );
+ void AddFormat( sal_uLong );
+ void RemoveFormat( sal_uLong );
+ sal_Bool HasFormat( sal_uLong );
private:
// DdeService( const DdeService& );
diff --git a/svl/inc/svl/svldata.hxx b/svl/inc/svl/svldata.hxx
index 24aef1fdf6d0..7d666a7e0d15 100644
--- a/svl/inc/svl/svldata.hxx
+++ b/svl/inc/svl/svldata.hxx
@@ -61,7 +61,7 @@ class SvtSimpleResId
String m_sValue;
public:
- SvtSimpleResId(USHORT nId, const ::com::sun::star::lang::Locale aLocale) : m_sValue(ImpSvlData::GetSvlData().GetSimpleRM(aLocale)->ReadString(nId)) { };
+ SvtSimpleResId(sal_uInt16 nId, const ::com::sun::star::lang::Locale aLocale) : m_sValue(ImpSvlData::GetSvlData().GetSimpleRM(aLocale)->ReadString(nId)) { };
operator String () const { return m_sValue; }
};
diff --git a/svl/inc/svl/svstdarr.hxx b/svl/inc/svl/svstdarr.hxx
index 608705dca43d..88f318c2d5d3 100644
--- a/svl/inc/svl/svstdarr.hxx
+++ b/svl/inc/svl/svstdarr.hxx
@@ -44,27 +44,27 @@
#include <svl/svarray.hxx>
#include <deque>
-typedef std::deque< BOOL > SvBools;
+typedef std::deque< sal_Bool > SvBools;
-typedef std::deque< BYTE > SvBytes;
+typedef std::deque< sal_uInt8 > SvBytes;
//#ifdef _SVSTDARR_ULONGS
#ifndef _SVSTDARR_ULONGS_DECL
-SV_DECL_VARARR_VISIBILITY( SvULongs, ULONG, 1, 1, SVL_DLLPUBLIC )
+SV_DECL_VARARR_VISIBILITY( SvULongs, sal_uLong, 1, 1, SVL_DLLPUBLIC )
#define _SVSTDARR_ULONGS_DECL
#endif
//#endif
//#ifdef _SVSTDARR_ULONGSSORT
#ifndef _SVSTDARR_ULONGSSORT_DECL
-SV_DECL_VARARR_SORT_VISIBILITY( SvULongsSort, ULONG, 1, 1, SVL_DLLPUBLIC )
+SV_DECL_VARARR_SORT_VISIBILITY( SvULongsSort, sal_uLong, 1, 1, SVL_DLLPUBLIC )
#define _SVSTDARR_ULONGSSORT_DECL
#endif
//#endif
//#ifdef _SVSTDARR_USHORTS
#ifndef _SVSTDARR_USHORTS_DECL
-SV_DECL_VARARR_VISIBILITY( SvUShorts, USHORT, 1, 1, SVL_DLLPUBLIC )
+SV_DECL_VARARR_VISIBILITY( SvUShorts, sal_uInt16, 1, 1, SVL_DLLPUBLIC )
#define _SVSTDARR_USHORTS_DECL
#endif
//#endif
@@ -72,37 +72,37 @@ SV_DECL_VARARR_VISIBILITY( SvUShorts, USHORT, 1, 1, SVL_DLLPUBLIC )
//#ifdef _SVSTDARR_USHORTSSORT
#ifndef _SVSTDARR_USHORTSSORT_DECL
-typedef BOOL (*FnForEach_SvUShortsSort)( const USHORT&, void* );
+typedef sal_Bool (*FnForEach_SvUShortsSort)( const sal_uInt16&, void* );
class SVL_DLLPUBLIC SvUShortsSort : __MWERKS__PRIVATE SvUShorts
{
public:
- SvUShortsSort(BYTE nSize = 1, BYTE nG = 1)
+ SvUShortsSort(sal_uInt8 nSize = 1, sal_uInt8 nG = 1)
: SvUShorts(nSize,nG) {}
- void Insert( const SvUShortsSort *pI, USHORT nS=0, USHORT nE=USHRT_MAX );
- BOOL Insert( const USHORT aE );
- BOOL Insert( const USHORT aE, USHORT& rP );
- void Insert( const USHORT *pE, USHORT nL );
+ void Insert( const SvUShortsSort *pI, sal_uInt16 nS=0, sal_uInt16 nE=USHRT_MAX );
+ sal_Bool Insert( const sal_uInt16 aE );
+ sal_Bool Insert( const sal_uInt16 aE, sal_uInt16& rP );
+ void Insert( const sal_uInt16 *pE, sal_uInt16 nL );
// remove ab Pos
- void RemoveAt( const USHORT nP, USHORT nL = 1 );
+ void RemoveAt( const sal_uInt16 nP, sal_uInt16 nL = 1 );
// remove ab dem Eintrag
- void Remove( const USHORT nP, USHORT nL = 1 );
- BOOL Seek_Entry( const USHORT aE, USHORT* pP = 0 ) const;
+ void Remove( const sal_uInt16 nP, sal_uInt16 nL = 1 );
+ sal_Bool Seek_Entry( const sal_uInt16 aE, sal_uInt16* pP = 0 ) const;
- USHORT Count() const { return SvUShorts::Count(); }
- const USHORT* GetData() const { return (const USHORT*)pData; }
+ sal_uInt16 Count() const { return SvUShorts::Count(); }
+ const sal_uInt16* GetData() const { return (const sal_uInt16*)pData; }
- const USHORT& operator[](USHORT nP) const {
+ const sal_uInt16& operator[](sal_uInt16 nP) const {
return SvUShorts::operator[]( nP );
}
- const USHORT& GetObject(USHORT nP) const {
+ const sal_uInt16& GetObject(sal_uInt16 nP) const {
return SvUShorts::GetObject( nP );
}
void ForEach( FnForEach_SvUShortsSort fnForEach, void* pArgs = 0 )
{
_ForEach( 0, nA, (FnForEach_SvUShorts)fnForEach, pArgs );
}
- void ForEach( USHORT nS, USHORT nE,
+ void ForEach( sal_uInt16 nS, sal_uInt16 nE,
FnForEach_SvUShortsSort fnForEach, void* pArgs = 0 )
{
_ForEach( nS, nE, (FnForEach_SvUShorts)fnForEach, pArgs );
diff --git a/svl/inc/svl/szitem.hxx b/svl/inc/svl/szitem.hxx
index 31878aa34be5..0e1aa5b365b1 100644
--- a/svl/inc/svl/szitem.hxx
+++ b/svl/inc/svl/szitem.hxx
@@ -46,8 +46,8 @@ private:
public:
TYPEINFO();
SfxSizeItem();
- SfxSizeItem( USHORT nWhich, const Size& rVal );
- SfxSizeItem( USHORT nWhich, SvStream & );
+ SfxSizeItem( sal_uInt16 nWhich, const Size& rVal );
+ SfxSizeItem( sal_uInt16 nWhich, SvStream & );
SfxSizeItem( const SfxSizeItem& );
~SfxSizeItem() { DBG_DTOR(SfxSizeItem, 0); }
@@ -58,14 +58,14 @@ public:
const IntlWrapper * = 0 ) const;
virtual int operator==( const SfxPoolItem& ) const;
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 );
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- virtual SfxPoolItem* Create(SvStream &, USHORT nItemVersion) const;
- virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
+ virtual SfxPoolItem* Create(SvStream &, sal_uInt16 nItemVersion) const;
+ virtual SvStream& Store(SvStream &, sal_uInt16 nItemVersion) const;
const Size& GetValue() const { return aVal; }
void SetValue( const Size& rNewVal ) {
diff --git a/svl/inc/svl/undo.hxx b/svl/inc/svl/undo.hxx
index 5aea03207626..3d2c46af496c 100644
--- a/svl/inc/svl/undo.hxx
+++ b/svl/inc/svl/undo.hxx
@@ -32,6 +32,10 @@
#include <tools/string.hxx>
#include <svl/svarray.hxx>
+#include <boost/scoped_ptr.hpp>
+
+#include <vector>
+
//====================================================================
class SVL_DLLPUBLIC SfxRepeatTarget
@@ -43,26 +47,36 @@ public:
//====================================================================
+class SVL_DLLPUBLIC SfxUndoContext
+{
+public:
+ virtual ~SfxUndoContext() = 0;
+};
+
+//====================================================================
+
class SVL_DLLPUBLIC SfxUndoAction
{
- BOOL bLinked;
+ sal_Bool bLinked;
public:
TYPEINFO();
SfxUndoAction();
virtual ~SfxUndoAction();
- virtual BOOL IsLinked();
- virtual void SetLinked( BOOL bIsLinked = TRUE );
+ virtual sal_Bool IsLinked();
+ virtual void SetLinked( sal_Bool bIsLinked = sal_True );
virtual void Undo();
+ virtual void UndoWithContext( SfxUndoContext& i_context );
virtual void Redo();
+ virtual void RedoWithContext( SfxUndoContext& i_context );
virtual void Repeat(SfxRepeatTarget&);
- virtual BOOL CanRepeat(SfxRepeatTarget&) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget&) const;
- virtual BOOL Merge( SfxUndoAction *pNextAction );
+ virtual sal_Bool Merge( SfxUndoAction *pNextAction );
- virtual UniString GetComment() const;
- virtual UniString GetRepeatComment(SfxRepeatTarget&) const;
- virtual USHORT GetId() const;
+ virtual UniString GetComment() const;
+ virtual UniString GetRepeatComment(SfxRepeatTarget&) const;
+ virtual sal_uInt16 GetId() const;
private:
SfxUndoAction& operator=( const SfxUndoAction& ); // n.i.!!
@@ -70,19 +84,67 @@ private:
//========================================================================
-SV_DECL_PTRARR( SfxUndoActions, SfxUndoAction*, 20, 8 )
+/// is a mark on the Undo stack
+typedef sal_Int32 UndoStackMark;
+#define MARK_INVALID ::std::numeric_limits< UndoStackMark >::max()
+
+//========================================================================
+
+struct MarkedUndoAction
+{
+ SfxUndoAction* pAction;
+ ::std::vector< UndoStackMark > aMarks;
+
+ MarkedUndoAction( SfxUndoAction* i_action )
+ :pAction( i_action )
+ ,aMarks()
+ {
+ }
+};
+
+class SfxUndoActions
+{
+private:
+ ::std::vector< MarkedUndoAction > m_aActions;
+
+public:
+ SfxUndoActions()
+ {
+ }
+
+ bool empty() const { return m_aActions.empty(); }
+ size_t size() const { return m_aActions.size(); }
+
+ const MarkedUndoAction& operator[]( size_t i ) const { return m_aActions[i]; }
+ MarkedUndoAction& operator[]( size_t i ) { return m_aActions[i]; }
+
+ void Remove( size_t i_pos )
+ {
+ m_aActions.erase( m_aActions.begin() + i_pos );
+ }
+
+ void Remove( size_t i_pos, size_t i_count )
+ {
+ m_aActions.erase( m_aActions.begin() + i_pos, m_aActions.begin() + i_pos + i_count );
+ }
+
+ void Insert( SfxUndoAction* i_action, size_t i_pos )
+ {
+ m_aActions.insert( m_aActions.begin() + i_pos, MarkedUndoAction( i_action ) );
+ }
+};
//====================================================================
-/** do not make use of this implementation details, unless you
+/** do not make use of these implementation details, unless you
really really have to! */
struct SVL_DLLPUBLIC SfxUndoArray
{
SfxUndoActions aUndoActions;
- USHORT nMaxUndoActions;
- USHORT nCurUndoAction;
+ size_t nMaxUndoActions;
+ size_t nCurUndoAction;
SfxUndoArray *pFatherUndoArray;
- SfxUndoArray(USHORT nMax=0):
+ SfxUndoArray(size_t nMax=0):
nMaxUndoActions(nMax), nCurUndoAction(0),
pFatherUndoArray(0) {}
~SfxUndoArray();
@@ -90,7 +152,7 @@ struct SVL_DLLPUBLIC SfxUndoArray
//=========================================================================
-/** do not make use of this implementation details, unless you
+/** do not make use of these implementation details, unless you
really really have to! */
class SVL_DLLPUBLIC SfxListUndoAction : public SfxUndoAction, public SfxUndoArray
@@ -109,87 +171,260 @@ class SVL_DLLPUBLIC SfxListUndoAction : public SfxUndoAction, public SfxUndoArra
TYPEINFO();
SfxListUndoAction( const UniString &rComment,
- const UniString rRepeatComment, USHORT Id, SfxUndoArray *pFather);
+ const UniString rRepeatComment, sal_uInt16 Id, SfxUndoArray *pFather);
virtual void Undo();
+ virtual void UndoWithContext( SfxUndoContext& i_context );
virtual void Redo();
+ virtual void RedoWithContext( SfxUndoContext& i_context );
virtual void Repeat(SfxRepeatTarget&);
- virtual BOOL CanRepeat(SfxRepeatTarget&) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget&) const;
- virtual BOOL Merge( SfxUndoAction *pNextAction );
+ virtual sal_Bool Merge( SfxUndoAction *pNextAction );
- virtual UniString GetComment() const;
- virtual UniString GetRepeatComment(SfxRepeatTarget&) const;
- virtual USHORT GetId() const;
+ virtual UniString GetComment() const;
+ virtual UniString GetRepeatComment(SfxRepeatTarget&) const;
+ virtual sal_uInt16 GetId() const;
void SetComment( const UniString& rComment );
private:
- USHORT nId;
- UniString aComment, aRepeatComment;
+ sal_uInt16 nId;
+ UniString aComment;
+ UniString aRepeatComment;
};
//=========================================================================
-class SVL_DLLPUBLIC SfxUndoManager
+/** is a callback interface for notifications about state changes of an SfxUndoManager
+*/
+class SAL_NO_VTABLE SfxUndoListener
{
- friend class SfxLinkUndoAction;
+public:
+ virtual void actionUndone( const String& i_actionComment ) = 0;
+ virtual void actionRedone( const String& i_actionComment ) = 0;
+ virtual void undoActionAdded( const String& i_actionComment ) = 0;
+ virtual void cleared() = 0;
+ virtual void clearedRedo() = 0;
+ virtual void resetAll() = 0;
+ virtual void listActionEntered( const String& i_comment ) = 0;
+ virtual void listActionLeft( const String& i_comment ) = 0;
+ virtual void listActionLeftAndMerged() = 0;
+ virtual void listActionCancelled() = 0;
+ virtual void undoManagerDying() = 0;
+};
- SfxUndoArray *pUndoArray;
- SfxUndoArray *pActUndoArray;
- SfxUndoArray *pFatherUndoArray;
+//=========================================================================
- bool mbUndoEnabled;
-public:
- SfxUndoManager( USHORT nMaxUndoActionCount = 20 );
- virtual ~SfxUndoManager();
+namespace svl
+{
+ class SAL_NO_VTABLE IUndoManager
+ {
+ public:
+ enum
+ {
+ CurrentLevel = true,
+ TopLevel = false
+ };
- virtual void SetMaxUndoActionCount( USHORT nMaxUndoActionCount );
- virtual USHORT GetMaxUndoActionCount() const;
- virtual void Clear();
+ virtual ~IUndoManager() { };
+
+ virtual void SetMaxUndoActionCount( size_t nMaxUndoActionCount ) = 0;
+ virtual size_t GetMaxUndoActionCount() const = 0;
+
+ virtual void AddUndoAction( SfxUndoAction *pAction, sal_Bool bTryMerg=sal_False ) = 0;
+
+ virtual size_t GetUndoActionCount( bool const i_currentLevel = CurrentLevel ) const = 0;
+ virtual sal_uInt16 GetUndoActionId() const = 0;
+ virtual UniString GetUndoActionComment( size_t nNo=0, bool const i_currentLevel = CurrentLevel ) const = 0;
+ virtual SfxUndoAction* GetUndoAction( size_t nNo=0 ) const = 0;
- virtual void AddUndoAction( SfxUndoAction *pAction, BOOL bTryMerg=FALSE );
+ virtual size_t GetRedoActionCount( bool const i_currentLevel = CurrentLevel ) const = 0;
+ virtual UniString GetRedoActionComment( size_t nNo=0, bool const i_currentLevel = CurrentLevel ) const = 0;
- virtual USHORT GetUndoActionCount() const;
- virtual USHORT GetUndoActionId(USHORT nNo=0) const;
- virtual UniString GetUndoActionComment( USHORT nNo=0 ) const;
- /** returns the nNo'th undo action from the top */
- SfxUndoAction* GetUndoAction( USHORT nNo=0 ) const;
+ virtual sal_Bool Undo() = 0;
+ virtual sal_Bool Redo() = 0;
- virtual BOOL Undo( USHORT nCount=1 );
- virtual void Undo( SfxUndoAction &rAction );
+ /** clears both the Redo and the Undo stack.
- virtual USHORT GetRedoActionCount() const;
- virtual USHORT GetRedoActionId(USHORT nNo=0) const;
- virtual UniString GetRedoActionComment( USHORT nNo=0 ) const;
+ Will assert and bail out when called while within a list action (<member>IsInListAction</member>).
+ */
+ virtual void Clear() = 0;
- virtual BOOL Redo( USHORT nCount=1 );
- virtual void Redo( SfxUndoAction &rAction );
+ /** clears the Redo stack.
+
+ Will assert and bail out when called while within a list action (<member>IsInListAction</member>).
+ */
+ virtual void ClearRedo() = 0;
+
+ /** leaves any possible open list action (<member>IsInListAction</member>), and clears both the Undo and the
+ Redo stack.
+
+ Effectively, calling this method is equivalent to <code>while ( IsInListAction() ) LeaveListAction();</code>,
+ followed by <code>Clear()</code>. The only difference to this calling sequence is that Reset is an
+ atomar operation, also resulting in only one notification.
+ */
+ virtual void Reset() = 0;
+
+ /** determines whether an Undo or Redo is currently running
+ */
+ virtual bool IsDoing() const = 0;
+
+ virtual size_t GetRepeatActionCount() const = 0;
+ virtual UniString GetRepeatActionComment( SfxRepeatTarget &rTarget) const = 0;
+ virtual sal_Bool Repeat( SfxRepeatTarget &rTarget ) = 0;
+ virtual sal_Bool CanRepeat( SfxRepeatTarget &rTarget ) const = 0;
+
+ virtual void EnterListAction(const UniString &rComment, const UniString& rRepeatComment, sal_uInt16 nId=0) = 0;
+
+ /** leaves the list action entered with EnterListAction
+ @return the number of the sub actions in the list which has just been left. Note that in case no such
+ actions exist, the list action does not contribute to the Undo stack, but is silently removed.
+ */
+ virtual size_t LeaveListAction() = 0;
+
+ /** leaves the list action entered with EnterListAction, and forcefully merges the previous
+ action on the stack into the newly created list action.
+
+ Say you have an Undo action A on the stack, then call EnterListAction, followed by one or more calls to
+ AddUndoAction, followed by a call to LeaveAndMergeListAction. In opposite to LeaveListAction, your Undo
+ stack will now still contain one undo action: the newly created list action, whose first child is the
+ original A, whose other children are those you added via AddUndoAction, and whose comment is the same as
+ the comment of A.
+
+ Effectively, this means that all actions added between EnterListAction and LeaveAndMergeListAction are
+ hidden from the user.
+
+ @return the number of the sub actions in the list which has just been left. Note that in case no such
+ actions exist, the list action does not contribute to the Undo stack, but is silently removed.
+ */
+ virtual size_t LeaveAndMergeListAction() = 0;
+
+ /// determines whether we're within a ListAction context, i.e. a LeaveListAction/LeaveAndMergeListAction call is pending
+ virtual bool IsInListAction() const = 0;
+
+ /// determines how many nested list actions are currently open
+ virtual size_t GetListActionDepth() const = 0;
+
+ /** clears the redo stack and removes the top undo action */
+ virtual void RemoveLastUndoAction() = 0;
+
+ // enables (true) or disables (false) recording of undo actions
+ // If undo actions are added while undo is disabled, they are deleted.
+ // Disabling undo does not clear the current undo buffer!
+ virtual void EnableUndo( bool bEnable ) = 0;
+
+ // returns true if undo is currently enabled
+ // This returns false if undo was disabled using EnableUndo( false ) and
+ // also during the runtime of the Undo() and Redo() methods.
+ virtual bool IsUndoEnabled() const = 0;
+
+ /// adds a new listener to be notified about changes in the UndoManager's state
+ virtual void AddUndoListener( SfxUndoListener& i_listener ) = 0;
+ virtual void RemoveUndoListener( SfxUndoListener& i_listener ) = 0;
+ };
+}
+
+//=========================================================================
+
+namespace svl { namespace undo { namespace impl
+{
+ class UndoManagerGuard;
+ class LockGuard;
+} } }
+
+struct SfxUndoManager_Data;
+class SVL_DLLPUBLIC SfxUndoManager : public ::svl::IUndoManager
+{
+ friend class SfxLinkUndoAction;
+
+ ::boost::scoped_ptr< SfxUndoManager_Data >
+ m_pData;
+public:
+ SfxUndoManager( size_t nMaxUndoActionCount = 20 );
+ virtual ~SfxUndoManager();
+
+ // IUndoManager overridables
+ virtual void SetMaxUndoActionCount( size_t nMaxUndoActionCount );
+ virtual size_t GetMaxUndoActionCount() const;
+ virtual void AddUndoAction( SfxUndoAction *pAction, sal_Bool bTryMerg=sal_False );
+ virtual size_t GetUndoActionCount( bool const i_currentLevel = CurrentLevel ) const;
+ virtual sal_uInt16 GetUndoActionId() const;
+ virtual UniString GetUndoActionComment( size_t nNo=0, bool const i_currentLevel = CurrentLevel ) const;
+ virtual SfxUndoAction* GetUndoAction( size_t nNo=0 ) const;
+ virtual size_t GetRedoActionCount( bool const i_currentLevel = CurrentLevel ) const;
+ virtual UniString GetRedoActionComment( size_t nNo=0, bool const i_currentLevel = CurrentLevel ) const;
+ virtual sal_Bool Undo();
+ virtual sal_Bool Redo();
+ virtual void Clear();
virtual void ClearRedo();
+ virtual void Reset();
+ virtual bool IsDoing() const;
+ virtual size_t GetRepeatActionCount() const;
+ virtual UniString GetRepeatActionComment( SfxRepeatTarget &rTarget) const;
+ virtual sal_Bool Repeat( SfxRepeatTarget &rTarget );
+ virtual sal_Bool CanRepeat( SfxRepeatTarget &rTarget ) const;
+ virtual void EnterListAction(const UniString &rComment, const UniString& rRepeatComment, sal_uInt16 nId=0);
+ virtual size_t LeaveListAction();
+ virtual size_t LeaveAndMergeListAction();
+ virtual bool IsInListAction() const;
+ virtual size_t GetListActionDepth() const;
+ virtual void RemoveLastUndoAction();
+ virtual void EnableUndo( bool bEnable );
+ virtual bool IsUndoEnabled() const;
+ virtual void AddUndoListener( SfxUndoListener& i_listener );
+ virtual void RemoveUndoListener( SfxUndoListener& i_listener );
+
+ /** marks the current top-level element of the Undo stack, and returns a unique ID for it
+ */
+ UndoStackMark MarkTopUndoAction();
+
+ /** removes a mark given by its ID.
+ After the call, the mark ID is invalid.
+ */
+ void RemoveMark( UndoStackMark const i_mark );
+
+ /** determines whether the top action on the Undo stack has a given mark
+ */
+ bool HasTopUndoActionMark( UndoStackMark const i_mark );
+
+ /** removes the oldest Undo actions from the stack
+ */
+ void RemoveOldestUndoActions( size_t const i_count );
+
+protected:
+ sal_Bool UndoWithContext( SfxUndoContext& i_context );
+ sal_Bool RedoWithContext( SfxUndoContext& i_context );
- virtual USHORT GetRepeatActionCount() const;
- virtual UniString GetRepeatActionComment( SfxRepeatTarget &rTarget, USHORT nNo = 0) const;
- virtual BOOL Repeat( SfxRepeatTarget &rTarget, USHORT nFrom=0, USHORT nCount=1 );
- virtual void Repeat( SfxRepeatTarget &rTarget, SfxUndoAction &rAction );
- virtual BOOL CanRepeat( SfxRepeatTarget &rTarget, USHORT nNo = 0 ) const;
- virtual BOOL CanRepeat( SfxRepeatTarget &rTarget, SfxUndoAction &rAction ) const;
+ void ImplClearRedo_NoLock( bool const i_currentLevel );
- virtual void EnterListAction(const UniString &rComment, const UniString& rRepeatComment, USHORT nId=0);
- virtual void LeaveListAction();
+ /** clears all undo actions on the current level, plus all undo actions on superordinate levels,
+ as soon as those levels are reached.
- /** clears the redo stack and removes the top undo action */
- void RemoveLastUndoAction();
+ If no list action is active currently, i.e. we're on the top level already, this method is equivalent to
+ ->Clear.
- // enables (true) or disables (false) recording of undo actions
- // If undo actions are added while undo is disabled, they are deleted.
- // Disabling undo does not clear the current undo buffer!
- void EnableUndo( bool bEnable );
+ Otherwise, the Undo actions on the current level are removed. Upon leaving the current list action, all
+ undo actions on the then-current level are removed, too. This is continued until the top level is reached.
+ */
+ void ClearAllLevels();
- // returns true if undo is currently enabled
- // This returns false if undo was disabled using EnableUndo( false ) and
- // also during the runtime of the Undo() and Redo() methods.
- bool IsUndoEnabled() const { return mbUndoEnabled; }
+private:
+ size_t ImplLeaveListAction( const bool i_merge, ::svl::undo::impl::UndoManagerGuard& i_guard );
+ bool ImplAddUndoAction_NoNotify( SfxUndoAction* pAction, bool bTryMerge, bool bClearRedo, ::svl::undo::impl::UndoManagerGuard& i_guard );
+ void ImplClearRedo( ::svl::undo::impl::UndoManagerGuard& i_guard, bool const i_currentLevel );
+ void ImplClearUndo( ::svl::undo::impl::UndoManagerGuard& i_guard );
+ void ImplClearCurrentLevel_NoNotify( ::svl::undo::impl::UndoManagerGuard& i_guard );
+ size_t ImplGetRedoActionCount_Lock( bool const i_currentLevel = CurrentLevel ) const;
+ bool ImplIsUndoEnabled_Lock() const;
+ bool ImplIsInListAction_Lock() const;
+ void ImplEnableUndo_Lock( bool const i_enable );
+
+ sal_Bool ImplUndo( SfxUndoContext* i_contextOrNull );
+ sal_Bool ImplRedo( SfxUndoContext* i_contextOrNull );
+
+ friend class ::svl::undo::impl::LockGuard;
};
//=========================================================================
@@ -213,23 +448,23 @@ class SVL_DLLPUBLIC SfxLinkUndoAction : public SfxUndoAction
{
public:
TYPEINFO();
- SfxLinkUndoAction(SfxUndoManager *pManager);
+ SfxLinkUndoAction(::svl::IUndoManager *pManager);
~SfxLinkUndoAction();
virtual void Undo();
virtual void Redo();
- virtual BOOL CanRepeat(SfxRepeatTarget& r) const;
+ virtual sal_Bool CanRepeat(SfxRepeatTarget& r) const;
virtual void Repeat(SfxRepeatTarget&r);
- virtual UniString GetComment() const;
- virtual UniString GetRepeatComment(SfxRepeatTarget&r) const;
- virtual USHORT GetId() const;
+ virtual UniString GetComment() const;
+ virtual UniString GetRepeatComment(SfxRepeatTarget&r) const;
+ virtual sal_uInt16 GetId() const;
SfxUndoAction* GetAction() const { return pAction; }
protected:
- SfxUndoManager *pUndoManager;
+ ::svl::IUndoManager *pUndoManager;
SfxUndoAction *pAction;
};
diff --git a/svl/inc/svl/visitem.hxx b/svl/inc/svl/visitem.hxx
index 9e9a0fcf4126..0305e0563938 100644
--- a/svl/inc/svl/visitem.hxx
+++ b/svl/inc/svl/visitem.hxx
@@ -43,14 +43,14 @@ class SVL_DLLPUBLIC SfxVisibilityItem: public SfxPoolItem
public:
TYPEINFO();
- SfxVisibilityItem(USHORT which = 0, sal_Bool bVisible = sal_True):
+ SfxVisibilityItem(sal_uInt16 which = 0, sal_Bool bVisible = sal_True):
SfxPoolItem(which)
{
m_nValue.bVisible = bVisible;
DBG_CTOR(SfxVisibilityItem, 0);
}
- SfxVisibilityItem(USHORT which, SvStream & rStream);
+ SfxVisibilityItem(sal_uInt16 which, SvStream & rStream);
SfxVisibilityItem(const SfxVisibilityItem & rItem):
SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
@@ -69,25 +69,25 @@ public:
const IntlWrapper * = 0)
const;
- virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 ) const;
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 ) const;
- virtual BOOL PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId = 0 );
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId = 0 );
- virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
+ virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const;
- virtual SvStream & Store(SvStream & rStream, USHORT) const;
+ virtual SvStream & Store(SvStream & rStream, sal_uInt16) const;
virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
- virtual USHORT GetValueCount() const;
+ virtual sal_uInt16 GetValueCount() const;
- virtual UniString GetValueTextByVal(BOOL bTheValue) const;
+ virtual UniString GetValueTextByVal(sal_Bool bTheValue) const;
- BOOL GetValue() const { return m_nValue.bVisible; }
+ sal_Bool GetValue() const { return m_nValue.bVisible; }
- void SetValue(BOOL bVisible) { m_nValue.bVisible = bVisible; }
+ void SetValue(sal_Bool bVisible) { m_nValue.bVisible = bVisible; }
};
#endif // _SFXVISIBILITYITEM_HXX
diff --git a/svl/inc/svl/whiter.hxx b/svl/inc/svl/whiter.hxx
index 83a3e21e2b0e..eb9bb7d7e732 100644
--- a/svl/inc/svl/whiter.hxx
+++ b/svl/inc/svl/whiter.hxx
@@ -42,19 +42,19 @@ class SfxItemSet;
class SVL_DLLPUBLIC SfxWhichIter
{
- const USHORT *pRanges, *pStart;
- USHORT nOfst, nFrom, nTo;
+ const sal_uInt16 *pRanges, *pStart;
+ sal_uInt16 nOfst, nFrom, nTo;
public:
- SfxWhichIter( const SfxItemSet& rSet, USHORT nFrom = 0, USHORT nTo = USHRT_MAX );
+ SfxWhichIter( const SfxItemSet& rSet, sal_uInt16 nFrom = 0, sal_uInt16 nTo = USHRT_MAX );
~SfxWhichIter();
- USHORT GetCurWhich() const { return *pRanges + nOfst; }
- USHORT NextWhich();
- USHORT PrevWhich();
+ sal_uInt16 GetCurWhich() const { return *pRanges + nOfst; }
+ sal_uInt16 NextWhich();
+ sal_uInt16 PrevWhich();
- USHORT FirstWhich();
- USHORT LastWhich();
+ sal_uInt16 FirstWhich();
+ sal_uInt16 LastWhich();
};
#endif
diff --git a/svl/inc/svl/zforlist.hxx b/svl/inc/svl/zforlist.hxx
index 5492759d4d36..abb627567856 100644
--- a/svl/inc/svl/zforlist.hxx
+++ b/svl/inc/svl/zforlist.hxx
@@ -233,9 +233,9 @@ class SVL_DLLPUBLIC NfCurrencyEntry
String aSymbol; /// currency symbol
String aBankSymbol; /// currency abbreviation
LanguageType eLanguage; /// language/country value
- USHORT nPositiveFormat; /// position of symbol
- USHORT nNegativeFormat; /// position of symbol and type and position of negative sign
- USHORT nDigits; /// count of decimal digits
+ sal_uInt16 nPositiveFormat; /// position of symbol
+ sal_uInt16 nNegativeFormat; /// position of symbol and type and position of negative sign
+ sal_uInt16 nDigits; /// count of decimal digits
sal_Unicode cZeroChar; /// which character is used for zeros as last decimal digits
/// not implemented, prevent usage
@@ -249,7 +249,7 @@ private:
// nDecimalFormat := 0, 1, 2
// #,##0 or #,##0.00 or #,##0.-- are assigned
SVL_DLLPRIVATE void Impl_BuildFormatStringNumChars( String&,
- const LocaleDataWrapper&, USHORT nDecimalFormat ) const;
+ const LocaleDataWrapper&, sal_uInt16 nDecimalFormat ) const;
//#endif // __PRIVATE
public:
@@ -264,11 +264,11 @@ public:
~NfCurrencyEntry() {}
/// Symbols and language identical
- BOOL operator==( const NfCurrencyEntry& r ) const;
+ sal_Bool operator==( const NfCurrencyEntry& r ) const;
/// Set this format to be the EURo entry, overwrite other settings
void SetEuro();
- BOOL IsEuro() const;
+ sal_Bool IsEuro() const;
/** Apply format information (nPositiveFormat,
nNegativeFormat, nDigits, cZeroChar) of another format. */
@@ -277,43 +277,43 @@ public:
const String& GetSymbol() const { return aSymbol; }
const String& GetBankSymbol() const { return aBankSymbol; }
LanguageType GetLanguage() const { return eLanguage; }
- USHORT GetPositiveFormat() const { return nPositiveFormat; }
- USHORT GetNegativeFormat() const { return nNegativeFormat; }
- USHORT GetDigits() const { return nDigits; }
+ sal_uInt16 GetPositiveFormat() const { return nPositiveFormat; }
+ sal_uInt16 GetNegativeFormat() const { return nNegativeFormat; }
+ sal_uInt16 GetDigits() const { return nDigits; }
sal_Unicode GetZeroChar() const { return cZeroChar; }
- /** [$DM-407] (bBank==FALSE) or [$DEM] (bBank==TRUE)
- is assigned to rStr, if bBank==FALSE and
- bWithoutExtension==TRUE only [$DM] */
- void BuildSymbolString( String& rStr, BOOL bBank,
- BOOL bWithoutExtension = FALSE ) const;
+ /** [$DM-407] (bBank==sal_False) or [$DEM] (bBank==sal_True)
+ is assigned to rStr, if bBank==sal_False and
+ bWithoutExtension==sal_True only [$DM] */
+ void BuildSymbolString( String& rStr, sal_Bool bBank,
+ sal_Bool bWithoutExtension = sal_False ) const;
/** #,##0.00 [$DM-407] is assigned to rStr, separators
from rLoc, incl. minus sign but without [RED] */
- void BuildPositiveFormatString( String& rStr, BOOL bBank,
- const LocaleDataWrapper&, USHORT nDecimalFormat = 1 ) const;
- void BuildNegativeFormatString( String& rStr, BOOL bBank,
- const LocaleDataWrapper&, USHORT nDecimalFormat = 1 ) const;
+ void BuildPositiveFormatString( String& rStr, sal_Bool bBank,
+ const LocaleDataWrapper&, sal_uInt16 nDecimalFormat = 1 ) const;
+ void BuildNegativeFormatString( String& rStr, sal_Bool bBank,
+ const LocaleDataWrapper&, sal_uInt16 nDecimalFormat = 1 ) const;
- /** [$DM-407] (or [$DEM] if bBank==TRUE)
+ /** [$DM-407] (or [$DEM] if bBank==sal_True)
is appended/prepended to rStr, incl. minus sign */
- void CompletePositiveFormatString( String& rStr, BOOL bBank,
- USHORT nPosiFormat ) const;
- void CompleteNegativeFormatString( String& rStr, BOOL bBank,
- USHORT nNegaFormat ) const;
+ void CompletePositiveFormatString( String& rStr, sal_Bool bBank,
+ sal_uInt16 nPosiFormat ) const;
+ void CompleteNegativeFormatString( String& rStr, sal_Bool bBank,
+ sal_uInt16 nNegaFormat ) const;
/// rSymStr is appended/prepended to rStr, incl. minus sign
static void CompletePositiveFormatString( String& rStr,
- const String& rSymStr, USHORT nPosiFormat );
+ const String& rSymStr, sal_uInt16 nPosiFormat );
static void CompleteNegativeFormatString( String& rStr,
- const String& rSymStr, USHORT nNegaFormat );
+ const String& rSymStr, sal_uInt16 nNegaFormat );
/** Representation of a currency (symbol position and
negative sign) in other language settings */
- static USHORT GetEffectivePositiveFormat( USHORT nIntlFormat,
- USHORT nCurrFormat, BOOL bBank );
- static USHORT GetEffectiveNegativeFormat( USHORT nIntlFormat,
- USHORT nCurrFormat, BOOL bBank );
+ static sal_uInt16 GetEffectivePositiveFormat( sal_uInt16 nIntlFormat,
+ sal_uInt16 nCurrFormat, sal_Bool bBank );
+ static sal_uInt16 GetEffectiveNegativeFormat( sal_uInt16 nIntlFormat,
+ sal_uInt16 nCurrFormat, sal_Bool bBank );
/// General Unicode Euro symbol
static inline sal_Unicode GetEuroSymbol() { return sal_Unicode(0x20AC); }
@@ -359,23 +359,23 @@ public:
/// Set CallBack to ColorTable
void SetColorLink( const Link& rColorTableCallBack ) { aColorLink = rColorTableCallBack; }
/// Do the CallBack to ColorTable
- Color* GetUserDefColor(USHORT nIndex);
+ Color* GetUserDefColor(sal_uInt16 nIndex);
/// Change language/country, also input and format scanner
void ChangeIntl( LanguageType eLnge );
/// Change the reference null date
- void ChangeNullDate(USHORT nDay, USHORT nMonth, USHORT nYear);
+ void ChangeNullDate(sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear);
/// Change standard precision
void ChangeStandardPrec(short nPrec);
/// Set zero value suppression
- void SetNoZero(BOOL bNZ) { bNoZero = bNZ; }
+ void SetNoZero(sal_Bool bNZ) { bNoZero = bNZ; }
/** The language with which the formatter was initialized (system setting),
NOT the current language after a ChangeIntl() */
LanguageType GetLanguage() const { return IniLnge; }
// Determine whether two format types are input compatible or not
- BOOL IsCompatible(short eOldType, short eNewType);
+ sal_Bool IsCompatible(short eOldType, short eNewType);
/** Get table of formats of a specific type of a locale. A format FIndex is
tested whether it has the type and locale requested, if it doesn't
@@ -414,13 +414,13 @@ public:
nType contains the type of the format.
nKey contains the index key of the format.
*/
- BOOL PutEntry( String& rString, xub_StrLen& nCheckPos, short& nType, sal_uInt32& nKey,
+ sal_Bool PutEntry( String& rString, xub_StrLen& nCheckPos, short& nType, sal_uInt32& nKey,
LanguageType eLnge = LANGUAGE_DONTKNOW );
/** Same as <method>PutEntry</method> but the format code string is
considered to be of language/country eLnge and is converted to
language/country eNewLnge */
- BOOL PutandConvertEntry( String& rString, xub_StrLen& nCheckPos,
+ sal_Bool PutandConvertEntry( String& rString, xub_StrLen& nCheckPos,
short& nType, sal_uInt32& nKey,
LanguageType eLnge, LanguageType eNewLnge );
@@ -428,7 +428,7 @@ public:
is considered to be of the System language/country eLnge and is
converted to another System language/country eNewLnge. In this case
the automatic currency is converted too. */
- BOOL PutandConvertEntrySystem( String& rString, xub_StrLen& nCheckPos,
+ sal_Bool PutandConvertEntrySystem( String& rString, xub_StrLen& nCheckPos,
short& nType, sal_uInt32& nKey,
LanguageType eLnge, LanguageType eNewLnge );
@@ -466,20 +466,20 @@ public:
was empty, could not be converted or has errors, the eLnge locale's
standard number format is chosen instead. The index key is
guaranteed to represent some valid number format. If
- rNewInserted==FALSE and rCheckPos>0 the format code has errors
+ rNewInserted==sal_False and rCheckPos>0 the format code has errors
and/or could not be converted.
*/
sal_uInt32 GetIndexPuttingAndConverting( String & rString, LanguageType eLnge,
LanguageType eSysLnge, short & rType,
- BOOL & rNewInserted,
+ sal_Bool & rNewInserted,
xub_StrLen & rCheckPos );
/** Create a format code string using format nIndex as a template and
applying other settings (passed from the dialog) */
void GenerateFormat( String& sString, sal_uInt32 nIndex,
LanguageType eLnge = LANGUAGE_DONTKNOW,
- BOOL bThousand = FALSE, BOOL IsRed = FALSE,
- USHORT nPrecision = 0, USHORT nAnzLeading = 1 );
+ sal_Bool bThousand = sal_False, sal_Bool IsRed = sal_False,
+ sal_uInt16 nPrecision = 0, sal_uInt16 nAnzLeading = 1 );
/** Analyze an input string
@return
@@ -488,7 +488,7 @@ public:
returned in fOutNumber
<FALSE/> if input is not a number
*/
- BOOL IsNumberFormat( const String& sString, sal_uInt32& F_Index, double& fOutNumber );
+ sal_Bool IsNumberFormat( const String& sString, sal_uInt32& F_Index, double& fOutNumber );
/// Format a number according to a format index, return string and color
void GetOutputString( const double& fOutNumber, sal_uInt32 nFIndex,
@@ -510,13 +510,13 @@ public:
<FALSE/> if format code contains an error
<TRUE/> else, in which case the string and color are returned.
*/
- BOOL GetPreviewString( const String& sFormatString, double fPreviewNumber,
+ sal_Bool GetPreviewString( const String& sFormatString, double fPreviewNumber,
String& sOutString, Color** ppColor,
LanguageType eLnge = LANGUAGE_DONTKNOW );
/** Same as <method>GetPreviewString</method> but the format code string
may be either language/country eLnge or en_US english US */
- BOOL GetPreviewStringGuess( const String& sFormatString, double fPreviewNumber,
+ sal_Bool GetPreviewStringGuess( const String& sFormatString, double fPreviewNumber,
String& sOutString, Color** ppColor,
LanguageType eLnge = LANGUAGE_DONTKNOW );
@@ -525,7 +525,7 @@ public:
<FALSE/> if format code contains an error
<TRUE/> else, in which case the string and color are returned.
*/
- BOOL GetPreviewString( const String& sFormatString, const String& sPreviewString,
+ sal_Bool GetPreviewString( const String& sFormatString, const String& sPreviewString,
String& sOutString, Color** ppColor,
LanguageType eLnge = LANGUAGE_DONTKNOW );
@@ -537,14 +537,14 @@ public:
LanguageType eLnge = LANGUAGE_DONTKNOW );
/// Whether format index nFIndex is of type text or not
- BOOL IsTextFormat(sal_uInt32 nFIndex) const;
+ sal_Bool IsTextFormat(sal_uInt32 nFIndex) const;
/// Whether the 4th string subcode of format index nFIndex is present
- BOOL HasTextFormat(sal_uInt32 nFIndex) const;
+ sal_Bool HasTextFormat(sal_uInt32 nFIndex) const;
/// Load all formats from a stream
- BOOL Load( SvStream& rStream );
+ sal_Bool Load( SvStream& rStream );
/// Save all formats to a stream
- BOOL Save( SvStream& rStream ) const;
+ sal_Bool Save( SvStream& rStream ) const;
/// Reset of "Used" flags
void PrepareSave();
@@ -552,11 +552,11 @@ public:
void SetFormatUsed(sal_uInt32 nFIndex);
/// Get additional info of a format index, e.g. for dialog box
- void GetFormatSpecialInfo(sal_uInt32 nFormat, BOOL& bThousand, BOOL& IsRed,
- USHORT& nPrecision, USHORT& nAnzLeading);
+ void GetFormatSpecialInfo(sal_uInt32 nFormat, sal_Bool& bThousand, sal_Bool& IsRed,
+ sal_uInt16& nPrecision, sal_uInt16& nAnzLeading);
/// Count of decimals
- USHORT GetFormatPrecision( sal_uInt32 nFormat ) const;
+ sal_uInt16 GetFormatPrecision( sal_uInt32 nFormat ) const;
/** Get additional info of a format code string, e.g. for dialog box.
Uses a temporary parse, if possible use only if format code is not
@@ -565,12 +565,12 @@ public:
0 if format code string parsed without errors, otherwise error
position (like nCheckPos on <method>PutEntry</method>)
*/
- sal_uInt32 GetFormatSpecialInfo( const String&, BOOL& bThousand, BOOL& IsRed,
- USHORT& nPrecision, USHORT& nAnzLeading,
+ sal_uInt32 GetFormatSpecialInfo( const String&, sal_Bool& bThousand, sal_Bool& IsRed,
+ sal_uInt16& nPrecision, sal_uInt16& nAnzLeading,
LanguageType eLnge = LANGUAGE_DONTKNOW );
/// Check if format code string may be deleted by user
- BOOL IsUserDefined( const String& sStr, LanguageType eLnge = LANGUAGE_DONTKNOW );
+ sal_Bool IsUserDefined( const String& sStr, LanguageType eLnge = LANGUAGE_DONTKNOW );
/** Return the format index of the format code string for language/country,
or NUMBERFORMAT_ENTRY_NOT_FOUND */
@@ -598,14 +598,14 @@ public:
LanguageType eLnge );
/// Whether nFIndex is a special builtin format
- BOOL IsSpecialStandardFormat( sal_uInt32 nFIndex, LanguageType eLnge );
+ sal_Bool IsSpecialStandardFormat( sal_uInt32 nFIndex, LanguageType eLnge );
/// Return the reference date
Date* GetNullDate();
/// Return the standard decimal precision
sal_uInt16 GetStandardPrec();
/// Return whether zero suppression is switched on
- BOOL GetNoZero() { return bNoZero; }
+ sal_Bool GetNoZero() { return bNoZero; }
/** Get the type of a format (or NUMBERFORMAT_UNDEFINED if no entry),
but with NUMBERFORMAT_DEFINED masked out */
short GetType(sal_uInt32 nFIndex);
@@ -616,7 +616,7 @@ public:
SvNumberFormatterIndexTable* MergeFormatter(SvNumberFormatter& rNewTable);
/// Whether a merge table is present or not
- inline BOOL HasMergeFmtTbl() const;
+ inline sal_Bool HasMergeFmtTbl() const;
/// Return the new format index for an old format index, if a merge table exists
inline sal_uInt32 GetMergeFmtIndex( sal_uInt32 nOldFmt ) const;
@@ -626,7 +626,7 @@ public:
SvNumberFormatterMergeMap ConvertMergeTableToMap();
/// Return the last used position ever of a language/country combination
- USHORT GetLastInsertKey(sal_uInt32 CLOffset);
+ sal_uInt16 GetLastInsertKey(sal_uInt32 CLOffset);
/** Return the format index of a builtin format for a specific language/country.
If nFormat is not a builtin format nFormat is returned. */
@@ -659,12 +659,12 @@ public:
The name Year2000 is kept although the actual functionality is now a
TwoDigitYearStart which might be in any century.
*/
- void SetYear2000( USHORT nVal );
- USHORT GetYear2000() const;
- static USHORT GetYear2000Default();
+ void SetYear2000( sal_uInt16 nVal );
+ sal_uInt16 GetYear2000() const;
+ static sal_uInt16 GetYear2000Default();
- USHORT ExpandTwoDigitYear( USHORT nYear ) const;
- inline static USHORT ExpandTwoDigitYear( USHORT nYear, USHORT nTwoDigitYearStart );
+ sal_uInt16 ExpandTwoDigitYear( sal_uInt16 nYear ) const;
+ inline static sal_uInt16 ExpandTwoDigitYear( sal_uInt16 nYear, sal_uInt16 nTwoDigitYearStart );
/// DEPRICATED: Return first character of the decimal separator of the current language/country
sal_Unicode GetDecSep() const { return GetNumDecimalSep().GetChar(0); }
@@ -729,16 +729,16 @@ public:
@return
position of default format
*/
- USHORT GetCurrencyFormatStrings( NfWSStringsDtor&, const NfCurrencyEntry&,
- BOOL bBank ) const;
+ sal_uInt16 GetCurrencyFormatStrings( NfWSStringsDtor&, const NfCurrencyEntry&,
+ sal_Bool bBank ) const;
/** Whether nFormat is of type NUMBERFORMAT_CURRENCY and the format code
contains a new SYMBOLTYPE_CURRENCY and if so which one [$xxx-nnn].
If ppEntry is not NULL and exactly one entry is found, a [$xxx-nnn] is
returned, even if the format code only contains [$xxx] !
*/
- BOOL GetNewCurrencySymbolString( sal_uInt32 nFormat, String& rSymbol,
- const NfCurrencyEntry** ppEntry = NULL, BOOL* pBank = NULL ) const;
+ sal_Bool GetNewCurrencySymbolString( sal_uInt32 nFormat, String& rSymbol,
+ const NfCurrencyEntry** ppEntry = NULL, sal_Bool* pBank = NULL ) const;
/** Look up the corresponding <type>NfCurrencyEntry</type> matching
rSymbol (may be CurrencySymbol or CurrencyAbbreviation) and possibly
@@ -776,9 +776,9 @@ public:
The matching entry if unique (in which case bFoundBank is set),
else <NULL/>.
*/
- static const NfCurrencyEntry* GetCurrencyEntry( BOOL & bFoundBank,
+ static const NfCurrencyEntry* GetCurrencyEntry( sal_Bool & bFoundBank,
const String& rSymbol, const String& rExtension,
- LanguageType eFormatLanguage, BOOL bOnlyStringLanguage = FALSE );
+ LanguageType eFormatLanguage, sal_Bool bOnlyStringLanguage = sal_False );
/// Get compatibility ("automatic" old style) currency from I18N locale data
void GetCompatibilityCurrency( String& rSymbol, String& rAbbrev ) const;
@@ -791,7 +791,7 @@ public:
/** Return a keyword for a language/country and <type>NfKeywordIndex</type>
for XML import, to generate number format strings. */
- String GetKeyword( LanguageType eLnge, USHORT nIndex );
+ String GetKeyword( LanguageType eLnge, sal_uInt16 nIndex );
/** Return the GENERAL keyword in proper case ("General") for a
language/country, used in XML import */
@@ -821,7 +821,7 @@ private:
LanguageType IniLnge; // Initialized setting language/country
LanguageType ActLnge; // Current setting language/country
NfEvalDateFormat eEvalDateFormat; // DateFormat evaluation
- BOOL bNoZero; // Zero value suppression
+ sal_Bool bNoZero; // Zero value suppression
// cached locale data items needed almost any time
String aDecimalSep;
@@ -830,8 +830,8 @@ private:
#ifdef _ZFORLIST_CXX // ----- private Methoden -----
- SVL_DLLPRIVATE static BOOL bCurrencyTableInitialized;
- SVL_DLLPRIVATE static USHORT nSystemCurrencyPosition;
+ SVL_DLLPRIVATE static sal_Bool bCurrencyTableInitialized;
+ SVL_DLLPRIVATE static sal_uInt16 nSystemCurrencyPosition;
SVL_DLLPRIVATE static SvNumberFormatterRegistry_Impl* pFormatterRegistry;
// get the registry, create one if none exists
@@ -842,29 +842,29 @@ private:
// Changes initialized language/country, clears the entries and generates
// new ones, may ONLY be called by the binary file format load
- SVL_DLLPRIVATE void ImpChangeSysCL( LanguageType eLnge, BOOL bLoadingSO5 );
+ SVL_DLLPRIVATE void ImpChangeSysCL( LanguageType eLnge, sal_Bool bLoadingSO5 );
// Generate builtin formats provided by i18n behind CLOffset,
- // if bLoadingSO5==FALSE also generate additional i18n formats.
- SVL_DLLPRIVATE void ImpGenerateFormats( sal_uInt32 CLOffset, BOOL bLoadingSO5 );
+ // if bLoadingSO5==sal_False also generate additional i18n formats.
+ SVL_DLLPRIVATE void ImpGenerateFormats( sal_uInt32 CLOffset, sal_Bool bLoadingSO5 );
// Generate additional formats provided by i18n
SVL_DLLPRIVATE void ImpGenerateAdditionalFormats(
sal_uInt32 CLOffset,
NumberFormatCodeWrapper& rNumberFormatCode,
- BOOL bAfterLoadingSO5 );
+ sal_Bool bAfterLoadingSO5 );
SVL_DLLPRIVATE SvNumberformat* ImpInsertFormat(
const ::com::sun::star::i18n::NumberFormatCode& rCode,
sal_uInt32 nPos,
- BOOL bAfterLoadingSO5 = FALSE,
+ sal_Bool bAfterLoadingSO5 = sal_False,
sal_Int16 nOrgIndex = 0 );
// ImpInsertNewStandardFormat for new (since version ...) builtin formats
SVL_DLLPRIVATE SvNumberformat* ImpInsertNewStandardFormat(
const ::com::sun::star::i18n::NumberFormatCode& rCode,
sal_uInt32 nPos,
- USHORT nVersion,
- BOOL bAfterLoadingSO5 = FALSE,
+ sal_uInt16 nVersion,
+ sal_Bool bAfterLoadingSO5 = sal_False,
sal_Int16 nOrgIndex = 0 );
// Return CLOffset or (MaxCLOffset + SV_COUNTRY_LANGUAGE_OFFSET) if new language/country
@@ -877,7 +877,7 @@ private:
LanguageType eLnge );
// Create builtin formats for language/country if necessary, return CLOffset
- SVL_DLLPRIVATE sal_uInt32 ImpGenerateCL( LanguageType eLnge, BOOL bLoadingSO5 = FALSE );
+ SVL_DLLPRIVATE sal_uInt32 ImpGenerateCL( LanguageType eLnge, sal_Bool bLoadingSO5 = sal_False );
// Build negative currency format, old compatibility style
SVL_DLLPRIVATE void ImpGetNegCurrFormat( String& sNegStr, const String& rCurrSymbol );
@@ -914,16 +914,16 @@ private:
// FormatElement group.
SVL_DLLPRIVATE sal_Int32 ImpAdjustFormatCodeDefault(
::com::sun::star::i18n::NumberFormatCode * pFormatArr,
- sal_Int32 nCount, BOOL bCheckCorrectness = TRUE
+ sal_Int32 nCount, sal_Bool bCheckCorrectness = sal_True
);
// used as a loop body inside of GetNewCurrencySymbolString() and GetCurrencyEntry()
#ifndef DBG_UTIL
inline
#endif
- static BOOL ImpLookupCurrencyEntryLoopBody(
- const NfCurrencyEntry*& pFoundEntry, BOOL& bFoundBank,
- const NfCurrencyEntry* pData, USHORT nPos, const String& rSymbol );
+ static sal_Bool ImpLookupCurrencyEntryLoopBody(
+ const NfCurrencyEntry*& pFoundEntry, sal_Bool& bFoundBank,
+ const NfCurrencyEntry* pData, sal_uInt16 nPos, const String& rSymbol );
// link to be set at <method>SvtSysLocaleOptions::SetCurrencyChangeLink()</method>
DECL_DLLPRIVATE_STATIC_LINK( SvNumberFormatter, CurrencyChangeLink, void* );
@@ -1006,15 +1006,15 @@ inline sal_uInt32 SvNumberFormatter::GetMergeFmtIndex( sal_uInt32 nOldFmt ) cons
return pU ? *pU : nOldFmt;
}
-inline BOOL SvNumberFormatter::HasMergeFmtTbl() const
+inline sal_Bool SvNumberFormatter::HasMergeFmtTbl() const
{
return pMergeTable && (0 != pMergeTable->Count());
}
// static
-inline USHORT SvNumberFormatter::ExpandTwoDigitYear(
- USHORT nYear, USHORT nTwoDigitYearStart )
+inline sal_uInt16 SvNumberFormatter::ExpandTwoDigitYear(
+ sal_uInt16 nYear, sal_uInt16 nTwoDigitYearStart )
{
if ( nYear < 100 )
{
diff --git a/svl/inc/svl/zformat.hxx b/svl/inc/svl/zformat.hxx
index 7c361382796a..f610b44c4b6b 100644
--- a/svl/inc/svl/zformat.hxx
+++ b/svl/inc/svl/zformat.hxx
@@ -78,16 +78,16 @@ struct ImpSvNumberformatInfo // Struct for FormatInfo
{
String* sStrArray; // Array of symbols
short* nTypeArray; // Array of infos
- USHORT nThousand; // Count of group separator sequences
- USHORT nCntPre; // Count of digits before decimal point
- USHORT nCntPost; // Count of digits after decimal point
- USHORT nCntExp; // Count of exponent digits, or AM/PM
+ sal_uInt16 nThousand; // Count of group separator sequences
+ sal_uInt16 nCntPre; // Count of digits before decimal point
+ sal_uInt16 nCntPost; // Count of digits after decimal point
+ sal_uInt16 nCntExp; // Count of exponent digits, or AM/PM
short eScannedType; // Type determined by scan
- BOOL bThousand; // Has group (AKA thousand) separator
+ sal_Bool bThousand; // Has group (AKA thousand) separator
- void Copy( const ImpSvNumberformatInfo& rNumFor, USHORT nAnz );
- void Load(SvStream& rStream, USHORT nAnz);
- void Save(SvStream& rStream, USHORT nAnz) const;
+ void Copy( const ImpSvNumberformatInfo& rNumFor, sal_uInt16 nAnz );
+ void Load(SvStream& rStream, sal_uInt16 nAnz);
+ void Save(SvStream& rStream, sal_uInt16 nAnz) const;
};
// NativeNumber, represent numbers using CJK or other digits if nNum>0,
@@ -95,32 +95,32 @@ struct ImpSvNumberformatInfo // Struct for FormatInfo
class SvNumberNatNum
{
LanguageType eLang;
- BYTE nNum;
- BOOL bDBNum :1; // DBNum, to be converted to NatNum
- BOOL bDate :1; // Used in date? (needed for DBNum/NatNum mapping)
- BOOL bSet :1; // If set, since NatNum0 is possible
+ sal_uInt8 nNum;
+ sal_Bool bDBNum :1; // DBNum, to be converted to NatNum
+ sal_Bool bDate :1; // Used in date? (needed for DBNum/NatNum mapping)
+ sal_Bool bSet :1; // If set, since NatNum0 is possible
public:
- static BYTE MapDBNumToNatNum( BYTE nDBNum, LanguageType eLang, BOOL bDate );
- static BYTE MapNatNumToDBNum( BYTE nNatNum, LanguageType eLang, BOOL bDate );
+ static sal_uInt8 MapDBNumToNatNum( sal_uInt8 nDBNum, LanguageType eLang, sal_Bool bDate );
+ static sal_uInt8 MapNatNumToDBNum( sal_uInt8 nNatNum, LanguageType eLang, sal_Bool bDate );
SvNumberNatNum() : eLang( LANGUAGE_DONTKNOW ), nNum(0),
bDBNum(0), bDate(0), bSet(0) {}
- BOOL IsComplete() const { return bSet && eLang != LANGUAGE_DONTKNOW; }
- BYTE GetRawNum() const { return nNum; }
- BYTE GetNatNum() const { return bDBNum ? MapDBNumToNatNum( nNum, eLang, bDate ) : nNum; }
- BYTE GetDBNum() const { return bDBNum ? nNum : MapNatNumToDBNum( nNum, eLang, bDate ); }
+ sal_Bool IsComplete() const { return bSet && eLang != LANGUAGE_DONTKNOW; }
+ sal_uInt8 GetRawNum() const { return nNum; }
+ sal_uInt8 GetNatNum() const { return bDBNum ? MapDBNumToNatNum( nNum, eLang, bDate ) : nNum; }
+ sal_uInt8 GetDBNum() const { return bDBNum ? nNum : MapNatNumToDBNum( nNum, eLang, bDate ); }
LanguageType GetLang() const { return eLang; }
void SetLang( LanguageType e ) { eLang = e; }
- void SetNum( BYTE nNumber, BOOL bDBNumber )
+ void SetNum( sal_uInt8 nNumber, sal_Bool bDBNumber )
{
nNum = nNumber;
bDBNum = bDBNumber;
- bSet = TRUE;
+ bSet = sal_True;
}
- BOOL IsSet() const { return bSet; }
- void SetDate( BOOL bDateP ) { bDate = (bDateP != 0); }
+ sal_Bool IsSet() const { return bSet; }
+ void SetDate( sal_Bool bDateP ) { bDate = (bDateP != 0); }
};
class CharClass;
@@ -131,7 +131,7 @@ public:
ImpSvNumFor(); // Ctor without filling the Info
~ImpSvNumFor();
- void Enlarge(USHORT nAnz); // Init of arrays to the right size
+ void Enlarge(sal_uInt16 nAnz); // Init of arrays to the right size
void Load( SvStream& rStream, ImpSvNumberformatScan& rSc,
String& rLoadedColorName);
void Save( SvStream& rStream ) const;
@@ -144,7 +144,7 @@ public:
const ImpSvNumberformatInfo& Info() const { return aI; }
// Get count of substrings (symbols)
- USHORT GetnAnz() const { return nAnzStrings;}
+ sal_uInt16 GetnAnz() const { return nAnzStrings;}
Color* GetColor() const { return pColor; }
void SetColor( Color* pCol, String& rName )
@@ -152,22 +152,22 @@ public:
const String& GetColorName() const { return sColorName; }
// new SYMBOLTYPE_CURRENCY in subformat?
- BOOL HasNewCurrency() const;
- BOOL GetNewCurrencySymbol( String& rSymbol, String& rExtension ) const;
+ sal_Bool HasNewCurrency() const;
+ sal_Bool GetNewCurrencySymbol( String& rSymbol, String& rExtension ) const;
void SaveNewCurrencyMap( SvStream& rStream ) const;
void LoadNewCurrencyMap( SvStream& rStream );
// [NatNum1], [NatNum2], ...
- void SetNatNumNum( BYTE nNum, BOOL bDBNum ) { aNatNum.SetNum( nNum, bDBNum ); }
+ void SetNatNumNum( sal_uInt8 nNum, sal_Bool bDBNum ) { aNatNum.SetNum( nNum, bDBNum ); }
void SetNatNumLang( LanguageType eLang ) { aNatNum.SetLang( eLang ); }
- void SetNatNumDate( BOOL bDate ) { aNatNum.SetDate( bDate ); }
+ void SetNatNumDate( sal_Bool bDate ) { aNatNum.SetDate( bDate ); }
const SvNumberNatNum& GetNatNum() const { return aNatNum; }
private:
ImpSvNumberformatInfo aI; // Hilfsstruct fuer die restlichen Infos
String sColorName; // color name
Color* pColor; // pointer to color of subformat
- USHORT nAnzStrings; // count of symbols
+ sal_uInt16 nAnzStrings; // count of symbols
SvNumberNatNum aNatNum; // DoubleByteNumber
};
@@ -184,7 +184,7 @@ public:
ImpSvNumberInputScan* pISc,
xub_StrLen& nCheckPos,
LanguageType& eLan,
- BOOL bStand = FALSE );
+ sal_Bool bStand = sal_False );
// Copy ctor
SvNumberformat( SvNumberformat& rFormat );
@@ -202,16 +202,16 @@ public:
void SetType(const short eSetType) { eType = eSetType; }
// Standard means the I18N defined standard format of this type
- void SetStandard() { bStandard = TRUE; }
- BOOL IsStandard() const { return bStandard; }
+ void SetStandard() { bStandard = sal_True; }
+ sal_Bool IsStandard() const { return bStandard; }
// For versions before version nVer it is UserDefined, for newer versions
// it is builtin. nVer of SV_NUMBERFORMATTER_VERSION_...
- void SetNewStandardDefined( USHORT nVer )
+ void SetNewStandardDefined( sal_uInt16 nVer )
{ nNewStandardDefined = nVer; eType |= NUMBERFORMAT_DEFINED; }
- USHORT GetNewStandardDefined() const { return nNewStandardDefined; }
- BOOL IsAdditionalStandardDefined() const
+ sal_uInt16 GetNewStandardDefined() const { return nNewStandardDefined; }
+ sal_Bool IsAdditionalStandardDefined() const
{ return nNewStandardDefined == SV_NUMBERFORMATTER_VERSION_ADDITIONAL_I18N_FORMATS; }
LanguageType GetLanguage() const { return eLnge;}
@@ -221,12 +221,12 @@ public:
// Build a format string of application defined keywords
String GetMappedFormatstring( const NfKeywordTable& rKeywords,
const LocaleDataWrapper& rLoc,
- BOOL bDontQuote = FALSE ) const;
+ sal_Bool bDontQuote = sal_False ) const;
- void SetUsed(const BOOL b) { bIsUsed = b; }
- BOOL GetUsed() const { return bIsUsed; }
- BOOL IsStarFormatSupported() const { return bStarFlag; }
- void SetStarFormatSupport( BOOL b ) { bStarFlag = b; }
+ void SetUsed(const sal_Bool b) { bIsUsed = b; }
+ sal_Bool GetUsed() const { return bIsUsed; }
+ sal_Bool IsStarFormatSupported() const { return bStarFlag; }
+ void SetStarFormatSupport( sal_Bool b ) { bStarFlag = b; }
NfHackConversion Load( SvStream& rStream, ImpSvNumMultipleReadHeader& rHdr,
SvNumberFormatter* pConverter, ImpSvNumberInputScan& rISc );
@@ -242,54 +242,54 @@ public:
*/
bool GetOutputString( double fNumber, sal_uInt16 nCharCount, String& rOutString ) const;
- BOOL GetOutputString( double fNumber, String& OutString, Color** ppColor );
- BOOL GetOutputString( String& sString, String& OutString, Color** ppColor );
+ sal_Bool GetOutputString( double fNumber, String& OutString, Color** ppColor );
+ sal_Bool GetOutputString( String& sString, String& OutString, Color** ppColor );
// True if type text
- BOOL IsTextFormat() const { return (eType & NUMBERFORMAT_TEXT) != 0; }
+ sal_Bool IsTextFormat() const { return (eType & NUMBERFORMAT_TEXT) != 0; }
// True if 4th subformat present
- BOOL HasTextFormat() const
+ sal_Bool HasTextFormat() const
{
return (NumFor[3].GetnAnz() > 0) ||
(NumFor[3].Info().eScannedType == NUMBERFORMAT_TEXT);
}
- void GetFormatSpecialInfo(BOOL& bThousand,
- BOOL& IsRed,
- USHORT& nPrecision,
- USHORT& nAnzLeading) const;
+ void GetFormatSpecialInfo(sal_Bool& bThousand,
+ sal_Bool& IsRed,
+ sal_uInt16& nPrecision,
+ sal_uInt16& nAnzLeading) const;
/// Count of decimal precision
- USHORT GetFormatPrecision() const { return NumFor[0].Info().nCntPost; }
+ sal_uInt16 GetFormatPrecision() const { return NumFor[0].Info().nCntPost; }
- //! Read/write access on a special USHORT component, may only be used on the
+ //! Read/write access on a special sal_uInt16 component, may only be used on the
//! standard format 0, 5000, ... and only by the number formatter!
- USHORT GetLastInsertKey() const
+ sal_uInt16 GetLastInsertKey() const
{ return NumFor[0].Info().nThousand; }
- void SetLastInsertKey(USHORT nKey)
+ void SetLastInsertKey(sal_uInt16 nKey)
{ NumFor[0].Info().nThousand = nKey; }
//! Only onLoad: convert from stored to current system language/country
void ConvertLanguage( SvNumberFormatter& rConverter,
- LanguageType eConvertFrom, LanguageType eConvertTo, BOOL bSystem = FALSE );
+ LanguageType eConvertFrom, LanguageType eConvertTo, sal_Bool bSystem = sal_False );
// Substring of a subformat code nNumFor (0..3)
// nPos == 0xFFFF => last substring
- // bString==TRUE: first/last SYMBOLTYPE_STRING or SYMBOLTYPE_CURRENCY
- const String* GetNumForString( USHORT nNumFor, USHORT nPos,
- BOOL bString = FALSE ) const;
+ // bString==sal_True: first/last SYMBOLTYPE_STRING or SYMBOLTYPE_CURRENCY
+ const String* GetNumForString( sal_uInt16 nNumFor, sal_uInt16 nPos,
+ sal_Bool bString = sal_False ) const;
// Subtype of a subformat code nNumFor (0..3)
// nPos == 0xFFFF => last substring
- // bString==TRUE: first/last SYMBOLTYPE_STRING or SYMBOLTYPE_CURRENCY
- short GetNumForType( USHORT nNumFor, USHORT nPos, BOOL bString = FALSE ) const;
+ // bString==sal_True: first/last SYMBOLTYPE_STRING or SYMBOLTYPE_CURRENCY
+ short GetNumForType( sal_uInt16 nNumFor, sal_uInt16 nPos, sal_Bool bString = sal_False ) const;
/** If the count of string elements (substrings, ignoring [modifiers] and
so on) in a subformat code nNumFor (0..3) is equal to the given number.
Used by ImpSvNumberInputScan::IsNumberFormatMain() to detect a matched
format. */
- BOOL IsNumForStringElementCountEqual( USHORT nNumFor, USHORT nAllCount,
- USHORT nNumCount ) const
+ sal_Bool IsNumForStringElementCountEqual( sal_uInt16 nNumFor, sal_uInt16 nAllCount,
+ sal_uInt16 nNumCount ) const
{
if ( nNumFor < 4 )
{
@@ -298,19 +298,19 @@ public:
// strings of the format were matched and not just the starting
// sequence, so we don't have to check if GetnAnz() includes
// [modifiers] or anything else if both counts are equal.
- USHORT nCnt = NumFor[nNumFor].GetnAnz();
+ sal_uInt16 nCnt = NumFor[nNumFor].GetnAnz();
if ( nAllCount == nCnt )
- return TRUE;
+ return sal_True;
if ( nAllCount < nCnt ) // check ignoring [modifiers] and so on
return ImpGetNumForStringElementCount( nNumFor ) ==
(nAllCount - nNumCount);
}
- return FALSE;
+ return sal_False;
}
// Whether the second subformat code is really for negative numbers
// or another limit set.
- BOOL IsNegativeRealNegative() const
+ sal_Bool IsNegativeRealNegative() const
{
return fLimit1 == 0.0 && fLimit2 == 0.0 &&
( (eOp1 == NUMBERFORMAT_OP_GE && eOp2 == NUMBERFORMAT_OP_NO) ||
@@ -319,37 +319,37 @@ public:
}
// Whether the negative format is without a sign or not
- BOOL IsNegativeWithoutSign() const;
+ sal_Bool IsNegativeWithoutSign() const;
// Whether a new SYMBOLTYPE_CURRENCY is contained in the format
- BOOL HasNewCurrency() const;
+ sal_Bool HasNewCurrency() const;
// Build string from NewCurrency for saving it SO50 compatible
void Build50Formatstring( String& rStr ) const;
// strip [$-yyy] from all [$xxx-yyy] leaving only xxx's,
- // if bQuoteSymbol==TRUE the xxx will become "xxx"
+ // if bQuoteSymbol==sal_True the xxx will become "xxx"
static String StripNewCurrencyDelimiters( const String& rStr,
- BOOL bQuoteSymbol );
+ sal_Bool bQuoteSymbol );
// If a new SYMBOLTYPE_CURRENCY is contained if the format is of type
// NUMBERFORMAT_CURRENCY, and if so the symbol xxx and the extension nnn
// of [$xxx-nnn] are returned
- BOOL GetNewCurrencySymbol( String& rSymbol, String& rExtension ) const;
+ sal_Bool GetNewCurrencySymbol( String& rSymbol, String& rExtension ) const;
- static BOOL HasStringNegativeSign( const String& rStr );
+ static sal_Bool HasStringNegativeSign( const String& rStr );
/**
Whether a character at position nPos is somewhere between two matching
cQuote or not.
- If nPos points to a cQuote, a TRUE is returned on an opening cQuote,
- a FALSE is returned on a closing cQuote.
+ If nPos points to a cQuote, a sal_True is returned on an opening cQuote,
+ a sal_False is returned on a closing cQuote.
A cQuote between quotes may be escaped by a cEscIn, a cQuote outside of
quotes may be escaped by a cEscOut.
The default '\0' results in no escapement possible.
Defaults are set right according to the "unlogic" of the Numberformatter
*/
- static BOOL IsInQuote( const String& rString, xub_StrLen nPos,
+ static sal_Bool IsInQuote( const String& rString, xub_StrLen nPos,
sal_Unicode cQuote = '"',
sal_Unicode cEscIn = '\0', sal_Unicode cEscOut = '\\' );
@@ -401,23 +401,23 @@ public:
// used in XML export
void GetConditions( SvNumberformatLimitOps& rOper1, double& rVal1,
SvNumberformatLimitOps& rOper2, double& rVal2 ) const;
- Color* GetColor( USHORT nNumFor ) const;
- void GetNumForInfo( USHORT nNumFor, short& rScannedType,
- BOOL& bThousand, USHORT& nPrecision, USHORT& nAnzLeading ) const;
+ Color* GetColor( sal_uInt16 nNumFor ) const;
+ void GetNumForInfo( sal_uInt16 nNumFor, short& rScannedType,
+ sal_Bool& bThousand, sal_uInt16& nPrecision, sal_uInt16& nAnzLeading ) const;
// rAttr.Number not empty if NatNum attributes are to be stored
void GetNatNumXml(
::com::sun::star::i18n::NativeNumberXmlAttributes& rAttr,
- USHORT nNumFor ) const;
+ sal_uInt16 nNumFor ) const;
/** @returns <TRUE/> if E,EE,R,RR,AAA,AAAA in format code of subformat
nNumFor (0..3) and <b>no</b> preceding calendar was specified and the
currently loaded calendar is "gregorian". */
- BOOL IsOtherCalendar( USHORT nNumFor ) const
+ sal_Bool IsOtherCalendar( sal_uInt16 nNumFor ) const
{
if ( nNumFor < 4 )
return ImpIsOtherCalendar( NumFor[nNumFor] );
- return FALSE;
+ return sal_False;
}
/** Switches to the first non-"gregorian" calendar, but only if the current
@@ -439,13 +439,13 @@ public:
<TRUE/> if a calendar was specified and switched to,
<FALSE/> else.
*/
- BOOL SwitchToSpecifiedCalendar( String& rOrgCalendar, double& fOrgDateTime,
- USHORT nNumFor ) const
+ sal_Bool SwitchToSpecifiedCalendar( String& rOrgCalendar, double& fOrgDateTime,
+ sal_uInt16 nNumFor ) const
{
if ( nNumFor < 4 )
return ImpSwitchToSpecifiedCalendar( rOrgCalendar,
fOrgDateTime, NumFor[nNumFor] );
- return FALSE;
+ return sal_False;
}
private:
@@ -458,17 +458,17 @@ private:
LanguageType eLnge; // Language/country of the format
SvNumberformatLimitOps eOp1; // Operator for first condition
SvNumberformatLimitOps eOp2; // Operator for second condition
- USHORT nNewStandardDefined; // new builtin formats as of version 6
+ sal_uInt16 nNewStandardDefined; // new builtin formats as of version 6
short eType; // Type of format
- BOOL bStarFlag; // Take *n format as ESC n
- BOOL bStandard; // If this is a default standard format
- BOOL bIsUsed; // Flag as used for storing
+ sal_Bool bStarFlag; // Take *n format as ESC n
+ sal_Bool bStandard; // If this is a default standard format
+ sal_Bool bIsUsed; // Flag as used for storing
- SVL_DLLPRIVATE USHORT ImpGetNumForStringElementCount( USHORT nNumFor ) const;
+ SVL_DLLPRIVATE sal_uInt16 ImpGetNumForStringElementCount( sal_uInt16 nNumFor ) const;
- SVL_DLLPRIVATE BOOL ImpIsOtherCalendar( const ImpSvNumFor& rNumFor ) const;
+ SVL_DLLPRIVATE sal_Bool ImpIsOtherCalendar( const ImpSvNumFor& rNumFor ) const;
- SVL_DLLPRIVATE BOOL ImpSwitchToSpecifiedCalendar( String& rOrgCalendar,
+ SVL_DLLPRIVATE sal_Bool ImpSwitchToSpecifiedCalendar( String& rOrgCalendar,
double& fOrgDateTime, const ImpSvNumFor& rNumFor ) const;
#ifdef _ZFORMAT_CXX // ----- private implementation methods -----
@@ -504,25 +504,25 @@ private:
double& fLimit,
SvNumberformatLimitOps eOp);
- SVL_DLLPRIVATE ULONG ImpGGT(ULONG x, ULONG y);
- SVL_DLLPRIVATE ULONG ImpGGTRound(ULONG x, ULONG y);
+ SVL_DLLPRIVATE sal_uLong ImpGGT(sal_uLong x, sal_uLong y);
+ SVL_DLLPRIVATE sal_uLong ImpGGTRound(sal_uLong x, sal_uLong y);
// Helper function for number strings
// append string symbols, insert leading 0 or ' ', or ...
- SVL_DLLPRIVATE BOOL ImpNumberFill( String& sStr,
+ SVL_DLLPRIVATE sal_Bool ImpNumberFill( String& sStr,
double& rNumber,
xub_StrLen& k,
- USHORT& j,
- USHORT nIx,
+ sal_uInt16& j,
+ sal_uInt16 nIx,
short eSymbolType );
// Helper function to fill in the integer part and the group (AKA thousand) separators
- SVL_DLLPRIVATE BOOL ImpNumberFillWithThousands( String& sStr,
+ SVL_DLLPRIVATE sal_Bool ImpNumberFillWithThousands( String& sStr,
double& rNumber,
xub_StrLen k,
- USHORT j,
- USHORT nIx,
- USHORT nDigCnt );
+ sal_uInt16 j,
+ sal_uInt16 nIx,
+ sal_uInt16 nDigCnt );
// Hilfsfunktion zum Auffuellen der Vor-
// kommazahl auch mit Tausenderpunkt
@@ -531,18 +531,18 @@ private:
SVL_DLLPRIVATE void ImpDigitFill( String& sStr,
xub_StrLen nStart,
xub_StrLen& k,
- USHORT nIx,
+ sal_uInt16 nIx,
xub_StrLen & nDigitCount,
utl::DigitGroupingIterator & );
- SVL_DLLPRIVATE BOOL ImpGetDateOutput( double fNumber,
- USHORT nIx,
+ SVL_DLLPRIVATE sal_Bool ImpGetDateOutput( double fNumber,
+ sal_uInt16 nIx,
String& OutString );
- SVL_DLLPRIVATE BOOL ImpGetTimeOutput( double fNumber,
- USHORT nIx,
+ SVL_DLLPRIVATE sal_Bool ImpGetTimeOutput( double fNumber,
+ sal_uInt16 nIx,
String& OutString );
- SVL_DLLPRIVATE BOOL ImpGetDateTimeOutput( double fNumber,
- USHORT nIx,
+ SVL_DLLPRIVATE sal_Bool ImpGetDateTimeOutput( double fNumber,
+ sal_uInt16 nIx,
String& OutString );
// Switches to the "gregorian" calendar if the current calendar is
@@ -550,7 +550,7 @@ private:
// know a "before" era (like zh_TW ROC or ja_JP Gengou). If switched and
// rOrgCalendar was "gregorian" the string is emptied. If rOrgCalendar was
// empty the previous calendar name and date/time are returned.
- SVL_DLLPRIVATE BOOL ImpFallBackToGregorianCalendar( String& rOrgCalendar, double& fOrgDateTime );
+ SVL_DLLPRIVATE sal_Bool ImpFallBackToGregorianCalendar( String& rOrgCalendar, double& fOrgDateTime );
// Append a "G" short era string of the given calendar. In the case of a
// Gengou calendar this is a one character abbreviation, for other
@@ -558,8 +558,8 @@ private:
SVL_DLLPRIVATE static void ImpAppendEraG( String& OutString, const CalendarWrapper& rCal,
sal_Int16 nNatNum );
- SVL_DLLPRIVATE BOOL ImpGetNumberOutput( double fNumber,
- USHORT nIx,
+ SVL_DLLPRIVATE sal_Bool ImpGetNumberOutput( double fNumber,
+ sal_uInt16 nIx,
String& OutString );
SVL_DLLPRIVATE void ImpCopyNumberformat( const SvNumberformat& rFormat );
@@ -567,9 +567,9 @@ private:
// normal digits or other digits, depending on ImpSvNumFor.aNatNum,
// [NatNum1], [NatNum2], ...
SVL_DLLPRIVATE String ImpGetNatNumString( const SvNumberNatNum& rNum, sal_Int32 nVal,
- USHORT nMinDigits = 0 ) const;
+ sal_uInt16 nMinDigits = 0 ) const;
- String ImpIntToString( USHORT nIx, sal_Int32 nVal, USHORT nMinDigits = 0 ) const
+ String ImpIntToString( sal_uInt16 nIx, sal_Int32 nVal, sal_uInt16 nMinDigits = 0 ) const
{
const SvNumberNatNum& rNum = NumFor[nIx].GetNatNum();
if ( nMinDigits || rNum.IsComplete() )
diff --git a/svl/prj/build.lst b/svl/prj/build.lst
index b48df3a6824a..f41b1142ae3f 100644
--- a/svl/prj/build.lst
+++ b/svl/prj/build.lst
@@ -1,3 +1,2 @@
sl svl : l10n rsc offuh ucbhelper unotools cppu cppuhelper comphelper sal sot LIBXSLT:libxslt NULL
-sl svl usr1 - all svl_mkout NULL
sl svl\prj nmake - all svl_prj NULL
diff --git a/svl/prj/makefile.mk b/svl/prj/makefile.mk
index c73a3d944bbf..e312a7ccab65 100644
--- a/svl/prj/makefile.mk
+++ b/svl/prj/makefile.mk
@@ -37,4 +37,4 @@ VERBOSEFLAG := -s
.ENDIF
all:
- cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET)
+ cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) && $(GNUMAKE) $(VERBOSEFLAG) -r deliverlog
diff --git a/svl/source/config/languageoptions.cxx b/svl/source/config/languageoptions.cxx
index 8f9aabd59500..9d9a31b85b40 100644
--- a/svl/source/config/languageoptions.cxx
+++ b/svl/source/config/languageoptions.cxx
@@ -211,7 +211,7 @@ sal_uInt16 SvtLanguageOptions::GetScriptTypeOfLanguage( sal_uInt16 nLang )
nLang = SvtSysLocale().GetLanguage();
sal_Int16 nScriptType = MsLangId::getScriptType( nLang );
- USHORT nScript;
+ sal_uInt16 nScript;
switch (nScriptType)
{
case ::com::sun::star::i18n::ScriptType::ASIAN:
diff --git a/svl/source/filerec/filerec.cxx b/svl/source/filerec/filerec.cxx
index 0d1b06be5d11..9e5a8b2027f9 100644
--- a/svl/source/filerec/filerec.cxx
+++ b/svl/source/filerec/filerec.cxx
@@ -32,12 +32,12 @@
//========================================================================
-SV_IMPL_VARARR( SfxUINT32s, UINT32 );
+SV_IMPL_VARARR( SfxUINT32s, sal_uInt32 );
//========================================================================
-/* Die folgenden Makros extrahieren Teilbereiche aus einem UINT32 Wert.
- Diese UINT32-Werte werden anstelle der einzelnen Werte gestreamt,
+/* Die folgenden Makros extrahieren Teilbereiche aus einem sal_uInt32 Wert.
+ Diese sal_uInt32-Werte werden anstelle der einzelnen Werte gestreamt,
um Calls zu sparen.
*/
@@ -52,33 +52,33 @@ SV_IMPL_VARARR( SfxUINT32s, UINT32 );
//-------------------------------------------------------------------------
-/* Die folgenden Makros setzen Teilbereiche zu einem UINT32 Wert zusammen.
- Diese UINT32-Werte werden anstelle der einzelnen Werte gestreamt,
+/* Die folgenden Makros setzen Teilbereiche zu einem sal_uInt32 Wert zusammen.
+ Diese sal_uInt32-Werte werden anstelle der einzelnen Werte gestreamt,
um Calls zu sparen.
*/
#define SFX_REC_MINI_HEADER(nPreTag,nStartPos,nEndPos) \
- ( UINT32(nPreTag) | \
- UINT32(nEndPos-nStartPos-SFX_REC_HEADERSIZE_MINI) << 8 )
+ ( sal_uInt32(nPreTag) | \
+ sal_uInt32(nEndPos-nStartPos-SFX_REC_HEADERSIZE_MINI) << 8 )
#define SFX_REC_HEADER(nRecType,nContentTag,nContentVer) \
- ( UINT32(nRecType) | \
- ( UINT32(nContentVer) << 8 ) | \
- ( UINT32(nContentTag) << 16 ) )
+ ( sal_uInt32(nRecType) | \
+ ( sal_uInt32(nContentVer) << 8 ) | \
+ ( sal_uInt32(nContentTag) << 16 ) )
#define SFX_REC_CONTENT_HEADER(nContentVer,n1StStartPos,nCurStartPos) \
- ( UINT32(nContentVer) | \
- UINT32( nCurStartPos - n1StStartPos ) << 8 )
+ ( sal_uInt32(nContentVer) | \
+ sal_uInt32( nCurStartPos - n1StStartPos ) << 8 )
//=========================================================================
-UINT32 SfxMiniRecordWriter::Close
+sal_uInt32 SfxMiniRecordWriter::Close
(
- FASTBOOL bSeekToEndOfRec /* TRUE (default)
+ FASTBOOL bSeekToEndOfRec /* sal_True (default)
Der Stream wird an das Ende des Records
positioniert.
- FALSE
+ sal_False
Der Stream wird an den Anfang des
Contents (also hinter den Header)
positioniert.
@@ -95,9 +95,9 @@ UINT32 SfxMiniRecordWriter::Close
[R"uckgabewert]
- UINT32 != 0
+ sal_uInt32 != 0
Position im Stream, die direkt hinter dem Record liegt.
- 'bSeekToEndOfRecord==TRUE'
+ 'bSeekToEndOfRecord==sal_True'
=> R"uckgabewert == aktuelle Stream-Position nach Aufruf
== 0
@@ -109,7 +109,7 @@ UINT32 SfxMiniRecordWriter::Close
if ( !_bHeaderOk )
{
// Header an den Anfang des Records schreiben
- UINT32 nEndPos = _pStream->Tell();
+ sal_uInt32 nEndPos = _pStream->Tell();
_pStream->Seek( _nStartPos );
*_pStream << SFX_REC_MINI_HEADER( _nPreTag, _nStartPos, nEndPos );
@@ -118,7 +118,7 @@ UINT32 SfxMiniRecordWriter::Close
_pStream->Seek( nEndPos );
// Header wurde JETZT geschrieben
- _bHeaderOk = TRUE;
+ _bHeaderOk = sal_True;
return nEndPos;
}
#ifdef DBG_UTIL
@@ -126,14 +126,14 @@ UINT32 SfxMiniRecordWriter::Close
else if ( SFX_BOOL_DONTCARE == _bHeaderOk )
{
// Header auslesen, um Soll-Gr"o\se zu bestimmen
- UINT32 nEndPos = _pStream->Tell();
+ sal_uInt32 nEndPos = _pStream->Tell();
_pStream->Seek( _nStartPos );
- UINT32 nHeader;
+ sal_uInt32 nHeader;
*_pStream >> nHeader;
_pStream->Seek( nEndPos );
// Soll-Gr"o\se mit Ist-Gr"o\se vergleichen
- DBG_ASSERT( nEndPos - SFX_REC_OFS(nHeader) == _nStartPos + sizeof(UINT32),
+ DBG_ASSERT( nEndPos - SFX_REC_OFS(nHeader) == _nStartPos + sizeof(sal_uInt32),
"fixed record size incorrect" );
DbgOutf( "SfxFileRec: written record until %ul", nEndPos );
}
@@ -145,7 +145,7 @@ UINT32 SfxMiniRecordWriter::Close
//=========================================================================
-USHORT SfxMiniRecordReader::ScanRecordType
+sal_uInt16 SfxMiniRecordReader::ScanRecordType
(
SvStream* pStream /* <SvStream> an dessen aktueller Position
ein Record liegt, dessen Typ erkannt werden
@@ -175,7 +175,7 @@ USHORT SfxMiniRecordReader::ScanRecordType
[R"uckgabewert]
- USHORT SFX_REC_TYPE_EOR
+ sal_uInt16 SFX_REC_TYPE_EOR
An der aktuellen Position des Streams
steht eine End-Of-Records-Kennung.
@@ -224,7 +224,7 @@ USHORT SfxMiniRecordReader::ScanRecordType
*pStream >> nHeader;
// k"onnte es sich um einen extended-Record handeln?
- USHORT nPreTag = sal::static_int_cast< USHORT >(SFX_REC_PRE(nHeader));
+ sal_uInt16 nPreTag = sal::static_int_cast< sal_uInt16 >(SFX_REC_PRE(nHeader));
if ( SFX_REC_PRETAG_EXT == nPreTag )
{
// die n"achsten 4 Bytes als extended-Header lesen
@@ -234,7 +234,7 @@ USHORT SfxMiniRecordReader::ScanRecordType
pStream->SeekRel(-8);
// liegt eine g"ultige Record-Kennung vor?
- USHORT nType = sal::static_int_cast< USHORT >(SFX_REC_TYP(nHeader));
+ sal_uInt16 nType = sal::static_int_cast< sal_uInt16 >(SFX_REC_TYP(nHeader));
if ( nType >= SFX_REC_TYPE_FIRST && nType <= SFX_REC_TYPE_LAST )
// entsprechenden extended-Record-Typ zur"uckliefern
return nType;
@@ -251,7 +251,7 @@ USHORT SfxMiniRecordReader::ScanRecordType
return nPreTag;
// liegt ein Drawin-Engine-Record vor?
- if ( nHeader == UINT32(*"DRMD") || nHeader == UINT32(*"DRVW") )
+ if ( nHeader == sal_uInt32(*"DRMD") || nHeader == sal_uInt32(*"DRVW") )
return SFX_REC_TYPE_DRAWENG;
// alle anderen sind grunds"atzlich g"ultige Mini-Records
@@ -260,29 +260,29 @@ USHORT SfxMiniRecordReader::ScanRecordType
//-------------------------------------------------------------------------
-FASTBOOL SfxMiniRecordReader::SetHeader_Impl( UINT32 nHeader )
+FASTBOOL SfxMiniRecordReader::SetHeader_Impl( sal_uInt32 nHeader )
/* [Beschreibung]
Interne Methode zum nachtr"aglichen Verarbeiten eines extern gelesenen
Headers. Falls der Header eine End-Of-Records-Kennung darstellt,
- wird am Stream ein Errorcode gesetzt und FALSE zur"uckgeliefert. Im
+ wird am Stream ein Errorcode gesetzt und sal_False zur"uckgeliefert. Im
Fehlerfall wird der Stream jedoch nicht auf den Record-Anfang zur"uck-
gesetzt.
*/
{
- FASTBOOL bRet = TRUE;
+ FASTBOOL bRet = sal_True;
// Record-Ende und Pre-Tag aus dem Header ermitteln
_nEofRec = _pStream->Tell() + SFX_REC_OFS(nHeader);
- _nPreTag = sal::static_int_cast< BYTE >(SFX_REC_PRE(nHeader));
+ _nPreTag = sal::static_int_cast< sal_uInt8 >(SFX_REC_PRE(nHeader));
// wenn End-Of-Record-Kennung, dann Fehler
if ( _nPreTag == SFX_REC_PRETAG_EOR )
{
_pStream->SetError( ERRCODE_IO_WRONGFORMAT );
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
@@ -309,12 +309,12 @@ SfxMiniRecordReader::SfxMiniRecordReader
*/
: _pStream( pStream ),
- _bSkipped( FALSE )
+ _bSkipped( sal_False )
{
// Header einlesen
- UINT32 nStartPos = pStream->Tell(); // um im Fehlerfall zur"uck zu-seeken
+ sal_uInt32 nStartPos = pStream->Tell(); // um im Fehlerfall zur"uck zu-seeken
DBG( DbgOutf( "SfxFileRec: reading record at %ul", nStartPos ) );
- UINT32 nHeader;
+ sal_uInt32 nHeader;
*pStream >> nHeader;
// Headerdaten extrahieren
@@ -337,7 +337,7 @@ SfxMiniRecordReader::SfxMiniRecordReader
Position sich ein <SfxMiniRecord>
befindet.
*/
- BYTE nTag // Pre-Tag des gew"unschten Records
+ sal_uInt8 nTag // Pre-Tag des gew"unschten Records
)
/* [Beschreibung]
@@ -350,13 +350,13 @@ SfxMiniRecordReader::SfxMiniRecordReader
Wird das Ende des Streams oder die Kennung SFX_REC_PRETAG_EOR
erreicht, bevor ein Record mit dem ge"unschten Pre-Tag gefunden wird,
- ist die erzeugte Instanz ung"ultig ('IsValid() == FALSE'). Ein ent-
+ ist die erzeugte Instanz ung"ultig ('IsValid() == sal_False'). Ein ent-
sprechender Error-Code (ERRCODE_IO_EOF bzw. ERRCODE_IO_WRONGFORMAT)
ist dann am Stream gesetzt, dessen Position ist dann au\serdem unver-
"andert.
Bei 'nTag==SFX_FILEREC_PRETAG_EOR' wird nicht versucht, einen Record
- zu lesen, es wird sofort 'IsValid()' auf FALSE gesetzt und kein Error-Code
+ zu lesen, es wird sofort 'IsValid()' auf sal_False gesetzt und kein Error-Code
am Stream gesetzt. Dies ist dauzu gedacht, ohne 'new' und 'delete'
abw"rtskompatibel SfxMiniRecords einbauen zu k"onnen. Siehe dazu
<SfxItemSet::Load()>.
@@ -384,14 +384,14 @@ SfxMiniRecordReader::SfxMiniRecordReader
}
// StartPos merken, um im Fehlerfall zur"uck-seeken zu k"onnen
- UINT32 nStartPos = pStream->Tell();
+ sal_uInt32 nStartPos = pStream->Tell();
// passenden Record suchen
- while(TRUE)
+ while(sal_True)
{
// Header lesen
DBG( DbgOutf( "SfxFileRec: searching record at %ul", pStream->Tell() ) );
- UINT32 nHeader;
+ sal_uInt32 nHeader;
*pStream >> nHeader;
// Headerdaten von Basisklasse extrahieren lassen
@@ -423,10 +423,10 @@ SfxMiniRecordReader::SfxMiniRecordReader
SfxSingleRecordWriter::SfxSingleRecordWriter
(
- BYTE nRecordType, // f"ur Subklassen
+ sal_uInt8 nRecordType, // f"ur Subklassen
SvStream* pStream, // Stream, in dem der Record angelegt wird
- UINT16 nContentTag, // Inhalts-Art-Kennung
- BYTE nContentVer // Inhalts-Versions-Kennung
+ sal_uInt16 nContentTag, // Inhalts-Art-Kennung
+ sal_uInt8 nContentVer // Inhalts-Versions-Kennung
)
/* [Beschreibung]
@@ -445,8 +445,8 @@ SfxSingleRecordWriter::SfxSingleRecordWriter
SfxSingleRecordWriter::SfxSingleRecordWriter
(
SvStream* pStream, // Stream, in dem der Record angelegt wird
- UINT16 nContentTag, // Inhalts-Art-Kennung
- BYTE nContentVer // Inhalts-Versions-Kennung
+ sal_uInt16 nContentTag, // Inhalts-Art-Kennung
+ sal_uInt8 nContentVer // Inhalts-Versions-Kennung
)
/* [Beschreibung]
@@ -467,9 +467,9 @@ SfxSingleRecordWriter::SfxSingleRecordWriter
SfxSingleRecordWriter::SfxSingleRecordWriter
(
SvStream* pStream, // Stream, in dem der Record angelegt wird
- UINT16 nContentTag, // Inhalts-Art-Kennung
- BYTE nContentVer, // Inhalts-Versions-Kennung
- UINT32 nContentSize // Gr"o\se des Inhalts in Bytes
+ sal_uInt16 nContentTag, // Inhalts-Art-Kennung
+ sal_uInt8 nContentVer, // Inhalts-Versions-Kennung
+ sal_uInt32 nContentSize // Gr"o\se des Inhalts in Bytes
)
/* [Beschreibung]
@@ -487,7 +487,7 @@ SfxSingleRecordWriter::SfxSingleRecordWriter
//=========================================================================
-inline FASTBOOL SfxSingleRecordReader::ReadHeader_Impl( USHORT nTypes )
+inline FASTBOOL SfxSingleRecordReader::ReadHeader_Impl( sal_uInt16 nTypes )
/* [Beschreibung]
@@ -501,19 +501,19 @@ inline FASTBOOL SfxSingleRecordReader::ReadHeader_Impl( USHORT nTypes )
FASTBOOL bRet;
// Basisklassen-Header einlesen
- UINT32 nHeader=0;
+ sal_uInt32 nHeader=0;
*_pStream >> nHeader;
if ( !SetHeader_Impl( nHeader ) )
- bRet = FALSE;
+ bRet = sal_False;
else
{
// eigenen Header einlesen
*_pStream >> nHeader;
- _nRecordVer = sal::static_int_cast< BYTE >(SFX_REC_VER(nHeader));
- _nRecordTag = sal::static_int_cast< UINT16 >(SFX_REC_TAG(nHeader));
+ _nRecordVer = sal::static_int_cast< sal_uInt8 >(SFX_REC_VER(nHeader));
+ _nRecordTag = sal::static_int_cast< sal_uInt16 >(SFX_REC_TAG(nHeader));
// falscher Record-Typ?
- _nRecordType = sal::static_int_cast< BYTE >(SFX_REC_TYP(nHeader));
+ _nRecordType = sal::static_int_cast< sal_uInt8 >(SFX_REC_TYP(nHeader));
bRet = 0 != ( nTypes & _nRecordType);
}
return bRet;
@@ -526,7 +526,7 @@ SfxSingleRecordReader::SfxSingleRecordReader( SvStream *pStream )
{
// Startposition merken, um im Fehlerfall zur"uck-seeken zu k"onnen
#ifdef DBG_UTIL
- UINT32 nStartPos = pStream->Tell();
+ sal_uInt32 nStartPos = pStream->Tell();
DBG( DbgOutf( "SfxFileRec: reading record at %ul", nStartPos ) );
#endif
@@ -544,10 +544,10 @@ SfxSingleRecordReader::SfxSingleRecordReader( SvStream *pStream )
//-------------------------------------------------------------------------
-SfxSingleRecordReader::SfxSingleRecordReader( SvStream *pStream, USHORT nTag )
+SfxSingleRecordReader::SfxSingleRecordReader( SvStream *pStream, sal_uInt16 nTag )
{
// StartPos merken, um im Fehlerfall zur"uck-seeken zu k"onnen
- UINT32 nStartPos = pStream->Tell();
+ sal_uInt32 nStartPos = pStream->Tell();
// richtigen Record suchen, ggf. Error-Code setzen und zur"uck-seeken
Construct_Impl( pStream );
@@ -563,8 +563,8 @@ SfxSingleRecordReader::SfxSingleRecordReader( SvStream *pStream, USHORT nTag )
FASTBOOL SfxSingleRecordReader::FindHeader_Impl
(
- UINT16 nTypes, // arithm. Veroderung erlaubter Record-Typen
- UINT16 nTag // zu findende Record-Art-Kennung
+ sal_uInt16 nTypes, // arithm. Veroderung erlaubter Record-Typen
+ sal_uInt16 nTag // zu findende Record-Art-Kennung
)
/* [Beschreibung]
@@ -574,18 +574,18 @@ FASTBOOL SfxSingleRecordReader::FindHeader_Impl
gekennzeichnet ist.
Kann ein solcher Record nicht gefunden werden, wird am Stream ein
- Errorcode gesetzt, zur"uck-geseekt und FALSE zur"uckgeliefert.
+ Errorcode gesetzt, zur"uck-geseekt und sal_False zur"uckgeliefert.
*/
{
// StartPos merken, um im Fehlerfall zur"uck-seeken zu k"onnen
- UINT32 nStartPos = _pStream->Tell();
+ sal_uInt32 nStartPos = _pStream->Tell();
// richtigen Record suchen
while ( !_pStream->IsEof() )
{
// Header lesen
- UINT32 nHeader;
+ sal_uInt32 nHeader;
DBG( DbgOutf( "SfxFileRec: searching record at %ul", _pStream->Tell() ) );
*_pStream >> nHeader;
if ( !SetHeader_Impl( nHeader ) )
@@ -597,17 +597,17 @@ FASTBOOL SfxSingleRecordReader::FindHeader_Impl
{
// Extended Header lesen
*_pStream >> nHeader;
- _nRecordTag = sal::static_int_cast< UINT16 >(SFX_REC_TAG(nHeader));
+ _nRecordTag = sal::static_int_cast< sal_uInt16 >(SFX_REC_TAG(nHeader));
// richtigen Record gefunden?
if ( _nRecordTag == nTag )
{
// gefundener Record-Typ passend?
- _nRecordType = sal::static_int_cast< BYTE >(
+ _nRecordType = sal::static_int_cast< sal_uInt8 >(
SFX_REC_TYP(nHeader));
if ( nTypes & _nRecordType )
// ==> gefunden
- return TRUE;
+ return sal_True;
// error => Such-Schleife abbrechen
break;
@@ -622,18 +622,18 @@ FASTBOOL SfxSingleRecordReader::FindHeader_Impl
// Fehler setzen und zur"uck-seeken
_pStream->SetError( ERRCODE_IO_WRONGFORMAT );
_pStream->Seek( nStartPos );
- return FALSE;
+ return sal_False;
}
//=========================================================================
SfxMultiFixRecordWriter::SfxMultiFixRecordWriter
(
- BYTE nRecordType, // Subklassen Record-Kennung
+ sal_uInt8 nRecordType, // Subklassen Record-Kennung
SvStream* pStream, // Stream, in dem der Record angelegt wird
- UINT16 nContentTag, // Content-Art-Kennung
- BYTE nContentVer, // Content-Versions-Kennung
- UINT32 // Gr"o\se jedes einzelnen Contents in Bytes
+ sal_uInt16 nContentTag, // Content-Art-Kennung
+ sal_uInt8 nContentVer, // Content-Versions-Kennung
+ sal_uInt32 // Gr"o\se jedes einzelnen Contents in Bytes
)
/* [Beschreibung]
@@ -653,9 +653,9 @@ SfxMultiFixRecordWriter::SfxMultiFixRecordWriter
SfxMultiFixRecordWriter::SfxMultiFixRecordWriter
(
SvStream* pStream, // Stream, in dem der Record angelegt wird
- UINT16 nContentTag, // Content-Art-Kennung
- BYTE nContentVer, // Content-Versions-Kennung
- UINT32 // Gr"o\se jedes einzelnen Contents in Bytes
+ sal_uInt16 nContentTag, // Content-Art-Kennung
+ sal_uInt8 nContentVer, // Content-Versions-Kennung
+ sal_uInt32 // Gr"o\se jedes einzelnen Contents in Bytes
)
/* [Beschreibung]
@@ -674,7 +674,7 @@ SfxMultiFixRecordWriter::SfxMultiFixRecordWriter
//------------------------------------------------------------------------
-UINT32 SfxMultiFixRecordWriter::Close( FASTBOOL bSeekToEndOfRec )
+sal_uInt32 SfxMultiFixRecordWriter::Close( FASTBOOL bSeekToEndOfRec )
// siehe <SfxMiniRecordWriter>
@@ -683,7 +683,7 @@ UINT32 SfxMultiFixRecordWriter::Close( FASTBOOL bSeekToEndOfRec )
if ( !_bHeaderOk )
{
// Position hinter Record merken, um sie restaurieren zu k"onnen
- UINT32 nEndPos = SfxSingleRecordWriter::Close( FALSE );
+ sal_uInt32 nEndPos = SfxSingleRecordWriter::Close( sal_False );
// gegen"uber SfxSingleRecord erweiterten Header schreiben
*_pStream << _nContentCount;
@@ -703,10 +703,10 @@ UINT32 SfxMultiFixRecordWriter::Close( FASTBOOL bSeekToEndOfRec )
SfxMultiVarRecordWriter::SfxMultiVarRecordWriter
(
- BYTE nRecordType, // Record-Kennung der Subklasse
+ sal_uInt8 nRecordType, // Record-Kennung der Subklasse
SvStream* pStream, // Stream, in dem der Record angelegt wird
- UINT16 nRecordTag, // Gesamt-Art-Kennung
- BYTE nRecordVer // Gesamt-Versions-Kennung
+ sal_uInt16 nRecordTag, // Gesamt-Art-Kennung
+ sal_uInt8 nRecordVer // Gesamt-Versions-Kennung
)
/* [Beschreibung]
@@ -724,8 +724,8 @@ SfxMultiVarRecordWriter::SfxMultiVarRecordWriter
SfxMultiVarRecordWriter::SfxMultiVarRecordWriter
(
SvStream* pStream, // Stream, in dem der Record angelegt wird
- UINT16 nRecordTag, // Gesamt-Art-Kennung
- BYTE nRecordVer // Gesamt-Versions-Kennung
+ sal_uInt16 nRecordTag, // Gesamt-Art-Kennung
+ sal_uInt8 nRecordVer // Gesamt-Versions-Kennung
)
/* [Beschreibung]
@@ -799,7 +799,7 @@ void SfxMultiVarRecordWriter::NewContent()
//-------------------------------------------------------------------------
-UINT32 SfxMultiVarRecordWriter::Close( FASTBOOL bSeekToEndOfRec )
+sal_uInt32 SfxMultiVarRecordWriter::Close( FASTBOOL bSeekToEndOfRec )
// siehe <SfxMiniRecordWriter>
@@ -812,24 +812,24 @@ UINT32 SfxMultiVarRecordWriter::Close( FASTBOOL bSeekToEndOfRec )
FlushContent_Impl();
// Content-Offset-Tabelle schreiben
- UINT32 nContentOfsPos = _pStream->Tell();
+ sal_uInt32 nContentOfsPos = _pStream->Tell();
//! darf man das so einr"ucken?
#if defined(OSL_LITENDIAN)
_pStream->Write( _aContentOfs.GetData(),
- sizeof(UINT32)*_nContentCount );
+ sizeof(sal_uInt32)*_nContentCount );
#else
- for ( USHORT n = 0; n < _nContentCount; ++n )
- *_pStream << UINT32(_aContentOfs[n]);
+ for ( sal_uInt16 n = 0; n < _nContentCount; ++n )
+ *_pStream << sal_uInt32(_aContentOfs[n]);
#endif
// SfxMultiFixRecordWriter::Close() "uberspringen!
- UINT32 nEndPos = SfxSingleRecordWriter::Close( FALSE );
+ sal_uInt32 nEndPos = SfxSingleRecordWriter::Close( sal_False );
// eigenen Header schreiben
*_pStream << _nContentCount;
if ( SFX_REC_TYPE_VARSIZE_RELOC == _nPreTag ||
SFX_REC_TYPE_MIXTAGS_RELOC == _nPreTag )
- *_pStream << static_cast<UINT32>(nContentOfsPos - ( _pStream->Tell() + sizeof(UINT32) ));
+ *_pStream << static_cast<sal_uInt32>(nContentOfsPos - ( _pStream->Tell() + sizeof(sal_uInt32) ));
else
*_pStream << nContentOfsPos;
@@ -847,8 +847,8 @@ UINT32 SfxMultiVarRecordWriter::Close( FASTBOOL bSeekToEndOfRec )
void SfxMultiMixRecordWriter::NewContent
(
- UINT16 nContentTag, // Kennung f"ur die Art des Contents
- BYTE nContentVer // Kennung f"ur die Version des Contents
+ sal_uInt16 nContentTag, // Kennung f"ur die Art des Contents
+ sal_uInt8 nContentVer // Kennung f"ur die Version des Contents
)
/* [Beschreibung]
@@ -891,18 +891,18 @@ FASTBOOL SfxMultiRecordReader::ReadHeader_Impl()
if ( _nRecordType != SFX_REC_TYPE_FIXSIZE )
{
// Tabelle aus dem Stream einlesen
- UINT32 nContentPos = _pStream->Tell();
+ sal_uInt32 nContentPos = _pStream->Tell();
if ( _nRecordType == SFX_REC_TYPE_VARSIZE_RELOC ||
_nRecordType == SFX_REC_TYPE_MIXTAGS_RELOC )
_pStream->SeekRel( + _nContentSize );
else
_pStream->Seek( _nContentSize );
- _pContentOfs = new UINT32[_nContentCount];
+ _pContentOfs = new sal_uInt32[_nContentCount];
//! darf man jetzt so einr"ucken
#if defined(OSL_LITENDIAN)
- _pStream->Read( _pContentOfs, sizeof(UINT32)*_nContentCount );
+ _pStream->Read( _pContentOfs, sizeof(sal_uInt32)*_nContentCount );
#else
- for ( USHORT n = 0; n < _nContentCount; ++n )
+ for ( sal_uInt16 n = 0; n < _nContentCount; ++n )
*_pStream >> _pContentOfs[n];
#endif
_pStream->Seek( nContentPos );
@@ -934,7 +934,7 @@ SfxMultiRecordReader::SfxMultiRecordReader( SvStream *pStream )
//-------------------------------------------------------------------------
-SfxMultiRecordReader::SfxMultiRecordReader( SvStream *pStream, UINT16 nTag )
+SfxMultiRecordReader::SfxMultiRecordReader( SvStream *pStream, sal_uInt16 nTag )
: _nContentNo(0)
{
// Position im Stream merken, um im Fehlerfall zur"uck-seeken zu k"onnen
@@ -971,8 +971,8 @@ FASTBOOL SfxMultiRecordReader::GetContent()
auf den Anfang des ersten Contents im Record und liest ggf. dessen
Header ein.
- Liegt laut Record-Header kein Content mehr vor, wird FALSE zur"uck-
- gegeben. Trotz einem TRUE-Returnwert kann am Stream ein Fehlercode
+ Liegt laut Record-Header kein Content mehr vor, wird sal_False zur"uck-
+ gegeben. Trotz einem sal_True-Returnwert kann am Stream ein Fehlercode
gesetzt sein, z.B. falls er unvorhergesehenerweise (kaputtes File)
zuende ist.
*/
@@ -982,10 +982,10 @@ FASTBOOL SfxMultiRecordReader::GetContent()
if ( _nContentNo < _nContentCount )
{
// den Stream an den Anfang des Contents positionieren
- UINT32 nOffset = _nRecordType == SFX_REC_TYPE_FIXSIZE
+ sal_uInt32 nOffset = _nRecordType == SFX_REC_TYPE_FIXSIZE
? _nContentNo * _nContentSize
: SFX_REC_CONTENT_OFS(_pContentOfs[_nContentNo]);
- UINT32 nNewPos = _nStartPos + nOffset;
+ sal_uInt32 nNewPos = _nStartPos + nOffset;
DBG_ASSERT( nNewPos >= _pStream->Tell(), "SfxMultiRecordReader::GetContent() - New position before current, to much data red!" );
// #99366#: correct stream pos in every case;
@@ -1000,17 +1000,17 @@ FASTBOOL SfxMultiRecordReader::GetContent()
if ( _nRecordType == SFX_REC_TYPE_MIXTAGS ||
_nRecordType == SFX_REC_TYPE_MIXTAGS_RELOC )
{
- _nContentVer = sal::static_int_cast< BYTE >(
+ _nContentVer = sal::static_int_cast< sal_uInt8 >(
SFX_REC_CONTENT_VER(_pContentOfs[_nContentNo]));
*_pStream >> _nContentTag;
}
// ContentNo weiterz"ahlen
++_nContentNo;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
diff --git a/svl/source/inc/passwordcontainer.hxx b/svl/source/inc/passwordcontainer.hxx
index 375632801368..e03432906f5f 100644
--- a/svl/source/inc/passwordcontainer.hxx
+++ b/svl/source/inc/passwordcontainer.hxx
@@ -411,13 +411,13 @@ public:
class RW_SvMemoryStream : public SvMemoryStream {
public:
- RW_SvMemoryStream( void* Buf, ULONG Size, StreamMode eMode ):
+ RW_SvMemoryStream( void* Buf, sal_uLong Size, StreamMode eMode ):
SvMemoryStream( Buf, Size, eMode){}
- RW_SvMemoryStream( ULONG InitSize=512, ULONG Resize=64 ):
+ RW_SvMemoryStream( sal_uLong InitSize=512, sal_uLong Resize=64 ):
SvMemoryStream( InitSize, Resize ){}
- ULONG getActualSize(){ return nEndOfData; }
+ sal_uLong getActualSize(){ return nEndOfData; }
};
diff --git a/svl/source/inc/poolio.hxx b/svl/source/inc/poolio.hxx
index 79cbbc463700..013b6c760096 100644
--- a/svl/source/inc/poolio.hxx
+++ b/svl/source/inc/poolio.hxx
@@ -35,12 +35,12 @@
struct SfxPoolVersion_Impl
{
- USHORT _nVer;
- USHORT _nStart, _nEnd;
- USHORT* _pMap;
+ sal_uInt16 _nVer;
+ sal_uInt16 _nStart, _nEnd;
+ sal_uInt16* _pMap;
- SfxPoolVersion_Impl( USHORT nVer, USHORT nStart, USHORT nEnd,
- USHORT *pMap )
+ SfxPoolVersion_Impl( sal_uInt16 nVer, sal_uInt16 nStart, sal_uInt16 nEnd,
+ sal_uInt16 *pMap )
: _nVer( nVer ),
_nStart( nStart ),
_nEnd( nEnd ),
@@ -75,17 +75,17 @@ struct SfxItemPool_Impl
SfxBroadcaster aBC;
SfxPoolItemArray_Impl** ppPoolItems;
SfxPoolVersionArr_Impl aVersions;
- USHORT nVersion;
- USHORT nLoadingVersion;
- USHORT nInitRefCount; // 1, beim Laden ggf. 2
- USHORT nVerStart, nVerEnd; // WhichRange in Versions
- USHORT nStoringStart, nStoringEnd; // zu speichernder Range
- BYTE nMajorVer, nMinorVer; // Pool selbst
+ sal_uInt16 nVersion;
+ sal_uInt16 nLoadingVersion;
+ sal_uInt16 nInitRefCount; // 1, beim Laden ggf. 2
+ sal_uInt16 nVerStart, nVerEnd; // WhichRange in Versions
+ sal_uInt16 nStoringStart, nStoringEnd; // zu speichernder Range
+ sal_uInt8 nMajorVer, nMinorVer; // Pool selbst
SfxMapUnit eDefMetric;
FASTBOOL bInSetItem;
FASTBOOL bStreaming; // in Load() bzw. Store()
- SfxItemPool_Impl( USHORT nStart, USHORT nEnd )
+ SfxItemPool_Impl( sal_uInt16 nStart, sal_uInt16 nEnd )
: ppPoolItems (new SfxPoolItemArray_Impl*[ nEnd - nStart + 1])
{
memset( ppPoolItems, 0, sizeof( SfxPoolItemArray_Impl* ) * ( nEnd - nStart + 1) );
@@ -126,76 +126,76 @@ struct SfxItemPool_Impl
#endif
#define CHECK_FILEFORMAT( rStream, nTag ) \
- { USHORT nFileTag; \
+ { sal_uInt16 nFileTag; \
rStream >> nFileTag; \
if ( nTag != nFileTag ) \
{ \
DBG_ERROR( #nTag ); /*! s.u. */ \
/*! error-code setzen und auswerten! */ \
(rStream).SetError(SVSTREAM_FILEFORMAT_ERROR); \
- pImp->bStreaming = FALSE; \
+ pImp->bStreaming = sal_False; \
return rStream; \
} \
}
#define CHECK_FILEFORMAT_RELEASE( rStream, nTag, pPointer ) \
- { USHORT nFileTag; \
+ { sal_uInt16 nFileTag; \
rStream >> nFileTag; \
if ( nTag != nFileTag ) \
{ \
DBG_ERROR( #nTag ); /*! s.u. */ \
/*! error-code setzen und auswerten! */ \
(rStream).SetError(SVSTREAM_FILEFORMAT_ERROR); \
- pImp->bStreaming = FALSE; \
+ pImp->bStreaming = sal_False; \
delete pPointer; \
return rStream; \
} \
}
#define CHECK_FILEFORMAT2( rStream, nTag1, nTag2 ) \
- { USHORT nFileTag; \
+ { sal_uInt16 nFileTag; \
rStream >> nFileTag; \
if ( nTag1 != nFileTag && nTag2 != nFileTag ) \
{ \
DBG_ERROR( #nTag1 ); /*! s.u. */ \
/*! error-code setzen und auswerten! */ \
(rStream).SetError(SVSTREAM_FILEFORMAT_ERROR); \
- pImp->bStreaming = FALSE; \
+ pImp->bStreaming = sal_False; \
return rStream; \
} \
}
-#define SFX_ITEMPOOL_VER_MAJOR BYTE(2)
-#define SFX_ITEMPOOL_VER_MINOR BYTE(0)
-
-#define SFX_ITEMPOOL_TAG_STARTPOOL_4 USHORT(0x1111)
-#define SFX_ITEMPOOL_TAG_STARTPOOL_5 USHORT(0xBBBB)
-#define SFX_ITEMPOOL_TAG_ITEMPOOL USHORT(0xAAAA)
-#define SFX_ITEMPOOL_TAG_ITEMS USHORT(0x2222)
-#define SFX_ITEMPOOL_TAG_ITEM USHORT(0x7777)
-#define SFX_ITEMPOOL_TAG_SIZES USHORT(0x3333)
-#define SFX_ITEMPOOL_TAG_DEFAULTS USHORT(0x4444)
-#define SFX_ITEMPOOL_TAG_VERSIONMAP USHORT(0x5555)
-#define SFX_ITEMPOOL_TAG_HEADER USHORT(0x6666)
-#define SFX_ITEMPOOL_TAG_ENDPOOL USHORT(0xEEEE)
-#define SFX_ITEMPOOL_TAG_TRICK4OLD USHORT(0xFFFF)
-
-#define SFX_ITEMPOOL_REC BYTE(0x01)
-#define SFX_ITEMPOOL_REC_HEADER BYTE(0x10)
-#define SFX_ITEMPOOL_REC_VERSIONMAP USHORT(0x0020)
-#define SFX_ITEMPOOL_REC_WHICHIDS USHORT(0x0030)
-#define SFX_ITEMPOOL_REC_ITEMS USHORT(0x0040)
-#define SFX_ITEMPOOL_REC_DEFAULTS USHORT(0x0050)
-
-#define SFX_ITEMSET_REC BYTE(0x02)
-
-#define SFX_STYLES_REC BYTE(0x03)
-#define SFX_STYLES_REC_HEADER USHORT(0x0010)
-#define SFX_STYLES_REC_STYLES USHORT(0x0020)
+#define SFX_ITEMPOOL_VER_MAJOR sal_uInt8(2)
+#define SFX_ITEMPOOL_VER_MINOR sal_uInt8(0)
+
+#define SFX_ITEMPOOL_TAG_STARTPOOL_4 sal_uInt16(0x1111)
+#define SFX_ITEMPOOL_TAG_STARTPOOL_5 sal_uInt16(0xBBBB)
+#define SFX_ITEMPOOL_TAG_ITEMPOOL sal_uInt16(0xAAAA)
+#define SFX_ITEMPOOL_TAG_ITEMS sal_uInt16(0x2222)
+#define SFX_ITEMPOOL_TAG_ITEM sal_uInt16(0x7777)
+#define SFX_ITEMPOOL_TAG_SIZES sal_uInt16(0x3333)
+#define SFX_ITEMPOOL_TAG_DEFAULTS sal_uInt16(0x4444)
+#define SFX_ITEMPOOL_TAG_VERSIONMAP sal_uInt16(0x5555)
+#define SFX_ITEMPOOL_TAG_HEADER sal_uInt16(0x6666)
+#define SFX_ITEMPOOL_TAG_ENDPOOL sal_uInt16(0xEEEE)
+#define SFX_ITEMPOOL_TAG_TRICK4OLD sal_uInt16(0xFFFF)
+
+#define SFX_ITEMPOOL_REC sal_uInt8(0x01)
+#define SFX_ITEMPOOL_REC_HEADER sal_uInt8(0x10)
+#define SFX_ITEMPOOL_REC_VERSIONMAP sal_uInt16(0x0020)
+#define SFX_ITEMPOOL_REC_WHICHIDS sal_uInt16(0x0030)
+#define SFX_ITEMPOOL_REC_ITEMS sal_uInt16(0x0040)
+#define SFX_ITEMPOOL_REC_DEFAULTS sal_uInt16(0x0050)
+
+#define SFX_ITEMSET_REC sal_uInt8(0x02)
+
+#define SFX_STYLES_REC sal_uInt8(0x03)
+#define SFX_STYLES_REC_HEADER sal_uInt16(0x0010)
+#define SFX_STYLES_REC_STYLES sal_uInt16(0x0020)
//========================================================================
-inline USHORT SfxItemPool::GetIndex_Impl(USHORT nWhich) const
+inline sal_uInt16 SfxItemPool::GetIndex_Impl(sal_uInt16 nWhich) const
{
DBG_CHKTHIS(SfxItemPool, 0);
DBG_ASSERT(nWhich >= nStart && nWhich <= nEnd, "Which-Id nicht im Pool-Bereich");
diff --git a/svl/source/items/aeitem.cxx b/svl/source/items/aeitem.cxx
index 36445162424b..370a3ebeb44e 100644
--- a/svl/source/items/aeitem.cxx
+++ b/svl/source/items/aeitem.cxx
@@ -47,7 +47,7 @@ TYPEINIT1_AUTOFACTORY(SfxAllEnumItem, SfxEnumItem)
struct SfxAllEnumValue_Impl
{
- USHORT nValue;
+ sal_uInt16 nValue;
XubString aText;
};
@@ -63,7 +63,7 @@ SfxAllEnumItem::SfxAllEnumItem() :
{
}
-SfxAllEnumItem::SfxAllEnumItem( USHORT which, USHORT nVal, const XubString &rText ):
+SfxAllEnumItem::SfxAllEnumItem( sal_uInt16 which, sal_uInt16 nVal, const XubString &rText ):
SfxEnumItem(which, nVal),
pValues( 0 ),
pDisabledValues( 0 )
@@ -74,7 +74,7 @@ SfxAllEnumItem::SfxAllEnumItem( USHORT which, USHORT nVal, const XubString &rTex
// -----------------------------------------------------------------------
-SfxAllEnumItem::SfxAllEnumItem(USHORT which, USHORT nVal):
+SfxAllEnumItem::SfxAllEnumItem(sal_uInt16 which, sal_uInt16 nVal):
SfxEnumItem(which, nVal),
pValues( 0 ),
pDisabledValues( 0 )
@@ -85,7 +85,7 @@ SfxAllEnumItem::SfxAllEnumItem(USHORT which, USHORT nVal):
// -----------------------------------------------------------------------
-SfxAllEnumItem::SfxAllEnumItem( USHORT which, SvStream &rStream ):
+SfxAllEnumItem::SfxAllEnumItem( sal_uInt16 which, SvStream &rStream ):
SfxEnumItem(which, rStream),
pValues( 0 ),
pDisabledValues( 0 )
@@ -97,7 +97,7 @@ SfxAllEnumItem::SfxAllEnumItem( USHORT which, SvStream &rStream ):
// -----------------------------------------------------------------------
-SfxAllEnumItem::SfxAllEnumItem(USHORT which):
+SfxAllEnumItem::SfxAllEnumItem(sal_uInt16 which):
SfxEnumItem(which, 0),
pValues( 0 ),
pDisabledValues( 0 )
@@ -119,7 +119,7 @@ SfxAllEnumItem::SfxAllEnumItem(const SfxAllEnumItem &rCopy):
pValues = new SfxAllEnumValueArr;
- for ( USHORT nPos = 0; nPos < rCopy.pValues->Count(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < rCopy.pValues->Count(); ++nPos )
{
SfxAllEnumValue_Impl *pVal = new SfxAllEnumValue_Impl;
pVal->nValue = rCopy.pValues->GetObject(nPos)->nValue;
@@ -131,7 +131,7 @@ SfxAllEnumItem::SfxAllEnumItem(const SfxAllEnumItem &rCopy):
if( rCopy.pDisabledValues )
{
pDisabledValues = new SvUShorts;
- for ( USHORT nPos = 0; nPos < rCopy.pDisabledValues->Count(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < rCopy.pDisabledValues->Count(); ++nPos )
{
pDisabledValues->Insert( rCopy.pDisabledValues->GetObject(nPos),
nPos );
@@ -150,7 +150,7 @@ SfxAllEnumItem::~SfxAllEnumItem()
// -----------------------------------------------------------------------
-USHORT SfxAllEnumItem::GetValueCount() const
+sal_uInt16 SfxAllEnumItem::GetValueCount() const
{
DBG_CHKTHIS(SfxAllEnumItem, 0);
return pValues ? pValues->Count() : 0;
@@ -158,7 +158,7 @@ USHORT SfxAllEnumItem::GetValueCount() const
// -----------------------------------------------------------------------
-XubString SfxAllEnumItem::GetValueTextByPos( USHORT nPos ) const
+XubString SfxAllEnumItem::GetValueTextByPos( sal_uInt16 nPos ) const
{
DBG_CHKTHIS(SfxAllEnumItem, 0);
DBG_ASSERT( pValues && nPos < pValues->Count(), "enum overflow" );
@@ -167,7 +167,7 @@ XubString SfxAllEnumItem::GetValueTextByPos( USHORT nPos ) const
// -----------------------------------------------------------------------
-USHORT SfxAllEnumItem::GetValueByPos( USHORT nPos ) const
+sal_uInt16 SfxAllEnumItem::GetValueByPos( sal_uInt16 nPos ) const
{
DBG_CHKTHIS(SfxAllEnumItem, 0);
DBG_ASSERT( pValues && nPos < pValues->Count(), "enum overflow" );
@@ -184,7 +184,7 @@ SfxPoolItem* SfxAllEnumItem::Clone( SfxItemPool * ) const
// -----------------------------------------------------------------------
-SfxPoolItem* SfxAllEnumItem::Create( SvStream & rStream, USHORT ) const
+SfxPoolItem* SfxAllEnumItem::Create( SvStream & rStream, sal_uInt16 ) const
{
DBG_CHKTHIS(SfxAllEnumItem, 0);
return new SfxAllEnumItem( Which(), rStream );
@@ -193,11 +193,11 @@ SfxPoolItem* SfxAllEnumItem::Create( SvStream & rStream, USHORT ) const
// -----------------------------------------------------------------------
-USHORT SfxAllEnumItem::_GetPosByValue( USHORT nVal ) const
+sal_uInt16 SfxAllEnumItem::_GetPosByValue( sal_uInt16 nVal ) const
/* [Beschreibung]
- Im Ggs. zu <SfxEnumItemInterface::GetPosByValue(USHORT)const> liefert
+ Im Ggs. zu <SfxEnumItemInterface::GetPosByValue(sal_uInt16)const> liefert
diese interne Methode bei nicht vorhandenen Values die Position,
an der der Wert liegen w"urde.
*/
@@ -209,7 +209,7 @@ USHORT SfxAllEnumItem::_GetPosByValue( USHORT nVal ) const
return 0;
//!O: binaere Suche oder SortArray verwenden
- USHORT nPos;
+ sal_uInt16 nPos;
for ( nPos = 0; nPos < pValues->Count(); ++nPos )
if ( pValues->GetObject(nPos)->nValue >= nVal )
return nPos;
@@ -218,11 +218,11 @@ USHORT SfxAllEnumItem::_GetPosByValue( USHORT nVal ) const
// -----------------------------------------------------------------------
-USHORT SfxAllEnumItem::GetPosByValue( USHORT nValue ) const
+sal_uInt16 SfxAllEnumItem::GetPosByValue( sal_uInt16 nValue ) const
/* [Beschreibung]
- Liefert im Gegensatz zu <SfxEnumItemInterface::GetPosByValue(USHORT)const>
+ Liefert im Gegensatz zu <SfxEnumItemInterface::GetPosByValue(sal_uInt16)const>
immer nValue zur"uck, solange nicht mindestens ein Wert mit einer der
Methoden <SfxAllEnumItem::InsertValue()> eingef"ugt wurde.
*/
@@ -238,7 +238,7 @@ USHORT SfxAllEnumItem::GetPosByValue( USHORT nValue ) const
// -----------------------------------------------------------------------
-void SfxAllEnumItem::InsertValue( USHORT nValue, const XubString &rValue )
+void SfxAllEnumItem::InsertValue( sal_uInt16 nValue, const XubString &rValue )
{
DBG_CHKTHIS(SfxAllEnumItem, 0);
SfxAllEnumValue_Impl *pVal = new SfxAllEnumValue_Impl;
@@ -256,7 +256,7 @@ void SfxAllEnumItem::InsertValue( USHORT nValue, const XubString &rValue )
// -----------------------------------------------------------------------
-void SfxAllEnumItem::InsertValue( USHORT nValue )
+void SfxAllEnumItem::InsertValue( sal_uInt16 nValue )
{
DBG_CHKTHIS(SfxAllEnumItem, 0);
SfxAllEnumValue_Impl *pVal = new SfxAllEnumValue_Impl;
@@ -269,7 +269,7 @@ void SfxAllEnumItem::InsertValue( USHORT nValue )
pValues->Insert( pTemp, _GetPosByValue(nValue) ); //! doppelte?!
}
-void SfxAllEnumItem::DisableValue( USHORT nValue )
+void SfxAllEnumItem::DisableValue( sal_uInt16 nValue )
{
DBG_CHKTHIS(SfxAllEnumItem, 0);
if ( !pDisabledValues )
@@ -278,24 +278,24 @@ void SfxAllEnumItem::DisableValue( USHORT nValue )
pDisabledValues->Insert( nValue, pDisabledValues->Count() );
}
-BOOL SfxAllEnumItem::IsEnabled( USHORT nValue ) const
+sal_Bool SfxAllEnumItem::IsEnabled( sal_uInt16 nValue ) const
{
if ( pDisabledValues )
{
- for ( USHORT i=0; i<pDisabledValues->Count(); i++ )
+ for ( sal_uInt16 i=0; i<pDisabledValues->Count(); i++ )
if ( (*pDisabledValues)[i] == nValue )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-void SfxAllEnumItem::RemoveValue( USHORT nValue )
+void SfxAllEnumItem::RemoveValue( sal_uInt16 nValue )
{
DBG_CHKTHIS(SfxAllEnumItem, 0);
- USHORT nPos = GetPosByValue(nValue);
+ sal_uInt16 nPos = GetPosByValue(nValue);
DBG_ASSERT( nPos != USHRT_MAX, "removing value not in enum" );
pValues->Remove( nPos );
}
diff --git a/svl/source/items/cenumitm.cxx b/svl/source/items/cenumitm.cxx
index c5e1a09ec324..a67df72113ba 100644
--- a/svl/source/items/cenumitm.cxx
+++ b/svl/source/items/cenumitm.cxx
@@ -33,7 +33,7 @@
#include <whassert.hxx>
#ifndef _CPPUHELPER_EXTRACT_HXX_
-#include <cppuhelper/extract.hxx>
+#include <comphelper/extract.hxx>
#endif
//============================================================================
@@ -70,7 +70,7 @@ SfxEnumItemInterface::GetPresentation(SfxItemPresentation, SfxMapUnit,
//============================================================================
// virtual
-BOOL SfxEnumItemInterface::QueryValue(com::sun::star::uno::Any& rVal, BYTE)
+sal_Bool SfxEnumItemInterface::QueryValue(com::sun::star::uno::Any& rVal, sal_uInt8)
const
{
rVal <<= sal_Int32(GetEnumValue());
@@ -79,14 +79,14 @@ BOOL SfxEnumItemInterface::QueryValue(com::sun::star::uno::Any& rVal, BYTE)
//============================================================================
// virtual
-BOOL SfxEnumItemInterface::PutValue(const com::sun::star::uno::Any& rVal,
- BYTE)
+sal_Bool SfxEnumItemInterface::PutValue(const com::sun::star::uno::Any& rVal,
+ sal_uInt8)
{
sal_Int32 nTheValue = 0;
if ( ::cppu::enum2int( nTheValue, rVal ) )
{
- SetEnumValue(USHORT(nTheValue));
+ SetEnumValue(sal_uInt16(nTheValue));
return true;
}
DBG_ERROR("SfxEnumItemInterface::PutValue(): Wrong type");
@@ -94,7 +94,7 @@ BOOL SfxEnumItemInterface::PutValue(const com::sun::star::uno::Any& rVal,
}
//============================================================================
-XubString SfxEnumItemInterface::GetValueTextByPos(USHORT) const
+XubString SfxEnumItemInterface::GetValueTextByPos(sal_uInt16) const
{
DBG_WARNING("SfxEnumItemInterface::GetValueTextByPos(): Pure virtual");
return XubString();
@@ -102,25 +102,25 @@ XubString SfxEnumItemInterface::GetValueTextByPos(USHORT) const
//============================================================================
// virtual
-USHORT SfxEnumItemInterface::GetValueByPos(USHORT nPos) const
+sal_uInt16 SfxEnumItemInterface::GetValueByPos(sal_uInt16 nPos) const
{
return nPos;
}
//============================================================================
// virtual
-USHORT SfxEnumItemInterface::GetPosByValue(USHORT nValue) const
+sal_uInt16 SfxEnumItemInterface::GetPosByValue(sal_uInt16 nValue) const
{
- USHORT nCount = GetValueCount();
- for (USHORT i = 0; i < nCount; ++i)
+ sal_uInt16 nCount = GetValueCount();
+ for (sal_uInt16 i = 0; i < nCount; ++i)
if (GetValueByPos(i) == nValue)
return i;
return USHRT_MAX;
}
-BOOL SfxEnumItemInterface::IsEnabled(USHORT) const
+sal_Bool SfxEnumItemInterface::IsEnabled(sal_uInt16) const
{
- return TRUE;
+ return sal_True;
}
//============================================================================
@@ -132,14 +132,14 @@ int SfxEnumItemInterface::HasBoolValue() const
//============================================================================
// virtual
-BOOL SfxEnumItemInterface::GetBoolValue() const
+sal_Bool SfxEnumItemInterface::GetBoolValue() const
{
return false;
}
//============================================================================
// virtual
-void SfxEnumItemInterface::SetBoolValue(BOOL)
+void SfxEnumItemInterface::SetBoolValue(sal_Bool)
{}
//============================================================================
@@ -151,7 +151,7 @@ void SfxEnumItemInterface::SetBoolValue(BOOL)
DBG_NAME(CntEnumItem)
//============================================================================
-CntEnumItem::CntEnumItem(USHORT which, SvStream & rStream):
+CntEnumItem::CntEnumItem(sal_uInt16 which, SvStream & rStream):
SfxEnumItemInterface(which)
{
m_nValue = 0;
@@ -163,7 +163,7 @@ TYPEINIT1(CntEnumItem, SfxEnumItemInterface)
//============================================================================
// virtual
-SvStream & CntEnumItem::Store(SvStream & rStream, USHORT) const
+SvStream & CntEnumItem::Store(SvStream & rStream, sal_uInt16) const
{
rStream << m_nValue;
return rStream;
@@ -171,14 +171,14 @@ SvStream & CntEnumItem::Store(SvStream & rStream, USHORT) const
//============================================================================
// virtual
-USHORT CntEnumItem::GetEnumValue() const
+sal_uInt16 CntEnumItem::GetEnumValue() const
{
return GetValue();
}
//============================================================================
// virtual
-void CntEnumItem::SetEnumValue(USHORT nTheValue)
+void CntEnumItem::SetEnumValue(sal_uInt16 nTheValue)
{
SetValue(nTheValue);
}
@@ -195,7 +195,7 @@ DBG_NAME(CntBoolItem)
TYPEINIT1_AUTOFACTORY(CntBoolItem, SfxPoolItem)
//============================================================================
-CntBoolItem::CntBoolItem(USHORT which, SvStream & rStream):
+CntBoolItem::CntBoolItem(sal_uInt16 which, SvStream & rStream):
SfxPoolItem(which)
{
m_bValue = false;
@@ -233,7 +233,7 @@ SfxItemPresentation CntBoolItem::GetPresentation(SfxItemPresentation,
//============================================================================
// virtual
-BOOL CntBoolItem::QueryValue(com::sun::star::uno::Any& rVal, BYTE) const
+sal_Bool CntBoolItem::QueryValue(com::sun::star::uno::Any& rVal, sal_uInt8) const
{
rVal <<= sal_Bool(m_bValue);
return true;
@@ -241,7 +241,7 @@ BOOL CntBoolItem::QueryValue(com::sun::star::uno::Any& rVal, BYTE) const
//============================================================================
// virtual
-BOOL CntBoolItem::PutValue(const com::sun::star::uno::Any& rVal, BYTE)
+sal_Bool CntBoolItem::PutValue(const com::sun::star::uno::Any& rVal, sal_uInt8)
{
sal_Bool bTheValue = sal_Bool();
if (rVal >>= bTheValue)
@@ -255,14 +255,14 @@ BOOL CntBoolItem::PutValue(const com::sun::star::uno::Any& rVal, BYTE)
//============================================================================
// virtual
-SfxPoolItem * CntBoolItem::Create(SvStream & rStream, USHORT) const
+SfxPoolItem * CntBoolItem::Create(SvStream & rStream, sal_uInt16) const
{
return new CntBoolItem(Which(), rStream);
}
//============================================================================
// virtual
-SvStream & CntBoolItem::Store(SvStream & rStream, USHORT) const
+SvStream & CntBoolItem::Store(SvStream & rStream, sal_uInt16) const
{
rStream << m_bValue;
return rStream;
@@ -277,18 +277,18 @@ SfxPoolItem * CntBoolItem::Clone(SfxItemPool *) const
//============================================================================
// virtual
-USHORT CntBoolItem::GetValueCount() const
+sal_uInt16 CntBoolItem::GetValueCount() const
{
return 2;
}
//============================================================================
// virtual
-UniString CntBoolItem::GetValueTextByVal(BOOL bTheValue) const
+UniString CntBoolItem::GetValueTextByVal(sal_Bool bTheValue) const
{
return
bTheValue ?
- UniString::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("TRUE")) :
- UniString::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("FALSE"));
+ UniString::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("sal_True")) :
+ UniString::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("sal_False"));
}
diff --git a/svl/source/items/cintitem.cxx b/svl/source/items/cintitem.cxx
index dd22ab757fe7..11f68ed69071 100644
--- a/svl/source/items/cintitem.cxx
+++ b/svl/source/items/cintitem.cxx
@@ -43,7 +43,7 @@ DBG_NAME(CntByteItem)
TYPEINIT1_AUTOFACTORY(CntByteItem, SfxPoolItem);
//============================================================================
-CntByteItem::CntByteItem(USHORT which, SvStream & rStream):
+CntByteItem::CntByteItem(sal_uInt16 which, SvStream & rStream):
SfxPoolItem(which)
{
DBG_CTOR(CntByteItem, 0);
@@ -87,41 +87,41 @@ SfxItemPresentation CntByteItem::GetPresentation(SfxItemPresentation,
//============================================================================
// virtual
-BOOL CntByteItem::QueryValue(com::sun::star::uno::Any& rVal,BYTE) const
+sal_Bool CntByteItem::QueryValue(com::sun::star::uno::Any& rVal,sal_uInt8) const
{
sal_Int8 nValue = m_nValue;
rVal <<= nValue;
- return TRUE;
+ return sal_True;
}
//============================================================================
// virtual
-BOOL CntByteItem::PutValue(const com::sun::star::uno::Any& rVal,BYTE)
+sal_Bool CntByteItem::PutValue(const com::sun::star::uno::Any& rVal,sal_uInt8)
{
sal_Int8 nValue = sal_Int8();
if (rVal >>= nValue)
{
m_nValue = nValue;
- return TRUE;
+ return sal_True;
}
DBG_ERROR( "CntByteItem::PutValue - Wrong type!" );
- return FALSE;
+ return sal_False;
}
//============================================================================
// virtual
-SfxPoolItem * CntByteItem::Create(SvStream & rStream, USHORT) const
+SfxPoolItem * CntByteItem::Create(SvStream & rStream, sal_uInt16) const
{
DBG_CHKTHIS(CntByteItem, 0);
short nTheValue = 0;
rStream >> nTheValue;
- return new CntByteItem(Which(), BYTE(nTheValue));
+ return new CntByteItem(Which(), sal_uInt8(nTheValue));
}
//============================================================================
// virtual
-SvStream & CntByteItem::Store(SvStream & rStream, USHORT) const
+SvStream & CntByteItem::Store(SvStream & rStream, sal_uInt16) const
{
DBG_CHKTHIS(CntByteItem, 0);
rStream << short(m_nValue);
@@ -138,7 +138,7 @@ SfxPoolItem * CntByteItem::Clone(SfxItemPool *) const
//============================================================================
// virtual
-BYTE CntByteItem::GetMin() const
+sal_uInt8 CntByteItem::GetMin() const
{
DBG_CHKTHIS(CntByteItem, 0);
return 0;
@@ -146,7 +146,7 @@ BYTE CntByteItem::GetMin() const
//============================================================================
// virtual
-BYTE CntByteItem::GetMax() const
+sal_uInt8 CntByteItem::GetMax() const
{
DBG_CHKTHIS(CntByteItem, 0);
return 255;
@@ -172,11 +172,11 @@ DBG_NAME(CntUInt16Item);
TYPEINIT1_AUTOFACTORY(CntUInt16Item, SfxPoolItem);
//============================================================================
-CntUInt16Item::CntUInt16Item(USHORT which, SvStream & rStream) :
+CntUInt16Item::CntUInt16Item(sal_uInt16 which, SvStream & rStream) :
SfxPoolItem(which)
{
DBG_CTOR(CntUInt16Item, 0);
- USHORT nTheValue = 0;
+ sal_uInt16 nTheValue = 0;
rStream >> nTheValue;
m_nValue = nTheValue;
}
@@ -222,32 +222,32 @@ SfxItemPresentation CntUInt16Item::GetPresentation(SfxItemPresentation,
//============================================================================
// virtual
-BOOL CntUInt16Item::QueryValue(com::sun::star::uno::Any& rVal,BYTE) const
+sal_Bool CntUInt16Item::QueryValue(com::sun::star::uno::Any& rVal,sal_uInt8) const
{
sal_Int32 nValue = m_nValue;
rVal <<= nValue;
- return TRUE;
+ return sal_True;
}
//============================================================================
// virtual
-BOOL CntUInt16Item::PutValue(const com::sun::star::uno::Any& rVal,BYTE)
+sal_Bool CntUInt16Item::PutValue(const com::sun::star::uno::Any& rVal,sal_uInt8)
{
sal_Int32 nValue = 0;
if (rVal >>= nValue)
{
DBG_ASSERT( nValue <= USHRT_MAX, "Overflow in UInt16 value!");
m_nValue = (sal_uInt16)nValue;
- return TRUE;
+ return sal_True;
}
DBG_ERROR( "CntUInt16Item::PutValue - Wrong type!" );
- return FALSE;
+ return sal_False;
}
//============================================================================
// virtual
-SfxPoolItem * CntUInt16Item::Create(SvStream & rStream, USHORT) const
+SfxPoolItem * CntUInt16Item::Create(SvStream & rStream, sal_uInt16) const
{
DBG_CHKTHIS(CntUInt16Item, 0);
return new CntUInt16Item(Which(), rStream);
@@ -255,10 +255,10 @@ SfxPoolItem * CntUInt16Item::Create(SvStream & rStream, USHORT) const
//============================================================================
// virtual
-SvStream & CntUInt16Item::Store(SvStream &rStream, USHORT) const
+SvStream & CntUInt16Item::Store(SvStream &rStream, sal_uInt16) const
{
DBG_CHKTHIS(CntUInt16Item, 0);
- rStream << USHORT(m_nValue);
+ rStream << sal_uInt16(m_nValue);
return rStream;
}
@@ -272,7 +272,7 @@ SfxPoolItem * CntUInt16Item::Clone(SfxItemPool *) const
//============================================================================
// virtual
-UINT16 CntUInt16Item::GetMin() const
+sal_uInt16 CntUInt16Item::GetMin() const
{
DBG_CHKTHIS(CntUInt16Item, 0);
return 0;
@@ -280,7 +280,7 @@ UINT16 CntUInt16Item::GetMin() const
//============================================================================
// virtual
-UINT16 CntUInt16Item::GetMax() const
+sal_uInt16 CntUInt16Item::GetMax() const
{
DBG_CHKTHIS(CntUInt16Item, 0);
return 65535;
@@ -306,7 +306,7 @@ DBG_NAME(CntInt32Item);
TYPEINIT1_AUTOFACTORY(CntInt32Item, SfxPoolItem);
//============================================================================
-CntInt32Item::CntInt32Item(USHORT which, SvStream & rStream) :
+CntInt32Item::CntInt32Item(sal_uInt16 which, SvStream & rStream) :
SfxPoolItem(which)
{
DBG_CTOR(CntInt32Item, 0);
@@ -354,31 +354,31 @@ SfxItemPresentation CntInt32Item::GetPresentation(SfxItemPresentation,
//============================================================================
// virtual
-BOOL CntInt32Item::QueryValue(com::sun::star::uno::Any& rVal,BYTE) const
+sal_Bool CntInt32Item::QueryValue(com::sun::star::uno::Any& rVal,sal_uInt8) const
{
sal_Int32 nValue = m_nValue;
rVal <<= nValue;
- return TRUE;
+ return sal_True;
}
//============================================================================
// virtual
-BOOL CntInt32Item::PutValue(const com::sun::star::uno::Any& rVal,BYTE)
+sal_Bool CntInt32Item::PutValue(const com::sun::star::uno::Any& rVal,sal_uInt8)
{
sal_Int32 nValue = 0;
if (rVal >>= nValue)
{
m_nValue = nValue;
- return TRUE;
+ return sal_True;
}
DBG_ERROR( "CntInt32Item::PutValue - Wrong type!" );
- return FALSE;
+ return sal_False;
}
//============================================================================
// virtual
-SfxPoolItem * CntInt32Item::Create(SvStream & rStream, USHORT) const
+SfxPoolItem * CntInt32Item::Create(SvStream & rStream, sal_uInt16) const
{
DBG_CHKTHIS(CntInt32Item, 0);
return new CntInt32Item(Which(), rStream);
@@ -386,7 +386,7 @@ SfxPoolItem * CntInt32Item::Create(SvStream & rStream, USHORT) const
//============================================================================
// virtual
-SvStream & CntInt32Item::Store(SvStream &rStream, USHORT) const
+SvStream & CntInt32Item::Store(SvStream &rStream, sal_uInt16) const
{
DBG_CHKTHIS(CntInt32Item, 0);
rStream << long(m_nValue);
@@ -403,15 +403,15 @@ SfxPoolItem * CntInt32Item::Clone(SfxItemPool *) const
//============================================================================
// virtual
-INT32 CntInt32Item::GetMin() const
+sal_Int32 CntInt32Item::GetMin() const
{
DBG_CHKTHIS(CntInt32Item, 0);
- return INT32(0x80000000);
+ return sal_Int32(0x80000000);
}
//============================================================================
// virtual
-INT32 CntInt32Item::GetMax() const
+sal_Int32 CntInt32Item::GetMax() const
{
DBG_CHKTHIS(CntInt32Item, 0);
return 0x7FFFFFFF;
@@ -437,7 +437,7 @@ DBG_NAME(CntUInt32Item);
TYPEINIT1_AUTOFACTORY(CntUInt32Item, SfxPoolItem);
//============================================================================
-CntUInt32Item::CntUInt32Item(USHORT which, SvStream & rStream) :
+CntUInt32Item::CntUInt32Item(sal_uInt16 which, SvStream & rStream) :
SfxPoolItem(which)
{
DBG_CTOR(CntUInt32Item, 0);
@@ -487,33 +487,33 @@ SfxItemPresentation CntUInt32Item::GetPresentation(SfxItemPresentation,
//============================================================================
// virtual
-BOOL CntUInt32Item::QueryValue(com::sun::star::uno::Any& rVal,BYTE) const
+sal_Bool CntUInt32Item::QueryValue(com::sun::star::uno::Any& rVal,sal_uInt8) const
{
sal_Int32 nValue = m_nValue;
DBG_ASSERT( nValue>=0, "Overflow in UInt32 value!");
rVal <<= nValue;
- return TRUE;
+ return sal_True;
}
//============================================================================
// virtual
-BOOL CntUInt32Item::PutValue(const com::sun::star::uno::Any& rVal,BYTE)
+sal_Bool CntUInt32Item::PutValue(const com::sun::star::uno::Any& rVal,sal_uInt8)
{
sal_Int32 nValue = 0;
if (rVal >>= nValue)
{
DBG_ASSERT( nValue>=0, "Overflow in UInt32 value!");
m_nValue = nValue;
- return TRUE;
+ return sal_True;
}
DBG_ERROR( "CntUInt32Item::PutValue - Wrong type!" );
- return FALSE;
+ return sal_False;
}
//============================================================================
// virtual
-SfxPoolItem * CntUInt32Item::Create(SvStream & rStream, USHORT) const
+SfxPoolItem * CntUInt32Item::Create(SvStream & rStream, sal_uInt16) const
{
DBG_CHKTHIS(CntUInt32Item, 0);
return new CntUInt32Item(Which(), rStream);
@@ -521,7 +521,7 @@ SfxPoolItem * CntUInt32Item::Create(SvStream & rStream, USHORT) const
//============================================================================
// virtual
-SvStream & CntUInt32Item::Store(SvStream &rStream, USHORT) const
+SvStream & CntUInt32Item::Store(SvStream &rStream, sal_uInt16) const
{
DBG_CHKTHIS(CntUInt32Item, 0);
rStream << static_cast<sal_uInt32>(m_nValue);
@@ -538,7 +538,7 @@ SfxPoolItem * CntUInt32Item::Clone(SfxItemPool *) const
//============================================================================
// virtual
-UINT32 CntUInt32Item::GetMin() const
+sal_uInt32 CntUInt32Item::GetMin() const
{
DBG_CHKTHIS(CntUInt32Item, 0);
return 0;
@@ -546,7 +546,7 @@ UINT32 CntUInt32Item::GetMin() const
//============================================================================
// virtual
-UINT32 CntUInt32Item::GetMax() const
+sal_uInt32 CntUInt32Item::GetMax() const
{
DBG_CHKTHIS(CntUInt32Item, 0);
return 0xFFFFFFFF;
diff --git a/svl/source/items/cntwall.cxx b/svl/source/items/cntwall.cxx
index 56632c675d01..e5d635990086 100644
--- a/svl/source/items/cntwall.cxx
+++ b/svl/source/items/cntwall.cxx
@@ -35,22 +35,22 @@
#include <svl/cntwall.hxx>
-#define CNTWALLPAPERITEM_STREAM_MAGIC ( (UINT32)0xfefefefe )
-#define CNTWALLPAPERITEM_STREAM_SEEKREL (-( (long)( sizeof( UINT32 ) ) ) )
+#define CNTWALLPAPERITEM_STREAM_MAGIC ( (sal_uInt32)0xfefefefe )
+#define CNTWALLPAPERITEM_STREAM_SEEKREL (-( (long)( sizeof( sal_uInt32 ) ) ) )
TYPEINIT1( CntWallpaperItem, SfxPoolItem );
// -----------------------------------------------------------------------
-CntWallpaperItem::CntWallpaperItem( USHORT which )
+CntWallpaperItem::CntWallpaperItem( sal_uInt16 which )
: SfxPoolItem( which ), _nColor( COL_TRANSPARENT ), _nStyle( 0 )
{
}
// -----------------------------------------------------------------------
-CntWallpaperItem::CntWallpaperItem( USHORT which, SvStream& rStream, USHORT nVersion )
+CntWallpaperItem::CntWallpaperItem( sal_uInt16 which, SvStream& rStream, sal_uInt16 nVersion )
: SfxPoolItem( which ), _nColor( COL_TRANSPARENT ), _nStyle( 0 )
{
- UINT32 nMagic = 0;
+ sal_uInt32 nMagic = 0;
rStream >> nMagic;
if ( nMagic == CNTWALLPAPERITEM_STREAM_MAGIC )
{
@@ -59,7 +59,7 @@ CntWallpaperItem::CntWallpaperItem( USHORT which, SvStream& rStream, USHORT nVer
readUnicodeString(rStream, _aURL, nVersion >= 1);
// !!! Color stream operators do not work - they discard any
// transparency info !!!
- _nColor.Read( rStream, TRUE );
+ _nColor.Read( rStream, sal_True );
rStream >> _nStyle;
}
else
@@ -110,33 +110,33 @@ int CntWallpaperItem::operator==( const SfxPoolItem& rItem ) const
if( ( rWallItem._nStyle == _nStyle ) &&
( rWallItem._nColor == _nColor ) &&
( rWallItem._aURL == _aURL ) )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
//============================================================================
// virtual
-USHORT CntWallpaperItem::GetVersion(USHORT) const
+sal_uInt16 CntWallpaperItem::GetVersion(sal_uInt16) const
{
return 1; // because it uses SfxPoolItem::read/writeUnicodeString()
}
// -----------------------------------------------------------------------
-SfxPoolItem* CntWallpaperItem::Create( SvStream& rStream, USHORT nVersion) const
+SfxPoolItem* CntWallpaperItem::Create( SvStream& rStream, sal_uInt16 nVersion) const
{
return new CntWallpaperItem( Which(), rStream, nVersion );
}
// -----------------------------------------------------------------------
-SvStream& CntWallpaperItem::Store( SvStream& rStream, USHORT ) const
+SvStream& CntWallpaperItem::Store( SvStream& rStream, sal_uInt16 ) const
{
rStream << CNTWALLPAPERITEM_STREAM_MAGIC;
writeUnicodeString(rStream, _aURL);
// !!! Color stream operators do not work - they discard any
// transparency info !!!
// ??? Why the hell Color::Write(...) isn't const ???
- SAL_CONST_CAST( CntWallpaperItem*, this )->_nColor.Write( rStream, TRUE );
+ SAL_CONST_CAST( CntWallpaperItem*, this )->_nColor.Write( rStream, sal_True );
rStream << _nStyle;
return rStream;
@@ -150,18 +150,18 @@ SfxPoolItem* CntWallpaperItem::Clone( SfxItemPool* ) const
//----------------------------------------------------------------------------
// virtual
-BOOL CntWallpaperItem::QueryValue( com::sun::star::uno::Any&,BYTE ) const
+sal_Bool CntWallpaperItem::QueryValue( com::sun::star::uno::Any&,sal_uInt8 ) const
{
DBG_ERROR("Not implemented!");
- return FALSE;
+ return sal_False;
}
//----------------------------------------------------------------------------
// virtual
-BOOL CntWallpaperItem::PutValue( const com::sun::star::uno::Any&,BYTE )
+sal_Bool CntWallpaperItem::PutValue( const com::sun::star::uno::Any&,sal_uInt8 )
{
DBG_ERROR("Not implemented!");
- return FALSE;
+ return sal_False;
}
diff --git a/svl/source/items/ctypeitm.cxx b/svl/source/items/ctypeitm.cxx
index 576071b56e1c..184b692eaad9 100644
--- a/svl/source/items/ctypeitm.cxx
+++ b/svl/source/items/ctypeitm.cxx
@@ -35,8 +35,8 @@
//============================================================================
// The following defines are copied from chaos/source/items/cstritem.cxx:
-#define CNTSTRINGITEM_STREAM_MAGIC ( (UINT32)0xfefefefe )
-#define CNTSTRINGITEM_STREAM_SEEKREL (-( (long)( sizeof( UINT32 ) ) ) )
+#define CNTSTRINGITEM_STREAM_MAGIC ( (sal_uInt32)0xfefefefe )
+#define CNTSTRINGITEM_STREAM_SEEKREL (-( (long)( sizeof( sal_uInt32 ) ) ) )
//============================================================================
//
@@ -56,14 +56,14 @@ CntContentTypeItem::CntContentTypeItem()
}
//----------------------------------------------------------------------------
-CntContentTypeItem::CntContentTypeItem( USHORT which, const XubString& rType )
+CntContentTypeItem::CntContentTypeItem( sal_uInt16 which, const XubString& rType )
: CntUnencodedStringItem( which, rType ),
_eType( CONTENT_TYPE_NOT_INIT )
{
}
//----------------------------------------------------------------------------
-CntContentTypeItem::CntContentTypeItem( USHORT which,
+CntContentTypeItem::CntContentTypeItem( sal_uInt16 which,
const INetContentType eType )
: CntUnencodedStringItem( which, INetContentTypes::GetContentType( eType ) ),
_eType( eType )
@@ -80,7 +80,7 @@ CntContentTypeItem::CntContentTypeItem( const CntContentTypeItem& rOrig )
//============================================================================
// virtual
-USHORT CntContentTypeItem::GetVersion(USHORT) const
+sal_uInt16 CntContentTypeItem::GetVersion(sal_uInt16) const
{
return 1; // because it uses SfxPoolItem::read/writeUnicodeString()
}
@@ -88,17 +88,17 @@ USHORT CntContentTypeItem::GetVersion(USHORT) const
//----------------------------------------------------------------------------
// virtual
SfxPoolItem* CntContentTypeItem::Create( SvStream& rStream,
- USHORT nItemVersion ) const
+ sal_uInt16 nItemVersion ) const
{
// CntContentTypeItem used to be derived from CntStringItem, so take that
// into account:
UniString aValue;
readUnicodeString(rStream, aValue, nItemVersion >= 1);
- UINT32 nMagic = 0;
+ sal_uInt32 nMagic = 0;
rStream >> nMagic;
if (nMagic == CNTSTRINGITEM_STREAM_MAGIC)
{
- BOOL bEncrypted = FALSE;
+ sal_Bool bEncrypted = sal_False;
rStream >> bEncrypted;
DBG_ASSERT(!bEncrypted,
"CntContentTypeItem::Create() reads encrypted data");
@@ -111,12 +111,12 @@ SfxPoolItem* CntContentTypeItem::Create( SvStream& rStream,
//----------------------------------------------------------------------------
// virtual
-SvStream & CntContentTypeItem::Store(SvStream & rStream, USHORT) const
+SvStream & CntContentTypeItem::Store(SvStream & rStream, sal_uInt16) const
{
// CntContentTypeItem used to be derived from CntStringItem, so take that
// into account:
writeUnicodeString(rStream, GetValue());
- rStream << CNTSTRINGITEM_STREAM_MAGIC << BOOL(FALSE);
+ rStream << CNTSTRINGITEM_STREAM_MAGIC << sal_Bool(sal_False);
return rStream;
}
@@ -223,7 +223,7 @@ void CntContentTypeItem::SetValue( const INetContentType eType )
//----------------------------------------------------------------------------
// virtual
-BOOL CntContentTypeItem::QueryValue( com::sun::star::uno::Any& rVal,BYTE ) const
+sal_Bool CntContentTypeItem::QueryValue( com::sun::star::uno::Any& rVal,sal_uInt8 ) const
{
rVal <<= rtl::OUString(GetValue());
return true;
@@ -231,7 +231,7 @@ BOOL CntContentTypeItem::QueryValue( com::sun::star::uno::Any& rVal,BYTE ) const
//----------------------------------------------------------------------------
// virtual
-BOOL CntContentTypeItem::PutValue( const com::sun::star::uno::Any& rVal,BYTE )
+sal_Bool CntContentTypeItem::PutValue( const com::sun::star::uno::Any& rVal,sal_uInt8 )
{
rtl::OUString aValue;
if ( rVal >>= aValue )
diff --git a/svl/source/items/custritm.cxx b/svl/source/items/custritm.cxx
index 9d192cc7e7b8..ff5d2dadd751 100644
--- a/svl/source/items/custritm.cxx
+++ b/svl/source/items/custritm.cxx
@@ -106,7 +106,7 @@ CntUnencodedStringItem::GetPresentation(SfxItemPresentation, SfxMapUnit,
//============================================================================
// virtual
-BOOL CntUnencodedStringItem::QueryValue(com::sun::star::uno::Any& rVal, BYTE)
+sal_Bool CntUnencodedStringItem::QueryValue(com::sun::star::uno::Any& rVal, sal_uInt8)
const
{
rVal <<= rtl::OUString(m_aValue);
@@ -115,8 +115,8 @@ BOOL CntUnencodedStringItem::QueryValue(com::sun::star::uno::Any& rVal, BYTE)
//============================================================================
// virtual
-BOOL CntUnencodedStringItem::PutValue(const com::sun::star::uno::Any& rVal,
- BYTE)
+sal_Bool CntUnencodedStringItem::PutValue(const com::sun::star::uno::Any& rVal,
+ sal_uInt8)
{
rtl::OUString aTheValue;
if (rVal >>= aTheValue)
diff --git a/svl/source/items/dateitem.cxx b/svl/source/items/dateitem.cxx
index 27170c1d4f6e..eeaebb3fa2a7 100644
--- a/svl/source/items/dateitem.cxx
+++ b/svl/source/items/dateitem.cxx
@@ -56,7 +56,7 @@ TYPEINIT1(SfxDateTimeItem, SfxPoolItem);
// -----------------------------------------------------------------------
-SfxDateTimeItem::SfxDateTimeItem( USHORT which ) :
+SfxDateTimeItem::SfxDateTimeItem( sal_uInt16 which ) :
SfxPoolItem( which )
{
DBG_CTOR(SfxDateTimeItem, 0);
@@ -64,7 +64,7 @@ SfxDateTimeItem::SfxDateTimeItem( USHORT which ) :
// -----------------------------------------------------------------------
-SfxDateTimeItem::SfxDateTimeItem( USHORT which, const DateTime& rDT ) :
+SfxDateTimeItem::SfxDateTimeItem( sal_uInt16 which, const DateTime& rDT ) :
SfxPoolItem( which ),
aDateTime( rDT )
@@ -109,7 +109,7 @@ int SfxDateTimeItem::Compare( const SfxPoolItem& rItem ) const
// -----------------------------------------------------------------------
-SfxPoolItem* SfxDateTimeItem::Create( SvStream& rStream, USHORT ) const
+SfxPoolItem* SfxDateTimeItem::Create( SvStream& rStream, sal_uInt16 ) const
{
DBG_CHKTHIS(SfxDateTimeItem, 0);
sal_uInt32 nDate = 0;
@@ -122,7 +122,7 @@ SfxPoolItem* SfxDateTimeItem::Create( SvStream& rStream, USHORT ) const
// -----------------------------------------------------------------------
-SvStream& SfxDateTimeItem::Store( SvStream& rStream, USHORT ) const
+SvStream& SfxDateTimeItem::Store( SvStream& rStream, sal_uInt16 ) const
{
DBG_CHKTHIS(SfxDateTimeItem, 0);
rStream << aDateTime.GetDate();
@@ -174,8 +174,8 @@ SfxItemPresentation SfxDateTimeItem::GetPresentation
//----------------------------------------------------------------------------
// virtual
-BOOL SfxDateTimeItem::PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId )
+sal_Bool SfxDateTimeItem::PutValue( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId )
{
nMemberId &= ~CONVERT_TWIPS;
com::sun::star::util::DateTime aValue;
@@ -188,17 +188,17 @@ BOOL SfxDateTimeItem::PutValue( const com::sun::star::uno::Any& rVal,
aValue.Minutes,
aValue.Seconds,
aValue.HundredthSeconds ) );
- return TRUE;
+ return sal_True;
}
DBG_ERROR( "SfxDateTimeItem::PutValue - Wrong type!" );
- return FALSE;
+ return sal_False;
}
//----------------------------------------------------------------------------
// virtual
-BOOL SfxDateTimeItem::QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId ) const
+sal_Bool SfxDateTimeItem::QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
com::sun::star::util::DateTime aValue( aDateTime.Get100Sec(),
@@ -209,7 +209,7 @@ BOOL SfxDateTimeItem::QueryValue( com::sun::star::uno::Any& rVal,
aDateTime.GetMonth(),
aDateTime.GetYear() );
rVal <<= aValue;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -219,11 +219,11 @@ BOOL SfxDateTimeItem::QueryValue( com::sun::star::uno::Any& rVal,
TYPEINIT1(SfxColumnDateTimeItem, SfxDateTimeItem);
-SfxColumnDateTimeItem::SfxColumnDateTimeItem( USHORT which ) :
+SfxColumnDateTimeItem::SfxColumnDateTimeItem( sal_uInt16 which ) :
SfxDateTimeItem( which )
{}
-SfxColumnDateTimeItem::SfxColumnDateTimeItem( USHORT which, const DateTime& rDT ) :
+SfxColumnDateTimeItem::SfxColumnDateTimeItem( sal_uInt16 which, const DateTime& rDT ) :
SfxDateTimeItem( which, rDT )
{}
diff --git a/svl/source/items/flagitem.cxx b/svl/source/items/flagitem.cxx
index 93d88889daef..d1c0b84078a4 100644
--- a/svl/source/items/flagitem.cxx
+++ b/svl/source/items/flagitem.cxx
@@ -36,7 +36,7 @@
DBG_NAME(SfxFlagItem)
-USHORT nSfxFlagVal[16] =
+sal_uInt16 nSfxFlagVal[16] =
{
0x0001, 0x0002, 0x0004, 0x0008,
0x0010, 0x0020, 0x0040, 0x0080,
@@ -51,7 +51,7 @@ TYPEINIT1(SfxFlagItem, SfxPoolItem);
// -----------------------------------------------------------------------
-SfxFlagItem::SfxFlagItem( USHORT nW, USHORT nV ) :
+SfxFlagItem::SfxFlagItem( sal_uInt16 nW, sal_uInt16 nV ) :
SfxPoolItem( nW ),
nVal(nV)
{
@@ -60,7 +60,7 @@ SfxFlagItem::SfxFlagItem( USHORT nW, USHORT nV ) :
// -----------------------------------------------------------------------
-SfxFlagItem::SfxFlagItem( USHORT nW, SvStream &rStream) :
+SfxFlagItem::SfxFlagItem( sal_uInt16 nW, SvStream &rStream) :
SfxPoolItem( nW )
{
DBG_CTOR(SfxFlagItem, 0);
@@ -78,7 +78,7 @@ SfxFlagItem::SfxFlagItem( const SfxFlagItem& rItem ) :
// -----------------------------------------------------------------------
-SvStream& SfxFlagItem::Store(SvStream &rStream, USHORT) const
+SvStream& SfxFlagItem::Store(SvStream &rStream, sal_uInt16) const
{
DBG_CHKTHIS(SfxFlagItem, 0);
rStream << nVal;
@@ -98,32 +98,32 @@ SfxItemPresentation SfxFlagItem::GetPresentation
{
DBG_CHKTHIS(SfxFlagItem, 0);
rText.Erase();
- for ( BYTE nFlag = 0; nFlag < GetFlagCount(); ++nFlag )
+ for ( sal_uInt8 nFlag = 0; nFlag < GetFlagCount(); ++nFlag )
rText += XubString::CreateFromInt32( GetFlag(nFlag) );
return SFX_ITEM_PRESENTATION_NAMELESS;
}
// -----------------------------------------------------------------------
-XubString SfxFlagItem::GetFlagText( BYTE ) const
+XubString SfxFlagItem::GetFlagText( sal_uInt8 ) const
{
DBG_CHKTHIS(SfxFlagItem, 0);
- DBG_WARNING( "calling GetValueText(USHORT) on SfxFlagItem -- overload!" );
+ DBG_WARNING( "calling GetValueText(sal_uInt16) on SfxFlagItem -- overload!" );
return XubString();
}
// -----------------------------------------------------------------------
-BYTE SfxFlagItem::GetFlagCount() const
+sal_uInt8 SfxFlagItem::GetFlagCount() const
{
DBG_CHKTHIS(SfxFlagItem, 0);
- DBG_WARNING( "calling GetValueText(USHORT) on SfxFlagItem -- overload!" );
+ DBG_WARNING( "calling GetValueText(sal_uInt16) on SfxFlagItem -- overload!" );
return 0;
}
// -----------------------------------------------------------------------
-SfxPoolItem* SfxFlagItem::Create(SvStream &, USHORT) const
+SfxPoolItem* SfxFlagItem::Create(SvStream &, sal_uInt16) const
{
DBG_CHKTHIS(SfxFlagItem, 0);
DBG_WARNING( "calling Create() on SfxFlagItem -- overload!" );
@@ -141,7 +141,7 @@ int SfxFlagItem::operator==( const SfxPoolItem& rItem ) const
// -----------------------------------------------------------------------
-void SfxFlagItem::SetFlag( BYTE nFlag, int bVal )
+void SfxFlagItem::SetFlag( sal_uInt8 nFlag, int bVal )
{
if ( bVal )
nVal |= nSfxFlagVal[nFlag];
diff --git a/svl/source/items/globalnameitem.cxx b/svl/source/items/globalnameitem.cxx
index a0ebd97c89b6..c630a6b9b4f2 100644
--- a/svl/source/items/globalnameitem.cxx
+++ b/svl/source/items/globalnameitem.cxx
@@ -52,7 +52,7 @@ SfxGlobalNameItem::SfxGlobalNameItem()
// -----------------------------------------------------------------------
-SfxGlobalNameItem::SfxGlobalNameItem( USHORT nW, const SvGlobalName& rName )
+SfxGlobalNameItem::SfxGlobalNameItem( sal_uInt16 nW, const SvGlobalName& rName )
: SfxPoolItem( nW ),
m_aName( rName )
{
@@ -80,7 +80,7 @@ SfxPoolItem* SfxGlobalNameItem::Clone(SfxItemPool *) const
//----------------------------------------------------------------------------
// virtual
-BOOL SfxGlobalNameItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE )
+sal_Bool SfxGlobalNameItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 )
{
com::sun::star::uno::Reference < com::sun::star::script::XTypeConverter > xConverter
( ::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.script.Converter")),
@@ -94,21 +94,21 @@ BOOL SfxGlobalNameItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE )
if ( aSeq.getLength() == 16 )
{
m_aName.MakeFromMemory( (void*) aSeq.getConstArray() );
- return TRUE;
+ return sal_True;
}
DBG_ERROR( "SfxGlobalNameItem::PutValue - Wrong type!" );
- return FALSE;
+ return sal_False;
}
//----------------------------------------------------------------------------
// virtual
-BOOL SfxGlobalNameItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE ) const
+sal_Bool SfxGlobalNameItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 ) const
{
com::sun::star::uno::Sequence< sal_Int8 > aSeq( 16 );
void* pData = ( void* ) &m_aName.GetCLSID();
memcpy( aSeq.getArray(), pData, 16 );
rVal <<= aSeq;
- return TRUE;
+ return sal_True;
}
diff --git a/svl/source/items/ilstitem.cxx b/svl/source/items/ilstitem.cxx
index 691fa7d131be..66bc832c8125 100644
--- a/svl/source/items/ilstitem.cxx
+++ b/svl/source/items/ilstitem.cxx
@@ -43,11 +43,11 @@ SfxIntegerListItem::SfxIntegerListItem()
{
}
-SfxIntegerListItem::SfxIntegerListItem( USHORT which, const SvULongs& rList )
+SfxIntegerListItem::SfxIntegerListItem( sal_uInt16 which, const SvULongs& rList )
: SfxPoolItem( which )
{
m_aList.realloc( rList.Count() );
- for ( USHORT n=0; n<rList.Count(); n++ )
+ for ( sal_uInt16 n=0; n<rList.Count(); n++ )
m_aList[n] = rList[n];
}
@@ -64,7 +64,7 @@ SfxIntegerListItem::~SfxIntegerListItem()
int SfxIntegerListItem::operator==( const SfxPoolItem& rPoolItem ) const
{
if ( !rPoolItem.ISA( SfxIntegerListItem ) )
- return FALSE;
+ return sal_False;
const SfxIntegerListItem rItem = (const SfxIntegerListItem&) rPoolItem;
return rItem.m_aList == m_aList;
@@ -75,7 +75,7 @@ SfxPoolItem* SfxIntegerListItem::Clone( SfxItemPool * ) const
return new SfxIntegerListItem( *this );
}
-BOOL SfxIntegerListItem::PutValue ( const com::sun::star::uno::Any& rVal, BYTE )
+sal_Bool SfxIntegerListItem::PutValue ( const com::sun::star::uno::Any& rVal, sal_uInt8 )
{
::com::sun::star::uno::Reference < ::com::sun::star::script::XTypeConverter > xConverter
( ::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.script.Converter")),
@@ -84,20 +84,20 @@ BOOL SfxIntegerListItem::PutValue ( const com::sun::star::uno::Any& rVal, BYTE
try { aNew = xConverter->convertTo( rVal, ::getCppuType((const ::com::sun::star::uno::Sequence < sal_Int32 >*)0) ); }
catch (::com::sun::star::uno::Exception&)
{
- return FALSE;
+ return sal_False;
}
return ( aNew >>= m_aList );
}
-BOOL SfxIntegerListItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE ) const
+sal_Bool SfxIntegerListItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 ) const
{
rVal <<= m_aList;
- return TRUE;
+ return sal_True;
}
void SfxIntegerListItem::GetList( SvULongs& rList ) const
{
for ( sal_Int32 n=0; n<m_aList.getLength(); n++ )
- rList.Insert( m_aList[n], sal::static_int_cast< USHORT >(n) );
+ rList.Insert( m_aList[n], sal::static_int_cast< sal_uInt16 >(n) );
}
diff --git a/svl/source/items/imageitm.cxx b/svl/source/items/imageitm.cxx
index 88c3daa137dc..cd91f082ee1f 100644
--- a/svl/source/items/imageitm.cxx
+++ b/svl/source/items/imageitm.cxx
@@ -37,27 +37,27 @@ struct SfxImageItem_Impl
{
String aURL;
long nAngle;
- BOOL bMirrored;
+ sal_Bool bMirrored;
int operator == ( const SfxImageItem_Impl& rOther ) const
{ return nAngle == rOther.nAngle && bMirrored == rOther.bMirrored; }
};
//---------------------------------------------------------
-SfxImageItem::SfxImageItem( USHORT which, UINT16 nImage )
+SfxImageItem::SfxImageItem( sal_uInt16 which, sal_uInt16 nImage )
: SfxInt16Item( which, nImage )
{
pImp = new SfxImageItem_Impl;
pImp->nAngle = 0;
- pImp->bMirrored = FALSE;
+ pImp->bMirrored = sal_False;
}
-SfxImageItem::SfxImageItem( USHORT which, const String& rURL )
+SfxImageItem::SfxImageItem( sal_uInt16 which, const String& rURL )
: SfxInt16Item( which, 0 )
{
pImp = new SfxImageItem_Impl;
pImp->nAngle = 0;
- pImp->bMirrored = FALSE;
+ pImp->bMirrored = sal_False;
pImp->aURL = rURL;
}
@@ -87,7 +87,7 @@ int SfxImageItem::operator==( const SfxPoolItem& rItem ) const
return( ((SfxImageItem&) rItem).GetValue() == GetValue() && (*pImp == *(((SfxImageItem&)rItem).pImp) ) );
}
-BOOL SfxImageItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE ) const
+sal_Bool SfxImageItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 ) const
{
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > aSeq( 4 );
aSeq[0] = ::com::sun::star::uno::makeAny( GetValue() );
@@ -96,10 +96,10 @@ BOOL SfxImageItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE ) const
aSeq[3] = ::com::sun::star::uno::makeAny( rtl::OUString( pImp->aURL ));
rVal = ::com::sun::star::uno::makeAny( aSeq );
- return TRUE;
+ return sal_True;
}
-BOOL SfxImageItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE )
+sal_Bool SfxImageItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 )
{
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > aSeq;
if (( rVal >>= aSeq ) && ( aSeq.getLength() == 4 ))
@@ -112,10 +112,10 @@ BOOL SfxImageItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE )
aSeq[2] >>= pImp->bMirrored;
if ( aSeq[3] >>= aURL )
pImp->aURL = aURL;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
void SfxImageItem::SetRotation( long nValue )
@@ -128,12 +128,12 @@ long SfxImageItem::GetRotation() const
return pImp->nAngle;
}
-void SfxImageItem::SetMirrored( BOOL bSet )
+void SfxImageItem::SetMirrored( sal_Bool bSet )
{
pImp->bMirrored = bSet;
}
-BOOL SfxImageItem::IsMirrored() const
+sal_Bool SfxImageItem::IsMirrored() const
{
return pImp->bMirrored;
}
diff --git a/svl/source/items/intitem.cxx b/svl/source/items/intitem.cxx
index 0342af15e8cb..13c691123537 100644
--- a/svl/source/items/intitem.cxx
+++ b/svl/source/items/intitem.cxx
@@ -44,11 +44,11 @@ TYPEINIT1_AUTOFACTORY(SfxByteItem, CntByteItem);
//============================================================================
// virtual
-SfxPoolItem * SfxByteItem::Create(SvStream & rStream, USHORT) const
+SfxPoolItem * SfxByteItem::Create(SvStream & rStream, sal_uInt16) const
{
short nValue = 0;
rStream >> nValue;
- return new SfxByteItem(Which(), BYTE(nValue));
+ return new SfxByteItem(Which(), sal_uInt8(nValue));
}
//============================================================================
@@ -63,7 +63,7 @@ DBG_NAME(SfxInt16Item);
TYPEINIT1_AUTOFACTORY(SfxInt16Item, SfxPoolItem);
//============================================================================
-SfxInt16Item::SfxInt16Item(USHORT which, SvStream & rStream):
+SfxInt16Item::SfxInt16Item(sal_uInt16 which, SvStream & rStream):
SfxPoolItem(which)
{
DBG_CTOR(SfxInt16Item, 0);
@@ -111,31 +111,31 @@ SfxItemPresentation SfxInt16Item::GetPresentation(SfxItemPresentation,
//============================================================================
// virtual
-BOOL SfxInt16Item::QueryValue(com::sun::star::uno::Any& rVal, BYTE) const
+sal_Bool SfxInt16Item::QueryValue(com::sun::star::uno::Any& rVal, sal_uInt8) const
{
sal_Int16 nValue = m_nValue;
rVal <<= nValue;
- return TRUE;
+ return sal_True;
}
//============================================================================
// virtual
-BOOL SfxInt16Item::PutValue(const com::sun::star::uno::Any& rVal, BYTE )
+sal_Bool SfxInt16Item::PutValue(const com::sun::star::uno::Any& rVal, sal_uInt8 )
{
sal_Int16 nValue = sal_Int16();
if (rVal >>= nValue)
{
m_nValue = nValue;
- return TRUE;
+ return sal_True;
}
DBG_ERROR( "SfxInt16Item::PutValue - Wrong type!" );
- return FALSE;
+ return sal_False;
}
//============================================================================
// virtual
-SfxPoolItem * SfxInt16Item::Create(SvStream & rStream, USHORT) const
+SfxPoolItem * SfxInt16Item::Create(SvStream & rStream, sal_uInt16) const
{
DBG_CHKTHIS(SfxInt16Item, 0);
return new SfxInt16Item(Which(), rStream);
@@ -143,7 +143,7 @@ SfxPoolItem * SfxInt16Item::Create(SvStream & rStream, USHORT) const
//============================================================================
// virtual
-SvStream & SfxInt16Item::Store(SvStream & rStream, USHORT) const
+SvStream & SfxInt16Item::Store(SvStream & rStream, sal_uInt16) const
{
DBG_CHKTHIS(SfxInt16Item, 0);
rStream << short(m_nValue);
@@ -158,14 +158,14 @@ SfxPoolItem * SfxInt16Item::Clone(SfxItemPool *) const
}
//============================================================================
-INT16 SfxInt16Item::GetMin() const
+sal_Int16 SfxInt16Item::GetMin() const
{
DBG_CHKTHIS(SfxInt16Item, 0);
return -32768;
}
//============================================================================
-INT16 SfxInt16Item::GetMax() const
+sal_Int16 SfxInt16Item::GetMax() const
{
DBG_CHKTHIS(SfxInt16Item, 0);
return 32767;
@@ -217,14 +217,14 @@ DBG_NAME(SfxMetricItem);
TYPEINIT1_AUTOFACTORY(SfxMetricItem, SfxInt32Item);
//============================================================================
-SfxMetricItem::SfxMetricItem(USHORT which, UINT32 nValue):
+SfxMetricItem::SfxMetricItem(sal_uInt16 which, sal_uInt32 nValue):
SfxInt32Item(which, nValue)
{
DBG_CTOR(SfxMetricItem, 0);
}
//============================================================================
-SfxMetricItem::SfxMetricItem(USHORT which, SvStream & rStream):
+SfxMetricItem::SfxMetricItem(sal_uInt16 which, SvStream & rStream):
SfxInt32Item(which, rStream)
{
DBG_CTOR(SfxMetricItem, 0);
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx
index d8bdeb330776..c5c0aa68addf 100644
--- a/svl/source/items/itempool.cxx
+++ b/svl/source/items/itempool.cxx
@@ -56,7 +56,7 @@ void SfxItemPool::RemoveSfxItemPoolUser(SfxItemPoolUser& rOldUser)
}
}
-const SfxPoolItem* SfxItemPool::GetPoolDefaultItem( USHORT nWhich ) const
+const SfxPoolItem* SfxItemPool::GetPoolDefaultItem( sal_uInt16 nWhich ) const
{
DBG_CHKTHIS(SfxItemPool, 0);
const SfxPoolItem* pRet;
@@ -74,15 +74,15 @@ const SfxPoolItem* SfxItemPool::GetPoolDefaultItem( USHORT nWhich ) const
// -----------------------------------------------------------------------
-inline FASTBOOL SfxItemPool::IsItemFlag_Impl( USHORT nPos, USHORT nFlag ) const
+inline FASTBOOL SfxItemPool::IsItemFlag_Impl( sal_uInt16 nPos, sal_uInt16 nFlag ) const
{
- USHORT nItemFlag = pItemInfos[nPos]._nFlags;
+ sal_uInt16 nItemFlag = pItemInfos[nPos]._nFlags;
return nFlag == (nItemFlag & nFlag);
}
// -----------------------------------------------------------------------
-FASTBOOL SfxItemPool::IsItemFlag( USHORT nWhich, USHORT nFlag ) const
+FASTBOOL SfxItemPool::IsItemFlag( sal_uInt16 nWhich, sal_uInt16 nFlag ) const
{
for ( const SfxItemPool *pPool = this; pPool; pPool = pPool->pSecondary )
{
@@ -90,7 +90,7 @@ FASTBOOL SfxItemPool::IsItemFlag( USHORT nWhich, USHORT nFlag ) const
return pPool->IsItemFlag_Impl( pPool->GetIndex_Impl(nWhich), nFlag);
}
DBG_ASSERT( !IsWhich(nWhich), "unknown which-id" );
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -107,8 +107,8 @@ SfxItemPool::SfxItemPool
(
UniString const & rName, /* Name des Pools zur Idetifikation
im File-Format */
- USHORT nStartWhich, /* erste Which-Id des Pools */
- USHORT nEndWhich, /* letzte Which-Id des Pools */
+ sal_uInt16 nStartWhich, /* erste Which-Id des Pools */
+ sal_uInt16 nEndWhich, /* letzte Which-Id des Pools */
#ifdef TF_POOLABLE
const SfxItemInfo* pInfos, /* SID-Map und Item-Flags */
#endif
@@ -116,7 +116,7 @@ SfxItemPool::SfxItemPool
wird direkt vom Pool referenziert,
jedoch kein Eigent"umer"ubergang */
#ifndef TF_POOLABLE
- USHORT* pSlotIdArray, /* Zuordnung von Slot-Ids zu Which-Ids */
+ sal_uInt16* pSlotIdArray, /* Zuordnung von Slot-Ids zu Which-Ids */
#endif
FASTBOOL bLoadRefCounts /* Ref-Counts mitladen oder auf 1 setzen */
)
@@ -148,8 +148,8 @@ SfxItemPool::SfxItemPool
[Querverweise]
<SfxItemPool::SetDefaults(SfxItemPool**)>
- <SfxItemPool::ReleaseDefaults(SfxPoolItem**,USHORT,BOOL)>
- <SfxItemPool::ReldaseDefaults(BOOL)>
+ <SfxItemPool::ReleaseDefaults(SfxPoolItem**,sal_uInt16,sal_Bool)>
+ <SfxItemPool::ReldaseDefaults(sal_Bool)>
*/
: aName(rName),
@@ -174,12 +174,12 @@ SfxItemPool::SfxItemPool
pImp->eDefMetric = SFX_MAPUNIT_TWIP;
pImp->nVersion = 0;
- pImp->bStreaming = FALSE;
+ pImp->bStreaming = sal_False;
pImp->nLoadingVersion = 0;
pImp->nInitRefCount = 1;
pImp->nVerStart = nStart;
pImp->nVerEnd = nEnd;
- pImp->bInSetItem = FALSE;
+ pImp->bInSetItem = sal_False;
pImp->nStoringStart = nStartWhich;
pImp->nStoringEnd = nEndWhich;
@@ -195,10 +195,10 @@ SfxItemPool::SfxItemPool
SfxItemPool::SfxItemPool
(
const SfxItemPool& rPool, // von dieser Instanz kopieren
- BOOL bCloneStaticDefaults /* TRUE
+ sal_Bool bCloneStaticDefaults /* sal_True
statische Defaults kopieren
- FALSE
+ sal_False
statische Defaults
"ubernehehmen */
)
@@ -233,12 +233,12 @@ SfxItemPool::SfxItemPool
DBG_CTOR(SfxItemPool, 0);
pImp->eDefMetric = rPool.pImp->eDefMetric;
pImp->nVersion = rPool.pImp->nVersion;
- pImp->bStreaming = FALSE;
+ pImp->bStreaming = sal_False;
pImp->nLoadingVersion = 0;
pImp->nInitRefCount = 1;
pImp->nVerStart = rPool.pImp->nVerStart;
pImp->nVerEnd = rPool.pImp->nVerEnd;
- pImp->bInSetItem = FALSE;
+ pImp->bInSetItem = sal_False;
pImp->nStoringStart = nStart;
pImp->nStoringEnd = nEnd;
@@ -248,7 +248,7 @@ SfxItemPool::SfxItemPool
if ( bCloneStaticDefaults )
{
SfxPoolItem **ppDefaults = new SfxPoolItem*[nEnd-nStart+1];
- for ( USHORT n = 0; n <= nEnd - nStart; ++n )
+ for ( sal_uInt16 n = 0; n <= nEnd - nStart; ++n )
{
(*( ppDefaults + n )) = (*( rPool.ppStaticDefaults + n ))->Clone(this);
(*( ppDefaults + n ))->SetKind( SFX_ITEMS_STATICDEFAULT );
@@ -260,7 +260,7 @@ SfxItemPool::SfxItemPool
SetDefaults( rPool.ppStaticDefaults );
// Pool Defaults kopieren
- for ( USHORT n = 0; n <= nEnd - nStart; ++n )
+ for ( sal_uInt16 n = 0; n <= nEnd - nStart; ++n )
if ( (*( rPool.ppPoolDefaults + n )) )
{
(*( ppPoolDefaults + n )) = (*( rPool.ppPoolDefaults + n ))->Clone(this);
@@ -295,7 +295,7 @@ void SfxItemPool::SetDefaults( SfxPoolItem **pDefaults )
DBG_ASSERT( (*ppStaticDefaults)->GetRefCount() == 0 ||
IsDefaultItem( (*ppStaticDefaults) ),
"das sind keine statics" );
- for ( USHORT n = 0; n <= nEnd - nStart; ++n )
+ for ( sal_uInt16 n = 0; n <= nEnd - nStart; ++n )
{
SFX_ASSERT( (*( ppStaticDefaults + n ))->Which() == n + nStart,
n + nStart, "static defaults not sorted" );
@@ -309,11 +309,11 @@ void SfxItemPool::SetDefaults( SfxPoolItem **pDefaults )
void SfxItemPool::ReleaseDefaults
(
- BOOL bDelete /* TRUE
+ sal_Bool bDelete /* sal_True
l"oscht sowohl das Array als auch die einzelnen
statischen Defaults
- FALSE
+ sal_False
l"oscht weder das Array noch die einzelnen
statischen Defaults */
)
@@ -332,7 +332,7 @@ void SfxItemPool::ReleaseDefaults
ReleaseDefaults( ppStaticDefaults, nEnd - nStart + 1, bDelete );
// KSO (22.10.98): ppStaticDefaults zeigt auf geloeschten Speicher,
- // wenn bDelete == TRUE.
+ // wenn bDelete == sal_True.
if ( bDelete )
ppStaticDefaults = 0;
}
@@ -343,13 +343,13 @@ void SfxItemPool::ReleaseDefaults
(
SfxPoolItem** pDefaults, /* freizugebende statische Defaults */
- USHORT nCount, /* Anzahl der statischen Defaults */
+ sal_uInt16 nCount, /* Anzahl der statischen Defaults */
- BOOL bDelete /* TRUE
+ sal_Bool bDelete /* sal_True
l"oscht sowohl das Array als auch die
einzelnen statischen Defaults
- FALSE
+ sal_False
l"oscht weder das Array noch die
einzelnen statischen Defaults */
)
@@ -367,7 +367,7 @@ void SfxItemPool::ReleaseDefaults
{
DBG_ASSERT( pDefaults, "erst wollen, dann nichts geben..." );
- for ( USHORT n = 0; n < nCount; ++n )
+ for ( sal_uInt16 n = 0; n < nCount; ++n )
{
SFX_ASSERT( IsStaticDefaultItem( *(pDefaults+n) ),
n, "das ist kein static-default" );
@@ -431,13 +431,13 @@ void SfxItemPool::SetSecondaryPool( SfxItemPool *pPool )
if ( pImp->ppPoolItems && pSecondary->pImp->ppPoolItems )
{
// hat der master SetItems?
- BOOL bHasSetItems = FALSE;
- for ( USHORT i = 0; !bHasSetItems && i < nEnd-nStart; ++i )
+ sal_Bool bHasSetItems = sal_False;
+ for ( sal_uInt16 i = 0; !bHasSetItems && i < nEnd-nStart; ++i )
bHasSetItems = ppStaticDefaults[i]->ISA(SfxSetItem);
// abgehaengte Pools muessen leer sein
- BOOL bOK = bHasSetItems;
- for ( USHORT n = 0;
+ sal_Bool bOK = bHasSetItems;
+ for ( sal_uInt16 n = 0;
bOK && n <= pSecondary->nEnd - pSecondary->nStart;
++n )
{
@@ -450,7 +450,7 @@ void SfxItemPool::SetSecondaryPool( SfxItemPool *pPool )
if ( !(*ppHtArr) )
{
DBG_ERROR( "old secondary pool must be empty" );
- bOK = FALSE;
+ bOK = sal_False;
break;
}
}
@@ -476,7 +476,7 @@ void SfxItemPool::SetSecondaryPool( SfxItemPool *pPool )
// -----------------------------------------------------------------------
-SfxMapUnit SfxItemPool::GetMetric( USHORT ) const
+SfxMapUnit SfxItemPool::GetMetric( sal_uInt16 ) const
{
DBG_CHKTHIS(SfxItemPool, 0);
@@ -555,7 +555,7 @@ void SfxItemPool::Delete()
SfxPoolItemArray_Impl** ppItemArr = pImp->ppPoolItems;
SfxPoolItem** ppDefaultItem = ppPoolDefaults;
SfxPoolItem** ppStaticDefaultItem = ppStaticDefaults;
- USHORT nArrCnt;
+ sal_uInt16 nArrCnt;
//Erst die SetItems abraeumen
HACK( "fuer Image, dort gibt es derzeit keine Statics - Bug" )
@@ -639,7 +639,7 @@ void SfxItemPool::Cleanup()
SfxPoolItemArray_Impl** ppItemArr = pImp->ppPoolItems;
SfxPoolItem** ppDefaultItem = ppPoolDefaults;
SfxPoolItem** ppStaticDefaultItem = ppStaticDefaults;
- USHORT nArrCnt;
+ sal_uInt16 nArrCnt;
HACK( "fuer Image, dort gibt es derzeit keine Statics - Bug" )
if ( ppStaticDefaults ) //HACK fuer Image, dort gibt es keine Statics!!
@@ -709,7 +709,7 @@ void SfxItemPool::SetPoolDefaultItem(const SfxPoolItem &rItem)
* Resets the default of the given <Which-Id> back to the static default.
* If a pool default exists it is removed.
*/
-void SfxItemPool::ResetPoolDefaultItem( USHORT nWhichId )
+void SfxItemPool::ResetPoolDefaultItem( sal_uInt16 nWhichId )
{
DBG_CHKTHIS(SfxItemPool, 0);
if ( IsInRange(nWhichId) )
@@ -732,7 +732,7 @@ void SfxItemPool::ResetPoolDefaultItem( USHORT nWhichId )
// -----------------------------------------------------------------------
-const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, USHORT nWhich )
+const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich )
{
DBG_ASSERT( !rItem.ISA(SfxSetItem) ||
0 != &((const SfxSetItem&)rItem).GetItemSet(),
@@ -743,7 +743,7 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, USHORT nWhich )
nWhich = rItem.Which();
// richtigen Secondary-Pool finden
- BOOL bSID = nWhich > SFX_WHICH_MAX;
+ sal_Bool bSID = nWhich > SFX_WHICH_MAX;
if ( !bSID && !IsInRange(nWhich) )
{
if ( pSecondary )
@@ -752,7 +752,7 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, USHORT nWhich )
}
// SID oder nicht poolable (neue Definition)?
- USHORT nIndex = bSID ? USHRT_MAX : GetIndex_Impl(nWhich);
+ sal_uInt16 nIndex = bSID ? USHRT_MAX : GetIndex_Impl(nWhich);
if ( USHRT_MAX == nIndex ||
IsItemFlag_Impl( nIndex, SFX_ITEM_NOT_POOLABLE ) )
{
@@ -773,7 +773,7 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, USHORT nWhich )
*ppItemArr = new SfxPoolItemArray_Impl;
SfxPoolItemArrayBase_Impl::iterator ppFree;
- BOOL ppFreeIsSet = FALSE;
+ sal_Bool ppFreeIsSet = sal_False;
SfxPoolItemArrayBase_Impl::iterator ppHtArray = (*ppItemArr)->begin();
if ( IsItemFlag_Impl( nIndex, SFX_ITEM_POOLABLE ) )
{
@@ -803,10 +803,10 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, USHORT nWhich )
}
}
else
- if ( ppFreeIsSet == FALSE )
+ if ( ppFreeIsSet == sal_False )
{
ppFree = ppHtArray;
- ppFreeIsSet = TRUE;
+ ppFreeIsSet = sal_True;
}
}
}
@@ -822,7 +822,7 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, USHORT nWhich )
if ( !*ppHtArr )
{
ppFree = ppHtArr;
- ppFreeIsSet = TRUE;
+ ppFreeIsSet = sal_True;
break;
}
@@ -849,7 +849,7 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, USHORT nWhich )
#endif
AddRef( *pNewItem, pImp->nInitRefCount );
SfxPoolItem* pTemp = pNewItem;
- if ( ppFreeIsSet == FALSE )
+ if ( ppFreeIsSet == sal_False )
(*ppItemArr)->push_back( pTemp );
else
{
@@ -873,8 +873,8 @@ void SfxItemPool::Remove( const SfxPoolItem& rItem )
"wo kommt denn hier ein Pool-Default her" );
// richtigen Secondary-Pool finden
- const USHORT nWhich = rItem.Which();
- BOOL bSID = nWhich > SFX_WHICH_MAX;
+ const sal_uInt16 nWhich = rItem.Which();
+ sal_Bool bSID = nWhich > SFX_WHICH_MAX;
if ( !bSID && !IsInRange(nWhich) )
{
if ( pSecondary )
@@ -886,7 +886,7 @@ void SfxItemPool::Remove( const SfxPoolItem& rItem )
}
// SID oder nicht poolable (neue Definition)?
- USHORT nIndex = bSID ? USHRT_MAX : GetIndex_Impl(nWhich);
+ sal_uInt16 nIndex = bSID ? USHRT_MAX : GetIndex_Impl(nWhich);
if ( bSID || IsItemFlag_Impl( nIndex, SFX_ITEM_NOT_POOLABLE ) )
{
SFX_ASSERT( USHRT_MAX != nIndex ||
@@ -941,7 +941,7 @@ void SfxItemPool::Remove( const SfxPoolItem& rItem )
// -----------------------------------------------------------------------
-const SfxPoolItem& SfxItemPool::GetDefaultItem( USHORT nWhich ) const
+const SfxPoolItem& SfxItemPool::GetDefaultItem( sal_uInt16 nWhich ) const
{
DBG_CHKTHIS(SfxItemPool, 0);
@@ -953,7 +953,7 @@ const SfxPoolItem& SfxItemPool::GetDefaultItem( USHORT nWhich ) const
}
DBG_ASSERT( ppStaticDefaults, "no defaults known - dont ask me for defaults" );
- USHORT nPos = GetIndex_Impl(nWhich);
+ sal_uInt16 nPos = GetIndex_Impl(nWhich);
SfxPoolItem *pDefault = *(ppPoolDefaults + nPos);
if ( pDefault )
return *pDefault;
@@ -981,17 +981,17 @@ void SfxItemPool::FreezeIdRanges()
// -----------------------------------------------------------------------
-void SfxItemPool::FillItemIdRanges_Impl( USHORT*& pWhichRanges ) const
+void SfxItemPool::FillItemIdRanges_Impl( sal_uInt16*& pWhichRanges ) const
{
DBG_CHKTHIS(SfxItemPool, 0);
DBG_ASSERT( !_pPoolRanges, "GetFrozenRanges() would be faster!" );
const SfxItemPool *pPool;
- USHORT nLevel = 0;
+ sal_uInt16 nLevel = 0;
for( pPool = this; pPool; pPool = pPool->pSecondary )
++nLevel;
- pWhichRanges = new USHORT[ 2*nLevel + 1 ];
+ pWhichRanges = new sal_uInt16[ 2*nLevel + 1 ];
nLevel = 0;
for( pPool = this; pPool; pPool = pPool->pSecondary )
@@ -1004,7 +1004,7 @@ void SfxItemPool::FillItemIdRanges_Impl( USHORT*& pWhichRanges ) const
// -----------------------------------------------------------------------
-const SfxPoolItem *SfxItemPool::GetItem2(USHORT nWhich, sal_uInt32 nOfst) const
+const SfxPoolItem *SfxItemPool::GetItem2(sal_uInt16 nWhich, sal_uInt32 nOfst) const
{
DBG_CHKTHIS(SfxItemPool, 0);
@@ -1029,7 +1029,7 @@ const SfxPoolItem *SfxItemPool::GetItem2(USHORT nWhich, sal_uInt32 nOfst) const
// -----------------------------------------------------------------------
-sal_uInt32 SfxItemPool::GetItemCount2(USHORT nWhich) const
+sal_uInt32 SfxItemPool::GetItemCount2(sal_uInt16 nWhich) const
{
DBG_CHKTHIS(SfxItemPool, 0);
@@ -1049,21 +1049,21 @@ sal_uInt32 SfxItemPool::GetItemCount2(USHORT nWhich) const
// -----------------------------------------------------------------------
-USHORT SfxItemPool::GetWhich( USHORT nSlotId, BOOL bDeep ) const
+sal_uInt16 SfxItemPool::GetWhich( sal_uInt16 nSlotId, sal_Bool bDeep ) const
{
if ( !IsSlot(nSlotId) )
return nSlotId;
#ifdef TF_POOLABLE
- USHORT nCount = nEnd - nStart + 1;
- for ( USHORT nOfs = 0; nOfs < nCount; ++nOfs )
+ sal_uInt16 nCount = nEnd - nStart + 1;
+ for ( sal_uInt16 nOfs = 0; nOfs < nCount; ++nOfs )
if ( pItemInfos[nOfs]._nSID == nSlotId )
return nOfs + nStart;
#else
if ( pSlotIds )
{
- USHORT nCount = nEnd - nStart + 1;
- for ( USHORT nOfs = 0; nOfs < nCount; ++nOfs )
+ sal_uInt16 nCount = nEnd - nStart + 1;
+ for ( sal_uInt16 nOfs = 0; nOfs < nCount; ++nOfs )
if ( pSlotIds[nOfs] == nSlotId )
return nOfs + nStart;
}
@@ -1075,7 +1075,7 @@ USHORT SfxItemPool::GetWhich( USHORT nSlotId, BOOL bDeep ) const
// -----------------------------------------------------------------------
-USHORT SfxItemPool::GetSlotId( USHORT nWhich, BOOL bDeep ) const
+sal_uInt16 SfxItemPool::GetSlotId( sal_uInt16 nWhich, sal_Bool bDeep ) const
{
if ( !IsWhich(nWhich) )
return nWhich;
@@ -1089,7 +1089,7 @@ USHORT SfxItemPool::GetSlotId( USHORT nWhich, BOOL bDeep ) const
}
#ifdef TF_POOLABLE
- USHORT nSID = pItemInfos[nWhich - nStart]._nSID;
+ sal_uInt16 nSID = pItemInfos[nWhich - nStart]._nSID;
return nSID ? nSID : nWhich;
#else
else if ( pSlotIds )
@@ -1100,21 +1100,21 @@ USHORT SfxItemPool::GetSlotId( USHORT nWhich, BOOL bDeep ) const
// -----------------------------------------------------------------------
-USHORT SfxItemPool::GetTrueWhich( USHORT nSlotId, BOOL bDeep ) const
+sal_uInt16 SfxItemPool::GetTrueWhich( sal_uInt16 nSlotId, sal_Bool bDeep ) const
{
if ( !IsSlot(nSlotId) )
return 0;
#ifdef TF_POOLABLE
- USHORT nCount = nEnd - nStart + 1;
- for ( USHORT nOfs = 0; nOfs < nCount; ++nOfs )
+ sal_uInt16 nCount = nEnd - nStart + 1;
+ for ( sal_uInt16 nOfs = 0; nOfs < nCount; ++nOfs )
if ( pItemInfos[nOfs]._nSID == nSlotId )
return nOfs + nStart;
#else
if ( pSlotIds )
{
- USHORT nCount = nEnd - nStart + 1;
- for ( USHORT nOfs = 0; nOfs < nCount; ++nOfs )
+ sal_uInt16 nCount = nEnd - nStart + 1;
+ for ( sal_uInt16 nOfs = 0; nOfs < nCount; ++nOfs )
if ( pSlotIds[nOfs] == nSlotId )
return nOfs + nStart;
}
@@ -1126,7 +1126,7 @@ USHORT SfxItemPool::GetTrueWhich( USHORT nSlotId, BOOL bDeep ) const
// -----------------------------------------------------------------------
-USHORT SfxItemPool::GetTrueSlotId( USHORT nWhich, BOOL bDeep ) const
+sal_uInt16 SfxItemPool::GetTrueSlotId( sal_uInt16 nWhich, sal_Bool bDeep ) const
{
if ( !IsWhich(nWhich) )
return 0;
@@ -1148,7 +1148,7 @@ USHORT SfxItemPool::GetTrueSlotId( USHORT nWhich, BOOL bDeep ) const
#endif
}
// -----------------------------------------------------------------------
-void SfxItemPool::SetFileFormatVersion( USHORT nFileFormatVersion )
+void SfxItemPool::SetFileFormatVersion( sal_uInt16 nFileFormatVersion )
/* [Description]
diff --git a/svl/source/items/itemprop.cxx b/svl/source/items/itemprop.cxx
index b3be80bc3d0b..eb146afe893b 100644
--- a/svl/source/items/itemprop.cxx
+++ b/svl/source/items/itemprop.cxx
@@ -214,9 +214,9 @@ SfxItemPropertySet::~SfxItemPropertySet()
/* -----------------------------21.02.00 11:26--------------------------------
---------------------------------------------------------------------------*/
-BOOL SfxItemPropertySet::FillItem(SfxItemSet&, USHORT, BOOL) const
+sal_Bool SfxItemPropertySet::FillItem(SfxItemSet&, sal_uInt16, sal_Bool) const
{
- return FALSE;
+ return sal_False;
}
/* -----------------------------06.06.01 12:32--------------------------------
@@ -227,7 +227,7 @@ void SfxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry& rEn
{
// get the SfxPoolItem
const SfxPoolItem* pItem = 0;
- SfxItemState eState = rSet.GetItemState( rEntry.nWID, TRUE, &pItem );
+ SfxItemState eState = rSet.GetItemState( rEntry.nWID, sal_True, &pItem );
if(SFX_ITEM_SET != eState && SFX_WHICH_MAX > rEntry.nWID )
pItem = &rSet.GetPool()->GetDefaultItem(rEntry.nWID);
// return item values as uno::Any
@@ -238,7 +238,7 @@ void SfxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry& rEn
else
{
SfxItemSet aSet(*rSet.GetPool(), rEntry.nWID, rEntry.nWID);
- if(FillItem(aSet, rEntry.nWID, TRUE))
+ if(FillItem(aSet, rEntry.nWID, sal_True))
{
const SfxPoolItem& rItem = aSet.Get(rEntry.nWID);
rItem.QueryValue( rAny, rEntry.nMemberId );
@@ -252,7 +252,7 @@ void SfxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry& rEn
if( rEntry.pType && TypeClass_ENUM == rEntry.pType->getTypeClass() &&
rAny.getValueTypeClass() == TypeClass_LONG )
{
- INT32 nTmp = *(INT32*)rAny.getValue();
+ sal_Int32 nTmp = *(sal_Int32*)rAny.getValue();
rAny.setValue( &nTmp, *rEntry.pType );
}
}
@@ -292,14 +292,14 @@ void SfxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry& rEn
// get the SfxPoolItem
const SfxPoolItem* pItem = 0;
SfxPoolItem *pNewItem = 0;
- SfxItemState eState = rSet.GetItemState( rEntry.nWID, TRUE, &pItem );
+ SfxItemState eState = rSet.GetItemState( rEntry.nWID, sal_True, &pItem );
if(SFX_ITEM_SET != eState && SFX_WHICH_MAX > rEntry.nWID )
pItem = &rSet.GetPool()->GetDefaultItem(rEntry.nWID);
//maybe there's another way to find an Item
if(eState < SFX_ITEM_DEFAULT)
{
SfxItemSet aSet(*rSet.GetPool(), rEntry.nWID, rEntry.nWID);
- if(FillItem(aSet, rEntry.nWID, FALSE))
+ if(FillItem(aSet, rEntry.nWID, sal_False))
{
const SfxPoolItem &rItem = aSet.Get(rEntry.nWID);
pNewItem = rItem.Clone();
@@ -345,10 +345,10 @@ PropertyState SfxItemPropertySet::getPropertyState(const SfxItemPropertySimpleEn
throw()
{
PropertyState eRet = PropertyState_DIRECT_VALUE;
- USHORT nWhich = rEntry.nWID;
+ sal_uInt16 nWhich = rEntry.nWID;
// item state holen
- SfxItemState eState = rSet.GetItemState( nWhich, FALSE );
+ SfxItemState eState = rSet.GetItemState( nWhich, sal_False );
// item-Wert als UnoAny zurueckgeben
if(eState == SFX_ITEM_DEFAULT)
eRet = PropertyState_DEFAULT_VALUE;
@@ -368,11 +368,11 @@ PropertyState SfxItemPropertySet::getPropertyState(
{
throw UnknownPropertyException();
}
- USHORT nWhich = pEntry->nWID;
+ sal_uInt16 nWhich = pEntry->nWID;
// item holen
const SfxPoolItem* pItem = 0;
- SfxItemState eState = rSet.GetItemState( nWhich, FALSE, &pItem );
+ SfxItemState eState = rSet.GetItemState( nWhich, sal_False, &pItem );
if(!pItem && nWhich != rSet.GetPool()->GetSlotId(nWhich))
pItem = &rSet.GetPool()->GetDefaultItem(nWhich);
// item-Wert als UnoAny zurueckgeben
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index 540db537be46..250e7f99a6ec 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -50,16 +50,16 @@
// STATIC DATA -----------------------------------------------------------
-static const USHORT nInitCount = 10; // einzelne USHORTs => 5 Paare ohne '0'
+static const sal_uInt16 nInitCount = 10; // einzelne USHORTs => 5 Paare ohne '0'
#ifdef DBG_UTIL
-static ULONG nRangesCopyCount = 0; // wie oft wurden Ranges kopiert
+static sal_uLong nRangesCopyCount = 0; // wie oft wurden Ranges kopiert
#endif
DBG_NAME(SfxItemSet)
//========================================================================
-#define NUMTYPE USHORT
+#define NUMTYPE sal_uInt16
#define SvNums SvUShorts
#define SfxNumRanges SfxUShortRanges
#include "nranges.cxx"
@@ -67,7 +67,7 @@ DBG_NAME(SfxItemSet)
#undef SvNums
#undef SfxNumRanges
-#define NUMTYPE ULONG
+#define NUMTYPE sal_uLong
#define SvNums SvULongs
#define SfxNumRanges SfxULongRanges
#include "nranges.cxx"
@@ -84,8 +84,8 @@ const sal_Char *DbgCheckItemSet( const void* pVoid )
{
const SfxItemSet *pSet = (const SfxItemSet*) pVoid;
SfxWhichIter aIter( *pSet );
- USHORT nCount = 0, n = 0;
- for ( USHORT nWh = aIter.FirstWhich(); nWh; nWh = aIter.NextWhich(), ++n )
+ sal_uInt16 nCount = 0, n = 0;
+ for ( sal_uInt16 nWh = aIter.FirstWhich(); nWh; nWh = aIter.NextWhich(), ++n )
{
const SfxPoolItem *pItem = pSet->_aItems[n];
if ( pItem )
@@ -115,12 +115,12 @@ SfxItemSet::SfxItemSet
SfxItemPool& rPool, /* der Pool, in dem die SfxPoolItems,
welche in dieses SfxItemSet gelangen,
aufgenommen werden sollen */
- BOOL
+ sal_Bool
#ifdef DBG_UTIL
#ifdef SFX_ITEMSET_NO_DEFAULT_CTOR
bTotalRanges /* komplette Pool-Ranges uebernehmen,
- muss auf TRUE gesetzt werden */
+ muss auf sal_True gesetzt werden */
#endif
#endif
)
@@ -152,19 +152,19 @@ SfxItemSet::SfxItemSet
#endif
#endif
- _pWhichRanges = (USHORT*) _pPool->GetFrozenIdRanges();
+ _pWhichRanges = (sal_uInt16*) _pPool->GetFrozenIdRanges();
DBG_ASSERT( _pWhichRanges, "don't create ItemSets with full range before FreezeIdRanges()" );
if ( !_pWhichRanges )
_pPool->FillItemIdRanges_Impl( _pWhichRanges );
- const USHORT nSize = TotalCount();
+ const sal_uInt16 nSize = TotalCount();
_aItems = new const SfxPoolItem* [ nSize ];
memset( (void*) _aItems, 0, nSize * sizeof( SfxPoolItem* ) );
}
// -----------------------------------------------------------------------
-SfxItemSet::SfxItemSet( SfxItemPool& rPool, USHORT nWhich1, USHORT nWhich2 ):
+SfxItemSet::SfxItemSet( SfxItemPool& rPool, sal_uInt16 nWhich1, sal_uInt16 nWhich2 ):
_pPool( &rPool ),
_pParent( 0 ),
_nCount( 0 )
@@ -179,25 +179,25 @@ SfxItemSet::SfxItemSet( SfxItemPool& rPool, USHORT nWhich1, USHORT nWhich2 ):
// -----------------------------------------------------------------------
-void SfxItemSet::InitRanges_Impl(USHORT nWh1, USHORT nWh2)
+void SfxItemSet::InitRanges_Impl(sal_uInt16 nWh1, sal_uInt16 nWh2)
{
DBG_CHKTHIS(SfxItemSet, 0);
- _pWhichRanges = new USHORT[ 3 ];
+ _pWhichRanges = new sal_uInt16[ 3 ];
*(_pWhichRanges+0) = nWh1;
*(_pWhichRanges+1) = nWh2;
*(_pWhichRanges+2) = 0;
- const USHORT nRg = nWh2 - nWh1 + 1;
+ const sal_uInt16 nRg = nWh2 - nWh1 + 1;
_aItems = new const SfxPoolItem* [ nRg ];
memset( (void*) _aItems, 0, nRg * sizeof( SfxPoolItem* ) );
}
// -----------------------------------------------------------------------
-void SfxItemSet::InitRanges_Impl(va_list pArgs, USHORT nWh1, USHORT nWh2, USHORT nNull)
+void SfxItemSet::InitRanges_Impl(va_list pArgs, sal_uInt16 nWh1, sal_uInt16 nWh2, sal_uInt16 nNull)
{
DBG_CHKTHIS(SfxItemSet, 0);
- USHORT nSize = InitializeRanges_Impl( _pWhichRanges, pArgs, nWh1, nWh2, nNull );
+ sal_uInt16 nSize = InitializeRanges_Impl( _pWhichRanges, pArgs, nWh1, nWh2, nNull );
_aItems = new const SfxPoolItem* [ nSize ];
memset( (void*) _aItems, 0, sizeof( SfxPoolItem* ) * nSize );
}
@@ -218,27 +218,27 @@ SfxItemSet::SfxItemSet( SfxItemPool& rPool,
if(!nNull)
InitRanges_Impl(
- sal::static_int_cast< USHORT >(nWh1),
- sal::static_int_cast< USHORT >(nWh2));
+ sal::static_int_cast< sal_uInt16 >(nWh1),
+ sal::static_int_cast< sal_uInt16 >(nWh2));
else {
va_list pArgs;
va_start( pArgs, nNull );
InitRanges_Impl(
- pArgs, sal::static_int_cast< USHORT >(nWh1),
- sal::static_int_cast< USHORT >(nWh2),
- sal::static_int_cast< USHORT >(nNull));
+ pArgs, sal::static_int_cast< sal_uInt16 >(nWh1),
+ sal::static_int_cast< sal_uInt16 >(nWh2),
+ sal::static_int_cast< sal_uInt16 >(nNull));
}
}
// -----------------------------------------------------------------------
-void SfxItemSet::InitRanges_Impl(const USHORT *pWhichPairTable)
+void SfxItemSet::InitRanges_Impl(const sal_uInt16 *pWhichPairTable)
{
DBG_CHKTHIS(SfxItemSet, 0);
DBG_TRACE1("SfxItemSet: Ranges-CopyCount==%ul", ++nRangesCopyCount);
- USHORT nCnt = 0;
- const USHORT* pPtr = pWhichPairTable;
+ sal_uInt16 nCnt = 0;
+ const sal_uInt16* pPtr = pWhichPairTable;
while( *pPtr )
{
nCnt += ( *(pPtr+1) - *pPtr ) + 1;
@@ -249,14 +249,14 @@ void SfxItemSet::InitRanges_Impl(const USHORT *pWhichPairTable)
memset( (void*) _aItems, 0, sizeof( SfxPoolItem* ) * nCnt );
std::ptrdiff_t cnt = pPtr - pWhichPairTable +1;
- _pWhichRanges = new USHORT[ cnt ];
- memcpy( _pWhichRanges, pWhichPairTable, sizeof( USHORT ) * cnt );
+ _pWhichRanges = new sal_uInt16[ cnt ];
+ memcpy( _pWhichRanges, pWhichPairTable, sizeof( sal_uInt16 ) * cnt );
}
// -----------------------------------------------------------------------
-SfxItemSet::SfxItemSet( SfxItemPool& rPool, const USHORT* pWhichPairTable ):
+SfxItemSet::SfxItemSet( SfxItemPool& rPool, const sal_uInt16* pWhichPairTable ):
_pPool( &rPool ),
_pParent( 0 ),
_pWhichRanges(0),
@@ -284,8 +284,8 @@ SfxItemSet::SfxItemSet( const SfxItemSet& rASet ):
DBG( ++*_pChildCount(_pParent) );
// errechne die Anzahl von Attributen
- USHORT nCnt = 0;
- USHORT* pPtr = rASet._pWhichRanges;
+ sal_uInt16 nCnt = 0;
+ sal_uInt16* pPtr = rASet._pWhichRanges;
while( *pPtr )
{
nCnt += ( *(pPtr+1) - *pPtr ) + 1;
@@ -296,7 +296,7 @@ SfxItemSet::SfxItemSet( const SfxItemSet& rASet ):
// Attribute kopieren
SfxItemArray ppDst = _aItems, ppSrc = rASet._aItems;
- for( USHORT n = nCnt; n; --n, ++ppDst, ++ppSrc )
+ for( sal_uInt16 n = nCnt; n; --n, ++ppDst, ++ppSrc )
if ( 0 == *ppSrc || // aktueller Default?
IsInvalidItem(*ppSrc) || // Dont Care?
IsStaticDefaultItem(*ppSrc) ) // nicht zu poolende Defaults
@@ -317,8 +317,8 @@ SfxItemSet::SfxItemSet( const SfxItemSet& rASet ):
// dann noch die Which Ranges kopieren
DBG_TRACE1("SfxItemSet: Ranges-CopyCount==%ul", ++nRangesCopyCount);
std::ptrdiff_t cnt = pPtr - rASet._pWhichRanges+1;
- _pWhichRanges = new USHORT[ cnt ];
- memcpy( _pWhichRanges, rASet._pWhichRanges, sizeof( USHORT ) * cnt);
+ _pWhichRanges = new sal_uInt16[ cnt ];
+ memcpy( _pWhichRanges, rASet._pWhichRanges, sizeof( sal_uInt16 ) * cnt);
}
// -----------------------------------------------------------------------
@@ -330,11 +330,11 @@ SfxItemSet::~SfxItemSet()
DBG( DBG_ASSERT( 0 == *_pChildCount(this), "SfxItemSet: deleting parent-itemset" ) )
#endif
- USHORT nCount = TotalCount();
+ sal_uInt16 nCount = TotalCount();
if( Count() )
{
SfxItemArray ppFnd = _aItems;
- for( USHORT nCnt = nCount; nCnt; --nCnt, ++ppFnd )
+ for( sal_uInt16 nCnt = nCount; nCnt; --nCnt, ++ppFnd )
if( *ppFnd && !IsInvalidItem(*ppFnd) )
{
if( !(*ppFnd)->Which() )
@@ -364,7 +364,7 @@ SfxItemSet::~SfxItemSet()
// -----------------------------------------------------------------------
-USHORT SfxItemSet::ClearItem( USHORT nWhich )
+sal_uInt16 SfxItemSet::ClearItem( sal_uInt16 nWhich )
// einzelnes Item oder alle Items (nWhich==0) l"oschen
@@ -373,12 +373,12 @@ USHORT SfxItemSet::ClearItem( USHORT nWhich )
if( !Count() )
return 0;
- USHORT nDel = 0;
+ sal_uInt16 nDel = 0;
SfxItemArray ppFnd = _aItems;
if( nWhich )
{
- const USHORT* pPtr = _pWhichRanges;
+ const sal_uInt16* pPtr = _pWhichRanges;
while( *pPtr )
{
// in diesem Bereich?
@@ -398,7 +398,7 @@ USHORT SfxItemSet::ClearItem( USHORT nWhich )
if ( nWhich <= SFX_WHICH_MAX )
{
const SfxPoolItem& rNew = _pParent
- ? _pParent->Get( nWhich, TRUE )
+ ? _pParent->Get( nWhich, sal_True )
: _pPool->GetDefaultItem( nWhich );
Changed( *pItemToClear, rNew );
@@ -420,7 +420,7 @@ USHORT SfxItemSet::ClearItem( USHORT nWhich )
{
nDel = _nCount;
- USHORT* pPtr = _pWhichRanges;
+ sal_uInt16* pPtr = _pWhichRanges;
while( *pPtr )
{
for( nWhich = *pPtr; nWhich <= *(pPtr+1); ++nWhich, ++ppFnd )
@@ -436,7 +436,7 @@ USHORT SfxItemSet::ClearItem( USHORT nWhich )
if ( nWhich <= SFX_WHICH_MAX )
{
const SfxPoolItem& rNew = _pParent
- ? _pParent->Get( nWhich, TRUE )
+ ? _pParent->Get( nWhich, sal_True )
: _pPool->GetDefaultItem( nWhich );
Changed( *pItemToClear, rNew );
@@ -464,15 +464,15 @@ USHORT SfxItemSet::ClearItem( USHORT nWhich )
// -----------------------------------------------------------------------
-void SfxItemSet::ClearInvalidItems( BOOL bHardDefault )
+void SfxItemSet::ClearInvalidItems( sal_Bool bHardDefault )
{
DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet);
- USHORT* pPtr = _pWhichRanges;
+ sal_uInt16* pPtr = _pWhichRanges;
SfxItemArray ppFnd = _aItems;
if ( bHardDefault )
while( *pPtr )
{
- for ( USHORT nWhich = *pPtr; nWhich <= *(pPtr+1); ++nWhich, ++ppFnd )
+ for ( sal_uInt16 nWhich = *pPtr; nWhich <= *(pPtr+1); ++nWhich, ++ppFnd )
if ( IsInvalidItem(*ppFnd) )
*ppFnd = &_pPool->Put( _pPool->GetDefaultItem(nWhich) );
pPtr += 2;
@@ -480,7 +480,7 @@ void SfxItemSet::ClearInvalidItems( BOOL bHardDefault )
else
while( *pPtr )
{
- for( USHORT nWhich = *pPtr; nWhich <= *(pPtr+1); ++nWhich, ++ppFnd )
+ for( sal_uInt16 nWhich = *pPtr; nWhich <= *(pPtr+1); ++nWhich, ++ppFnd )
if( IsInvalidItem(*ppFnd) )
{
*ppFnd = 0;
@@ -503,8 +503,8 @@ void SfxItemSet::InvalidateAllItems()
// -----------------------------------------------------------------------
-SfxItemState SfxItemSet::GetItemState( USHORT nWhich,
- BOOL bSrchInParent,
+SfxItemState SfxItemSet::GetItemState( sal_uInt16 nWhich,
+ sal_Bool bSrchInParent,
const SfxPoolItem **ppItem ) const
{
DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet);
@@ -514,7 +514,7 @@ SfxItemState SfxItemSet::GetItemState( USHORT nWhich,
do
{
SfxItemArray ppFnd = pAktSet->_aItems;
- const USHORT* pPtr = pAktSet->_pWhichRanges;
+ const sal_uInt16* pPtr = pAktSet->_pWhichRanges;
if (pPtr)
{
while ( *pPtr )
@@ -560,7 +560,7 @@ SfxItemState SfxItemSet::GetItemState( USHORT nWhich,
// -----------------------------------------------------------------------
-const SfxPoolItem* SfxItemSet::Put( const SfxPoolItem& rItem, USHORT nWhich )
+const SfxPoolItem* SfxItemSet::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich )
{
DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet);
DBG_ASSERT( !rItem.ISA(SfxSetItem) ||
@@ -569,7 +569,7 @@ const SfxPoolItem* SfxItemSet::Put( const SfxPoolItem& rItem, USHORT nWhich )
if ( !nWhich )
return 0; //! nur wegen Outliner-Bug
SfxItemArray ppFnd = _aItems;
- const USHORT* pPtr = _pWhichRanges;
+ const sal_uInt16* pPtr = _pWhichRanges;
while( *pPtr )
{
if( *pPtr <= nWhich && nWhich <= *(pPtr+1) )
@@ -621,7 +621,7 @@ const SfxPoolItem* SfxItemSet::Put( const SfxPoolItem& rItem, USHORT nWhich )
if (nWhich <= SFX_WHICH_MAX )
{
const SfxPoolItem& rOld = _pParent
- ? _pParent->Get( nWhich, TRUE )
+ ? _pParent->Get( nWhich, sal_True )
: _pPool->GetDefaultItem( nWhich );
Changed( rOld, rNew );
}
@@ -640,17 +640,17 @@ const SfxPoolItem* SfxItemSet::Put( const SfxPoolItem& rItem, USHORT nWhich )
// -----------------------------------------------------------------------
-int SfxItemSet::Put( const SfxItemSet& rSet, BOOL bInvalidAsDefault )
+int SfxItemSet::Put( const SfxItemSet& rSet, sal_Bool bInvalidAsDefault )
{
DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet);
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( rSet.Count() )
{
SfxItemArray ppFnd = rSet._aItems;
- const USHORT* pPtr = rSet._pWhichRanges;
+ const sal_uInt16* pPtr = rSet._pWhichRanges;
while ( *pPtr )
{
- for ( USHORT nWhich = *pPtr; nWhich <= *(pPtr+1); ++nWhich, ++ppFnd )
+ for ( sal_uInt16 nWhich = *pPtr; nWhich <= *(pPtr+1); ++nWhich, ++ppFnd )
if( *ppFnd )
{
if ( IsInvalidItem( *ppFnd ) )
@@ -702,10 +702,10 @@ void SfxItemSet::PutExtended
// don't "optimize" with "if( rSet.Count()" because of dont-care + defaults
SfxItemArray ppFnd = rSet._aItems;
- const USHORT* pPtr = rSet._pWhichRanges;
+ const sal_uInt16* pPtr = rSet._pWhichRanges;
while ( *pPtr )
{
- for ( USHORT nWhich = *pPtr; nWhich <= *(pPtr+1); ++nWhich, ++ppFnd )
+ for ( sal_uInt16 nWhich = *pPtr; nWhich <= *(pPtr+1); ++nWhich, ++ppFnd )
if( *ppFnd )
{
if ( IsInvalidItem( *ppFnd ) )
@@ -760,7 +760,7 @@ void SfxItemSet::PutExtended
// -----------------------------------------------------------------------
-void SfxItemSet::MergeRange( USHORT nFrom, USHORT nTo )
+void SfxItemSet::MergeRange( sal_uInt16 nFrom, sal_uInt16 nTo )
/** <H3>Description</H3>
Expands the ranges of settable items by 'nFrom' to 'nTo'. Keeps state of
@@ -768,8 +768,8 @@ void SfxItemSet::MergeRange( USHORT nFrom, USHORT nTo )
*/
{
- // special case: exactly one USHORT which is already included?
- if ( nFrom == nTo && SFX_ITEM_AVAILABLE <= GetItemState(nFrom, FALSE) )
+ // special case: exactly one sal_uInt16 which is already included?
+ if ( nFrom == nTo && SFX_ITEM_AVAILABLE <= GetItemState(nFrom, sal_False) )
return;
// merge new range
@@ -780,7 +780,7 @@ void SfxItemSet::MergeRange( USHORT nFrom, USHORT nTo )
// -----------------------------------------------------------------------
-void SfxItemSet::SetRanges( const USHORT *pNewRanges )
+void SfxItemSet::SetRanges( const sal_uInt16 *pNewRanges )
/** <H3>Description</H3>
@@ -792,8 +792,8 @@ void SfxItemSet::SetRanges( const USHORT *pNewRanges )
// identische Ranges?
if ( _pWhichRanges == pNewRanges )
return;
- const USHORT* pOld = _pWhichRanges;
- const USHORT* pNew = pNewRanges;
+ const sal_uInt16* pOld = _pWhichRanges;
+ const sal_uInt16* pNew = pNewRanges;
while ( *pOld == *pNew )
{
if ( !*pOld && !*pNew )
@@ -802,20 +802,20 @@ void SfxItemSet::SetRanges( const USHORT *pNewRanges )
}
// create new item-array (by iterating through all new ranges)
- ULONG nSize = Capacity_Impl(pNewRanges);
+ sal_uLong nSize = Capacity_Impl(pNewRanges);
SfxItemArray aNewItems = new const SfxPoolItem* [ nSize ];
- USHORT n = 0, nNewCount = 0;
+ sal_uInt16 n = 0, nNewCount = 0;
if ( _nCount == 0 )
memset( aNewItems, 0, nSize * sizeof( SfxPoolItem* ) );
else
{
- for ( const USHORT *pRange = pNewRanges; *pRange; pRange += 2 )
+ for ( const sal_uInt16 *pRange = pNewRanges; *pRange; pRange += 2 )
{
// iterate through all ids in the range
- for ( USHORT nWID = *pRange; nWID <= pRange[1]; ++nWID, ++n )
+ for ( sal_uInt16 nWID = *pRange; nWID <= pRange[1]; ++nWID, ++n )
{
// direct move of pointer (not via pool)
- SfxItemState eState = GetItemState( nWID, FALSE, aNewItems+n );
+ SfxItemState eState = GetItemState( nWID, sal_False, aNewItems+n );
if ( SFX_ITEM_SET == eState )
{
// increment new item count and possibly increment ref count
@@ -841,8 +841,8 @@ void SfxItemSet::SetRanges( const USHORT *pNewRanges )
}
}
// free old items
- USHORT nOldTotalCount = TotalCount();
- for ( USHORT nItem = 0; nItem < nOldTotalCount; ++nItem )
+ sal_uInt16 nOldTotalCount = TotalCount();
+ for ( sal_uInt16 nItem = 0; nItem < nOldTotalCount; ++nItem )
{
const SfxPoolItem *pItem = _aItems[nItem];
if ( pItem && !IsInvalidItem(pItem) && pItem->Which() )
@@ -858,15 +858,15 @@ void SfxItemSet::SetRanges( const USHORT *pNewRanges )
if( pNewRanges == GetPool()->GetFrozenIdRanges() )
{
delete[] _pWhichRanges;
- _pWhichRanges = ( USHORT* ) pNewRanges;
+ _pWhichRanges = ( sal_uInt16* ) pNewRanges;
}
else
{
- USHORT nCount = Count_Impl(pNewRanges) + 1;
+ sal_uInt16 nCount = Count_Impl(pNewRanges) + 1;
if ( _pWhichRanges != _pPool->GetFrozenIdRanges() )
delete[] _pWhichRanges;
- _pWhichRanges = new USHORT[ nCount ];
- memcpy( _pWhichRanges, pNewRanges, sizeof( USHORT ) * nCount );
+ _pWhichRanges = new sal_uInt16[ nCount ];
+ memcpy( _pWhichRanges, pNewRanges, sizeof( sal_uInt16 ) * nCount );
}
}
@@ -877,12 +877,12 @@ int SfxItemSet::Set
const SfxItemSet& rSet, /* das SfxItemSet, dessen SfxPoolItems
"ubernommen werden sollen */
- BOOL bDeep /* TRUE (default)
+ sal_Bool bDeep /* sal_True (default)
auch die SfxPoolItems aus den ggf. an
rSet vorhandenen Parents werden direkt
in das SfxItemSet "ubernommen
- FALSE
+ sal_False
die SfxPoolItems aus den Parents von
rSet werden nicht ber"ucksichtigt */
)
@@ -895,16 +895,16 @@ int SfxItemSet::Set
so da"s die "ubernommenen SfxPoolItems dabei ggf. vom SfxItemPool
von rSet in den SfxItemPool von *this "ubernommen werden.
- SfxPoolItems, f"ur die in rSet IsInvalidItem() == TRUE gilt,
+ SfxPoolItems, f"ur die in rSet IsInvalidItem() == sal_True gilt,
werden als Invalid-Item "ubernommen.
[R"uckgabewert]
- int TRUE
+ int sal_True
es wurden SfxPoolItems "ubernommen
- FALSE
+ sal_False
es wurden keine SfxPoolItems "ubernommen,
da z.B. die Which-Bereiche der SfxItemSets
keine Schnittmenge haben oder in der
@@ -915,23 +915,23 @@ int SfxItemSet::Set
{
DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet);
- int bRet = FALSE;
+ int bRet = sal_False;
if ( _nCount )
ClearItem();
if ( bDeep )
{
SfxWhichIter aIter(*this);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rSet.GetItemState( nWhich, TRUE, &pItem ) )
+ if( SFX_ITEM_SET == rSet.GetItemState( nWhich, sal_True, &pItem ) )
bRet |= 0 != Put( *pItem, pItem->Which() );
nWhich = aIter.NextWhich();
}
}
else
- bRet = Put(rSet, FALSE);
+ bRet = Put(rSet, sal_False);
return bRet;
}
@@ -940,8 +940,8 @@ int SfxItemSet::Set
const SfxPoolItem* SfxItemSet::GetItem
(
- USHORT nId, // Slot-Id oder Which-Id des Items
- BOOL bSrchInParent, // TRUE: auch in Parent-ItemSets suchen
+ sal_uInt16 nId, // Slot-Id oder Which-Id des Items
+ sal_Bool bSrchInParent, // sal_True: auch in Parent-ItemSets suchen
TypeId aItemType // != 0 => RTTI Pruefung mit Assertion
) const
@@ -958,9 +958,9 @@ const SfxPoolItem* SfxItemSet::GetItem
{
// ggf. in Which-Id umrechnen
- USHORT nWhich = GetPool()->GetWhich(nId);
+ sal_uInt16 nWhich = GetPool()->GetWhich(nId);
- // ist das Item gesetzt oder bei bDeep==TRUE verf"ugbar?
+ // ist das Item gesetzt oder bei bDeep==sal_True verf"ugbar?
const SfxPoolItem *pItem = 0;
SfxItemState eState = GetItemState( nWhich, bSrchInParent, &pItem );
if ( bSrchInParent && SFX_ITEM_AVAILABLE == eState &&
@@ -984,7 +984,7 @@ const SfxPoolItem* SfxItemSet::GetItem
//------------------------------------------------------------------------
-const SfxPoolItem& SfxItemSet::Get( USHORT nWhich, BOOL bSrchInParent) const
+const SfxPoolItem& SfxItemSet::Get( sal_uInt16 nWhich, sal_Bool bSrchInParent) const
{
DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet);
// suche den Bereich in dem das Which steht:
@@ -994,7 +994,7 @@ const SfxPoolItem& SfxItemSet::Get( USHORT nWhich, BOOL bSrchInParent) const
if( pAktSet->Count() )
{
SfxItemArray ppFnd = pAktSet->_aItems;
- const USHORT* pPtr = pAktSet->_pWhichRanges;
+ const sal_uInt16* pPtr = pAktSet->_pWhichRanges;
while( *pPtr )
{
if( *pPtr <= nWhich && nWhich <= *(pPtr+1) )
@@ -1050,11 +1050,11 @@ void SfxItemSet::Changed( const SfxPoolItem&, const SfxPoolItem& )
// -----------------------------------------------------------------------
-USHORT SfxItemSet::TotalCount() const
+sal_uInt16 SfxItemSet::TotalCount() const
{
DBG_CHKTHIS(SfxItemSet, 0); // wird im Ctor benutzt bevor vollst. init.
- USHORT nRet = 0;
- USHORT* pPtr = _pWhichRanges;
+ sal_uInt16 nRet = 0;
+ sal_uInt16* pPtr = _pWhichRanges;
while( *pPtr )
{
nRet += ( *(pPtr+1) - *pPtr ) + 1;
@@ -1081,16 +1081,16 @@ void SfxItemSet::Intersect( const SfxItemSet& rSet )
}
// teste mal, ob sich die Which-Bereiche unterscheiden.
- BOOL bEqual = TRUE;
- USHORT* pWh1 = _pWhichRanges;
- USHORT* pWh2 = rSet._pWhichRanges;
- USHORT nSize = 0;
+ sal_Bool bEqual = sal_True;
+ sal_uInt16* pWh1 = _pWhichRanges;
+ sal_uInt16* pWh2 = rSet._pWhichRanges;
+ sal_uInt16 nSize = 0;
- for( USHORT n = 0; *pWh1 && *pWh2; ++pWh1, ++pWh2, ++n )
+ for( sal_uInt16 n = 0; *pWh1 && *pWh2; ++pWh1, ++pWh2, ++n )
{
if( *pWh1 != *pWh2 )
{
- bEqual = FALSE;
+ bEqual = sal_False;
break;
}
if( n & 1 )
@@ -1110,11 +1110,11 @@ void SfxItemSet::Intersect( const SfxItemSet& rSet )
// aus dem Pool loeschen
if( !IsInvalidItem( *ppFnd1 ) )
{
- USHORT nWhich = (*ppFnd1)->Which();
+ sal_uInt16 nWhich = (*ppFnd1)->Which();
if(nWhich <= SFX_WHICH_MAX)
{
const SfxPoolItem& rNew = _pParent
- ? _pParent->Get( nWhich, TRUE )
+ ? _pParent->Get( nWhich, sal_True )
: _pPool->GetDefaultItem( nWhich );
Changed( **ppFnd1, rNew );
@@ -1129,12 +1129,12 @@ void SfxItemSet::Intersect( const SfxItemSet& rSet )
{
SfxItemIter aIter( *this );
const SfxPoolItem* pItem = aIter.GetCurItem();
- while( TRUE )
+ while( sal_True )
{
- USHORT nWhich = IsInvalidItem( pItem )
+ sal_uInt16 nWhich = IsInvalidItem( pItem )
? GetWhichByPos( aIter.GetCurPos() )
: pItem->Which();
- if( 0 == rSet.GetItemState( nWhich, FALSE ) )
+ if( 0 == rSet.GetItemState( nWhich, sal_False ) )
ClearItem( nWhich ); // loeschen
if( aIter.IsAtEnd() )
break;
@@ -1152,16 +1152,16 @@ void SfxItemSet::Differentiate( const SfxItemSet& rSet )
return;
// teste mal, ob sich die Which-Bereiche unterscheiden.
- BOOL bEqual = TRUE;
- USHORT* pWh1 = _pWhichRanges;
- USHORT* pWh2 = rSet._pWhichRanges;
- USHORT nSize = 0;
+ sal_Bool bEqual = sal_True;
+ sal_uInt16* pWh1 = _pWhichRanges;
+ sal_uInt16* pWh2 = rSet._pWhichRanges;
+ sal_uInt16 nSize = 0;
- for( USHORT n = 0; *pWh1 && *pWh2; ++pWh1, ++pWh2, ++n )
+ for( sal_uInt16 n = 0; *pWh1 && *pWh2; ++pWh1, ++pWh2, ++n )
{
if( *pWh1 != *pWh2 )
{
- bEqual = FALSE;
+ bEqual = sal_False;
break;
}
if( n & 1 )
@@ -1181,11 +1181,11 @@ void SfxItemSet::Differentiate( const SfxItemSet& rSet )
// aus dem Pool loeschen
if( !IsInvalidItem( *ppFnd1 ) )
{
- USHORT nWhich = (*ppFnd1)->Which();
+ sal_uInt16 nWhich = (*ppFnd1)->Which();
if(nWhich <= SFX_WHICH_MAX)
{
const SfxPoolItem& rNew = _pParent
- ? _pParent->Get( nWhich, TRUE )
+ ? _pParent->Get( nWhich, sal_True )
: _pPool->GetDefaultItem( nWhich );
Changed( **ppFnd1, rNew );
@@ -1200,12 +1200,12 @@ void SfxItemSet::Differentiate( const SfxItemSet& rSet )
{
SfxItemIter aIter( *this );
const SfxPoolItem* pItem = aIter.GetCurItem();
- while( TRUE )
+ while( sal_True )
{
- USHORT nWhich = IsInvalidItem( pItem )
+ sal_uInt16 nWhich = IsInvalidItem( pItem )
? GetWhichByPos( aIter.GetCurPos() )
: pItem->Which();
- if( SFX_ITEM_SET == rSet.GetItemState( nWhich, FALSE ) )
+ if( SFX_ITEM_SET == rSet.GetItemState( nWhich, sal_False ) )
ClearItem( nWhich ); // loeschen
if( aIter.IsAtEnd() )
break;
@@ -1225,79 +1225,79 @@ Grundsaetze:
1.-Item 2.-Item Values bIgnoreDefs Remove Assign Add
-set set == FALSE - - -
-default set == FALSE - - -
-dontcare set == FALSE - - -
-unknown set == FALSE - - -
-set default == FALSE - - -
-default default == FALSE - - -
-dontcare default == FALSE - - -
-unknown default == FALSE - - -
-set dontcare == FALSE 1.-Item -1 -
-default dontcare == FALSE - -1 -
-dontcare dontcare == FALSE - - -
-unknown dontcare == FALSE - - -
-set unknown == FALSE 1.-Item -1 -
-default unknown == FALSE - - -
-dontcare unknown == FALSE - - -
-unknown unknown == FALSE - - -
-
-set set != FALSE 1.-Item -1 -
-default set != FALSE - -1 -
-dontcare set != FALSE - - -
-unknown set != FALSE - - -
-set default != FALSE 1.-Item -1 -
-default default != FALSE - - -
-dontcare default != FALSE - - -
-unknown default != FALSE - - -
-set dontcare != FALSE 1.-Item -1 -
-default dontcare != FALSE - -1 -
-dontcare dontcare != FALSE - - -
-unknown dontcare != FALSE - - -
-set unknown != FALSE 1.-Item -1 -
-default unknown != FALSE - - -
-dontcare unknown != FALSE - - -
-unknown unknown != FALSE - - -
-
-set set == TRUE - - -
-default set == TRUE - 2.-Item 2.-Item
-dontcare set == TRUE - - -
-unknown set == TRUE - - -
-set default == TRUE - - -
-default default == TRUE - - -
-dontcare default == TRUE - - -
-unknown default == TRUE - - -
-set dontcare == TRUE - - -
-default dontcare == TRUE - -1 -
-dontcare dontcare == TRUE - - -
-unknown dontcare == TRUE - - -
-set unknown == TRUE - - -
-default unknown == TRUE - - -
-dontcare unknown == TRUE - - -
-unknown unknown == TRUE - - -
-
-set set != TRUE 1.-Item -1 -
-default set != TRUE - 2.-Item 2.-Item
-dontcare set != TRUE - - -
-unknown set != TRUE - - -
-set default != TRUE - - -
-default default != TRUE - - -
-dontcare default != TRUE - - -
-unknown default != TRUE - - -
-set dontcare != TRUE 1.-Item -1 -
-default dontcare != TRUE - -1 -
-dontcare dontcare != TRUE - - -
-unknown dontcare != TRUE - - -
-set unknown != TRUE - - -
-default unknown != TRUE - - -
-dontcare unknown != TRUE - - -
-unknown unknown != TRUE - - -
+set set == sal_False - - -
+default set == sal_False - - -
+dontcare set == sal_False - - -
+unknown set == sal_False - - -
+set default == sal_False - - -
+default default == sal_False - - -
+dontcare default == sal_False - - -
+unknown default == sal_False - - -
+set dontcare == sal_False 1.-Item -1 -
+default dontcare == sal_False - -1 -
+dontcare dontcare == sal_False - - -
+unknown dontcare == sal_False - - -
+set unknown == sal_False 1.-Item -1 -
+default unknown == sal_False - - -
+dontcare unknown == sal_False - - -
+unknown unknown == sal_False - - -
+
+set set != sal_False 1.-Item -1 -
+default set != sal_False - -1 -
+dontcare set != sal_False - - -
+unknown set != sal_False - - -
+set default != sal_False 1.-Item -1 -
+default default != sal_False - - -
+dontcare default != sal_False - - -
+unknown default != sal_False - - -
+set dontcare != sal_False 1.-Item -1 -
+default dontcare != sal_False - -1 -
+dontcare dontcare != sal_False - - -
+unknown dontcare != sal_False - - -
+set unknown != sal_False 1.-Item -1 -
+default unknown != sal_False - - -
+dontcare unknown != sal_False - - -
+unknown unknown != sal_False - - -
+
+set set == sal_True - - -
+default set == sal_True - 2.-Item 2.-Item
+dontcare set == sal_True - - -
+unknown set == sal_True - - -
+set default == sal_True - - -
+default default == sal_True - - -
+dontcare default == sal_True - - -
+unknown default == sal_True - - -
+set dontcare == sal_True - - -
+default dontcare == sal_True - -1 -
+dontcare dontcare == sal_True - - -
+unknown dontcare == sal_True - - -
+set unknown == sal_True - - -
+default unknown == sal_True - - -
+dontcare unknown == sal_True - - -
+unknown unknown == sal_True - - -
+
+set set != sal_True 1.-Item -1 -
+default set != sal_True - 2.-Item 2.-Item
+dontcare set != sal_True - - -
+unknown set != sal_True - - -
+set default != sal_True - - -
+default default != sal_True - - -
+dontcare default != sal_True - - -
+unknown default != sal_True - - -
+set dontcare != sal_True 1.-Item -1 -
+default dontcare != sal_True - -1 -
+dontcare dontcare != sal_True - - -
+unknown dontcare != sal_True - - -
+set unknown != sal_True - - -
+default unknown != sal_True - - -
+dontcare unknown != sal_True - - -
+unknown unknown != sal_True - - -
*/
-static void MergeItem_Impl( SfxItemPool *_pPool, USHORT &rCount,
+static void MergeItem_Impl( SfxItemPool *_pPool, sal_uInt16 &rCount,
const SfxPoolItem **ppFnd1, const SfxPoolItem *pFnd2,
- BOOL bIgnoreDefaults )
+ sal_Bool bIgnoreDefaults )
{
DBG_ASSERT( ppFnd1 != 0, "Merging to 0-Item" );
@@ -1310,11 +1310,11 @@ static void MergeItem_Impl( SfxItemPool *_pPool, USHORT &rCount,
else if ( pFnd2 && !bIgnoreDefaults &&
_pPool->GetDefaultItem(pFnd2->Which()) != *pFnd2 )
- // Entscheidungstabelle: default, set, !=, FALSE
+ // Entscheidungstabelle: default, set, !=, sal_False
*ppFnd1 = (SfxPoolItem*) -1;
else if ( pFnd2 && bIgnoreDefaults )
- // Entscheidungstabelle: default, set, egal, TRUE
+ // Entscheidungstabelle: default, set, egal, sal_True
*ppFnd1 = &_pPool->Put( *pFnd2 );
if ( *ppFnd1 )
@@ -1330,7 +1330,7 @@ static void MergeItem_Impl( SfxItemPool *_pPool, USHORT &rCount,
if ( !bIgnoreDefaults &&
**ppFnd1 != _pPool->GetDefaultItem((*ppFnd1)->Which()) )
{
- // Entscheidungstabelle: set, default, !=, FALSE
+ // Entscheidungstabelle: set, default, !=, sal_False
_pPool->Remove( **ppFnd1 );
*ppFnd1 = (SfxPoolItem*) -1;
}
@@ -1341,8 +1341,8 @@ static void MergeItem_Impl( SfxItemPool *_pPool, USHORT &rCount,
if ( !bIgnoreDefaults ||
**ppFnd1 != _pPool->GetDefaultItem( (*ppFnd1)->Which()) )
{
- // Entscheidungstabelle: set, dontcare, egal, FALSE
- // oder: set, dontcare, !=, TRUE
+ // Entscheidungstabelle: set, dontcare, egal, sal_False
+ // oder: set, dontcare, !=, sal_True
_pPool->Remove( **ppFnd1 );
*ppFnd1 = (SfxPoolItem*) -1;
}
@@ -1362,23 +1362,23 @@ static void MergeItem_Impl( SfxItemPool *_pPool, USHORT &rCount,
// -----------------------------------------------------------------------
-void SfxItemSet::MergeValues( const SfxItemSet& rSet, BOOL bIgnoreDefaults )
+void SfxItemSet::MergeValues( const SfxItemSet& rSet, sal_Bool bIgnoreDefaults )
{
// Achtung!!! Bei Aenderungen/Bugfixes immer obenstehende Tabelle pflegen!
DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet);
DBG_ASSERT( GetPool() == rSet.GetPool(), "MergeValues mit verschiedenen Pools" );
// teste mal, ob sich die Which-Bereiche unterscheiden.
- BOOL bEqual = TRUE;
- USHORT* pWh1 = _pWhichRanges;
- USHORT* pWh2 = rSet._pWhichRanges;
- USHORT nSize = 0;
+ sal_Bool bEqual = sal_True;
+ sal_uInt16* pWh1 = _pWhichRanges;
+ sal_uInt16* pWh2 = rSet._pWhichRanges;
+ sal_uInt16 nSize = 0;
- for( USHORT n = 0; *pWh1 && *pWh2; ++pWh1, ++pWh2, ++n )
+ for( sal_uInt16 n = 0; *pWh1 && *pWh2; ++pWh1, ++pWh2, ++n )
{
if( *pWh1 != *pWh2 )
{
- bEqual = FALSE;
+ bEqual = sal_False;
break;
}
if( n & 1 )
@@ -1398,11 +1398,11 @@ void SfxItemSet::MergeValues( const SfxItemSet& rSet, BOOL bIgnoreDefaults )
else
{
SfxWhichIter aIter( rSet );
- register USHORT nWhich;
+ register sal_uInt16 nWhich;
while( 0 != ( nWhich = aIter.NextWhich() ) )
{
const SfxPoolItem* pItem = 0;
- rSet.GetItemState( nWhich, TRUE, &pItem );
+ rSet.GetItemState( nWhich, sal_True, &pItem );
if( !pItem )
{
// nicht gesetzt, also default
@@ -1420,12 +1420,12 @@ void SfxItemSet::MergeValues( const SfxItemSet& rSet, BOOL bIgnoreDefaults )
// -----------------------------------------------------------------------
-void SfxItemSet::MergeValue( const SfxPoolItem& rAttr, BOOL bIgnoreDefaults )
+void SfxItemSet::MergeValue( const SfxPoolItem& rAttr, sal_Bool bIgnoreDefaults )
{
DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet);
SfxItemArray ppFnd = _aItems;
- const USHORT* pPtr = _pWhichRanges;
- const USHORT nWhich = rAttr.Which();
+ const sal_uInt16* pPtr = _pWhichRanges;
+ const sal_uInt16 nWhich = rAttr.Which();
while( *pPtr )
{
// in diesem Bereich?
@@ -1442,11 +1442,11 @@ void SfxItemSet::MergeValue( const SfxPoolItem& rAttr, BOOL bIgnoreDefaults )
// -----------------------------------------------------------------------
-void SfxItemSet::InvalidateItem( USHORT nWhich )
+void SfxItemSet::InvalidateItem( sal_uInt16 nWhich )
{
DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet);
SfxItemArray ppFnd = _aItems;
- const USHORT* pPtr = _pWhichRanges;
+ const sal_uInt16* pPtr = _pWhichRanges;
while( *pPtr )
{
if( *pPtr <= nWhich && nWhich <= *(pPtr+1) )
@@ -1476,11 +1476,11 @@ void SfxItemSet::InvalidateItem( USHORT nWhich )
// -----------------------------------------------------------------------
-USHORT SfxItemSet::GetWhichByPos( USHORT nPos ) const
+sal_uInt16 SfxItemSet::GetWhichByPos( sal_uInt16 nPos ) const
{
DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet);
- USHORT n = 0;
- USHORT* pPtr = _pWhichRanges;
+ sal_uInt16 n = 0;
+ sal_uInt16* pPtr = _pWhichRanges;
while( *pPtr )
{
n = ( *(pPtr+1) - *pPtr ) + 1;
@@ -1489,7 +1489,7 @@ USHORT SfxItemSet::GetWhichByPos( USHORT nPos ) const
nPos = nPos - n;
pPtr += 2;
}
- DBG_ASSERT( FALSE, "Hier sind wir falsch" );
+ DBG_ASSERT( sal_False, "Hier sind wir falsch" );
return 0;
}
@@ -1498,22 +1498,22 @@ USHORT SfxItemSet::GetWhichByPos( USHORT nPos ) const
SvStream &SfxItemSet::Store
(
SvStream& rStream, // Zielstream f"ur normale Items
- FASTBOOL bDirect // TRUE: Items direkt speicher, FALSE: Surrogate
+ FASTBOOL bDirect // sal_True: Items direkt speicher, sal_False: Surrogate
) const
/* [Beschreibung]
Speichert die <SfxItemSet>-Instanz in den angegebenen Stream. Dabei
- werden die Surrorage der gesetzten <SfxPoolItem>s bzw. ('bDirect==TRUE')
+ werden die Surrorage der gesetzten <SfxPoolItem>s bzw. ('bDirect==sal_True')
die gesetzten Items selbst wie folgt im Stream abgelegt:
- USHORT (Count) Anzahl der gesetzten Items
+ sal_uInt16 (Count) Anzahl der gesetzten Items
Count* _pPool->StoreItem() siehe <SfxItemPool::StoreItem()const>
[Querverweise]
- <SfxItemSet::Load(SvStream&,BOOL,const SfxItemPool*)>
+ <SfxItemSet::Load(SvStream&,sal_Bool,const SfxItemPool*)>
*/
{
@@ -1522,14 +1522,14 @@ SvStream &SfxItemSet::Store
DBG_ASSERTWARNING( _pPool == _pPool->GetMasterPool(), "kein Master-Pool" );
// Position des Counts merken, um ggf. zu korrigieren
- ULONG nCountPos = rStream.Tell();
+ sal_uLong nCountPos = rStream.Tell();
rStream << _nCount;
// wenn nichts zu speichern ist, auch keinen ItemIter aufsetzen!
if ( _nCount )
{
// mitz"ahlen wieviel Items tats"achlich gespeichert werden
- USHORT nWrittenCount = 0; // Anzahl in 'rStream' gestreamter Items
+ sal_uInt16 nWrittenCount = 0; // Anzahl in 'rStream' gestreamter Items
// "uber alle gesetzten Items iterieren
SfxItemIter aIter(*this);
@@ -1549,7 +1549,7 @@ SvStream &SfxItemSet::Store
if ( nWrittenCount != _nCount )
{
// tats"achlichen Count im Stream ablegen
- ULONG nPos = rStream.Tell();
+ sal_uLong nPos = rStream.Tell();
rStream.Seek( nCountPos );
rStream << nWrittenCount;
rStream.Seek( nPos );
@@ -1565,11 +1565,11 @@ SvStream &SfxItemSet::Load
(
SvStream& rStream, // Stream, aus dem geladen werden soll
- FASTBOOL bDirect, /* TRUE
+ FASTBOOL bDirect, /* sal_True
Items werden direkt aus dem Stream
gelesen, nicht "uber Surrogate
- FALSE (default)
+ sal_False (default)
Items werden "uber Surrogate gelesen */
const SfxItemPool* pRefPool /* Pool, der die Surrogate aufl"osen kann
@@ -1585,7 +1585,7 @@ SvStream &SfxItemSet::Load
[Querverweise]
- <SfxItemSet::Store(Stream&,BOOL)const>
+ <SfxItemSet::Store(Stream&,sal_Bool)const>
*/
{
@@ -1598,9 +1598,9 @@ SvStream &SfxItemSet::Load
pRefPool = _pPool;
// Anzahl der zu ladenden Items laden und dann ebensoviele Items
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
rStream >> nCount;
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
// Surrogat/Item laden und (Surrogat) aufl"osen lassen
const SfxPoolItem *pItem =
@@ -1610,9 +1610,9 @@ SvStream &SfxItemSet::Load
if ( pItem )
{
// Position f"ur Item-Pointer im Set suchen
- USHORT nWhich = pItem->Which();
+ sal_uInt16 nWhich = pItem->Which();
SfxItemArray ppFnd = _aItems;
- const USHORT* pPtr = _pWhichRanges;
+ const sal_uInt16* pPtr = _pWhichRanges;
while ( *pPtr )
{
// in diesem Bereich?
@@ -1647,48 +1647,48 @@ int SfxItemSet::operator==(const SfxItemSet &rCmp) const
if ( _pParent != rCmp._pParent ||
_pPool != rCmp._pPool ||
Count() != rCmp.Count() )
- return FALSE;
+ return sal_False;
// Ranges durchzaehlen lassen dauert laenger, muss aber auch gleich sein
- USHORT nCount1 = TotalCount();
- USHORT nCount2 = rCmp.TotalCount();
+ sal_uInt16 nCount1 = TotalCount();
+ sal_uInt16 nCount2 = rCmp.TotalCount();
if ( nCount1 != nCount2 )
- return FALSE;
+ return sal_False;
// sind die Ranges selbst ungleich?
- for ( USHORT nRange = 0; _pWhichRanges[nRange]; nRange += 2 )
+ for ( sal_uInt16 nRange = 0; _pWhichRanges[nRange]; nRange += 2 )
if ( _pWhichRanges[nRange] != rCmp._pWhichRanges[nRange] ||
_pWhichRanges[nRange+1] != rCmp._pWhichRanges[nRange+1] )
{
// dann m"ussen wir die langsame Methode verwenden
SfxWhichIter aIter( *this );
- for ( USHORT nWh = aIter.FirstWhich();
+ for ( sal_uInt16 nWh = aIter.FirstWhich();
nWh;
nWh = aIter.NextWhich() )
{
// wenn die Pointer von poolable Items ungleich sind,
// muessen die Items gleich sein
const SfxPoolItem *pItem1 = 0, *pItem2 = 0;
- if ( GetItemState( nWh, FALSE, &pItem1 ) !=
- rCmp.GetItemState( nWh, FALSE, &pItem2 ) ||
+ if ( GetItemState( nWh, sal_False, &pItem1 ) !=
+ rCmp.GetItemState( nWh, sal_False, &pItem2 ) ||
( pItem1 != pItem2 &&
( !pItem1 || IsInvalidItem(pItem1) ||
( _pPool->IsItemFlag(*pItem1, SFX_ITEM_POOLABLE) &&
*pItem1 != *pItem2 ) ) ) )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// Pointer alle gleich?
if ( 0 == memcmp( _aItems, rCmp._aItems, nCount1 * sizeof(_aItems[0]) ) )
- return TRUE;
+ return sal_True;
// dann werden wir wohl alle einzeln vergleichen muessen
const SfxPoolItem **ppItem1 = (const SfxPoolItem**) _aItems;
const SfxPoolItem **ppItem2 = (const SfxPoolItem**) rCmp._aItems;
- for ( USHORT nPos = 0; nPos < nCount1; ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < nCount1; ++nPos )
{
// wenn die Pointer von poolable Items ungleich sind,
// muessen die Items gleich sein
@@ -1697,18 +1697,18 @@ int SfxItemSet::operator==(const SfxItemSet &rCmp) const
( IsInvalidItem(*ppItem1) || IsInvalidItem(*ppItem2) ) ||
( _pPool->IsItemFlag(**ppItem1, SFX_ITEM_POOLABLE) ) ||
**ppItem1 != **ppItem2 ) )
- return FALSE;
+ return sal_False;
++ppItem1;
++ppItem2;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-SfxItemSet *SfxItemSet::Clone(BOOL bItems, SfxItemPool *pToPool ) const
+SfxItemSet *SfxItemSet::Clone(sal_Bool bItems, SfxItemPool *pToPool ) const
{
DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet);
if ( pToPool && pToPool != _pPool )
@@ -1717,11 +1717,11 @@ SfxItemSet *SfxItemSet::Clone(BOOL bItems, SfxItemPool *pToPool ) const
if ( bItems )
{
SfxWhichIter aIter(*pNewSet);
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
const SfxPoolItem* pItem;
- if ( SFX_ITEM_SET == GetItemState( nWhich, FALSE, &pItem ) )
+ if ( SFX_ITEM_SET == GetItemState( nWhich, sal_False, &pItem ) )
pNewSet->Put( *pItem, pItem->Which() );
nWhich = aIter.NextWhich();
}
@@ -1740,8 +1740,8 @@ int SfxItemSet::PutDirect(const SfxPoolItem &rItem)
{
DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet);
SfxItemArray ppFnd = _aItems;
- const USHORT* pPtr = _pWhichRanges;
- const USHORT nWhich = rItem.Which();
+ const sal_uInt16* pPtr = _pWhichRanges;
+ const sal_uInt16 nWhich = rItem.Which();
#ifdef DBG_UTIL
IsPoolDefaultItem(&rItem) || _pPool->GetSurrogate(&rItem);
// nur Assertion in den callees provozieren
@@ -1756,7 +1756,7 @@ int SfxItemSet::PutDirect(const SfxPoolItem &rItem)
if( pOld ) // schon einer vorhanden
{
if( rItem == **ppFnd )
- return FALSE; // schon vorhanden !
+ return sal_False; // schon vorhanden !
_pPool->Remove( *pOld );
}
else
@@ -1772,18 +1772,18 @@ int SfxItemSet::PutDirect(const SfxPoolItem &rItem)
rItem.AddRef();
}
- return TRUE;
+ return sal_True;
}
ppFnd += *(pPtr+1) - *pPtr + 1;
pPtr += 2;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
SfxAllItemSet::SfxAllItemSet( SfxItemPool &rPool )
-: SfxItemSet(rPool, (const USHORT*) 0),
+: SfxItemSet(rPool, (const sal_uInt16*) 0),
aDefault(0),
nFree(nInitCount)
{
@@ -1791,8 +1791,8 @@ SfxAllItemSet::SfxAllItemSet( SfxItemPool &rPool )
_aItems = 0;
// nInitCount Paare an USHORTs fuer Ranges allozieren
- _pWhichRanges = new USHORT[ nInitCount + 1 ];
- memset( _pWhichRanges, 0, ( nInitCount + 1 ) * sizeof(USHORT) );
+ _pWhichRanges = new sal_uInt16[ nInitCount + 1 ];
+ memset( _pWhichRanges, 0, ( nInitCount + 1 ) * sizeof(sal_uInt16) );
}
@@ -1824,12 +1824,12 @@ SfxAllItemSet::SfxAllItemSet(const SfxAllItemSet &rCopy)
// -----------------------------------------------------------------------
-static USHORT *AddRanges_Impl(
- USHORT *pUS, std::ptrdiff_t nOldSize, USHORT nIncr)
+static sal_uInt16 *AddRanges_Impl(
+ sal_uInt16 *pUS, std::ptrdiff_t nOldSize, sal_uInt16 nIncr)
/* Diese interne Funktion erzeugt ein neues Which-Range-Array, welches von
dem 'nOldSize'-USHORTs langen 'pUS' kopiert wird und hinten an Platz
- f"ur 'nIncr' neue USHORTs hat. Das terminierende USHORT mit der '0'
+ f"ur 'nIncr' neue USHORTs hat. Das terminierende sal_uInt16 mit der '0'
wird weder in 'nOldSize' noch in 'nIncr' mitgez"ahlt, sondern implizit
hinzugerechnet.
@@ -1839,13 +1839,13 @@ static USHORT *AddRanges_Impl(
{
// neues Which-Range-Array anlegen
- USHORT *pNew = new USHORT[ nOldSize + nIncr + 1 ];
+ sal_uInt16 *pNew = new sal_uInt16[ nOldSize + nIncr + 1 ];
// die alten Ranges "ubernehmen
- memcpy( pNew, pUS, nOldSize * sizeof(USHORT) );
+ memcpy( pNew, pUS, nOldSize * sizeof(sal_uInt16) );
// die neuen auf 0 initialisieren
- memset( pNew + nOldSize, 0, ( nIncr + 1 ) * sizeof(USHORT) );
+ memset( pNew + nOldSize, 0, ( nIncr + 1 ) * sizeof(sal_uInt16) );
// das alte Array freigeben
delete[] pUS;
@@ -1855,7 +1855,7 @@ static USHORT *AddRanges_Impl(
// -----------------------------------------------------------------------
-static SfxItemArray AddItem_Impl(SfxItemArray pItems, USHORT nOldSize, USHORT nPos)
+static SfxItemArray AddItem_Impl(SfxItemArray pItems, sal_uInt16 nOldSize, sal_uInt16 nPos)
/* Diese interne Funktion erzeugt ein neues ItemArray, welches von 'pItems'
kopiert wird, an der Position 'nPos' jedoch Platz f"ur einen neuen
@@ -1893,17 +1893,17 @@ static SfxItemArray AddItem_Impl(SfxItemArray pItems, USHORT nOldSize, USHORT nP
// -----------------------------------------------------------------------
-const SfxPoolItem* SfxAllItemSet::Put( const SfxPoolItem& rItem, USHORT nWhich )
+const SfxPoolItem* SfxAllItemSet::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich )
// Putten mit automatischer Erweiterung der Whichs-Ids um die ID
// des Items.
{
- USHORT nPos = 0; // Position f"ur 'rItem' in '_aItems'
- const USHORT nItemCount = TotalCount();
+ sal_uInt16 nPos = 0; // Position f"ur 'rItem' in '_aItems'
+ const sal_uInt16 nItemCount = TotalCount();
// erstmal sehen, ob es schon einen passenden Bereich gibt
- USHORT *pPtr = _pWhichRanges;
+ sal_uInt16 *pPtr = _pWhichRanges;
while ( *pPtr )
{
// Which-Id liegt in diesem Bereich?
@@ -1986,15 +1986,15 @@ const SfxPoolItem* SfxAllItemSet::Put( const SfxPoolItem& rItem, USHORT nWhich )
const SfxPoolItem& rNew = _pPool->Put( rItem, nWhich );
// altes Item merken
- BOOL bIncrementCount = FALSE;
+ sal_Bool bIncrementCount = sal_False;
const SfxPoolItem* pOld = *( _aItems + nPos );
if ( reinterpret_cast< SfxPoolItem* >( -1 ) == pOld ) // state "dontcare"
pOld = NULL;
if ( !pOld )
{
- bIncrementCount = TRUE;
+ bIncrementCount = sal_True;
pOld = _pParent ?
- &_pParent->Get( nWhich, TRUE )
+ &_pParent->Get( nWhich, sal_True )
: nWhich <= SFX_WHICH_MAX ? &_pPool->GetDefaultItem( nWhich ) : 0;
}
@@ -2022,7 +2022,7 @@ const SfxPoolItem* SfxAllItemSet::Put( const SfxPoolItem& rItem, USHORT nWhich )
Put-Methoden dieser SubClass gehided wird.
*/
-int SfxAllItemSet::Put( const SfxItemSet& rSet, BOOL bInvalidAsDefault )
+int SfxAllItemSet::Put( const SfxItemSet& rSet, sal_Bool bInvalidAsDefault )
{
//? pruefen, ob Which-Ranges erweitert werden
return SfxItemSet::Put( rSet, bInvalidAsDefault );
@@ -2031,7 +2031,7 @@ int SfxAllItemSet::Put( const SfxItemSet& rSet, BOOL bInvalidAsDefault )
// -----------------------------------------------------------------------
// Item disablen, wenn durch ein VoidItem mit dem Which-Wert 0 ausgedrueckt
-void SfxItemSet::DisableItem(USHORT nWhich)
+void SfxItemSet::DisableItem(sal_uInt16 nWhich)
{
DBG_CHKTHIS(SfxItemSet, 0);
Put( SfxVoidItem(0), nWhich );
@@ -2040,18 +2040,18 @@ void SfxItemSet::DisableItem(USHORT nWhich)
// -----------------------------------------------------------------------
#if 0
-BOOL SfxAllItemSet::Remove(USHORT nWhich)
+sal_Bool SfxAllItemSet::Remove(sal_uInt16 nWhich)
{
DBG_CHKTHIS(SfxAllItemSet, 0);
- USHORT *pPtr = _pWhichRanges;
- USHORT nPos = 0;
+ sal_uInt16 *pPtr = _pWhichRanges;
+ sal_uInt16 nPos = 0;
while( *pPtr )
{
if( *pPtr <= nWhich && nWhich <= *(pPtr+1) )
{
- USHORT *pTmp = pPtr;
- USHORT nLeft = 0;
- USHORT nRest = 0;
+ sal_uInt16 *pTmp = pPtr;
+ sal_uInt16 nLeft = 0;
+ sal_uInt16 nRest = 0;
while(*++pTmp){
if( nLeft & 1 )
nRest = *pTmp - *(pTmp-1) + 1;
@@ -2063,7 +2063,7 @@ BOOL SfxAllItemSet::Remove(USHORT nWhich)
nRest -= nWhich - *pPtr;
// 3,3
if(*pPtr == nWhich && *(pPtr+1) == nWhich) {
- memmove(pPtr, pPtr + 2, nLeft * sizeof(USHORT));
+ memmove(pPtr, pPtr + 2, nLeft * sizeof(sal_uInt16));
nFree += 2;
}
// Anfang
@@ -2074,12 +2074,12 @@ BOOL SfxAllItemSet::Remove(USHORT nWhich)
(*(pPtr+1))--;
else {
if(nPos + nRest + 2 > nFree) {
- USHORT nOf = pPtr - _pWhichRanges;
+ sal_uInt16 nOf = pPtr - _pWhichRanges;
_pWhichRanges = IncrSize(_pWhichRanges, nPos + nRest, nInitCount);
nFree += nInitCount;
pPtr = _pWhichRanges + nOf;
}
- memmove(pPtr +2, pPtr, (nLeft+2) * sizeof(USHORT));
+ memmove(pPtr +2, pPtr, (nLeft+2) * sizeof(sal_uInt16));
*++pPtr = nWhich-1;
*++pPtr = nWhich+1;
nFree -= 2;
@@ -2100,13 +2100,13 @@ BOOL SfxAllItemSet::Remove(USHORT nWhich)
nPos += *(pPtr+1) - *pPtr + 1;
pPtr += 2;
}
- return *pPtr? TRUE: FALSE;
+ return *pPtr? sal_True: sal_False;
}
#endif
// -----------------------------------------------------------------------
-SfxItemSet *SfxAllItemSet::Clone(BOOL bItems, SfxItemPool *pToPool ) const
+SfxItemSet *SfxAllItemSet::Clone(sal_Bool bItems, SfxItemPool *pToPool ) const
{
DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet);
if ( pToPool && pToPool != _pPool )
diff --git a/svl/source/items/lckbitem.cxx b/svl/source/items/lckbitem.cxx
index f1845fc251ee..433bfeec1e8e 100644
--- a/svl/source/items/lckbitem.cxx
+++ b/svl/source/items/lckbitem.cxx
@@ -50,7 +50,7 @@ SfxLockBytesItem::SfxLockBytesItem()
// -----------------------------------------------------------------------
-SfxLockBytesItem::SfxLockBytesItem( USHORT nW, SvLockBytes *pLockBytes )
+SfxLockBytesItem::SfxLockBytesItem( sal_uInt16 nW, SvLockBytes *pLockBytes )
: SfxPoolItem( nW ),
_xVal( pLockBytes )
{
@@ -58,11 +58,11 @@ SfxLockBytesItem::SfxLockBytesItem( USHORT nW, SvLockBytes *pLockBytes )
// -----------------------------------------------------------------------
-SfxLockBytesItem::SfxLockBytesItem( USHORT nW, SvStream &rStream )
+SfxLockBytesItem::SfxLockBytesItem( sal_uInt16 nW, SvStream &rStream )
: SfxPoolItem( nW )
{
rStream.Seek( 0L );
- _xVal = new SvLockBytes( new SvCacheStream(), TRUE );
+ _xVal = new SvLockBytes( new SvCacheStream(), sal_True );
SvStream aLockBytesStream( _xVal );
rStream >> aLockBytesStream;
@@ -100,16 +100,16 @@ SfxPoolItem* SfxLockBytesItem::Clone(SfxItemPool *) const
#define MAX_BUF 32000
-SfxPoolItem* SfxLockBytesItem::Create( SvStream &rStream, USHORT ) const
+SfxPoolItem* SfxLockBytesItem::Create( SvStream &rStream, sal_uInt16 ) const
{
sal_uInt32 nSize = 0;
- ULONG nActRead = 0;
+ sal_uLong nActRead = 0;
sal_Char cTmpBuf[MAX_BUF];
SvMemoryStream aNewStream;
rStream >> nSize;
do {
- ULONG nToRead;
+ sal_uLong nToRead;
if( (nSize - nActRead) > MAX_BUF )
nToRead = MAX_BUF;
else
@@ -123,7 +123,7 @@ SfxPoolItem* SfxLockBytesItem::Create( SvStream &rStream, USHORT ) const
// -----------------------------------------------------------------------
-SvStream& SfxLockBytesItem::Store(SvStream &rStream, USHORT ) const
+SvStream& SfxLockBytesItem::Store(SvStream &rStream, sal_uInt16 ) const
{
SvStream aLockBytesStream( _xVal );
sal_uInt32 nSize = aLockBytesStream.Seek( STREAM_SEEK_TO_END );
@@ -137,7 +137,7 @@ SvStream& SfxLockBytesItem::Store(SvStream &rStream, USHORT ) const
//----------------------------------------------------------------------------
// virtual
-BOOL SfxLockBytesItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE )
+sal_Bool SfxLockBytesItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 )
{
com::sun::star::uno::Sequence< sal_Int8 > aSeq;
if ( rVal >>= aSeq )
@@ -148,21 +148,21 @@ BOOL SfxLockBytesItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE )
pStream->Write( (void*)aSeq.getConstArray(), aSeq.getLength() );
pStream->Seek(0);
- _xVal = new SvLockBytes( pStream, TRUE );
+ _xVal = new SvLockBytes( pStream, sal_True );
}
else
_xVal = NULL;
- return TRUE;
+ return sal_True;
}
DBG_ERROR( "SfxLockBytesItem::PutValue - Wrong type!" );
- return FALSE;
+ return sal_False;
}
//----------------------------------------------------------------------------
// virtual
-BOOL SfxLockBytesItem::QueryValue( com::sun::star::uno::Any& rVal,BYTE ) const
+sal_Bool SfxLockBytesItem::QueryValue( com::sun::star::uno::Any& rVal,sal_uInt8 ) const
{
if ( _xVal.Is() )
{
@@ -172,9 +172,9 @@ BOOL SfxLockBytesItem::QueryValue( com::sun::star::uno::Any& rVal,BYTE ) const
if ( _xVal->Stat( &aStat, SVSTATFLAG_DEFAULT ) == ERRCODE_NONE )
nLen = aStat.nSize;
else
- return FALSE;
+ return sal_False;
- ULONG nRead = 0;
+ sal_uLong nRead = 0;
com::sun::star::uno::Sequence< sal_Int8 > aSeq( nLen );
_xVal->ReadAt( 0, aSeq.getArray(), nLen, &nRead );
@@ -186,6 +186,6 @@ BOOL SfxLockBytesItem::QueryValue( com::sun::star::uno::Any& rVal,BYTE ) const
rVal <<= aSeq;
}
- return TRUE;
+ return sal_True;
}
diff --git a/svl/source/items/macitem.cxx b/svl/source/items/macitem.cxx
index acaa66839981..1cd7e194d266 100644
--- a/svl/source/items/macitem.cxx
+++ b/svl/source/items/macitem.cxx
@@ -121,7 +121,7 @@ SvxMacroTableDtor& SvxMacroTableDtor::operator=( const SvxMacroTableDtor& rTbl )
}
-SvStream& SvxMacroTableDtor::Read( SvStream& rStrm, USHORT nVersion )
+SvStream& SvxMacroTableDtor::Read( SvStream& rStrm, sal_uInt16 nVersion )
{
if( SVX_MACROTBL_VERSION40 <= nVersion )
rStrm >> nVersion;
@@ -130,7 +130,7 @@ SvStream& SvxMacroTableDtor::Read( SvStream& rStrm, USHORT nVersion )
for( short i = 0; i < nMacro; ++i )
{
- USHORT nCurKey, eType = STARBASIC;
+ sal_uInt16 nCurKey, eType = STARBASIC;
String aLibName, aMacName;
rStrm >> nCurKey;
SfxPoolItem::readByteString(rStrm, aLibName);
@@ -156,14 +156,14 @@ SvStream& SvxMacroTableDtor::Read( SvStream& rStrm, USHORT nVersion )
SvStream& SvxMacroTableDtor::Write( SvStream& rStream ) const
{
- USHORT nVersion = SOFFICE_FILEFORMAT_31 == rStream.GetVersion()
+ sal_uInt16 nVersion = SOFFICE_FILEFORMAT_31 == rStream.GetVersion()
? SVX_MACROTBL_VERSION31
: SVX_MACROTBL_AKTVERSION;
if( SVX_MACROTBL_VERSION40 <= nVersion )
rStream << nVersion;
- rStream << (USHORT)Count();
+ rStream << (sal_uInt16)Count();
SvxMacro* pMac = ((SvxMacroTableDtor*)this)->First();
while( pMac && rStream.GetError() == SVSTREAM_OK )
@@ -173,7 +173,7 @@ SvStream& SvxMacroTableDtor::Write( SvStream& rStream ) const
SfxPoolItem::writeByteString(rStream, pMac->GetMacName());
if( SVX_MACROTBL_VERSION40 <= nVersion )
- rStream << (USHORT)pMac->GetScriptType();
+ rStream << (sal_uInt16)pMac->GetScriptType();
pMac = ((SvxMacroTableDtor*)this)->Next();
}
return rStream;
@@ -203,20 +203,20 @@ int SvxMacroItem::operator==( const SfxPoolItem& rAttr ) const
// Anzahl unterschiedlich => auf jeden Fall ungleich
if ( rOwn.Count() != rOther.Count() )
- return FALSE;
+ return sal_False;
// einzeln verleichen; wegen Performance ist die Reihenfolge wichtig
- for ( USHORT nNo = 0; nNo < rOwn.Count(); ++nNo )
+ for ( sal_uInt16 nNo = 0; nNo < rOwn.Count(); ++nNo )
{
const SvxMacro *pOwnMac = rOwn.GetObject(nNo);
const SvxMacro *pOtherMac = rOther.GetObject(nNo);
if ( rOwn.GetKey(pOwnMac) != rOther.GetKey(pOtherMac) ||
pOwnMac->GetLibName() != pOtherMac->GetLibName() ||
pOwnMac->GetMacName() != pOtherMac->GetMacName() )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -257,14 +257,14 @@ SfxItemPresentation SvxMacroItem::GetPresentation
// -----------------------------------------------------------------------
-SvStream& SvxMacroItem::Store( SvStream& rStrm , USHORT ) const
+SvStream& SvxMacroItem::Store( SvStream& rStrm , sal_uInt16 ) const
{
return aMacroTable.Write( rStrm );
}
// -----------------------------------------------------------------------
-SfxPoolItem* SvxMacroItem::Create( SvStream& rStrm, USHORT nVersion ) const
+SfxPoolItem* SvxMacroItem::Create( SvStream& rStrm, sal_uInt16 nVersion ) const
{
SvxMacroItem* pAttr = new SvxMacroItem( Which() );
pAttr->aMacroTable.Read( rStrm, nVersion );
@@ -273,7 +273,7 @@ SfxPoolItem* SvxMacroItem::Create( SvStream& rStrm, USHORT nVersion ) const
// -----------------------------------------------------------------------
-void SvxMacroItem::SetMacro( USHORT nEvent, const SvxMacro& rMacro )
+void SvxMacroItem::SetMacro( sal_uInt16 nEvent, const SvxMacro& rMacro )
{
SvxMacro *pMacro;
if ( 0 != (pMacro=aMacroTable.Get(nEvent)) )
@@ -287,7 +287,7 @@ void SvxMacroItem::SetMacro( USHORT nEvent, const SvxMacro& rMacro )
// -----------------------------------------------------------------------
-USHORT SvxMacroItem::GetVersion( USHORT nFileFormatVersion ) const
+sal_uInt16 SvxMacroItem::GetVersion( sal_uInt16 nFileFormatVersion ) const
{
return SOFFICE_FILEFORMAT_31 == nFileFormatVersion
? 0 : aMacroTable.GetVersion();
diff --git a/svl/source/items/nranges.cxx b/svl/source/items/nranges.cxx
index 813c1fec8ebd..3684a748db14 100644
--- a/svl/source/items/nranges.cxx
+++ b/svl/source/items/nranges.cxx
@@ -63,7 +63,7 @@ NUMTYPE InitializeRanges_Impl( NUMTYPE *&rpRanges, va_list pArgs,
/** <H3>Description</H3>
- Creates an USHORT-ranges-array in 'rpRanges' using 'nWh1' and 'nWh2' as
+ Creates an sal_uInt16-ranges-array in 'rpRanges' using 'nWh1' and 'nWh2' as
first range, 'nNull' as terminator or start of 2nd range and 'pArgs' as
remaider.
@@ -73,7 +73,7 @@ NUMTYPE InitializeRanges_Impl( NUMTYPE *&rpRanges, va_list pArgs,
{
NUMTYPE nSize = 0, nIns = 0;
- USHORT nCnt = 0;
+ sal_uInt16 nCnt = 0;
SvNums aNumArr( 11, 8 );
aNumArr.Insert( nWh1, nCnt++ );
aNumArr.Insert( nWh2, nCnt++ );
@@ -232,20 +232,20 @@ SfxNumRanges::SfxNumRanges( const NUMTYPE* pArr )
//------------------------------------------------------------------------
-BOOL SfxNumRanges::operator==( const SfxNumRanges &rOther ) const
+sal_Bool SfxNumRanges::operator==( const SfxNumRanges &rOther ) const
{
// Object pointers equal?
if ( this == &rOther )
- return TRUE;
+ return sal_True;
// Ranges pointers equal?
if ( _pRanges == rOther._pRanges )
- return TRUE;
+ return sal_True;
// Counts equal?
NUMTYPE nCount = Count();
if ( nCount != rOther.Count() )
- return FALSE;
+ return sal_False;
// Check arrays.
NUMTYPE n = 0;
@@ -253,12 +253,12 @@ BOOL SfxNumRanges::operator==( const SfxNumRanges &rOther ) const
{
// Elements at current position equal?
if ( _pRanges[ n ] != rOther._pRanges[ n ] )
- return FALSE;
+ return sal_False;
++n;
}
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------
@@ -776,21 +776,21 @@ SfxNumRanges& SfxNumRanges::operator /=
//------------------------------------------------------------------------
-BOOL SfxNumRanges::Intersects( const SfxNumRanges &rRanges ) const
+sal_Bool SfxNumRanges::Intersects( const SfxNumRanges &rRanges ) const
/** <H3>Description</H3>
Determines if at least one range in 'rRanges' intersects with one
range in '*this'.
- TRUE, if there is at least one with:
+ sal_True, if there is at least one with:
this->Contains( n ) && rRanges.Contains( n )
*/
{
// special cases: one is empty
if ( rRanges.IsEmpty() || IsEmpty() )
- return FALSE;
+ return sal_False;
// find at least one intersecting range
const NUMTYPE *pRange1 = _pRanges;
@@ -810,12 +810,12 @@ BOOL SfxNumRanges::Intersects( const SfxNumRanges &rRanges ) const
// the ranges are overlappung
else
- return TRUE;
+ return sal_True;
}
while ( *pRange2 );
// no intersection found
- return FALSE;
+ return sal_False;
}
//------------------------------------------------------------------------
@@ -834,7 +834,7 @@ NUMTYPE SfxNumRanges::Count() const
//------------------------------------------------------------------------
-BOOL SfxNumRanges::Contains( NUMTYPE n ) const
+sal_Bool SfxNumRanges::Contains( NUMTYPE n ) const
/** <H3>Description</H3>
@@ -844,7 +844,7 @@ BOOL SfxNumRanges::Contains( NUMTYPE n ) const
{
for ( NUMTYPE *pRange = _pRanges; *pRange && *pRange <= n; pRange += 2 )
if ( pRange[0] <= n && n <= pRange[1] )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
diff --git a/svl/source/items/poolcach.cxx b/svl/source/items/poolcach.cxx
index ab2bdfb91c84..6e13a3b77485 100644
--- a/svl/source/items/poolcach.cxx
+++ b/svl/source/items/poolcach.cxx
@@ -84,7 +84,7 @@ SfxItemPoolCache::~SfxItemPoolCache()
//------------------------------------------------------------------------
-const SfxSetItem& SfxItemPoolCache::ApplyTo( const SfxSetItem &rOrigItem, BOOL bNew )
+const SfxSetItem& SfxItemPoolCache::ApplyTo( const SfxSetItem &rOrigItem, sal_Bool bNew )
{
DBG_CHKTHIS(SfxItemPoolCache, 0);
DBG_ASSERT( pPool == rOrigItem.GetItemSet().GetPool(), "invalid Pool" );
diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx
index a3d87ca76e5d..ec55ba09195c 100644
--- a/svl/source/items/poolio.cxx
+++ b/svl/source/items/poolio.cxx
@@ -99,43 +99,43 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
;zun"achst ein Kompatiblit"ats-Header-Block
Start: 0x1111 SFX_ITEMPOOL_TAG_STARTPOOLS(_4/_5)
- BYTE MAJOR_VER ;SfxItemPool-Version
- BYTE MINOR_VER ;"
+ sal_uInt8 MAJOR_VER ;SfxItemPool-Version
+ sal_uInt8 MINOR_VER ;"
0xFFFF SFX_ITEMPOOL_TAG_TRICK4OLD ;ex. GetVersion()
- USHORT 0x0000 ;Pseudo-StyleSheetPool
- USHORT 0x0000 ;Pseudo-StyleSheetPool
+ sal_uInt16 0x0000 ;Pseudo-StyleSheetPool
+ sal_uInt16 0x0000 ;Pseudo-StyleSheetPool
;den ganzen Pool in einen Record
record SfxMiniRecod(SFX_ITEMPOOL_REC)
;je ein Header vorweg
Header: record SfxMiniRecord(SFX_ITEMPOOL_REC_HEADER)
- USHORT GetVersion() ;Which-Ranges etc.
+ sal_uInt16 GetVersion() ;Which-Ranges etc.
String GetName() ;Pool-Name
;die Versions-Map, um WhichIds neuer File-Versionen mappen zu k"onnen
Versions: record SfxMultiRecord(SFX_ITEMPOOL_REC_VERSIONS, 0)
- USHORT OldVersion
- USHORT OldStartWhich
- USHORT OldEndWhich
- USHORT[] NewWhich (OldEndWhich-OldStartWhich+1)
+ sal_uInt16 OldVersion
+ sal_uInt16 OldStartWhich
+ sal_uInt16 OldEndWhich
+ sal_uInt16[] NewWhich (OldEndWhich-OldStartWhich+1)
;jetzt die gepoolten Items (zuerst nicht-SfxSetItems)
Items: record SfxMultiRecord(SFX_ITEMPOOL_REC_WHICHIDS, 0)
content SlotId, 0
- USHORT WhichId
- USHORT pItem->GetVersion()
- USHORT Array-Size
+ sal_uInt16 WhichId
+ sal_uInt16 pItem->GetVersion()
+ sal_uInt16 Array-Size
record SfxMultiRecord(SFX_, 0)
content Surrogate
- USHORT RefCount
+ sal_uInt16 RefCount
unknown pItem->Store()
;jetzt die gesetzten Pool-Defaults
Defaults: record SfxMultiRecord(SFX_ITEMPOOL_REC_DEFAULTS, 0)
content SlotId, 0
- USHORT WhichId
- USHORT pPoolDef->GetVersion()
+ sal_uInt16 WhichId
+ sal_uInt16 pPoolDef->GetVersion()
unknown pPoolDef->Store();
;dahinter folgt ggf. der Secondary ohne Kompatiblit"ats-Header-Block
@@ -150,7 +150,7 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
pStoreMaster = pStoreMaster->pSecondary;
// Alter-Header (Version des Pools an sich und Inhalts-Version 0xffff)
- pImp->bStreaming = TRUE;
+ pImp->bStreaming = sal_True;
if ( !pStoreMaster )
{
rStream << ( rStream.GetVersion() >= SOFFICE_FILEFORMAT_50
@@ -160,8 +160,8 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
rStream << SFX_ITEMPOOL_TAG_TRICK4OLD;
// SfxStyleSheet-Bug umgehen
- rStream << UINT16(0); // Version
- rStream << UINT16(0); // Count (2. Schleife f"allt sonst auf die Fresse)
+ rStream << sal_uInt16(0); // Version
+ rStream << sal_uInt16(0); // Count (2. Schleife f"allt sonst auf die Fresse)
}
// jeder Pool ist als ganzes ein Record
@@ -183,9 +183,9 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
aVerRec.NewContent();
SfxPoolVersion_ImplPtr pVer = pImp->aVersions[nVerNo];
rStream << pVer->_nVer << pVer->_nStart << pVer->_nEnd;
- USHORT nCount = pVer->_nEnd - pVer->_nStart + 1;
- USHORT nNewWhich = 0;
- for ( USHORT n = 0; n < nCount; ++n )
+ sal_uInt16 nCount = pVer->_nEnd - pVer->_nStart + 1;
+ sal_uInt16 nNewWhich = 0;
+ for ( sal_uInt16 n = 0; n < nCount; ++n )
{
nNewWhich = pVer->_pMap[n];
rStream << nNewWhich;
@@ -193,7 +193,7 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
// Workaround gegen Bug in SetVersionMap der 312
if ( SOFFICE_FILEFORMAT_31 == _nFileFormatVersion )
- rStream << USHORT(nNewWhich+1);
+ rStream << sal_uInt16(nNewWhich+1);
}
}
@@ -202,15 +202,15 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
SfxMultiMixRecordWriter aWhichIdsRec( &rStream, SFX_ITEMPOOL_REC_WHICHIDS, 0 );
// erst Atomaren-Items und dann die Sets schreiben (wichtig beim Laden)
- for ( pImp->bInSetItem = FALSE; pImp->bInSetItem <= TRUE && !rStream.GetError(); ++pImp->bInSetItem )
+ for ( pImp->bInSetItem = sal_False; pImp->bInSetItem <= sal_True && !rStream.GetError(); ++pImp->bInSetItem )
{
SfxPoolItemArray_Impl **pArr = pImp->ppPoolItems;
SfxPoolItem **ppDefItem = ppStaticDefaults;
- const USHORT nSize = GetSize_Impl();
+ const sal_uInt16 nSize = GetSize_Impl();
for ( size_t i = 0; i < nSize && !rStream.GetError(); ++i, ++pArr, ++ppDefItem )
{
// Version des Items feststellen
- USHORT nItemVersion = (*ppDefItem)->GetVersion( _nFileFormatVersion );
+ sal_uInt16 nItemVersion = (*ppDefItem)->GetVersion( _nFileFormatVersion );
if ( USHRT_MAX == nItemVersion )
// => kam in zu exportierender Version gar nicht vor
continue;
@@ -225,7 +225,7 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
pImp->bInSetItem == (*ppDefItem)->ISA(SfxSetItem) )
{
// eigene Kennung, globale Which-Id und Item-Version
- USHORT nSlotId = GetSlotId( (*ppDefItem)->Which(), FALSE );
+ sal_uInt16 nSlotId = GetSlotId( (*ppDefItem)->Which(), sal_False );
aWhichIdsRec.NewContent(nSlotId, 0);
rStream << (*ppDefItem)->Which();
rStream << nItemVersion;
@@ -241,13 +241,13 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
const SfxPoolItem *pItem = (*pArr)->operator[](j);
if ( pItem && pItem->GetRefCount() ) //! siehe anderes MI-REF
{
- aItemsRec.NewContent((USHORT)j, 'X' );
+ aItemsRec.NewContent((sal_uInt16)j, 'X' );
if ( pItem->GetRefCount() == SFX_ITEMS_SPECIAL )
- rStream << (USHORT) pItem->GetKind();
+ rStream << (sal_uInt16) pItem->GetKind();
else
{
- rStream << (USHORT) pItem->GetRefCount();
+ rStream << (sal_uInt16) pItem->GetRefCount();
if( pItem->GetRefCount() > SFX_ITEMS_OLD_MAXREF )
rStream.SetError( ERRCODE_IO_NOTSTORABLEINBINARYFORMAT );
}
@@ -259,10 +259,10 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
#ifdef DBG_UTIL_MI
if ( !pItem->ISA(SfxSetItem) )
{
- ULONG nMark = rStream.Tell();
- rStream.Seek( nItemStartPos + sizeof(USHORT) );
+ sal_uLong nMark = rStream.Tell();
+ rStream.Seek( nItemStartPos + sizeof(sal_uInt16) );
SfxPoolItem *pClone = pItem->Create(rStream, nItemVersion );
- USHORT nWh = pItem->Which();
+ sal_uInt16 nWh = pItem->Which();
SFX_ASSERT( rStream.Tell() == nMark, nWh,"asymmetric store/create" );
SFX_ASSERT( *pClone == *pItem, nWh, "unequal after store/create" );
delete pClone;
@@ -274,27 +274,27 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
}
}
- pImp->bInSetItem = FALSE;
+ pImp->bInSetItem = sal_False;
}
// die gesetzten Defaults speichern (Pool-Defaults)
if ( !rStream.GetError() )
{
SfxMultiMixRecordWriter aDefsRec( &rStream, SFX_ITEMPOOL_REC_DEFAULTS, 0 );
- USHORT nCount = GetSize_Impl();
- for ( USHORT n = 0; n < nCount; ++n )
+ sal_uInt16 nCount = GetSize_Impl();
+ for ( sal_uInt16 n = 0; n < nCount; ++n )
{
const SfxPoolItem* pDefaultItem = ppPoolDefaults[n];
if ( pDefaultItem )
{
// Version ermitteln
- USHORT nItemVersion = pDefaultItem->GetVersion( _nFileFormatVersion );
+ sal_uInt16 nItemVersion = pDefaultItem->GetVersion( _nFileFormatVersion );
if ( USHRT_MAX == nItemVersion )
// => gab es in der Version noch nicht
continue;
// eigene Kennung, globale Kennung, Version
- USHORT nSlotId = GetSlotId( pDefaultItem->Which(), FALSE );
+ sal_uInt16 nSlotId = GetSlotId( pDefaultItem->Which(), sal_False );
aDefsRec.NewContent( nSlotId, 0 );
rStream << pDefaultItem->Which();
rStream << nItemVersion;
@@ -311,7 +311,7 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
if ( !rStream.GetError() && pSecondary )
pSecondary->Store( rStream );
- pImp->bStreaming = FALSE;
+ pImp->bStreaming = sal_False;
return rStream;
}
@@ -321,7 +321,7 @@ void SfxItemPool::LoadCompleted()
/* [Beschreibung]
- Wurde der SfxItemPool mit 'bRefCounts' == FALSE geladen, mu\s das
+ Wurde der SfxItemPool mit 'bRefCounts' == sal_False geladen, mu\s das
Laden der Dokumentinhalte mit einem Aufruf dieser Methode beendet
werden. Ansonsten hat der Aufruf dieser Methode keine Funktion.
@@ -347,7 +347,7 @@ void SfxItemPool::LoadCompleted()
// "uber alle Which-Werte iterieren
SfxPoolItemArray_Impl** ppItemArr = pImp->ppPoolItems;
- for( USHORT nArrCnt = GetSize_Impl(); nArrCnt; --nArrCnt, ++ppItemArr )
+ for( sal_uInt16 nArrCnt = GetSize_Impl(); nArrCnt; --nArrCnt, ++ppItemArr )
{
// ist "uberhaupt ein Item mit dem Which-Wert da?
if ( *ppItemArr )
@@ -382,7 +382,7 @@ void SfxItemPool::LoadCompleted()
//============================================================================
// This had to be moved to a method of its own to keep Solaris GCC happy:
void SfxItemPool::readTheItems (
- SvStream & rStream, sal_uInt32 nItemCount, USHORT nVersion,
+ SvStream & rStream, sal_uInt32 nItemCount, sal_uInt16 nVersion,
SfxPoolItem * pDefItem, SfxPoolItemArray_Impl ** ppArr)
{
SfxMultiRecordReader aItemsRec( &rStream, SFX_ITEMPOOL_REC_ITEMS );
@@ -390,11 +390,11 @@ void SfxItemPool::readTheItems (
SfxPoolItemArray_Impl *pNewArr = new SfxPoolItemArray_Impl();
SfxPoolItem *pItem = 0;
- ULONG n, nLastSurrogate = ULONG(-1);
+ sal_uLong n, nLastSurrogate = sal_uLong(-1);
while (aItemsRec.GetContent())
{
// n"achstes Surrogat holen
- USHORT nSurrogate = aItemsRec.GetContentTag();
+ sal_uInt16 nSurrogate = aItemsRec.GetContentTag();
DBG_ASSERT( aItemsRec.GetContentVersion() == 'X',
"not an item content" );
@@ -404,7 +404,7 @@ void SfxItemPool::readTheItems (
nLastSurrogate = nSurrogate;
// Ref-Count und Item laden
- USHORT nRef;
+ sal_uInt16 nRef;
rStream >> nRef;
pItem = pDefItem->Create(rStream, nVersion);
@@ -528,7 +528,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
pLoadMaster = pLoadMaster->pSecondary;
// Gesamt Header einlesen
- pImp->bStreaming = TRUE;
+ pImp->bStreaming = sal_True;
if ( !pLoadMaster )
{
// Format-Version laden
@@ -549,7 +549,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
if ( pImp->nMajorVer > SFX_ITEMPOOL_VER_MAJOR )
{
rStream.SetError(SVSTREAM_FILEFORMAT_ERROR);
- pImp->bStreaming = FALSE;
+ pImp->bStreaming = sal_False;
return rStream;
}
@@ -562,19 +562,19 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
SfxMiniRecordReader aPoolRec( &rStream, SFX_ITEMPOOL_REC );
if ( rStream.GetError() )
{
- pImp->bStreaming = FALSE;
+ pImp->bStreaming = sal_False;
return rStream;
}
// Einzel-Header
- int bOwnPool = TRUE;
+ int bOwnPool = sal_True;
UniString aExternName;
{
// Header-Record suchen
SfxMiniRecordReader aPoolHeaderRec( &rStream, SFX_ITEMPOOL_REC_HEADER );
if ( rStream.GetError() )
{
- pImp->bStreaming = FALSE;
+ pImp->bStreaming = sal_False;
return rStream;
}
@@ -588,7 +588,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
{
rStream.SetError(SVSTREAM_FILEFORMAT_ERROR);
aPoolRec.Skip();
- pImp->bStreaming = FALSE;
+ pImp->bStreaming = sal_False;
return rStream;
}
}
@@ -598,25 +598,25 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
SfxMultiRecordReader aVerRec( &rStream, SFX_ITEMPOOL_REC_VERSIONMAP );
if ( rStream.GetError() )
{
- pImp->bStreaming = FALSE;
+ pImp->bStreaming = sal_False;
return rStream;
}
// Versions-Maps einlesen
- USHORT nOwnVersion = pImp->nVersion;
- for ( USHORT nVerNo = 0; aVerRec.GetContent(); ++nVerNo )
+ sal_uInt16 nOwnVersion = pImp->nVersion;
+ for ( sal_uInt16 nVerNo = 0; aVerRec.GetContent(); ++nVerNo )
{
// Header f"ur einzelne Version einlesen
- USHORT nVersion, nHStart, nHEnd;
+ sal_uInt16 nVersion, nHStart, nHEnd;
rStream >> nVersion >> nHStart >> nHEnd;
- USHORT nCount = nHEnd - nHStart + 1;
+ sal_uInt16 nCount = nHEnd - nHStart + 1;
// Is new version is known?
if ( nVerNo >= pImp->aVersions.size() )
{
// Add new Version
- USHORT *pMap = new USHORT[nCount];
- for ( USHORT n = 0; n < nCount; ++n )
+ sal_uInt16 *pMap = new sal_uInt16[nCount];
+ for ( sal_uInt16 n = 0; n < nCount; ++n )
rStream >> pMap[n];
SetVersionMap( nVersion, nHStart, nHEnd, pMap );
}
@@ -625,7 +625,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
}
// Items laden
- FASTBOOL bSecondaryLoaded = FALSE;
+ FASTBOOL bSecondaryLoaded = sal_False;
long nSecondaryEnd = 0;
{
SfxMultiRecordReader aWhichIdsRec( &rStream, SFX_ITEMPOOL_REC_WHICHIDS);
@@ -633,8 +633,8 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
{
// SlotId, Which-Id und Item-Version besorgen
sal_uInt32 nCount;
- USHORT nVersion, nWhich;
- //!USHORT nSlotId = aWhichIdsRec.GetContentTag();
+ sal_uInt16 nVersion, nWhich;
+ //!sal_uInt16 nSlotId = aWhichIdsRec.GetContentTag();
rStream >> nWhich;
if ( pImp->nLoadingVersion != pImp->nVersion )
// Which-Id aus File-Version in Pool-Version verschieben
@@ -647,11 +647,11 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
rStream >> nVersion;
rStream >> nCount;
//!SFX_ASSERTWARNING( !nSlotId || !HasMap() ||
- //! ( nSlotId == GetSlotId( nWhich, FALSE ) ) ||
- //! !GetSlotId( nWhich, FALSE ),
+ //! ( nSlotId == GetSlotId( nWhich, sal_False ) ) ||
+ //! !GetSlotId( nWhich, sal_False ),
//! nWhich, "Slot/Which mismatch" );
- USHORT nIndex = GetIndex_Impl(nWhich);
+ sal_uInt16 nIndex = GetIndex_Impl(nWhich);
SfxPoolItemArray_Impl **ppArr = pImp->ppPoolItems + nIndex;
// SfxSetItems k"onnten Items aus Sekund"arpools beinhalten
@@ -660,12 +660,12 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
if ( !bSecondaryLoaded && pSecondary && pImp->bInSetItem )
{
// an das Ende des eigenen Pools seeken
- ULONG nLastPos = rStream.Tell();
+ sal_uLong nLastPos = rStream.Tell();
aPoolRec.Skip();
// Sekund"arpool einlesen
pSecondary->Load( rStream );
- bSecondaryLoaded = TRUE;
+ bSecondaryLoaded = sal_True;
nSecondaryEnd = rStream.Tell();
// zur"uck zu unseren eigenen Items
@@ -675,7 +675,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
// Items an sich lesen
readTheItems(rStream, nCount, nVersion, pDefItem, ppArr);
- pImp->bInSetItem = FALSE;
+ pImp->bInSetItem = sal_False;
}
}
@@ -686,8 +686,8 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
while ( aDefsRec.GetContent() )
{
// SlotId, Which-Id und Item-Version besorgen
- USHORT nVersion, nWhich;
- //!USHORT nSlotId = aDefsRec.GetContentTag();
+ sal_uInt16 nVersion, nWhich;
+ //!sal_uInt16 nSlotId = aDefsRec.GetContentTag();
rStream >> nWhich;
if ( pImp->nLoadingVersion != pImp->nVersion )
// Which-Id aus File-Version in Pool-Version verschieben
@@ -698,7 +698,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
continue;
rStream >> nVersion;
- //!SFX_ASSERTWARNING( !HasMap() || ( nSlotId == GetSlotId( nWhich, FALSE ) ),
+ //!SFX_ASSERTWARNING( !HasMap() || ( nSlotId == GetSlotId( nWhich, sal_False ) ),
//! nWhich, "Slot/Which mismatch" );
// Pool-Default-Item selbst laden
@@ -724,7 +724,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
if ( aExternName != aName )
aName.Erase();
- pImp->bStreaming = FALSE;
+ pImp->bStreaming = sal_False;
return rStream;
};
@@ -740,19 +740,19 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
rStream >> pImp->nMajorVer >> pImp->nMinorVer;
}
sal_uInt32 nAttribSize;
- int bOwnPool = TRUE;
+ int bOwnPool = sal_True;
UniString aExternName;
if ( pImp->nMajorVer > 1 || pImp->nMinorVer >= 2 )
rStream >> pImp->nLoadingVersion;
SfxPoolItem::readByteString(rStream, aExternName);
bOwnPool = aExternName == aName;
- pImp->bStreaming = TRUE;
+ pImp->bStreaming = sal_True;
//! solange wir keine fremden laden k"onnen
if ( !bOwnPool )
{
rStream.SetError(SVSTREAM_FILEFORMAT_ERROR);
- pImp->bStreaming = FALSE;
+ pImp->bStreaming = sal_False;
return rStream;
}
@@ -761,7 +761,7 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
pImp->nVersion < pImp->nLoadingVersion )
{
rStream.SetError(ERRCODE_IO_WRONGVERSION);
- pImp->bStreaming = FALSE;
+ pImp->bStreaming = sal_False;
return rStream;
}
@@ -769,20 +769,20 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
rStream >> nAttribSize;
// Size-Table einlesen
- ULONG nStartPos = rStream.Tell();
+ sal_uLong nStartPos = rStream.Tell();
rStream.SeekRel( nAttribSize );
CHECK_FILEFORMAT( rStream, SFX_ITEMPOOL_TAG_SIZES );
sal_uInt32 nSizeTableLen;
rStream >> nSizeTableLen;
sal_Char *pBuf = new sal_Char[nSizeTableLen];
rStream.Read( pBuf, nSizeTableLen );
- ULONG nEndOfSizes = rStream.Tell();
+ sal_uLong nEndOfSizes = rStream.Tell();
SvMemoryStream aSizeTable( pBuf, nSizeTableLen, STREAM_READ );
// ab Version 1.3 steht in der Size-Table eine Versions-Map
if ( pImp->nMajorVer > 1 || pImp->nMinorVer >= 3 )
{
- // Version-Map finden (letztes ULONG der Size-Table gibt Pos an)
+ // Version-Map finden (letztes sal_uLong der Size-Table gibt Pos an)
rStream.Seek( nEndOfSizes - sizeof(sal_uInt32) );
sal_uInt32 nVersionMapPos;
rStream >> nVersionMapPos;
@@ -790,22 +790,22 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
// Versions-Maps einlesen
CHECK_FILEFORMAT( rStream, SFX_ITEMPOOL_TAG_VERSIONMAP );
- USHORT nVerCount;
+ sal_uInt16 nVerCount;
rStream >> nVerCount;
- for ( USHORT nVerNo = 0; nVerNo < nVerCount; ++nVerNo )
+ for ( sal_uInt16 nVerNo = 0; nVerNo < nVerCount; ++nVerNo )
{
// Header f"ur einzelne Version einlesen
- USHORT nVersion, nHStart, nHEnd;
+ sal_uInt16 nVersion, nHStart, nHEnd;
rStream >> nVersion >> nHStart >> nHEnd;
- USHORT nCount = nHEnd - nHStart + 1;
- USHORT nBytes = (nCount)*sizeof(USHORT);
+ sal_uInt16 nCount = nHEnd - nHStart + 1;
+ sal_uInt16 nBytes = (nCount)*sizeof(sal_uInt16);
// Is new version is known?
if ( nVerNo >= pImp->aVersions.size() )
{
// Add new Version
- USHORT *pMap = new USHORT[nCount];
- for ( USHORT n = 0; n < nCount; ++n )
+ sal_uInt16 *pMap = new sal_uInt16[nCount];
+ for ( sal_uInt16 n = 0; n < nCount; ++n )
rStream >> pMap[n];
SetVersionMap( nVersion, nHStart, nHEnd, pMap );
}
@@ -818,9 +818,9 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
// Items laden
rStream.Seek( nStartPos );
CHECK_FILEFORMAT( rStream, SFX_ITEMPOOL_TAG_ITEMS );
- FASTBOOL bSecondaryLoaded = FALSE;
+ FASTBOOL bSecondaryLoaded = sal_False;
long nSecondaryEnd = 0;
- USHORT nWhich, nSlot;
+ sal_uInt16 nWhich, nSlot;
while ( rStream >> nWhich, nWhich )
{
// ggf. Which-Id aus alter Version verschieben?
@@ -828,10 +828,10 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
nWhich = GetNewWhich( nWhich );
rStream >> nSlot;
- USHORT nMappedWhich = GetWhich(nSlot, FALSE);
+ sal_uInt16 nMappedWhich = GetWhich(nSlot, sal_False);
int bKnownItem = bOwnPool || IsWhich(nMappedWhich);
- USHORT nRef, nCount, nVersion;
+ sal_uInt16 nRef, nCount, nVersion;
sal_uInt32 nAttrSize;
rStream >> nVersion >> nCount;
@@ -844,18 +844,18 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
nWhich = nMappedWhich;
//!SFX_ASSERTWARNING( !nSlot || !HasMap() ||
- //! ( nSlot == GetSlotId( nWhich, FALSE ) ) ||
- //! !GetSlotId( nWhich, FALSE ),
+ //! ( nSlot == GetSlotId( nWhich, sal_False ) ) ||
+ //! !GetSlotId( nWhich, sal_False ),
//! nWhich, "Slot/Which mismatch" );
- USHORT nIndex = GetIndex_Impl(nWhich);
+ sal_uInt16 nIndex = GetIndex_Impl(nWhich);
ppArr = pImp->ppPoolItems + nIndex;
pNewArr = new SfxPoolItemArray_Impl();
pDefItem = *(ppStaticDefaults + nIndex);
}
// Position vor ersten Item merken
- ULONG nLastPos = rStream.Tell();
+ sal_uLong nLastPos = rStream.Tell();
// SfxSetItems k"onnten Items aus Sekund"arpools beinhalten
if ( !bSecondaryLoaded && pSecondary && pDefItem->ISA(SfxSetItem) )
@@ -867,7 +867,7 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
// Sekund"arpool einlesen
pSecondary->Load1_Impl( rStream );
- bSecondaryLoaded = TRUE;
+ bSecondaryLoaded = sal_True;
nSecondaryEnd = rStream.Tell();
// zur"uck zu unseren eigenen Items
@@ -875,9 +875,9 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
}
// Items an sich lesen
- for ( USHORT j = 0; j < nCount; ++j )
+ for ( sal_uInt16 j = 0; j < nCount; ++j )
{
- ULONG nPos = nLastPos;
+ sal_uLong nPos = nLastPos;
rStream >> nRef;
if ( bKnownItem )
@@ -923,7 +923,7 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
*ppArr = pNewArr;
// die Items merken, die schon im Pool sind
- int bEmpty = TRUE;
+ int bEmpty = sal_True;
if ( 0 != pOldArr )
for ( size_t n = 0; bEmpty && n < pOldArr->size(); ++n )
bEmpty = pOldArr->operator[](n) == 0;
@@ -969,7 +969,7 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
if ( pImp->nMajorVer > 1 || pImp->nMinorVer > 0 )
CHECK_FILEFORMAT( rStream, SFX_ITEMPOOL_TAG_DEFAULTS );
- ULONG nLastPos = rStream.Tell();
+ sal_uLong nLastPos = rStream.Tell();
while ( rStream >> nWhich, nWhich )
{
// ggf. Which-Id aus alter Version verschieben?
@@ -977,12 +977,12 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
nWhich = GetNewWhich( nWhich );
rStream >> nSlot;
- USHORT nMappedWhich = GetWhich(nSlot, FALSE);
+ sal_uInt16 nMappedWhich = GetWhich(nSlot, sal_False);
int bKnownItem = bOwnPool || IsWhich(nMappedWhich);
- ULONG nPos = nLastPos;
+ sal_uLong nPos = nLastPos;
sal_uInt32 nSize;
- USHORT nVersion;
+ sal_uInt16 nVersion;
rStream >> nVersion;
if ( bKnownItem )
@@ -1020,7 +1020,7 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
if ( aExternName != aName )
aName.Erase();
- pImp->bStreaming = FALSE;
+ pImp->bStreaming = sal_False;
return rStream;
}
@@ -1029,8 +1029,8 @@ SvStream &SfxItemPool::Load1_Impl(SvStream &rStream)
const SfxPoolItem* SfxItemPool::LoadSurrogate
(
SvStream& rStream, // vor einem Surrogat positionierter Stream
- USHORT& rWhich, // Which-Id des zu ladenden <SfxPoolItem>s
- USHORT nSlotId, // Slot-Id des zu ladenden <SfxPoolItem>s
+ sal_uInt16& rWhich, // Which-Id des zu ladenden <SfxPoolItem>s
+ sal_uInt16 nSlotId, // Slot-Id des zu ladenden <SfxPoolItem>s
const SfxItemPool* pRefPool // <SfxItemPool> in dem das Surrogat gilt
)
@@ -1095,12 +1095,12 @@ const SfxPoolItem* SfxItemPool::LoadSurrogate
{
// Bei einem anders aufgebauten Pool im Stream, mu\s die SlotId
// aus dem Stream in eine Which-Id gemappt werden k"onnen.
- USHORT nMappedWhich = nSlotId ? GetWhich(nSlotId, TRUE) : 0;
+ sal_uInt16 nMappedWhich = nSlotId ? GetWhich(nSlotId, sal_True) : 0;
if ( IsWhich(nMappedWhich) )
{
// gemappte SlotId kann "ubernommen werden
rWhich = nMappedWhich;
- bResolvable = TRUE;
+ bResolvable = sal_True;
}
}
@@ -1144,7 +1144,7 @@ const SfxPoolItem* SfxItemPool::LoadSurrogate
}
}
- SFX_ASSERT( FALSE, rWhich, "can't resolve Which-Id in LoadSurrogate" );
+ SFX_ASSERT( sal_False, rWhich, "can't resolve Which-Id in LoadSurrogate" );
}
return 0;
@@ -1166,13 +1166,13 @@ FASTBOOL SfxItemPool::StoreSurrogate
[R"uckgabewert]
- FASTBOOL TRUE
+ FASTBOOL sal_True
es wurde ein echtes Surrogat gespeichert, auch
SFX_ITEMS_NULL bei 'pItem==0',
SFX_ITEMS_STATICDEFAULT und SFX_ITEMS_POOLDEFAULT
gelten als 'echte' Surrogate
- FALSE
+ sal_False
es wurde ein Dummy-Surrogat (SFX_ITEMS_DIRECT)
gespeichert, das eigentliche Item mu\s direkt
hinterher selbst gespeichert werden
@@ -1189,7 +1189,7 @@ FASTBOOL SfxItemPool::StoreSurrogate
}
rStream << SFX_ITEMS_NULL;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -1227,7 +1227,7 @@ sal_uInt32 SfxItemPool::GetSurrogate(const SfxPoolItem *pItem) const
// -----------------------------------------------------------------------
-FASTBOOL SfxItemPool::IsInStoringRange( USHORT nWhich ) const
+FASTBOOL SfxItemPool::IsInStoringRange( sal_uInt16 nWhich ) const
{
return nWhich >= pImp->nStoringStart &&
nWhich <= pImp->nStoringEnd;
@@ -1235,7 +1235,7 @@ FASTBOOL SfxItemPool::IsInStoringRange( USHORT nWhich ) const
//------------------------------------------------------------------------
-void SfxItemPool::SetStoringRange( USHORT nFrom, USHORT nTo )
+void SfxItemPool::SetStoringRange( sal_uInt16 nFrom, sal_uInt16 nTo )
/* [Beschreibung]
@@ -1262,10 +1262,10 @@ void SfxItemPool::SetStoringRange( USHORT nFrom, USHORT nTo )
void SfxItemPool::SetVersionMap
(
- USHORT nVer, /* neue Versionsnummer */
- USHORT nOldStart, /* alte erste Which-Id */
- USHORT nOldEnd, /* alte letzte Which-Id */
- USHORT* pOldWhichIdTab /* Array mit genau dem Aufbau der Which-Ids
+ sal_uInt16 nVer, /* neue Versionsnummer */
+ sal_uInt16 nOldStart, /* alte erste Which-Id */
+ sal_uInt16 nOldEnd, /* alte letzte Which-Id */
+ sal_uInt16* pOldWhichIdTab /* Array mit genau dem Aufbau der Which-Ids
der vorhergehenden Version, in denen
die jeweils neue Which-Id steht. */
)
@@ -1313,14 +1313,14 @@ void SfxItemPool::SetVersionMap
Dabei haben sich also die Ids 3 und 4 ge"andert. F"ur die neue Version
m"u\ste am Pool folgendes gesetzt werden:
- static USHORT nVersion1Map = { 1, 2, 5, 6 };
+ static sal_uInt16 nVersion1Map = { 1, 2, 5, 6 };
pPool->SetVersionMap( 1, 1, 4, &nVersion1Map );
[Querverweise]
<SfxItemPool::IsLoadingVersionCurrent()const>
- <SfxItemPool::GetNewWhich(USHORT)>
+ <SfxItemPool::GetNewWhich(sal_uInt16)>
<SfxItemPool::GetVersion()const>
<SfxItemPool::GetLoadingVersion()const>
*/
@@ -1335,9 +1335,9 @@ void SfxItemPool::SetVersionMap
pImp->nVersion = nVer;
// Versions-Range anpassen
- for ( USHORT n = 0; n < nOldEnd-nOldStart+1; ++n )
+ for ( sal_uInt16 n = 0; n < nOldEnd-nOldStart+1; ++n )
{
- USHORT nWhich = pOldWhichIdTab[n];
+ sal_uInt16 nWhich = pOldWhichIdTab[n];
if ( nWhich < pImp->nVerStart )
{
if ( !nWhich )
@@ -1351,9 +1351,9 @@ void SfxItemPool::SetVersionMap
// -----------------------------------------------------------------------
-USHORT SfxItemPool::GetNewWhich
+sal_uInt16 SfxItemPool::GetNewWhich
(
- USHORT nFileWhich // die aus dem Stream geladene Which-Id
+ sal_uInt16 nFileWhich // die aus dem Stream geladene Which-Id
) const
/* [Beschreibung]
@@ -1377,7 +1377,7 @@ USHORT SfxItemPool::GetNewWhich
[Querverweise]
<SfxItemPool::IsLoadingVersionCurrent()const>
- <SfxItemPool::SetVersionMap(USHORT,USHORT,USHORT,USHORT*)>
+ <SfxItemPool::SetVersionMap(sal_uInt16,sal_uInt16,sal_uInt16,sal_uInt16*)>
<SfxItemPool::GetVersion()const>
<SfxItemPool::GetLoadingVersion()const>
*/
@@ -1402,8 +1402,8 @@ USHORT SfxItemPool::GetNewWhich
{
SfxPoolVersion_ImplPtr pVerInfo = pImp->aVersions[nMap-1];
if ( pVerInfo->_nVer > pImp->nVersion )
- { USHORT nOfs;
- USHORT nCount = pVerInfo->_nEnd - pVerInfo->_nStart + 1;
+ { sal_uInt16 nOfs;
+ sal_uInt16 nCount = pVerInfo->_nEnd - pVerInfo->_nStart + 1;
for ( nOfs = 0;
nOfs <= nCount &&
pVerInfo->_pMap[nOfs] != nFileWhich;
@@ -1444,7 +1444,7 @@ USHORT SfxItemPool::GetNewWhich
// -----------------------------------------------------------------------
-FASTBOOL SfxItemPool::IsInVersionsRange( USHORT nWhich ) const
+FASTBOOL SfxItemPool::IsInVersionsRange( sal_uInt16 nWhich ) const
{
return nWhich >= pImp->nVerStart && nWhich <= pImp->nVerEnd;
}
@@ -1465,8 +1465,8 @@ FASTBOOL SfxItemPool::IsCurrentVersionLoading() const
[Querverweise]
- <SfxItemPool::SetVersionMap(USHORT,USHORT,USHORT,USHORT*)>
- <SfxItemPool::GetNewWhich(USHORT)const>
+ <SfxItemPool::SetVersionMap(sal_uInt16,sal_uInt16,sal_uInt16,sal_uInt16*)>
+ <SfxItemPool::GetNewWhich(sal_uInt16)const>
<SfxItemPool::GetVersion()const>
<SfxItemPool::GetLoadingVersion()const>
*/
@@ -1478,7 +1478,7 @@ FASTBOOL SfxItemPool::IsCurrentVersionLoading() const
// -----------------------------------------------------------------------
-USHORT SfxItemPool::GetVersion() const
+sal_uInt16 SfxItemPool::GetVersion() const
/* [Beschreibung]
@@ -1499,8 +1499,8 @@ USHORT SfxItemPool::GetVersion() const
[Querverweise]
<SfxItemPool::IsLoadingVersionCurrent()const>
- <SfxItemPool::SetVersionMap(USHORT,USHORT,USHORT,USHORT*)>
- <SfxItemPool::GetNewWhich(USHORT)const>
+ <SfxItemPool::SetVersionMap(sal_uInt16,sal_uInt16,sal_uInt16,sal_uInt16*)>
+ <SfxItemPool::GetNewWhich(sal_uInt16)const>
<SfxItemPool::GetLoadingVersion()const>
*/
@@ -1510,7 +1510,7 @@ USHORT SfxItemPool::GetVersion() const
// -----------------------------------------------------------------------
-USHORT SfxItemPool::GetLoadingVersion() const
+sal_uInt16 SfxItemPool::GetLoadingVersion() const
/* [Beschreibung]
@@ -1531,8 +1531,8 @@ USHORT SfxItemPool::GetLoadingVersion() const
[Querverweise]
<SfxItemPool::IsLoadingVersionCurrent()const>
- <SfxItemPool::SetVersionMap(USHORT,USHORT,USHORT,USHORT*)>
- <SfxItemPool::GetNewWhich(USHORT)const>
+ <SfxItemPool::SetVersionMap(sal_uInt16,sal_uInt16,sal_uInt16,sal_uInt16*)>
+ <SfxItemPool::GetNewWhich(sal_uInt16)const>
<SfxItemPool::GetVersion()const>
*/
@@ -1556,21 +1556,21 @@ FASTBOOL SfxItemPool::StoreItem( SvStream &rStream, const SfxPoolItem &rItem,
/* [Beschreibung]
Speichert das <SfxPoolItem> 'rItem' in den <SvStream> 'rStream'
- entweder als Surrogat ('bDirect == FALSE') oder direkt mit 'rItem.Store()'.
+ entweder als Surrogat ('bDirect == sal_False') oder direkt mit 'rItem.Store()'.
Nicht poolable Items werden immer direkt gespeichert. Items ohne Which-Id,
also SID-Items, werden nicht gespeichert, ebenso wenn Items, die in der
- File-Format-Version noch nicht vorhanden waren (return FALSE).
+ File-Format-Version noch nicht vorhanden waren (return sal_False).
Das Item wird im Stream wie folgt abgelegt:
- USHORT rItem.Which()
- USHORT GetSlotId( rItem.Which() ) bzw. 0 falls nicht verf"urbar
- USHORT GetSurrogate( &rItem ) bzw. SFX_ITEM_DIRECT bei '!SFX_ITEM_POOLBLE'
+ sal_uInt16 rItem.Which()
+ sal_uInt16 GetSlotId( rItem.Which() ) bzw. 0 falls nicht verf"urbar
+ sal_uInt16 GetSurrogate( &rItem ) bzw. SFX_ITEM_DIRECT bei '!SFX_ITEM_POOLBLE'
- optional (falls 'bDirect == TRUE' oder '!rItem.IsPoolable()':
+ optional (falls 'bDirect == sal_True' oder '!rItem.IsPoolable()':
- USHORT rItem.GetVersion()
- ULONG Size
+ sal_uInt16 rItem.GetVersion()
+ sal_uLong Size
Size rItem.Store()
@@ -1583,34 +1583,34 @@ FASTBOOL SfxItemPool::StoreItem( SvStream &rStream, const SfxPoolItem &rItem,
DBG_ASSERT( !IsInvalidItem(&rItem), "cannot store invalid items" );
if ( IsSlot( rItem.Which() ) )
- return FALSE;
+ return sal_False;
const SfxItemPool *pPool = this;
while ( !pPool->IsInStoringRange(rItem.Which()) )
if ( 0 == ( pPool = pPool->pSecondary ) )
- return FALSE;
+ return sal_False;
DBG_ASSERT( !pImp->bInSetItem || !rItem.ISA(SfxSetItem),
"SetItem contains ItemSet with SetItem" );
- USHORT nSlotId = pPool->GetSlotId( rItem.Which(), TRUE );
- USHORT nItemVersion = rItem.GetVersion(_nFileFormatVersion);
+ sal_uInt16 nSlotId = pPool->GetSlotId( rItem.Which(), sal_True );
+ sal_uInt16 nItemVersion = rItem.GetVersion(_nFileFormatVersion);
if ( USHRT_MAX == nItemVersion )
- return FALSE;
+ return sal_False;
rStream << rItem.Which() << nSlotId;
if ( bDirect || !pPool->StoreSurrogate( rStream, &rItem ) )
{
rStream << nItemVersion;
- rStream << (UINT32) 0L; // Platz fuer Laenge in Bytes
- ULONG nIStart = rStream.Tell();
+ rStream << (sal_uInt32) 0L; // Platz fuer Laenge in Bytes
+ sal_uLong nIStart = rStream.Tell();
rItem.Store(rStream, nItemVersion);
- ULONG nIEnd = rStream.Tell();
+ sal_uLong nIEnd = rStream.Tell();
rStream.Seek( nIStart-4 );
- rStream << (INT32) ( nIEnd-nIStart );
+ rStream << (sal_Int32) ( nIEnd-nIStart );
rStream.Seek( nIEnd );
}
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------------
@@ -1622,10 +1622,10 @@ const SfxPoolItem* SfxItemPool::LoadItem( SvStream &rStream, FASTBOOL bDirect,
// pRefPool==-1 => nicht putten!
{
- USHORT nWhich, nSlot; // nSurrogate;
+ sal_uInt16 nWhich, nSlot; // nSurrogate;
rStream >> nWhich >> nSlot;
- BOOL bDontPut = (SfxItemPool*)-1 == pRefPool;
+ sal_Bool bDontPut = (SfxItemPool*)-1 == pRefPool;
if ( bDontPut || !pRefPool )
pRefPool = this;
@@ -1638,7 +1638,7 @@ const SfxPoolItem* SfxItemPool::LoadItem( SvStream &rStream, FASTBOOL bDirect,
{
// WID in der Version nicht vorhanden => ueberspringen
sal_uInt32 nSurro;
- USHORT nVersion, nLen;
+ sal_uInt16 nVersion, nLen;
rStream >> nSurro;
if ( SFX_ITEMS_DIRECT == nSurro )
{
@@ -1669,17 +1669,17 @@ const SfxPoolItem* SfxItemPool::LoadItem( SvStream &rStream, FASTBOOL bDirect,
pItem = LoadSurrogate( rStream, nWhich, nSlot, pRefPool );
else
// sonst "uberspringen
- rStream.SeekRel( sizeof(USHORT) );
+ rStream.SeekRel( sizeof(sal_uInt16) );
}
// wird direkt, also nicht "uber Surrogat geladen?
if ( bDirect || ( nWhich && !pItem ) )
{
// bDirekt bzw. nicht IsPoolable() => Item direkt laden
- USHORT nVersion;
+ sal_uInt16 nVersion;
sal_uInt32 nLen;
rStream >> nVersion >> nLen;
- ULONG nIStart = rStream.Tell();
+ sal_uLong nIStart = rStream.Tell();
// Which-Id in dieser Version bekannt?
if ( nWhich )
@@ -1697,7 +1697,7 @@ const SfxPoolItem* SfxItemPool::LoadItem( SvStream &rStream, FASTBOOL bDirect,
}
else
pItem = 0;
- ULONG nIEnd = rStream.Tell();
+ sal_uLong nIEnd = rStream.Tell();
DBG_ASSERT( nIEnd <= (nIStart+nLen), "read past end of item" );
if ( (nIStart+nLen) != nIEnd )
rStream.Seek( nIStart+nLen );
diff --git a/svl/source/items/poolitem.cxx b/svl/source/items/poolitem.cxx
index 77cf3dfff014..8626daeffbd5 100644
--- a/svl/source/items/poolitem.cxx
+++ b/svl/source/items/poolitem.cxx
@@ -38,18 +38,18 @@ DBG_NAME(SfxVoidItem)
// @@@ DBG_NAME(SfxInvalidItem);
DBG_NAME(SfxItemHandle)
-BYTE nSfxFlag8Val[8] =
+sal_uInt8 nSfxFlag8Val[8] =
{
1, 2, 4, 8, 16, 32, 64, 128
};
-USHORT nSfxFlag16Val[16] =
+sal_uInt16 nSfxFlag16Val[16] =
{
1, 2, 4, 8, 16, 32, 64, 128, 256, 512,
1024, 2048, 4096, 8192, 16384, 32768
};
-ULONG nSfxFlag32Val[32] =
+sal_uLong nSfxFlag32Val[32] =
{
0x1L, 0x2L, 0x4L, 0x8L,
0x10L, 0x20L, 0x40L, 0x80L,
@@ -71,7 +71,7 @@ TYPEINIT1(SfxSetItem, SfxPoolItem);
// ------------------------------------------------------------------------
#if OSL_DEBUG_LEVEL > 1
-static ULONG nItemCount = 0;
+static sal_uLong nItemCount = 0;
const char* pw1 = "Wow! 10.000 items!";
const char* pw2 = "Wow! 100.000 items!";
@@ -83,7 +83,7 @@ const char* pw5 = "Wow! 10.000.000 items!";
IMPL_PTRHINT(SfxPoolItemHint,SfxPoolItem)
// SfxPoolItem -----------------------------------------------------------
-SfxPoolItem::SfxPoolItem( USHORT nW )
+SfxPoolItem::SfxPoolItem( sal_uInt16 nW )
: nRefCount( 0 ),
nWhich( nW )
, nKind( 0 )
@@ -192,26 +192,26 @@ int SfxPoolItem::operator==( const SfxPoolItem& rCmp ) const
int SfxPoolItem::IsPoolable() const
{
DBG_CHKTHIS(SfxPoolItem, 0);
- return TRUE;
+ return sal_True;
}
#endif
// -----------------------------------------------------------------------
-SfxPoolItem* SfxPoolItem::Create(SvStream &, USHORT) const
+SfxPoolItem* SfxPoolItem::Create(SvStream &, sal_uInt16) const
{
DBG_CHKTHIS(SfxPoolItem, 0);
return Clone(0);
}
// -----------------------------------------------------------------------
-USHORT SfxPoolItem::GetVersion( USHORT ) const
+sal_uInt16 SfxPoolItem::GetVersion( sal_uInt16 ) const
{
DBG_CHKTHIS(SfxPoolItem, 0);
return 0;
}
// -----------------------------------------------------------------------
-SvStream& SfxPoolItem::Store(SvStream &rStream, USHORT ) const
+SvStream& SfxPoolItem::Store(SvStream &rStream, sal_uInt16 ) const
{
DBG_CHKTHIS(SfxPoolItem, 0);
return rStream;
@@ -269,7 +269,7 @@ SfxItemPresentation SfxPoolItem::GetPresentation
von allen UI-relevanten SfxPoolItem-Subklassen "uberladen werden.
Da die Ma\seinheit des Wertes im SfxItemPool nur "uber
- <SfxItemPool::GetMetric(USHORT)const> erfragbar ist, und nicht etwa
+ <SfxItemPool::GetMetric(sal_uInt16)const> erfragbar ist, und nicht etwa
in der SfxPoolItem-Instanz oder -Subklasse verf"ugbar ist, wird die
eigene Ma\seinheit als 'eCoreMetric' "ubergeben.
@@ -312,7 +312,7 @@ SfxItemPresentation SfxPoolItem::GetPresentation
}
// SfxVoidItem ------------------------------------------------------------
-SfxVoidItem::SfxVoidItem( USHORT which ):
+SfxVoidItem::SfxVoidItem( sal_uInt16 which ):
SfxPoolItem(which)
{
DBG_CTOR(SfxVoidItem, 0);
@@ -334,7 +334,7 @@ rCmp
{
DBG_CHKTHIS(SfxVoidItem, 0);
DBG_ASSERT( SfxPoolItem::operator==( rCmp ), "unequal type" );
- return TRUE;
+ return sal_True;
}
// ------------------------------------------------------------------------
@@ -361,7 +361,7 @@ SfxPoolItem* SfxVoidItem::Clone(SfxItemPool *) const
// SfxInvalidItem ---------------------------------------------------------
#if 0 /* @@@ NOT USED @@@ */
-SfxInvalidItem::SfxInvalidItem( USHORT nWhich, const SfxPoolItem &rDefault ):
+SfxInvalidItem::SfxInvalidItem( sal_uInt16 nWhich, const SfxPoolItem &rDefault ):
SfxPoolItem(nWhich),
pDefaultItem(&rDefault)
{
@@ -414,7 +414,7 @@ SfxPoolItem* SfxInvalidItem::Clone(SfxItemPool *) const
}
// ------------------------------------------------------------------------
-SfxPoolItem* SfxInvalidItem::Create(SvStream &, USHORT nVersion) const
+SfxPoolItem* SfxInvalidItem::Create(SvStream &, sal_uInt16 nVersion) const
{
DBG_CHKTHIS(SfxInvalidItem, 0);
DBG_ERROR("SfxInvalidItem::Create() ist sinnlos");
@@ -422,7 +422,7 @@ SfxPoolItem* SfxInvalidItem::Create(SvStream &, USHORT nVersion) const
}
// ------------------------------------------------------------------------
-SvStream& SfxInvalidItem::Store(SvStream &rStream, USHORT nItemVersion ) const
+SvStream& SfxInvalidItem::Store(SvStream &rStream, sal_uInt16 nItemVersion ) const
{
DBG_CHKTHIS(SfxInvalidItem, 0);
DBG_ERROR("SfxInvalidItem::Store() ist sinnlos");
@@ -432,7 +432,7 @@ SvStream& SfxInvalidItem::Store(SvStream &rStream, USHORT nItemVersion ) const
// SfxItemHandle ----------------------------------------------------------
SfxItemHandle::SfxItemHandle(SfxPoolItem &rItem):
- pRef(new USHORT(1)),
+ pRef(new sal_uInt16(1)),
pItem(rItem.Clone(0))
{
DBG_CTOR(SfxItemHandle, 0);
@@ -504,18 +504,18 @@ void SfxPoolItem::Store(SvStream &rStream) const
// -----------------------------------------------------------------------
-BOOL SfxPoolItem::QueryValue( com::sun::star::uno::Any&, BYTE ) const
+sal_Bool SfxPoolItem::QueryValue( com::sun::star::uno::Any&, sal_uInt8 ) const
{
DBG_ERROR("There is no implementation for QueryValue for this item!");
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL SfxPoolItem::PutValue( const com::sun::star::uno::Any&, BYTE )
+sal_Bool SfxPoolItem::PutValue( const com::sun::star::uno::Any&, sal_uInt8 )
{
DBG_ERROR("There is no implementation for PutValue for this item!");
- return FALSE;
+ return sal_False;
}
SfxVoidItem::~SfxVoidItem()
diff --git a/svl/source/items/ptitem.cxx b/svl/source/items/ptitem.cxx
index 3c12745e5967..cd557312932c 100644
--- a/svl/source/items/ptitem.cxx
+++ b/svl/source/items/ptitem.cxx
@@ -57,7 +57,7 @@ SfxPointItem::SfxPointItem()
// -----------------------------------------------------------------------
-SfxPointItem::SfxPointItem( USHORT nW, const Point& rVal ) :
+SfxPointItem::SfxPointItem( sal_uInt16 nW, const Point& rVal ) :
SfxPoolItem( nW ),
aVal( rVal )
{
@@ -66,7 +66,7 @@ SfxPointItem::SfxPointItem( USHORT nW, const Point& rVal ) :
// -----------------------------------------------------------------------
-SfxPointItem::SfxPointItem( USHORT nW, SvStream &rStream ) :
+SfxPointItem::SfxPointItem( sal_uInt16 nW, SvStream &rStream ) :
SfxPoolItem( nW )
{
DBG_CTOR(SfxPointItem, 0);
@@ -120,7 +120,7 @@ SfxPoolItem* SfxPointItem::Clone(SfxItemPool *) const
// -----------------------------------------------------------------------
-SfxPoolItem* SfxPointItem::Create(SvStream &rStream, USHORT ) const
+SfxPoolItem* SfxPointItem::Create(SvStream &rStream, sal_uInt16 ) const
{
DBG_CHKTHIS(SfxPointItem, 0);
Point aStr;
@@ -130,7 +130,7 @@ SfxPoolItem* SfxPointItem::Create(SvStream &rStream, USHORT ) const
// -----------------------------------------------------------------------
-SvStream& SfxPointItem::Store(SvStream &rStream, USHORT ) const
+SvStream& SfxPointItem::Store(SvStream &rStream, sal_uInt16 ) const
{
DBG_CHKTHIS(SfxPointItem, 0);
rStream << aVal;
@@ -139,8 +139,8 @@ SvStream& SfxPointItem::Store(SvStream &rStream, USHORT ) const
// -----------------------------------------------------------------------
-BOOL SfxPointItem::QueryValue( uno::Any& rVal,
- BYTE nMemberId ) const
+sal_Bool SfxPointItem::QueryValue( uno::Any& rVal,
+ sal_uInt8 nMemberId ) const
{
sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
awt::Point aTmp(aVal.X(), aVal.Y());
@@ -155,20 +155,20 @@ BOOL SfxPointItem::QueryValue( uno::Any& rVal,
case 0: rVal <<= aTmp; break;
case MID_X: rVal <<= aTmp.X; break;
case MID_Y: rVal <<= aTmp.Y; break;
- default: DBG_ERROR("Wrong MemberId!"); return FALSE;
+ default: DBG_ERROR("Wrong MemberId!"); return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL SfxPointItem::PutValue( const uno::Any& rVal,
- BYTE nMemberId )
+sal_Bool SfxPointItem::PutValue( const uno::Any& rVal,
+ sal_uInt8 nMemberId )
{
sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
awt::Point aValue;
sal_Int32 nVal = 0;
if ( !nMemberId )
@@ -194,7 +194,7 @@ BOOL SfxPointItem::PutValue( const uno::Any& rVal,
case 0: aVal.setX( aValue.X ); aVal.setY( aValue.Y ); break;
case MID_X: aVal.setX( nVal ); break;
case MID_Y: aVal.setY( nVal ); break;
- default: DBG_ERROR("Wrong MemberId!"); return FALSE;
+ default: DBG_ERROR("Wrong MemberId!"); return sal_False;
}
}
diff --git a/svl/source/items/rectitem.cxx b/svl/source/items/rectitem.cxx
index 893ac3c125b0..7aae8caceac5 100644
--- a/svl/source/items/rectitem.cxx
+++ b/svl/source/items/rectitem.cxx
@@ -54,7 +54,7 @@ SfxRectangleItem::SfxRectangleItem()
// -----------------------------------------------------------------------
-SfxRectangleItem::SfxRectangleItem( USHORT nW, const Rectangle& rVal ) :
+SfxRectangleItem::SfxRectangleItem( sal_uInt16 nW, const Rectangle& rVal ) :
SfxPoolItem( nW ),
aVal( rVal )
{
@@ -63,7 +63,7 @@ SfxRectangleItem::SfxRectangleItem( USHORT nW, const Rectangle& rVal ) :
// -----------------------------------------------------------------------
-SfxRectangleItem::SfxRectangleItem( USHORT nW, SvStream &rStream ) :
+SfxRectangleItem::SfxRectangleItem( sal_uInt16 nW, SvStream &rStream ) :
SfxPoolItem( nW )
{
DBG_CTOR(SfxRectangleItem, 0);
@@ -120,7 +120,7 @@ SfxPoolItem* SfxRectangleItem::Clone(SfxItemPool *) const
// -----------------------------------------------------------------------
-SfxPoolItem* SfxRectangleItem::Create(SvStream &rStream, USHORT ) const
+SfxPoolItem* SfxRectangleItem::Create(SvStream &rStream, sal_uInt16 ) const
{
DBG_CHKTHIS(SfxRectangleItem, 0);
Rectangle aStr;
@@ -130,7 +130,7 @@ SfxPoolItem* SfxRectangleItem::Create(SvStream &rStream, USHORT ) const
// -----------------------------------------------------------------------
-SvStream& SfxRectangleItem::Store(SvStream &rStream, USHORT ) const
+SvStream& SfxRectangleItem::Store(SvStream &rStream, sal_uInt16 ) const
{
DBG_CHKTHIS(SfxRectangleItem, 0);
rStream << aVal;
@@ -139,8 +139,8 @@ SvStream& SfxRectangleItem::Store(SvStream &rStream, USHORT ) const
// -----------------------------------------------------------------------
-BOOL SfxRectangleItem::QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId) const
+sal_Bool SfxRectangleItem::QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId) const
{
nMemberId &= ~CONVERT_TWIPS;
switch ( nMemberId )
@@ -157,17 +157,17 @@ BOOL SfxRectangleItem::QueryValue( com::sun::star::uno::Any& rVal,
case MID_RECT_RIGHT: rVal <<= aVal.getY(); break;
case MID_WIDTH: rVal <<= aVal.getWidth(); break;
case MID_HEIGHT: rVal <<= aVal.getHeight(); break;
- default: DBG_ERROR("Wrong MemberID!"); return FALSE;
+ default: DBG_ERROR("Wrong MemberID!"); return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL SfxRectangleItem::PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId )
+sal_Bool SfxRectangleItem::PutValue( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
nMemberId &= ~CONVERT_TWIPS;
com::sun::star::awt::Rectangle aValue;
sal_Int32 nVal = 0;
@@ -190,7 +190,7 @@ BOOL SfxRectangleItem::PutValue( const com::sun::star::uno::Any& rVal,
case MID_RECT_RIGHT: aVal.setY( nVal ); break;
case MID_WIDTH: aVal.setWidth( nVal ); break;
case MID_HEIGHT: aVal.setHeight( nVal ); break;
- default: DBG_ERROR("Wrong MemberID!"); return FALSE;
+ default: DBG_ERROR("Wrong MemberID!"); return sal_False;
}
}
diff --git a/svl/source/items/rngitem.cxx b/svl/source/items/rngitem.cxx
index 2f9c58a362f6..2bb4fb4236c9 100644
--- a/svl/source/items/rngitem.cxx
+++ b/svl/source/items/rngitem.cxx
@@ -31,7 +31,7 @@
#ifndef NUMTYPE
-#define NUMTYPE USHORT
+#define NUMTYPE sal_uInt16
#define SfxXRangeItem SfxRangeItem
#define SfxXRangesItem SfxUShortRangesItem
#include <svl/rngitem.hxx>
diff --git a/svl/source/items/rngitem_inc.cxx b/svl/source/items/rngitem_inc.cxx
index ab8852756f7d..a9d68980ec6a 100644..100755
--- a/svl/source/items/rngitem_inc.cxx
+++ b/svl/source/items/rngitem_inc.cxx
@@ -52,7 +52,7 @@ SfxXRangeItem::SfxXRangeItem()
// -----------------------------------------------------------------------
-SfxXRangeItem::SfxXRangeItem( USHORT which, NUMTYPE from, NUMTYPE to ):
+SfxXRangeItem::SfxXRangeItem( sal_uInt16 which, NUMTYPE from, NUMTYPE to ):
SfxPoolItem( which ),
nFrom( from ),
nTo( to )
@@ -62,7 +62,7 @@ SfxXRangeItem::SfxXRangeItem( USHORT which, NUMTYPE from, NUMTYPE to ):
// -----------------------------------------------------------------------
-SfxXRangeItem::SfxXRangeItem( USHORT nW, SvStream &rStream ) :
+SfxXRangeItem::SfxXRangeItem( sal_uInt16 nW, SvStream &rStream ) :
SfxPoolItem( nW )
{
rStream >> nFrom;
@@ -115,7 +115,7 @@ SfxPoolItem* SfxXRangeItem::Clone(SfxItemPool *) const
// -----------------------------------------------------------------------
-SfxPoolItem* SfxXRangeItem::Create(SvStream &rStream, USHORT) const
+SfxPoolItem* SfxXRangeItem::Create(SvStream &rStream, sal_uInt16) const
{
NUMTYPE nVon, nBis;
rStream >> nVon;
@@ -125,7 +125,7 @@ SfxPoolItem* SfxXRangeItem::Create(SvStream &rStream, USHORT) const
// -----------------------------------------------------------------------
-SvStream& SfxXRangeItem::Store(SvStream &rStream, USHORT) const
+SvStream& SfxXRangeItem::Store(SvStream &rStream, sal_uInt16) const
{
rStream << nFrom;
rStream << nTo;
@@ -141,7 +141,7 @@ SfxXRangesItem::SfxXRangesItem()
//-------------------------------------------------------------------------
-SfxXRangesItem::SfxXRangesItem( USHORT nWID, const NUMTYPE *pRanges )
+SfxXRangesItem::SfxXRangesItem( sal_uInt16 nWID, const NUMTYPE *pRanges )
: SfxPoolItem( nWID )
{
NUMTYPE nCount = Count_Impl(pRanges) + 1;
@@ -151,7 +151,7 @@ SfxXRangesItem::SfxXRangesItem( USHORT nWID, const NUMTYPE *pRanges )
//-------------------------------------------------------------------------
-SfxXRangesItem::SfxXRangesItem( USHORT nWID, SvStream &rStream )
+SfxXRangesItem::SfxXRangesItem( sal_uInt16 nWID, SvStream &rStream )
: SfxPoolItem( nWID )
{
NUMTYPE nCount;
@@ -185,9 +185,9 @@ int SfxXRangesItem::operator==( const SfxPoolItem &rItem ) const
{
const SfxXRangesItem &rOther = (const SfxXRangesItem&) rItem;
if ( !_pRanges && !rOther._pRanges )
- return TRUE;
+ return sal_True;
if ( _pRanges || rOther._pRanges )
- return FALSE;
+ return sal_False;
NUMTYPE n;
for ( n = 0; _pRanges[n] && rOther._pRanges[n]; ++n )
@@ -218,14 +218,14 @@ SfxPoolItem* SfxXRangesItem::Clone( SfxItemPool * ) const
//-------------------------------------------------------------------------
-SfxPoolItem* SfxXRangesItem::Create( SvStream &rStream, USHORT ) const
+SfxPoolItem* SfxXRangesItem::Create( SvStream &rStream, sal_uInt16 ) const
{
return new SfxXRangesItem( Which(), rStream );
}
//-------------------------------------------------------------------------
-SvStream& SfxXRangesItem::Store( SvStream &rStream, USHORT ) const
+SvStream& SfxXRangesItem::Store( SvStream &rStream, sal_uInt16 ) const
{
NUMTYPE nCount = Count_Impl( _pRanges );
rStream >> nCount;
diff --git a/svl/source/items/sfontitm.cxx b/svl/source/items/sfontitm.cxx
index e76b3854c6be..f22c1cb7c26a 100644
--- a/svl/source/items/sfontitm.cxx
+++ b/svl/source/items/sfontitm.cxx
@@ -72,7 +72,7 @@ int SfxFontItem::operator ==(const SfxPoolItem & rItem) const
//============================================================================
// virtual
-SfxPoolItem * SfxFontItem::Create(SvStream & rStream, USHORT) const
+SfxPoolItem * SfxFontItem::Create(SvStream & rStream, sal_uInt16) const
{
VersionCompat aItemCompat(rStream, STREAM_READ);
SfxFontItem * pItem = new SfxFontItem(Which());
@@ -104,8 +104,8 @@ SfxPoolItem * SfxFontItem::Create(SvStream & rStream, USHORT) const
rStream >> nKerning;
pItem->m_bKerning = nKerning != 0;
}
- pItem->m_aColor.Read(rStream, TRUE);
- pItem->m_aFillColor.Read(rStream, TRUE);
+ pItem->m_aColor.Read(rStream, sal_True);
+ pItem->m_aFillColor.Read(rStream, sal_True);
sal_Int16 nFlags = 0;
rStream >> nFlags;
pItem->m_bHasFont = (nFlags & 4) != 0;
@@ -116,7 +116,7 @@ SfxPoolItem * SfxFontItem::Create(SvStream & rStream, USHORT) const
//============================================================================
// virtual
-SvStream & SfxFontItem::Store(SvStream & rStream, USHORT) const
+SvStream & SfxFontItem::Store(SvStream & rStream, sal_uInt16) const
{
VersionCompat aItemCompat(rStream, STREAM_WRITE, 1);
{
@@ -130,8 +130,8 @@ SvStream & SfxFontItem::Store(SvStream & rStream, USHORT) const
<< sal_Int8(m_bOutline) << sal_Int8(m_bShadow)
<< sal_Int8(m_bKerning);
}
- SAL_CONST_CAST(Color &, m_aColor).Write(rStream, TRUE);
- SAL_CONST_CAST(Color &, m_aFillColor).Write(rStream, TRUE);
+ SAL_CONST_CAST(Color &, m_aColor).Write(rStream, sal_True);
+ SAL_CONST_CAST(Color &, m_aFillColor).Write(rStream, sal_True);
rStream << sal_Int16(m_bHasFont << 2 | m_bHasColor
| m_bHasFillColor << 1);
return rStream;
diff --git a/svl/source/items/sitem.cxx b/svl/source/items/sitem.cxx
index 4a9c0af096ea..7f990aec36d3 100644
--- a/svl/source/items/sitem.cxx
+++ b/svl/source/items/sitem.cxx
@@ -45,16 +45,16 @@ DBG_NAME(SfxSetItem)
// --------------------------------------------------------------------------
-SfxSetItem::SfxSetItem( USHORT which, const SfxItemSet &rSet) :
+SfxSetItem::SfxSetItem( sal_uInt16 which, const SfxItemSet &rSet) :
SfxPoolItem(which),
- pSet(rSet.Clone(TRUE))
+ pSet(rSet.Clone(sal_True))
{
DBG_CTOR(SfxSetItem, 0);
}
// --------------------------------------------------------------------------
-SfxSetItem::SfxSetItem( USHORT which, SfxItemSet *pS) :
+SfxSetItem::SfxSetItem( sal_uInt16 which, SfxItemSet *pS) :
SfxPoolItem(which),
pSet(pS)
{
@@ -66,7 +66,7 @@ SfxSetItem::SfxSetItem( USHORT which, SfxItemSet *pS) :
SfxSetItem::SfxSetItem( const SfxSetItem& rCopy, SfxItemPool *pPool ) :
SfxPoolItem(rCopy.Which()),
- pSet(rCopy.pSet->Clone(TRUE, pPool))
+ pSet(rCopy.pSet->Clone(sal_True, pPool))
{
DBG_CTOR(SfxSetItem, 0);
}
@@ -105,7 +105,7 @@ SfxItemPresentation SfxSetItem::GetPresentation
// --------------------------------------------------------------------------
-SvStream& SfxSetItem::Store(SvStream& rStream, USHORT) const
+SvStream& SfxSetItem::Store(SvStream& rStream, sal_uInt16) const
{
GetItemSet().Store(rStream);
return rStream;
diff --git a/svl/source/items/slstitm.cxx b/svl/source/items/slstitm.cxx
index ec9757e278a8..be214cccf599 100644
--- a/svl/source/items/slstitm.cxx
+++ b/svl/source/items/slstitm.cxx
@@ -45,12 +45,12 @@ TYPEINIT1_AUTOFACTORY(SfxStringListItem, SfxPoolItem);
class SfxImpStringList
{
public:
- USHORT nRefCount;
+ sal_uInt16 nRefCount;
List aList;
SfxImpStringList() { nRefCount = 1; }
~SfxImpStringList();
- void Sort( BOOL bAscending, List* );
+ void Sort( sal_Bool bAscending, List* );
};
//------------------------------------------------------------------------
@@ -69,36 +69,36 @@ SfxImpStringList::~SfxImpStringList()
//------------------------------------------------------------------------
-void SfxImpStringList::Sort( BOOL bAscending, List* pParallelList )
+void SfxImpStringList::Sort( sal_Bool bAscending, List* pParallelList )
{
DBG_ASSERT(!pParallelList || pParallelList->Count() >= aList.Count(),"Sort:ParallelList too small");
- ULONG nCount = aList.Count();
+ sal_uLong nCount = aList.Count();
if( nCount > 1 )
{
nCount -= 2;
// Bubble Dir Einen
- BOOL bSwapped = TRUE;
+ sal_Bool bSwapped = sal_True;
while( bSwapped )
{
- bSwapped = FALSE;
- for( ULONG nCur = 0; nCur <= nCount; nCur++ )
+ bSwapped = sal_False;
+ for( sal_uLong nCur = 0; nCur <= nCount; nCur++ )
{
String* pStr1 = (String*)aList.GetObject( nCur );
String* pStr2 = (String*)aList.GetObject( nCur+1 );
// COMPARE_GREATER => pStr2 ist groesser als pStr1
StringCompare eCompare = pStr1->CompareIgnoreCaseToAscii( *pStr2 ); //@@@
- BOOL bSwap = FALSE;
+ sal_Bool bSwap = sal_False;
if( bAscending )
{
if( eCompare == COMPARE_LESS )
- bSwap = TRUE;
+ bSwap = sal_True;
}
else if( eCompare == COMPARE_GREATER )
- bSwap = TRUE;
+ bSwap = sal_True;
if( bSwap )
{
- bSwapped = TRUE;
+ bSwapped = sal_True;
aList.Replace( pStr1, nCur + 1 );
aList.Replace( pStr2, nCur );
if( pParallelList )
@@ -123,7 +123,7 @@ SfxStringListItem::SfxStringListItem() :
//------------------------------------------------------------------------
-SfxStringListItem::SfxStringListItem( USHORT which, const List* pList ) :
+SfxStringListItem::SfxStringListItem( sal_uInt16 which, const List* pList ) :
SfxPoolItem( which ),
pImp(NULL)
{
@@ -146,7 +146,7 @@ SfxStringListItem::SfxStringListItem( USHORT which, const List* pList ) :
//------------------------------------------------------------------------
-SfxStringListItem::SfxStringListItem( USHORT which, SvStream& rStream ) :
+SfxStringListItem::SfxStringListItem( sal_uInt16 which, SvStream& rStream ) :
SfxPoolItem( which ),
pImp(NULL)
{
@@ -214,9 +214,9 @@ int SfxStringListItem::operator==( const SfxPoolItem& rItem ) const
SfxStringListItem* pItem = (SfxStringListItem*)&rItem;
if( pImp == pItem->pImp )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
//------------------------------------------------------------------------
@@ -250,14 +250,14 @@ SfxPoolItem* SfxStringListItem::Clone( SfxItemPool *) const
//------------------------------------------------------------------------
-SfxPoolItem* SfxStringListItem::Create( SvStream & rStream, USHORT ) const
+SfxPoolItem* SfxStringListItem::Create( SvStream & rStream, sal_uInt16 ) const
{
return new SfxStringListItem( Which(), rStream );
}
//------------------------------------------------------------------------
-SvStream& SfxStringListItem::Store( SvStream & rStream, USHORT ) const
+SvStream& SfxStringListItem::Store( SvStream & rStream, sal_uInt16 ) const
{
if( !pImp )
{
@@ -347,14 +347,14 @@ XubString SfxStringListItem::GetString()
int SfxStringListItem::IsPoolable() const
{
- return FALSE;
+ return sal_False;
}
#endif
//------------------------------------------------------------------------
-void SfxStringListItem::Sort( BOOL bAscending, List* pParallelList )
+void SfxStringListItem::Sort( sal_Bool bAscending, List* pParallelList )
{
DBG_ASSERT(GetRefCount()==0,"Sort:RefCount!=0");
if( pImp )
@@ -393,22 +393,22 @@ void SfxStringListItem::GetStringList( com::sun::star::uno::Sequence< rtl::OUStr
//----------------------------------------------------------------------------
// virtual
-BOOL SfxStringListItem::PutValue( const com::sun::star::uno::Any& rVal,BYTE )
+sal_Bool SfxStringListItem::PutValue( const com::sun::star::uno::Any& rVal,sal_uInt8 )
{
com::sun::star::uno::Sequence< rtl::OUString > aValue;
if ( rVal >>= aValue )
{
SetStringList( aValue );
- return TRUE;
+ return sal_True;
}
DBG_ERROR( "SfxStringListItem::PutValue - Wrong type!" );
- return FALSE;
+ return sal_False;
}
//----------------------------------------------------------------------------
// virtual
-BOOL SfxStringListItem::QueryValue( com::sun::star::uno::Any& rVal,BYTE ) const
+sal_Bool SfxStringListItem::QueryValue( com::sun::star::uno::Any& rVal,sal_uInt8 ) const
{
// GetString() is not const!!!
SfxStringListItem* pThis = const_cast< SfxStringListItem * >( this );
@@ -416,7 +416,7 @@ BOOL SfxStringListItem::QueryValue( com::sun::star::uno::Any& rVal,BYTE ) const
com::sun::star::uno::Sequence< rtl::OUString > aStringList;
pThis->GetStringList( aStringList );
rVal = ::com::sun::star::uno::makeAny( aStringList );
- return TRUE;
+ return sal_True;
}
diff --git a/svl/source/items/srchitem.cxx b/svl/source/items/srchitem.cxx
index cc033bc6905e..225a5b99907b 100644
--- a/svl/source/items/srchitem.cxx
+++ b/svl/source/items/srchitem.cxx
@@ -99,7 +99,7 @@ static Sequence< ::rtl::OUString > lcl_GetNotifyNames()
const int nCount = sizeof( aTranslitNames ) / sizeof( aTranslitNames[0] );
Sequence< ::rtl::OUString > aNames( nCount );
::rtl::OUString* pNames = aNames.getArray();
- for (INT32 i = 0; i < nCount; ++i)
+ for (sal_Int32 i = 0; i < nCount; ++i)
pNames[i] = ::rtl::OUString::createFromAscii( aTranslitNames[i] );
return aNames;
@@ -128,7 +128,7 @@ SvxSearchItem::SvxSearchItem( const sal_uInt16 nId ) :
bBackward ( sal_False ),
bPattern ( sal_False ),
bContent ( sal_False ),
- bAsianOptions ( FALSE )
+ bAsianOptions ( sal_False )
{
EnableNotification( lcl_GetNotifyNames() );
@@ -145,7 +145,7 @@ SvxSearchItem::SvxSearchItem( const sal_uInt16 nId ) :
if (aOpt.IsWholeWordsOnly())
aSearchOpt.searchFlag |= SearchFlags::NORM_WORD_ONLY;
- INT32 &rFlags = aSearchOpt.transliterateFlags;
+ sal_Int32 &rFlags = aSearchOpt.transliterateFlags;
if (!aOpt.IsMatchCase())
rFlags |= TransliterationModules_IGNORE_CASE;
@@ -229,7 +229,7 @@ SfxPoolItem* SvxSearchItem::Clone( SfxItemPool *) const
// -----------------------------------------------------------------------
//! used below
-static BOOL operator == ( const SearchOptions& rItem1, const SearchOptions& rItem2 )
+static sal_Bool operator == ( const SearchOptions& rItem1, const SearchOptions& rItem2 )
{
return rItem1.algorithmType == rItem2.algorithmType &&
rItem1.searchFlag == rItem2.searchFlag &&
@@ -425,7 +425,7 @@ void SvxSearchItem::SetTransliterationFlags( sal_Int32 nFlags )
aSearchOpt.transliterateFlags = nFlags;
}
-sal_Bool SvxSearchItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId ) const
+sal_Bool SvxSearchItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId ) const
{
nMemberId &= ~CONVERT_TWIPS;
switch ( nMemberId )
@@ -513,7 +513,7 @@ sal_Bool SvxSearchItem::QueryValue( com::sun::star::uno::Any& rVal, BYTE nMember
// -----------------------------------------------------------------------
-sal_Bool SvxSearchItem::PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId )
+sal_Bool SvxSearchItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId )
{
nMemberId &= ~CONVERT_TWIPS;
sal_Bool bRet = sal_False;
diff --git a/svl/source/items/stritem.cxx b/svl/source/items/stritem.cxx
index 6568dc3a99f5..de2d97d23c6a 100644
--- a/svl/source/items/stritem.cxx
+++ b/svl/source/items/stritem.cxx
@@ -39,7 +39,7 @@ TYPEINIT1_AUTOFACTORY(SfxStringItem, CntUnencodedStringItem)
//============================================================================
// virtual
-SfxStringItem::SfxStringItem(USHORT which, SvStream & rStream):
+SfxStringItem::SfxStringItem(sal_uInt16 which, SvStream & rStream):
CntUnencodedStringItem(which)
{
UniString aValue;
@@ -50,14 +50,14 @@ SfxStringItem::SfxStringItem(USHORT which, SvStream & rStream):
//============================================================================
// virtual
-SfxPoolItem * SfxStringItem::Create(SvStream & rStream, USHORT) const
+SfxPoolItem * SfxStringItem::Create(SvStream & rStream, sal_uInt16) const
{
return new SfxStringItem(Which(), rStream);
}
//============================================================================
// virtual
-SvStream & SfxStringItem::Store(SvStream & rStream, USHORT) const
+SvStream & SfxStringItem::Store(SvStream & rStream, sal_uInt16) const
{
writeByteString(rStream, GetValue());
return rStream;
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index 60c622208d53..8af4a67ea4f3 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -54,7 +54,7 @@
#include <algorithm>
#define STYLESTREAM "SfxStyleSheets"
-#define STYLESTREAM_VERSION USHORT(50)
+#define STYLESTREAM_VERSION sal_uInt16(50)
#ifdef DBG_UTIL
class DbgStyleSheetReferences
@@ -86,7 +86,7 @@ TYPEINIT1(SfxStyleSheetPoolHint, SfxHint);
SfxStyleSheetHintExtended::SfxStyleSheetHintExtended
(
- USHORT nAction, // SFX_STYLESHEET_... (s.o.)
+ sal_uInt16 nAction, // SFX_STYLESHEET_... (s.o.)
const String& rOldName
)
: SfxStyleSheetHint( nAction ),
@@ -94,7 +94,7 @@ SfxStyleSheetHintExtended::SfxStyleSheetHintExtended
{}
SfxStyleSheetHintExtended::SfxStyleSheetHintExtended
(
- USHORT nAction, // SFX_STYLESHEET_... (s.o.)
+ sal_uInt16 nAction, // SFX_STYLESHEET_... (s.o.)
const String& rOldName,
SfxStyleSheetBase& rStyleSheet // geh"ort weiterhin dem Aufrufer
)
@@ -106,7 +106,7 @@ SfxStyleSheetHintExtended::SfxStyleSheetHintExtended
SfxStyleSheetHint::SfxStyleSheetHint
(
- USHORT nAction, // SFX_STYLESHEET_... (s.o.)
+ sal_uInt16 nAction, // SFX_STYLESHEET_... (s.o.)
SfxStyleSheetBase& rStyleSheet // geh"ort weiterhin dem Aufrufer
)
: pStyleSh( &rStyleSheet ),
@@ -115,7 +115,7 @@ SfxStyleSheetHint::SfxStyleSheetHint
SfxStyleSheetHint::SfxStyleSheetHint
(
- USHORT nAction // SFX_STYLESHEET_... (s.o.)
+ sal_uInt16 nAction // SFX_STYLESHEET_... (s.o.)
)
: pStyleSh( NULL ),
nHint( nAction )
@@ -137,7 +137,7 @@ class SfxStyleSheetBasePool_Impl
// Konstruktoren
-SfxStyleSheetBase::SfxStyleSheetBase( const XubString& rName, SfxStyleSheetBasePool& r, SfxStyleFamily eFam, USHORT mask )
+SfxStyleSheetBase::SfxStyleSheetBase( const XubString& rName, SfxStyleSheetBasePool& r, SfxStyleFamily eFam, sal_uInt16 mask )
: rPool( r )
, nFamily( eFam )
, aName( rName )
@@ -146,7 +146,7 @@ SfxStyleSheetBase::SfxStyleSheetBase( const XubString& rName, SfxStyleSheetBaseP
, pSet( NULL )
, nMask(mask)
, nHelpId( 0 )
- , bMySet( FALSE )
+ , bMySet( sal_False )
{
#ifdef DBG_UTIL
aDbgStyleSheetReferences.mnStyles++;
@@ -206,7 +206,7 @@ SfxStyleSheetBase::~SfxStyleSheetBase()
}
}
-USHORT SfxStyleSheetBase::GetVersion() const
+sal_uInt16 SfxStyleSheetBase::GetVersion() const
{
return 0x0000;
}
@@ -218,24 +218,24 @@ const XubString& SfxStyleSheetBase::GetName() const
return aName;
}
-BOOL SfxStyleSheetBase::SetName( const XubString& rName )
+sal_Bool SfxStyleSheetBase::SetName( const XubString& rName )
{
if(rName.Len() == 0)
- return FALSE;
+ return sal_False;
if( aName != rName )
{
String aOldName = aName;
SfxStyleSheetBase *pOther = rPool.Find( rName, nFamily ) ;
if ( pOther && pOther != this )
- return FALSE;
+ return sal_False;
SfxStyleFamily eTmpFam=rPool.GetSearchFamily();
- USHORT nTmpMask=rPool.GetSearchMask();
+ sal_uInt16 nTmpMask=rPool.GetSearchMask();
rPool.SetSearchMask(nFamily);
if ( aName.Len() )
- rPool.ChangeParent( aName, rName, FALSE );
+ rPool.ChangeParent( aName, rName, sal_False );
if ( aFollow.Equals( aName ) )
aFollow = rName;
aName = rName;
@@ -243,7 +243,7 @@ BOOL SfxStyleSheetBase::SetName( const XubString& rName )
rPool.Broadcast( SfxStyleSheetHintExtended(
SFX_STYLESHEET_MODIFIED, aOldName, *this ) );
}
- return TRUE;
+ return sal_True;
}
rtl::OUString SfxStyleSheetBase::GetDisplayName() const
@@ -270,10 +270,10 @@ const XubString& SfxStyleSheetBase::GetParent() const
return aParent;
}
-BOOL SfxStyleSheetBase::SetParent( const XubString& rName )
+sal_Bool SfxStyleSheetBase::SetParent( const XubString& rName )
{
if ( rName == aName )
- return FALSE;
+ return sal_False;
if( aParent != rName )
{
@@ -281,20 +281,20 @@ BOOL SfxStyleSheetBase::SetParent( const XubString& rName )
if( rName.Len() && !pIter )
{
DBG_ERROR( "StyleSheet-Parent nicht gefunden" );
- return FALSE;
+ return sal_False;
}
// rekursive Verknuepfungen verhindern
if( aName.Len() )
while(pIter)
{
if(pIter->GetName() == aName && aName != rName)
- return FALSE;
+ return sal_False;
pIter = rPool.Find(pIter->GetParent(), nFamily);
}
aParent = rName;
}
rPool.Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_MODIFIED, *this ) );
- return TRUE;
+ return sal_True;
}
// Follow aendern
@@ -304,19 +304,19 @@ const XubString& SfxStyleSheetBase::GetFollow() const
return aFollow;
}
-BOOL SfxStyleSheetBase::SetFollow( const XubString& rName )
+sal_Bool SfxStyleSheetBase::SetFollow( const XubString& rName )
{
if( aFollow != rName )
{
if( !rPool.Find( rName, nFamily ) )
{
DBG_ERROR( "StyleSheet-Follow nicht gefunden" );
- return FALSE;
+ return sal_False;
}
aFollow = rName;
}
rPool.Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_MODIFIED, *this ) );
- return TRUE;
+ return sal_True;
}
// Itemset setzen. Die Dflt-Implementation legt ein neues Set an.
@@ -326,20 +326,20 @@ SfxItemSet& SfxStyleSheetBase::GetItemSet()
if( !pSet )
{
pSet = new SfxItemSet( rPool.GetPool() );
- bMySet = TRUE;
+ bMySet = sal_True;
}
return *pSet;
}
// Hilfe-Datei und -ID setzen und abfragen
-ULONG SfxStyleSheetBase::GetHelpId( String& rFile )
+sal_uLong SfxStyleSheetBase::GetHelpId( String& rFile )
{
rFile = aHelpFile;
return nHelpId;
}
-void SfxStyleSheetBase::SetHelpId( const String& rFile, ULONG nId )
+void SfxStyleSheetBase::SetHelpId( const String& rFile, sal_uLong nId )
{
aHelpFile = rFile;
nHelpId = nId;
@@ -347,30 +347,30 @@ void SfxStyleSheetBase::SetHelpId( const String& rFile, ULONG nId )
// Folgevorlage m"oglich? Default: Ja
-BOOL SfxStyleSheetBase::HasFollowSupport() const
+sal_Bool SfxStyleSheetBase::HasFollowSupport() const
{
- return TRUE;
+ return sal_True;
}
// Basisvorlage m"oglich? Default: Ja
-BOOL SfxStyleSheetBase::HasParentSupport() const
+sal_Bool SfxStyleSheetBase::HasParentSupport() const
{
- return TRUE;
+ return sal_True;
}
// Basisvorlage uf NULL setzen m"oglich? Default: Nein
-BOOL SfxStyleSheetBase::HasClearParentSupport() const
+sal_Bool SfxStyleSheetBase::HasClearParentSupport() const
{
- return FALSE;
+ return sal_False;
}
// Defaultmaessig sind alle StyleSheets Used
-BOOL SfxStyleSheetBase::IsUsed() const
+sal_Bool SfxStyleSheetBase::IsUsed() const
{
- return TRUE;
+ return sal_True;
}
// eingestellte Attribute ausgeben
@@ -417,30 +417,30 @@ SfxStyleFamily SfxStyleSheetIterator::GetSearchFamily() const
return nSearchFamily;
}
-inline BOOL SfxStyleSheetIterator::IsTrivialSearch()
+inline sal_Bool SfxStyleSheetIterator::IsTrivialSearch()
{
return nMask == 0xFFFF && GetSearchFamily() == SFX_STYLE_FAMILY_ALL;
}
-BOOL SfxStyleSheetIterator::DoesStyleMatch(SfxStyleSheetBase *pStyle)
+sal_Bool SfxStyleSheetIterator::DoesStyleMatch(SfxStyleSheetBase *pStyle)
{
return ((GetSearchFamily() == SFX_STYLE_FAMILY_ALL) ||
( pStyle->GetFamily() == GetSearchFamily() ))
&& (( pStyle->GetMask() & ( GetSearchMask() & ~SFXSTYLEBIT_USED )) ||
- ( bSearchUsed ? pStyle->IsUsed() : FALSE ) ||
+ ( bSearchUsed ? pStyle->IsUsed() : sal_False ) ||
GetSearchMask() == SFXSTYLEBIT_ALL );
}
SfxStyleSheetIterator::SfxStyleSheetIterator(SfxStyleSheetBasePool *pBase,
- SfxStyleFamily eFam, USHORT n)
+ SfxStyleFamily eFam, sal_uInt16 n)
{
pBasePool=pBase;
nSearchFamily=eFam;
- bSearchUsed=FALSE;
+ bSearchUsed=sal_False;
if((n != SFXSTYLEBIT_ALL ) && ((n & SFXSTYLEBIT_USED) == SFXSTYLEBIT_USED))
{
- bSearchUsed = TRUE;
+ bSearchUsed = sal_True;
n &= ~SFXSTYLEBIT_USED;
}
nMask=n;
@@ -451,13 +451,13 @@ SfxStyleSheetIterator::~SfxStyleSheetIterator()
}
-USHORT SfxStyleSheetIterator::Count()
+sal_uInt16 SfxStyleSheetIterator::Count()
{
- USHORT n = 0;
+ sal_uInt16 n = 0;
if( IsTrivialSearch())
- n = (USHORT) pBasePool->aStyles.size();
+ n = (sal_uInt16) pBasePool->aStyles.size();
else
- for(USHORT i=0; i<pBasePool->aStyles.size(); i++)
+ for(sal_uInt16 i=0; i<pBasePool->aStyles.size(); i++)
{
SfxStyleSheetBase* pStyle = pBasePool->aStyles[i].get();
if(DoesStyleMatch(pStyle))
@@ -466,13 +466,13 @@ USHORT SfxStyleSheetIterator::Count()
return n;
}
-SfxStyleSheetBase* SfxStyleSheetIterator::operator[](USHORT nIdx)
+SfxStyleSheetBase* SfxStyleSheetIterator::operator[](sal_uInt16 nIdx)
{
if( IsTrivialSearch())
return pBasePool->aStyles[nIdx].get();
- USHORT z = 0;
- for(USHORT n=0; n<pBasePool->aStyles.size(); n++)
+ sal_uInt16 z = 0;
+ for(sal_uInt16 n=0; n<pBasePool->aStyles.size(); n++)
{
SfxStyleSheetBase* pStyle = pBasePool->aStyles[n].get();
if( DoesStyleMatch(pStyle))
@@ -491,12 +491,12 @@ SfxStyleSheetBase* SfxStyleSheetIterator::operator[](USHORT nIdx)
SfxStyleSheetBase* SfxStyleSheetIterator::First()
{
- INT32 nIdx = -1;
+ sal_Int32 nIdx = -1;
if ( IsTrivialSearch() && pBasePool->aStyles.size() )
nIdx = 0;
else
- for( USHORT n = 0; n < pBasePool->aStyles.size(); n++ )
+ for( sal_uInt16 n = 0; n < pBasePool->aStyles.size(); n++ )
{
SfxStyleSheetBase* pStyle = pBasePool->aStyles[n].get();
@@ -509,7 +509,7 @@ SfxStyleSheetBase* SfxStyleSheetIterator::First()
if ( nIdx != -1 )
{
- nAktPosition = (USHORT)nIdx;
+ nAktPosition = (sal_uInt16)nIdx;
return pAktStyle = pBasePool->aStyles[nIdx].get();
}
return 0;
@@ -518,13 +518,13 @@ SfxStyleSheetBase* SfxStyleSheetIterator::First()
SfxStyleSheetBase* SfxStyleSheetIterator::Next()
{
- INT32 nIdx = -1;
+ sal_Int32 nIdx = -1;
if ( IsTrivialSearch() &&
- (USHORT)pBasePool->aStyles.size() > nAktPosition + 1 )
+ (sal_uInt16)pBasePool->aStyles.size() > nAktPosition + 1 )
nIdx = nAktPosition + 1;
else
- for( USHORT n = nAktPosition + 1; n < pBasePool->aStyles.size(); n++ )
+ for( sal_uInt16 n = nAktPosition + 1; n < pBasePool->aStyles.size(); n++ )
{
SfxStyleSheetBase* pStyle = pBasePool->aStyles[n].get();
@@ -537,7 +537,7 @@ SfxStyleSheetBase* SfxStyleSheetIterator::Next()
if ( nIdx != -1 )
{
- nAktPosition = (USHORT)nIdx;
+ nAktPosition = (sal_uInt16)nIdx;
return pAktStyle = pBasePool->aStyles[nIdx].get();
}
return 0;
@@ -546,11 +546,11 @@ SfxStyleSheetBase* SfxStyleSheetIterator::Next()
SfxStyleSheetBase* SfxStyleSheetIterator::Find(const XubString& rStr)
{
- for ( USHORT n = 0; n < pBasePool->aStyles.size(); n++ )
+ for ( sal_uInt16 n = 0; n < pBasePool->aStyles.size(); n++ )
{
SfxStyleSheetBase* pStyle = pBasePool->aStyles[n].get();
- // #98454# performance: in case of bSearchUsed==TRUE it may be
+ // #98454# performance: in case of bSearchUsed==sal_True it may be
// significant to first compare the name and only if it matches to call
// the style sheet IsUsed() method in DoesStyleMatch().
if ( pStyle->GetName().Equals( rStr ) && DoesStyleMatch( pStyle ) )
@@ -563,9 +563,9 @@ SfxStyleSheetBase* SfxStyleSheetIterator::Find(const XubString& rStr)
}
-USHORT SfxStyleSheetIterator::GetSearchMask() const
+sal_uInt16 SfxStyleSheetIterator::GetSearchMask() const
{
- USHORT mask = nMask;
+ sal_uInt16 mask = nMask;
if ( bSearchUsed )
mask |= SFXSTYLEBIT_USED;
@@ -637,7 +637,7 @@ SfxStyleSheetBasePool::~SfxStyleSheetBasePool()
delete pImp;
}
-BOOL SfxStyleSheetBasePool::SetParent(SfxStyleFamily eFam, const XubString& rStyle, const XubString& rParent)
+sal_Bool SfxStyleSheetBasePool::SetParent(SfxStyleFamily eFam, const XubString& rStyle, const XubString& rParent)
{
SfxStyleSheetIterator aIter(this,eFam,SFXSTYLEBIT_ALL);
SfxStyleSheetBase *pStyle =
@@ -646,16 +646,16 @@ BOOL SfxStyleSheetBasePool::SetParent(SfxStyleFamily eFam, const XubString& rSty
if(pStyle)
return pStyle->SetParent(rParent);
else
- return FALSE;
+ return sal_False;
}
-void SfxStyleSheetBasePool::SetSearchMask(SfxStyleFamily eFam, USHORT n)
+void SfxStyleSheetBasePool::SetSearchMask(SfxStyleFamily eFam, sal_uInt16 n)
{
nSearchFamily = eFam; nMask = n;
}
-USHORT SfxStyleSheetBasePool::GetSearchMask() const
+sal_uInt16 SfxStyleSheetBasePool::GetSearchMask() const
{
return nMask;
}
@@ -675,7 +675,7 @@ String SfxStyleSheetBasePool::GetStreamName()
SfxStyleSheetIterator* SfxStyleSheetBasePool::CreateIterator
(
SfxStyleFamily eFam,
- USHORT mask
+ sal_uInt16 mask
)
{
return new SfxStyleSheetIterator(this,eFam,mask);
@@ -686,7 +686,7 @@ SfxStyleSheetBase* SfxStyleSheetBasePool::Create
(
const XubString& rName,
SfxStyleFamily eFam,
- USHORT mask
+ sal_uInt16 mask
)
{
return new SfxStyleSheetBase( rName, *this, eFam, mask );
@@ -697,7 +697,7 @@ SfxStyleSheetBase* SfxStyleSheetBasePool::Create( const SfxStyleSheetBase& r )
return new SfxStyleSheetBase( r );
}
-SfxStyleSheetBase& SfxStyleSheetBasePool::Make( const XubString& rName, SfxStyleFamily eFam, USHORT mask, USHORT nPos)
+SfxStyleSheetBase& SfxStyleSheetBasePool::Make( const XubString& rName, SfxStyleFamily eFam, sal_uInt16 mask, sal_uInt16 nPos)
{
DBG_ASSERT( eFam != SFX_STYLE_FAMILY_ALL, "svl::SfxStyleSheetBasePool::Make(), FamilyAll is not a allowed Familie" );
@@ -765,19 +765,19 @@ SfxStyleSheetBasePool& SfxStyleSheetBasePool::operator+=( const SfxStyleSheetBas
//////////////////////////////// Suchen ////////////////////////////////////
-USHORT SfxStyleSheetBasePool::Count()
+sal_uInt16 SfxStyleSheetBasePool::Count()
{
return GetIterator_Impl().Count();
}
-SfxStyleSheetBase *SfxStyleSheetBasePool::operator[](USHORT nIdx)
+SfxStyleSheetBase *SfxStyleSheetBasePool::operator[](sal_uInt16 nIdx)
{
return GetIterator_Impl()[nIdx];
}
SfxStyleSheetBase* SfxStyleSheetBasePool::Find(const XubString& rName,
SfxStyleFamily eFam,
- USHORT mask)
+ sal_uInt16 mask)
{
SfxStyleSheetIterator aIter(this,eFam,mask);
return aIter.Find(rName);
@@ -866,9 +866,9 @@ void SfxStyleSheetBasePool::Clear()
void SfxStyleSheetBasePool::ChangeParent(const XubString& rOld,
const XubString& rNew,
- BOOL bVirtual)
+ sal_Bool bVirtual)
{
- const USHORT nTmpMask = GetSearchMask();
+ const sal_uInt16 nTmpMask = GetSearchMask();
SetSearchMask(GetSearchFamily(), 0xffff);
for( SfxStyleSheetBase* p = First(); p; p = Next() )
{
@@ -885,7 +885,7 @@ void SfxStyleSheetBasePool::ChangeParent(const XubString& rOld,
/////////////////////////// Laden/Speichern /////////////////////////////////
-void SfxStyleSheetBase::Load( SvStream&, USHORT )
+void SfxStyleSheetBase::Load( SvStream&, sal_uInt16 )
{
}
@@ -894,7 +894,7 @@ void SfxStyleSheetBase::Store( SvStream& )
}
-BOOL SfxStyleSheetBasePool::Load( SvStream& rStream )
+sal_Bool SfxStyleSheetBasePool::Load( SvStream& rStream )
{
// alte Version?
if ( !rPool.IsVer2_Impl() )
@@ -909,7 +909,7 @@ BOOL SfxStyleSheetBasePool::Load( SvStream& rStream )
{
SfxSingleRecordReader aHeaderRec( &rStream, SFX_STYLES_REC_HEADER );
if ( !aHeaderRec.IsValid() )
- return FALSE;
+ return sal_False;
aAppName = rPool.GetName();
rStream >> nCharSet;
@@ -920,15 +920,15 @@ BOOL SfxStyleSheetBasePool::Load( SvStream& rStream )
{
SfxMultiRecordReader aStylesRec( &rStream, SFX_STYLES_REC_STYLES );
if ( !aStylesRec.IsValid() )
- return FALSE;
+ return sal_False;
rtl_TextEncoding eEnc = GetSOLoadTextEncoding(
(rtl_TextEncoding)nCharSet,
- sal::static_int_cast< USHORT >(rStream.GetVersion()) );
+ sal::static_int_cast< sal_uInt16 >(rStream.GetVersion()) );
rtl_TextEncoding eOldEnc = rStream.GetStreamCharSet();
rStream.SetStreamCharSet( eEnc );
- USHORT nStyles;
+ sal_uInt16 nStyles;
for ( nStyles = 0; aStylesRec.GetContent(); nStyles++ )
{
// kann nicht mehr weiterlesen?
@@ -938,7 +938,7 @@ BOOL SfxStyleSheetBasePool::Load( SvStream& rStream )
// Globale Teile
XubString aName, aParent, aFollow;
String aHelpFile;
- USHORT nFamily, nStyleMask,nCount;
+ sal_uInt16 nFamily, nStyleMask,nCount;
sal_uInt32 nHelpId;
rStream.ReadByteString(aName, eEnc );
rStream.ReadByteString(aParent, eEnc );
@@ -952,7 +952,7 @@ BOOL SfxStyleSheetBasePool::Load( SvStream& rStream )
// Hier erst einmal Parent und Follow zwischenspeichern
rSheet.aParent = aParent;
rSheet.aFollow = aFollow;
- UINT32 nPos = rStream.Tell();
+ sal_uInt32 nPos = rStream.Tell();
rStream >> nCount;
if(nCount)
{
@@ -966,8 +966,8 @@ BOOL SfxStyleSheetBasePool::Load( SvStream& rStream )
//! rSet.Put( aTmpSet );
}
// Lokale Teile
- UINT32 nSize;
- USHORT nVer;
+ sal_uInt32 nSize;
+ sal_uInt16 nVer;
rStream >> nVer >> nSize;
nPos = rStream.Tell() + nSize;
rSheet.Load( rStream, nVer );
@@ -975,13 +975,13 @@ BOOL SfxStyleSheetBasePool::Load( SvStream& rStream )
}
// #72939# only loop through the styles that were really inserted
- ULONG n = aStyles.size();
+ sal_uLong n = aStyles.size();
//! delete pTmpPool;
// Jetzt Parent und Follow setzen. Alle Sheets sind geladen.
// Mit Setxxx() noch einmal den String eintragen, da diese
// virtuellen Methoden evtl. ueberlagert sind.
- for ( ULONG i = 0; i < n; i++ )
+ for ( sal_uLong i = 0; i < n; i++ )
{
SfxStyleSheetBase* p = aStyles[ i ].get();
XubString aText = p->aParent;
@@ -996,13 +996,13 @@ BOOL SfxStyleSheetBasePool::Load( SvStream& rStream )
}
// alles klar?
- return BOOL( rStream.GetError() == SVSTREAM_OK );
+ return sal_Bool( rStream.GetError() == SVSTREAM_OK );
}
-BOOL SfxStyleSheetBasePool::Load1_Impl( SvStream& rStream )
+sal_Bool SfxStyleSheetBasePool::Load1_Impl( SvStream& rStream )
{
aAppName = rPool.GetName();
- USHORT nVersion;
+ sal_uInt16 nVersion;
short nCharSet;
rStream >> nVersion;
@@ -1013,13 +1013,13 @@ BOOL SfxStyleSheetBasePool::Load1_Impl( SvStream& rStream )
rtl_TextEncoding eEnc = GetSOLoadTextEncoding(
(rtl_TextEncoding)nCharSet,
- sal::static_int_cast< USHORT >(rStream.GetVersion()) );
+ sal::static_int_cast< sal_uInt16 >(rStream.GetVersion()) );
rtl_TextEncoding eOldEnc = rStream.GetStreamCharSet();
rStream.SetStreamCharSet( eEnc );
- USHORT nStyles;
+ sal_uInt16 nStyles;
rStream >> nStyles;
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < nStyles; i++ )
{
// kann nicht mehr weiterlesen?
@@ -1032,7 +1032,7 @@ BOOL SfxStyleSheetBasePool::Load1_Impl( SvStream& rStream )
// Globale Teile
XubString aName, aParent, aFollow;
String aHelpFile;
- USHORT nFamily, nStyleMask,nCount;
+ sal_uInt16 nFamily, nStyleMask,nCount;
sal_uInt32 nHelpId;
rStream.ReadByteString(aName, eEnc );
rStream.ReadByteString(aParent, eEnc );
@@ -1041,7 +1041,7 @@ BOOL SfxStyleSheetBasePool::Load1_Impl( SvStream& rStream )
SfxPoolItem::readByteString(rStream, aHelpFile);
if(nVersion!=STYLESTREAM_VERSION)
{
- USHORT nTmpHelpId;
+ sal_uInt16 nTmpHelpId;
rStream >> nTmpHelpId;
nHelpId=nTmpHelpId;
}
@@ -1053,7 +1053,7 @@ BOOL SfxStyleSheetBasePool::Load1_Impl( SvStream& rStream )
// Hier erst einmal Parent und Follow zwischenspeichern
rSheet.aParent = aParent;
rSheet.aFollow = aFollow;
- UINT32 nPos = rStream.Tell();
+ sal_uInt32 nPos = rStream.Tell();
rStream >> nCount;
if(nCount) {
rStream.Seek( nPos );
@@ -1066,8 +1066,8 @@ BOOL SfxStyleSheetBasePool::Load1_Impl( SvStream& rStream )
//! rSet.Put( aTmpSet );
}
// Lokale Teile
- UINT32 nSize;
- USHORT nVer;
+ sal_uInt32 nSize;
+ sal_uInt16 nVer;
rStream >> nVer >> nSize;
nPos = rStream.Tell() + nSize;
rSheet.Load( rStream, nVer );
@@ -1091,16 +1091,16 @@ BOOL SfxStyleSheetBasePool::Load1_Impl( SvStream& rStream )
rStream.SetStreamCharSet( eOldEnc );
- return BOOL( rStream.GetError() == SVSTREAM_OK );
+ return sal_Bool( rStream.GetError() == SVSTREAM_OK );
}
-BOOL SfxStyleSheetBasePool::Store( SvStream& rStream, BOOL bUsed )
+sal_Bool SfxStyleSheetBasePool::Store( SvStream& rStream, sal_Bool bUsed )
{
// den ganzen StyleSheet-Pool in einen Mini-Record
SfxMiniRecordWriter aPoolRec( &rStream, SFX_STYLES_REC );
// Erst einmal die Dummies rauszaehlen; die werden nicht gespeichert
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
for( SfxStyleSheetBase* p = First(); p; p = Next() )
{
if(!bUsed || p->IsUsed())
@@ -1111,7 +1111,7 @@ BOOL SfxStyleSheetBasePool::Store( SvStream& rStream, BOOL bUsed )
rtl_TextEncoding eEnc
= ::GetSOStoreTextEncoding(
rStream.GetStreamCharSet(),
- sal::static_int_cast< USHORT >(rStream.GetVersion()) );
+ sal::static_int_cast< sal_uInt16 >(rStream.GetVersion()) );
rtl_TextEncoding eOldEnc = rStream.GetStreamCharSet();
rStream.SetStreamCharSet( eEnc );
@@ -1138,7 +1138,7 @@ BOOL SfxStyleSheetBasePool::Store( SvStream& rStream, BOOL bUsed )
{
if(!bUsed || p->IsUsed())
{
- USHORT nFamily = (USHORT)p->GetFamily();
+ sal_uInt16 nFamily = (sal_uInt16)p->GetFamily();
String* pName = new String( p->GetName() );
ByteString* pConvName = new ByteString( *pName, eEnc );
@@ -1150,7 +1150,7 @@ BOOL SfxStyleSheetBasePool::Store( SvStream& rStream, BOOL bUsed )
pConvName->SetChar(
1, sal::static_int_cast< char >(0xff & nFamily) );
- USHORT nInsPos, nAdd = aSortConvNames.Count();
+ sal_uInt16 nInsPos, nAdd = aSortConvNames.Count();
while( !aSortConvNames.Insert( pConvName, nInsPos ) )
(pConvName->Append( '_' )).Append(
ByteString::CreateFromInt32( nAdd++ ));
@@ -1161,9 +1161,9 @@ BOOL SfxStyleSheetBasePool::Store( SvStream& rStream, BOOL bUsed )
// now we have the list of the names, sorted by convertede names
// But now we need the sorted list of orignames.
{
- USHORT nInsPos, nEnd = aOrigNames.Count();
+ sal_uInt16 nInsPos, nEnd = aOrigNames.Count();
const ByteStringPtr* ppB = aSortConvNames.GetData();
- for( USHORT n = 0; n < nEnd; ++n, ++ppB )
+ for( sal_uInt16 n = 0; n < nEnd; ++n, ++ppB )
{
String* p = aOrigNames.GetObject( n );
aSortOrigNames.Insert( p, nInsPos );
@@ -1175,7 +1175,7 @@ BOOL SfxStyleSheetBasePool::Store( SvStream& rStream, BOOL bUsed )
ByteString sEmpty;
- USHORT nFndPos;
+ sal_uInt16 nFndPos;
String sNm;
SfxMultiVarRecordWriter aStylesRec( &rStream, SFX_STYLES_REC_STYLES, 0 );
for( SfxStyleSheetBase* p = First(); p; p = Next() )
@@ -1187,7 +1187,7 @@ BOOL SfxStyleSheetBasePool::Store( SvStream& rStream, BOOL bUsed )
// Globale Teile speichern
String aHelpFile;
sal_uInt32 nHelpId = p->GetHelpId( aHelpFile );
- USHORT nFamily = sal::static_int_cast< USHORT >(p->GetFamily());
+ sal_uInt16 nFamily = sal::static_int_cast< sal_uInt16 >(p->GetFamily());
String sFamily( (sal_Unicode)nFamily );
(sNm = sFamily) += p->GetName();
@@ -1214,18 +1214,18 @@ BOOL SfxStyleSheetBasePool::Store( SvStream& rStream, BOOL bUsed )
if(p->pSet)
p->pSet->Store( rStream );
else
- rStream << (USHORT)0;
+ rStream << (sal_uInt16)0;
// Lokale Teile speichern
// Vor dem lokalen Teil wird die Laenge der lokalen Daten
- // als UINT32 sowie die Versionsnummer gespeichert.
- rStream << (USHORT) p->GetVersion();
- ULONG nPos1 = rStream.Tell();
- rStream << (UINT32) 0;
+ // als sal_uInt32 sowie die Versionsnummer gespeichert.
+ rStream << (sal_uInt16) p->GetVersion();
+ sal_uLong nPos1 = rStream.Tell();
+ rStream << (sal_uInt32) 0;
p->Store( rStream );
- ULONG nPos2 = rStream.Tell();
+ sal_uLong nPos2 = rStream.Tell();
rStream.Seek( nPos1 );
- rStream << (UINT32) ( nPos2 - nPos1 - sizeof( UINT32 ) );
+ rStream << (sal_uInt32) ( nPos2 - nPos1 - sizeof( sal_uInt32 ) );
rStream.Seek( nPos2 );
if( rStream.GetError() != SVSTREAM_OK )
break;
@@ -1235,7 +1235,7 @@ BOOL SfxStyleSheetBasePool::Store( SvStream& rStream, BOOL bUsed )
rStream.SetStreamCharSet( eOldEnc );
- return BOOL( rStream.GetError() == SVSTREAM_OK );
+ return sal_Bool( rStream.GetError() == SVSTREAM_OK );
}
SfxItemPool& SfxStyleSheetBasePool::GetPool()
@@ -1253,7 +1253,7 @@ const SfxItemPool& SfxStyleSheetBasePool::GetPool() const
SfxStyleSheet::SfxStyleSheet(const XubString &rName,
const SfxStyleSheetBasePool& r_Pool,
SfxStyleFamily eFam,
- USHORT mask ):
+ sal_uInt16 mask ):
SfxStyleSheetBase(rName, const_cast< SfxStyleSheetBasePool& >( r_Pool ), eFam, mask)
{}
@@ -1273,10 +1273,10 @@ SfxStyleSheet::~SfxStyleSheet()
}
-BOOL SfxStyleSheet::SetParent( const XubString& rName )
+sal_Bool SfxStyleSheet::SetParent( const XubString& rName )
{
if(aParent == rName)
- return TRUE;
+ return sal_True;
const XubString aOldParent(aParent);
if(SfxStyleSheetBase::SetParent(rName)) {
// aus der Benachrichtigungskette des alten
@@ -1293,9 +1293,9 @@ BOOL SfxStyleSheet::SetParent( const XubString& rName )
if(pParent)
StartListening(*pParent);
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// alle Zuhoerer benachtichtigen
@@ -1315,7 +1315,7 @@ SfxStyleSheetPool::SfxStyleSheetPool( SfxItemPool const& rSet)
/////////////////////////////////// Factory ////////////////////////////////
SfxStyleSheetBase* SfxStyleSheetPool::Create( const XubString& rName,
- SfxStyleFamily eFam, USHORT mask )
+ SfxStyleFamily eFam, sal_uInt16 mask )
{
return new SfxStyleSheet( rName, *this, eFam, mask );
}
@@ -1325,9 +1325,9 @@ SfxStyleSheetBase* SfxStyleSheetPool::Create( const SfxStyleSheet& r )
return new SfxStyleSheet( r );
}
/*
-BOOL SfxStyleSheetPool::CopyTo(SfxStyleSheetPool &, const String &)
+sal_Bool SfxStyleSheetPool::CopyTo(SfxStyleSheetPool &, const String &)
{
- return FALSE;
+ return sal_False;
}
*/
@@ -1335,7 +1335,7 @@ BOOL SfxStyleSheetPool::CopyTo(SfxStyleSheetPool &, const String &)
// class SfxUnoStyleSheet
// --------------------------------------------------------------------
-SfxUnoStyleSheet::SfxUnoStyleSheet( const UniString& _rName, const SfxStyleSheetBasePool& _rPool, SfxStyleFamily _eFamily, USHORT _nMaske )
+SfxUnoStyleSheet::SfxUnoStyleSheet( const UniString& _rName, const SfxStyleSheetBasePool& _rPool, SfxStyleFamily _eFamily, sal_uInt16 _nMaske )
: ::cppu::ImplInheritanceHelper2< SfxStyleSheet, ::com::sun::star::style::XStyle, ::com::sun::star::lang::XUnoTunnel >( _rName, _rPool, _eFamily, _nMaske )
{
}
diff --git a/svl/source/items/stylepool.cxx b/svl/source/items/stylepool.cxx
index 6d8799967650..8ad8346af075 100644
--- a/svl/source/items/stylepool.cxx
+++ b/svl/source/items/stylepool.cxx
@@ -405,13 +405,13 @@ public:
: maRoot(),
mnCount(0),
mpIgnorableItems( pIgnorableItems != 0
- ? pIgnorableItems->Clone( FALSE )
+ ? pIgnorableItems->Clone( sal_False )
: 0 )
{
DBG_ASSERT( !pIgnorableItems || !pIgnorableItems->Count(),
"<StylePoolImpl::StylePoolImpl(..)> - misusage: item set for ignorable item should be empty. Please correct usage." );
DBG_ASSERT( !mpIgnorableItems || !mpIgnorableItems->Count(),
- "<StylePoolImpl::StylePoolImpl(..)> - <SfxItemSet::Clone( FALSE )> does not work as excepted - <mpIgnorableItems> is not empty. Please inform OD." );
+ "<StylePoolImpl::StylePoolImpl(..)> - <SfxItemSet::Clone( sal_False )> does not work as excepted - <mpIgnorableItems> is not empty. Please inform OD." );
}
~StylePoolImpl()
diff --git a/svl/source/items/szitem.cxx b/svl/source/items/szitem.cxx
index 6c5ab66b8422..161468b1009b 100644
--- a/svl/source/items/szitem.cxx
+++ b/svl/source/items/szitem.cxx
@@ -54,7 +54,7 @@ SfxSizeItem::SfxSizeItem()
// -----------------------------------------------------------------------
-SfxSizeItem::SfxSizeItem( USHORT nW, const Size& rVal ) :
+SfxSizeItem::SfxSizeItem( sal_uInt16 nW, const Size& rVal ) :
SfxPoolItem( nW ),
aVal( rVal )
{
@@ -63,7 +63,7 @@ SfxSizeItem::SfxSizeItem( USHORT nW, const Size& rVal ) :
// -----------------------------------------------------------------------
-SfxSizeItem::SfxSizeItem( USHORT nW, SvStream &rStream ) :
+SfxSizeItem::SfxSizeItem( sal_uInt16 nW, SvStream &rStream ) :
SfxPoolItem( nW )
{
DBG_CTOR(SfxSizeItem, 0);
@@ -117,7 +117,7 @@ SfxPoolItem* SfxSizeItem::Clone(SfxItemPool *) const
// -----------------------------------------------------------------------
-SfxPoolItem* SfxSizeItem::Create(SvStream &rStream, USHORT ) const
+SfxPoolItem* SfxSizeItem::Create(SvStream &rStream, sal_uInt16 ) const
{
DBG_CHKTHIS(SfxSizeItem, 0);
Size aStr;
@@ -127,7 +127,7 @@ SfxPoolItem* SfxSizeItem::Create(SvStream &rStream, USHORT ) const
// -----------------------------------------------------------------------
-SvStream& SfxSizeItem::Store(SvStream &rStream, USHORT ) const
+SvStream& SfxSizeItem::Store(SvStream &rStream, sal_uInt16 ) const
{
DBG_CHKTHIS(SfxSizeItem, 0);
rStream << aVal;
@@ -135,8 +135,8 @@ SvStream& SfxSizeItem::Store(SvStream &rStream, USHORT ) const
}
// -----------------------------------------------------------------------
-BOOL SfxSizeItem::QueryValue( com::sun::star::uno::Any& rVal,
- BYTE nMemberId ) const
+sal_Bool SfxSizeItem::QueryValue( com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId ) const
{
sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
@@ -159,20 +159,20 @@ BOOL SfxSizeItem::QueryValue( com::sun::star::uno::Any& rVal,
rVal <<= aTmp.getWidth(); break;
case MID_HEIGHT:
rVal <<= aTmp.getHeight(); break;
- default: DBG_ERROR("Wrong MemberId!"); return FALSE;
+ default: DBG_ERROR("Wrong MemberId!"); return sal_False;
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL SfxSizeItem::PutValue( const com::sun::star::uno::Any& rVal,
- BYTE nMemberId )
+sal_Bool SfxSizeItem::PutValue( const com::sun::star::uno::Any& rVal,
+ sal_uInt8 nMemberId )
{
sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
com::sun::star::awt::Size aValue;
sal_Int32 nVal = 0;
if ( !nMemberId )
diff --git a/svl/source/items/visitem.cxx b/svl/source/items/visitem.cxx
index 94fdf167496e..81726f017f3a 100644
--- a/svl/source/items/visitem.cxx
+++ b/svl/source/items/visitem.cxx
@@ -43,7 +43,7 @@ DBG_NAME(SfxVisibilityItem)
TYPEINIT1_AUTOFACTORY(SfxVisibilityItem, SfxPoolItem);
//============================================================================
-SfxVisibilityItem::SfxVisibilityItem(USHORT which, SvStream & rStream):
+SfxVisibilityItem::SfxVisibilityItem(sal_uInt16 which, SvStream & rStream):
SfxPoolItem(which)
{
DBG_CTOR(SfxVisibilityItem, 0);
@@ -85,26 +85,26 @@ SfxItemPresentation SfxVisibilityItem::GetPresentation(SfxItemPresentation,
//============================================================================
// virtual
-BOOL SfxVisibilityItem::QueryValue(com::sun::star::uno::Any& rVal,BYTE) const
+sal_Bool SfxVisibilityItem::QueryValue(com::sun::star::uno::Any& rVal,sal_uInt8) const
{
rVal <<= m_nValue;
- return TRUE;
+ return sal_True;
}
//============================================================================
// virtual
-BOOL SfxVisibilityItem::PutValue(const com::sun::star::uno::Any& rVal,BYTE)
+sal_Bool SfxVisibilityItem::PutValue(const com::sun::star::uno::Any& rVal,sal_uInt8)
{
if (rVal >>= m_nValue)
- return TRUE;
+ return sal_True;
DBG_ERROR( "SfxInt16Item::PutValue - Wrong type!" );
- return FALSE;
+ return sal_False;
}
//============================================================================
// virtual
-SfxPoolItem * SfxVisibilityItem::Create(SvStream & rStream, USHORT) const
+SfxPoolItem * SfxVisibilityItem::Create(SvStream & rStream, sal_uInt16) const
{
DBG_CHKTHIS(SfxVisibilityItem, 0);
return new SfxVisibilityItem(Which(), rStream);
@@ -112,7 +112,7 @@ SfxPoolItem * SfxVisibilityItem::Create(SvStream & rStream, USHORT) const
//============================================================================
// virtual
-SvStream & SfxVisibilityItem::Store(SvStream & rStream, USHORT) const
+SvStream & SfxVisibilityItem::Store(SvStream & rStream, sal_uInt16) const
{
DBG_CHKTHIS(SfxVisibilityItem, 0);
rStream << m_nValue.bVisible;
@@ -129,17 +129,17 @@ SfxPoolItem * SfxVisibilityItem::Clone(SfxItemPool *) const
//============================================================================
// virtual
-USHORT SfxVisibilityItem::GetValueCount() const
+sal_uInt16 SfxVisibilityItem::GetValueCount() const
{
return 2;
}
//============================================================================
// virtual
-UniString SfxVisibilityItem::GetValueTextByVal(BOOL bTheValue) const
+UniString SfxVisibilityItem::GetValueTextByVal(sal_Bool bTheValue) const
{
return
bTheValue ?
- UniString::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("TRUE")) :
- UniString::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("FALSE"));
+ UniString::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("sal_True")) :
+ UniString::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("sal_False"));
}
diff --git a/svl/source/items/whiter.cxx b/svl/source/items/whiter.cxx
index b50d9bc32a79..17e0e18115bb 100644
--- a/svl/source/items/whiter.cxx
+++ b/svl/source/items/whiter.cxx
@@ -36,7 +36,7 @@ DBG_NAME(SfxWhichIter)
// -----------------------------------------------------------------------
-SfxWhichIter::SfxWhichIter( const SfxItemSet& rSet, USHORT nFromWh, USHORT nToWh ):
+SfxWhichIter::SfxWhichIter( const SfxItemSet& rSet, sal_uInt16 nFromWh, sal_uInt16 nToWh ):
pRanges(rSet.GetRanges()),
pStart(rSet.GetRanges()),
nOfst(0), nFrom(nFromWh), nTo(nToWh)
@@ -55,19 +55,19 @@ SfxWhichIter::~SfxWhichIter()
// -----------------------------------------------------------------------
-USHORT SfxWhichIter::NextWhich()
+sal_uInt16 SfxWhichIter::NextWhich()
{
DBG_CHKTHIS(SfxWhichIter, 0);
while ( 0 != *pRanges )
{
- const USHORT nLastWhich = *pRanges + nOfst;
+ const sal_uInt16 nLastWhich = *pRanges + nOfst;
++nOfst;
if (*(pRanges+1) == nLastWhich)
{
pRanges += 2;
nOfst = 0;
}
- USHORT nWhich = *pRanges + nOfst;
+ sal_uInt16 nWhich = *pRanges + nOfst;
if ( 0 == nWhich || ( nWhich >= nFrom && nWhich <= nTo ) )
return nWhich;
}
@@ -76,7 +76,7 @@ USHORT SfxWhichIter::NextWhich()
// -----------------------------------------------------------------------
-USHORT SfxWhichIter::PrevWhich()
+sal_uInt16 SfxWhichIter::PrevWhich()
{
DBG_CHKTHIS(SfxWhichIter, 0);
while ( pRanges != pStart || 0 != nOfst )
@@ -87,7 +87,7 @@ USHORT SfxWhichIter::PrevWhich()
pRanges -= 2;
nOfst = *(pRanges+1) - (*pRanges);
}
- USHORT nWhich = *pRanges + nOfst;
+ sal_uInt16 nWhich = *pRanges + nOfst;
if ( nWhich >= nFrom && nWhich <= nTo )
return nWhich;
}
@@ -96,7 +96,7 @@ USHORT SfxWhichIter::PrevWhich()
// -----------------------------------------------------------------------
-USHORT SfxWhichIter::FirstWhich()
+sal_uInt16 SfxWhichIter::FirstWhich()
{
DBG_CHKTHIS(SfxWhichIter, 0);
pRanges = pStart;
@@ -108,13 +108,13 @@ USHORT SfxWhichIter::FirstWhich()
// -----------------------------------------------------------------------
-USHORT SfxWhichIter::LastWhich()
+sal_uInt16 SfxWhichIter::LastWhich()
{
DBG_CHKTHIS(SfxWhichIter, 0);
while(*pRanges)
++pRanges;
nOfst = 0;
- USHORT nWhich = *(pRanges-1);
+ sal_uInt16 nWhich = *(pRanges-1);
if ( nWhich >= nFrom && nWhich <= nTo )
return nWhich;
return PrevWhich();
diff --git a/svl/source/memtools/svarray.cxx b/svl/source/memtools/svarray.cxx
index 622533dceae2..f8b190d0cb4c 100644
--- a/svl/source/memtools/svarray.cxx
+++ b/svl/source/memtools/svarray.cxx
@@ -62,17 +62,17 @@
SV_IMPL_VARARR(SvPtrarr,VoidPtr)
-USHORT SvPtrarr::GetPos( const VoidPtr& aElement ) const
-{ USHORT n;
+sal_uInt16 SvPtrarr::GetPos( const VoidPtr& aElement ) const
+{ sal_uInt16 n;
for( n=0; n < nA && *(GetData()+n) != aElement; ) n++;
return ( n >= nA ? USHRT_MAX : n );
}
-SV_IMPL_VARARR( SvULongs, ULONG )
-SV_IMPL_VARARR( SvUShorts, USHORT )
+SV_IMPL_VARARR( SvULongs, sal_uLong )
+SV_IMPL_VARARR( SvUShorts, sal_uInt16 )
SV_IMPL_VARARR( SvLongs, long)
-SV_IMPL_VARARR_SORT( SvULongsSort, ULONG )
+SV_IMPL_VARARR_SORT( SvULongsSort, sal_uLong )
SV_IMPL_VARARR_SORT( SvLongsSort, long )
SV_IMPL_PTRARR( SvStrings, StringPtr )
@@ -91,19 +91,19 @@ SV_IMPL_OP_PTRARR_SORT( SvByteStringsSortDtor, ByteStringPtr )
// Array mit anderer Seek-Methode!
_SV_IMPL_SORTAR_ALG( SvStringsISort, StringPtr )
-void SvStringsISort::DeleteAndDestroy( USHORT nP, USHORT nL )
+void SvStringsISort::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL )
{
if( nL )
{
DBG_ASSERT( nP < nA && nP + nL <= nA, "ERR_VAR_DEL" );
- for( USHORT n=nP; n < nP + nL; n++ )
+ for( sal_uInt16 n=nP; n < nP + nL; n++ )
delete *((StringPtr*)pData+n);
SvPtrarr::Remove( nP, nL );
}
}
-BOOL SvStringsISort::Seek_Entry( const StringPtr aE, USHORT* pP ) const
+sal_Bool SvStringsISort::Seek_Entry( const StringPtr aE, sal_uInt16* pP ) const
{
- register USHORT nO = SvStringsISort_SAR::Count(),
+ register sal_uInt16 nO = SvStringsISort_SAR::Count(),
nM,
nU = 0;
if( nO > 0 )
@@ -117,40 +117,40 @@ BOOL SvStringsISort::Seek_Entry( const StringPtr aE, USHORT* pP ) const
if( COMPARE_EQUAL == eCmp )
{
if( pP ) *pP = nM;
- return TRUE;
+ return sal_True;
}
else if( COMPARE_LESS == eCmp )
nU = nM + 1;
else if( nM == 0 )
{
if( pP ) *pP = nU;
- return FALSE;
+ return sal_False;
}
else
nO = nM - 1;
}
}
if( pP ) *pP = nU;
- return FALSE;
+ return sal_False;
}
// ---------------- strings -------------------------------------
// Array mit anderer Seek-Methode!
_SV_IMPL_SORTAR_ALG( SvStringsISortDtor, StringPtr )
-void SvStringsISortDtor::DeleteAndDestroy( USHORT nP, USHORT nL )
+void SvStringsISortDtor::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL )
{
if( nL )
{
DBG_ASSERT( nP < nA && nP + nL <= nA, "ERR_VAR_DEL" );
- for( USHORT n=nP; n < nP + nL; n++ )
+ for( sal_uInt16 n=nP; n < nP + nL; n++ )
delete *((StringPtr*)pData+n);
SvPtrarr::Remove( nP, nL );
}
}
-BOOL SvStringsISortDtor::Seek_Entry( const StringPtr aE, USHORT* pP ) const
+sal_Bool SvStringsISortDtor::Seek_Entry( const StringPtr aE, sal_uInt16* pP ) const
{
- register USHORT nO = SvStringsISortDtor_SAR::Count(),
+ register sal_uInt16 nO = SvStringsISortDtor_SAR::Count(),
nM,
nU = 0;
if( nO > 0 )
@@ -164,29 +164,29 @@ BOOL SvStringsISortDtor::Seek_Entry( const StringPtr aE, USHORT* pP ) const
if( COMPARE_EQUAL == eCmp )
{
if( pP ) *pP = nM;
- return TRUE;
+ return sal_True;
}
else if( COMPARE_LESS == eCmp )
nU = nM + 1;
else if( nM == 0 )
{
if( pP ) *pP = nU;
- return FALSE;
+ return sal_False;
}
else
nO = nM - 1;
}
}
if( pP ) *pP = nU;
- return FALSE;
+ return sal_False;
}
// ---------------- Ushorts -------------------------------------
/* SortArray fuer UShorts */
-BOOL SvUShortsSort::Seek_Entry( const USHORT aE, USHORT* pP ) const
+sal_Bool SvUShortsSort::Seek_Entry( const sal_uInt16 aE, sal_uInt16* pP ) const
{
- register USHORT nO = SvUShorts::Count(),
+ register sal_uInt16 nO = SvUShorts::Count(),
nM,
nU = 0;
if( nO > 0 )
@@ -198,29 +198,29 @@ BOOL SvUShortsSort::Seek_Entry( const USHORT aE, USHORT* pP ) const
if( *(pData + nM) == aE )
{
if( pP ) *pP = nM;
- return TRUE;
+ return sal_True;
}
else if( *(pData + nM) < aE )
nU = nM + 1;
else if( nM == 0 )
{
if( pP ) *pP = nU;
- return FALSE;
+ return sal_False;
}
else
nO = nM - 1;
}
}
if( pP ) *pP = nU;
- return FALSE;
+ return sal_False;
}
-void SvUShortsSort::Insert( const SvUShortsSort * pI, USHORT nS, USHORT nE )
+void SvUShortsSort::Insert( const SvUShortsSort * pI, sal_uInt16 nS, sal_uInt16 nE )
{
if( USHRT_MAX == nE )
nE = pI->Count();
- USHORT nP;
- const USHORT * pIArr = pI->GetData();
+ sal_uInt16 nP;
+ const sal_uInt16 * pIArr = pI->GetData();
for( ; nS < nE; ++nS )
{
if( ! Seek_Entry( *(pIArr+nS), &nP) )
@@ -233,42 +233,42 @@ void SvUShortsSort::Insert( const SvUShortsSort * pI, USHORT nS, USHORT nE )
}
}
-BOOL SvUShortsSort::Insert( const USHORT aE )
+sal_Bool SvUShortsSort::Insert( const sal_uInt16 aE )
{
- USHORT nP;
- BOOL bExist = Seek_Entry( aE, &nP );
+ sal_uInt16 nP;
+ sal_Bool bExist = Seek_Entry( aE, &nP );
if( !bExist )
SvUShorts::Insert( aE, nP );
return !bExist;
}
-BOOL SvUShortsSort::Insert( const USHORT aE, USHORT& rP )
+sal_Bool SvUShortsSort::Insert( const sal_uInt16 aE, sal_uInt16& rP )
{
- BOOL bExist = Seek_Entry( aE, &rP );
+ sal_Bool bExist = Seek_Entry( aE, &rP );
if( !bExist )
SvUShorts::Insert( aE, rP );
return !bExist;
}
-void SvUShortsSort::Insert( const USHORT* pE, USHORT nL)
+void SvUShortsSort::Insert( const sal_uInt16* pE, sal_uInt16 nL)
{
- USHORT nP;
- for( USHORT n = 0; n < nL; ++n )
+ sal_uInt16 nP;
+ for( sal_uInt16 n = 0; n < nL; ++n )
if( ! Seek_Entry( *(pE+n), &nP ))
SvUShorts::Insert( *(pE+n), nP );
}
// remove ab Pos
-void SvUShortsSort::RemoveAt( const USHORT nP, USHORT nL )
+void SvUShortsSort::RemoveAt( const sal_uInt16 nP, sal_uInt16 nL )
{
if( nL )
SvUShorts::Remove( nP, nL);
}
// remove ab dem Eintrag
-void SvUShortsSort::Remove( const USHORT aE, USHORT nL )
+void SvUShortsSort::Remove( const sal_uInt16 aE, sal_uInt16 nL )
{
- USHORT nP;
+ sal_uInt16 nP;
if( nL && Seek_Entry( aE, &nP ) )
SvUShorts::Remove( nP, nL);
}
@@ -277,19 +277,19 @@ void SvUShortsSort::Remove( const USHORT aE, USHORT nL )
// Array mit anderer Seek-Methode!
_SV_IMPL_SORTAR_ALG( SvByteStringsISort, ByteStringPtr )
-void SvByteStringsISort::DeleteAndDestroy( USHORT nP, USHORT nL )
+void SvByteStringsISort::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL )
{
if( nL )
{
DBG_ASSERT( nP < nA && nP + nL <= nA, "ERR_VAR_DEL" );
- for( USHORT n=nP; n < nP + nL; n++ )
+ for( sal_uInt16 n=nP; n < nP + nL; n++ )
delete *((ByteStringPtr*)pData+n);
SvPtrarr::Remove( nP, nL );
}
}
-BOOL SvByteStringsISort::Seek_Entry( const ByteStringPtr aE, USHORT* pP ) const
+sal_Bool SvByteStringsISort::Seek_Entry( const ByteStringPtr aE, sal_uInt16* pP ) const
{
- register USHORT nO = SvByteStringsISort_SAR::Count(),
+ register sal_uInt16 nO = SvByteStringsISort_SAR::Count(),
nM,
nU = 0;
if( nO > 0 )
@@ -303,39 +303,39 @@ BOOL SvByteStringsISort::Seek_Entry( const ByteStringPtr aE, USHORT* pP ) const
if( COMPARE_EQUAL == eCmp )
{
if( pP ) *pP = nM;
- return TRUE;
+ return sal_True;
}
else if( COMPARE_LESS == eCmp )
nU = nM + 1;
else if( nM == 0 )
{
if( pP ) *pP = nU;
- return FALSE;
+ return sal_False;
}
else
nO = nM - 1;
}
}
if( pP ) *pP = nU;
- return FALSE;
+ return sal_False;
}
// Array mit anderer Seek-Methode!
_SV_IMPL_SORTAR_ALG( SvByteStringsISortDtor, ByteStringPtr )
-void SvByteStringsISortDtor::DeleteAndDestroy( USHORT nP, USHORT nL )
+void SvByteStringsISortDtor::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL )
{
if( nL )
{
DBG_ASSERT( nP < nA && nP + nL <= nA, "ERR_VAR_DEL" );
- for( USHORT n=nP; n < nP + nL; n++ )
+ for( sal_uInt16 n=nP; n < nP + nL; n++ )
delete *((ByteStringPtr*)pData+n);
SvPtrarr::Remove( nP, nL );
}
}
-BOOL SvByteStringsISortDtor::Seek_Entry( const ByteStringPtr aE, USHORT* pP ) const
+sal_Bool SvByteStringsISortDtor::Seek_Entry( const ByteStringPtr aE, sal_uInt16* pP ) const
{
- register USHORT nO = SvByteStringsISortDtor_SAR::Count(),
+ register sal_uInt16 nO = SvByteStringsISortDtor_SAR::Count(),
nM,
nU = 0;
if( nO > 0 )
@@ -349,20 +349,20 @@ BOOL SvByteStringsISortDtor::Seek_Entry( const ByteStringPtr aE, USHORT* pP ) co
if( COMPARE_EQUAL == eCmp )
{
if( pP ) *pP = nM;
- return TRUE;
+ return sal_True;
}
else if( COMPARE_LESS == eCmp )
nU = nM + 1;
else if( nM == 0 )
{
if( pP ) *pP = nU;
- return FALSE;
+ return sal_False;
}
else
nO = nM - 1;
}
}
if( pP ) *pP = nU;
- return FALSE;
+ return sal_False;
}
diff --git a/svl/source/misc/adrparse.cxx b/svl/source/misc/adrparse.cxx
index 1a349e47d9bf..e21037e0217f 100644
--- a/svl/source/misc/adrparse.cxx
+++ b/svl/source/misc/adrparse.cxx
@@ -774,7 +774,7 @@ SvAddressParser::SvAddressParser(UniString const & rInput): m_bHasFirst(false)
//============================================================================
SvAddressParser::~SvAddressParser()
{
- for (ULONG i = m_aRest.Count(); i != 0;)
+ for (sal_uLong i = m_aRest.Count(); i != 0;)
delete m_aRest.Remove(--i);
}
diff --git a/svl/source/misc/fstathelper.cxx b/svl/source/misc/fstathelper.cxx
index f39093f2e311..b90df8fb6f7e 100644
--- a/svl/source/misc/fstathelper.cxx
+++ b/svl/source/misc/fstathelper.cxx
@@ -42,7 +42,7 @@ using namespace ::rtl;
sal_Bool FStatHelper::GetModifiedDateTimeOfFile( const UniString& rURL,
Date* pDate, Time* pTime )
{
- sal_Bool bRet = FALSE;
+ sal_Bool bRet = sal_False;
try
{
::ucbhelper::Content aTestContent( rURL,
@@ -69,7 +69,7 @@ sal_Bool FStatHelper::GetModifiedDateTimeOfFile( const UniString& rURL,
sal_Bool FStatHelper::IsDocument( const UniString& rURL )
{
- BOOL bExist = FALSE;
+ sal_Bool bExist = sal_False;
try
{
::ucbhelper::Content aTestContent( rURL,
@@ -84,7 +84,7 @@ sal_Bool FStatHelper::IsDocument( const UniString& rURL )
sal_Bool FStatHelper::IsFolder( const UniString& rURL )
{
- BOOL bExist = FALSE;
+ sal_Bool bExist = sal_False;
try
{
::ucbhelper::Content aTestContent( rURL,
diff --git a/svl/source/misc/inethist.cxx b/svl/source/misc/inethist.cxx
index 28986aca1194..6e637f1b35a5 100644
--- a/svl/source/misc/inethist.cxx
+++ b/svl/source/misc/inethist.cxx
@@ -71,9 +71,9 @@ class INetURLHistory_Impl
{
/** Representation.
*/
- UINT32 m_nMagic;
- UINT16 m_nNext;
- UINT16 m_nMBZ;
+ sal_uInt32 m_nMagic;
+ sal_uInt16 m_nNext;
+ sal_uInt16 m_nMBZ;
/** Initialization.
*/
@@ -91,13 +91,13 @@ class INetURLHistory_Impl
{
/** Representation.
*/
- UINT32 m_nHash;
- UINT16 m_nLru;
- UINT16 m_nMBZ;
+ sal_uInt32 m_nHash;
+ sal_uInt16 m_nLru;
+ sal_uInt16 m_nMBZ;
/** Initialization.
*/
- void initialize (UINT16 nLru, UINT32 nHash = 0)
+ void initialize (sal_uInt16 nLru, sal_uInt32 nHash = 0)
{
m_nHash = nHash;
m_nLru = nLru;
@@ -106,20 +106,20 @@ class INetURLHistory_Impl
/** Comparison.
*/
- BOOL operator== (const hash_entry &rOther) const
+ sal_Bool operator== (const hash_entry &rOther) const
{
return (m_nHash == rOther.m_nHash);
}
- BOOL operator< (const hash_entry &rOther) const
+ sal_Bool operator< (const hash_entry &rOther) const
{
return (m_nHash < rOther.m_nHash);
}
- BOOL operator== (UINT32 nHash) const
+ sal_Bool operator== (sal_uInt32 nHash) const
{
return (m_nHash == nHash);
}
- BOOL operator< (UINT32 nHash) const
+ sal_Bool operator< (sal_uInt32 nHash) const
{
return (m_nHash < nHash);
}
@@ -131,13 +131,13 @@ class INetURLHistory_Impl
{
/** Representation.
*/
- UINT32 m_nHash;
- UINT16 m_nNext;
- UINT16 m_nPrev;
+ sal_uInt32 m_nHash;
+ sal_uInt16 m_nNext;
+ sal_uInt16 m_nPrev;
/** Initialization.
*/
- void initialize (UINT16 nThis, UINT32 nHash = 0)
+ void initialize (sal_uInt16 nThis, sal_uInt32 nHash = 0)
{
m_nHash = nHash;
m_nNext = nThis;
@@ -155,34 +155,34 @@ class INetURLHistory_Impl
*/
void initialize (void);
- void downheap (hash_entry a[], UINT16 n, UINT16 k);
- void heapsort (hash_entry a[], UINT16 n);
+ void downheap (hash_entry a[], sal_uInt16 n, sal_uInt16 k);
+ void heapsort (hash_entry a[], sal_uInt16 n);
/** capacity.
*/
- UINT16 capacity (void) const
+ sal_uInt16 capacity (void) const
{
- return (UINT16)(INETHIST_SIZE_LIMIT);
+ return (sal_uInt16)(INETHIST_SIZE_LIMIT);
}
/** crc32.
*/
- UINT32 crc32 (UniString const & rData) const
+ sal_uInt32 crc32 (UniString const & rData) const
{
return rtl_crc32 (0, rData.GetBuffer(), rData.Len() * sizeof(sal_Unicode));
}
/** find.
*/
- UINT16 find (UINT32 nHash) const;
+ sal_uInt16 find (sal_uInt32 nHash) const;
/** move.
*/
- void move (UINT16 nSI, UINT16 nDI);
+ void move (sal_uInt16 nSI, sal_uInt16 nDI);
/** backlink.
*/
- void backlink (UINT16 nThis, UINT16 nTail)
+ void backlink (sal_uInt16 nThis, sal_uInt16 nTail)
{
register lru_entry &rThis = m_pList[nThis];
register lru_entry &rTail = m_pList[nTail];
@@ -195,7 +195,7 @@ class INetURLHistory_Impl
/** unlink.
*/
- void unlink (UINT16 nThis)
+ void unlink (sal_uInt16 nThis)
{
register lru_entry &rThis = m_pList[nThis];
@@ -217,7 +217,7 @@ public:
/** putUrl/queryUrl.
*/
void putUrl (const String &rUrl);
- BOOL queryUrl (const String &rUrl);
+ sal_Bool queryUrl (const String &rUrl);
};
/*========================================================================
@@ -247,7 +247,7 @@ void INetURLHistory_Impl::initialize (void)
{
m_aHead.initialize();
- USHORT i, n = capacity();
+ sal_uInt16 i, n = capacity();
for (i = 0; i < n; i++)
m_pHash[i].initialize(i);
for (i = 0; i < n; i++)
@@ -259,12 +259,12 @@ void INetURLHistory_Impl::initialize (void)
/*
* downheap.
*/
-void INetURLHistory_Impl::downheap (hash_entry a[], UINT16 n, UINT16 k)
+void INetURLHistory_Impl::downheap (hash_entry a[], sal_uInt16 n, sal_uInt16 k)
{
hash_entry h = a[k];
while (k < n / 2)
{
- UINT16 i = k + k + 1;
+ sal_uInt16 i = k + k + 1;
if (((i + 1) < n) && (a[i] < a[i + 1])) i++;
if (!(h < a[i])) break;
a[k] = a[i];
@@ -276,11 +276,11 @@ void INetURLHistory_Impl::downheap (hash_entry a[], UINT16 n, UINT16 k)
/*
* heapsort.
*/
-void INetURLHistory_Impl::heapsort (hash_entry a[], UINT16 n)
+void INetURLHistory_Impl::heapsort (hash_entry a[], sal_uInt16 n)
{
hash_entry h;
- for (UINT16 k = (n - 1) / 2 + 1; k > 0; k--)
+ for (sal_uInt16 k = (n - 1) / 2 + 1; k > 0; k--)
downheap (a, n, k - 1);
while (n > 0)
@@ -295,15 +295,15 @@ void INetURLHistory_Impl::heapsort (hash_entry a[], UINT16 n)
/*
* find.
*/
-UINT16 INetURLHistory_Impl::find (UINT32 nHash) const
+sal_uInt16 INetURLHistory_Impl::find (sal_uInt32 nHash) const
{
- UINT16 l = 0;
- UINT16 r = capacity() - 1;
- UINT16 c = capacity();
+ sal_uInt16 l = 0;
+ sal_uInt16 r = capacity() - 1;
+ sal_uInt16 c = capacity();
while ((l < r) && (r < c))
{
- UINT16 m = (l + r) / 2;
+ sal_uInt16 m = (l + r) / 2;
if (m_pHash[m] == nHash)
return m;
@@ -318,7 +318,7 @@ UINT16 INetURLHistory_Impl::find (UINT32 nHash) const
/*
* move.
*/
-void INetURLHistory_Impl::move (UINT16 nSI, UINT16 nDI)
+void INetURLHistory_Impl::move (sal_uInt16 nSI, sal_uInt16 nDI)
{
hash_entry e = m_pHash[nSI];
if (nSI < nDI)
@@ -345,12 +345,12 @@ void INetURLHistory_Impl::move (UINT16 nSI, UINT16 nDI)
*/
void INetURLHistory_Impl::putUrl (const String &rUrl)
{
- UINT32 h = crc32 (rUrl);
- UINT16 k = find (h);
+ sal_uInt32 h = crc32 (rUrl);
+ sal_uInt16 k = find (h);
if ((k < capacity()) && (m_pHash[k] == h))
{
// Cache hit.
- UINT16 nMRU = m_pHash[k].m_nLru;
+ sal_uInt16 nMRU = m_pHash[k].m_nLru;
if (nMRU != m_aHead.m_nNext)
{
// Update LRU chain.
@@ -364,9 +364,9 @@ void INetURLHistory_Impl::putUrl (const String &rUrl)
else
{
// Cache miss. Obtain least recently used.
- UINT16 nLRU = m_pList[m_aHead.m_nNext].m_nPrev;
+ sal_uInt16 nLRU = m_pList[m_aHead.m_nNext].m_nPrev;
- UINT16 nSI = find (m_pList[nLRU].m_nHash);
+ sal_uInt16 nSI = find (m_pList[nLRU].m_nHash);
if (!(nLRU == m_pHash[nSI].m_nLru))
{
// Update LRU chain.
@@ -379,7 +379,7 @@ void INetURLHistory_Impl::putUrl (const String &rUrl)
m_aHead.m_nNext = m_pList[m_aHead.m_nNext].m_nPrev;
// Check source and destination.
- UINT16 nDI = std::min (k, UINT16(capacity() - 1));
+ sal_uInt16 nDI = std::min (k, sal_uInt16(capacity() - 1));
if (nSI < nDI)
{
if (!(m_pHash[nDI] < h))
@@ -400,19 +400,19 @@ void INetURLHistory_Impl::putUrl (const String &rUrl)
/*
* queryUrl.
*/
-BOOL INetURLHistory_Impl::queryUrl (const String &rUrl)
+sal_Bool INetURLHistory_Impl::queryUrl (const String &rUrl)
{
- UINT32 h = crc32 (rUrl);
- UINT16 k = find (h);
+ sal_uInt32 h = crc32 (rUrl);
+ sal_uInt16 k = find (h);
if ((k < capacity()) && (m_pHash[k] == h))
{
// Cache hit.
- return TRUE;
+ return sal_True;
}
else
{
// Cache miss.
- return FALSE;
+ return sal_False;
}
}
@@ -526,7 +526,7 @@ void INetURLHistory::PutUrl_Impl (const INetURLObject &rUrl)
/*
* QueryUrl_Impl.
*/
-BOOL INetURLHistory::QueryUrl_Impl (const INetURLObject &rUrl)
+sal_Bool INetURLHistory::QueryUrl_Impl (const INetURLObject &rUrl)
{
DBG_ASSERT (m_pImpl, "QueryUrl_Impl(): no Implementation");
if (m_pImpl)
@@ -536,7 +536,7 @@ BOOL INetURLHistory::QueryUrl_Impl (const INetURLObject &rUrl)
return m_pImpl->queryUrl (aHistUrl.GetMainURL(INetURLObject::NO_DECODE));
}
- return FALSE;
+ return sal_False;
}
diff --git a/svl/source/misc/inettype.cxx b/svl/source/misc/inettype.cxx
index 0b9efdf22afd..86d60bd971ad 100644
--- a/svl/source/misc/inettype.cxx
+++ b/svl/source/misc/inettype.cxx
@@ -337,7 +337,7 @@ MediaTypeEntry const aStaticTypeNameMap[CONTENT_TYPE_LAST + 1]
//============================================================================
/** A mapping from type IDs to presentation resource IDs. Sorted by type ID.
*/
-USHORT const aStaticResourceIDMap[CONTENT_TYPE_LAST + 1]
+sal_uInt16 const aStaticResourceIDMap[CONTENT_TYPE_LAST + 1]
= { STR_SVT_MIMETYPE_APP_OCTSTREAM, // CONTENT_TYPE_UNKNOWN
STR_SVT_MIMETYPE_APP_OCTSTREAM, // CONTENT_TYPE_APP_OCTSTREAM
STR_SVT_MIMETYPE_APP_PDF, // CONTENT_TYPE_APP_PDF
@@ -633,19 +633,19 @@ Registration * Registration::m_pRegistration = 0;
//============================================================================
Registration::~Registration()
{
- {for (ULONG i = 0; i < m_aTypeIDMap.Count(); ++i)
+ {for (sal_uLong i = 0; i < m_aTypeIDMap.Count(); ++i)
delete static_cast< TypeIDMapEntry * >(m_aTypeIDMap.GetObject(i));
}
m_aTypeIDMap.Clear();
- {for (USHORT i = 0; i < m_aTypeNameMap.Count(); ++i)
+ {for (sal_uInt16 i = 0; i < m_aTypeNameMap.Count(); ++i)
delete static_cast< TypeNameMapEntry * >(m_aTypeNameMap.GetObject(i));
}
- m_aTypeNameMap.Remove(USHORT(0), m_aTypeNameMap.Count());
- {for (USHORT i = 0; i < m_aExtensionMap.Count(); ++i)
+ m_aTypeNameMap.Remove(sal_uInt16(0), m_aTypeNameMap.Count());
+ {for (sal_uInt16 i = 0; i < m_aExtensionMap.Count(); ++i)
delete
static_cast< ExtensionMapEntry * >(m_aExtensionMap.GetObject(i));
}
- m_aExtensionMap.Remove(USHORT(0), m_aExtensionMap.Count());
+ m_aExtensionMap.Remove(sal_uInt16(0), m_aExtensionMap.Count());
}
//============================================================================
@@ -657,7 +657,7 @@ TypeNameMapEntry * Registration::getExtensionEntry(UniString const &
{
UniString aTheTypeName = rTypeName;
aTheTypeName.ToLowerAscii();
- USHORT nPos;
+ sal_uInt16 nPos;
if (m_pRegistration->m_aTypeNameMap.Seek_Entry(&aTheTypeName, &nPos))
return static_cast< TypeNameMapEntry * >(m_pRegistration->
m_aTypeNameMap.
@@ -720,7 +720,7 @@ INetContentType Registration::GetContentType(UniString const & rTypeName)
UniString aTheTypeName = rTypeName;
aTheTypeName.ToLowerAscii();
- USHORT nPos;
+ sal_uInt16 nPos;
return m_pRegistration->m_aTypeNameMap.Seek_Entry(&aTheTypeName, &nPos) ?
static_cast< TypeNameMapEntry * >(m_pRegistration->
m_aTypeNameMap.
@@ -764,7 +764,7 @@ UniString Registration::GetExtension(UniString const & rTypeName)
UniString aTheTypeName = rTypeName;
aTheTypeName.ToLowerAscii();
- USHORT nPos;
+ sal_uInt16 nPos;
return m_pRegistration->m_aTypeNameMap.Seek_Entry(&aTheTypeName, &nPos) ?
static_cast< TypeNameMapEntry * >(m_pRegistration->
m_aTypeNameMap.
@@ -781,7 +781,7 @@ INetContentType Registration::GetContentType4Extension(UniString const &
if (!m_pRegistration)
m_pRegistration = new Registration;
- USHORT nPos;
+ sal_uInt16 nPos;
return m_pRegistration->
m_aExtensionMap.
Seek_Entry(const_cast< UniString * >(&rExtension),
@@ -943,7 +943,7 @@ UniString INetContentTypes::GetContentType(INetContentType eTypeID)
UniString INetContentTypes::GetPresentation(INetContentType eTypeID,
const ::com::sun::star::lang::Locale& aLocale)
{
- USHORT nResID = USHORT();
+ sal_uInt16 nResID = sal_uInt16();
if (eTypeID <= CONTENT_TYPE_LAST)
nResID = aStaticResourceIDMap[eTypeID];
else
diff --git a/svl/source/misc/lngmisc.cxx b/svl/source/misc/lngmisc.cxx
index 1324a8fa842c..aba411079074 100644
--- a/svl/source/misc/lngmisc.cxx
+++ b/svl/source/misc/lngmisc.cxx
@@ -41,11 +41,11 @@ namespace linguistic
///////////////////////////////////////////////////////////////////////////
-INT32 GetNumControlChars( const OUString &rTxt )
+sal_Int32 GetNumControlChars( const OUString &rTxt )
{
- INT32 nCnt = 0;
- INT32 nLen = rTxt.getLength();
- for (INT32 i = 0; i < nLen; ++i)
+ sal_Int32 nCnt = 0;
+ sal_Int32 nLen = rTxt.getLength();
+ for (sal_Int32 i = 0; i < nLen; ++i)
{
if (IsControlChar( rTxt[i] ))
++nCnt;
@@ -54,33 +54,33 @@ INT32 GetNumControlChars( const OUString &rTxt )
}
-BOOL RemoveHyphens( OUString &rTxt )
+sal_Bool RemoveHyphens( OUString &rTxt )
{
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
if (HasHyphens( rTxt ))
{
String aTmp( rTxt );
aTmp.EraseAllChars( SVT_SOFT_HYPHEN );
aTmp.EraseAllChars( SVT_HARD_HYPHEN );
rTxt = aTmp;
- bModified = TRUE;
+ bModified = sal_True;
}
return bModified;
}
-BOOL RemoveControlChars( OUString &rTxt )
+sal_Bool RemoveControlChars( OUString &rTxt )
{
- BOOL bModified = FALSE;
- INT32 nCtrlChars = GetNumControlChars( rTxt );
+ sal_Bool bModified = sal_False;
+ sal_Int32 nCtrlChars = GetNumControlChars( rTxt );
if (nCtrlChars)
{
- INT32 nLen = rTxt.getLength();
- INT32 nSize = nLen - nCtrlChars;
+ sal_Int32 nLen = rTxt.getLength();
+ sal_Int32 nSize = nLen - nCtrlChars;
OUStringBuffer aBuf( nSize );
aBuf.setLength( nSize );
- INT32 nCnt = 0;
- for (INT32 i = 0; i < nLen; ++i)
+ sal_Int32 nCnt = 0;
+ for (sal_Int32 i = 0; i < nLen; ++i)
{
sal_Unicode cChar = rTxt[i];
if (!IsControlChar( cChar ))
@@ -91,7 +91,7 @@ BOOL RemoveControlChars( OUString &rTxt )
}
DBG_ASSERT( nCnt == nSize, "wrong size" );
rTxt = aBuf.makeStringAndClear();
- bModified = TRUE;
+ bModified = sal_True;
}
return bModified;
}
@@ -100,20 +100,20 @@ BOOL RemoveControlChars( OUString &rTxt )
// non breaking field character
#define CH_TXTATR_INWORD ((sal_Char) 0x02)
-BOOL ReplaceControlChars( rtl::OUString &rTxt, sal_Char /*aRplcChar*/ )
+sal_Bool ReplaceControlChars( rtl::OUString &rTxt, sal_Char /*aRplcChar*/ )
{
// the resulting string looks like this:
// 1. non breaking field characters get removed
// 2. remaining control characters will be replaced by ' '
- BOOL bModified = FALSE;
- INT32 nCtrlChars = GetNumControlChars( rTxt );
+ sal_Bool bModified = sal_False;
+ sal_Int32 nCtrlChars = GetNumControlChars( rTxt );
if (nCtrlChars)
{
- INT32 nLen = rTxt.getLength();
+ sal_Int32 nLen = rTxt.getLength();
OUStringBuffer aBuf( nLen );
- INT32 nCnt = 0;
- for (INT32 i = 0; i < nLen; ++i)
+ sal_Int32 nCnt = 0;
+ for (sal_Int32 i = 0; i < nLen; ++i)
{
sal_Unicode cChar = rTxt[i];
if (CH_TXTATR_INWORD != cChar)
@@ -126,7 +126,7 @@ BOOL ReplaceControlChars( rtl::OUString &rTxt, sal_Char /*aRplcChar*/ )
}
aBuf.setLength( nCnt );
rTxt = aBuf.makeStringAndClear();
- bModified = TRUE;
+ bModified = sal_True;
}
return bModified;
}
diff --git a/svl/source/misc/ownlist.cxx b/svl/source/misc/ownlist.cxx
index 9fd767c2253f..5d1d728b26e2 100644
--- a/svl/source/misc/ownlist.cxx
+++ b/svl/source/misc/ownlist.cxx
@@ -41,14 +41,14 @@ using namespace com::sun::star;
PRV_SV_IMPL_OWNER_LIST(SvCommandList,SvCommand)
-static String parseString(const String & rCmd, USHORT * pIndex)
+static String parseString(const String & rCmd, sal_uInt16 * pIndex)
{
String result;
if(rCmd.GetChar( *pIndex ) == '\"') {
(*pIndex) ++;
- USHORT begin = *pIndex;
+ sal_uInt16 begin = *pIndex;
while(*pIndex < rCmd.Len() && rCmd.GetChar((*pIndex) ++) != '\"') ;
@@ -58,9 +58,9 @@ static String parseString(const String & rCmd, USHORT * pIndex)
return result;
}
-static String parseWord(const String & rCmd, USHORT * pIndex)
+static String parseWord(const String & rCmd, sal_uInt16 * pIndex)
{
- USHORT begin = *pIndex;
+ sal_uInt16 begin = *pIndex;
while(*pIndex < rCmd.Len() && !isspace(rCmd.GetChar(*pIndex)) && rCmd.GetChar(*pIndex) != '=')
(*pIndex) ++;
@@ -68,7 +68,7 @@ static String parseWord(const String & rCmd, USHORT * pIndex)
return String(rCmd.Copy(begin, *pIndex - begin));
}
-static void eatSpace(const String & rCmd, USHORT * pIndex)
+static void eatSpace(const String & rCmd, sal_uInt16 * pIndex)
{
while(*pIndex < rCmd.Len() && isspace(rCmd.GetChar(*pIndex)))
(*pIndex) ++;
@@ -76,10 +76,10 @@ static void eatSpace(const String & rCmd, USHORT * pIndex)
//=========================================================================
-BOOL SvCommandList::AppendCommands
+sal_Bool SvCommandList::AppendCommands
(
const String & rCmd, /* Dieser Text wird in Kommandos umgesetzt */
- USHORT * pEaten /* Anzahl der Zeichen, die gelesen wurden */
+ sal_uInt16 * pEaten /* Anzahl der Zeichen, die gelesen wurden */
)
/* [Beschreibung]
@@ -88,11 +88,11 @@ BOOL SvCommandList::AppendCommands
[R"uckgabewert]
- BOOL TRUE, der Text wurde korrekt geparsed.
- FALSE, der Text wurde nicht korrekt geparsed.
+ sal_Bool sal_True, der Text wurde korrekt geparsed.
+ sal_False, der Text wurde nicht korrekt geparsed.
*/
{
- USHORT index = 0;
+ sal_uInt16 index = 0;
while(index < rCmd.Len())
{
@@ -115,14 +115,14 @@ BOOL SvCommandList::AppendCommands
*pEaten = index;
-// USHORT nPos = 0;
+// sal_uInt16 nPos = 0;
// while( nPos < rCmd.Len() )
// {
// // ein Zeichen ? Dann faengt hier eine Option an
// if( isalpha( rCmd[nPos] ) )
// {
// String aValue;
-// USHORT nStt = nPos;
+// sal_uInt16 nStt = nPos;
// register char c;
// while( nPos < rCmd.Len() &&
@@ -148,7 +148,7 @@ BOOL SvCommandList::AppendCommands
// if( nPos != rCmd.Len() )
// {
-// USHORT nLen = 0;
+// sal_uInt16 nLen = 0;
// nStt = nPos;
// if( '"' == c )
// {
@@ -181,7 +181,7 @@ BOOL SvCommandList::AppendCommands
// nPos++;
// }
// *pEaten = nPos;
- return TRUE;
+ return sal_True;
}
//=========================================================================
@@ -198,7 +198,7 @@ String SvCommandList::GetCommands() const
*/
{
String aRet;
- for( ULONG i = 0; i < aTypes.Count(); i++ )
+ for( sal_uLong i = 0; i < aTypes.Count(); i++ )
{
if( i != 0 )
aRet += ' ';
@@ -252,7 +252,7 @@ SvStream & operator >>
SvStream & Der "ubergebene Stream.
*/
{
- UINT32 nCount = 0;
+ sal_uInt32 nCount = 0;
rStm >> nCount;
if( !rStm.GetError() )
{
@@ -283,10 +283,10 @@ SvStream & operator <<
SvStream & Der "ubergebene Stream.
*/
{
- UINT32 nCount = rThis.aTypes.Count();
+ sal_uInt32 nCount = rThis.aTypes.Count();
rStm << nCount;
- for( UINT32 i = 0; i < nCount; i++ )
+ for( sal_uInt32 i = 0; i < nCount; i++ )
{
SvCommand * pCmd = (SvCommand *)rThis.aTypes.GetObject( i );
rStm << *pCmd;
@@ -294,7 +294,7 @@ SvStream & operator <<
return rStm;
}
-BOOL SvCommandList::FillFromSequence( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& aCommandSequence )
+sal_Bool SvCommandList::FillFromSequence( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& aCommandSequence )
{
const sal_Int32 nCount = aCommandSequence.getLength();
String aCommand, aArg;
@@ -308,7 +308,7 @@ BOOL SvCommandList::FillFromSequence( const com::sun::star::uno::Sequence < com:
Append( aCommand, aArg );
}
- return TRUE;
+ return sal_True;
}
void SvCommandList::FillSequence( com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& aCommandSequence )
diff --git a/svl/source/misc/strmadpt.cxx b/svl/source/misc/strmadpt.cxx
index c2347ef6fc0c..18f2788077a3 100644
--- a/svl/source/misc/strmadpt.cxx
+++ b/svl/source/misc/strmadpt.cxx
@@ -152,7 +152,7 @@ TYPEINIT1(SvOutputStreamOpenLockBytes, SvOpenLockBytes)
//============================================================================
// virtual
-ErrCode SvOutputStreamOpenLockBytes::ReadAt(ULONG, void *, ULONG, ULONG *)
+ErrCode SvOutputStreamOpenLockBytes::ReadAt(sal_uLong, void *, sal_uLong, sal_uLong *)
const
{
return ERRCODE_IO_CANTREAD;
@@ -160,8 +160,8 @@ ErrCode SvOutputStreamOpenLockBytes::ReadAt(ULONG, void *, ULONG, ULONG *)
//============================================================================
// virtual
-ErrCode SvOutputStreamOpenLockBytes::WriteAt(ULONG nPos, void const * pBuffer,
- ULONG nCount, ULONG * pWritten)
+ErrCode SvOutputStreamOpenLockBytes::WriteAt(sal_uLong nPos, void const * pBuffer,
+ sal_uLong nCount, sal_uLong * pWritten)
{
if (nPos != m_nPosition)
return ERRCODE_IO_CANTWRITE;
@@ -187,7 +187,7 @@ ErrCode SvOutputStreamOpenLockBytes::Flush() const
//============================================================================
// virtual
-ErrCode SvOutputStreamOpenLockBytes::SetSize(ULONG)
+ErrCode SvOutputStreamOpenLockBytes::SetSize(sal_uLong)
{
return ERRCODE_IO_NOTSUPPORTED;
}
@@ -205,15 +205,15 @@ ErrCode SvOutputStreamOpenLockBytes::Stat(SvLockBytesStat * pStat,
//============================================================================
// virtual
ErrCode SvOutputStreamOpenLockBytes::FillAppend(void const * pBuffer,
- ULONG nCount,
- ULONG * pWritten)
+ sal_uLong nCount,
+ sal_uLong * pWritten)
{
if (!m_xOutputStream.is())
return ERRCODE_IO_CANTWRITE;
if (nCount > 0
- && nCount > std::numeric_limits< ULONG >::max() - m_nPosition)
+ && nCount > std::numeric_limits< sal_uLong >::max() - m_nPosition)
{
- nCount = std::numeric_limits< ULONG >::max() - m_nPosition;
+ nCount = std::numeric_limits< sal_uLong >::max() - m_nPosition;
if (nCount == 0)
return ERRCODE_IO_CANTWRITE;
}
@@ -235,14 +235,14 @@ ErrCode SvOutputStreamOpenLockBytes::FillAppend(void const * pBuffer,
//============================================================================
// virtual
-ULONG SvOutputStreamOpenLockBytes::Tell() const
+sal_uLong SvOutputStreamOpenLockBytes::Tell() const
{
return m_nPosition;
}
//============================================================================
// virtual
-ULONG SvOutputStreamOpenLockBytes::Seek(ULONG)
+sal_uLong SvOutputStreamOpenLockBytes::Seek(sal_uLong)
{
return m_nPosition;
}
@@ -476,7 +476,7 @@ bool SvInputStream::open()
//============================================================================
// virtual
-ULONG SvInputStream::GetData(void * pData, ULONG nSize)
+sal_uLong SvInputStream::GetData(void * pData, sal_uLong nSize)
{
if (!open())
{
@@ -503,8 +503,8 @@ ULONG SvInputStream::GetData(void * pData, ULONG nSize)
{
sal_Int32 nRemain
= sal_Int32(
- std::min(ULONG(nSize - nRead),
- ULONG(std::numeric_limits< sal_Int32 >::max())));
+ std::min(sal_uLong(nSize - nRead),
+ sal_uLong(std::numeric_limits< sal_Int32 >::max())));
if (nRemain == 0)
break;
uno::Sequence< sal_Int8 > aBuffer;
@@ -540,8 +540,8 @@ ULONG SvInputStream::GetData(void * pData, ULONG nSize)
sal_Int32 nRemain
= sal_Int32(
std::min(
- ULONG(nSize - nRead),
- ULONG(std::numeric_limits< sal_Int32 >::max())));
+ sal_uLong(nSize - nRead),
+ sal_uLong(std::numeric_limits< sal_Int32 >::max())));
if (nRemain == 0)
break;
uno::Sequence< sal_Int8 > aBuffer;
@@ -571,7 +571,7 @@ ULONG SvInputStream::GetData(void * pData, ULONG nSize)
//============================================================================
// virtual
-ULONG SvInputStream::PutData(void const *, ULONG)
+sal_uLong SvInputStream::PutData(void const *, sal_uLong)
{
SetError(ERRCODE_IO_NOTSUPPORTED);
return 0;
@@ -584,7 +584,7 @@ void SvInputStream::FlushData()
//============================================================================
// virtual
-ULONG SvInputStream::SeekPos(ULONG nPos)
+sal_uLong SvInputStream::SeekPos(sal_uLong nPos)
{
if (open())
{
@@ -601,7 +601,7 @@ ULONG SvInputStream::SeekPos(ULONG nPos)
< STREAM_SEEK_TO_END)
{
m_nSeekedFrom = Tell();
- return ULONG(nLength);
+ return sal_uLong(nLength);
}
}
catch (io::IOException) {}
@@ -636,7 +636,7 @@ ULONG SvInputStream::SeekPos(ULONG nPos)
//============================================================================
// virtual
-void SvInputStream::SetSize(ULONG)
+void SvInputStream::SetSize(sal_uLong)
{
SetError(ERRCODE_IO_NOTSUPPORTED);
}
@@ -668,14 +668,14 @@ SvInputStream::~SvInputStream()
//============================================================================
// virtual
-USHORT SvInputStream::IsA() const
+sal_uInt16 SvInputStream::IsA() const
{
return 0;
}
//============================================================================
// virtual
-void SvInputStream::AddMark(ULONG nPos)
+void SvInputStream::AddMark(sal_uLong nPos)
{
if (open() && m_pPipe)
m_pPipe->addMark(nPos);
@@ -683,7 +683,7 @@ void SvInputStream::AddMark(ULONG nPos)
//============================================================================
// virtual
-void SvInputStream::RemoveMark(ULONG nPos)
+void SvInputStream::RemoveMark(sal_uLong nPos)
{
if (open() && m_pPipe)
m_pPipe->removeMark(nPos);
@@ -696,7 +696,7 @@ void SvInputStream::RemoveMark(ULONG nPos)
//============================================================================
// virtual
-ULONG SvOutputStream::GetData(void *, ULONG)
+sal_uLong SvOutputStream::GetData(void *, sal_uLong)
{
SetError(ERRCODE_IO_NOTSUPPORTED);
return 0;
@@ -704,20 +704,20 @@ ULONG SvOutputStream::GetData(void *, ULONG)
//============================================================================
// virtual
-ULONG SvOutputStream::PutData(void const * pData, ULONG nSize)
+sal_uLong SvOutputStream::PutData(void const * pData, sal_uLong nSize)
{
if (!m_xStream.is())
{
SetError(ERRCODE_IO_CANTWRITE);
return 0;
}
- ULONG nWritten = 0;
+ sal_uLong nWritten = 0;
for (;;)
{
sal_Int32 nRemain
= sal_Int32(
- std::min(ULONG(nSize - nWritten),
- ULONG(std::numeric_limits< sal_Int32 >::max())));
+ std::min(sal_uLong(nSize - nWritten),
+ sal_uLong(std::numeric_limits< sal_Int32 >::max())));
if (nRemain == 0)
break;
try
@@ -739,7 +739,7 @@ ULONG SvOutputStream::PutData(void const * pData, ULONG nSize)
//============================================================================
// virtual
-ULONG SvOutputStream::SeekPos(ULONG)
+sal_uLong SvOutputStream::SeekPos(sal_uLong)
{
SetError(ERRCODE_IO_NOTSUPPORTED);
return 0;
@@ -763,7 +763,7 @@ void SvOutputStream::FlushData()
//============================================================================
// virtual
-void SvOutputStream::SetSize(ULONG)
+void SvOutputStream::SetSize(sal_uLong)
{
SetError(ERRCODE_IO_NOTSUPPORTED);
}
@@ -790,7 +790,7 @@ SvOutputStream::~SvOutputStream()
//============================================================================
// virtual
-USHORT SvOutputStream::IsA() const
+sal_uInt16 SvOutputStream::IsA() const
{
return 0;
}
diff --git a/svl/source/notify/brdcst.cxx b/svl/source/notify/brdcst.cxx
index 29983ecedc17..ad7da10ed4f4 100644
--- a/svl/source/notify/brdcst.cxx
+++ b/svl/source/notify/brdcst.cxx
@@ -59,7 +59,7 @@ void SfxBroadcaster::Broadcast( const SfxHint &rHint )
if ( aListeners.Count() /*! || aGlobListeners.Count() */ )
{
// notify all registered listeners exactly once
- for ( USHORT n = 0; n < aListeners.Count(); ++n )
+ for ( sal_uInt16 n = 0; n < aListeners.Count(); ++n )
{
SfxListener* pListener = aListeners[n];
if ( pListener )
@@ -98,7 +98,7 @@ SfxBroadcaster::~SfxBroadcaster()
Broadcast( SfxSimpleHint(SFX_HINT_DYING) );
// remove all still registered listeners
- for ( USHORT nPos = 0; nPos < aListeners.Count(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < aListeners.Count(); ++nPos )
{
SfxListener *pListener = aListeners[nPos];
if ( pListener )
@@ -124,7 +124,7 @@ SfxBroadcaster::SfxBroadcaster( const SfxBroadcaster &rBC )
{
DBG_CTOR(SfxBroadcaster, 0);
- for ( USHORT n = 0; n < rBC.aListeners.Count(); ++n )
+ for ( sal_uInt16 n = 0; n < rBC.aListeners.Count(); ++n )
{
SfxListener *pListener = rBC.aListeners[n];
if ( pListener )
@@ -136,12 +136,12 @@ SfxBroadcaster::SfxBroadcaster( const SfxBroadcaster &rBC )
// add a new SfxListener to the list
-BOOL SfxBroadcaster::AddListener( SfxListener& rListener )
+sal_Bool SfxBroadcaster::AddListener( SfxListener& rListener )
{
DBG_CHKTHIS(SfxBroadcaster, 0);
const SfxListener *pListener = &rListener;
const SfxListener *pNull = 0;
- USHORT nFreePos = aListeners.GetPos( pNull );
+ sal_uInt16 nFreePos = aListeners.GetPos( pNull );
if ( nFreePos < aListeners.Count() )
aListeners.GetData()[nFreePos] = pListener;
else if ( aListeners.Count() < (USHRT_MAX-1) )
@@ -149,12 +149,12 @@ BOOL SfxBroadcaster::AddListener( SfxListener& rListener )
else
{
DBG_ERROR( "array overflow" );
- return FALSE;
+ return sal_False;
}
DBG_ASSERT( USHRT_MAX != aListeners.GetPos(pListener),
"AddListener failed" );
- return TRUE;
+ return sal_True;
}
//--------------------------------------------------------------------
@@ -172,8 +172,8 @@ void SfxBroadcaster::ListenersGone()
void SfxBroadcaster::Forward(SfxBroadcaster& rBC, const SfxHint& rHint)
{
- const USHORT nCount = aListeners.Count();
- for ( USHORT i = 0; i < nCount; ++i )
+ const sal_uInt16 nCount = aListeners.Count();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
SfxListener *pListener = aListeners[i];
if ( pListener )
@@ -189,7 +189,7 @@ void SfxBroadcaster::RemoveListener( SfxListener& rListener )
{
{DBG_CHKTHIS(SfxBroadcaster, 0);}
const SfxListener *pListener = &rListener;
- USHORT nPos = aListeners.GetPos(pListener);
+ sal_uInt16 nPos = aListeners.GetPos(pListener);
DBG_ASSERT( nPos != USHRT_MAX, "RemoveListener: Listener unknown" );
aListeners.GetData()[nPos] = 0;
if ( !HasListeners() )
@@ -198,12 +198,12 @@ void SfxBroadcaster::RemoveListener( SfxListener& rListener )
//--------------------------------------------------------------------
-BOOL SfxBroadcaster::HasListeners() const
+sal_Bool SfxBroadcaster::HasListeners() const
{
- for ( USHORT n = 0; n < aListeners.Count(); ++n )
+ for ( sal_uInt16 n = 0; n < aListeners.Count(); ++n )
if ( aListeners.GetObject(n) != 0 )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
//--------------------------------------------------------------------
diff --git a/svl/source/notify/broadcast.cxx b/svl/source/notify/broadcast.cxx
index e6a76132be6a..046b584e4385 100644
--- a/svl/source/notify/broadcast.cxx
+++ b/svl/source/notify/broadcast.cxx
@@ -93,7 +93,7 @@ void SvtBroadcaster::Broadcast( const SfxHint &rHint )
if( HasListeners() /* && !IsModifyLocked()*/ )
{
// LockModify();
-// bInModify = TRUE;
+// bInModify = sal_True;
SvtListenerIter aIter( *this );
SvtListener* pLast = aIter.GoStart();
@@ -104,7 +104,7 @@ void SvtBroadcaster::Broadcast( const SfxHint &rHint )
break;
} while( 0 != ( pLast = aIter.GoNext() ));
-// bInModify = FALSE;
+// bInModify = sal_False;
// UnlockModify();
}
}
@@ -128,7 +128,7 @@ void SvtBroadcaster::Forward( SvtBroadcaster& rBC, const SfxHint& rHint )
if( rBC.HasListeners() /* && !IsModifyLocked()*/ )
{
// LockModify();
-// bInModify = TRUE;
+// bInModify = sal_True;
SvtListenerIter aIter( rBC );
SvtListener* pLast = aIter.GoStart();
@@ -139,7 +139,7 @@ void SvtBroadcaster::Forward( SvtBroadcaster& rBC, const SfxHint& rHint )
break;
} while( 0 != ( pLast = aIter.GoNext() ));
-// bInModify = FALSE;
+// bInModify = sal_False;
// UnlockModify();
}
}
diff --git a/svl/source/notify/listener.cxx b/svl/source/notify/listener.cxx
index 44e3e187ff38..8a90a0ddfd3c 100644
--- a/svl/source/notify/listener.cxx
+++ b/svl/source/notify/listener.cxx
@@ -72,7 +72,7 @@ SvtListener::~SvtListener()
// registeres at a specific SvtBroadcaster
-BOOL SvtListener::StartListening( SvtBroadcaster& rBroadcaster )
+sal_Bool SvtListener::StartListening( SvtBroadcaster& rBroadcaster )
{
const SvtListenerBase* pLst = pBrdCastLst;
while( pLst )
@@ -80,19 +80,19 @@ BOOL SvtListener::StartListening( SvtBroadcaster& rBroadcaster )
if( &rBroadcaster == pLst->GetBroadcaster() )
{
// double, than return
- return FALSE;
+ return sal_False;
}
pLst = pLst->GetNext();
}
new SvtListenerBase( *this, rBroadcaster );
- return TRUE;
+ return sal_True;
}
//--------------------------------------------------------------------
// unregisteres at a specific SvtBroadcaster
-BOOL SvtListener::EndListening( SvtBroadcaster& rBroadcaster )
+sal_Bool SvtListener::EndListening( SvtBroadcaster& rBroadcaster )
{
SvtListenerBase *pLst = pBrdCastLst, *pPrev = pLst;
while( pLst )
@@ -105,12 +105,12 @@ BOOL SvtListener::EndListening( SvtBroadcaster& rBroadcaster )
pPrev->SetNext( pLst->GetNext() );
delete pLst;
- return TRUE;
+ return sal_True;
}
pPrev = pLst;
pLst = pLst->GetNext();
}
- return FALSE;
+ return sal_False;
}
//--------------------------------------------------------------------
@@ -132,7 +132,7 @@ void SvtListener::EndListeningAll()
//--------------------------------------------------------------------
-BOOL SvtListener::IsListening( SvtBroadcaster& rBroadcaster ) const
+sal_Bool SvtListener::IsListening( SvtBroadcaster& rBroadcaster ) const
{
const SvtListenerBase *pLst = pBrdCastLst;
while( pLst )
diff --git a/svl/source/notify/lstner.cxx b/svl/source/notify/lstner.cxx
index 3f003e6dde8f..36c6b665dd6d 100644
--- a/svl/source/notify/lstner.cxx
+++ b/svl/source/notify/lstner.cxx
@@ -61,7 +61,7 @@ SfxListener::SfxListener( const SfxListener &rListener )
{
DBG_CTOR(SfxListener, 0);
- for ( USHORT n = 0; n < rListener.aBCs.Count(); ++n )
+ for ( sal_uInt16 n = 0; n < rListener.aBCs.Count(); ++n )
StartListening( *rListener.aBCs[n] );
}
//--------------------------------------------------------------------
@@ -73,7 +73,7 @@ SfxListener::~SfxListener()
DBG_DTOR(SfxListener, 0);
// unregister at all remainding broadcasters
- for ( USHORT nPos = 0; nPos < aBCs.Count(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < aBCs.Count(); ++nPos )
{
SfxBroadcaster *pBC = aBCs[nPos];
pBC->RemoveListener(*this);
@@ -96,7 +96,7 @@ void SfxListener::RemoveBroadcaster_Impl( SfxBroadcaster& rBC )
// registeres at a specific SfxBroadcaster
-BOOL SfxListener::StartListening( SfxBroadcaster& rBroadcaster, BOOL bPreventDups )
+sal_Bool SfxListener::StartListening( SfxBroadcaster& rBroadcaster, sal_Bool bPreventDups )
{
DBG_CHKTHIS(SfxListener, 0);
@@ -108,23 +108,23 @@ BOOL SfxListener::StartListening( SfxBroadcaster& rBroadcaster, BOOL bPreventDup
aBCs.Insert( pBC, aBCs.Count() );
DBG_ASSERT( IsListening(rBroadcaster), "StartListening failed" );
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
//--------------------------------------------------------------------
// unregisteres at a specific SfxBroadcaster
-BOOL SfxListener::EndListening( SfxBroadcaster& rBroadcaster, BOOL bAllDups )
+sal_Bool SfxListener::EndListening( SfxBroadcaster& rBroadcaster, sal_Bool bAllDups )
{
DBG_CHKTHIS(SfxListener, 0);
if ( !IsListening( rBroadcaster ) )
- return FALSE;
+ return sal_False;
do
{
@@ -133,14 +133,14 @@ BOOL SfxListener::EndListening( SfxBroadcaster& rBroadcaster, BOOL bAllDups )
aBCs.Remove( aBCs.GetPos(pBC), 1 );
}
while ( bAllDups && IsListening( rBroadcaster ) );
- return TRUE;
+ return sal_True;
}
//--------------------------------------------------------------------
// unregisteres at a specific SfxBroadcaster by index
-void SfxListener::EndListening( USHORT nNo )
+void SfxListener::EndListening( sal_uInt16 nNo )
{
DBG_CHKTHIS(SfxListener, 0);
@@ -168,7 +168,7 @@ void SfxListener::EndListeningAll()
//--------------------------------------------------------------------
-BOOL SfxListener::IsListening( SfxBroadcaster& rBroadcaster ) const
+sal_Bool SfxListener::IsListening( SfxBroadcaster& rBroadcaster ) const
{
const SfxBroadcaster *pBC = &rBroadcaster;
return USHRT_MAX != aBCs.GetPos( pBC );
diff --git a/svl/source/notify/smplhint.cxx b/svl/source/notify/smplhint.cxx
index 98eecb91cfe2..9191e50f383e 100644
--- a/svl/source/notify/smplhint.cxx
+++ b/svl/source/notify/smplhint.cxx
@@ -39,7 +39,7 @@ TYPEINIT1(SfxSimpleHint, SfxHint);
//====================================================================
// creates a SimpleHint with the type nId
-SfxSimpleHint::SfxSimpleHint( ULONG nIdP )
+SfxSimpleHint::SfxSimpleHint( sal_uLong nIdP )
{
nId = nIdP;
}
diff --git a/svl/source/numbers/numfmuno.cxx b/svl/source/numbers/numfmuno.cxx
index 6aea37653633..3a4949f45cbc 100644
--- a/svl/source/numbers/numfmuno.cxx
+++ b/svl/source/numbers/numfmuno.cxx
@@ -183,7 +183,7 @@ sal_Int32 SAL_CALL SvNumberFormatterServiceObj::detectNumberFormat(
{
::osl::MutexGuard aGuard( m_aMutex );
- INT32 nRet = 0;
+ sal_Int32 nRet = 0;
SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : NULL;
if (pFormatter)
{
@@ -249,7 +249,7 @@ util::Color SAL_CALL SvNumberFormatterServiceObj::queryColorForNumber( sal_Int32
{
::osl::MutexGuard aGuard( m_aMutex );
- util::Color nRet = aDefaultColor; // color = INT32
+ util::Color nRet = aDefaultColor; // color = sal_Int32
SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : NULL;
if (pFormatter)
{
@@ -291,7 +291,7 @@ util::Color SAL_CALL SvNumberFormatterServiceObj::queryColorForString( sal_Int32
{
::osl::MutexGuard aGuard( m_aMutex );
- util::Color nRet = aDefaultColor; // color = INT32
+ util::Color nRet = aDefaultColor; // color = sal_Int32
SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : NULL;
if (pFormatter)
{
@@ -342,7 +342,7 @@ rtl::OUString SAL_CALL SvNumberFormatterServiceObj::convertNumberToPreviewString
LanguageType eLang = lcl_GetLanguage( nLocale );
Color* pColor = NULL;
- BOOL bOk;
+ sal_Bool bOk;
if ( bAllowEnglish )
bOk = pFormatter->GetPreviewStringGuess(
aFormString, fValue, aOutString, &pColor, eLang );
@@ -369,7 +369,7 @@ util::Color SAL_CALL SvNumberFormatterServiceObj::queryPreviewColorForNumber(
{
::osl::MutexGuard aGuard( m_aMutex );
- util::Color nRet = aDefaultColor; // color = INT32
+ util::Color nRet = aDefaultColor; // color = sal_Int32
SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : NULL;
if (pFormatter)
{
@@ -378,7 +378,7 @@ util::Color SAL_CALL SvNumberFormatterServiceObj::queryPreviewColorForNumber(
LanguageType eLang = lcl_GetLanguage( nLocale );
Color* pColor = NULL;
- BOOL bOk;
+ sal_Bool bOk;
if ( bAllowEnglish )
bOk = pFormatter->GetPreviewStringGuess(
aFormString, fValue, aOutString, &pColor, eLang );
@@ -485,7 +485,7 @@ sal_Int32 SAL_CALL SvNumberFormatsObj::queryKey( const rtl::OUString& aFormat,
{
::osl::MutexGuard aGuard( m_aMutex );
- INT32 nRet = 0;
+ sal_Int32 nRet = 0;
SvNumberFormatter* pFormatter = rSupplier.GetNumberFormatter();
if (pFormatter)
{
@@ -509,7 +509,7 @@ sal_Int32 SAL_CALL SvNumberFormatsObj::addNew( const rtl::OUString& aFormat,
{
::osl::MutexGuard aGuard( m_aMutex );
- INT32 nRet = 0;
+ sal_Int32 nRet = 0;
SvNumberFormatter* pFormatter = rSupplier.GetNumberFormatter();
if (pFormatter)
{
@@ -518,7 +518,7 @@ sal_Int32 SAL_CALL SvNumberFormatsObj::addNew( const rtl::OUString& aFormat,
sal_uInt32 nKey = 0;
xub_StrLen nCheckPos = 0;
short nType = 0;
- BOOL bOk = pFormatter->PutEntry( aFormStr, nCheckPos, nType, nKey, eLang );
+ sal_Bool bOk = pFormatter->PutEntry( aFormStr, nCheckPos, nType, nKey, eLang );
if (bOk)
nRet = nKey;
else if (nCheckPos)
@@ -540,7 +540,7 @@ sal_Int32 SAL_CALL SvNumberFormatsObj::addNewConverted( const rtl::OUString& aFo
{
::osl::MutexGuard aGuard( m_aMutex );
- INT32 nRet = 0;
+ sal_Int32 nRet = 0;
SvNumberFormatter* pFormatter = rSupplier.GetNumberFormatter();
if (pFormatter)
{
@@ -550,7 +550,7 @@ sal_Int32 SAL_CALL SvNumberFormatsObj::addNewConverted( const rtl::OUString& aFo
sal_uInt32 nKey = 0;
xub_StrLen nCheckPos = 0;
short nType = 0;
- BOOL bOk = pFormatter->PutandConvertEntry( aFormStr, nCheckPos, nType, nKey, eLang, eNewLang );
+ sal_Bool bOk = pFormatter->PutandConvertEntry( aFormStr, nCheckPos, nType, nKey, eLang, eNewLang );
if (bOk || nKey > 0)
nRet = nKey;
else if (nCheckPos)
@@ -605,7 +605,7 @@ sal_Int32 SAL_CALL SvNumberFormatsObj::getStandardIndex( const lang::Locale& nLo
{
::osl::MutexGuard aGuard( m_aMutex );
- INT32 nRet = 0;
+ sal_Int32 nRet = 0;
SvNumberFormatter* pFormatter = rSupplier.GetNumberFormatter();
if (pFormatter)
{
@@ -623,7 +623,7 @@ sal_Int32 SAL_CALL SvNumberFormatsObj::getStandardFormat( sal_Int16 nType, const
{
::osl::MutexGuard aGuard( m_aMutex );
- INT32 nRet = 0;
+ sal_Int32 nRet = 0;
SvNumberFormatter* pFormatter = rSupplier.GetNumberFormatter();
if (pFormatter)
{
@@ -644,7 +644,7 @@ sal_Int32 SAL_CALL SvNumberFormatsObj::getFormatIndex( sal_Int16 nIndex, const l
{
::osl::MutexGuard aGuard( m_aMutex );
- INT32 nRet = 0;
+ sal_Int32 nRet = 0;
SvNumberFormatter* pFormatter = rSupplier.GetNumberFormatter();
if (pFormatter)
{
@@ -662,7 +662,7 @@ sal_Bool SAL_CALL SvNumberFormatsObj::isTypeCompatible( sal_Int16 nOldType, sal_
{
::osl::MutexGuard aGuard( m_aMutex );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SvNumberFormatter* pFormatter = rSupplier.GetNumberFormatter();
if (pFormatter)
bRet = pFormatter->IsCompatible( nOldType, nNewType );
@@ -677,7 +677,7 @@ sal_Int32 SAL_CALL SvNumberFormatsObj::getFormatForLocale( sal_Int32 nKey, const
{
::osl::MutexGuard aGuard( m_aMutex );
- INT32 nRet = 0;
+ sal_Int32 nRet = 0;
SvNumberFormatter* pFormatter = rSupplier.GetNumberFormatter();
if (pFormatter)
{
@@ -715,7 +715,7 @@ uno::Sequence<rtl::OUString> SAL_CALL SvNumberFormatsObj::getSupportedServiceNam
//------------------------------------------------------------------------
-SvNumberFormatObj::SvNumberFormatObj( SvNumberFormatsSupplierObj& rParent, ULONG nK, const ::comphelper::SharedMutex& _rMutex )
+SvNumberFormatObj::SvNumberFormatObj( SvNumberFormatsSupplierObj& rParent, sal_uLong nK, const ::comphelper::SharedMutex& _rMutex )
:rSupplier( rParent )
,nKey( nK )
,m_aMutex( _rMutex )
@@ -759,8 +759,8 @@ uno::Any SAL_CALL SvNumberFormatObj::getPropertyValue( const rtl::OUString& aPro
const SvNumberformat* pFormat = pFormatter ? pFormatter->GetEntry(nKey) : NULL;
if (pFormat)
{
- BOOL bThousand, bRed;
- USHORT nDecimals, nLeading;
+ sal_Bool bThousand, bRed;
+ sal_uInt16 nDecimals, nLeading;
String aString = aPropertyName;
if (aString.EqualsAscii( PROPERTYNAME_FMTSTR ))
@@ -784,12 +784,12 @@ uno::Any SAL_CALL SvNumberFormatObj::getPropertyValue( const rtl::OUString& aPro
else if (aString.EqualsAscii( PROPERTYNAME_STDFORM ))
{
//! SvNumberformat Member bStandard rausreichen?
- BOOL bStandard = ( ( nKey % SV_COUNTRY_LANGUAGE_OFFSET ) == 0 );
+ sal_Bool bStandard = ( ( nKey % SV_COUNTRY_LANGUAGE_OFFSET ) == 0 );
aRet.setValue( &bStandard, getBooleanCppuType() );
}
else if (aString.EqualsAscii( PROPERTYNAME_USERDEF ))
{
- BOOL bUserDef = ( ( pFormat->GetType() & NUMBERFORMAT_DEFINED ) != 0 );
+ sal_Bool bUserDef = ( ( pFormat->GetType() & NUMBERFORMAT_DEFINED ) != 0 );
aRet.setValue( &bUserDef, getBooleanCppuType() );
}
else if (aString.EqualsAscii( PROPERTYNAME_DECIMALS ))
@@ -827,7 +827,7 @@ uno::Any SAL_CALL SvNumberFormatObj::getPropertyValue( const rtl::OUString& aPro
else if (aString.EqualsAscii( PROPERTYNAME_CURRABB ))
{
String aSymbol, aExt;
- BOOL bBank = FALSE;
+ sal_Bool bBank = sal_False;
pFormat->GetNewCurrencySymbol( aSymbol, aExt );
const NfCurrencyEntry* pCurr = pFormatter->GetCurrencyEntry( bBank,
aSymbol, aExt, pFormat->GetLanguage() );
@@ -889,7 +889,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL SvNumberFormatObj::getPropertyValue
if (pFormat)
{
String aSymbol, aExt, aAbb;
- BOOL bBank = FALSE;
+ sal_Bool bBank = sal_False;
pFormat->GetNewCurrencySymbol( aSymbol, aExt );
const NfCurrencyEntry* pCurr = pFormatter->GetCurrencyEntry( bBank,
aSymbol, aExt, pFormat->GetLanguage() );
@@ -898,11 +898,11 @@ uno::Sequence<beans::PropertyValue> SAL_CALL SvNumberFormatObj::getPropertyValue
String aFmtStr = pFormat->GetFormatstring();
String aComment = pFormat->GetComment();
- BOOL bStandard = ( ( nKey % SV_COUNTRY_LANGUAGE_OFFSET ) == 0 );
+ sal_Bool bStandard = ( ( nKey % SV_COUNTRY_LANGUAGE_OFFSET ) == 0 );
//! SvNumberformat Member bStandard rausreichen?
- BOOL bUserDef = ( ( pFormat->GetType() & NUMBERFORMAT_DEFINED ) != 0 );
- BOOL bThousand, bRed;
- USHORT nDecimals, nLeading;
+ sal_Bool bUserDef = ( ( pFormat->GetType() & NUMBERFORMAT_DEFINED ) != 0 );
+ sal_Bool bThousand, bRed;
+ sal_uInt16 nDecimals, nLeading;
pFormat->GetFormatSpecialInfo( bThousand, bRed, nDecimals, nLeading );
lang::Locale aLocale( MsLangId::convertLanguageToLocale(
pFormat->GetLanguage()));
@@ -1057,7 +1057,7 @@ uno::Any SAL_CALL SvNumberFormatSettingsObj::getPropertyValue( const rtl::OUStri
String aString = aPropertyName;
if (aString.EqualsAscii( PROPERTYNAME_NOZERO ))
{
- BOOL bNoZero = pFormatter->GetNoZero();
+ sal_Bool bNoZero = pFormatter->GetNoZero();
aRet.setValue( &bNoZero, getBooleanCppuType() );
}
else if (aString.EqualsAscii( PROPERTYNAME_NULLDATE ))
diff --git a/svl/source/numbers/numfmuno.hxx b/svl/source/numbers/numfmuno.hxx
index 09bc58a0b6ee..f3644cc4e7a5 100644
--- a/svl/source/numbers/numfmuno.hxx
+++ b/svl/source/numbers/numfmuno.hxx
@@ -183,11 +183,11 @@ class SvNumberFormatObj : public cppu::WeakImplHelper3<
{
private:
SvNumberFormatsSupplierObj& rSupplier;
- ULONG nKey;
+ sal_uLong nKey;
mutable ::comphelper::SharedMutex m_aMutex;
public:
- SvNumberFormatObj( SvNumberFormatsSupplierObj& rParent, ULONG nK, const ::comphelper::SharedMutex& _rMutex );
+ SvNumberFormatObj( SvNumberFormatsSupplierObj& rParent, sal_uLong nK, const ::comphelper::SharedMutex& _rMutex );
virtual ~SvNumberFormatObj();
// XPropertySet
diff --git a/svl/source/numbers/numhead.cxx b/svl/source/numbers/numhead.cxx
index adf42fe26f8f..98ed17982444 100644
--- a/svl/source/numbers/numhead.cxx
+++ b/svl/source/numbers/numhead.cxx
@@ -47,7 +47,7 @@
SvNumReadHeader::SvNumReadHeader(SvStream& rNewStream) :
rStream( rNewStream )
{
- ULONG nDataSize;
+ sal_uLong nDataSize;
rStream >> nDataSize;
nDataEnd = rStream.Tell() + nDataSize;
}
@@ -56,7 +56,7 @@ SvNumReadHeader::SvNumReadHeader(SvStream& rNewStream) :
SvNumReadHeader::~SvNumReadHeader()
{
- ULONG nReadEnd = rStream.Tell();
+ sal_uLong nReadEnd = rStream.Tell();
DBG_ASSERT( nReadEnd <= nDataEnd, "zuviele Bytes gelesen" );
if ( nReadEnd != nDataEnd )
rStream.Seek(nDataEnd); // Rest ueberspringen
@@ -64,9 +64,9 @@ SvNumReadHeader::~SvNumReadHeader()
//#pragma SEG_FUNCDEF(numhead_03)
-ULONG SvNumReadHeader::BytesLeft() const
+sal_uLong SvNumReadHeader::BytesLeft() const
{
- ULONG nReadEnd = rStream.Tell();
+ sal_uLong nReadEnd = rStream.Tell();
if (nReadEnd <= nDataEnd)
return nDataEnd-nReadEnd;
@@ -78,7 +78,7 @@ ULONG SvNumReadHeader::BytesLeft() const
//#pragma SEG_FUNCDEF(numhead_04)
-SvNumWriteHeader::SvNumWriteHeader(SvStream& rNewStream, ULONG nDefault) :
+SvNumWriteHeader::SvNumWriteHeader(SvStream& rNewStream, sal_uLong nDefault) :
rStream( rNewStream )
{
nDataSize = nDefault;
@@ -90,7 +90,7 @@ SvNumWriteHeader::SvNumWriteHeader(SvStream& rNewStream, ULONG nDefault) :
SvNumWriteHeader::~SvNumWriteHeader()
{
- ULONG nPos = rStream.Tell();
+ sal_uLong nPos = rStream.Tell();
if ( nPos - nDataPos != nDataSize ) // Default getroffen?
{
@@ -112,11 +112,11 @@ ImpSvNumMultipleReadHeader::ImpSvNumMultipleReadHeader(SvStream& rNewStream) :
{
sal_uInt32 nDataSize;
rStream >> nDataSize;
- ULONG nDataPos = rStream.Tell();
+ sal_uLong nDataPos = rStream.Tell();
nEntryEnd = nDataPos;
rStream.SeekRel(nDataSize);
- USHORT nID;
+ sal_uInt16 nID;
rStream >> nID;
if (nID != SV_NUMID_SIZES)
{
@@ -151,7 +151,7 @@ void ImpSvNumMultipleReadHeader::Skip( SvStream& rStream )
sal_uInt32 nDataSize;
rStream >> nDataSize;
rStream.SeekRel( nDataSize );
- USHORT nID;
+ sal_uInt16 nID;
rStream >> nID;
if ( nID != SV_NUMID_SIZES )
{
@@ -166,7 +166,7 @@ void ImpSvNumMultipleReadHeader::Skip( SvStream& rStream )
void ImpSvNumMultipleReadHeader::EndEntry()
{
- ULONG nPos = rStream.Tell();
+ sal_uLong nPos = rStream.Tell();
DBG_ASSERT( nPos <= nEntryEnd, "zuviel gelesen" );
if ( nPos != nEntryEnd )
rStream.Seek( nEntryEnd ); // Rest ueberspringen
@@ -176,7 +176,7 @@ void ImpSvNumMultipleReadHeader::EndEntry()
void ImpSvNumMultipleReadHeader::StartEntry()
{
- ULONG nPos = rStream.Tell();
+ sal_uLong nPos = rStream.Tell();
sal_uInt32 nEntrySize;
(*pMemStream) >> nEntrySize;
@@ -185,9 +185,9 @@ void ImpSvNumMultipleReadHeader::StartEntry()
//#pragma SEG_FUNCDEF(numhead_09)
-ULONG ImpSvNumMultipleReadHeader::BytesLeft() const
+sal_uLong ImpSvNumMultipleReadHeader::BytesLeft() const
{
- ULONG nReadEnd = rStream.Tell();
+ sal_uLong nReadEnd = rStream.Tell();
if (nReadEnd <= nEntryEnd)
return nEntryEnd-nReadEnd;
@@ -200,7 +200,7 @@ ULONG ImpSvNumMultipleReadHeader::BytesLeft() const
//#pragma SEG_FUNCDEF(numhead_0a)
ImpSvNumMultipleWriteHeader::ImpSvNumMultipleWriteHeader(SvStream& rNewStream,
- ULONG nDefault) :
+ sal_uLong nDefault) :
rStream( rNewStream ),
aMemStream( 4096, 4096 )
{
@@ -215,16 +215,16 @@ ImpSvNumMultipleWriteHeader::ImpSvNumMultipleWriteHeader(SvStream& rNewStream,
ImpSvNumMultipleWriteHeader::~ImpSvNumMultipleWriteHeader()
{
- ULONG nDataEnd = rStream.Tell();
+ sal_uLong nDataEnd = rStream.Tell();
- rStream << (USHORT) SV_NUMID_SIZES;
+ rStream << (sal_uInt16) SV_NUMID_SIZES;
rStream << static_cast<sal_uInt32>(aMemStream.Tell());
rStream.Write( aMemStream.GetData(), aMemStream.Tell() );
if ( nDataEnd - nDataPos != nDataSize ) // Default getroffen?
{
nDataSize = nDataEnd - nDataPos;
- ULONG nPos = rStream.Tell();
+ sal_uLong nPos = rStream.Tell();
rStream.Seek(nDataPos-sizeof(sal_uInt32));
rStream << nDataSize; // Groesse am Anfang eintragen
rStream.Seek(nPos);
@@ -235,7 +235,7 @@ ImpSvNumMultipleWriteHeader::~ImpSvNumMultipleWriteHeader()
void ImpSvNumMultipleWriteHeader::EndEntry()
{
- ULONG nPos = rStream.Tell();
+ sal_uLong nPos = rStream.Tell();
aMemStream << static_cast<sal_uInt32>(nPos - nEntryStart);
}
@@ -243,7 +243,7 @@ void ImpSvNumMultipleWriteHeader::EndEntry()
void ImpSvNumMultipleWriteHeader::StartEntry()
{
- ULONG nPos = rStream.Tell();
+ sal_uLong nPos = rStream.Tell();
nEntryStart = nPos;
}
diff --git a/svl/source/numbers/numhead.hxx b/svl/source/numbers/numhead.hxx
index 7df06033e0d7..c268d1869b8a 100644
--- a/svl/source/numbers/numhead.hxx
+++ b/svl/source/numbers/numhead.hxx
@@ -39,24 +39,24 @@ class SvNumReadHeader
{
private:
SvStream& rStream;
- ULONG nDataEnd;
+ sal_uLong nDataEnd;
public:
SvNumReadHeader(SvStream& rNewStream);
~SvNumReadHeader();
- ULONG BytesLeft() const;
+ sal_uLong BytesLeft() const;
};
class SvNumWriteHeader
{
private:
SvStream& rStream;
- ULONG nDataPos;
- ULONG nDataSize;
+ sal_uLong nDataPos;
+ sal_uLong nDataSize;
public:
- SvNumWriteHeader(SvStream& rNewStream, ULONG nDefault = 0);
+ SvNumWriteHeader(SvStream& rNewStream, sal_uLong nDefault = 0);
~SvNumWriteHeader();
};
@@ -70,8 +70,8 @@ private:
SvStream& rStream;
char* pBuf;
SvMemoryStream* pMemStream;
- ULONG nEndPos;
- ULONG nEntryEnd;
+ sal_uLong nEndPos;
+ sal_uLong nEntryEnd;
public:
ImpSvNumMultipleReadHeader(SvStream& rNewStream);
@@ -79,7 +79,7 @@ public:
void StartEntry();
void EndEntry();
- ULONG BytesLeft() const;
+ sal_uLong BytesLeft() const;
static void Skip( SvStream& ); // komplett ueberspringen
};
@@ -89,12 +89,12 @@ class ImpSvNumMultipleWriteHeader
private:
SvStream& rStream;
SvMemoryStream aMemStream;
- ULONG nDataPos;
+ sal_uLong nDataPos;
sal_uInt32 nDataSize;
- ULONG nEntryStart;
+ sal_uLong nEntryStart;
public:
- ImpSvNumMultipleWriteHeader(SvStream& rNewStream, ULONG nDefault = 0);
+ ImpSvNumMultipleWriteHeader(SvStream& rNewStream, sal_uLong nDefault = 0);
~ImpSvNumMultipleWriteHeader();
void StartEntry();
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index 8c63ed903825..ed845372b76e 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -61,11 +61,11 @@
#endif
-const BYTE ImpSvNumberInputScan::nMatchedEndString = 0x01;
-const BYTE ImpSvNumberInputScan::nMatchedMidString = 0x02;
-const BYTE ImpSvNumberInputScan::nMatchedStartString = 0x04;
-const BYTE ImpSvNumberInputScan::nMatchedVirgin = 0x08;
-const BYTE ImpSvNumberInputScan::nMatchedUsedAsReturn = 0x10;
+const sal_uInt8 ImpSvNumberInputScan::nMatchedEndString = 0x01;
+const sal_uInt8 ImpSvNumberInputScan::nMatchedMidString = 0x02;
+const sal_uInt8 ImpSvNumberInputScan::nMatchedStartString = 0x04;
+const sal_uInt8 ImpSvNumberInputScan::nMatchedVirgin = 0x08;
+const sal_uInt8 ImpSvNumberInputScan::nMatchedUsedAsReturn = 0x10;
/* It is not clear how we want timezones to be handled. Convert them to local
* time isn't wanted, as it isn't done in any other place and timezone
@@ -117,11 +117,11 @@ void ImpSvNumberInputScan::Reset()
// ER 16.06.97 18:56 Vorbelegung erfolgt jetzt in NumberStringDivision,
// wozu immer alles loeschen wenn einiges wieder benutzt oder gar nicht
// gebraucht wird..
- for (USHORT i = 0; i < SV_MAX_ANZ_INPUT_STRINGS; i++)
+ for (sal_uInt16 i = 0; i < SV_MAX_ANZ_INPUT_STRINGS; i++)
{
sStrArray[i].Erase();
nNums[i] = SV_MAX_ANZ_INPUT_STRINGS-1;
- IsNum[i] = FALSE;
+ IsNum[i] = sal_False;
}
#endif
nMonth = 0;
@@ -149,7 +149,7 @@ void ImpSvNumberInputScan::Reset()
//---------------------------------------------------------------------------
//
// static
-inline BOOL ImpSvNumberInputScan::MyIsdigit( sal_Unicode c )
+inline sal_Bool ImpSvNumberInputScan::MyIsdigit( sal_Unicode c )
{
// If the input string wouldn't be converted using TransformInput() we'd
// to use something similar to the following and to adapt many places.
@@ -158,7 +158,7 @@ inline BOOL ImpSvNumberInputScan::MyIsdigit( sal_Unicode c )
if ( c < 128 )
return isdigit( (unsigned char) c ) != 0;
if ( c < 256 )
- return FALSE;
+ return sal_False;
String aTmp( c );
return pFormatter->GetCharClass()->isDigit( aTmp, 0 );
#else
@@ -190,19 +190,19 @@ void ImpSvNumberInputScan::TransformInput( String& rStr )
// Only simple unsigned floating point values without any error detection,
// decimal separator has to be '.'
-double ImpSvNumberInputScan::StringToDouble( const String& rStr, BOOL bForceFraction )
+double ImpSvNumberInputScan::StringToDouble( const String& rStr, sal_Bool bForceFraction )
{
double fNum = 0.0;
double fFrac = 0.0;
int nExp = 0;
xub_StrLen nPos = 0;
xub_StrLen nLen = rStr.Len();
- BOOL bPreSep = !bForceFraction;
+ sal_Bool bPreSep = !bForceFraction;
while (nPos < nLen)
{
if (rStr.GetChar(nPos) == '.')
- bPreSep = FALSE;
+ bPreSep = sal_False;
else if (bPreSep)
fNum = fNum * 10.0 + (double) (rStr.GetChar(nPos) - '0');
else
@@ -246,11 +246,11 @@ enum ScanState // States der Turing-Maschine
SsGetString = 3
};
-BOOL ImpSvNumberInputScan::NextNumberStringSymbol(
+sal_Bool ImpSvNumberInputScan::NextNumberStringSymbol(
const sal_Unicode*& pStr,
String& rSymbol )
{
- BOOL isNumber = FALSE;
+ sal_Bool isNumber = sal_False;
sal_Unicode cToken;
ScanState eState = SsStart;
register const sal_Unicode* pHere = pStr;
@@ -265,7 +265,7 @@ BOOL ImpSvNumberInputScan::NextNumberStringSymbol(
if ( MyIsdigit( cToken ) )
{
eState = SsGetValue;
- isNumber = TRUE;
+ isNumber = sal_True;
}
else
eState = SsGetString;
@@ -311,11 +311,11 @@ BOOL ImpSvNumberInputScan::NextNumberStringSymbol(
// FIXME: should be grouping; it is only used though in case nAnzStrings is
// near SV_MAX_ANZ_INPUT_STRINGS, in NumberStringDivision().
-BOOL ImpSvNumberInputScan::SkipThousands(
+sal_Bool ImpSvNumberInputScan::SkipThousands(
const sal_Unicode*& pStr,
String& rSymbol )
{
- BOOL res = FALSE;
+ sal_Bool res = sal_False;
sal_Unicode cToken;
const String& rThSep = pFormatter->GetNumThousandSep();
register const sal_Unicode* pHere = pStr;
@@ -348,7 +348,7 @@ BOOL ImpSvNumberInputScan::SkipThousands(
if (nCounter == 3)
{
eState = SsStart;
- res = TRUE; // .000 combination found
+ res = sal_True; // .000 combination found
}
}
else
@@ -385,7 +385,7 @@ void ImpSvNumberInputScan::NumberStringDivision( const String& rString )
{
if ( NextNumberStringSymbol( pStr, sStrArray[nAnzStrings] ) )
{ // Zahl
- IsNum[nAnzStrings] = TRUE;
+ IsNum[nAnzStrings] = sal_True;
nNums[nAnzNums] = nAnzStrings;
nAnzNums++;
if (nAnzStrings >= SV_MAX_ANZ_INPUT_STRINGS - 7 &&
@@ -395,7 +395,7 @@ void ImpSvNumberInputScan::NumberStringDivision( const String& rString )
}
else
{
- IsNum[nAnzStrings] = FALSE;
+ IsNum[nAnzStrings] = sal_False;
}
nAnzStrings++;
}
@@ -405,34 +405,34 @@ void ImpSvNumberInputScan::NumberStringDivision( const String& rString )
//---------------------------------------------------------------------------
// Whether rString contains rWhat at nPos
-BOOL ImpSvNumberInputScan::StringContainsImpl( const String& rWhat,
+sal_Bool ImpSvNumberInputScan::StringContainsImpl( const String& rWhat,
const String& rString, xub_StrLen nPos )
{
if ( nPos + rWhat.Len() <= rString.Len() )
return StringPtrContainsImpl( rWhat, rString.GetBuffer(), nPos );
- return FALSE;
+ return sal_False;
}
//---------------------------------------------------------------------------
// Whether pString contains rWhat at nPos
-BOOL ImpSvNumberInputScan::StringPtrContainsImpl( const String& rWhat,
+sal_Bool ImpSvNumberInputScan::StringPtrContainsImpl( const String& rWhat,
const sal_Unicode* pString, xub_StrLen nPos )
{
if ( rWhat.Len() == 0 )
- return FALSE;
+ return sal_False;
register const sal_Unicode* pWhat = rWhat.GetBuffer();
register const sal_Unicode* const pEnd = pWhat + rWhat.Len();
register const sal_Unicode* pStr = pString + nPos;
while ( pWhat < pEnd )
{
if ( *pWhat != *pStr )
- return FALSE;
+ return sal_False;
pWhat++;
pStr++;
}
- return TRUE;
+ return sal_True;
}
@@ -441,15 +441,15 @@ BOOL ImpSvNumberInputScan::StringPtrContainsImpl( const String& rWhat,
//
// ueberspringt genau das angegebene Zeichen
-inline BOOL ImpSvNumberInputScan::SkipChar( sal_Unicode c, const String& rString,
+inline sal_Bool ImpSvNumberInputScan::SkipChar( sal_Unicode c, const String& rString,
xub_StrLen& nPos )
{
if ((nPos < rString.Len()) && (rString.GetChar(nPos) == c))
{
nPos++;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -478,15 +478,15 @@ inline void ImpSvNumberInputScan::SkipBlanks( const String& rString,
//
// jump over rWhat in rString at nPos
-inline BOOL ImpSvNumberInputScan::SkipString( const String& rWhat,
+inline sal_Bool ImpSvNumberInputScan::SkipString( const String& rWhat,
const String& rString, xub_StrLen& nPos )
{
if ( StringContains( rWhat, rString, nPos ) )
{
nPos = nPos + rWhat.Len();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -495,10 +495,10 @@ inline BOOL ImpSvNumberInputScan::SkipString( const String& rWhat,
//
// recognizes exactly ,111 in {3} and {3,2} or ,11 in {3,2} grouping
-inline BOOL ImpSvNumberInputScan::GetThousandSep(
+inline sal_Bool ImpSvNumberInputScan::GetThousandSep(
const String& rString,
xub_StrLen& nPos,
- USHORT nStringPos )
+ sal_uInt16 nStringPos )
{
const String& rSep = pFormatter->GetNumThousandSep();
// Is it an ordinary space instead of a non-breaking space?
@@ -507,7 +507,7 @@ inline BOOL ImpSvNumberInputScan::GetThousandSep(
if (!( (rString == rSep || bSpaceBreak) // nothing else
&& nStringPos < nAnzStrings - 1 // safety first!
&& IsNum[nStringPos+1] )) // number follows
- return FALSE; // no? => out
+ return sal_False; // no? => out
utl::DigitGroupingIterator aGrouping(
pFormatter->GetLocaleData()->getDigitGrouping());
@@ -524,9 +524,9 @@ inline BOOL ImpSvNumberInputScan::GetThousandSep(
)
{
nPos = nPos + rSep.Len();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -534,8 +534,8 @@ inline BOOL ImpSvNumberInputScan::GetThousandSep(
// GetLogical
//
// Conversion of text to logial value
-// "TRUE" => 1:
-// "FALSE"=> -1:
+// "sal_True" => 1:
+// "sal_False"=> -1:
// else => 0:
short ImpSvNumberInputScan::GetLogical( const String& rString )
@@ -642,10 +642,10 @@ int ImpSvNumberInputScan::GetDayOfWeek( const String& rString, xub_StrLen& nPos
// GetCurrency
//
// Lesen eines Waehrungssysmbols
-// '$' => TRUE
-// sonst => FALSE
+// '$' => sal_True
+// sonst => sal_False
-BOOL ImpSvNumberInputScan::GetCurrency( const String& rString, xub_StrLen& nPos,
+sal_Bool ImpSvNumberInputScan::GetCurrency( const String& rString, xub_StrLen& nPos,
const SvNumberformat* pFormat )
{
if ( rString.Len() > nPos )
@@ -660,7 +660,7 @@ BOOL ImpSvNumberInputScan::GetCurrency( const String& rString, xub_StrLen& nPos,
if ( StringContains( aUpperCurrSymbol, rString, nPos ) )
{
nPos = nPos + aUpperCurrSymbol.Len();
- return TRUE;
+ return sal_True;
}
if ( pFormat )
{
@@ -673,14 +673,14 @@ BOOL ImpSvNumberInputScan::GetCurrency( const String& rString, xub_StrLen& nPos,
if ( StringContains( aSymbol, rString, nPos ) )
{
nPos = nPos + aSymbol.Len();
- return TRUE;
+ return sal_True;
}
}
}
}
}
- return FALSE;
+ return sal_False;
}
@@ -690,15 +690,15 @@ BOOL ImpSvNumberInputScan::GetCurrency( const String& rString, xub_StrLen& nPos,
// Lesen des Zeitsymbols (AM od. PM) f. kurze Zeitangabe
//
// Rueckgabe:
-// "AM" od. "PM" => TRUE
-// sonst => FALSE
+// "AM" od. "PM" => sal_True
+// sonst => sal_False
//
// nAmPos:
// "AM" => 1
// "PM" => -1
// sonst => 0
-BOOL ImpSvNumberInputScan::GetTimeAmPm( const String& rString, xub_StrLen& nPos )
+sal_Bool ImpSvNumberInputScan::GetTimeAmPm( const String& rString, xub_StrLen& nPos )
{
if ( rString.Len() > nPos )
@@ -709,17 +709,17 @@ BOOL ImpSvNumberInputScan::GetTimeAmPm( const String& rString, xub_StrLen& nPos
{
nAmPm = 1;
nPos = nPos + pLoc->getTimeAM().Len();
- return TRUE;
+ return sal_True;
}
else if ( StringContains( pChr->upper( pLoc->getTimePM() ), rString, nPos ) )
{
nAmPm = -1;
nPos = nPos + pLoc->getTimePM().Len();
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
@@ -727,10 +727,10 @@ BOOL ImpSvNumberInputScan::GetTimeAmPm( const String& rString, xub_StrLen& nPos
// GetDecSep
//
// Lesen eines Dezimaltrenners (',')
-// ',' => TRUE
-// sonst => FALSE
+// ',' => sal_True
+// sonst => sal_False
-inline BOOL ImpSvNumberInputScan::GetDecSep( const String& rString, xub_StrLen& nPos )
+inline sal_Bool ImpSvNumberInputScan::GetDecSep( const String& rString, xub_StrLen& nPos )
{
if ( rString.Len() > nPos )
{
@@ -738,17 +738,17 @@ inline BOOL ImpSvNumberInputScan::GetDecSep( const String& rString, xub_StrLen&
if ( rString.Equals( rSep, nPos, rSep.Len() ) )
{
nPos = nPos + rSep.Len();
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
//---------------------------------------------------------------------------
// read a hundredth seconds separator
-inline BOOL ImpSvNumberInputScan::GetTime100SecSep( const String& rString, xub_StrLen& nPos )
+inline sal_Bool ImpSvNumberInputScan::GetTime100SecSep( const String& rString, xub_StrLen& nPos )
{
if ( rString.Len() > nPos )
{
@@ -756,10 +756,10 @@ inline BOOL ImpSvNumberInputScan::GetTime100SecSep( const String& rString, xub_S
if ( rString.Equals( rSep, nPos, rSep.Len() ) )
{
nPos = nPos + rSep.Len();
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
@@ -827,15 +827,15 @@ short ImpSvNumberInputScan::GetESign( const String& rString, xub_StrLen& nPos )
// i counts string portions, j counts numbers thereof.
// It should had been called SkipNumber instead.
-inline BOOL ImpSvNumberInputScan::GetNextNumber( USHORT& i, USHORT& j )
+inline sal_Bool ImpSvNumberInputScan::GetNextNumber( sal_uInt16& i, sal_uInt16& j )
{
if ( i < nAnzStrings && IsNum[i] )
{
j++;
i++;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -844,19 +844,19 @@ inline BOOL ImpSvNumberInputScan::GetNextNumber( USHORT& i, USHORT& j )
void ImpSvNumberInputScan::GetTimeRef(
double& fOutNumber,
- USHORT nIndex, // j-value of the first numeric time part of input, default 0
- USHORT nAnz ) // count of numeric time parts
+ sal_uInt16 nIndex, // j-value of the first numeric time part of input, default 0
+ sal_uInt16 nAnz ) // count of numeric time parts
{
- USHORT nHour;
- USHORT nMinute = 0;
- USHORT nSecond = 0;
+ sal_uInt16 nHour;
+ sal_uInt16 nMinute = 0;
+ sal_uInt16 nSecond = 0;
double fSecond100 = 0.0;
- USHORT nStartIndex = nIndex;
+ sal_uInt16 nStartIndex = nIndex;
if (nTimezonePos)
{
// find first timezone number index and adjust count
- for (USHORT j=0; j<nAnzNums; ++j)
+ for (sal_uInt16 j=0; j<nAnzNums; ++j)
{
if (nNums[j] == nTimezonePos)
{
@@ -871,7 +871,7 @@ void ImpSvNumberInputScan::GetTimeRef(
if (nDecPos == 2 && (nAnz == 3 || nAnz == 2)) // 20:45.5 or 45.5
nHour = 0;
else if (nIndex - nStartIndex < nAnz)
- nHour = (USHORT) sStrArray[nNums[nIndex++]].ToInt32();
+ nHour = (sal_uInt16) sStrArray[nNums[nIndex++]].ToInt32();
else
{
nHour = 0;
@@ -880,11 +880,11 @@ void ImpSvNumberInputScan::GetTimeRef(
if (nDecPos == 2 && nAnz == 2) // 45.5
nMinute = 0;
else if (nIndex - nStartIndex < nAnz)
- nMinute = (USHORT) sStrArray[nNums[nIndex++]].ToInt32();
+ nMinute = (sal_uInt16) sStrArray[nNums[nIndex++]].ToInt32();
if (nIndex - nStartIndex < nAnz)
- nSecond = (USHORT) sStrArray[nNums[nIndex++]].ToInt32();
+ nSecond = (sal_uInt16) sStrArray[nNums[nIndex++]].ToInt32();
if (nIndex - nStartIndex < nAnz)
- fSecond100 = StringToDouble( sStrArray[nNums[nIndex]], TRUE );
+ fSecond100 = StringToDouble( sStrArray[nNums[nIndex]], sal_True );
if (nAmPm == -1 && nHour != 12) // PM
nHour += 12;
else if (nAmPm == 1 && nHour == 12) // 12 AM
@@ -900,13 +900,13 @@ void ImpSvNumberInputScan::GetTimeRef(
//---------------------------------------------------------------------------
// ImplGetDay
-USHORT ImpSvNumberInputScan::ImplGetDay( USHORT nIndex )
+sal_uInt16 ImpSvNumberInputScan::ImplGetDay( sal_uInt16 nIndex )
{
- USHORT nRes = 0;
+ sal_uInt16 nRes = 0;
if (sStrArray[nNums[nIndex]].Len() <= 2)
{
- USHORT nNum = (USHORT) sStrArray[nNums[nIndex]].ToInt32();
+ sal_uInt16 nNum = (sal_uInt16) sStrArray[nNums[nIndex]].ToInt32();
if (nNum <= 31)
nRes = nNum;
}
@@ -918,14 +918,14 @@ USHORT ImpSvNumberInputScan::ImplGetDay( USHORT nIndex )
//---------------------------------------------------------------------------
// ImplGetMonth
-USHORT ImpSvNumberInputScan::ImplGetMonth( USHORT nIndex )
+sal_uInt16 ImpSvNumberInputScan::ImplGetMonth( sal_uInt16 nIndex )
{
// preset invalid month number
- USHORT nRes = pFormatter->GetCalendar()->getNumberOfMonthsInYear();
+ sal_uInt16 nRes = pFormatter->GetCalendar()->getNumberOfMonthsInYear();
if (sStrArray[nNums[nIndex]].Len() <= 2)
{
- USHORT nNum = (USHORT) sStrArray[nNums[nIndex]].ToInt32();
+ sal_uInt16 nNum = (sal_uInt16) sStrArray[nNums[nIndex]].ToInt32();
if ( 0 < nNum && nNum <= nRes )
nRes = nNum - 1; // zero based for CalendarFieldIndex::MONTH
}
@@ -939,13 +939,13 @@ USHORT ImpSvNumberInputScan::ImplGetMonth( USHORT nIndex )
//
// 30 -> 1930, 29 -> 2029, oder 56 -> 1756, 55 -> 1855, ...
-USHORT ImpSvNumberInputScan::ImplGetYear( USHORT nIndex )
+sal_uInt16 ImpSvNumberInputScan::ImplGetYear( sal_uInt16 nIndex )
{
- USHORT nYear = 0;
+ sal_uInt16 nYear = 0;
if (sStrArray[nNums[nIndex]].Len() <= 4)
{
- nYear = (USHORT) sStrArray[nNums[nIndex]].ToInt32();
+ nYear = (sal_uInt16) sStrArray[nNums[nIndex]].ToInt32();
nYear = SvNumberFormatter::ExpandTwoDigitYear( nYear, nYear2000 );
}
@@ -970,7 +970,7 @@ bool ImpSvNumberInputScan::MayBeIso8601()
//---------------------------------------------------------------------------
// GetDateRef
-BOOL ImpSvNumberInputScan::GetDateRef( double& fDays, USHORT& nCounter,
+sal_Bool ImpSvNumberInputScan::GetDateRef( double& fDays, sal_uInt16& nCounter,
const SvNumberformat* pFormat )
{
using namespace ::com::sun::star::i18n;
@@ -997,7 +997,7 @@ BOOL ImpSvNumberInputScan::GetDateRef( double& fDays, USHORT& nCounter,
eEDF = NF_EVALDATEFORMAT_INTL;
nFormatOrder = 1;
}
- BOOL res = TRUE;
+ sal_Bool res = sal_True;
const LocaleDataWrapper* pLoc = pFormatter->GetLocaleData();
CalendarWrapper* pCal = pFormatter->GetCalendar();
@@ -1006,45 +1006,45 @@ BOOL ImpSvNumberInputScan::GetDateRef( double& fDays, USHORT& nCounter,
pCal->setGregorianDateTime( Date() ); // today
String aOrgCalendar; // empty => not changed yet
DateFormat DateFmt;
- BOOL bFormatTurn;
+ sal_Bool bFormatTurn;
switch ( eEDF )
{
case NF_EVALDATEFORMAT_INTL :
- bFormatTurn = FALSE;
+ bFormatTurn = sal_False;
DateFmt = pLoc->getDateFormat();
break;
case NF_EVALDATEFORMAT_FORMAT :
- bFormatTurn = TRUE;
+ bFormatTurn = sal_True;
DateFmt = pFormat->GetDateOrder();
break;
case NF_EVALDATEFORMAT_INTL_FORMAT :
if ( nTryOrder == 1 )
{
- bFormatTurn = FALSE;
+ bFormatTurn = sal_False;
DateFmt = pLoc->getDateFormat();
}
else
{
- bFormatTurn = TRUE;
+ bFormatTurn = sal_True;
DateFmt = pFormat->GetDateOrder();
}
break;
case NF_EVALDATEFORMAT_FORMAT_INTL :
if ( nTryOrder == 2 )
{
- bFormatTurn = FALSE;
+ bFormatTurn = sal_False;
DateFmt = pLoc->getDateFormat();
}
else
{
- bFormatTurn = TRUE;
+ bFormatTurn = sal_True;
DateFmt = pFormat->GetDateOrder();
}
break;
default:
DBG_ERROR( "ImpSvNumberInputScan::GetDateRef: unknown NfEvalDateFormat" );
DateFmt = YMD;
- bFormatTurn = FALSE;
+ bFormatTurn = sal_False;
}
if ( bFormatTurn )
{
@@ -1083,7 +1083,7 @@ input for the following reasons:
#endif
}
- res = TRUE;
+ res = sal_True;
nCounter = 0;
// For incomplete dates, always assume first day of month if not specified.
pCal->setValue( CalendarFieldIndex::DAY_OF_MONTH, 1 );
@@ -1094,7 +1094,7 @@ input for the following reasons:
if (nMonthPos) // only month (Jan)
pCal->setValue( CalendarFieldIndex::MONTH, Abs(nMonth)-1 );
else
- res = FALSE;
+ res = sal_False;
break;
case 1: // only one number
@@ -1116,7 +1116,7 @@ input for the following reasons:
pCal->setValue( CalendarFieldIndex::YEAR, ImplGetYear(0) );
break;
default:
- res = FALSE;
+ res = sal_False;
break;
}
break;
@@ -1131,12 +1131,12 @@ input for the following reasons:
pCal->setValue( CalendarFieldIndex::YEAR, ImplGetYear(0) );
break;
default:
- res = FALSE;
+ res = sal_False;
break;
}
break;
default:
- res = FALSE;
+ res = sal_False;
break;
} // switch (nMonthPos)
break;
@@ -1223,7 +1223,7 @@ input for the following reasons:
}
break;
default:
- res = FALSE;
+ res = sal_False;
break;
}
}
@@ -1262,12 +1262,12 @@ input for the following reasons:
pCal->setValue( CalendarFieldIndex::YEAR, ImplGetYear(0) );
break;
default:
- res = FALSE;
+ res = sal_False;
break;
}
break;
default: // else, e.g. month at the end (94 10 Jan)
- res = FALSE;
+ res = sal_False;
break;
} // switch (nMonthPos)
break;
@@ -1280,7 +1280,7 @@ input for the following reasons:
nCounter = 3;
if ( nTimePos > 1 )
{ // find first time number index (should only be 3 or 2 anyway)
- for ( USHORT j = 0; j < nAnzNums; j++ )
+ for ( sal_uInt16 j = 0; j < nAnzNums; j++ )
{
if ( nNums[j] == nTimePos - 2 )
{
@@ -1312,7 +1312,7 @@ input for the following reasons:
pCal->setValue( CalendarFieldIndex::YEAR, ImplGetYear(0) );
break;
default:
- res = FALSE;
+ res = sal_False;
break;
}
}
@@ -1327,7 +1327,7 @@ input for the following reasons:
pCal->setValue( CalendarFieldIndex::YEAR, ImplGetYear(1) );
break;
default:
- res = FALSE;
+ res = sal_False;
break;
}
break;
@@ -1345,13 +1345,13 @@ input for the following reasons:
pCal->setValue( CalendarFieldIndex::YEAR, ImplGetYear(0) );
break;
default:
- res = FALSE;
+ res = sal_False;
break;
}
break;
default: // else, e.g. month at the end (94 10 Jan 8:23)
nCounter = 2;
- res = FALSE;
+ res = sal_False;
break;
} // switch (nMonthPos)
break;
@@ -1365,7 +1365,7 @@ input for the following reasons:
nTryOrder = nFormatOrder; // break for
}
else
- res = FALSE;
+ res = sal_False;
if ( aOrgCalendar.Len() )
pCal->loadCalendar( aOrgCalendar, pLoc->getLocale() ); // restore calendar
@@ -1463,10 +1463,10 @@ input for the following reasons:
// ScanStartString
//
// ersten String analysieren
-// Alles weg => TRUE
-// sonst => FALSE
+// Alles weg => sal_True
+// sonst => sal_False
-BOOL ImpSvNumberInputScan::ScanStartString( const String& rString,
+sal_Bool ImpSvNumberInputScan::ScanStartString( const String& rString,
const SvNumberformat* pFormat )
{
xub_StrLen nPos = 0;
@@ -1485,7 +1485,7 @@ BOOL ImpSvNumberInputScan::ScanStartString( const String& rString,
{ // Match against format in any case, so later on for a "x1-2-3" input
// we may distinguish between a xy-m-d (or similar) date and a x0-0-0
// format. No sign detection here!
- if ( ScanStringNumFor( rString, nPos, pFormat, 0, TRUE ) )
+ if ( ScanStringNumFor( rString, nPos, pFormat, 0, sal_True ) )
nMatchedAllStrings |= nMatchedStartString;
else
nMatchedAllStrings = 0;
@@ -1558,7 +1558,7 @@ BOOL ImpSvNumberInputScan::ScanStartString( const String& rString,
return MatchedReturn();
}
- return TRUE;
+ return sal_True;
}
@@ -1566,11 +1566,11 @@ BOOL ImpSvNumberInputScan::ScanStartString( const String& rString,
// ScanMidString
//
// String in der Mitte analysieren
-// Alles weg => TRUE
-// sonst => FALSE
+// Alles weg => sal_True
+// sonst => sal_False
-BOOL ImpSvNumberInputScan::ScanMidString( const String& rString,
- USHORT nStringPos, const SvNumberformat* pFormat )
+sal_Bool ImpSvNumberInputScan::ScanMidString( const String& rString,
+ sal_uInt16 nStringPos, const SvNumberformat* pFormat )
{
xub_StrLen nPos = 0;
short eOldScannedType = eScannedType;
@@ -1800,10 +1800,10 @@ BOOL ImpSvNumberInputScan::ScanMidString( const String& rString,
if ( nMatchedAllStrings & ~nMatchedVirgin )
eScannedType = eOldScannedType;
else
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
@@ -1811,10 +1811,10 @@ BOOL ImpSvNumberInputScan::ScanMidString( const String& rString,
// ScanEndString
//
// Schlussteil analysieren
-// Alles weg => TRUE
-// sonst => FALSE
+// Alles weg => sal_True
+// sonst => sal_False
-BOOL ImpSvNumberInputScan::ScanEndString( const String& rString,
+sal_Bool ImpSvNumberInputScan::ScanEndString( const String& rString,
const SvNumberformat* pFormat )
{
xub_StrLen nPos = 0;
@@ -2045,30 +2045,30 @@ BOOL ImpSvNumberInputScan::ScanEndString( const String& rString,
{
// does input EndString equal EndString in Format?
if ( !ScanStringNumFor( rString, nPos, pFormat, 0xFFFF ) )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
-BOOL ImpSvNumberInputScan::ScanStringNumFor(
+sal_Bool ImpSvNumberInputScan::ScanStringNumFor(
const String& rString, // String to scan
xub_StrLen nPos, // Position until which was consumed
const SvNumberformat* pFormat, // The format to match
- USHORT nString, // Substring of format, 0xFFFF => last
- BOOL bDontDetectNegation // Suppress sign detection
+ sal_uInt16 nString, // Substring of format, 0xFFFF => last
+ sal_Bool bDontDetectNegation // Suppress sign detection
)
{
if ( !pFormat )
- return FALSE;
+ return sal_False;
const ::utl::TransliterationWrapper* pTransliteration = pFormatter->GetTransliteration();
const String* pStr;
String aString( rString );
- BOOL bFound = FALSE;
- BOOL bFirst = TRUE;
- BOOL bContinue = TRUE;
- USHORT nSub;
+ sal_Bool bFound = sal_False;
+ sal_Bool bFirst = sal_True;
+ sal_Bool bContinue = sal_True;
+ sal_uInt16 nSub;
do
{
// Don't try "lower" subformats ff the very first match was the second
@@ -2077,22 +2077,22 @@ BOOL ImpSvNumberInputScan::ScanStringNumFor(
do
{ // Step through subformats, first positive, then negative, then
// other, but not the last (text) subformat.
- pStr = pFormat->GetNumForString( nSub, nString, TRUE );
+ pStr = pFormat->GetNumForString( nSub, nString, sal_True );
if ( pStr && pTransliteration->isEqual( aString, *pStr ) )
{
- bFound = TRUE;
- bContinue = FALSE;
+ bFound = sal_True;
+ bContinue = sal_False;
}
else if ( nSub < 2 )
++nSub;
else
- bContinue = FALSE;
+ bContinue = sal_False;
} while ( bContinue );
if ( !bFound && bFirst && nPos )
{ // try remaining substring
- bFirst = FALSE;
+ bFirst = sal_False;
aString.Erase( 0, nPos );
- bContinue = TRUE;
+ bContinue = sal_True;
}
} while ( bContinue );
@@ -2104,13 +2104,13 @@ BOOL ImpSvNumberInputScan::ScanStringNumFor(
aString.EraseAllChars( ' ' );
if ( (aString.Len() == 1) && (aString.GetChar(0) == '-') )
{
- bFound = TRUE;
+ bFound = sal_True;
nStringScanSign = -1;
nSub = 0; //! not 1
}
}
if ( !bFound )
- return FALSE;
+ return sal_False;
}
else if ( !bDontDetectNegation && (nSub == 1) &&
pFormat->IsNegativeRealNegative() )
@@ -2138,7 +2138,7 @@ BOOL ImpSvNumberInputScan::ScanStringNumFor(
nStringScanSign = -1;
}
nStringScanNumFor = nSub;
- return TRUE;
+ return sal_True;
}
@@ -2146,9 +2146,9 @@ BOOL ImpSvNumberInputScan::ScanStringNumFor(
// IsNumberFormatMain
//
// Recognizes types of number, exponential, fraction, percent, currency, date, time.
-// Else text => return FALSE
+// Else text => return sal_False
-BOOL ImpSvNumberInputScan::IsNumberFormatMain(
+sal_Bool ImpSvNumberInputScan::IsNumberFormatMain(
const String& rString, // string to be analyzed
double& , // OUT: result as number, if possible
const SvNumberformat* pFormat ) // maybe number format set to match against
@@ -2156,7 +2156,7 @@ BOOL ImpSvNumberInputScan::IsNumberFormatMain(
Reset();
NumberStringDivision( rString ); // breakdown into strings and numbers
if (nAnzStrings >= SV_MAX_ANZ_INPUT_STRINGS) // too many elements
- return FALSE; // Njet, Nope, ...
+ return sal_False; // Njet, Nope, ...
if (nAnzNums == 0) // no number in input
{
@@ -2172,17 +2172,17 @@ BOOL ImpSvNumberInputScan::IsNumberFormatMain(
{
eScannedType = NUMBERFORMAT_LOGICAL; // !!! it's a BOOLEAN
nMatchedAllStrings &= ~nMatchedVirgin;
- return TRUE;
+ return sal_True;
}
else
- return FALSE; // simple text
+ return sal_False; // simple text
}
else
- return FALSE; // simple text
+ return sal_False; // simple text
}
- USHORT i = 0; // mark any symbol
- USHORT j = 0; // mark only numbers
+ sal_uInt16 i = 0; // mark any symbol
+ sal_uInt16 j = 0; // mark only numbers
switch ( nAnzNums )
{
@@ -2197,14 +2197,14 @@ BOOL ImpSvNumberInputScan::IsNumberFormatMain(
{
eScannedType = NUMBERFORMAT_FRACTION;
nMatchedAllStrings &= ~nMatchedVirgin;
- return TRUE;
+ return sal_True;
}
}
}
else
{ // Analyze start string
if (!ScanStartString( sStrArray[i], pFormat )) // i=0
- return FALSE; // already an error
+ return sal_False; // already an error
i++; // next symbol, i=1
}
GetNextNumber(i,j); // i=1,2
@@ -2219,11 +2219,11 @@ BOOL ImpSvNumberInputScan::IsNumberFormatMain(
{
eScannedType = NUMBERFORMAT_FRACTION;
nMatchedAllStrings &= ~nMatchedVirgin;
- return TRUE;
+ return sal_True;
}
}
if (i < nAnzStrings && !ScanEndString( sStrArray[i], pFormat ))
- return FALSE;
+ return sal_False;
}
break;
case 2 : // Exactly 2 numbers in input
@@ -2231,16 +2231,16 @@ BOOL ImpSvNumberInputScan::IsNumberFormatMain(
if (!GetNextNumber(i,j)) // i=1,0
{ // Analyze start string
if (!ScanStartString( sStrArray[i], pFormat ))
- return FALSE; // already an error
+ return sal_False; // already an error
i++; // i=1
}
GetNextNumber(i,j); // i=1,2
if ( !ScanMidString( sStrArray[i], i, pFormat ) )
- return FALSE;
+ return sal_False;
i++; // next symbol, i=2,3
GetNextNumber(i,j); // i=3,4
if (i < nAnzStrings && !ScanEndString( sStrArray[i], pFormat ))
- return FALSE;
+ return sal_False;
if (eSetType == NUMBERFORMAT_FRACTION) // -1,200. as fraction
{
if (!nNegCheck && // no sign '('
@@ -2250,7 +2250,7 @@ BOOL ImpSvNumberInputScan::IsNumberFormatMain(
{
eScannedType = NUMBERFORMAT_FRACTION;
nMatchedAllStrings &= ~nMatchedVirgin;
- return TRUE;
+ return sal_True;
}
}
}
@@ -2260,24 +2260,24 @@ BOOL ImpSvNumberInputScan::IsNumberFormatMain(
if (!GetNextNumber(i,j)) // i=1,0
{ // Analyze start string
if (!ScanStartString( sStrArray[i], pFormat ))
- return FALSE; // already an error
+ return sal_False; // already an error
i++; // i=1
if (nDecPos == 1) // decimal separator at start => error
- return FALSE;
+ return sal_False;
}
GetNextNumber(i,j); // i=1,2
if ( !ScanMidString( sStrArray[i], i, pFormat ) )
- return FALSE;
+ return sal_False;
i++; // i=2,3
if (eScannedType == NUMBERFORMAT_SCIENTIFIC) // E only at end
- return FALSE;
+ return sal_False;
GetNextNumber(i,j); // i=3,4
if ( !ScanMidString( sStrArray[i], i, pFormat ) )
- return FALSE;
+ return sal_False;
i++; // i=4,5
GetNextNumber(i,j); // i=5,6
if (i < nAnzStrings && !ScanEndString( sStrArray[i], pFormat ))
- return FALSE;
+ return sal_False;
if (eSetType == NUMBERFORMAT_FRACTION) // -1,200,100. as fraction
{
if (!nNegCheck && // no sign '('
@@ -2287,11 +2287,11 @@ BOOL ImpSvNumberInputScan::IsNumberFormatMain(
{
eScannedType = NUMBERFORMAT_FRACTION;
nMatchedAllStrings &= ~nMatchedVirgin;
- return TRUE;
+ return sal_True;
}
}
if ( eScannedType == NUMBERFORMAT_FRACTION && nDecPos )
- return FALSE; // #36857# not a real fraction
+ return sal_False; // #36857# not a real fraction
}
break;
default: // More than 3 numbers in input
@@ -2299,45 +2299,45 @@ BOOL ImpSvNumberInputScan::IsNumberFormatMain(
if (!GetNextNumber(i,j)) // i=1,0
{ // Analyze startstring
if (!ScanStartString( sStrArray[i], pFormat ))
- return FALSE; // already an error
+ return sal_False; // already an error
i++; // i=1
if (nDecPos == 1) // decimal separator at start => error
- return FALSE;
+ return sal_False;
}
GetNextNumber(i,j); // i=1,2
if ( !ScanMidString( sStrArray[i], i, pFormat ) )
- return FALSE;
+ return sal_False;
i++; // i=2,3
- USHORT nThOld = 10; // just not 0 or 1
+ sal_uInt16 nThOld = 10; // just not 0 or 1
while (nThOld != nThousand && j < nAnzNums-1)
// Execute at least one time
// but leave one number.
{ // Loop over group separators
nThOld = nThousand;
if (eScannedType == NUMBERFORMAT_SCIENTIFIC) // E only at end
- return FALSE;
+ return sal_False;
GetNextNumber(i,j);
if ( i < nAnzStrings && !ScanMidString( sStrArray[i], i, pFormat ) )
- return FALSE;
+ return sal_False;
i++;
}
if (eScannedType == NUMBERFORMAT_DATE || // long date or
eScannedType == NUMBERFORMAT_TIME || // long time or
eScannedType == NUMBERFORMAT_UNDEFINED) // long number
{
- for (USHORT k = j; k < nAnzNums-1; k++)
+ for (sal_uInt16 k = j; k < nAnzNums-1; k++)
{
if (eScannedType == NUMBERFORMAT_SCIENTIFIC) // E only at endd
- return FALSE;
+ return sal_False;
GetNextNumber(i,j);
if ( i < nAnzStrings && !ScanMidString( sStrArray[i], i, pFormat ) )
- return FALSE;
+ return sal_False;
i++;
}
}
GetNextNumber(i,j);
if (i < nAnzStrings && !ScanEndString( sStrArray[i], pFormat ))
- return FALSE;
+ return sal_False;
if (eSetType == NUMBERFORMAT_FRACTION) // -1,200,100. as fraction
{
if (!nNegCheck && // no sign '('
@@ -2347,11 +2347,11 @@ BOOL ImpSvNumberInputScan::IsNumberFormatMain(
{
eScannedType = NUMBERFORMAT_FRACTION;
nMatchedAllStrings &= ~nMatchedVirgin;
- return TRUE;
+ return sal_True;
}
}
if ( eScannedType == NUMBERFORMAT_FRACTION && nDecPos )
- return FALSE; // #36857# not a real fraction
+ return sal_False; // #36857# not a real fraction
}
}
@@ -2359,18 +2359,18 @@ BOOL ImpSvNumberInputScan::IsNumberFormatMain(
{
nMatchedAllStrings &= ~nMatchedVirgin;
// did match including nMatchedUsedAsReturn
- BOOL bDidMatch = (nMatchedAllStrings != 0);
+ sal_Bool bDidMatch = (nMatchedAllStrings != 0);
if ( nMatchedAllStrings )
{
- BOOL bMatch = (pFormat ? pFormat->IsNumForStringElementCountEqual(
- nStringScanNumFor, nAnzStrings, nAnzNums ) : FALSE);
+ sal_Bool bMatch = (pFormat ? pFormat->IsNumForStringElementCountEqual(
+ nStringScanNumFor, nAnzStrings, nAnzNums ) : sal_False);
if ( !bMatch )
nMatchedAllStrings = 0;
}
if ( nMatchedAllStrings )
eScannedType = eSetType;
else if ( bDidMatch )
- return FALSE;
+ return sal_False;
else
eScannedType = NUMBERFORMAT_NUMBER;
// everything else should have been recognized by now
@@ -2378,36 +2378,36 @@ BOOL ImpSvNumberInputScan::IsNumberFormatMain(
else if ( eScannedType == NUMBERFORMAT_DATE )
{ // the very relaxed date input checks may interfere with a preset format
nMatchedAllStrings &= ~nMatchedVirgin;
- BOOL bWasReturn = ((nMatchedAllStrings & nMatchedUsedAsReturn) != 0);
+ sal_Bool bWasReturn = ((nMatchedAllStrings & nMatchedUsedAsReturn) != 0);
if ( nMatchedAllStrings )
{
- BOOL bMatch = (pFormat ? pFormat->IsNumForStringElementCountEqual(
- nStringScanNumFor, nAnzStrings, nAnzNums ) : FALSE);
+ sal_Bool bMatch = (pFormat ? pFormat->IsNumForStringElementCountEqual(
+ nStringScanNumFor, nAnzStrings, nAnzNums ) : sal_False);
if ( !bMatch )
nMatchedAllStrings = 0;
}
if ( nMatchedAllStrings )
eScannedType = eSetType;
else if ( bWasReturn )
- return FALSE;
+ return sal_False;
}
else
nMatchedAllStrings = 0; // reset flag to no substrings matched
- return TRUE;
+ return sal_True;
}
//---------------------------------------------------------------------------
-// return TRUE or FALSE depending on the nMatched... state and remember usage
-BOOL ImpSvNumberInputScan::MatchedReturn()
+// return sal_True or sal_False depending on the nMatched... state and remember usage
+sal_Bool ImpSvNumberInputScan::MatchedReturn()
{
if ( nMatchedAllStrings & ~nMatchedVirgin )
{
nMatchedAllStrings |= nMatchedUsedAsReturn;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -2442,7 +2442,7 @@ void ImpSvNumberInputScan::InitText()
pUpperDayText[j] = pChrCls->upper( xElems[j].FullName );
pUpperAbbrevDayText[j] = pChrCls->upper( xElems[j].AbbrevName );
}
- bTextInitialized = TRUE;
+ bTextInitialized = sal_True;
}
@@ -2461,7 +2461,7 @@ void ImpSvNumberInputScan::ChangeIntl()
cDecSep == '/' ||
cDecSep == '.' ||
cDecSep == pFormatter->GetDateSep().GetChar(0) );
- bTextInitialized = FALSE;
+ bTextInitialized = sal_False;
aUpperCurrSymbol.Erase();
}
@@ -2470,9 +2470,9 @@ void ImpSvNumberInputScan::ChangeIntl()
// ChangeNullDate
void ImpSvNumberInputScan::ChangeNullDate(
- const USHORT Day,
- const USHORT Month,
- const USHORT Year )
+ const sal_uInt16 Day,
+ const sal_uInt16 Month,
+ const sal_uInt16 Year )
{
if ( pNullDate )
*pNullDate = Date(Day, Month, Year);
@@ -2486,7 +2486,7 @@ void ImpSvNumberInputScan::ChangeNullDate(
//
// => does rString represent a number (also date, time et al)
-BOOL ImpSvNumberInputScan::IsNumberFormat(
+sal_Bool ImpSvNumberInputScan::IsNumberFormat(
const String& rString, // string to be analyzed
short& F_Type, // IN: old type, OUT: new type
double& fOutNumber, // OUT: number if convertable
@@ -2494,13 +2494,13 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
{
String sResString;
String aString;
- BOOL res; // return value
+ sal_Bool res; // return value
eSetType = F_Type; // old type set
if ( !rString.Len() )
- res = FALSE;
+ res = sal_False;
else if (rString.Len() > 308) // arbitrary
- res = FALSE;
+ res = sal_False;
else
{
// NoMoreUpperNeeded, all comparisons on UpperCase
@@ -2516,7 +2516,7 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
|| (nSign && (eScannedType == NUMBERFORMAT_DATE
|| eScannedType == NUMBERFORMAT_DATETIME))
) // signed date/datetime
- res = FALSE;
+ res = sal_False;
else
{ // check count of partial number strings
switch (eScannedType)
@@ -2530,7 +2530,7 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
if ( nMatchedAllStrings )
nThousand = nAnzNums - 1;
else if ( nAnzNums != 1 )
- res = FALSE;
+ res = sal_False;
}
else if (nDecPos == 2) // 1.05
{
@@ -2538,7 +2538,7 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
if ( nMatchedAllStrings )
nThousand = nAnzNums - 1;
else if ( nAnzNums != nThousand+2 )
- res = FALSE;
+ res = sal_False;
}
else // 1,100 or 1,100.
{
@@ -2546,7 +2546,7 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
if ( nMatchedAllStrings )
nThousand = nAnzNums - 1;
else if ( nAnzNums != nThousand+1 )
- res = FALSE;
+ res = sal_False;
}
break;
@@ -2554,17 +2554,17 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
if (nDecPos == 1) // .05
{
if (nAnzNums != 2)
- res = FALSE;
+ res = sal_False;
}
else if (nDecPos == 2) // 1.05
{
if (nAnzNums != nThousand+3)
- res = FALSE;
+ res = sal_False;
}
else // 1,100 or 1,100.
{
if (nAnzNums != nThousand+2)
- res = FALSE;
+ res = sal_False;
}
break;
@@ -2572,12 +2572,12 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
if (nMonth)
{ // month name and numbers
if (nAnzNums > 2)
- res = FALSE;
+ res = sal_False;
}
else
{
if (nAnzNums > 3)
- res = FALSE;
+ res = sal_False;
}
break;
@@ -2585,12 +2585,12 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
if (nDecPos)
{ // hundredth seconds included
if (nAnzNums > 4)
- res = FALSE;
+ res = sal_False;
}
else
{
if (nAnzNums > 3)
- res = FALSE;
+ res = sal_False;
}
break;
@@ -2600,12 +2600,12 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
if (nDecPos)
{ // hundredth seconds included
if (nAnzNums > 6)
- res = FALSE;
+ res = sal_False;
}
else
{
if (nAnzNums > 5)
- res = FALSE;
+ res = sal_False;
}
}
else
@@ -2613,12 +2613,12 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
if (nDecPos)
{ // hundredth seconds included
if (nAnzNums > 7)
- res = FALSE;
+ res = sal_False;
}
else
{
if (nAnzNums > 6)
- res = FALSE;
+ res = sal_False;
}
}
break;
@@ -2639,7 +2639,7 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
else if (nLogical == -1)
fOutNumber = 0.0; // False
else
- res = FALSE; // Oops
+ res = sal_False; // Oops
break;
case NUMBERFORMAT_PERCENT:
@@ -2652,13 +2652,13 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
sResString.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "0." ) );
else
sResString.Erase();
- USHORT k;
+ sal_uInt16 k;
for ( k = 0; k <= nThousand; k++)
sResString += sStrArray[nNums[k]]; // integer part
if ( nDecPos == 2 && k < nAnzNums ) // . somewhere
{
sResString += '.';
- USHORT nStop = (eScannedType == NUMBERFORMAT_SCIENTIFIC ?
+ sal_uInt16 nStop = (eScannedType == NUMBERFORMAT_SCIENTIFIC ?
nAnzNums-1 : nAnzNums);
for ( ; k < nStop; k++)
sResString += sStrArray[nNums[k]]; // fractional part
@@ -2682,7 +2682,7 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
fOutNumber = 0.0;
else
fOutNumber = DBL_MAX;
-/*!*/ return TRUE;
+/*!*/ return sal_True;
}
}
@@ -2719,12 +2719,12 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
if (fNenner != 0.0)
fOutNumber = fZaehler/fNenner;
else
- res = FALSE;
+ res = sal_False;
}
}
else // nAnzNums > 2
{
- USHORT k = 1;
+ sal_uInt16 k = 1;
sResString = sStrArray[nNums[0]];
if (nThousand > 0)
for (k = 1; k <= nThousand; k++)
@@ -2738,7 +2738,7 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
if (fNenner != 0.0)
fOutNumber += fZaehler/fNenner;
else
- res = FALSE;
+ res = sal_False;
}
}
@@ -2761,14 +2761,14 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
case NUMBERFORMAT_DATE:
{
- USHORT nCounter = 0; // dummy here
+ sal_uInt16 nCounter = 0; // dummy here
res = GetDateRef( fOutNumber, nCounter, pFormat );
}
break;
case NUMBERFORMAT_DATETIME:
{
- USHORT nCounter = 0; // needed here
+ sal_uInt16 nCounter = 0; // needed here
res = GetDateRef( fOutNumber, nCounter, pFormat );
if ( res )
{
@@ -2792,17 +2792,17 @@ BOOL ImpSvNumberInputScan::IsNumberFormat(
{
F_Type = NUMBERFORMAT_TEXT;
fOutNumber = -DBL_MAX;
- return TRUE;
+ return sal_True;
}
else if (fOutNumber > DBL_MAX) // 1.7E308
{
F_Type = NUMBERFORMAT_TEXT;
fOutNumber = DBL_MAX;
- return TRUE;
+ return sal_True;
}
}
- if (res == FALSE)
+ if (res == sal_False)
{
eScannedType = NUMBERFORMAT_TEXT;
fOutNumber = 0.0;
diff --git a/svl/source/numbers/zforfind.hxx b/svl/source/numbers/zforfind.hxx
index 42571f56dd92..3dc7976f6a59 100644
--- a/svl/source/numbers/zforfind.hxx
+++ b/svl/source/numbers/zforfind.hxx
@@ -46,12 +46,12 @@ public:
/// set reference date for offset calculation
void ChangeNullDate(
- const USHORT nDay,
- const USHORT nMonth,
- const USHORT nYear );
+ const sal_uInt16 nDay,
+ const sal_uInt16 nMonth,
+ const sal_uInt16 nYear );
/// convert input string to number
- BOOL IsNumberFormat(
+ sal_Bool IsNumberFormat(
const String& rString, /// input string
short& F_Type, /// format type (in + out)
double& fOutNumber, /// value determined (out)
@@ -61,12 +61,12 @@ public:
/// after IsNumberFormat: get decimal position
short GetDecPos() const { return nDecPos; }
/// after IsNumberFormat: get count of numeric substrings in input string
- USHORT GetAnzNums() const { return nAnzNums; }
+ sal_uInt16 GetAnzNums() const { return nAnzNums; }
/// set threshold of two-digit year input
- void SetYear2000( USHORT nVal ) { nYear2000 = nVal; }
+ void SetYear2000( sal_uInt16 nVal ) { nYear2000 = nVal; }
/// get threshold of two-digit year input
- USHORT GetYear2000() const { return nYear2000; }
+ sal_uInt16 GetYear2000() const { return nYear2000; }
private:
SvNumberFormatter* pFormatter;
@@ -75,50 +75,50 @@ private:
String* pUpperDayText; // Array of day of week names, uppercase
String* pUpperAbbrevDayText; // Array of day of week names, abbreviated, uppercase
String aUpperCurrSymbol; // Currency symbol, uppercase
- BOOL bTextInitialized; // Whether days and months are initialized
+ sal_Bool bTextInitialized; // Whether days and months are initialized
Date* pNullDate; // 30Dec1899
// Variables for provisional results:
String sStrArray[SV_MAX_ANZ_INPUT_STRINGS]; // Array of scanned substrings
- BOOL IsNum[SV_MAX_ANZ_INPUT_STRINGS]; // Whether a substring is numeric
- USHORT nNums[SV_MAX_ANZ_INPUT_STRINGS]; // Sequence of offsets to numeric strings
- USHORT nAnzStrings; // Total count of scanned substrings
- USHORT nAnzNums; // Count of numeric substrings
- BOOL bDecSepInDateSeps; // True <=> DecSep in {.,-,/,DateSep}
- BYTE nMatchedAllStrings; // Scan...String() matched all substrings,
+ sal_Bool IsNum[SV_MAX_ANZ_INPUT_STRINGS]; // Whether a substring is numeric
+ sal_uInt16 nNums[SV_MAX_ANZ_INPUT_STRINGS]; // Sequence of offsets to numeric strings
+ sal_uInt16 nAnzStrings; // Total count of scanned substrings
+ sal_uInt16 nAnzNums; // Count of numeric substrings
+ sal_Bool bDecSepInDateSeps; // True <=> DecSep in {.,-,/,DateSep}
+ sal_uInt8 nMatchedAllStrings; // Scan...String() matched all substrings,
// bit mask of nMatched... constants
- static const BYTE nMatchedEndString; // 0x01
- static const BYTE nMatchedMidString; // 0x02
- static const BYTE nMatchedStartString; // 0x04
- static const BYTE nMatchedVirgin; // 0x08
- static const BYTE nMatchedUsedAsReturn; // 0x10
+ static const sal_uInt8 nMatchedEndString; // 0x01
+ static const sal_uInt8 nMatchedMidString; // 0x02
+ static const sal_uInt8 nMatchedStartString; // 0x04
+ static const sal_uInt8 nMatchedVirgin; // 0x08
+ static const sal_uInt8 nMatchedUsedAsReturn; // 0x10
int nSign; // Sign of number
short nMonth; // Month (1..x) if date
// negative => short format
short nMonthPos; // 1 = front, 2 = middle
// 3 = end
- USHORT nTimePos; // Index of first time separator (+1)
+ sal_uInt16 nTimePos; // Index of first time separator (+1)
short nDecPos; // Index of substring containing "," (+1)
short nNegCheck; // '( )' for negative
short nESign; // Sign of exponent
short nAmPm; // +1 AM, -1 PM, 0 if none
short nLogical; // -1 => False, 1 => True
- USHORT nThousand; // Count of group (AKA thousand) separators
- USHORT nPosThousandString; // Position of concatenaded 000,000,000 string
+ sal_uInt16 nThousand; // Count of group (AKA thousand) separators
+ sal_uInt16 nPosThousandString; // Position of concatenaded 000,000,000 string
short eScannedType; // Scanned type
short eSetType; // Preset Type
- USHORT nStringScanNumFor; // Fixed strings recognized in
+ sal_uInt16 nStringScanNumFor; // Fixed strings recognized in
// pFormat->NumFor[nNumForStringScan]
short nStringScanSign; // Sign resulting of FixString
- USHORT nYear2000; // Two-digit threshold
+ sal_uInt16 nYear2000; // Two-digit threshold
// Year as 20xx
// default 18
// number <= nYear2000 => 20xx
// number > nYear2000 => 19xx
- USHORT nTimezonePos; // Index of timezone separator (+1)
- BYTE nMayBeIso8601; // 0:=dontknowyet, 1:=yes, 2:=no
+ sal_uInt16 nTimezonePos; // Index of timezone separator (+1)
+ sal_uInt8 nMayBeIso8601; // 0:=dontknowyet, 1:=yes, 2:=no
#ifdef _ZFORFIND_CXX // methods private to implementation
void Reset(); // Reset all variables before start of analysis
@@ -128,17 +128,17 @@ private:
// Convert string to double.
// Only simple unsigned floating point values without any error detection,
// decimal separator has to be '.'
- // If bForceFraction==TRUE the string is taken to be the fractional part
+ // If bForceFraction==sal_True the string is taken to be the fractional part
// of 0.1234 without the leading 0. (thus being just "1234").
double StringToDouble(
const String& rStr,
- BOOL bForceFraction = FALSE );
+ sal_Bool bForceFraction = sal_False );
- BOOL NextNumberStringSymbol( // Next number/string symbol
+ sal_Bool NextNumberStringSymbol( // Next number/string symbol
const sal_Unicode*& pStr,
String& rSymbol );
- BOOL SkipThousands( // Concatenate ,000,23 blocks
+ sal_Bool SkipThousands( // Concatenate ,000,23 blocks
const sal_Unicode*& pStr, // in input to 000123
String& rSymbol );
@@ -150,50 +150,50 @@ private:
// optimized substring versions
- static inline BOOL StringContains( // Whether rString contains rWhat at nPos
+ static inline sal_Bool StringContains( // Whether rString contains rWhat at nPos
const String& rWhat,
const String& rString,
xub_StrLen nPos )
{ // mostly used with one character
if ( rWhat.GetChar(0) != rString.GetChar(nPos) )
- return FALSE;
+ return sal_False;
return StringContainsImpl( rWhat, rString, nPos );
}
- static inline BOOL StringPtrContains( // Whether pString contains rWhat at nPos
+ static inline sal_Bool StringPtrContains( // Whether pString contains rWhat at nPos
const String& rWhat,
const sal_Unicode* pString,
xub_StrLen nPos ) // nPos MUST be a valid offset from pString
{ // mostly used with one character
if ( rWhat.GetChar(0) != *(pString+nPos) )
- return FALSE;
+ return sal_False;
return StringPtrContainsImpl( rWhat, pString, nPos );
}
- static BOOL StringContainsImpl( //! DO NOT use directly
+ static sal_Bool StringContainsImpl( //! DO NOT use directly
const String& rWhat,
const String& rString,
xub_StrLen nPos );
- static BOOL StringPtrContainsImpl( //! DO NOT use directly
+ static sal_Bool StringPtrContainsImpl( //! DO NOT use directly
const String& rWhat,
const sal_Unicode* pString,
xub_StrLen nPos );
- static inline BOOL SkipChar( // Skip a special character
+ static inline sal_Bool SkipChar( // Skip a special character
sal_Unicode c,
const String& rString,
xub_StrLen& nPos );
static inline void SkipBlanks( // Skip blank
const String& rString,
xub_StrLen& nPos );
- static inline BOOL SkipString( // Jump over rWhat in rString at nPos
+ static inline sal_Bool SkipString( // Jump over rWhat in rString at nPos
const String& rWhat,
const String& rString,
xub_StrLen& nPos );
- inline BOOL GetThousandSep( // Recognizes exactly ,111 as group separator
+ inline sal_Bool GetThousandSep( // Recognizes exactly ,111 as group separator
const String& rString,
xub_StrLen& nPos,
- USHORT nStringPos );
+ sal_uInt16 nStringPos );
short GetLogical( // Get boolean value
const String& rString );
short GetMonth( // Get month and advance string position
@@ -202,17 +202,17 @@ private:
int GetDayOfWeek( // Get day of week and advance string position
const String& rString,
xub_StrLen& nPos );
- BOOL GetCurrency( // Get currency symbol and advance string position
+ sal_Bool GetCurrency( // Get currency symbol and advance string position
const String& rString,
xub_StrLen& nPos,
const SvNumberformat* pFormat = NULL ); // optional number format to match against
- BOOL GetTimeAmPm( // Get symbol AM or PM and advance string position
+ sal_Bool GetTimeAmPm( // Get symbol AM or PM and advance string position
const String& rString,
xub_StrLen& nPos );
- inline BOOL GetDecSep( // Get decimal separator and advance string position
+ inline sal_Bool GetDecSep( // Get decimal separator and advance string position
const String& rString,
xub_StrLen& nPos );
- inline BOOL GetTime100SecSep( // Get hundredth seconds separator and advance string position
+ inline sal_Bool GetTime100SecSep( // Get hundredth seconds separator and advance string position
const String& rString,
xub_StrLen& nPos );
int GetSign( // Get sign and advance string position
@@ -222,30 +222,30 @@ private:
const String& rString,
xub_StrLen& nPos );
- inline BOOL GetNextNumber( // Get next number as array offset
- USHORT& i,
- USHORT& j );
+ inline sal_Bool GetNextNumber( // Get next number as array offset
+ sal_uInt16& i,
+ sal_uInt16& j );
void GetTimeRef( // Converts time -> double (only decimals)
double& fOutNumber, // result as double
- USHORT nIndex, // Index of hour in input
- USHORT nAnz ); // Count of time substrings in input
- USHORT ImplGetDay ( USHORT nIndex ); // Day input, 0 if no match
- USHORT ImplGetMonth( USHORT nIndex ); // Month input, zero based return, NumberOfMonths if no match
- USHORT ImplGetYear ( USHORT nIndex ); // Year input, 0 if no match
- BOOL GetDateRef( // Conversion of date to number
+ sal_uInt16 nIndex, // Index of hour in input
+ sal_uInt16 nAnz ); // Count of time substrings in input
+ sal_uInt16 ImplGetDay ( sal_uInt16 nIndex ); // Day input, 0 if no match
+ sal_uInt16 ImplGetMonth( sal_uInt16 nIndex ); // Month input, zero based return, NumberOfMonths if no match
+ sal_uInt16 ImplGetYear ( sal_uInt16 nIndex ); // Year input, 0 if no match
+ sal_Bool GetDateRef( // Conversion of date to number
double& fDays, // OUT: days diff to null date
- USHORT& nCounter, // Count of date substrings
+ sal_uInt16& nCounter, // Count of date substrings
const SvNumberformat* pFormat = NULL ); // optional number format to match against
- BOOL ScanStartString( // Analyze start of string
+ sal_Bool ScanStartString( // Analyze start of string
const String& rString,
const SvNumberformat* pFormat = NULL );
- BOOL ScanMidString( // Analyze middle substring
+ sal_Bool ScanMidString( // Analyze middle substring
const String& rString,
- USHORT nStringPos,
+ sal_uInt16 nStringPos,
const SvNumberformat* pFormat = NULL );
- BOOL ScanEndString( // Analyze end of string
+ sal_Bool ScanEndString( // Analyze end of string
const String& rString,
const SvNumberformat* pFormat = NULL );
@@ -255,27 +255,27 @@ private:
// Compare rString to substring of array indexed by nString
// nString == 0xFFFF => last substring
- BOOL ScanStringNumFor(
+ sal_Bool ScanStringNumFor(
const String& rString,
xub_StrLen nPos,
const SvNumberformat* pFormat,
- USHORT nString,
- BOOL bDontDetectNegation = FALSE );
+ sal_uInt16 nString,
+ sal_Bool bDontDetectNegation = sal_False );
- // if nMatchedAllStrings set nMatchedUsedAsReturn and return TRUE,
- // else do nothing and return FALSE
- BOOL MatchedReturn();
+ // if nMatchedAllStrings set nMatchedUsedAsReturn and return sal_True,
+ // else do nothing and return sal_False
+ sal_Bool MatchedReturn();
//! Be sure that the string to be analyzed is already converted to upper
//! case and if it contained native humber digits that they are already
//! converted to ASCII.
- BOOL IsNumberFormatMain( // Main anlyzing function
+ sal_Bool IsNumberFormatMain( // Main anlyzing function
const String& rString,
double& fOutNumber, // return value if string is numeric
const SvNumberformat* pFormat = NULL // optional number format to match against
);
- static inline BOOL MyIsdigit( sal_Unicode c );
+ static inline sal_Bool MyIsdigit( sal_Unicode c );
// native number transliteration if necessary
void TransformInput( String& rString );
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 7343a0a9c0e6..ebc1fa673fe2 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -88,7 +88,7 @@ using namespace ::com::sun::star::lang;
* (old currency) is recognized as a date (#53155#). */
#define UNKNOWN_SUBSTITUTE LANGUAGE_ENGLISH_US
-static BOOL bIndexTableInitialized = FALSE;
+static sal_Bool bIndexTableInitialized = sal_False;
static sal_uInt32 __FAR_DATA theIndexTable[NF_INDEX_TABLE_ENTRIES];
@@ -160,7 +160,7 @@ void SvNumberFormatterRegistry_Impl::ConfigurationChanged( utl::ConfigurationBro
// ====================================================================
SvNumberFormatterRegistry_Impl* SvNumberFormatter::pFormatterRegistry = NULL;
-BOOL SvNumberFormatter::bCurrencyTableInitialized = FALSE;
+sal_Bool SvNumberFormatter::bCurrencyTableInitialized = sal_False;
namespace
{
struct theCurrencyTable :
@@ -169,7 +169,7 @@ namespace
struct theLegacyOnlyCurrencyTable :
public rtl::Static< NfCurrencyTable, theLegacyOnlyCurrencyTable > {};
}
-USHORT SvNumberFormatter::nSystemCurrencyPosition = 0;
+sal_uInt16 SvNumberFormatter::nSystemCurrencyPosition = 0;
SV_IMPL_PTRARR( NfCurrencyTable, NfCurrencyEntry* );
SV_IMPL_PTRARR( NfWSStringsDtor, String* );
@@ -254,9 +254,9 @@ void SvNumberFormatter::ImpConstruct( LanguageType eLang )
pFormatScanner = new ImpSvNumberformatScan( this );
pFormatTable = NULL;
MaxCLOffset = 0;
- ImpGenerateFormats( 0, FALSE ); // 0 .. 999 for initialized language formats
+ ImpGenerateFormats( 0, sal_False ); // 0 .. 999 for initialized language formats
pMergeTable = NULL;
- bNoZero = FALSE;
+ bNoZero = sal_False;
::osl::MutexGuard aGuard( GetMutex() );
GetFormatterRegistry().Insert( this );
@@ -316,7 +316,7 @@ SvNumberFormatterRegistry_Impl& SvNumberFormatter::GetFormatterRegistry()
}
-Color* SvNumberFormatter::GetUserDefColor(USHORT nIndex)
+Color* SvNumberFormatter::GetUserDefColor(sal_uInt16 nIndex)
{
if( aColorLink.IsSet() )
return (Color*) ( aColorLink.Call( (void*) &nIndex ));
@@ -324,9 +324,9 @@ Color* SvNumberFormatter::GetUserDefColor(USHORT nIndex)
return NULL;
}
-void SvNumberFormatter::ChangeNullDate(USHORT nDay,
- USHORT nMonth,
- USHORT nYear)
+void SvNumberFormatter::ChangeNullDate(sal_uInt16 nDay,
+ sal_uInt16 nMonth,
+ sal_uInt16 nYear)
{
pFormatScanner->ChangeNullDate(nDay, nMonth, nYear);
pStringScanner->ChangeNullDate(nDay, nMonth, nYear);
@@ -347,7 +347,7 @@ sal_uInt16 SvNumberFormatter::GetStandardPrec()
return pFormatScanner->GetStandardPrec();
}
-void SvNumberFormatter::ImpChangeSysCL( LanguageType eLnge, BOOL bLoadingSO5 )
+void SvNumberFormatter::ImpChangeSysCL( LanguageType eLnge, sal_Bool bLoadingSO5 )
{
if (eLnge == LANGUAGE_DONTKNOW)
eLnge = UNKNOWN_SUBSTITUTE;
@@ -408,12 +408,12 @@ void SvNumberFormatter::ReplaceSystemCL( LanguageType eOldLanguage )
// reset ActLnge otherwise ChangeIntl() wouldn't switch if already LANGUAGE_SYSTEM
ActLnge = LANGUAGE_DONTKNOW;
ChangeIntl( LANGUAGE_SYSTEM );
- ImpGenerateFormats( nCLOffset, TRUE );
+ ImpGenerateFormats( nCLOffset, sal_True );
// convert additional and user defined from old system to new system
SvNumberformat* pStdFormat = (SvNumberformat*) aFTable.Get( nCLOffset + ZF_STANDARD );
sal_uInt32 nLastKey = nMaxBuiltin;
- pFormatScanner->SetConvertMode( eOldLanguage, LANGUAGE_SYSTEM, TRUE );
+ pFormatScanner->SetConvertMode( eOldLanguage, LANGUAGE_SYSTEM, sal_True );
aOldTable.First();
while ( aOldTable.Count() )
{
@@ -428,7 +428,7 @@ void SvNumberFormatter::ReplaceSystemCL( LanguageType eOldLanguage )
// a duplicate. Also won't mix up any LastInsertKey.
ChangeIntl( eOldLanguage );
LanguageType eLge = eOldLanguage; // ConvertMode changes this
- BOOL bCheck = FALSE;
+ sal_Bool bCheck = sal_False;
SvNumberformat* pNewEntry = new SvNumberformat( aString, pFormatScanner,
pStringScanner, nCheckPos, eLge );
if ( nCheckPos != 0 )
@@ -444,40 +444,40 @@ void SvNumberFormatter::ReplaceSystemCL( LanguageType eOldLanguage )
if ( !aFTable.Insert( nKey, pNewEntry ) )
delete pNewEntry;
else
- bCheck = TRUE;
+ bCheck = sal_True;
}
DBG_ASSERT( bCheck, "SvNumberFormatter::ReplaceSystemCL: couldn't convert" );
delete pOldEntry;
}
- pFormatScanner->SetConvertMode(FALSE);
- pStdFormat->SetLastInsertKey( USHORT(nLastKey - nCLOffset) );
+ pFormatScanner->SetConvertMode(sal_False);
+ pStdFormat->SetLastInsertKey( sal_uInt16(nLastKey - nCLOffset) );
// append new system additional formats
NumberFormatCodeWrapper aNumberFormatCode( xServiceManager, GetLocale() );
- ImpGenerateAdditionalFormats( nCLOffset, aNumberFormatCode, TRUE );
+ ImpGenerateAdditionalFormats( nCLOffset, aNumberFormatCode, sal_True );
}
-BOOL SvNumberFormatter::IsTextFormat(sal_uInt32 F_Index) const
+sal_Bool SvNumberFormatter::IsTextFormat(sal_uInt32 F_Index) const
{
SvNumberformat* pFormat = (SvNumberformat*) aFTable.Get(F_Index);
if (!pFormat)
- return FALSE;
+ return sal_False;
else
return pFormat->IsTextFormat();
}
-BOOL SvNumberFormatter::HasTextFormat(sal_uInt32 F_Index) const
+sal_Bool SvNumberFormatter::HasTextFormat(sal_uInt32 F_Index) const
{
SvNumberformat* pFormat = (SvNumberformat*) aFTable.Get(F_Index);
if (!pFormat)
- return FALSE;
+ return sal_False;
else
return pFormat->HasTextFormat();
}
-BOOL SvNumberFormatter::PutEntry(String& rString,
+sal_Bool SvNumberFormatter::PutEntry(String& rString,
xub_StrLen& nCheckPos,
short& nType,
sal_uInt32& nKey, // Formatnummer
@@ -487,14 +487,14 @@ BOOL SvNumberFormatter::PutEntry(String& rString,
if (rString.Len() == 0) // keinen Leerstring
{
nCheckPos = 1; // -> Fehler
- return FALSE;
+ return sal_False;
}
if (eLnge == LANGUAGE_DONTKNOW)
eLnge = IniLnge;
ChangeIntl(eLnge); // ggfs. austauschen
LanguageType eLge = eLnge; // Umgehung const fuer ConvertMode
- BOOL bCheck = FALSE;
+ sal_Bool bCheck = sal_False;
SvNumberformat* p_Entry = new SvNumberformat(rString,
pFormatScanner,
pStringScanner,
@@ -532,9 +532,9 @@ BOOL SvNumberFormatter::PutEntry(String& rString,
delete p_Entry;
else
{
- bCheck = TRUE;
+ bCheck = sal_True;
nKey = nPos+1;
- pStdFormat->SetLastInsertKey((USHORT) (nKey-CLOffset));
+ pStdFormat->SetLastInsertKey((sal_uInt16) (nKey-CLOffset));
}
}
}
@@ -543,48 +543,48 @@ BOOL SvNumberFormatter::PutEntry(String& rString,
return bCheck;
}
-BOOL SvNumberFormatter::PutandConvertEntry(String& rString,
+sal_Bool SvNumberFormatter::PutandConvertEntry(String& rString,
xub_StrLen& nCheckPos,
short& nType,
sal_uInt32& nKey,
LanguageType eLnge,
LanguageType eNewLnge)
{
- BOOL bRes;
+ sal_Bool bRes;
if (eNewLnge == LANGUAGE_DONTKNOW)
eNewLnge = IniLnge;
pFormatScanner->SetConvertMode(eLnge, eNewLnge);
bRes = PutEntry(rString, nCheckPos, nType, nKey, eLnge);
- pFormatScanner->SetConvertMode(FALSE);
+ pFormatScanner->SetConvertMode(sal_False);
return bRes;
}
-BOOL SvNumberFormatter::PutandConvertEntrySystem(String& rString,
+sal_Bool SvNumberFormatter::PutandConvertEntrySystem(String& rString,
xub_StrLen& nCheckPos,
short& nType,
sal_uInt32& nKey,
LanguageType eLnge,
LanguageType eNewLnge)
{
- BOOL bRes;
+ sal_Bool bRes;
if (eNewLnge == LANGUAGE_DONTKNOW)
eNewLnge = IniLnge;
- pFormatScanner->SetConvertMode(eLnge, eNewLnge, TRUE);
+ pFormatScanner->SetConvertMode(eLnge, eNewLnge, sal_True);
bRes = PutEntry(rString, nCheckPos, nType, nKey, eLnge);
- pFormatScanner->SetConvertMode(FALSE);
+ pFormatScanner->SetConvertMode(sal_False);
return bRes;
}
sal_uInt32 SvNumberFormatter::GetIndexPuttingAndConverting( String & rString,
LanguageType eLnge, LanguageType eSysLnge, short & rType,
- BOOL & rNewInserted, xub_StrLen & rCheckPos )
+ sal_Bool & rNewInserted, xub_StrLen & rCheckPos )
{
sal_uInt32 nKey = NUMBERFORMAT_ENTRY_NOT_FOUND;
- rNewInserted = FALSE;
+ rNewInserted = sal_False;
rCheckPos = 0;
// #62389# empty format string (of Writer) => General standard format
@@ -639,7 +639,7 @@ sal_uInt32 SvNumberFormatter::GetIndexPuttingAndConverting( String & rString,
if (rNewInserted)
{
DeleteEntry( nKey); // don't leave trails of rubbish
- rNewInserted = FALSE;
+ rNewInserted = sal_False;
}
nKey = GetStandardFormat( NUMBERFORMAT_CURRENCY, eLnge);
}
@@ -659,7 +659,7 @@ void SvNumberFormatter::PrepareSave()
SvNumberformat* pFormat = aFTable.First();
while (pFormat)
{
- pFormat->SetUsed(FALSE);
+ pFormat->SetUsed(sal_False);
pFormat = aFTable.Next();
}
}
@@ -668,41 +668,41 @@ void SvNumberFormatter::SetFormatUsed(sal_uInt32 nFIndex)
{
SvNumberformat* pFormat = (SvNumberformat*) aFTable.Get(nFIndex);
if (pFormat)
- pFormat->SetUsed(TRUE);
+ pFormat->SetUsed(sal_True);
}
-BOOL SvNumberFormatter::Load( SvStream& rStream )
+sal_Bool SvNumberFormatter::Load( SvStream& rStream )
{
LanguageType eSysLang = SvtSysLocale().GetLanguage();
SvNumberFormatter* pConverter = NULL;
ImpSvNumMultipleReadHeader aHdr( rStream );
- USHORT nVersion;
+ sal_uInt16 nVersion;
rStream >> nVersion;
SvNumberformat* pEntry;
sal_uInt32 nPos;
LanguageType eSaveSysLang, eLoadSysLang;
- USHORT nSysOnStore, eLge, eDummy; // Dummy fuer kompatibles Format
+ sal_uInt16 nSysOnStore, eLge, eDummy; // Dummy fuer kompatibles Format
rStream >> nSysOnStore >> eLge; // Systemeinstellung aus
// Dokument
eSaveSysLang = (nVersion < SV_NUMBERFORMATTER_VERSION_SYSTORE ?
LANGUAGE_SYSTEM : (LanguageType) nSysOnStore);
LanguageType eLnge = (LanguageType) eLge;
- ImpChangeSysCL( eLnge, TRUE );
+ ImpChangeSysCL( eLnge, sal_True );
rStream >> nPos;
while (nPos != NUMBERFORMAT_ENTRY_NOT_FOUND)
{
rStream >> eDummy >> eLge;
eLnge = (LanguageType) eLge;
- ImpGenerateCL( eLnge, TRUE ); // ggfs. neue Standardformate anlegen
+ ImpGenerateCL( eLnge, sal_True ); // ggfs. neue Standardformate anlegen
sal_uInt32 nOffset = nPos % SV_COUNTRY_LANGUAGE_OFFSET; // relativIndex
- BOOL bUserDefined = (nOffset > SV_MAX_ANZ_STANDARD_FORMATE);
+ sal_Bool bUserDefined = (nOffset > SV_MAX_ANZ_STANDARD_FORMATE);
//! HACK! ER 29.07.97 15:15
// SaveLang wurde bei SYSTEM nicht gespeichert sondern war auch SYSTEM,
// erst ab 364i Unterscheidung moeglich
- BOOL bConversionHack;
+ sal_Bool bConversionHack;
if ( eLnge == LANGUAGE_SYSTEM )
{
if ( nVersion < SV_NUMBERFORMATTER_VERSION_SYSTORE )
@@ -712,13 +712,13 @@ BOOL SvNumberFormatter::Load( SvStream& rStream )
}
else
{
- bConversionHack = FALSE;
+ bConversionHack = sal_False;
eLoadSysLang = eSysLang;
}
}
else
{
- bConversionHack = FALSE;
+ bConversionHack = sal_False;
eLoadSysLang = eSaveSysLang;
}
@@ -735,7 +735,7 @@ BOOL SvNumberFormatter::Load( SvStream& rStream )
{
case NF_CONVERT_GERMAN_ENGLISH :
pEntry->ConvertLanguage( *pConverter,
- LANGUAGE_ENGLISH_US, eSysLang, TRUE );
+ LANGUAGE_ENGLISH_US, eSysLang, sal_True );
break;
case NF_CONVERT_ENGLISH_GERMAN :
switch ( eSysLang )
@@ -749,7 +749,7 @@ BOOL SvNumberFormatter::Load( SvStream& rStream )
break;
default:
pEntry->ConvertLanguage( *pConverter,
- LANGUAGE_GERMAN, eSysLang, TRUE );
+ LANGUAGE_GERMAN, eSysLang, sal_True );
}
break;
case NF_CONVERT_NONE :
@@ -779,33 +779,33 @@ BOOL SvNumberFormatter::Load( SvStream& rStream )
case LANGUAGE_GERMAN_LIECHTENSTEIN:
// alles beim alten
pEntry->ConvertLanguage( *pConverter,
- eSaveSysLang, eLoadSysLang, TRUE );
+ eSaveSysLang, eLoadSysLang, sal_True );
break;
default:
// alte english nach neuem anderen
pEntry->ConvertLanguage( *pConverter,
- LANGUAGE_ENGLISH_US, eLoadSysLang, TRUE );
+ LANGUAGE_ENGLISH_US, eLoadSysLang, sal_True );
}
}
else
pEntry->ConvertLanguage( *pConverter,
- eSaveSysLang, eLoadSysLang, TRUE );
+ eSaveSysLang, eLoadSysLang, sal_True );
}
else
{ // nicht SYSTEM oder gleiches SYSTEM
if ( nVersion < SV_NUMBERFORMATTER_VERSION_KEYWORDS )
{
LanguageType eLoadLang;
- BOOL bSystem;
+ sal_Bool bSystem;
if ( eLnge == LANGUAGE_SYSTEM )
{
eLoadLang = eSysLang;
- bSystem = TRUE;
+ bSystem = sal_True;
}
else
{
eLoadLang = eLnge;
- bSystem = FALSE;
+ bSystem = sal_False;
}
switch ( eLoadLang )
{
@@ -842,9 +842,9 @@ BOOL SvNumberFormatter::Load( SvStream& rStream )
if ( nVersion >= SV_NUMBERFORMATTER_VERSION_YEAR2000 )
{
aHdr.StartEntry();
- if ( aHdr.BytesLeft() >= sizeof(UINT16) )
+ if ( aHdr.BytesLeft() >= sizeof(sal_uInt16) )
{
- UINT16 nY2k;
+ sal_uInt16 nY2k;
rStream >> nY2k;
if ( nVersion < SV_NUMBERFORMATTER_VERSION_TWODIGITYEAR && nY2k < 100 )
nY2k += 1901; // war vor src513e: 29, jetzt: 1930
@@ -861,28 +861,28 @@ BOOL SvNumberFormatter::Load( SvStream& rStream )
NumberFormatCodeWrapper aNumberFormatCode( xServiceManager, GetLocale() );
SvUShorts aList;
GetUsedLanguages( aList );
- USHORT nCount = aList.Count();
- for ( USHORT j=0; j<nCount; j++ )
+ sal_uInt16 nCount = aList.Count();
+ for ( sal_uInt16 j=0; j<nCount; j++ )
{
LanguageType eLang = aList[j];
ChangeIntl( eLang );
sal_uInt32 CLOffset = ImpGetCLOffset( eLang );
- ImpGenerateAdditionalFormats( CLOffset, aNumberFormatCode, TRUE );
+ ImpGenerateAdditionalFormats( CLOffset, aNumberFormatCode, sal_True );
}
ChangeIntl( eOldLanguage );
if (rStream.GetError())
- return FALSE;
+ return sal_False;
else
- return TRUE;
+ return sal_True;
}
-BOOL SvNumberFormatter::Save( SvStream& rStream ) const
+sal_Bool SvNumberFormatter::Save( SvStream& rStream ) const
{
ImpSvNumMultipleWriteHeader aHdr( rStream );
// ab 364i wird gespeichert was SYSTEM wirklich war, vorher hart LANGUAGE_SYSTEM
- rStream << (USHORT) SV_NUMBERFORMATTER_VERSION;
- rStream << (USHORT) SvtSysLocale().GetLanguage() << (USHORT) IniLnge;
+ rStream << (sal_uInt16) SV_NUMBERFORMATTER_VERSION;
+ rStream << (sal_uInt16) SvtSysLocale().GetLanguage() << (sal_uInt16) IniLnge;
SvNumberFormatTable* pTable = (SvNumberFormatTable*) &aFTable;
SvNumberformat* pEntry = (SvNumberformat*) pTable->First();
while (pEntry)
@@ -895,8 +895,8 @@ BOOL SvNumberFormatter::Save( SvStream& rStream ) const
(pTable->GetCurKey() % SV_COUNTRY_LANGUAGE_OFFSET == 0) )
{
rStream << static_cast<sal_uInt32>(pTable->GetCurKey())
- << (USHORT) LANGUAGE_SYSTEM
- << (USHORT) pEntry->GetLanguage();
+ << (sal_uInt16) LANGUAGE_SYSTEM
+ << (sal_uInt16) pEntry->GetLanguage();
pEntry->Save(rStream, aHdr);
}
pEntry = (SvNumberformat*) pTable->Next();
@@ -905,13 +905,13 @@ BOOL SvNumberFormatter::Save( SvStream& rStream ) const
// ab SV_NUMBERFORMATTER_VERSION_YEAR2000
aHdr.StartEntry();
- rStream << (UINT16) GetYear2000();
+ rStream << (sal_uInt16) GetYear2000();
aHdr.EndEntry();
if (rStream.GetError())
- return FALSE;
+ return sal_False;
else
- return TRUE;
+ return sal_True;
}
// static
@@ -940,14 +940,14 @@ void SvNumberFormatter::FillKeywordTable( NfKeywordTable& rKeywords,
{
ChangeIntl( eLang );
const String* pTable = pFormatScanner->GetKeywords();
- for ( USHORT i = 0; i < NF_KEYWORD_ENTRIES_COUNT; ++i )
+ for ( sal_uInt16 i = 0; i < NF_KEYWORD_ENTRIES_COUNT; ++i )
{
rKeywords[i] = pTable[i];
}
}
-String SvNumberFormatter::GetKeyword( LanguageType eLnge, USHORT nIndex )
+String SvNumberFormatter::GetKeyword( LanguageType eLnge, sal_uInt16 nIndex )
{
ChangeIntl(eLnge);
const String* pTable = pFormatScanner->GetKeywords();
@@ -1065,7 +1065,7 @@ SvNumberFormatTable& SvNumberFormatter::GetFirstEntryTable(
return GetEntryTable(eTypetmp, FIndex, rLnge);
}
-sal_uInt32 SvNumberFormatter::ImpGenerateCL( LanguageType eLnge, BOOL bLoadingSO5 )
+sal_uInt32 SvNumberFormatter::ImpGenerateCL( LanguageType eLnge, sal_Bool bLoadingSO5 )
{
ChangeIntl(eLnge);
sal_uInt32 CLOffset = ImpGetCLOffset(ActLnge);
@@ -1187,7 +1187,7 @@ SvNumberFormatTable& SvNumberFormatter::GetEntryTable(
return *pFormatTable;
}
-BOOL SvNumberFormatter::IsNumberFormat(const String& sString,
+sal_Bool SvNumberFormatter::IsNumberFormat(const String& sString,
sal_uInt32& F_Index,
double& fOutNumber)
{
@@ -1206,12 +1206,12 @@ BOOL SvNumberFormatter::IsNumberFormat(const String& sString,
FType = NUMBERFORMAT_DEFINED;
ChangeIntl(pFormat->GetLanguage());
}
- BOOL res;
+ sal_Bool res;
short RType = FType;
// Ergebnistyp
// ohne def-Kennung
if (RType == NUMBERFORMAT_TEXT) // Zahlzelle ->Stringz.
- res = FALSE;
+ res = sal_False;
else
res = pStringScanner->IsNumberFormat(sString, RType, fOutNumber, pFormat);
@@ -1241,13 +1241,13 @@ BOOL SvNumberFormatter::IsNumberFormat(const String& sString,
return res;
}
-BOOL SvNumberFormatter::IsCompatible(short eOldType,
+sal_Bool SvNumberFormatter::IsCompatible(short eOldType,
short eNewType)
{
if (eOldType == eNewType)
- return TRUE;
+ return sal_True;
else if (eOldType == NUMBERFORMAT_DEFINED)
- return TRUE;
+ return sal_True;
else
{
switch (eNewType)
@@ -1262,9 +1262,9 @@ BOOL SvNumberFormatter::IsCompatible(short eOldType,
case NUMBERFORMAT_FRACTION:
// case NUMBERFORMAT_LOGICAL:
case NUMBERFORMAT_DEFINED:
- return TRUE;
+ return sal_True;
default:
- return FALSE;
+ return sal_False;
}
}
break;
@@ -1273,9 +1273,9 @@ BOOL SvNumberFormatter::IsCompatible(short eOldType,
switch (eOldType)
{
case NUMBERFORMAT_DATETIME:
- return TRUE;
+ return sal_True;
default:
- return FALSE;
+ return sal_False;
}
}
break;
@@ -1284,9 +1284,9 @@ BOOL SvNumberFormatter::IsCompatible(short eOldType,
switch (eOldType)
{
case NUMBERFORMAT_DATETIME:
- return TRUE;
+ return sal_True;
default:
- return FALSE;
+ return sal_False;
}
}
break;
@@ -1296,16 +1296,16 @@ BOOL SvNumberFormatter::IsCompatible(short eOldType,
{
case NUMBERFORMAT_TIME:
case NUMBERFORMAT_DATE:
- return TRUE;
+ return sal_True;
default:
- return FALSE;
+ return sal_False;
}
}
break;
default:
- return FALSE;
+ return sal_False;
}
- return FALSE;
+ return sal_False;
}
}
@@ -1334,7 +1334,7 @@ sal_uInt32 SvNumberFormatter::ImpGetDefaultFormat( short nType )
default:
nSearch = CLOffset + ZF_STANDARD;
}
- sal_uInt32 nDefaultFormat = (sal_uInt32)(sal_uIntPtr) aDefaultFormatKeys.Get( nSearch );
+ sal_uInt32 nDefaultFormat = (sal_uInt32)(sal_uLong) aDefaultFormatKeys.Get( nSearch );
if ( !nDefaultFormat )
nDefaultFormat = NUMBERFORMAT_ENTRY_NOT_FOUND;
if ( nDefaultFormat == NUMBERFORMAT_ENTRY_NOT_FOUND )
@@ -1414,7 +1414,7 @@ sal_uInt32 SvNumberFormatter::GetStandardFormat( short eType, LanguageType eLnge
}
}
-BOOL SvNumberFormatter::IsSpecialStandardFormat( sal_uInt32 nFIndex,
+sal_Bool SvNumberFormatter::IsSpecialStandardFormat( sal_uInt32 nFIndex,
LanguageType eLnge )
{
return
@@ -1443,14 +1443,14 @@ sal_uInt32 SvNumberFormatter::GetStandardFormat( double fNumber, sal_uInt32 nFIn
{
case NUMBERFORMAT_TIME :
{
- BOOL bSign;
+ sal_Bool bSign;
if ( fNumber < 0.0 )
{
- bSign = TRUE;
+ bSign = sal_True;
fNumber = -fNumber;
}
else
- bSign = FALSE;
+ bSign = sal_False;
double fSeconds = fNumber * 86400;
if ( floor( fSeconds + 0.5 ) * 100 != floor( fSeconds * 100 + 0.5 ) )
{ // mit 100stel Sekunden
@@ -1562,14 +1562,14 @@ void SvNumberFormatter::GetOutputString(String& sString,
}
}
-BOOL SvNumberFormatter::GetPreviewString(const String& sFormatString,
+sal_Bool SvNumberFormatter::GetPreviewString(const String& sFormatString,
double fPreviewNumber,
String& sOutString,
Color** ppColor,
LanguageType eLnge)
{
if (sFormatString.Len() == 0) // keinen Leerstring
- return FALSE;
+ return sal_False;
xub_StrLen nCheckPos = STRING_NOTFOUND;
sal_uInt32 nKey;
@@ -1593,30 +1593,30 @@ BOOL SvNumberFormatter::GetPreviewString(const String& sFormatString,
else
p_Entry->GetOutputString(fPreviewNumber,sOutString, ppColor);
delete p_Entry;
- return TRUE;
+ return sal_True;
}
else
{
delete p_Entry;
- return FALSE;
+ return sal_False;
}
}
-BOOL SvNumberFormatter::GetPreviewStringGuess( const String& sFormatString,
+sal_Bool SvNumberFormatter::GetPreviewStringGuess( const String& sFormatString,
double fPreviewNumber,
String& sOutString,
Color** ppColor,
LanguageType eLnge )
{
if (sFormatString.Len() == 0) // keinen Leerstring
- return FALSE;
+ return sal_False;
if (eLnge == LANGUAGE_DONTKNOW)
eLnge = IniLnge;
ChangeIntl( eLnge );
eLnge = ActLnge;
- BOOL bEnglish = (eLnge == LANGUAGE_ENGLISH_US);
+ sal_Bool bEnglish = (eLnge == LANGUAGE_ENGLISH_US);
String aFormatStringUpper( pCharClass->upper( sFormatString ) );
sal_uInt32 nCLOffset = ImpGenerateCL( eLnge );
@@ -1624,7 +1624,7 @@ BOOL SvNumberFormatter::GetPreviewStringGuess( const String& sFormatString,
if ( nKey != NUMBERFORMAT_ENTRY_NOT_FOUND )
{ // Zielformat vorhanden
GetOutputString( fPreviewNumber, nKey, sOutString, ppColor );
- return TRUE;
+ return sal_True;
}
SvNumberformat *pEntry = NULL;
@@ -1641,7 +1641,7 @@ BOOL SvNumberFormatter::GetPreviewStringGuess( const String& sFormatString,
{
nCLOffset = ImpGenerateCL( LANGUAGE_ENGLISH_US );
nKey = ImpIsEntry( aFormatStringUpper, nCLOffset, LANGUAGE_ENGLISH_US );
- BOOL bEnglishFormat = (nKey != NUMBERFORMAT_ENTRY_NOT_FOUND);
+ sal_Bool bEnglishFormat = (nKey != NUMBERFORMAT_ENTRY_NOT_FOUND);
// try english --> other bzw. english nach other konvertieren
LanguageType eFormatLang = LANGUAGE_ENGLISH_US;
@@ -1649,7 +1649,7 @@ BOOL SvNumberFormatter::GetPreviewStringGuess( const String& sFormatString,
sTmpString = sFormatString;
pEntry = new SvNumberformat( sTmpString, pFormatScanner,
pStringScanner, nCheckPos, eFormatLang );
- pFormatScanner->SetConvertMode( FALSE );
+ pFormatScanner->SetConvertMode( sal_False );
ChangeIntl( eLnge );
if ( !bEnglishFormat )
@@ -1671,7 +1671,7 @@ BOOL SvNumberFormatter::GetPreviewStringGuess( const String& sFormatString,
sTmpString = sFormatString;
SvNumberformat* pEntry2 = new SvNumberformat( sTmpString, pFormatScanner,
pStringScanner, nCheckPos2, eFormatLang );
- pFormatScanner->SetConvertMode( FALSE );
+ pFormatScanner->SetConvertMode( sal_False );
ChangeIntl( eLnge );
if ( nCheckPos2 == 0 && !xTransliteration->isEqual( sFormatString,
pEntry2->GetFormatstring() ) )
@@ -1691,20 +1691,20 @@ BOOL SvNumberFormatter::GetPreviewStringGuess( const String& sFormatString,
ImpGenerateCL( eLnge ); // ggfs. neu Standardformate anlegen
pEntry->GetOutputString( fPreviewNumber, sOutString, ppColor );
delete pEntry;
- return TRUE;
+ return sal_True;
}
delete pEntry;
- return FALSE;
+ return sal_False;
}
-BOOL SvNumberFormatter::GetPreviewString( const String& sFormatString,
+sal_Bool SvNumberFormatter::GetPreviewString( const String& sFormatString,
const String& sPreviewString,
String& sOutString,
Color** ppColor,
LanguageType eLnge )
{
if (sFormatString.Len() == 0) // no empty string
- return FALSE;
+ return sal_False;
xub_StrLen nCheckPos = STRING_NOTFOUND;
sal_uInt32 nKey;
@@ -1740,12 +1740,12 @@ BOOL SvNumberFormatter::GetPreviewString( const String& sFormatString,
}
}
delete p_Entry;
- return TRUE;
+ return sal_True;
}
else
{
delete p_Entry;
- return FALSE;
+ return sal_False;
}
}
@@ -1782,7 +1782,7 @@ sal_uInt32 SvNumberFormatter::TestNewString(const String& sFormatString,
SvNumberformat* SvNumberFormatter::ImpInsertFormat(
const ::com::sun::star::i18n::NumberFormatCode& rCode,
- sal_uInt32 nPos, BOOL bAfterLoadingSO5, sal_Int16 nOrgIndex )
+ sal_uInt32 nPos, sal_Bool bAfterLoadingSO5, sal_Int16 nOrgIndex )
{
String aCodeStr( rCode.Code );
if ( rCode.Index < NF_INDEX_TABLE_ENTRIES &&
@@ -1790,7 +1790,7 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat(
rCode.Index != NF_CURRENCY_1000DEC2_CCC )
{ // strip surrounding [$...] on automatic currency
if ( aCodeStr.SearchAscii( "[$" ) != STRING_NOTFOUND )
- aCodeStr = SvNumberformat::StripNewCurrencyDelimiters( aCodeStr, FALSE );
+ aCodeStr = SvNumberformat::StripNewCurrencyDelimiters( aCodeStr, sal_False );
else
{
if (LocaleDataWrapper::areChecksEnabled() &&
@@ -1903,7 +1903,7 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat(
SvNumberformat* SvNumberFormatter::ImpInsertNewStandardFormat(
const ::com::sun::star::i18n::NumberFormatCode& rCode,
- sal_uInt32 nPos, USHORT nVersion, BOOL bAfterLoadingSO5,
+ sal_uInt32 nPos, sal_uInt16 nVersion, sal_Bool bAfterLoadingSO5,
sal_Int16 nOrgIndex )
{
SvNumberformat* pNewFormat = ImpInsertFormat( rCode, nPos,
@@ -1915,10 +1915,10 @@ SvNumberformat* SvNumberFormatter::ImpInsertNewStandardFormat(
}
void SvNumberFormatter::GetFormatSpecialInfo(sal_uInt32 nFormat,
- BOOL& bThousand,
- BOOL& IsRed,
- USHORT& nPrecision,
- USHORT& nAnzLeading)
+ sal_Bool& bThousand,
+ sal_Bool& IsRed,
+ sal_uInt16& nPrecision,
+ sal_uInt16& nAnzLeading)
{
const SvNumberformat* pFormat = aFTable.Get(nFormat);
@@ -1927,14 +1927,14 @@ void SvNumberFormatter::GetFormatSpecialInfo(sal_uInt32 nFormat,
nPrecision, nAnzLeading);
else
{
- bThousand = FALSE;
- IsRed = FALSE;
+ bThousand = sal_False;
+ IsRed = sal_False;
nPrecision = pFormatScanner->GetStandardPrec();
nAnzLeading = 0;
}
}
-USHORT SvNumberFormatter::GetFormatPrecision( sal_uInt32 nFormat ) const
+sal_uInt16 SvNumberFormatter::GetFormatPrecision( sal_uInt32 nFormat ) const
{
const SvNumberformat* pFormat = aFTable.Get( nFormat );
if ( pFormat )
@@ -1967,8 +1967,8 @@ String SvNumberFormatter::GetFormatDecimalSep( sal_uInt32 nFormat ) const
sal_uInt32 SvNumberFormatter::GetFormatSpecialInfo( const String& rFormatString,
- BOOL& bThousand, BOOL& IsRed, USHORT& nPrecision,
- USHORT& nAnzLeading, LanguageType eLnge )
+ sal_Bool& bThousand, sal_Bool& IsRed, sal_uInt16& nPrecision,
+ sal_uInt16& nAnzLeading, LanguageType eLnge )
{
xub_StrLen nCheckPos = 0;
@@ -1983,8 +1983,8 @@ sal_uInt32 SvNumberFormatter::GetFormatSpecialInfo( const String& rFormatString,
pFormat->GetFormatSpecialInfo( bThousand, IsRed, nPrecision, nAnzLeading );
else
{
- bThousand = FALSE;
- IsRed = FALSE;
+ bThousand = sal_False;
+ IsRed = sal_False;
nPrecision = pFormatScanner->GetStandardPrec();
nAnzLeading = 0;
}
@@ -2068,7 +2068,7 @@ sal_Int32 SvNumberFormatter::ImpGetFormatCodeIndex(
sal_Int32 SvNumberFormatter::ImpAdjustFormatCodeDefault(
::com::sun::star::i18n::NumberFormatCode * pFormatArr,
- sal_Int32 nCnt, BOOL bCheckCorrectness )
+ sal_Int32 nCnt, sal_Bool bCheckCorrectness )
{
using namespace ::com::sun::star;
@@ -2174,20 +2174,20 @@ sal_Int32 SvNumberFormatter::ImpAdjustFormatCodeDefault(
}
-void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, BOOL bLoadingSO5 )
+void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, sal_Bool bLoadingSO5 )
{
using namespace ::com::sun::star;
if ( !bIndexTableInitialized )
{
- for ( USHORT j=0; j<NF_INDEX_TABLE_ENTRIES; j++ )
+ for ( sal_uInt16 j=0; j<NF_INDEX_TABLE_ENTRIES; j++ )
{
theIndexTable[j] = NUMBERFORMAT_ENTRY_NOT_FOUND;
}
}
- BOOL bOldConvertMode = pFormatScanner->GetConvertMode();
+ sal_Bool bOldConvertMode = pFormatScanner->GetConvertMode();
if (bOldConvertMode)
- pFormatScanner->SetConvertMode(FALSE); // switch off for this function
+ pFormatScanner->SetConvertMode(sal_False); // switch off for this function
NumberFormatCodeWrapper aNumberFormatCode( xServiceManager, GetLocale() );
@@ -2201,7 +2201,7 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, BOOL bLoadingSO
// of a category (TLOT:=The Legacy Of Templin), altogether about 20 formats.
// Has to be incremented on each ImpInsertNewStandardformat, new formats
// must be appended, not inserted!
- USHORT nNewExtended = ZF_STANDARD_NEWEXTENDED;
+ sal_uInt16 nNewExtended = ZF_STANDARD_NEWEXTENDED;
// Number
uno::Sequence< i18n::NumberFormatCode > aFormatSeq
@@ -2353,7 +2353,7 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, BOOL bLoadingSO
pNewFormat = ImpInsertFormat( aFormatSeq[nIdx],
CLOffset + SetIndexTable( NF_CURRENCY_1000DEC2_CCC, ZF_STANDARD_CURRENCY+4 ));
if ( pNewFormat )
- pNewFormat->SetUsed(TRUE); // must be saved for older versions
+ pNewFormat->SetUsed(sal_True); // must be saved for older versions
aFormatSeq[nIdx].Default = bDefault;
// #.##0,-- since number formatter version 6
@@ -2406,7 +2406,7 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, BOOL bLoadingSO
pNewFormat = ImpInsertFormat( aFormatSeq[nIdx],
CLOffset + SetIndexTable( NF_DATE_SYS_DDMMYYYY, ZF_STANDARD_DATE+6 ));
if ( pNewFormat )
- pNewFormat->SetUsed(TRUE); // must be saved for older versions
+ pNewFormat->SetUsed(sal_True); // must be saved for older versions
// DD.MM.YY def/System, since number formatter version 6
nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_DATE_SYS_DDMMYY );
@@ -2597,22 +2597,22 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, BOOL bLoadingSO
- bIndexTableInitialized = TRUE;
+ bIndexTableInitialized = sal_True;
DBG_ASSERT( nNewExtended <= ZF_STANDARD_NEWEXTENDEDMAX,
"ImpGenerateFormats: overflow of nNewExtended standard formats" );
// Now all additional format codes provided by I18N, but only if not
// loading from old SO5 file format, then they are appended last.
if ( !bLoadingSO5 )
- ImpGenerateAdditionalFormats( CLOffset, aNumberFormatCode, FALSE );
+ ImpGenerateAdditionalFormats( CLOffset, aNumberFormatCode, sal_False );
if (bOldConvertMode)
- pFormatScanner->SetConvertMode(TRUE);
+ pFormatScanner->SetConvertMode(sal_True);
}
void SvNumberFormatter::ImpGenerateAdditionalFormats( sal_uInt32 CLOffset,
- NumberFormatCodeWrapper& rNumberFormatCode, BOOL bAfterLoadingSO5 )
+ NumberFormatCodeWrapper& rNumberFormatCode, sal_Bool bAfterLoadingSO5 )
{
using namespace ::com::sun::star;
@@ -2667,7 +2667,7 @@ void SvNumberFormatter::ImpGenerateAdditionalFormats( sal_uInt32 CLOffset,
{
pFormatArr = aFormatSeq.getArray();
// don't check ALL
- sal_Int32 nDef = ImpAdjustFormatCodeDefault( pFormatArr, nCodes, FALSE);
+ sal_Int32 nDef = ImpAdjustFormatCodeDefault( pFormatArr, nCodes, sal_False);
// don't have any defaults here
pFormatArr[nDef].Default = sal_False;
for ( j = 0; j < nCodes; j++ )
@@ -2685,7 +2685,7 @@ void SvNumberFormatter::ImpGenerateAdditionalFormats( sal_uInt32 CLOffset,
}
}
- pStdFormat->SetLastInsertKey( (USHORT)(nPos - CLOffset) );
+ pStdFormat->SetLastInsertKey( (sal_uInt16)(nPos - CLOffset) );
}
@@ -2704,15 +2704,15 @@ void SvNumberFormatter::ImpGetNegCurrFormat( String& sNegStr, const String& rCur
void SvNumberFormatter::GenerateFormat(String& sString,
sal_uInt32 nIndex,
LanguageType eLnge,
- BOOL bThousand,
- BOOL IsRed,
- USHORT nPrecision,
- USHORT nAnzLeading)
+ sal_Bool bThousand,
+ sal_Bool IsRed,
+ sal_uInt16 nPrecision,
+ sal_uInt16 nAnzLeading)
{
if (eLnge == LANGUAGE_DONTKNOW)
eLnge = IniLnge;
short eType = GetType(nIndex);
- USHORT i;
+ sal_uInt16 i;
ImpGenerateCL(eLnge); // ggfs. neu Standard-
// formate anlegen
sString.Erase();
@@ -2764,15 +2764,15 @@ void SvNumberFormatter::GenerateFormat(String& sString,
String sNegStr = sString;
String aCurr;
const NfCurrencyEntry* pEntry;
- BOOL bBank;
+ sal_Bool bBank;
if ( GetNewCurrencySymbolString( nIndex, aCurr, &pEntry, &bBank ) )
{
if ( pEntry )
{
- USHORT nPosiForm = NfCurrencyEntry::GetEffectivePositiveFormat(
+ sal_uInt16 nPosiForm = NfCurrencyEntry::GetEffectivePositiveFormat(
xLocaleData->getCurrPositiveFormat(),
pEntry->GetPositiveFormat(), bBank );
- USHORT nNegaForm = NfCurrencyEntry::GetEffectiveNegativeFormat(
+ sal_uInt16 nNegaForm = NfCurrencyEntry::GetEffectiveNegativeFormat(
xLocaleData->getCurrNegativeFormat(),
pEntry->GetNegativeFormat(), bBank );
pEntry->CompletePositiveFormatString( sString, bBank,
@@ -2782,12 +2782,12 @@ void SvNumberFormatter::GenerateFormat(String& sString,
}
else
{ // assume currency abbreviation (AKA banking symbol), not symbol
- USHORT nPosiForm = NfCurrencyEntry::GetEffectivePositiveFormat(
+ sal_uInt16 nPosiForm = NfCurrencyEntry::GetEffectivePositiveFormat(
xLocaleData->getCurrPositiveFormat(),
- xLocaleData->getCurrPositiveFormat(), TRUE );
- USHORT nNegaForm = NfCurrencyEntry::GetEffectiveNegativeFormat(
+ xLocaleData->getCurrPositiveFormat(), sal_True );
+ sal_uInt16 nNegaForm = NfCurrencyEntry::GetEffectiveNegativeFormat(
xLocaleData->getCurrNegativeFormat(),
- xLocaleData->getCurrNegativeFormat(), TRUE );
+ xLocaleData->getCurrNegativeFormat(), sal_True );
NfCurrencyEntry::CompletePositiveFormatString( sString, aCurr,
nPosiForm );
NfCurrencyEntry::CompleteNegativeFormatString( sNegStr, aCurr,
@@ -2825,7 +2825,7 @@ void SvNumberFormatter::GenerateFormat(String& sString,
}
}
-BOOL SvNumberFormatter::IsUserDefined(const String& sStr,
+sal_Bool SvNumberFormatter::IsUserDefined(const String& sStr,
LanguageType eLnge)
{
if (eLnge == LANGUAGE_DONTKNOW)
@@ -2835,11 +2835,11 @@ BOOL SvNumberFormatter::IsUserDefined(const String& sStr,
eLnge = ActLnge;
sal_uInt32 nKey = ImpIsEntry(sStr, CLOffset, eLnge);
if (nKey == NUMBERFORMAT_ENTRY_NOT_FOUND)
- return TRUE;
+ return sal_True;
SvNumberformat* pEntry = aFTable.Get(nKey);
if ( pEntry && ((pEntry->GetType() & NUMBERFORMAT_DEFINED) != 0) )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
sal_uInt32 SvNumberFormatter::GetEntryKey(const String& sStr,
@@ -2947,7 +2947,7 @@ SvNumberFormatterIndexTable* SvNumberFormatter::MergeFormatter(SvNumberFormatter
else if (!aFTable.Insert(nNewKey, pNewEntry))
delete pNewEntry;
else
- pStdFormat->SetLastInsertKey((USHORT) (nNewKey - nCLOffset));
+ pStdFormat->SetLastInsertKey((sal_uInt16) (nNewKey - nCLOffset));
}
if (nNewKey != nOldKey) // neuer Index
{
@@ -3011,7 +3011,7 @@ NfIndexTableOffset SvNumberFormatter::GetIndexTableOffset( sal_uInt32 nFormat )
sal_uInt32 nOffset = nFormat % SV_COUNTRY_LANGUAGE_OFFSET; // relativIndex
if ( nOffset > SV_MAX_ANZ_STANDARD_FORMATE )
return NF_INDEX_TABLE_ENTRIES; // kein eingebautes Format
- for ( USHORT j = 0; j < NF_INDEX_TABLE_ENTRIES; j++ )
+ for ( sal_uInt16 j = 0; j < NF_INDEX_TABLE_ENTRIES; j++ )
{
if ( theIndexTable[j] == nOffset )
return (NfIndexTableOffset) j;
@@ -3020,19 +3020,19 @@ NfIndexTableOffset SvNumberFormatter::GetIndexTableOffset( sal_uInt32 nFormat )
}
-void SvNumberFormatter::SetYear2000( USHORT nVal )
+void SvNumberFormatter::SetYear2000( sal_uInt16 nVal )
{
pStringScanner->SetYear2000( nVal );
}
-USHORT SvNumberFormatter::GetYear2000() const
+sal_uInt16 SvNumberFormatter::GetYear2000() const
{
return pStringScanner->GetYear2000();
}
-USHORT SvNumberFormatter::ExpandTwoDigitYear( USHORT nYear ) const
+sal_uInt16 SvNumberFormatter::ExpandTwoDigitYear( sal_uInt16 nYear ) const
{
if ( nYear < 100 )
return SvNumberFormatter::ExpandTwoDigitYear( nYear,
@@ -3042,9 +3042,9 @@ USHORT SvNumberFormatter::ExpandTwoDigitYear( USHORT nYear ) const
// static
-USHORT SvNumberFormatter::GetYear2000Default()
+sal_uInt16 SvNumberFormatter::GetYear2000Default()
{
- return (USHORT) ::utl::MiscCfg().GetYear2000();
+ return (sal_uInt16) ::utl::MiscCfg().GetYear2000();
}
@@ -3079,9 +3079,9 @@ const NfCurrencyEntry& SvNumberFormatter::GetCurrencyEntry( LanguageType eLang )
{
eLang = MsLangId::getRealLanguage( eLang );
const NfCurrencyTable& rTable = GetTheCurrencyTable();
- USHORT nCount = rTable.Count();
+ sal_uInt16 nCount = rTable.Count();
const NfCurrencyEntryPtr* ppData = rTable.GetData();
- for ( USHORT j = 0; j < nCount; j++, ppData++ )
+ for ( sal_uInt16 j = 0; j < nCount; j++, ppData++ )
{
if ( (*ppData)->GetLanguage() == eLang )
return **ppData;
@@ -3097,9 +3097,9 @@ const NfCurrencyEntry* SvNumberFormatter::GetCurrencyEntry(
{
eLang = MsLangId::getRealLanguage( eLang );
const NfCurrencyTable& rTable = GetTheCurrencyTable();
- USHORT nCount = rTable.Count();
+ sal_uInt16 nCount = rTable.Count();
const NfCurrencyEntryPtr* ppData = rTable.GetData();
- for ( USHORT j = 0; j < nCount; j++, ppData++ )
+ for ( sal_uInt16 j = 0; j < nCount; j++, ppData++ )
{
if ( (*ppData)->GetLanguage() == eLang &&
(*ppData)->GetBankSymbol() == rAbbrev )
@@ -3116,9 +3116,9 @@ const NfCurrencyEntry* SvNumberFormatter::GetLegacyOnlyCurrencyEntry(
if (!bCurrencyTableInitialized)
GetTheCurrencyTable(); // just for initialization
const NfCurrencyTable& rTable = theLegacyOnlyCurrencyTable::get();
- USHORT nCount = rTable.Count();
+ sal_uInt16 nCount = rTable.Count();
const NfCurrencyEntryPtr* ppData = rTable.GetData();
- for ( USHORT j = 0; j < nCount; j++, ppData++ )
+ for ( sal_uInt16 j = 0; j < nCount; j++, ppData++ )
{
if ( (*ppData)->GetSymbol() == rSymbol &&
(*ppData)->GetBankSymbol() == rAbbrev )
@@ -3147,11 +3147,11 @@ void SvNumberFormatter::SetDefaultSystemCurrency( const String& rAbbrev, Languag
if ( eLang == LANGUAGE_SYSTEM )
eLang = SvtSysLocale().GetLanguage();
const NfCurrencyTable& rTable = GetTheCurrencyTable();
- USHORT nCount = rTable.Count();
+ sal_uInt16 nCount = rTable.Count();
const NfCurrencyEntryPtr* ppData = rTable.GetData();
if ( rAbbrev.Len() )
{
- for ( USHORT j = 0; j < nCount; j++, ppData++ )
+ for ( sal_uInt16 j = 0; j < nCount; j++, ppData++ )
{
if ( (*ppData)->GetLanguage() == eLang && (*ppData)->GetBankSymbol() == rAbbrev )
{
@@ -3162,7 +3162,7 @@ void SvNumberFormatter::SetDefaultSystemCurrency( const String& rAbbrev, Languag
}
else
{
- for ( USHORT j = 0; j < nCount; j++, ppData++ )
+ for ( sal_uInt16 j = 0; j < nCount; j++, ppData++ )
{
if ( (*ppData)->GetLanguage() == eLang )
{
@@ -3188,8 +3188,8 @@ sal_uInt32 SvNumberFormatter::ImpGetDefaultSystemCurrencyFormat()
xub_StrLen nCheck;
short nType;
NfWSStringsDtor aCurrList;
- USHORT nDefault = GetCurrencyFormatStrings( aCurrList,
- GetCurrencyEntry( LANGUAGE_SYSTEM ), FALSE );
+ sal_uInt16 nDefault = GetCurrencyFormatStrings( aCurrList,
+ GetCurrencyEntry( LANGUAGE_SYSTEM ), sal_False );
DBG_ASSERT( aCurrList.Count(), "where is the NewCurrency System standard format?!?" );
// if already loaded or user defined nDefaultSystemCurrencyFormat
// will be set to the right value
@@ -3207,7 +3207,7 @@ sal_uInt32 SvNumberFormatter::ImpGetDefaultCurrencyFormat()
{
sal_uInt32 CLOffset = ImpGetCLOffset( ActLnge );
sal_uInt32 nDefaultCurrencyFormat =
- (sal_uInt32)(sal_uIntPtr) aDefaultFormatKeys.Get( CLOffset + ZF_STANDARD_CURRENCY );
+ (sal_uInt32)(sal_uLong) aDefaultFormatKeys.Get( CLOffset + ZF_STANDARD_CURRENCY );
if ( !nDefaultCurrencyFormat )
nDefaultCurrencyFormat = NUMBERFORMAT_ENTRY_NOT_FOUND;
if ( nDefaultCurrencyFormat == NUMBERFORMAT_ENTRY_NOT_FOUND )
@@ -3233,8 +3233,8 @@ sal_uInt32 SvNumberFormatter::ImpGetDefaultCurrencyFormat()
xub_StrLen nCheck;
short nType;
NfWSStringsDtor aCurrList;
- USHORT nDefault = GetCurrencyFormatStrings( aCurrList,
- GetCurrencyEntry( ActLnge ), FALSE );
+ sal_uInt16 nDefault = GetCurrencyFormatStrings( aCurrList,
+ GetCurrencyEntry( ActLnge ), sal_False );
DBG_ASSERT( aCurrList.Count(), "where is the NewCurrency standard format?" );
if ( aCurrList.Count() )
{
@@ -3265,39 +3265,39 @@ sal_uInt32 SvNumberFormatter::ImpGetDefaultCurrencyFormat()
// static
// try to make it inline if possible since this a loop body
-// TRUE: continue; FALSE: break loop, if pFoundEntry==NULL dupe found
+// sal_True: continue; sal_False: break loop, if pFoundEntry==NULL dupe found
#ifndef DBG_UTIL
inline
#endif
- BOOL SvNumberFormatter::ImpLookupCurrencyEntryLoopBody(
- const NfCurrencyEntry*& pFoundEntry, BOOL& bFoundBank,
- const NfCurrencyEntry* pData, USHORT nPos, const String& rSymbol )
+ sal_Bool SvNumberFormatter::ImpLookupCurrencyEntryLoopBody(
+ const NfCurrencyEntry*& pFoundEntry, sal_Bool& bFoundBank,
+ const NfCurrencyEntry* pData, sal_uInt16 nPos, const String& rSymbol )
{
- BOOL bFound;
+ sal_Bool bFound;
if ( pData->GetSymbol() == rSymbol )
{
- bFound = TRUE;
- bFoundBank = FALSE;
+ bFound = sal_True;
+ bFoundBank = sal_False;
}
else if ( pData->GetBankSymbol() == rSymbol )
{
- bFound = TRUE;
- bFoundBank = TRUE;
+ bFound = sal_True;
+ bFoundBank = sal_True;
}
else
- bFound = FALSE;
+ bFound = sal_False;
if ( bFound )
{
if ( pFoundEntry && pFoundEntry != pData )
{
pFoundEntry = NULL;
- return FALSE; // break loop, not unique
+ return sal_False; // break loop, not unique
}
if ( nPos == 0 )
{ // first entry is SYSTEM
pFoundEntry = MatchSystemCurrency();
if ( pFoundEntry )
- return FALSE; // break loop
+ return sal_False; // break loop
// even if there are more matching entries
// this one is propably the one we are looking for
else
@@ -3306,19 +3306,19 @@ inline
else
pFoundEntry = pData;
}
- return TRUE;
+ return sal_True;
}
-BOOL SvNumberFormatter::GetNewCurrencySymbolString( sal_uInt32 nFormat,
+sal_Bool SvNumberFormatter::GetNewCurrencySymbolString( sal_uInt32 nFormat,
String& rStr, const NfCurrencyEntry** ppEntry /* = NULL */,
- BOOL* pBank /* = NULL */ ) const
+ sal_Bool* pBank /* = NULL */ ) const
{
rStr.Erase();
if ( ppEntry )
*ppEntry = NULL;
if ( pBank )
- *pBank = FALSE;
+ *pBank = sal_False;
SvNumberformat* pFormat = (SvNumberformat*) aFTable.Get( nFormat );
if ( pFormat )
{
@@ -3327,11 +3327,11 @@ BOOL SvNumberFormatter::GetNewCurrencySymbolString( sal_uInt32 nFormat,
{
if ( ppEntry )
{
- BOOL bFoundBank = FALSE;
+ sal_Bool bFoundBank = sal_False;
// we definiteley need an entry matching the format code string
const NfCurrencyEntry* pFoundEntry = GetCurrencyEntry(
bFoundBank, aSymbol, aExtension, pFormat->GetLanguage(),
- TRUE );
+ sal_True );
if ( pFoundEntry )
{
*ppEntry = pFoundEntry;
@@ -3357,17 +3357,17 @@ BOOL SvNumberFormatter::GetNewCurrencySymbolString( sal_uInt32 nFormat,
rStr += aExtension;
rStr += ']';
}
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
// static
-const NfCurrencyEntry* SvNumberFormatter::GetCurrencyEntry( BOOL & bFoundBank,
+const NfCurrencyEntry* SvNumberFormatter::GetCurrencyEntry( sal_Bool & bFoundBank,
const String& rSymbol, const String& rExtension,
- LanguageType eFormatLanguage, BOOL bOnlyStringLanguage )
+ LanguageType eFormatLanguage, sal_Bool bOnlyStringLanguage )
{
xub_StrLen nExtLen = rExtension.Len();
LanguageType eExtLang;
@@ -3384,14 +3384,14 @@ const NfCurrencyEntry* SvNumberFormatter::GetCurrencyEntry( BOOL & bFoundBank,
eExtLang = LANGUAGE_DONTKNOW;
const NfCurrencyEntry* pFoundEntry = NULL;
const NfCurrencyTable& rTable = GetTheCurrencyTable();
- USHORT nCount = rTable.Count();
- BOOL bCont = TRUE;
+ sal_uInt16 nCount = rTable.Count();
+ sal_Bool bCont = sal_True;
// first try with given extension language/country
if ( nExtLen )
{
const NfCurrencyEntryPtr* ppData = rTable.GetData();
- for ( USHORT j = 0; j < nCount && bCont; j++, ppData++ )
+ for ( sal_uInt16 j = 0; j < nCount && bCont; j++, ppData++ )
{
LanguageType eLang = (*ppData)->GetLanguage();
if ( eLang == eExtLang ||
@@ -3413,7 +3413,7 @@ const NfCurrencyEntry* SvNumberFormatter::GetCurrencyEntry( BOOL & bFoundBank,
{
// now try the language/country of the number format
const NfCurrencyEntryPtr* ppData = rTable.GetData();
- for ( USHORT j = 0; j < nCount && bCont; j++, ppData++ )
+ for ( sal_uInt16 j = 0; j < nCount && bCont; j++, ppData++ )
{
LanguageType eLang = (*ppData)->GetLanguage();
if ( eLang == eFormatLanguage ||
@@ -3435,7 +3435,7 @@ const NfCurrencyEntry* SvNumberFormatter::GetCurrencyEntry( BOOL & bFoundBank,
if ( !nExtLen )
{
const NfCurrencyEntryPtr* ppData = rTable.GetData();
- for ( USHORT j = 0; j < nCount && bCont; j++, ppData++ )
+ for ( sal_uInt16 j = 0; j < nCount && bCont; j++, ppData++ )
{
bCont = ImpLookupCurrencyEntryLoopBody( pFoundEntry, bFoundBank,
*ppData, j, rSymbol );
@@ -3581,10 +3581,10 @@ void SvNumberFormatter::ImpInitCurrencyTable()
// ::osl::MutexGuard aGuard( GetMutex() );
// while ( !bCurrencyTableInitialized )
// ImpInitCurrencyTable();
- static BOOL bInitializing = FALSE;
+ static sal_Bool bInitializing = sal_False;
if ( bCurrencyTableInitialized || bInitializing )
return ;
- bInitializing = TRUE;
+ bInitializing = sal_True;
RTL_LOGFILE_CONTEXT_AUTHOR( aTimeLog, "svl", "er93726", "SvNumberFormatter::ImpInitCurrencyTable" );
@@ -3597,14 +3597,14 @@ void SvNumberFormatter::ImpInitCurrencyTable()
LanguageType eConfiguredCurrencyLanguage = LANGUAGE_SYSTEM;
SvtSysLocaleOptions().GetCurrencyAbbrevAndLanguage(
aConfiguredCurrencyAbbrev, eConfiguredCurrencyLanguage );
- USHORT nSecondarySystemCurrencyPosition = 0;
- USHORT nMatchingSystemCurrencyPosition = 0;
+ sal_uInt16 nSecondarySystemCurrencyPosition = 0;
+ sal_uInt16 nMatchingSystemCurrencyPosition = 0;
NfCurrencyEntryPtr pEntry;
// first entry is SYSTEM
pEntry = new NfCurrencyEntry( *pLocaleData, LANGUAGE_SYSTEM );
theCurrencyTable::get().Insert( pEntry, 0 );
- USHORT nCurrencyPos = 1;
+ sal_uInt16 nCurrencyPos = 1;
::com::sun::star::uno::Sequence< ::com::sun::star::lang::Locale > xLoc =
LocaleDataWrapper::getInstalledLocaleNames();
@@ -3613,7 +3613,7 @@ void SvNumberFormatter::ImpInitCurrencyTable()
Locale const * const pLocales = xLoc.getConstArray();
NfCurrencyTable &rCurrencyTable = theCurrencyTable::get();
NfCurrencyTable &rLegacyOnlyCurrencyTable = theLegacyOnlyCurrencyTable::get();
- USHORT nLegacyOnlyCurrencyPos = 0;
+ sal_uInt16 nLegacyOnlyCurrencyPos = 0;
for ( sal_Int32 nLocale = 0; nLocale < nLocaleCount; nLocale++ )
{
LanguageType eLang = MsLangId::convertLocaleToLanguage(
@@ -3621,8 +3621,8 @@ void SvNumberFormatter::ImpInitCurrencyTable()
#if OSL_DEBUG_LEVEL > 1
LanguageType eReal = MsLangId::getRealLanguage( eLang );
if ( eReal != eLang ) {
- BOOL bBreak;
- bBreak = TRUE;
+ sal_Bool bBreak;
+ bBreak = sal_True;
}
#endif
pLocaleData->setLocale( pLocales[nLocale] );
@@ -3648,7 +3648,7 @@ void SvNumberFormatter::ImpInitCurrencyTable()
rCurrencyTable.Insert( pEntry, nCurrencyPos++ );
if ( !nSystemCurrencyPosition && (aConfiguredCurrencyAbbrev.Len() ?
pEntry->GetBankSymbol() == aConfiguredCurrencyAbbrev &&
- pEntry->GetLanguage() == eConfiguredCurrencyLanguage : FALSE) )
+ pEntry->GetLanguage() == eConfiguredCurrencyLanguage : sal_False) )
nSystemCurrencyPosition = nCurrencyPos-1;
if ( !nMatchingSystemCurrencyPosition &&
pEntry->GetLanguage() == eSysLang )
@@ -3669,15 +3669,15 @@ void SvNumberFormatter::ImpInitCurrencyTable()
{
pEntry = new NfCurrencyEntry( pCurrencies[nCurrency], *pLocaleData, eLang );
// no dupes
- BOOL bInsert = TRUE;
+ sal_Bool bInsert = sal_True;
NfCurrencyEntry const * const * pData = rCurrencyTable.GetData();
- USHORT n = rCurrencyTable.Count();
+ sal_uInt16 n = rCurrencyTable.Count();
pData++; // skip first SYSTEM entry
- for ( USHORT j=1; j<n; j++ )
+ for ( sal_uInt16 j=1; j<n; j++ )
{
if ( *(*pData++) == *pEntry )
{
- bInsert = FALSE;
+ bInsert = sal_False;
break; // for
}
}
@@ -3715,20 +3715,20 @@ void SvNumberFormatter::ImpInitCurrencyTable()
delete pLocaleData;
SvtSysLocaleOptions::SetCurrencyChangeLink(
STATIC_LINK( NULL, SvNumberFormatter, CurrencyChangeLink ) );
- bInitializing = FALSE;
- bCurrencyTableInitialized = TRUE;
+ bInitializing = sal_False;
+ bCurrencyTableInitialized = sal_True;
}
-USHORT SvNumberFormatter::GetCurrencyFormatStrings( NfWSStringsDtor& rStrArr,
- const NfCurrencyEntry& rCurr, BOOL bBank ) const
+sal_uInt16 SvNumberFormatter::GetCurrencyFormatStrings( NfWSStringsDtor& rStrArr,
+ const NfCurrencyEntry& rCurr, sal_Bool bBank ) const
{
- USHORT nDefault = 0;
+ sal_uInt16 nDefault = 0;
if ( bBank )
{ // nur Bankensymbole
String aPositiveBank, aNegativeBank;
- rCurr.BuildPositiveFormatString( aPositiveBank, TRUE, *xLocaleData, 1 );
- rCurr.BuildNegativeFormatString( aNegativeBank, TRUE, *xLocaleData, 1 );
+ rCurr.BuildPositiveFormatString( aPositiveBank, sal_True, *xLocaleData, 1 );
+ rCurr.BuildNegativeFormatString( aNegativeBank, sal_True, *xLocaleData, 1 );
WSStringPtr pFormat1 = new String( aPositiveBank );
*pFormat1 += ';';
@@ -3758,14 +3758,14 @@ USHORT SvNumberFormatter::GetCurrencyFormatStrings( NfWSStringsDtor& rStrArr,
aRed += pFormatScanner->GetRedString();
aRed += ']';
- rCurr.BuildPositiveFormatString( aPositive, FALSE, *xLocaleData, 1 );
- rCurr.BuildNegativeFormatString( aNegative, FALSE, *xLocaleData, 1 );
+ rCurr.BuildPositiveFormatString( aPositive, sal_False, *xLocaleData, 1 );
+ rCurr.BuildNegativeFormatString( aNegative, sal_False, *xLocaleData, 1 );
if ( rCurr.GetDigits() )
{
- rCurr.BuildPositiveFormatString( aPositiveNoDec, FALSE, *xLocaleData, 0 );
- rCurr.BuildNegativeFormatString( aNegativeNoDec, FALSE, *xLocaleData, 0 );
- rCurr.BuildPositiveFormatString( aPositiveDashed, FALSE, *xLocaleData, 2 );
- rCurr.BuildNegativeFormatString( aNegativeDashed, FALSE, *xLocaleData, 2 );
+ rCurr.BuildPositiveFormatString( aPositiveNoDec, sal_False, *xLocaleData, 0 );
+ rCurr.BuildNegativeFormatString( aNegativeNoDec, sal_False, *xLocaleData, 0 );
+ rCurr.BuildPositiveFormatString( aPositiveDashed, sal_False, *xLocaleData, 2 );
+ rCurr.BuildNegativeFormatString( aNegativeDashed, sal_False, *xLocaleData, 2 );
pFormat1 = new String( aPositiveNoDec );
*pFormat1 += ';';
@@ -3848,7 +3848,7 @@ NfCurrencyEntry::NfCurrencyEntry( const ::com::sun::star::i18n::Currency & rCurr
}
-BOOL NfCurrencyEntry::operator==( const NfCurrencyEntry& r ) const
+sal_Bool NfCurrencyEntry::operator==( const NfCurrencyEntry& r ) const
{
return aSymbol == r.aSymbol
&& aBankSymbol == r.aBankSymbol
@@ -3869,10 +3869,10 @@ void NfCurrencyEntry::SetEuro()
}
-BOOL NfCurrencyEntry::IsEuro() const
+sal_Bool NfCurrencyEntry::IsEuro() const
{
if ( aBankSymbol.EqualsAscii( "EUR" ) )
- return TRUE;
+ return sal_True;
String aEuro( NfCurrencyEntry::GetEuroSymbol() );
return aSymbol == aEuro;
}
@@ -3886,8 +3886,8 @@ void NfCurrencyEntry::ApplyVariableInformation( const NfCurrencyEntry& r )
}
-void NfCurrencyEntry::BuildSymbolString( String& rStr, BOOL bBank,
- BOOL bWithoutExtension ) const
+void NfCurrencyEntry::BuildSymbolString( String& rStr, sal_Bool bBank,
+ sal_Bool bWithoutExtension ) const
{
rStr = '[';
rStr += '$';
@@ -3914,7 +3914,7 @@ void NfCurrencyEntry::BuildSymbolString( String& rStr, BOOL bBank,
void NfCurrencyEntry::Impl_BuildFormatStringNumChars( String& rStr,
- const LocaleDataWrapper& rLoc, USHORT nDecimalFormat ) const
+ const LocaleDataWrapper& rLoc, sal_uInt16 nDecimalFormat ) const
{
rStr.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "###0" ) );
rStr.Insert( rLoc.getNumThousandSep(), 1 );
@@ -3926,28 +3926,28 @@ void NfCurrencyEntry::Impl_BuildFormatStringNumChars( String& rStr,
}
-void NfCurrencyEntry::BuildPositiveFormatString( String& rStr, BOOL bBank,
- const LocaleDataWrapper& rLoc, USHORT nDecimalFormat ) const
+void NfCurrencyEntry::BuildPositiveFormatString( String& rStr, sal_Bool bBank,
+ const LocaleDataWrapper& rLoc, sal_uInt16 nDecimalFormat ) const
{
Impl_BuildFormatStringNumChars( rStr, rLoc, nDecimalFormat );
- USHORT nPosiForm = NfCurrencyEntry::GetEffectivePositiveFormat(
+ sal_uInt16 nPosiForm = NfCurrencyEntry::GetEffectivePositiveFormat(
rLoc.getCurrPositiveFormat(), nPositiveFormat, bBank );
CompletePositiveFormatString( rStr, bBank, nPosiForm );
}
-void NfCurrencyEntry::BuildNegativeFormatString( String& rStr, BOOL bBank,
- const LocaleDataWrapper& rLoc, USHORT nDecimalFormat ) const
+void NfCurrencyEntry::BuildNegativeFormatString( String& rStr, sal_Bool bBank,
+ const LocaleDataWrapper& rLoc, sal_uInt16 nDecimalFormat ) const
{
Impl_BuildFormatStringNumChars( rStr, rLoc, nDecimalFormat );
- USHORT nNegaForm = NfCurrencyEntry::GetEffectiveNegativeFormat(
+ sal_uInt16 nNegaForm = NfCurrencyEntry::GetEffectiveNegativeFormat(
rLoc.getCurrNegativeFormat(), nNegativeFormat, bBank );
CompleteNegativeFormatString( rStr, bBank, nNegaForm );
}
-void NfCurrencyEntry::CompletePositiveFormatString( String& rStr, BOOL bBank,
- USHORT nPosiForm ) const
+void NfCurrencyEntry::CompletePositiveFormatString( String& rStr, sal_Bool bBank,
+ sal_uInt16 nPosiForm ) const
{
String aSymStr;
BuildSymbolString( aSymStr, bBank );
@@ -3955,8 +3955,8 @@ void NfCurrencyEntry::CompletePositiveFormatString( String& rStr, BOOL bBank,
}
-void NfCurrencyEntry::CompleteNegativeFormatString( String& rStr, BOOL bBank,
- USHORT nNegaForm ) const
+void NfCurrencyEntry::CompleteNegativeFormatString( String& rStr, sal_Bool bBank,
+ sal_uInt16 nNegaForm ) const
{
String aSymStr;
BuildSymbolString( aSymStr, bBank );
@@ -3966,7 +3966,7 @@ void NfCurrencyEntry::CompleteNegativeFormatString( String& rStr, BOOL bBank,
// static
void NfCurrencyEntry::CompletePositiveFormatString( String& rStr,
- const String& rSymStr, USHORT nPositiveFormat )
+ const String& rSymStr, sal_uInt16 nPositiveFormat )
{
switch( nPositiveFormat )
{
@@ -3997,7 +3997,7 @@ void NfCurrencyEntry::CompletePositiveFormatString( String& rStr,
// static
void NfCurrencyEntry::CompleteNegativeFormatString( String& rStr,
- const String& rSymStr, USHORT nNegativeFormat )
+ const String& rSymStr, sal_uInt16 nNegativeFormat )
{
switch( nNegativeFormat )
{
@@ -4118,11 +4118,11 @@ void NfCurrencyEntry::CompleteNegativeFormatString( String& rStr,
// static
-USHORT NfCurrencyEntry::GetEffectivePositiveFormat( USHORT
+sal_uInt16 NfCurrencyEntry::GetEffectivePositiveFormat( sal_uInt16
#if ! NF_BANKSYMBOL_FIX_POSITION
nIntlFormat
#endif
- , USHORT nCurrFormat, BOOL bBank )
+ , sal_uInt16 nCurrFormat, sal_Bool bBank )
{
if ( bBank )
{
@@ -4154,7 +4154,7 @@ USHORT NfCurrencyEntry::GetEffectivePositiveFormat( USHORT
// nur aufrufen, wenn nCurrFormat wirklich mit Klammern ist
-USHORT lcl_MergeNegativeParenthesisFormat( USHORT nIntlFormat, USHORT nCurrFormat )
+sal_uInt16 lcl_MergeNegativeParenthesisFormat( sal_uInt16 nIntlFormat, sal_uInt16 nCurrFormat )
{
short nSign = 0; // -1:=Klammer 0:=links, 1:=mitte, 2:=rechts
switch ( nIntlFormat )
@@ -4239,8 +4239,8 @@ USHORT lcl_MergeNegativeParenthesisFormat( USHORT nIntlFormat, USHORT nCurrForma
// static
-USHORT NfCurrencyEntry::GetEffectiveNegativeFormat( USHORT nIntlFormat,
- USHORT nCurrFormat, BOOL bBank )
+sal_uInt16 NfCurrencyEntry::GetEffectiveNegativeFormat( sal_uInt16 nIntlFormat,
+ sal_uInt16 nCurrFormat, sal_Bool bBank )
{
if ( bBank )
{
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 3d943fef230c..92398792077d 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -74,13 +74,13 @@ const double EXP_LOWER_BOUND = 1.0E-4; // prefer scientific notation below this
const double _D_MAX_U_LONG_ = (double) 0xffffffff; // 4294967295.0
const double _D_MAX_LONG_ = (double) 0x7fffffff; // 2147483647.0
-const USHORT _MAX_FRACTION_PREC = 3;
+const sal_uInt16 _MAX_FRACTION_PREC = 3;
const double D_EPS = 1.0E-2;
const double _D_MAX_D_BY_100 = 1.7E306;
const double _D_MIN_M_BY_1000 = 2.3E-305;
-static BYTE cCharWidths[ 128-32 ] = {
+static sal_uInt8 cCharWidths[ 128-32 ] = {
1,1,1,2,2,3,2,1,1,1,1,2,1,1,1,1,
2,2,2,2,2,2,2,2,2,2,1,1,2,2,2,2,
3,2,2,2,2,2,2,3,2,1,2,2,2,3,3,3,
@@ -94,7 +94,7 @@ xub_StrLen SvNumberformat::InsertBlanks( String& r, xub_StrLen nPos, sal_Unicode
{
if( c >= 32 )
{
- USHORT n = 2; // Default fuer Zeichen > 128 (HACK!)
+ sal_uInt16 n = 2; // Default fuer Zeichen > 128 (HACK!)
if( c <= 127 )
n = cCharWidths[ c - 32 ];
while( n-- )
@@ -127,15 +127,15 @@ static long GetPrecExp( double fAbsVal )
}
}
-const USHORT nNewCurrencyVersionId = 0x434E; // "NC"
+const sal_uInt16 nNewCurrencyVersionId = 0x434E; // "NC"
const sal_Unicode cNewCurrencyMagic = 0x01; // Magic for format code in comment
-const USHORT nNewStandardFlagVersionId = 0x4653; // "SF"
+const sal_uInt16 nNewStandardFlagVersionId = 0x4653; // "SF"
/***********************Funktion SvNumberformatInfo******************************/
-void ImpSvNumberformatInfo::Copy( const ImpSvNumberformatInfo& rNumFor, USHORT nAnz )
+void ImpSvNumberformatInfo::Copy( const ImpSvNumberformatInfo& rNumFor, sal_uInt16 nAnz )
{
- for (USHORT i = 0; i < nAnz; i++)
+ for (sal_uInt16 i = 0; i < nAnz; i++)
{
sStrArray[i] = rNumFor.sStrArray[i];
nTypeArray[i] = rNumFor.nTypeArray[i];
@@ -148,9 +148,9 @@ void ImpSvNumberformatInfo::Copy( const ImpSvNumberformatInfo& rNumFor, USHORT n
nCntExp = rNumFor.nCntExp;
}
-void ImpSvNumberformatInfo::Save(SvStream& rStream, USHORT nAnz) const
+void ImpSvNumberformatInfo::Save(SvStream& rStream, sal_uInt16 nAnz) const
{
- for (USHORT i = 0; i < nAnz; i++)
+ for (sal_uInt16 i = 0; i < nAnz; i++)
{
rStream.WriteByteString( sStrArray[i], rStream.GetStreamCharSet() );
short nType = nTypeArray[i];
@@ -175,9 +175,9 @@ void ImpSvNumberformatInfo::Save(SvStream& rStream, USHORT nAnz) const
<< nCntPre << nCntPost << nCntExp;
}
-void ImpSvNumberformatInfo::Load(SvStream& rStream, USHORT nAnz)
+void ImpSvNumberformatInfo::Load(SvStream& rStream, sal_uInt16 nAnz)
{
- for (USHORT i = 0; i < nAnz; i++)
+ for (sal_uInt16 i = 0; i < nAnz; i++)
{
SvNumberformat::LoadString( rStream, sStrArray[i] );
rStream >> nTypeArray[i];
@@ -190,9 +190,9 @@ void ImpSvNumberformatInfo::Load(SvStream& rStream, USHORT nAnz)
//============================================================================
// static
-BYTE SvNumberNatNum::MapDBNumToNatNum( BYTE nDBNum, LanguageType eLang, BOOL bDate )
+sal_uInt8 SvNumberNatNum::MapDBNumToNatNum( sal_uInt8 nDBNum, LanguageType eLang, sal_Bool bDate )
{
- BYTE nNatNum = 0;
+ sal_uInt8 nNatNum = 0;
eLang = MsLangId::getRealLanguage( eLang ); // resolve SYSTEM etc.
eLang &= 0x03FF; // 10 bit primary language
if ( bDate )
@@ -244,9 +244,9 @@ BYTE SvNumberNatNum::MapDBNumToNatNum( BYTE nDBNum, LanguageType eLang, BOOL bDa
// static
-BYTE SvNumberNatNum::MapNatNumToDBNum( BYTE nNatNum, LanguageType eLang, BOOL bDate )
+sal_uInt8 SvNumberNatNum::MapNatNumToDBNum( sal_uInt8 nNatNum, LanguageType eLang, sal_Bool bDate )
{
- BYTE nDBNum = 0;
+ sal_uInt8 nDBNum = 0;
eLang = MsLangId::getRealLanguage( eLang ); // resolve SYSTEM etc.
eLang &= 0x03FF; // 10 bit primary language
if ( bDate )
@@ -330,7 +330,7 @@ ImpSvNumFor::ImpSvNumFor()
aI.nTypeArray = NULL;
aI.sStrArray = NULL;
aI.eScannedType = NUMBERFORMAT_UNDEFINED;
- aI.bThousand = FALSE;
+ aI.bThousand = sal_False;
aI.nThousand = 0;
aI.nCntPre = 0;
aI.nCntPost = 0;
@@ -340,13 +340,13 @@ ImpSvNumFor::ImpSvNumFor()
ImpSvNumFor::~ImpSvNumFor()
{
- for (USHORT i = 0; i < nAnzStrings; i++)
+ for (sal_uInt16 i = 0; i < nAnzStrings; i++)
aI.sStrArray[i].Erase();
delete [] aI.sStrArray;
delete [] aI.nTypeArray;
}
-void ImpSvNumFor::Enlarge(USHORT nAnz)
+void ImpSvNumFor::Enlarge(sal_uInt16 nAnz)
{
if ( nAnzStrings != nAnz )
{
@@ -390,7 +390,7 @@ void ImpSvNumFor::Save(SvStream& rStream) const
void ImpSvNumFor::Load(SvStream& rStream, ImpSvNumberformatScan& rSc,
String& rLoadedColorName )
{
- USHORT nAnz;
+ sal_uInt16 nAnz;
rStream >> nAnz; //! noch nicht direkt nAnzStrings wg. Enlarge
Enlarge( nAnz );
aI.Load( rStream, nAnz );
@@ -400,21 +400,21 @@ void ImpSvNumFor::Load(SvStream& rStream, ImpSvNumberformatScan& rSc,
}
-BOOL ImpSvNumFor::HasNewCurrency() const
+sal_Bool ImpSvNumFor::HasNewCurrency() const
{
- for ( USHORT j=0; j<nAnzStrings; j++ )
+ for ( sal_uInt16 j=0; j<nAnzStrings; j++ )
{
if ( aI.nTypeArray[j] == NF_SYMBOLTYPE_CURRENCY )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL ImpSvNumFor::GetNewCurrencySymbol( String& rSymbol,
+sal_Bool ImpSvNumFor::GetNewCurrencySymbol( String& rSymbol,
String& rExtension ) const
{
- for ( USHORT j=0; j<nAnzStrings; j++ )
+ for ( sal_uInt16 j=0; j<nAnzStrings; j++ )
{
if ( aI.nTypeArray[j] == NF_SYMBOLTYPE_CURRENCY )
{
@@ -423,18 +423,18 @@ BOOL ImpSvNumFor::GetNewCurrencySymbol( String& rSymbol,
rExtension = aI.sStrArray[j+1];
else
rExtension.Erase();
- return TRUE;
+ return sal_True;
}
}
//! kein Erase an rSymbol, rExtension
- return FALSE;
+ return sal_False;
}
void ImpSvNumFor::SaveNewCurrencyMap( SvStream& rStream ) const
{
- USHORT j;
- USHORT nCnt = 0;
+ sal_uInt16 j;
+ sal_uInt16 nCnt = 0;
for ( j=0; j<nAnzStrings; j++ )
{
switch ( aI.nTypeArray[j] )
@@ -463,11 +463,11 @@ void ImpSvNumFor::SaveNewCurrencyMap( SvStream& rStream ) const
void ImpSvNumFor::LoadNewCurrencyMap( SvStream& rStream )
{
- USHORT nCnt;
+ sal_uInt16 nCnt;
rStream >> nCnt;
- for ( USHORT j=0; j<nCnt; j++ )
+ for ( sal_uInt16 j=0; j<nCnt; j++ )
{
- USHORT nPos;
+ sal_uInt16 nPos;
short nType;
rStream >> nPos >> nType;
if ( nPos < nAnzStrings )
@@ -520,7 +520,7 @@ SvNumberformat::SvNumberformat( ImpSvNumberformatScan& rSc, LanguageType eLge )
rScan(rSc),
eLnge(eLge),
nNewStandardDefined(0),
- bStarFlag( FALSE )
+ bStarFlag( sal_False )
{
}
@@ -541,7 +541,7 @@ void SvNumberformat::ImpCopyNumberformat( const SvNumberformat& rFormat )
// #121103# when copying between documents, get color pointers from own scanner
ImpSvNumberformatScan* pColorSc = ( &rScan != &rFormat.rScan ) ? &rScan : NULL;
- for (USHORT i = 0; i < 4; i++)
+ for (sal_uInt16 i = 0; i < 4; i++)
NumFor[i].Copy(rFormat.NumFor[i], pColorSc);
}
@@ -558,10 +558,10 @@ SvNumberformat::SvNumberformat( SvNumberformat& rFormat, ImpSvNumberformatScan&
}
-BOOL lcl_SvNumberformat_IsBracketedPrefix( short nSymbolType )
+sal_Bool lcl_SvNumberformat_IsBracketedPrefix( short nSymbolType )
{
if ( nSymbolType > 0 )
- return TRUE; // conditions
+ return sal_True; // conditions
switch ( nSymbolType )
{
case BRACKET_SYMBOLTYPE_COLOR :
@@ -595,9 +595,9 @@ BOOL lcl_SvNumberformat_IsBracketedPrefix( short nSymbolType )
case BRACKET_SYMBOLTYPE_NATNUM17 :
case BRACKET_SYMBOLTYPE_NATNUM18 :
case BRACKET_SYMBOLTYPE_NATNUM19 :
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -606,11 +606,11 @@ SvNumberformat::SvNumberformat(String& rString,
ImpSvNumberInputScan* pISc,
xub_StrLen& nCheckPos,
LanguageType& eLan,
- BOOL bStan)
+ sal_Bool bStan)
:
rScan(*pSc),
nNewStandardDefined(0),
- bStarFlag( FALSE )
+ bStarFlag( sal_False )
{
// If the group (AKA thousand) separator is a Non-Breaking Space (French)
// replace all occurences by a simple space.
@@ -633,15 +633,15 @@ SvNumberformat::SvNumberformat(String& rString,
else
eLnge = eLan;
bStandard = bStan;
- bIsUsed = FALSE;
+ bIsUsed = sal_False;
fLimit1 = 0.0;
fLimit2 = 0.0;
eOp1 = NUMBERFORMAT_OP_NO;
eOp2 = NUMBERFORMAT_OP_NO;
eType = NUMBERFORMAT_DEFINED;
- BOOL bCancel = FALSE;
- BOOL bCondition = FALSE;
+ sal_Bool bCancel = sal_False;
+ sal_Bool bCondition = sal_False;
short eSymbolType;
xub_StrLen nPos = 0;
xub_StrLen nPosOld;
@@ -649,7 +649,7 @@ SvNumberformat::SvNumberformat(String& rString,
String aComment;
// Split into 4 sub formats
- USHORT nIndex;
+ sal_uInt16 nIndex;
for ( nIndex = 0; nIndex < 4 && !bCancel; nIndex++ )
{
// Original language/country may have to be reestablished
@@ -666,14 +666,14 @@ SvNumberformat::SvNumberformat(String& rString,
{
if ( nIndex == 0 && !bCondition )
{
- bCondition = TRUE;
+ bCondition = sal_True;
eOp1 = (SvNumberformatLimitOps) eSymbolType;
}
else if ( nIndex == 1 && bCondition )
eOp2 = (SvNumberformatLimitOps) eSymbolType;
else // error
{
- bCancel = TRUE; // break for
+ bCancel = sal_True; // break for
nCheckPos = nPosOld;
}
if (!bCancel)
@@ -707,7 +707,7 @@ SvNumberformat::SvNumberformat(String& rString,
nPos++;
else
{
- bCancel = TRUE; // break for
+ bCancel = sal_True; // break for
nCheckPos = nPos;
}
}
@@ -721,7 +721,7 @@ SvNumberformat::SvNumberformat(String& rString,
{
if ( NumFor[nIndex].GetColor() != NULL )
{ // error, more than one color
- bCancel = TRUE; // break for
+ bCancel = sal_True; // break for
nCheckPos = nPosOld;
}
else
@@ -730,7 +730,7 @@ SvNumberformat::SvNumberformat(String& rString,
NumFor[nIndex].SetColor( pColor, sStr);
if (pColor == NULL)
{ // error
- bCancel = TRUE; // break for
+ bCancel = sal_True; // break for
nCheckPos = nPosOld;
}
}
@@ -759,16 +759,16 @@ SvNumberformat::SvNumberformat(String& rString,
{
if ( NumFor[nIndex].GetNatNum().IsSet() )
{
- bCancel = TRUE; // break for
+ bCancel = sal_True; // break for
nCheckPos = nPosOld;
}
else
{
sStr.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "NatNum" ) );
//! eSymbolType is negative
- BYTE nNum = sal::static_int_cast< BYTE >(0 - (eSymbolType - BRACKET_SYMBOLTYPE_NATNUM0));
+ sal_uInt8 nNum = sal::static_int_cast< sal_uInt8 >(0 - (eSymbolType - BRACKET_SYMBOLTYPE_NATNUM0));
sStr += String::CreateFromInt32( nNum );
- NumFor[nIndex].SetNatNumNum( nNum, FALSE );
+ NumFor[nIndex].SetNatNumNum( nNum, sal_False );
}
}
break;
@@ -784,16 +784,16 @@ SvNumberformat::SvNumberformat(String& rString,
{
if ( NumFor[nIndex].GetNatNum().IsSet() )
{
- bCancel = TRUE; // break for
+ bCancel = sal_True; // break for
nCheckPos = nPosOld;
}
else
{
sStr.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "DBNum" ) );
//! eSymbolType is negative
- BYTE nNum = sal::static_int_cast< BYTE >(1 - (eSymbolType - BRACKET_SYMBOLTYPE_DBNUM1));
+ sal_uInt8 nNum = sal::static_int_cast< sal_uInt8 >(1 - (eSymbolType - BRACKET_SYMBOLTYPE_DBNUM1));
sStr += static_cast< sal_Unicode >('0' + nNum);
- NumFor[nIndex].SetNatNumNum( nNum, TRUE );
+ NumFor[nIndex].SetNatNumNum( nNum, sal_True );
}
}
break;
@@ -801,7 +801,7 @@ SvNumberformat::SvNumberformat(String& rString,
{
if ( NumFor[nIndex].GetNatNum().GetLang() != LANGUAGE_DONTKNOW )
{
- bCancel = TRUE; // break for
+ bCancel = sal_True; // break for
nCheckPos = nPosOld;
}
else
@@ -810,7 +810,7 @@ SvNumberformat::SvNumberformat(String& rString,
LanguageType eLang = ImpGetLanguageType( sStr, nTmp );
if ( eLang == LANGUAGE_DONTKNOW )
{
- bCancel = TRUE; // break for
+ bCancel = sal_True; // break for
nCheckPos = nPosOld;
}
else
@@ -851,7 +851,7 @@ SvNumberformat::SvNumberformat(String& rString,
else
{
xub_StrLen nStrPos = pSc->ScanFormat( sStr, aComment );
- USHORT nAnz = pSc->GetAnzResStrings();
+ sal_uInt16 nAnz = pSc->GetAnzResStrings();
if (nAnz == 0) // error
nStrPos = 1;
if (nStrPos == 0) // ok
@@ -863,7 +863,7 @@ SvNumberformat::SvNumberformat(String& rString,
aNat += String::CreateFromInt32( pSc->GetNatNumModifier());
aNat += ']';
sStr.Insert( aNat, 0);
- NumFor[nIndex].SetNatNumNum( pSc->GetNatNumModifier(), FALSE );
+ NumFor[nIndex].SetNatNumNum( pSc->GetNatNumModifier(), sal_False );
}
// #i53826# #i42727# For the Thai T speciality we need
// to freeze the locale and immunize it against
@@ -916,19 +916,19 @@ SvNumberformat::SvNumberformat(String& rString,
else
{
nCheckPos = nPosOld + nStrPos; // error in string
- bCancel = TRUE; // break for
+ bCancel = sal_True; // break for
}
}
}
else if (eSymbolType == BRACKET_SYMBOLTYPE_ERROR) // error
{
nCheckPos = nPosOld;
- bCancel = TRUE;
+ bCancel = sal_True;
}
else if ( lcl_SvNumberformat_IsBracketedPrefix( eSymbolType ) )
{
nCheckPos = nPosOld+1; // error, prefix in string
- bCancel = TRUE; // break for
+ bCancel = sal_True; // break for
}
}
if ( bCancel && !nCheckPos )
@@ -947,7 +947,7 @@ SvNumberformat::SvNumberformat(String& rString,
// hides any text. Need the type here for HasTextFormat()
NumFor[3].Info().eScannedType = NUMBERFORMAT_TEXT;
}
- bCancel = TRUE;
+ bCancel = sal_True;
}
if ( NumFor[nIndex].GetNatNum().IsSet() )
NumFor[nIndex].SetNatNumDate(
@@ -963,7 +963,7 @@ SvNumberformat::SvNumberformat(String& rString,
String aTmp;
if ( !pSc->ScanFormat( aAdd, aTmp ) )
{
- USHORT nAnz = pSc->GetAnzResStrings();
+ sal_uInt16 nAnz = pSc->GetAnzResStrings();
if ( nAnz )
{
NumFor[0].Enlarge(nAnz);
@@ -982,7 +982,7 @@ SvNumberformat::SvNumberformat(String& rString,
String aTmp;
if ( !pSc->ScanFormat( aAdd, aTmp ) )
{
- USHORT nAnz = pSc->GetAnzResStrings();
+ sal_uInt16 nAnz = pSc->GetAnzResStrings();
if ( nAnz )
{
NumFor[nIndex].Enlarge(nAnz);
@@ -1000,7 +1000,7 @@ SvNumberformat::SvNumberformat(String& rString,
String aTmp;
if ( !pSc->ScanFormat( aAdd, aTmp ) )
{
- USHORT nAnz = pSc->GetAnzResStrings();
+ sal_uInt16 nAnz = pSc->GetAnzResStrings();
if ( nAnz )
{
NumFor[nIndex].Enlarge(nAnz);
@@ -1416,12 +1416,12 @@ NfHackConversion SvNumberformat::Load( SvStream& rStream,
ImpSvNumberInputScan& rISc )
{
rHdr.StartEntry();
- USHORT nOp1, nOp2;
+ sal_uInt16 nOp1, nOp2;
SvNumberformat::LoadString( rStream, sFormatstring );
rStream >> eType >> fLimit1 >> fLimit2
>> nOp1 >> nOp2 >> bStandard >> bIsUsed;
NfHackConversion eHackConversion = NF_CONVERT_NONE;
- BOOL bOldConvert = FALSE;
+ sal_Bool bOldConvert = sal_False;
LanguageType eOldTmpLang = 0;
LanguageType eOldNewLang = 0;
if ( pHackConverter )
@@ -1431,7 +1431,7 @@ NfHackConversion SvNumberformat::Load( SvStream& rStream,
eOldNewLang = rScan.GetNewLnge();
}
String aLoadedColorName;
- for (USHORT i = 0; i < 4; i++)
+ for (sal_uInt16 i = 0; i < 4; i++)
{
NumFor[i].Load( rStream, rScan, aLoadedColorName );
if ( pHackConverter && eHackConversion == NF_CONVERT_NONE )
@@ -1477,25 +1477,25 @@ NfHackConversion SvNumberformat::Load( SvStream& rStream,
}
xub_StrLen nNewCurrencyEnd = STRING_NOTFOUND;
- BOOL bNewCurrencyComment = ( aComment.GetChar(0) == cNewCurrencyMagic &&
+ sal_Bool bNewCurrencyComment = ( aComment.GetChar(0) == cNewCurrencyMagic &&
(nNewCurrencyEnd = aComment.Search( cNewCurrencyMagic, 1 )) != STRING_NOTFOUND );
- BOOL bNewCurrencyLoaded = FALSE;
- BOOL bNewCurrency = FALSE;
+ sal_Bool bNewCurrencyLoaded = sal_False;
+ sal_Bool bNewCurrency = sal_False;
- BOOL bGoOn = TRUE;
+ sal_Bool bGoOn = sal_True;
while ( rHdr.BytesLeft() && bGoOn )
{ // as of SV_NUMBERFORMATTER_VERSION_NEW_CURR
- USHORT nId;
+ sal_uInt16 nId;
rStream >> nId;
switch ( nId )
{
case nNewCurrencyVersionId :
{
- bNewCurrencyLoaded = TRUE;
+ bNewCurrencyLoaded = sal_True;
rStream >> bNewCurrency;
if ( bNewCurrency )
{
- for ( USHORT j=0; j<4; j++ )
+ for ( sal_uInt16 j=0; j<4; j++ )
{
NumFor[j].LoadNewCurrencyMap( rStream );
}
@@ -1507,7 +1507,7 @@ NfHackConversion SvNumberformat::Load( SvStream& rStream,
break;
default:
DBG_ERRORFILE( "SvNumberformat::Load: unknown header bytes left nId" );
- bGoOn = FALSE; // stop reading unknown stream left over of newer versions
+ bGoOn = sal_False; // stop reading unknown stream left over of newer versions
// Would be nice to have multiple read/write headers instead
// but old versions wouldn't know it, TLOT.
}
@@ -1529,7 +1529,7 @@ NfHackConversion SvNumberformat::Load( SvStream& rStream,
aComment.Erase( 0, nNewCurrencyEnd+1 );
// Zustaende merken
short nDefined = ( eType & NUMBERFORMAT_DEFINED );
- USHORT nNewStandard = nNewStandardDefined;
+ sal_uInt16 nNewStandard = nNewStandardDefined;
// neu parsen etc.
String aStr( sFormatstring );
xub_StrLen nCheckPos = 0;
@@ -1551,11 +1551,11 @@ NfHackConversion SvNumberformat::Load( SvStream& rStream,
{
case NF_CONVERT_ENGLISH_GERMAN :
ConvertLanguage( *pHackConverter,
- LANGUAGE_ENGLISH_US, LANGUAGE_GERMAN, TRUE );
+ LANGUAGE_ENGLISH_US, LANGUAGE_GERMAN, sal_True );
break;
case NF_CONVERT_GERMAN_ENGLISH :
ConvertLanguage( *pHackConverter,
- LANGUAGE_GERMAN, LANGUAGE_ENGLISH_US, TRUE );
+ LANGUAGE_GERMAN, LANGUAGE_ENGLISH_US, sal_True );
break;
default:
DBG_ERRORFILE( "SvNumberformat::Load: eHackConversion unknown" );
@@ -1565,7 +1565,7 @@ NfHackConversion SvNumberformat::Load( SvStream& rStream,
}
void SvNumberformat::ConvertLanguage( SvNumberFormatter& rConverter,
- LanguageType eConvertFrom, LanguageType eConvertTo, BOOL bSystem )
+ LanguageType eConvertFrom, LanguageType eConvertTo, sal_Bool bSystem )
{
xub_StrLen nCheckPos;
sal_uInt32 nKey;
@@ -1586,7 +1586,7 @@ void SvNumberformat::ConvertLanguage( SvNumberFormatter& rConverter,
if ( bSystem )
eLnge = LANGUAGE_SYSTEM;
// pColor zeigt noch auf Tabelle in temporaerem Formatter/Scanner
- for ( USHORT i = 0; i < 4; i++ )
+ for ( sal_uInt16 i = 0; i < 4; i++ )
{
String aColorName = NumFor[i].GetColorName();
Color* pColor = rScan.GetColor( aColorName );
@@ -1638,7 +1638,7 @@ void SvNumberformat::Save( SvStream& rStream, ImpSvNumMultipleWriteHeader& rHdr
SetComment( "", aFormatstring, aComment );
#endif
- BOOL bNewCurrency = HasNewCurrency();
+ sal_Bool bNewCurrency = HasNewCurrency();
if ( bNewCurrency )
{ // SV_NUMBERFORMATTER_VERSION_NEW_CURR im Kommentar speichern
aComment.Insert( cNewCurrencyMagic, 0 );
@@ -1649,7 +1649,7 @@ void SvNumberformat::Save( SvStream& rStream, ImpSvNumMultipleWriteHeader& rHdr
// old SO5 versions do behave strange (no output) if standard flag is set
// on formats not prepared for it (not having the following exact types)
- BOOL bOldStandard = bStandard;
+ sal_Bool bOldStandard = bStandard;
if ( bOldStandard )
{
switch ( eType )
@@ -1663,15 +1663,15 @@ void SvNumberformat::Save( SvStream& rStream, ImpSvNumMultipleWriteHeader& rHdr
// ok to save
break;
default:
- bOldStandard = FALSE;
+ bOldStandard = sal_False;
}
}
rHdr.StartEntry();
rStream.WriteByteString( aFormatstring, rStream.GetStreamCharSet() );
- rStream << eType << fLimit1 << fLimit2 << (USHORT) eOp1 << (USHORT) eOp2
+ rStream << eType << fLimit1 << fLimit2 << (sal_uInt16) eOp1 << (sal_uInt16) eOp2
<< bOldStandard << bIsUsed;
- for (USHORT i = 0; i < 4; i++)
+ for (sal_uInt16 i = 0; i < 4; i++)
NumFor[i].Save(rStream);
// ab SV_NUMBERFORMATTER_VERSION_NEWSTANDARD
rStream.WriteByteString( aComment, rStream.GetStreamCharSet() );
@@ -1681,7 +1681,7 @@ void SvNumberformat::Save( SvStream& rStream, ImpSvNumMultipleWriteHeader& rHdr
rStream << bNewCurrency;
if ( bNewCurrency )
{
- for ( USHORT j=0; j<4; j++ )
+ for ( sal_uInt16 j=0; j<4; j++ )
{
NumFor[j].SaveNewCurrencyMap( rStream );
}
@@ -1698,34 +1698,34 @@ void SvNumberformat::Save( SvStream& rStream, ImpSvNumMultipleWriteHeader& rHdr
}
-BOOL SvNumberformat::HasNewCurrency() const
+sal_Bool SvNumberformat::HasNewCurrency() const
{
- for ( USHORT j=0; j<4; j++ )
+ for ( sal_uInt16 j=0; j<4; j++ )
{
if ( NumFor[j].HasNewCurrency() )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SvNumberformat::GetNewCurrencySymbol( String& rSymbol,
+sal_Bool SvNumberformat::GetNewCurrencySymbol( String& rSymbol,
String& rExtension ) const
{
- for ( USHORT j=0; j<4; j++ )
+ for ( sal_uInt16 j=0; j<4; j++ )
{
if ( NumFor[j].GetNewCurrencySymbol( rSymbol, rExtension ) )
- return TRUE;
+ return sal_True;
}
rSymbol.Erase();
rExtension.Erase();
- return FALSE;
+ return sal_False;
}
// static
String SvNumberformat::StripNewCurrencyDelimiters( const String& rStr,
- BOOL bQuoteSymbol )
+ sal_Bool bQuoteSymbol )
{
String aTmp;
xub_StrLen nStartPos, nPos, nLen;
@@ -1775,7 +1775,7 @@ String SvNumberformat::StripNewCurrencyDelimiters( const String& rStr,
void SvNumberformat::Build50Formatstring( String& rStr ) const
{
- rStr = StripNewCurrencyDelimiters( sFormatstring, TRUE );
+ rStr = StripNewCurrencyDelimiters( sFormatstring, sal_True );
}
@@ -1841,7 +1841,7 @@ void SvNumberformat::ImpGetOutputStdToPrecision(double& rNumber, String& rOutStr
void SvNumberformat::ImpGetOutputInputLine(double fNumber, String& OutString)
{
- BOOL bModified = FALSE;
+ sal_Bool bModified = sal_False;
if ( (eType & NUMBERFORMAT_PERCENT) && (fabs(fNumber) < _D_MAX_D_BY_100))
{
if (fNumber == 0.0)
@@ -1850,7 +1850,7 @@ void SvNumberformat::ImpGetOutputInputLine(double fNumber, String& OutString)
return;
}
fNumber *= 100;
- bModified = TRUE;
+ bModified = sal_True;
}
if (fNumber == 0.0)
@@ -1885,12 +1885,12 @@ short SvNumberformat::ImpCheckCondition(double& fNumber,
}
}
-BOOL SvNumberformat::GetOutputString(String& sString,
+sal_Bool SvNumberformat::GetOutputString(String& sString,
String& OutString,
Color** ppColor)
{
OutString.Erase();
- USHORT nIx;
+ sal_uInt16 nIx;
if (eType & NUMBERFORMAT_TEXT)
nIx = 0;
else if (NumFor[3].GetnAnz() > 0)
@@ -1898,15 +1898,15 @@ BOOL SvNumberformat::GetOutputString(String& sString,
else
{
*ppColor = NULL; // no change of color
- return FALSE;
+ return sal_False;
}
*ppColor = NumFor[nIx].GetColor();
const ImpSvNumberformatInfo& rInfo = NumFor[nIx].Info();
if (rInfo.eScannedType == NUMBERFORMAT_TEXT)
{
- BOOL bRes = FALSE;
- const USHORT nAnz = NumFor[nIx].GetnAnz();
- for (USHORT i = 0; i < nAnz; i++)
+ sal_Bool bRes = sal_False;
+ const sal_uInt16 nAnz = NumFor[nIx].GetnAnz();
+ for (sal_uInt16 i = 0; i < nAnz; i++)
{
switch (rInfo.nTypeArray[i])
{
@@ -1915,7 +1915,7 @@ BOOL SvNumberformat::GetOutputString(String& sString,
{
OutString += (sal_Unicode) 0x1B;
OutString += rInfo.sStrArray[i].GetChar(1);
- bRes = TRUE;
+ bRes = sal_True;
}
break;
case NF_SYMBOLTYPE_BLANK:
@@ -1932,24 +1932,24 @@ BOOL SvNumberformat::GetOutputString(String& sString,
}
return bRes;
}
- return FALSE;
+ return sal_False;
}
/*
-void SvNumberformat::GetNextFareyNumber(ULONG nPrec, ULONG x0, ULONG x1,
- ULONG y0, ULONG y1,
- ULONG& x2,ULONG& y2)
+void SvNumberformat::GetNextFareyNumber(sal_uLong nPrec, sal_uLong x0, sal_uLong x1,
+ sal_uLong y0, sal_uLong y1,
+ sal_uLong& x2,sal_uLong& y2)
{
x2 = ((y0+nPrec)/y1)*x1 - x0;
y2 = ((y0+nPrec)/y1)*y1 - y0;
}
*/
-ULONG SvNumberformat::ImpGGT(ULONG x, ULONG y)
+sal_uLong SvNumberformat::ImpGGT(sal_uLong x, sal_uLong y)
{
if (y == 0)
return x;
else
{
- ULONG z = x%y;
+ sal_uLong z = x%y;
while (z)
{
x = y;
@@ -1960,13 +1960,13 @@ ULONG SvNumberformat::ImpGGT(ULONG x, ULONG y)
}
}
-ULONG SvNumberformat::ImpGGTRound(ULONG x, ULONG y)
+sal_uLong SvNumberformat::ImpGGTRound(sal_uLong x, sal_uLong y)
{
if (y == 0)
return x;
else
{
- ULONG z = x%y;
+ sal_uLong z = x%y;
while ((double)z/(double)y > D_EPS)
{
x = y;
@@ -2042,11 +2042,11 @@ bool SvNumberformat::GetOutputString(double fNumber, sal_uInt16 nCharCount, Stri
return true;
}
-BOOL SvNumberformat::GetOutputString(double fNumber,
+sal_Bool SvNumberformat::GetOutputString(double fNumber,
String& OutString,
Color** ppColor)
{
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
OutString.Erase(); // alles loeschen
*ppColor = NULL; // keine Farbaenderung
if (eType & NUMBERFORMAT_LOGICAL)
@@ -2055,14 +2055,14 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
OutString = rScan.GetTrueString();
else
OutString = rScan.GetFalseString();
- return FALSE;
+ return sal_False;
}
if (eType & NUMBERFORMAT_TEXT)
{
ImpGetOutputStandard(fNumber, OutString);
- return FALSE;
+ return sal_False;
}
- BOOL bHadStandard = FALSE;
+ sal_Bool bHadStandard = sal_False;
if (bStandard) // einzelne Standardformate
{
if (rScan.GetStandardPrec() == SvNumberFormatter::INPUTSTRING_PRECISION) // alle Zahlformate InputLine
@@ -2102,26 +2102,26 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
return false;
}
ImpGetOutputStandard(fNumber, OutString);
- bHadStandard = TRUE;
+ bHadStandard = sal_True;
}
break;
case NUMBERFORMAT_DATE:
bRes |= ImpGetDateOutput(fNumber, 0, OutString);
- bHadStandard = TRUE;
+ bHadStandard = sal_True;
break;
case NUMBERFORMAT_TIME:
bRes |= ImpGetTimeOutput(fNumber, 0, OutString);
- bHadStandard = TRUE;
+ bHadStandard = sal_True;
break;
case NUMBERFORMAT_DATETIME:
bRes |= ImpGetDateTimeOutput(fNumber, 0, OutString);
- bHadStandard = TRUE;
+ bHadStandard = sal_True;
break;
}
}
if ( !bHadStandard )
{
- USHORT nIx; // Index des Teilformats
+ sal_uInt16 nIx; // Index des Teilformats
short nCheck = ImpCheckCondition(fNumber, fLimit1, eOp1);
if (nCheck == -1 || nCheck == 1) // nur 1 String oder True
nIx = 0;
@@ -2138,20 +2138,20 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
fNumber = -fNumber; // Vorzeichen eliminieren
*ppColor = NumFor[nIx].GetColor();
const ImpSvNumberformatInfo& rInfo = NumFor[nIx].Info();
- const USHORT nAnz = NumFor[nIx].GetnAnz();
+ const sal_uInt16 nAnz = NumFor[nIx].GetnAnz();
if (nAnz == 0 && rInfo.eScannedType == NUMBERFORMAT_UNDEFINED)
- return FALSE; // leer => nichts
+ return sal_False; // leer => nichts
else if (nAnz == 0) // sonst Standard-Format
{
ImpGetOutputStandard(fNumber, OutString);
- return FALSE;
+ return sal_False;
}
switch (rInfo.eScannedType)
{
case NUMBERFORMAT_TEXT:
case NUMBERFORMAT_DEFINED:
{
- for (USHORT i = 0; i < nAnz; i++)
+ for (sal_uInt16 i = 0; i < nAnz; i++)
{
switch (rInfo.nTypeArray[i])
{
@@ -2160,7 +2160,7 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
{
OutString += (sal_Unicode) 0x1B;
OutString += rInfo.sStrArray[i].GetChar(1);
- bRes = TRUE;
+ bRes = sal_True;
}
break;
case NF_SYMBOLTYPE_BLANK:
@@ -2198,13 +2198,13 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
case NUMBERFORMAT_FRACTION:
{
String sStr, sFrac, sDiv; // Strings, Wert fuer
- ULONG nFrac, nDiv; // Vorkommaanteil
+ sal_uLong nFrac, nDiv; // Vorkommaanteil
// Zaehler und Nenner
- BOOL bSign = FALSE;
+ sal_Bool bSign = sal_False;
if (fNumber < 0)
{
if (nIx == 0) // nicht in hinteren
- bSign = TRUE; // Formaten
+ bSign = sal_True; // Formaten
fNumber = -fNumber;
}
double fNum = floor(fNumber); // Vorkommateil
@@ -2213,30 +2213,30 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
// zu gross
{
OutString = rScan.GetErrorString();
- return FALSE;
+ return sal_False;
}
if (rInfo.nCntExp == 0)
{
DBG_ERROR("SvNumberformat:: Bruch, nCntExp == 0");
- return FALSE;
+ return sal_False;
}
- ULONG nBasis = ((ULONG)floor( // 9, 99, 999 ,...
+ sal_uLong nBasis = ((sal_uLong)floor( // 9, 99, 999 ,...
pow(10.0,rInfo.nCntExp))) - 1;
- ULONG x0, y0, x1, y1;
+ sal_uLong x0, y0, x1, y1;
if (rInfo.nCntExp <= _MAX_FRACTION_PREC)
{
- BOOL bUpperHalf;
+ sal_Bool bUpperHalf;
if (fNumber > 0.5)
{
- bUpperHalf = TRUE;
+ bUpperHalf = sal_True;
fNumber -= (fNumber - 0.5) * 2.0;
}
else
- bUpperHalf = FALSE;
+ bUpperHalf = sal_False;
// Einstieg in Farey-Serie
// finden:
- x0 = (ULONG) floor(fNumber*nBasis); // z.B. 2/9 <= x < 3/9
+ x0 = (sal_uLong) floor(fNumber*nBasis); // z.B. 2/9 <= x < 3/9
if (x0 == 0) // => x0 = 2
{
y0 = 1;
@@ -2262,12 +2262,12 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
y1 = nBasis - 1;
double fUg = (double) x0 / (double) y0;
double fOg = (double) x1 / (double) y1;
- ULONG nGgt = ImpGGT(y0, x0); // x0/y0 kuerzen
+ sal_uLong nGgt = ImpGGT(y0, x0); // x0/y0 kuerzen
x0 /= nGgt;
y0 /= nGgt; // Einschachteln:
- ULONG x2 = 0;
- ULONG y2 = 0;
- BOOL bStop = FALSE;
+ sal_uLong x2 = 0;
+ sal_uLong y2 = 0;
+ sal_Bool bStop = sal_False;
while (!bStop)
{
#ifdef GCC
@@ -2291,20 +2291,20 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
if (fTest <= fOg)
{
fOg = fTest;
- bStop = TRUE;
+ bStop = sal_True;
}
else if (y1 == 1)
- bStop = TRUE;
+ bStop = sal_True;
} // of while
nGgt = ImpGGT(y1, x1); // x1/y1 kuerzen
x2 = x1 / nGgt;
y2 = y1 / nGgt;
if (x2*y0 - x0*y2 == 1 || y1 <= 1) // Test, ob x2/y2
- bStop = TRUE; // naechste Farey-Zahl
+ bStop = sal_True; // naechste Farey-Zahl
else
{
y1--;
- bStop = FALSE;
+ bStop = sal_False;
}
} // of while
x1 = x2;
@@ -2315,8 +2315,8 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
fup = (double)x1/(double)y1;
while (fNumber > fup)
{
- ULONG x2 = ((y0+nBasis)/y1)*x1 - x0; // naechste Farey-Zahl
- ULONG y2 = ((y0+nBasis)/y1)*y1 - y0;
+ sal_uLong x2 = ((y0+nBasis)/y1)*x1 - x0; // naechste Farey-Zahl
+ sal_uLong y2 = ((y0+nBasis)/y1)*y1 - y0;
// GetNextFareyNumber(nBasis, x0, x1, y0, y1, x2, y2);
x0 = x1;
y0 = y1;
@@ -2345,14 +2345,14 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
}
else // grosse Nenner
{ // 0,1234->123/1000
- ULONG nGgt;
+ sal_uLong nGgt;
/*
nDiv = nBasis+1;
- nFrac = ((ULONG)floor(0.5 + fNumber *
+ nFrac = ((sal_uLong)floor(0.5 + fNumber *
pow(10.0,rInfo.nCntExp)));
*/
nDiv = 10000000;
- nFrac = ((ULONG)floor(0.5 + fNumber * 10000000.0));
+ nFrac = ((sal_uLong)floor(0.5 + fNumber * 10000000.0));
nGgt = ImpGGT(nDiv, nFrac);
if (nGgt > 1)
{
@@ -2371,7 +2371,7 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
if (nDiv > nBasis)
{
nDiv = nBasis;
- nFrac = ((ULONG)floor(0.5 + fNumber *
+ nFrac = ((sal_uLong)floor(0.5 + fNumber *
pow(10.0,rInfo.nCntExp)));
nGgt = ImpGGTRound(nDiv, nFrac);
if (nGgt > 1)
@@ -2388,9 +2388,9 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
if (fNum1 > _D_MAX_U_LONG_)
{
OutString = rScan.GetErrorString();
- return FALSE;
+ return sal_False;
}
- nFrac = (ULONG) floor(fNum1);
+ nFrac = (sal_uLong) floor(fNum1);
sStr.Erase();
}
else if (fNum == 0.0 && nFrac != 0)
@@ -2413,10 +2413,10 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
sDiv = ImpIntToString( nIx, nDiv );
}
- USHORT j = nAnz-1; // letztes Symbol->rueckw.
+ sal_uInt16 j = nAnz-1; // letztes Symbol->rueckw.
xub_StrLen k; // Nenner:
bRes |= ImpNumberFill(sDiv, fNumber, k, j, nIx, NF_SYMBOLTYPE_FRAC);
- BOOL bCont = TRUE;
+ sal_Bool bCont = sal_True;
if (rInfo.nTypeArray[j] == NF_SYMBOLTYPE_FRAC)
{
if (rInfo.nCntPre > 0 && nFrac == 0)
@@ -2426,7 +2426,7 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
if ( j )
j--;
else
- bCont = FALSE;
+ bCont = sal_False;
}
// weiter Zaehler:
if ( !bCont )
@@ -2440,7 +2440,7 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
if ( j )
j--;
else
- bCont = FALSE;
+ bCont = sal_False;
}
}
// weiter Hauptzahl
@@ -2461,11 +2461,11 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
break;
case NUMBERFORMAT_SCIENTIFIC:
{
- BOOL bSign = FALSE;
+ sal_Bool bSign = sal_False;
if (fNumber < 0)
{
if (nIx == 0) // nicht in hinteren
- bSign = TRUE; // Formaten
+ bSign = sal_True; // Formaten
fNumber = -fNumber;
}
String sStr( ::rtl::math::doubleToUString( fNumber,
@@ -2505,7 +2505,7 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
ExpStr = String::CreateFromInt32( nExp );
}
}
- USHORT j = nAnz-1; // last symbol
+ sal_uInt16 j = nAnz-1; // last symbol
xub_StrLen k; // position in ExpStr
bRes |= ImpNumberFill(ExpStr, fNumber, k, j, nIx, NF_SYMBOLTYPE_EXP);
@@ -2515,7 +2515,7 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
if (nZeros)
ExpStr.Erase( 0, nZeros);
- BOOL bCont = TRUE;
+ sal_Bool bCont = sal_True;
if (rInfo.nTypeArray[j] == NF_SYMBOLTYPE_EXP)
{
const String& rStr = rInfo.sStrArray[j];
@@ -2527,7 +2527,7 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
if ( j )
j--;
else
- bCont = FALSE;
+ bCont = sal_False;
}
// weiter Hauptzahl:
if ( !bCont )
@@ -2550,20 +2550,20 @@ BOOL SvNumberformat::GetOutputString(double fNumber,
return bRes;
}
-BOOL SvNumberformat::ImpGetTimeOutput(double fNumber,
- USHORT nIx,
+sal_Bool SvNumberformat::ImpGetTimeOutput(double fNumber,
+ sal_uInt16 nIx,
String& OutString)
{
using namespace ::com::sun::star::i18n;
- BOOL bCalendarSet = FALSE;
+ sal_Bool bCalendarSet = sal_False;
double fNumberOrig = fNumber;
- BOOL bRes = FALSE;
- BOOL bSign = FALSE;
+ sal_Bool bRes = sal_False;
+ sal_Bool bSign = sal_False;
if (fNumber < 0.0)
{
fNumber = -fNumber;
if (nIx == 0)
- bSign = TRUE;
+ bSign = sal_True;
}
const ImpSvNumberformatInfo& rInfo = NumFor[nIx].Info();
if (rInfo.bThousand) // []-Format
@@ -2571,22 +2571,22 @@ BOOL SvNumberformat::ImpGetTimeOutput(double fNumber,
if (fNumber > 1.0E10) // zu gross
{
OutString = rScan.GetErrorString();
- return FALSE;
+ return sal_False;
}
}
else
fNumber -= floor(fNumber); // sonst Datum abtrennen
- BOOL bInputLine;
+ sal_Bool bInputLine;
xub_StrLen nCntPost;
if ( rScan.GetStandardPrec() == 300 &&
0 < rInfo.nCntPost && rInfo.nCntPost < 7 )
{ // round at 7 decimals (+5 of 86400 == 12 significant digits)
- bInputLine = TRUE;
+ bInputLine = sal_True;
nCntPost = 7;
}
else
{
- bInputLine = FALSE;
+ bInputLine = sal_False;
nCntPost = xub_StrLen(rInfo.nCntPost);
}
if (bSign && !rInfo.bThousand) // kein []-Format
@@ -2594,14 +2594,14 @@ BOOL SvNumberformat::ImpGetTimeOutput(double fNumber,
double fTime = fNumber * 86400.0;
fTime = ::rtl::math::round( fTime, int(nCntPost) );
if (bSign && fTime == 0.0)
- bSign = FALSE; // nicht -00:00:00
+ bSign = sal_False; // nicht -00:00:00
if( floor( fTime ) > _D_MAX_U_LONG_ )
{
OutString = rScan.GetErrorString();
- return FALSE;
+ return sal_False;
}
- ULONG nSeconds = (ULONG)floor( fTime );
+ sal_uLong nSeconds = (sal_uLong)floor( fTime );
String sSecStr( ::rtl::math::doubleToUString( fTime-nSeconds,
rtl_math_StringFormat_F, int(nCntPost), '.'));
@@ -2620,7 +2620,7 @@ BOOL SvNumberformat::ImpGetTimeOutput(double fNumber,
xub_StrLen nSecPos = 0; // Zum Ziffernweisen
// abarbeiten
- ULONG nHour, nMin, nSec;
+ sal_uLong nHour, nMin, nSec;
if (!rInfo.bThousand) // kein [] Format
{
nHour = (nSeconds/3600) % 24;
@@ -2669,8 +2669,8 @@ BOOL SvNumberformat::ImpGetTimeOutput(double fNumber,
nHour -= 12;
}
}
- const USHORT nAnz = NumFor[nIx].GetnAnz();
- for (USHORT i = 0; i < nAnz; i++)
+ const sal_uInt16 nAnz = NumFor[nIx].GetnAnz();
+ for (sal_uInt16 i = 0; i < nAnz; i++)
{
switch (rInfo.nTypeArray[i])
{
@@ -2679,7 +2679,7 @@ BOOL SvNumberformat::ImpGetTimeOutput(double fNumber,
{
OutString += (sal_Unicode) 0x1B;
OutString += rInfo.sStrArray[i].GetChar(1);
- bRes = TRUE;
+ bRes = sal_True;
}
break;
case NF_SYMBOLTYPE_BLANK:
@@ -2713,7 +2713,7 @@ BOOL SvNumberformat::ImpGetTimeOutput(double fNumber,
double fDiff = DateTime(*(rScan.GetNullDate())) - GetCal().getEpochStart();
fDiff += fNumberOrig;
GetCal().setLocalDateTime( fDiff );
- bCalendarSet = TRUE;
+ bCalendarSet = sal_True;
}
if (cAmPm == 'a')
OutString += GetCal().getDisplayName(
@@ -2759,29 +2759,29 @@ BOOL SvNumberformat::ImpGetTimeOutput(double fNumber,
}
-BOOL SvNumberformat::ImpIsOtherCalendar( const ImpSvNumFor& rNumFor ) const
+sal_Bool SvNumberformat::ImpIsOtherCalendar( const ImpSvNumFor& rNumFor ) const
{
if ( GetCal().getUniqueID() != Gregorian::get() )
- return FALSE;
+ return sal_False;
const ImpSvNumberformatInfo& rInfo = rNumFor.Info();
- const USHORT nAnz = rNumFor.GetnAnz();
- USHORT i;
+ const sal_uInt16 nAnz = rNumFor.GetnAnz();
+ sal_uInt16 i;
for ( i = 0; i < nAnz; i++ )
{
switch ( rInfo.nTypeArray[i] )
{
case NF_SYMBOLTYPE_CALENDAR :
- return FALSE;
+ return sal_False;
case NF_KEY_EC :
case NF_KEY_EEC :
case NF_KEY_R :
case NF_KEY_RR :
case NF_KEY_AAA :
case NF_KEY_AAAA :
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
@@ -2830,7 +2830,7 @@ void SvNumberformat::SwitchToGregorianCalendar( const String& rOrgCalendar,
}
-BOOL SvNumberformat::ImpFallBackToGregorianCalendar( String& rOrgCalendar, double& fOrgDateTime )
+sal_Bool SvNumberformat::ImpFallBackToGregorianCalendar( String& rOrgCalendar, double& fOrgDateTime )
{
using namespace ::com::sun::star::i18n;
CalendarWrapper& rCal = GetCal();
@@ -2850,19 +2850,19 @@ BOOL SvNumberformat::ImpFallBackToGregorianCalendar( String& rOrgCalendar, doubl
rOrgCalendar.Erase();
rCal.loadCalendar( rGregorian, rLoc().getLocale() );
rCal.setDateTime( fOrgDateTime );
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
-BOOL SvNumberformat::ImpSwitchToSpecifiedCalendar( String& rOrgCalendar,
+sal_Bool SvNumberformat::ImpSwitchToSpecifiedCalendar( String& rOrgCalendar,
double& fOrgDateTime, const ImpSvNumFor& rNumFor ) const
{
const ImpSvNumberformatInfo& rInfo = rNumFor.Info();
- const USHORT nAnz = rNumFor.GetnAnz();
- for ( USHORT i = 0; i < nAnz; i++ )
+ const sal_uInt16 nAnz = rNumFor.GetnAnz();
+ for ( sal_uInt16 i = 0; i < nAnz; i++ )
{
if ( rInfo.nTypeArray[i] == NF_SYMBOLTYPE_CALENDAR )
{
@@ -2874,10 +2874,10 @@ BOOL SvNumberformat::ImpSwitchToSpecifiedCalendar( String& rOrgCalendar,
}
rCal.loadCalendar( rInfo.sStrArray[i], rLoc().getLocale() );
rCal.setDateTime( fOrgDateTime );
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
@@ -2906,27 +2906,27 @@ void SvNumberformat::ImpAppendEraG( String& OutString,
}
-BOOL SvNumberformat::ImpGetDateOutput(double fNumber,
- USHORT nIx,
+sal_Bool SvNumberformat::ImpGetDateOutput(double fNumber,
+ sal_uInt16 nIx,
String& OutString)
{
using namespace ::com::sun::star::i18n;
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
CalendarWrapper& rCal = GetCal();
double fDiff = DateTime(*(rScan.GetNullDate())) - rCal.getEpochStart();
fNumber += fDiff;
rCal.setLocalDateTime( fNumber );
String aOrgCalendar; // empty => not changed yet
double fOrgDateTime;
- BOOL bOtherCalendar = ImpIsOtherCalendar( NumFor[nIx] );
+ sal_Bool bOtherCalendar = ImpIsOtherCalendar( NumFor[nIx] );
if ( bOtherCalendar )
SwitchToOtherCalendar( aOrgCalendar, fOrgDateTime );
if ( ImpFallBackToGregorianCalendar( aOrgCalendar, fOrgDateTime ) )
- bOtherCalendar = FALSE;
+ bOtherCalendar = sal_False;
const ImpSvNumberformatInfo& rInfo = NumFor[nIx].Info();
- const USHORT nAnz = NumFor[nIx].GetnAnz();
+ const sal_uInt16 nAnz = NumFor[nIx].GetnAnz();
sal_Int16 nNatNum = NumFor[nIx].GetNatNum().GetNatNum();
- for (USHORT i = 0; i < nAnz; i++)
+ for (sal_uInt16 i = 0; i < nAnz; i++)
{
switch (rInfo.nTypeArray[i])
{
@@ -2945,7 +2945,7 @@ BOOL SvNumberformat::ImpGetDateOutput(double fNumber,
{
OutString += (sal_Unicode) 0x1B;
OutString += rInfo.sStrArray[i].GetChar(1);
- bRes = TRUE;
+ bRes = sal_True;
}
break;
case NF_SYMBOLTYPE_BLANK:
@@ -3089,29 +3089,29 @@ BOOL SvNumberformat::ImpGetDateOutput(double fNumber,
return bRes;
}
-BOOL SvNumberformat::ImpGetDateTimeOutput(double fNumber,
- USHORT nIx,
+sal_Bool SvNumberformat::ImpGetDateTimeOutput(double fNumber,
+ sal_uInt16 nIx,
String& OutString)
{
using namespace ::com::sun::star::i18n;
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
CalendarWrapper& rCal = GetCal();
double fDiff = DateTime(*(rScan.GetNullDate())) - rCal.getEpochStart();
fNumber += fDiff;
const ImpSvNumberformatInfo& rInfo = NumFor[nIx].Info();
- BOOL bInputLine;
+ sal_Bool bInputLine;
xub_StrLen nCntPost;
if ( rScan.GetStandardPrec() == 300 &&
0 < rInfo.nCntPost && rInfo.nCntPost < 7 )
{ // round at 7 decimals (+5 of 86400 == 12 significant digits)
- bInputLine = TRUE;
+ bInputLine = sal_True;
nCntPost = 7;
}
else
{
- bInputLine = FALSE;
+ bInputLine = sal_False;
nCntPost = xub_StrLen(rInfo.nCntPost);
}
double fTime = (fNumber - floor( fNumber )) * 86400.0;
@@ -3126,14 +3126,14 @@ BOOL SvNumberformat::ImpGetDateTimeOutput(double fNumber,
String aOrgCalendar; // empty => not changed yet
double fOrgDateTime;
- BOOL bOtherCalendar = ImpIsOtherCalendar( NumFor[nIx] );
+ sal_Bool bOtherCalendar = ImpIsOtherCalendar( NumFor[nIx] );
if ( bOtherCalendar )
SwitchToOtherCalendar( aOrgCalendar, fOrgDateTime );
if ( ImpFallBackToGregorianCalendar( aOrgCalendar, fOrgDateTime ) )
- bOtherCalendar = FALSE;
+ bOtherCalendar = sal_False;
sal_Int16 nNatNum = NumFor[nIx].GetNatNum().GetNatNum();
- ULONG nSeconds = (ULONG)floor( fTime );
+ sal_uLong nSeconds = (sal_uLong)floor( fTime );
String sSecStr( ::rtl::math::doubleToUString( fTime-nSeconds,
rtl_math_StringFormat_F, int(nCntPost), '.'));
sSecStr.EraseLeadingChars('0');
@@ -3151,7 +3151,7 @@ BOOL SvNumberformat::ImpGetDateTimeOutput(double fNumber,
xub_StrLen nSecPos = 0; // Zum Ziffernweisen
// abarbeiten
- ULONG nHour, nMin, nSec;
+ sal_uLong nHour, nMin, nSec;
if (!rInfo.bThousand) // [] Format
{
nHour = (nSeconds/3600) % 24;
@@ -3198,8 +3198,8 @@ BOOL SvNumberformat::ImpGetDateTimeOutput(double fNumber,
nHour -= 12;
}
}
- const USHORT nAnz = NumFor[nIx].GetnAnz();
- for (USHORT i = 0; i < nAnz; i++)
+ const sal_uInt16 nAnz = NumFor[nIx].GetnAnz();
+ for (sal_uInt16 i = 0; i < nAnz; i++)
{
switch (rInfo.nTypeArray[i])
{
@@ -3218,7 +3218,7 @@ BOOL SvNumberformat::ImpGetDateTimeOutput(double fNumber,
{
OutString += (sal_Unicode) 0x1B;
OutString += rInfo.sStrArray[i].GetChar(1);
- bRes = TRUE;
+ bRes = sal_True;
}
break;
case NF_SYMBOLTYPE_BLANK:
@@ -3411,23 +3411,23 @@ BOOL SvNumberformat::ImpGetDateTimeOutput(double fNumber,
return bRes;
}
-BOOL SvNumberformat::ImpGetNumberOutput(double fNumber,
- USHORT nIx,
+sal_Bool SvNumberformat::ImpGetNumberOutput(double fNumber,
+ sal_uInt16 nIx,
String& OutString)
{
- BOOL bRes = FALSE;
- BOOL bSign;
+ sal_Bool bRes = sal_False;
+ sal_Bool bSign;
if (fNumber < 0.0)
{
if (nIx == 0) // nicht in hinteren
- bSign = TRUE; // Formaten
+ bSign = sal_True; // Formaten
else
- bSign = FALSE;
+ bSign = sal_False;
fNumber = -fNumber;
}
else
{
- bSign = FALSE;
+ bSign = sal_False;
if ( ::rtl::math::isSignBitSet( fNumber ) )
fNumber = -fNumber; // yes, -0.0 is possible, eliminate '-'
}
@@ -3439,17 +3439,17 @@ BOOL SvNumberformat::ImpGetNumberOutput(double fNumber,
else
{
OutString = rScan.GetErrorString();
- return FALSE;
+ return sal_False;
}
}
- USHORT i, j;
+ sal_uInt16 i, j;
xub_StrLen k;
String sStr;
long nPrecExp;
- BOOL bInteger = FALSE;
+ sal_Bool bInteger = sal_False;
if ( rInfo.nThousand != FLAG_STANDARD_IN_FORMAT )
{ // special formatting only if no GENERAL keyword in format code
- const USHORT nThousand = rInfo.nThousand;
+ const sal_uInt16 nThousand = rInfo.nThousand;
for (i = 0; i < nThousand; i++)
{
if (fNumber > _D_MIN_M_BY_1000)
@@ -3493,12 +3493,12 @@ BOOL SvNumberformat::ImpGetNumberOutput(double fNumber,
while ( *++p == '0' )
;
if ( !*p )
- bInteger = TRUE;
+ bInteger = sal_True;
sStr.Erase( nPoint, 1 ); // . herausnehmen
}
if (bSign &&
(sStr.Len() == 0 || sStr.GetTokenCount('0') == sStr.Len()+1)) // nur 00000
- bSign = FALSE; // nicht -0.00
+ bSign = sal_False; // nicht -0.00
} // End of != FLAG_STANDARD_IN_FORMAT
// von hinten nach vorn
@@ -3508,8 +3508,8 @@ BOOL SvNumberformat::ImpGetNumberOutput(double fNumber,
// Nachkommastellen:
if (rInfo.nCntPost > 0)
{
- BOOL bTrailing = TRUE; // ob Endnullen?
- BOOL bFilled = FALSE; // ob aufgefuellt wurde ?
+ sal_Bool bTrailing = sal_True; // ob Endnullen?
+ sal_Bool bFilled = sal_False; // ob aufgefuellt wurde ?
short nType;
while (j > 0 && // rueckwaerts
(nType = rInfo.nTypeArray[j]) != NF_SYMBOLTYPE_DECSEP)
@@ -3521,7 +3521,7 @@ BOOL SvNumberformat::ImpGetNumberOutput(double fNumber,
{
sStr.Insert( (sal_Unicode) 0x1B, k /*++*/ );
sStr.Insert(rInfo.sStrArray[j].GetChar(1),k);
- bRes = TRUE;
+ bRes = sal_True;
}
break;
case NF_SYMBOLTYPE_BLANK:
@@ -3546,21 +3546,21 @@ BOOL SvNumberformat::ImpGetNumberOutput(double fNumber,
const sal_Unicode c = *p;
k--;
if ( sStr.GetChar(k) != '0' )
- bTrailing = FALSE;
+ bTrailing = sal_False;
if (bTrailing)
{
if ( c == '0' )
- bFilled = TRUE;
+ bFilled = sal_True;
else if ( c == '-' )
{
if ( bInteger )
sStr.SetChar( k, '-' );
- bFilled = TRUE;
+ bFilled = sal_True;
}
else if ( c == '?' )
{
sStr.SetChar( k, ' ' );
- bFilled = TRUE;
+ bFilled = sal_True;
}
else if ( !bFilled ) // #
sStr.Erase(k,1);
@@ -3602,27 +3602,27 @@ BOOL SvNumberformat::ImpGetNumberOutput(double fNumber,
return bRes;
}
-BOOL SvNumberformat::ImpNumberFillWithThousands(
+sal_Bool SvNumberformat::ImpNumberFillWithThousands(
String& sStr, // number string
double& rNumber, // number
xub_StrLen k, // position within string
- USHORT j, // symbol index within format code
- USHORT nIx, // subformat index
- USHORT nDigCnt) // count of integer digits in format
+ sal_uInt16 j, // symbol index within format code
+ sal_uInt16 nIx, // subformat index
+ sal_uInt16 nDigCnt) // count of integer digits in format
{
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
xub_StrLen nLeadingStringChars = 0; // inserted StringChars before number
xub_StrLen nDigitCount = 0; // count of integer digits from the right
- BOOL bStop = FALSE;
+ sal_Bool bStop = sal_False;
const ImpSvNumberformatInfo& rInfo = NumFor[nIx].Info();
// no normal thousands separators if number divided by thousands
- BOOL bDoThousands = (rInfo.nThousand == 0);
+ sal_Bool bDoThousands = (rInfo.nThousand == 0);
utl::DigitGroupingIterator aGrouping(
GetFormatter().GetLocaleData()->getDigitGrouping());
while (!bStop) // backwards
{
if (j == 0)
- bStop = TRUE;
+ bStop = sal_True;
switch (rInfo.nTypeArray[j])
{
case NF_SYMBOLTYPE_DECSEP:
@@ -3641,7 +3641,7 @@ BOOL SvNumberformat::ImpNumberFillWithThousands(
{
sStr.Insert( (sal_Unicode) 0x1B, k/*++*/ );
sStr.Insert(rInfo.sStrArray[j].GetChar(1),k);
- bRes = TRUE;
+ bRes = sal_True;
}
break;
case NF_SYMBOLTYPE_BLANK:
@@ -3761,7 +3761,7 @@ void SvNumberformat::ImpDigitFill(
String& sStr, // number string
xub_StrLen nStart, // start of digits
xub_StrLen& k, // position within string
- USHORT nIx, // subformat index
+ sal_uInt16 nIx, // subformat index
xub_StrLen & nDigitCount, // count of integer digits from the right so far
utl::DigitGroupingIterator & rGrouping ) // current grouping
{
@@ -3783,18 +3783,18 @@ void SvNumberformat::ImpDigitFill(
k = nStart;
}
-BOOL SvNumberformat::ImpNumberFill( String& sStr, // number string
+sal_Bool SvNumberformat::ImpNumberFill( String& sStr, // number string
double& rNumber, // number for "General" format
xub_StrLen& k, // position within string
- USHORT& j, // symbol index within format code
- USHORT nIx, // subformat index
+ sal_uInt16& j, // symbol index within format code
+ sal_uInt16 nIx, // subformat index
short eSymbolType ) // type of stop condition
{
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
k = sStr.Len(); // behind last digit
const ImpSvNumberformatInfo& rInfo = NumFor[nIx].Info();
// no normal thousands separators if number divided by thousands
- BOOL bDoThousands = (rInfo.nThousand == 0);
+ sal_Bool bDoThousands = (rInfo.nThousand == 0);
short nType;
while (j > 0 && (nType = rInfo.nTypeArray[j]) != eSymbolType )
{ // rueckwaerts:
@@ -3805,7 +3805,7 @@ BOOL SvNumberformat::ImpNumberFill( String& sStr, // number string
{
sStr.Insert( sal_Unicode(0x1B), k++ );
sStr.Insert(rInfo.sStrArray[j].GetChar(1),k);
- bRes = TRUE;
+ bRes = sal_True;
}
break;
case NF_SYMBOLTYPE_BLANK:
@@ -3873,10 +3873,10 @@ BOOL SvNumberformat::ImpNumberFill( String& sStr, // number string
return bRes;
}
-void SvNumberformat::GetFormatSpecialInfo(BOOL& bThousand,
- BOOL& IsRed,
- USHORT& nPrecision,
- USHORT& nAnzLeading) const
+void SvNumberformat::GetFormatSpecialInfo(sal_Bool& bThousand,
+ sal_Bool& IsRed,
+ sal_uInt16& nPrecision,
+ sal_uInt16& nAnzLeading) const
{
// as before: take info from nNumFor=0 for whole format (for dialog etc.)
@@ -3888,13 +3888,13 @@ void SvNumberformat::GetFormatSpecialInfo(BOOL& bThousand,
const Color* pColor = NumFor[1].GetColor();
if (fLimit1 == 0.0 && fLimit2 == 0.0 && pColor
&& (*pColor == rScan.GetRedColor()))
- IsRed = TRUE;
+ IsRed = sal_True;
else
- IsRed = FALSE;
+ IsRed = sal_False;
}
-void SvNumberformat::GetNumForInfo( USHORT nNumFor, short& rScannedType,
- BOOL& bThousand, USHORT& nPrecision, USHORT& nAnzLeading ) const
+void SvNumberformat::GetNumForInfo( sal_uInt16 nNumFor, short& rScannedType,
+ sal_Bool& bThousand, sal_uInt16& nPrecision, sal_uInt16& nAnzLeading ) const
{
// take info from a specified sub-format (for XML export)
@@ -3911,9 +3911,9 @@ void SvNumberformat::GetNumForInfo( USHORT nNumFor, short& rScannedType,
else
{
nAnzLeading = 0;
- BOOL bStop = FALSE;
- USHORT i = 0;
- const USHORT nAnz = NumFor[nNumFor].GetnAnz();
+ sal_Bool bStop = sal_False;
+ sal_uInt16 i = 0;
+ const sal_uInt16 nAnz = NumFor[nNumFor].GetnAnz();
while (!bStop && i < nAnz)
{
short nType = rInfo.nTypeArray[i];
@@ -3926,18 +3926,18 @@ void SvNumberformat::GetNumForInfo( USHORT nNumFor, short& rScannedType,
nAnzLeading++;
}
else if (nType == NF_SYMBOLTYPE_DECSEP || nType == NF_SYMBOLTYPE_EXP)
- bStop = TRUE;
+ bStop = sal_True;
i++;
}
}
}
-const String* SvNumberformat::GetNumForString( USHORT nNumFor, USHORT nPos,
- BOOL bString /* = FALSE */ ) const
+const String* SvNumberformat::GetNumForString( sal_uInt16 nNumFor, sal_uInt16 nPos,
+ sal_Bool bString /* = sal_False */ ) const
{
if ( nNumFor > 3 )
return NULL;
- USHORT nAnz = NumFor[nNumFor].GetnAnz();
+ sal_uInt16 nAnz = NumFor[nNumFor].GetnAnz();
if ( !nAnz )
return NULL;
if ( nPos == 0xFFFF )
@@ -3975,12 +3975,12 @@ const String* SvNumberformat::GetNumForString( USHORT nNumFor, USHORT nPos,
}
-short SvNumberformat::GetNumForType( USHORT nNumFor, USHORT nPos,
- BOOL bString /* = FALSE */ ) const
+short SvNumberformat::GetNumForType( sal_uInt16 nNumFor, sal_uInt16 nPos,
+ sal_Bool bString /* = sal_False */ ) const
{
if ( nNumFor > 3 )
return 0;
- USHORT nAnz = NumFor[nNumFor].GetnAnz();
+ sal_uInt16 nAnz = NumFor[nNumFor].GetnAnz();
if ( !nAnz )
return 0;
if ( nPos == 0xFFFF )
@@ -4017,15 +4017,15 @@ short SvNumberformat::GetNumForType( USHORT nNumFor, USHORT nPos,
}
-BOOL SvNumberformat::IsNegativeWithoutSign() const
+sal_Bool SvNumberformat::IsNegativeWithoutSign() const
{
if ( IsNegativeRealNegative() )
{
- const String* pStr = GetNumForString( 1, 0, TRUE );
+ const String* pStr = GetNumForString( 1, 0, sal_True );
if ( pStr )
return !HasStringNegativeSign( *pStr );
}
- return FALSE;
+ return sal_False;
}
@@ -4034,8 +4034,8 @@ DateFormat SvNumberformat::GetDateOrder() const
if ( (eType & NUMBERFORMAT_DATE) == NUMBERFORMAT_DATE )
{
short const * const pType = NumFor[0].Info().nTypeArray;
- USHORT nAnz = NumFor[0].GetnAnz();
- for ( USHORT j=0; j<nAnz; j++ )
+ sal_uInt16 nAnz = NumFor[0].GetnAnz();
+ for ( sal_uInt16 j=0; j<nAnz; j++ )
{
switch ( pType[j] )
{
@@ -4075,9 +4075,9 @@ sal_uInt32 SvNumberformat::GetExactDateOrder() const
return nRet;
}
short const * const pType = NumFor[0].Info().nTypeArray;
- USHORT nAnz = NumFor[0].GetnAnz();
+ sal_uInt16 nAnz = NumFor[0].GetnAnz();
int nShift = 0;
- for ( USHORT j=0; j<nAnz && nShift < 3; j++ )
+ for ( sal_uInt16 j=0; j<nAnz && nShift < 3; j++ )
{
switch ( pType[j] )
{
@@ -4119,7 +4119,7 @@ void SvNumberformat::GetConditions( SvNumberformatLimitOps& rOper1, double& rVal
}
-Color* SvNumberformat::GetColor( USHORT nNumFor ) const
+Color* SvNumberformat::GetColor( sal_uInt16 nNumFor ) const
{
if ( nNumFor > 3 )
return NULL;
@@ -4167,10 +4167,10 @@ void lcl_SvNumberformat_AddLimitStringImpl( String& rStr,
String SvNumberformat::GetMappedFormatstring(
const NfKeywordTable& rKeywords, const LocaleDataWrapper& rLocWrp,
- BOOL bDontQuote ) const
+ sal_Bool bDontQuote ) const
{
String aStr;
- BOOL bDefault[4];
+ sal_Bool bDefault[4];
// 1 subformat matches all if no condition specified,
bDefault[0] = ( NumFor[1].GetnAnz() == 0 && eOp1 == NUMBERFORMAT_OP_NO );
// with 2 subformats [>=0];[<0] is implied if no condition specified
@@ -4182,26 +4182,26 @@ String SvNumberformat::GetMappedFormatstring(
bDefault[2] = ( !bDefault[0] && !bDefault[1] &&
eOp1 == NUMBERFORMAT_OP_GT && fLimit1 == 0.0 &&
eOp2 == NUMBERFORMAT_OP_LT && fLimit2 == 0.0 );
- BOOL bDefaults = bDefault[0] || bDefault[1] || bDefault[2];
+ sal_Bool bDefaults = bDefault[0] || bDefault[1] || bDefault[2];
// from now on bDefault[] values are used to append empty subformats at the end
- bDefault[3] = FALSE;
+ bDefault[3] = sal_False;
if ( !bDefaults )
{ // conditions specified
if ( eOp1 != NUMBERFORMAT_OP_NO && eOp2 == NUMBERFORMAT_OP_NO )
- bDefault[0] = bDefault[1] = TRUE; // [];x
+ bDefault[0] = bDefault[1] = sal_True; // [];x
else if ( eOp1 != NUMBERFORMAT_OP_NO && eOp2 != NUMBERFORMAT_OP_NO &&
NumFor[2].GetnAnz() == 0 )
- bDefault[0] = bDefault[1] = bDefault[2] = bDefault[3] = TRUE; // [];[];;
+ bDefault[0] = bDefault[1] = bDefault[2] = bDefault[3] = sal_True; // [];[];;
// nothing to do if conditions specified for every subformat
}
else if ( bDefault[0] )
- bDefault[0] = FALSE; // a single unconditional subformat is never delimited
+ bDefault[0] = sal_False; // a single unconditional subformat is never delimited
else
{
if ( bDefault[2] && NumFor[2].GetnAnz() == 0 && NumFor[1].GetnAnz() > 0 )
- bDefault[3] = TRUE; // special cases x;x;; and ;x;;
+ bDefault[3] = sal_True; // special cases x;x;; and ;x;;
for ( int i=0; i<3 && !bDefault[i]; ++i )
- bDefault[i] = TRUE;
+ bDefault[i] = sal_True;
}
int nSem = 0; // needed ';' delimiters
int nSub = 0; // subformats delimited so far
@@ -4253,13 +4253,13 @@ String SvNumberformat::GetMappedFormatstring(
aPrefix += 't'; // must be lowercase, otherwise taken as literal
}
- USHORT nAnz = NumFor[n].GetnAnz();
+ sal_uInt16 nAnz = NumFor[n].GetnAnz();
if ( nSem && (nAnz || aPrefix.Len()) )
{
for ( ; nSem; --nSem )
aStr += ';';
for ( ; nSub <= n; ++nSub )
- bDefault[nSub] = FALSE;
+ bDefault[nSub] = sal_False;
}
if ( aPrefix.Len() )
@@ -4269,7 +4269,7 @@ String SvNumberformat::GetMappedFormatstring(
{
const short* pType = NumFor[n].Info().nTypeArray;
const String* pStr = NumFor[n].Info().sStrArray;
- for ( USHORT j=0; j<nAnz; j++ )
+ for ( sal_uInt16 j=0; j<nAnz; j++ )
{
if ( 0 <= pType[j] && pType[j] < NF_KEYWORD_ENTRIES_COUNT )
{
@@ -4328,7 +4328,7 @@ String SvNumberformat::GetMappedFormatstring(
String SvNumberformat::ImpGetNatNumString( const SvNumberNatNum& rNum,
- sal_Int32 nVal, USHORT nMinDigits ) const
+ sal_Int32 nVal, sal_uInt16 nMinDigits ) const
{
String aStr;
if ( nMinDigits )
@@ -4375,7 +4375,7 @@ void SvNumberformat::ImpTransliterateImpl( String& rStr,
void SvNumberformat::GetNatNumXml(
com::sun::star::i18n::NativeNumberXmlAttributes& rAttr,
- USHORT nNumFor ) const
+ sal_uInt16 nNumFor ) const
{
if ( nNumFor <= 3 )
{
@@ -4395,27 +4395,27 @@ void SvNumberformat::GetNatNumXml(
}
// static
-BOOL SvNumberformat::HasStringNegativeSign( const String& rStr )
+sal_Bool SvNumberformat::HasStringNegativeSign( const String& rStr )
{
// fuer Sign muss '-' am Anfang oder am Ende des TeilStrings sein (Blanks ignored)
xub_StrLen nLen = rStr.Len();
if ( !nLen )
- return FALSE;
+ return sal_False;
const sal_Unicode* const pBeg = rStr.GetBuffer();
const sal_Unicode* const pEnd = pBeg + nLen;
register const sal_Unicode* p = pBeg;
do
{ // Anfang
if ( *p == '-' )
- return TRUE;
+ return sal_True;
} while ( *p == ' ' && ++p < pEnd );
p = pEnd - 1;
do
{ // Ende
if ( *p == '-' )
- return TRUE;
+ return sal_True;
} while ( *p == ' ' && pBeg < --p );
- return FALSE;
+ return sal_False;
}
@@ -4476,9 +4476,9 @@ void SvNumberformat::EraseCommentBraces( String& rStr )
void SvNumberformat::EraseComment( String& rStr )
{
register const sal_Unicode* p = rStr.GetBuffer();
- BOOL bInString = FALSE;
- BOOL bEscaped = FALSE;
- BOOL bFound = FALSE;
+ sal_Bool bInString = sal_False;
+ sal_Bool bEscaped = sal_False;
+ sal_Bool bFound = sal_False;
xub_StrLen nPos = 0;
while ( !bFound && *p )
{
@@ -4494,14 +4494,14 @@ void SvNumberformat::EraseComment( String& rStr )
case '{' :
if ( !bEscaped && !bInString )
{
- bFound = TRUE;
+ bFound = sal_True;
nPos = sal::static_int_cast< xub_StrLen >(
p - rStr.GetBuffer());
}
break;
}
if ( bEscaped && *p != '\\' )
- bEscaped = FALSE;
+ bEscaped = sal_False;
++p;
}
if ( bFound )
@@ -4510,31 +4510,31 @@ void SvNumberformat::EraseComment( String& rStr )
// static
-BOOL SvNumberformat::IsInQuote( const String& rStr, xub_StrLen nPos,
+sal_Bool SvNumberformat::IsInQuote( const String& rStr, xub_StrLen nPos,
sal_Unicode cQuote, sal_Unicode cEscIn, sal_Unicode cEscOut )
{
xub_StrLen nLen = rStr.Len();
if ( nPos >= nLen )
- return FALSE;
+ return sal_False;
register const sal_Unicode* p0 = rStr.GetBuffer();
register const sal_Unicode* p = p0;
register const sal_Unicode* p1 = p0 + nPos;
- BOOL bQuoted = FALSE;
+ sal_Bool bQuoted = sal_False;
while ( p <= p1 )
{
if ( *p == cQuote )
{
if ( p == p0 )
- bQuoted = TRUE;
+ bQuoted = sal_True;
else if ( bQuoted )
{
if ( *(p-1) != cEscIn )
- bQuoted = FALSE;
+ bQuoted = sal_False;
}
else
{
if ( *(p-1) != cEscOut )
- bQuoted = TRUE;
+ bQuoted = sal_True;
}
}
p++;
@@ -4569,12 +4569,12 @@ xub_StrLen SvNumberformat::GetQuoteEnd( const String& rStr, xub_StrLen nPos,
}
-USHORT SvNumberformat::ImpGetNumForStringElementCount( USHORT nNumFor ) const
+sal_uInt16 SvNumberformat::ImpGetNumForStringElementCount( sal_uInt16 nNumFor ) const
{
- USHORT nCnt = 0;
- USHORT nAnz = NumFor[nNumFor].GetnAnz();
+ sal_uInt16 nCnt = 0;
+ sal_uInt16 nAnz = NumFor[nNumFor].GetnAnz();
short const * const pType = NumFor[nNumFor].Info().nTypeArray;
- for ( USHORT j=0; j<nAnz; ++j )
+ for ( sal_uInt16 j=0; j<nAnz; ++j )
{
switch ( pType[j] )
{
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index ab68d8309159..000649a6de80 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -81,7 +81,7 @@ namespace
ImpSvNumberformatScan::ImpSvNumberformatScan( SvNumberFormatter* pFormatterP )
{
pFormatter = pFormatterP;
- bConvertMode = FALSE;
+ bConvertMode = sal_False;
//! All keywords MUST be UPPERCASE!
sKeyword[NF_KEY_E].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "E" ) ); // Exponent
sKeyword[NF_KEY_AMPM].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "AM/PM" ) ); // AM/PM
@@ -97,8 +97,8 @@ ImpSvNumberformatScan::ImpSvNumberformatScan( SvNumberFormatter* pFormatterP )
sKeyword[NF_KEY_NNNN].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "NNNN" ) ); // Day of week long incl. separator
sKeyword[NF_KEY_WW].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "WW" ) ); // Week of year
sKeyword[NF_KEY_CCC].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "CCC" ) ); // Currency abbreviation
- bKeywordsNeedInit = TRUE; // locale dependent keywords
- bCompatCurNeedInit = TRUE; // locale dependent compatibility currency strings
+ bKeywordsNeedInit = sal_True; // locale dependent keywords
+ bCompatCurNeedInit = sal_True; // locale dependent compatibility currency strings
StandardColor[0] = Color(COL_BLACK);
StandardColor[1] = Color(COL_LIGHTBLUE);
@@ -127,8 +127,8 @@ ImpSvNumberformatScan::~ImpSvNumberformatScan()
void ImpSvNumberformatScan::ChangeIntl()
{
- bKeywordsNeedInit = TRUE;
- bCompatCurNeedInit = TRUE;
+ bKeywordsNeedInit = sal_True;
+ bCompatCurNeedInit = sal_True;
// may be initialized by InitSpecialKeyword()
sKeyword[NF_KEY_TRUE].Erase();
sKeyword[NF_KEY_FALSE].Erase();
@@ -146,7 +146,7 @@ void ImpSvNumberformatScan::InitSpecialKeyword( NfKeywordIndex eIdx ) const
if ( !sKeyword[NF_KEY_TRUE].Len() )
{
DBG_ERRORFILE( "InitSpecialKeyword: TRUE_WORD?" );
- ((ImpSvNumberformatScan*)this)->sKeyword[NF_KEY_TRUE].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "TRUE" ) );
+ ((ImpSvNumberformatScan*)this)->sKeyword[NF_KEY_TRUE].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "sal_True" ) );
}
break;
case NF_KEY_FALSE :
@@ -156,7 +156,7 @@ void ImpSvNumberformatScan::InitSpecialKeyword( NfKeywordIndex eIdx ) const
if ( !sKeyword[NF_KEY_FALSE].Len() )
{
DBG_ERRORFILE( "InitSpecialKeyword: FALSE_WORD?" );
- ((ImpSvNumberformatScan*)this)->sKeyword[NF_KEY_FALSE].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "FALSE" ) );
+ ((ImpSvNumberformatScan*)this)->sKeyword[NF_KEY_FALSE].AssignAscii( RTL_CONSTASCII_STRINGPARAM( "sal_False" ) );
}
break;
default:
@@ -172,7 +172,7 @@ void ImpSvNumberformatScan::InitCompatCur() const
pFormatter->GetCompatibilityCurrency( pThis->sCurSymbol, pThis->sCurAbbrev );
// currency symbol upper case
pThis->sCurString = pFormatter->GetCharClass()->upper( sCurSymbol );
- bCompatCurNeedInit = FALSE;
+ bCompatCurNeedInit = sal_False;
}
@@ -181,7 +181,7 @@ void ImpSvNumberformatScan::InitKeywords() const
if ( !bKeywordsNeedInit )
return ;
((ImpSvNumberformatScan*)this)->SetDependentKeywords();
- bKeywordsNeedInit = FALSE;
+ bKeywordsNeedInit = sal_False;
}
@@ -457,7 +457,7 @@ void ImpSvNumberformatScan::SetDependentKeywords()
}
-void ImpSvNumberformatScan::ChangeNullDate(USHORT nDay, USHORT nMonth, USHORT nYear)
+void ImpSvNumberformatScan::ChangeNullDate(sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear)
{
if ( pNullDate )
*pNullDate = Date(nDay, nMonth, nYear);
@@ -515,7 +515,7 @@ Color* ImpSvNumberformatScan::GetColor(String& sStr)
{
long nIndex = sString.ToInt32();
if (nIndex > 0 && nIndex <= 64)
- pResult = pFormatter->GetUserDefColor((USHORT)nIndex-1);
+ pResult = pFormatter->GetUserDefColor((sal_uInt16)nIndex-1);
}
}
}
@@ -546,7 +546,7 @@ short ImpSvNumberformatScan::GetKeyWord( const String& sSymbol, xub_StrLen nPos
return NF_KEY_GENERAL;
//! MUST be a reverse search to find longer strings first
short i = NF_KEYWORD_ENTRIES_COUNT-1;
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
for ( ; i > NF_KEY_LASTKEYWORD_SO5; --i )
{
bFound = sString.Search(pKeyword[i]) == 0;
@@ -750,7 +750,7 @@ short ImpSvNumberformatScan::Next_Symbol( const String& rStr,
short nTmpType = GetKeyWord( rStr, nPos-1 );
if ( nTmpType )
{
- BOOL bCurrency = FALSE;
+ sal_Bool bCurrency = sal_False;
// "Automatic" currency may start with keyword,
// like "R" (Rand) and 'R' (era)
if ( nCurrPos != STRING_NOTFOUND &&
@@ -760,7 +760,7 @@ short ImpSvNumberformatScan::Next_Symbol( const String& rStr,
String aTest( rStr.Copy( nPos-1, sCurString.Len() ) );
pChrCls->toUpper( aTest );
if ( aTest == sCurString )
- bCurrency = TRUE;
+ bCurrency = sal_True;
}
if ( bCurrency )
{
@@ -840,7 +840,7 @@ short ImpSvNumberformatScan::Next_Symbol( const String& rStr,
}
else
{
- BOOL bDontStop = FALSE;
+ sal_Bool bDontStop = sal_False;
switch (cToken)
{
case '/': // AM/PM, A/P
@@ -856,7 +856,7 @@ short ImpSvNumberformatScan::Next_Symbol( const String& rStr,
&& (rStr.GetChar(nPos+1) == 'M' || rStr.GetChar(nPos+1) == 'm'))) )
{
sSymbol += cToken;
- bDontStop = TRUE;
+ bDontStop = sal_True;
}
}
}
@@ -925,7 +925,7 @@ xub_StrLen ImpSvNumberformatScan::Symbol_Division(const String& rString)
}
}
nAnzStrings = 0;
- BOOL bStar = FALSE; // wird bei '*'Detektion gesetzt
+ sal_Bool bStar = sal_False; // wird bei '*'Detektion gesetzt
Reset();
xub_StrLen nPos = 0;
@@ -938,7 +938,7 @@ xub_StrLen ImpSvNumberformatScan::Symbol_Division(const String& rString)
if (bStar)
return nPos; // Fehler: doppelter '*'
else
- bStar = TRUE;
+ bStar = sal_True;
}
nAnzStrings++;
}
@@ -946,7 +946,7 @@ xub_StrLen ImpSvNumberformatScan::Symbol_Division(const String& rString)
return 0; // 0 => ok
}
-void ImpSvNumberformatScan::SkipStrings(USHORT& i, xub_StrLen& nPos)
+void ImpSvNumberformatScan::SkipStrings(sal_uInt16& i, xub_StrLen& nPos)
{
while (i < nAnzStrings && ( nTypeArray[i] == NF_SYMBOLTYPE_STRING
|| nTypeArray[i] == NF_SYMBOLTYPE_BLANK
@@ -958,7 +958,7 @@ void ImpSvNumberformatScan::SkipStrings(USHORT& i, xub_StrLen& nPos)
}
-USHORT ImpSvNumberformatScan::PreviousKeyword(USHORT i)
+sal_uInt16 ImpSvNumberformatScan::PreviousKeyword(sal_uInt16 i)
{
short res = 0;
if (i > 0 && i < nAnzStrings)
@@ -972,7 +972,7 @@ USHORT ImpSvNumberformatScan::PreviousKeyword(USHORT i)
return res;
}
-USHORT ImpSvNumberformatScan::NextKeyword(USHORT i)
+sal_uInt16 ImpSvNumberformatScan::NextKeyword(sal_uInt16 i)
{
short res = 0;
if (i < nAnzStrings-1)
@@ -986,7 +986,7 @@ USHORT ImpSvNumberformatScan::NextKeyword(USHORT i)
return res;
}
-short ImpSvNumberformatScan::PreviousType( USHORT i )
+short ImpSvNumberformatScan::PreviousType( sal_uInt16 i )
{
if ( i > 0 && i < nAnzStrings )
{
@@ -999,7 +999,7 @@ short ImpSvNumberformatScan::PreviousType( USHORT i )
return 0;
}
-sal_Unicode ImpSvNumberformatScan::PreviousChar(USHORT i)
+sal_Unicode ImpSvNumberformatScan::PreviousChar(sal_uInt16 i)
{
sal_Unicode res = ' ';
if (i > 0 && i < nAnzStrings)
@@ -1016,7 +1016,7 @@ sal_Unicode ImpSvNumberformatScan::PreviousChar(USHORT i)
return res;
}
-sal_Unicode ImpSvNumberformatScan::NextChar(USHORT i)
+sal_Unicode ImpSvNumberformatScan::NextChar(sal_uInt16 i)
{
sal_Unicode res = ' ';
if (i < nAnzStrings-1)
@@ -1034,28 +1034,28 @@ sal_Unicode ImpSvNumberformatScan::NextChar(USHORT i)
return res;
}
-BOOL ImpSvNumberformatScan::IsLastBlankBeforeFrac(USHORT i)
+sal_Bool ImpSvNumberformatScan::IsLastBlankBeforeFrac(sal_uInt16 i)
{
- BOOL res = TRUE;
+ sal_Bool res = sal_True;
if (i < nAnzStrings-1)
{
- BOOL bStop = FALSE;
+ sal_Bool bStop = sal_False;
i++;
while (i < nAnzStrings-1 && !bStop)
{
i++;
if ( nTypeArray[i] == NF_SYMBOLTYPE_DEL &&
sStrArray[i].GetChar(0) == '/')
- bStop = TRUE;
+ bStop = sal_True;
else if ( nTypeArray[i] == NF_SYMBOLTYPE_DEL &&
sStrArray[i].GetChar(0) == ' ')
- res = FALSE;
+ res = sal_False;
}
if (!bStop) // kein '/'
- res = FALSE;
+ res = sal_False;
}
else
- res = FALSE; // kein '/' mehr
+ res = sal_False; // kein '/' mehr
return res;
}
@@ -1074,25 +1074,25 @@ void ImpSvNumberformatScan::Reset()
#endif
eScannedType = NUMBERFORMAT_UNDEFINED;
nRepPos = 0;
- bExp = FALSE;
- bThousand = FALSE;
+ bExp = sal_False;
+ bThousand = sal_False;
nThousand = 0;
- bDecSep = FALSE;
+ bDecSep = sal_False;
nDecPos = -1;
- nExpPos = (USHORT) -1;
- nBlankPos = (USHORT) -1;
+ nExpPos = (sal_uInt16) -1;
+ nBlankPos = (sal_uInt16) -1;
nCntPre = 0;
nCntPost = 0;
nCntExp = 0;
- bFrac = FALSE;
- bBlank = FALSE;
+ bFrac = sal_False;
+ bBlank = sal_False;
nNatNumModifier = 0;
}
-BOOL ImpSvNumberformatScan::Is100SecZero( USHORT i, BOOL bHadDecSep )
+sal_Bool ImpSvNumberformatScan::Is100SecZero( sal_uInt16 i, sal_Bool bHadDecSep )
{
- USHORT nIndexPre = PreviousKeyword( i );
+ sal_uInt16 nIndexPre = PreviousKeyword( i );
return (nIndexPre == NF_KEY_S || nIndexPre == NF_KEY_SS)
&& (bHadDecSep // S, SS ','
|| (i>0 && nTypeArray[i-1] == NF_SYMBOLTYPE_STRING));
@@ -1105,9 +1105,9 @@ xub_StrLen ImpSvNumberformatScan::ScanType(const String&)
const LocaleDataWrapper* pLoc = pFormatter->GetLocaleData();
xub_StrLen nPos = 0;
- USHORT i = 0;
+ sal_uInt16 i = 0;
short eNewType;
- BOOL bMatchBracket = FALSE;
+ sal_Bool bMatchBracket = sal_False;
bool bHaveGeneral = false; // if General/Standard encountered
SkipStrings(i, nPos);
@@ -1131,8 +1131,8 @@ xub_StrLen ImpSvNumberformatScan::ScanType(const String&)
case NF_KEY_M: // M
case NF_KEY_MM: // MM
{ // minute or month
- USHORT nIndexPre = PreviousKeyword(i);
- USHORT nIndexNex = NextKeyword(i);
+ sal_uInt16 nIndexPre = PreviousKeyword(i);
+ sal_uInt16 nIndexNex = NextKeyword(i);
sal_Unicode cChar = PreviousChar(i);
if (nIndexPre == NF_KEY_H || // H
nIndexPre == NF_KEY_HH || // HH
@@ -1199,7 +1199,7 @@ xub_StrLen ImpSvNumberformatScan::ScanType(const String&)
{
if ( Is100SecZero( i, bDecSep ) )
{
- bDecSep = TRUE; // subsequent 0's
+ bDecSep = sal_True; // subsequent 0's
eNewType = NUMBERFORMAT_TIME;
}
else
@@ -1222,18 +1222,18 @@ xub_StrLen ImpSvNumberformatScan::ScanType(const String&)
sStrArray[i+1].GetChar(0) == '$' )
{ // as of SV_NUMBERFORMATTER_VERSION_NEW_CURR
eNewType = NUMBERFORMAT_CURRENCY;
- bMatchBracket = TRUE;
+ bMatchBracket = sal_True;
}
else if ( i < nAnzStrings-1 &&
nTypeArray[i+1] == NF_SYMBOLTYPE_STRING &&
sStrArray[i+1].GetChar(0) == '~' )
{ // as of SV_NUMBERFORMATTER_VERSION_CALENDAR
eNewType = NUMBERFORMAT_DATE;
- bMatchBracket = TRUE;
+ bMatchBracket = sal_True;
}
else
{
- USHORT nIndexNex = NextKeyword(i);
+ sal_uInt16 nIndexNex = NextKeyword(i);
if (nIndexNex == NF_KEY_H || // H
nIndexNex == NF_KEY_HH || // HH
nIndexNex == NF_KEY_M || // M
@@ -1251,7 +1251,7 @@ xub_StrLen ImpSvNumberformatScan::ScanType(const String&)
break;
default:
if ( sStrArray[i] == pLoc->getTime100SecSep() )
- bDecSep = TRUE; // for SS,0
+ bDecSep = sal_True; // for SS,0
eNewType = NUMBERFORMAT_UNDEFINED;
break;
}
@@ -1388,7 +1388,7 @@ xub_StrLen ImpSvNumberformatScan::ScanType(const String&)
{
if ( nTypeArray[i] == NF_SYMBOLTYPE_DEL
&& sStrArray[i].GetChar(0) == ']' )
- bMatchBracket = FALSE;
+ bMatchBracket = sal_False;
else
nTypeArray[i] = NF_SYMBOLTYPE_STRING;
nPos = nPos + sStrArray[i].Len();
@@ -1409,7 +1409,7 @@ xub_StrLen ImpSvNumberformatScan::ScanType(const String&)
}
-bool ImpSvNumberformatScan::InsertSymbol( USHORT & nPos, svt::NfSymbolType eType, const String& rStr )
+bool ImpSvNumberformatScan::InsertSymbol( sal_uInt16 & nPos, svt::NfSymbolType eType, const String& rStr )
{
if (nAnzStrings >= NF_MAX_FORMAT_SYMBOLS || nPos > nAnzStrings)
return false;
@@ -1431,8 +1431,8 @@ bool ImpSvNumberformatScan::InsertSymbol( USHORT & nPos, svt::NfSymbolType eType
}
-int ImpSvNumberformatScan::FinalScanGetCalendar( xub_StrLen& nPos, USHORT& i,
- USHORT& rAnzResStrings )
+int ImpSvNumberformatScan::FinalScanGetCalendar( xub_StrLen& nPos, sal_uInt16& i,
+ sal_uInt16& rAnzResStrings )
{
if ( sStrArray[i].GetChar(0) == '[' &&
i < nAnzStrings-1 &&
@@ -1510,10 +1510,10 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
const CharClass* pChrCls = pFormatter->GetCharClass();
xub_StrLen nPos = 0; // error correction position
- USHORT i = 0; // symbol loop counter
- USHORT nCounter = 0; // counts digits
+ sal_uInt16 i = 0; // symbol loop counter
+ sal_uInt16 nCounter = 0; // counts digits
nAnzResStrings = nAnzStrings; // counts remaining symbols
- bDecSep = FALSE; // reset in case already used in TypeCheck
+ bDecSep = sal_False; // reset in case already used in TypeCheck
bool bThaiT = false; // Thai T NatNum modifier present
switch (eScannedType)
@@ -1595,7 +1595,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
{
if (bExp) // doppelt
return nPos;
- bExp = TRUE;
+ bExp = sal_True;
nExpPos = i;
if (bDecSep)
nCntPost = nCounter;
@@ -1611,7 +1611,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
{
if (bDecSep && nCounter > 0) // Nachkommastellen
return nPos; // Fehler
- bBlank = TRUE;
+ bBlank = sal_True;
nBlankPos = i;
nCntPre = nCounter;
nCounter = 0;
@@ -1736,7 +1736,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
nPos = nPos + sStrArray[i].Len();
if (!bThousand) // only once
{
- bThousand = TRUE;
+ bThousand = sal_True;
cThousandFill = sStrArray[i+1].GetChar(0);
}
// Eat it, will be reinserted at proper
@@ -1751,7 +1751,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
{ // #,,,,
if ( StringEqualsChar( sOldThousandSep, ' ' ) )
{ // strange, those French..
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
String& rStr = sStrArray[i];
// set a hard Non-Breaking Space or ConvertMode
const String& rSepF = pFormatter->GetNumThousandSep();
@@ -1763,7 +1763,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
nPos = nPos + sStrArray[i].Len();
if ( bFirst )
{
- bFirst = FALSE;
+ bFirst = sal_False;
rStr = rSepF;
nTypeArray[i] = NF_SYMBOLTYPE_THSEP;
}
@@ -1795,7 +1795,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
{
if ( bFirst )
{
- bFirst = FALSE;
+ bFirst = sal_False;
rStr = rSepF;
nTypeArray[i] = NF_SYMBOLTYPE_THSEP;
}
@@ -1872,7 +1872,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
nPos = nPos + sStrArray[i].Len();
nTypeArray[i] = NF_SYMBOLTYPE_DECSEP;
sStrArray[i] = pFormatter->GetNumDecimalSep();
- bDecSep = TRUE;
+ bDecSep = sal_True;
nDecPos = i;
nCntPre = nCounter;
nCounter = 0;
@@ -1890,7 +1890,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
{ // or behind /
if (bDecSep && nCounter > 0)// dec.
return nPos; // error
- bBlank = TRUE;
+ bBlank = sal_True;
nBlankPos = i;
nCntPre = nCounter;
nCounter = 0;
@@ -1927,7 +1927,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
return nPos ? nPos : 1; // /? not allowed
else if (!bFrac || (bDecSep && nCounter > 0))
{
- bFrac = TRUE;
+ bFrac = sal_True;
nCntPost = nCounter;
nCounter = 0;
nTypeArray[i] = NF_SYMBOLTYPE_FRAC;
@@ -1965,7 +1965,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
String& rStr = sStrArray[i];
String* pStr = &sStrArray[i];
nTypeArray[i] = NF_SYMBOLTYPE_CURRENCY; // wandeln
- BOOL bHadDash = FALSE;
+ sal_Bool bHadDash = sal_False;
i++;
while ( i < nAnzStrings &&
sStrArray[i].GetChar(0) != ']' )
@@ -1981,7 +1981,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
{
if ( sStrArray[i].GetChar(0) == '-' )
{
- bHadDash = TRUE;
+ bHadDash = sal_True;
pStr = &sStrArray[i];
nTypeArray[i] = NF_SYMBOLTYPE_CURREXT;
}
@@ -2062,7 +2062,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
}
if (bThousand) // Expansion of grouping separators
{
- USHORT nMaxPos;
+ sal_uInt16 nMaxPos;
if (bFrac)
{
if (bBlank)
@@ -2239,7 +2239,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
{
if ( Is100SecZero( i, bDecSep ) )
{
- bDecSep = TRUE;
+ bDecSep = sal_True;
nTypeArray[i] = NF_SYMBOLTYPE_DIGIT;
String& rStr = sStrArray[i];
i++;
@@ -2267,7 +2267,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
{
if (bThousand) // doppelt
return nPos;
- bThousand = TRUE; // bei Time frei
+ bThousand = sal_True; // bei Time frei
sal_Unicode cChar = pChrCls->upper( NextChar(i) ).GetChar(0);
if ( cChar == cOldKeyH )
nThousand = 1; // H
@@ -2300,7 +2300,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
}
else if ( sStrArray[i] == sOldTime100SecSep )
{
- bDecSep = TRUE;
+ bDecSep = sal_True;
nTypeArray[i] = NF_SYMBOLTYPE_TIME100SECSEP;
if ( bConvertMode )
sStrArray[i] = pLoc->getTime100SecSep();
@@ -2333,7 +2333,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
case NF_KEY_AMPM: // AM/PM
case NF_KEY_AP: // A/P
{
- bExp = TRUE; // missbraucht fuer A/P
+ bExp = sal_True; // missbraucht fuer A/P
sStrArray[i] = sKeyword[nTypeArray[i]]; // tTtT -> TTTT
nPos = nPos + sStrArray[i].Len();
i++;
@@ -2370,7 +2370,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
break; // of NUMBERFORMAT_TIME
case NUMBERFORMAT_DATETIME:
{
- BOOL bTimePart = FALSE;
+ sal_Bool bTimePart = sal_False;
while (i < nAnzStrings)
{
switch (nTypeArray[i])
@@ -2408,7 +2408,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
{
if ( bTimePart && Is100SecZero( i, bDecSep ) )
{
- bDecSep = TRUE;
+ bDecSep = sal_True;
nTypeArray[i] = NF_SYMBOLTYPE_DIGIT;
String& rStr = sStrArray[i];
i++;
@@ -2445,7 +2445,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
}
else if ( sStrArray[i] == sOldTime100SecSep )
{
- bDecSep = TRUE;
+ bDecSep = sal_True;
nTypeArray[i] = NF_SYMBOLTYPE_TIME100SECSEP;
if ( bConvertMode )
sStrArray[i] = pLoc->getTime100SecSep();
@@ -2473,8 +2473,8 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
case NF_KEY_AMPM: // AM/PM
case NF_KEY_AP: // A/P
{
- bTimePart = TRUE;
- bExp = TRUE; // missbraucht fuer A/P
+ bTimePart = sal_True;
+ bExp = sal_True; // missbraucht fuer A/P
sStrArray[i] = sKeyword[nTypeArray[i]]; // tTtT -> TTTT
nPos = nPos + sStrArray[i].Len();
i++;
@@ -2486,7 +2486,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
case NF_KEY_HH: // HH
case NF_KEY_S: // S
case NF_KEY_SS: // SS
- bTimePart = TRUE;
+ bTimePart = sal_True;
sStrArray[i] = sKeyword[nTypeArray[i]]; // tTtT -> TTTT
nPos = nPos + sStrArray[i].Len();
i++;
@@ -2517,7 +2517,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
case NF_KEY_GGG : // GGG
case NF_KEY_R : // R
case NF_KEY_RR : // RR
- bTimePart = FALSE;
+ bTimePart = sal_False;
sStrArray[i] = sKeyword[nTypeArray[i]]; // tTtT -> TTTT
nPos = nPos + sStrArray[i].Len();
i++;
@@ -2570,7 +2570,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
sOldCurString.GetChar(0) )
{
String aTmp( sStrArray[i] );
- USHORT j = i + 1;
+ sal_uInt16 j = i + 1;
while ( aTmp.Len() < sOldCurSymbol.Len() &&
j < nAnzStrings &&
nTypeArray[j] == NF_SYMBOLTYPE_STRING )
@@ -2615,7 +2615,7 @@ xub_StrLen ImpSvNumberformatScan::FinalScan( String& rString, String& rComment )
{
xub_StrLen nStringPos = rString.Len();
xub_StrLen nArrPos = 0;
- USHORT iPos = i;
+ sal_uInt16 iPos = i;
do
{
if (sStrArray[i].Len() == 2 &&
@@ -2783,7 +2783,7 @@ xub_StrLen ImpSvNumberformatScan::ScanFormat( String& rString, String& rComment
// res = 0 => Format ok
}
-void ImpSvNumberformatScan::CopyInfo(ImpSvNumberformatInfo* pInfo, USHORT nAnz)
+void ImpSvNumberformatScan::CopyInfo(ImpSvNumberformatInfo* pInfo, sal_uInt16 nAnz)
{
size_t i,j;
j = 0;
diff --git a/svl/source/numbers/zforscan.hxx b/svl/source/numbers/zforscan.hxx
index 176da84b652e..9b04921cb7f4 100644
--- a/svl/source/numbers/zforscan.hxx
+++ b/svl/source/numbers/zforscan.hxx
@@ -42,7 +42,7 @@ const size_t NF_MAX_FORMAT_SYMBOLS = 100;
const size_t NF_MAX_DEFAULT_COLORS = 10;
// Hack: nThousand==1000 => "Default" occurs in format string
-const USHORT FLAG_STANDARD_IN_FORMAT = 1000;
+const sal_uInt16 FLAG_STANDARD_IN_FORMAT = 1000;
class ImpSvNumberformatScan
{
@@ -52,15 +52,15 @@ public:
~ImpSvNumberformatScan();
void ChangeIntl(); // tauscht Keywords aus
- void ChangeNullDate(USHORT nDay, USHORT nMonth, USHORT nYear);
+ void ChangeNullDate(sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear);
// tauscht Referenzdatum aus
void ChangeStandardPrec(sal_uInt16 nPrec); // tauscht Standardprecision aus
xub_StrLen ScanFormat( String& rString, String& rComment ); // Aufruf der Scan-Analyse
void CopyInfo(ImpSvNumberformatInfo* pInfo,
- USHORT nAnz); // Kopiert die FormatInfo
- USHORT GetAnzResStrings() const { return nAnzResStrings; }
+ sal_uInt16 nAnz); // Kopiert die FormatInfo
+ sal_uInt16 GetAnzResStrings() const { return nAnzResStrings; }
const CharClass& GetChrCls() const { return *pFormatter->GetCharClass(); }
const LocaleDataWrapper& GetLoc() const { return *pFormatter->GetLocaleData(); }
@@ -72,7 +72,7 @@ public:
InitKeywords();
return sKeyword;
}
- // Keywords used in output like TRUE and FALSE
+ // Keywords used in output like sal_True and sal_False
const String& GetSpecialKeyword( NfKeywordIndex eIdx ) const
{
if ( !sKeyword[eIdx].Len() )
@@ -123,18 +123,18 @@ public:
}
void SetConvertMode(LanguageType eTmpLge, LanguageType eNewLge,
- BOOL bSystemToSystem = FALSE )
+ sal_Bool bSystemToSystem = sal_False )
{
- bConvertMode = TRUE;
+ bConvertMode = sal_True;
eNewLnge = eNewLge;
eTmpLnge = eTmpLge;
bConvertSystemToSystem = bSystemToSystem;
}
- void SetConvertMode(BOOL bMode) { bConvertMode = bMode; }
+ void SetConvertMode(sal_Bool bMode) { bConvertMode = bMode; }
// Veraendert nur die Bool-Variable
// (zum temporaeren Unterbrechen des
// Convert-Modus)
- BOOL GetConvertMode() const { return bConvertMode; }
+ sal_Bool GetConvertMode() const { return bConvertMode; }
LanguageType GetNewLnge() const { return eNewLnge; }
// Lesezugriff auf ConvertMode
// und Konvertierungsland/Spr.
@@ -143,9 +143,9 @@ public:
// und Ausgangsland/Spr.
/// get Thai T speciality
- BYTE GetNatNumModifier() const { return nNatNumModifier; }
+ sal_uInt8 GetNatNumModifier() const { return nNatNumModifier; }
/// set Thai T speciality
- void SetNatNumModifier( BYTE n ) { nNatNumModifier = n; }
+ void SetNatNumModifier( sal_uInt8 n ) { nNatNumModifier = n; }
SvNumberFormatter* GetNumberformatter() { return pFormatter; }
// Zugriff auf Formatierer
@@ -164,42 +164,42 @@ private: // ---- privater Teil
String sStrArray[NF_MAX_FORMAT_SYMBOLS]; // Array der Symbole
short nTypeArray[NF_MAX_FORMAT_SYMBOLS]; // Array der Infos
// externe Infos:
- USHORT nAnzResStrings; // Anzahl der Ergebnissymbole
+ sal_uInt16 nAnzResStrings; // Anzahl der Ergebnissymbole
#if !(defined SOLARIS && defined X86)
short eScannedType; // Typ gemaess Scan
#else
int eScannedType; // wg. Optimierung
#endif
- BOOL bThousand; // Mit Tausenderpunkt
- USHORT nThousand; // Zaehlt ....-Folgen
- USHORT nCntPre; // Zaehlt Vorkommastellen
- USHORT nCntPost; // Zaehlt Nachkommastellen
- USHORT nCntExp; // Zaehlt Exp.Stellen, AM/PM
+ sal_Bool bThousand; // Mit Tausenderpunkt
+ sal_uInt16 nThousand; // Zaehlt ....-Folgen
+ sal_uInt16 nCntPre; // Zaehlt Vorkommastellen
+ sal_uInt16 nCntPost; // Zaehlt Nachkommastellen
+ sal_uInt16 nCntExp; // Zaehlt Exp.Stellen, AM/PM
// interne Infos:
- USHORT nAnzStrings; // Anzahl der Symbole
- USHORT nRepPos; // Position eines '*'
- USHORT nExpPos; // interne Position des E
- USHORT nBlankPos; // interne Position des Blank
+ sal_uInt16 nAnzStrings; // Anzahl der Symbole
+ sal_uInt16 nRepPos; // Position eines '*'
+ sal_uInt16 nExpPos; // interne Position des E
+ sal_uInt16 nBlankPos; // interne Position des Blank
short nDecPos; // interne Pos. des ,
- BOOL bExp; // wird bei Lesen des E gesetzt
- BOOL bFrac; // wird bei Lesen des / gesetzt
- BOOL bBlank; // wird bei ' '(Fraction) ges.
- BOOL bDecSep; // Wird beim ersten , gesetzt
- mutable BOOL bKeywordsNeedInit; // Locale dependent keywords need to be initialized
- mutable BOOL bCompatCurNeedInit; // Locale dependent compatibility currency need to be initialized
+ sal_Bool bExp; // wird bei Lesen des E gesetzt
+ sal_Bool bFrac; // wird bei Lesen des / gesetzt
+ sal_Bool bBlank; // wird bei ' '(Fraction) ges.
+ sal_Bool bDecSep; // Wird beim ersten , gesetzt
+ mutable sal_Bool bKeywordsNeedInit; // Locale dependent keywords need to be initialized
+ mutable sal_Bool bCompatCurNeedInit; // Locale dependent compatibility currency need to be initialized
String sCurSymbol; // Currency symbol for compatibility format codes
String sCurString; // Currency symbol in upper case
String sCurAbbrev; // Currency abbreviation
String sErrStr; // String fuer Fehlerausgaben
- BOOL bConvertMode; // Wird im Convert-Mode gesetzt
+ sal_Bool bConvertMode; // Wird im Convert-Mode gesetzt
// Land/Sprache, in die der
LanguageType eNewLnge; // gescannte String konvertiert
// wird (fuer Excel Filter)
// Land/Sprache, aus der der
LanguageType eTmpLnge; // gescannte String konvertiert
// wird (fuer Excel Filter)
- BOOL bConvertSystemToSystem; // Whether the conversion is
+ sal_Bool bConvertSystemToSystem; // Whether the conversion is
// from one system locale to
// another system locale (in
// this case the automatic
@@ -208,7 +208,7 @@ private: // ---- privater Teil
xub_StrLen nCurrPos; // Position des Waehrungssymbols
- BYTE nNatNumModifier; // Thai T speciality
+ sal_uInt8 nNatNumModifier; // Thai T speciality
void InitKeywords() const;
void InitSpecialKeyword( NfKeywordIndex eIdx ) const;
@@ -217,32 +217,32 @@ private: // ---- privater Teil
#ifdef _ZFORSCAN_CXX // ----- private Methoden -----
void SetDependentKeywords();
// Setzt die Sprachabh. Keyw.
- void SkipStrings(USHORT& i,xub_StrLen& nPos);// Ueberspringt StringSymbole
- USHORT PreviousKeyword(USHORT i); // Gibt Index des vorangeh.
+ void SkipStrings(sal_uInt16& i,xub_StrLen& nPos);// Ueberspringt StringSymbole
+ sal_uInt16 PreviousKeyword(sal_uInt16 i); // Gibt Index des vorangeh.
// Schluesselworts oder 0
- USHORT NextKeyword(USHORT i); // Gibt Index des naechsten
+ sal_uInt16 NextKeyword(sal_uInt16 i); // Gibt Index des naechsten
// Schluesselworts oder 0
- sal_Unicode PreviousChar(USHORT i); // Gibt letzten Buchstaben
+ sal_Unicode PreviousChar(sal_uInt16 i); // Gibt letzten Buchstaben
// vor der Position,
// skipt EMPTY, STRING, STAR, BLANK
- sal_Unicode NextChar(USHORT i); // Gibt ersten Buchst. danach
- short PreviousType( USHORT i ); // Gibt Typ vor Position,
+ sal_Unicode NextChar(sal_uInt16 i); // Gibt ersten Buchst. danach
+ short PreviousType( sal_uInt16 i ); // Gibt Typ vor Position,
// skipt EMPTY
- BOOL IsLastBlankBeforeFrac(USHORT i); // True <=> es kommt kein ' '
+ sal_Bool IsLastBlankBeforeFrac(sal_uInt16 i); // True <=> es kommt kein ' '
// mehr bis zum '/'
void Reset(); // Reset aller Variablen
// vor Analysestart
short GetKeyWord( const String& sSymbol, // determine keyword at nPos
xub_StrLen nPos ); // return 0 <=> not found
- inline BOOL IsAmbiguousE( short nKey ) // whether nKey is ambiguous E of NF_KEY_E/NF_KEY_EC
+ inline sal_Bool IsAmbiguousE( short nKey ) // whether nKey is ambiguous E of NF_KEY_E/NF_KEY_EC
{
return (nKey == NF_KEY_EC || nKey == NF_KEY_E) &&
(GetKeywords()[NF_KEY_EC] == GetKeywords()[NF_KEY_E]);
}
// if 0 at strArray[i] is of S,00 or SS,00 or SS"any"00 in ScanType() or FinalScan()
- BOOL Is100SecZero( USHORT i, BOOL bHadDecSep );
+ sal_Bool Is100SecZero( sal_uInt16 i, sal_Bool bHadDecSep );
short Next_Symbol(const String& rStr,
xub_StrLen& nPos,
@@ -252,14 +252,14 @@ private: // ---- privater Teil
xub_StrLen FinalScan( String& rString, String& rComment ); // Endanalyse mit Vorgabe
// des Typs
// -1:= error, return nPos in FinalScan; 0:= no calendar, 1:= calendar found
- int FinalScanGetCalendar( xub_StrLen& nPos, USHORT& i, USHORT& nAnzResStrings );
+ int FinalScanGetCalendar( xub_StrLen& nPos, sal_uInt16& i, sal_uInt16& nAnzResStrings );
/** Insert symbol into nTypeArray and sStrArray, e.g. grouping separator.
If at nPos-1 a symbol type NF_SYMBOLTYPE_EMPTY is present, that is
reused instead of shifting all one up and nPos is decremented! */
- bool InsertSymbol( USHORT & nPos, svt::NfSymbolType eType, const String& rStr );
+ bool InsertSymbol( sal_uInt16 & nPos, svt::NfSymbolType eType, const String& rStr );
- static inline BOOL StringEqualsChar( const String& rStr, sal_Unicode ch )
+ static inline sal_Bool StringEqualsChar( const String& rStr, sal_Unicode ch )
{ return rStr.GetChar(0) == ch && rStr.Len() == 1; }
// Yes, for efficiency get the character first and then compare length
// because in most places where this is used the string is one char.
diff --git a/svl/source/svdde/ddecli.cxx b/svl/source/svdde/ddecli.cxx
index 236f57824da2..ec1adf1fd300 100644
--- a/svl/source/svdde/ddecli.cxx
+++ b/svl/source/svdde/ddecli.cxx
@@ -86,7 +86,7 @@ HDDEDATA CALLBACK DdeInternal::CliCallback(
if( self )
{
DdeTransaction* t;
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
for( t = self->aTransactions.First(); t; t = self->aTransactions.Next() )
{
switch( nCode )
@@ -95,9 +95,9 @@ HDDEDATA CALLBACK DdeInternal::CliCallback(
if( (DWORD)t->nId == nInfo1 )
{
nCode = t->nType & (XCLASS_MASK | XTYP_MASK);
- t->bBusy = FALSE;
+ t->bBusy = sal_False;
t->Done( 0 != hData );
- bFound = TRUE;
+ bFound = sal_True;
}
break;
@@ -108,11 +108,11 @@ HDDEDATA CALLBACK DdeInternal::CliCallback(
: DdeGetLastError( pInst->hDdeInstCli );
t = 0;
nRet = 0;
- bFound = TRUE;
+ bFound = sal_True;
break;
case XTYP_ADVDATA:
- bFound = BOOL( *t->pName == hText2 );
+ bFound = sal_Bool( *t->pName == hText2 );
break;
}
if( bFound )
@@ -222,7 +222,7 @@ DdeConnection::~DdeConnection()
// --- DdeConnection::IsConnected() --------------------------------
-BOOL DdeConnection::IsConnected()
+sal_Bool DdeConnection::IsConnected()
{
CONVINFO c;
#ifdef OS2
@@ -231,13 +231,13 @@ BOOL DdeConnection::IsConnected()
c.cb = sizeof( c );
#endif
if ( DdeQueryConvInfo( pImp->hConv, QID_SYNC, &c ) )
- return TRUE;
+ return sal_True;
else
{
DdeInstData* pInst = ImpGetInstData();
pImp->hConv = DdeReconnect( pImp->hConv );
pImp->nStatus = pImp->hConv ? DMLERR_NO_ERROR : DdeGetLastError( pInst->hDdeInstCli );
- return BOOL( pImp->nStatus == DMLERR_NO_ERROR );
+ return sal_Bool( pImp->nStatus == DMLERR_NO_ERROR );
}
}
@@ -280,7 +280,7 @@ DdeTransaction::DdeTransaction( DdeConnection& d, const String& rItemName,
nTime = n;
nId = 0;
nType = 0;
- bBusy = FALSE;
+ bBusy = sal_False;
rDde.aTransactions.Insert( this );
}
@@ -306,7 +306,7 @@ void DdeTransaction::Execute()
HSZ hItem = *pName;
void* pData = (void*)(const void *)aDdeData;
DWORD nData = (DWORD)(long)aDdeData;
- ULONG nIntFmt = aDdeData.pImp->nFmt;
+ sal_uLong nIntFmt = aDdeData.pImp->nFmt;
UINT nExtFmt = DdeData::GetExternalFormat( nIntFmt );
DdeInstData* pInst = ImpGetInstData();
@@ -342,7 +342,7 @@ void DdeTransaction::Execute()
if ( nId && rDde.pImp->hConv )
DdeAbandonTransaction( pInst->hDdeInstCli, rDde.pImp->hConv, nId);
nId = 0;
- bBusy = TRUE;
+ bBusy = sal_True;
HDDEDATA hRet = DdeClientTransaction( (unsigned char*)pData, nData,
rDde.pImp->hConv, hItem, nExtFmt,
(UINT)nType, TIMEOUT_ASYNC,
@@ -373,7 +373,7 @@ void __EXPORT DdeTransaction::Data( const DdeData* p )
// --- DdeTransaction::Done() --------------------------------------
-void __EXPORT DdeTransaction::Done( BOOL bDataValid )
+void __EXPORT DdeTransaction::Done( sal_Bool bDataValid )
{
aDone.Call( (void*)bDataValid );
}
@@ -389,7 +389,7 @@ DdeLink::DdeLink( DdeConnection& d, const String& aItemName, long n ) :
DdeLink::~DdeLink()
{
- nType = (USHORT)XTYP_ADVSTOP;
+ nType = (sal_uInt16)XTYP_ADVSTOP;
nTime = 0;
}
@@ -427,7 +427,7 @@ DdeHotLink::DdeHotLink( DdeConnection& d, const String& i, long n ) :
// --- DdePoke::DdePoke() ------------------------------------------
DdePoke::DdePoke( DdeConnection& d, const String& i, const char* p,
- long l, ULONG f, long n ) :
+ long l, sal_uLong f, long n ) :
DdeTransaction( d, i, n )
{
aDdeData = DdeData( p, l, f );
diff --git a/svl/source/svdde/ddedata.cxx b/svl/source/svdde/ddedata.cxx
index 369306c22874..7f78f4d4398a 100644
--- a/svl/source/svdde/ddedata.cxx
+++ b/svl/source/svdde/ddedata.cxx
@@ -54,7 +54,7 @@ DdeData::DdeData()
// --- DdeData::DdeData() ------------------------------------------
-DdeData::DdeData( const void* p, long n, ULONG f )
+DdeData::DdeData( const void* p, long n, sal_uLong f )
{
pImp = new DdeDataImp;
pImp->hData = NULL;
@@ -105,12 +105,12 @@ void DdeData::Lock()
// --- DdeData::GetFormat() ----------------------------------------
-ULONG DdeData::GetFormat() const
+sal_uLong DdeData::GetFormat() const
{
return pImp->nFmt;
}
-void DdeData::SetFormat( ULONG nFmt )
+void DdeData::SetFormat( sal_uLong nFmt )
{
pImp->nFmt = nFmt;
}
@@ -144,7 +144,7 @@ DdeData& DdeData::operator = ( const DdeData& rData )
return *this;
}
-ULONG DdeData::GetExternalFormat( ULONG nFmt )
+sal_uLong DdeData::GetExternalFormat( sal_uLong nFmt )
{
switch( nFmt )
{
@@ -173,7 +173,7 @@ ULONG DdeData::GetExternalFormat( ULONG nFmt )
if( aName.Len() )
{
HATOMTBL hSysTable = WinQuerySystemAtomTable();
- nFmt = (ULONG)WinAddAtom( hSysTable, (PSZ)aName.GetBuffer() );
+ nFmt = (sal_uLong)WinAddAtom( hSysTable, (PSZ)aName.GetBuffer() );
}
#endif
#endif
@@ -182,7 +182,7 @@ ULONG DdeData::GetExternalFormat( ULONG nFmt )
return nFmt;
}
-ULONG DdeData::GetInternalFormat( ULONG nFmt )
+sal_uLong DdeData::GetInternalFormat( sal_uLong nFmt )
{
switch( nFmt )
{
diff --git a/svl/source/svdde/ddeimp.hxx b/svl/source/svdde/ddeimp.hxx
index 708b2736f9cf..cef0bb386201 100644
--- a/svl/source/svdde/ddeimp.hxx
+++ b/svl/source/svdde/ddeimp.hxx
@@ -32,11 +32,11 @@
#include "ddemlos2.h"
-#define WORD USHORT
-#define DWORD ULONG
-#define LPBYTE BYTE*
-#define LPWORD USHORT*
-#define LPDWORD ULONG*
+#define WORD sal_uInt16
+#define DWORD sal_uLong
+#define LPBYTE sal_uInt8*
+#define LPWORD sal_uInt16*
+#define LPDWORD sal_uLong*
#define LPCTSTR PCSZ
#else
@@ -49,10 +49,10 @@
/*
extern "C"
{
-#define BOOL WIN_BOOL
-#define BYTE WIN_BYTE
-#undef BOOL
-#undef BYTE
+#define sal_Bool WIN_BOOL
+#define sal_uInt8 WIN_BYTE
+#undef sal_Bool
+#undef sal_uInt8
};
*/
@@ -143,7 +143,7 @@ struct DdeDataImp
HDDEDATA hData;
LPBYTE pData;
long nData;
- ULONG nFmt;
+ sal_uLong nFmt;
};
class DdeConnections;
@@ -151,15 +151,15 @@ class DdeServices;
struct DdeInstData
{
- USHORT nRefCount;
+ sal_uInt16 nRefCount;
DdeConnections* pConnections;
// Server
long hCurConvSvr;
- ULONG hDdeInstSvr;
+ sal_uLong hDdeInstSvr;
short nInstanceSvr;
DdeServices* pServicesSvr;
// Client
- ULONG hDdeInstCli;
+ sal_uLong hDdeInstCli;
short nInstanceCli;
};
diff --git a/svl/source/svdde/ddesvr.cxx b/svl/source/svdde/ddesvr.cxx
index c361f259d610..3d3c5029c6a7 100644
--- a/svl/source/svdde/ddesvr.cxx
+++ b/svl/source/svdde/ddesvr.cxx
@@ -48,10 +48,10 @@ enum DdeItemType
struct DdeItemImpData
{
- ULONG nHCnv;
- USHORT nCnt;
+ sal_uLong nHCnv;
+ sal_uInt16 nCnt;
- DdeItemImpData( ULONG nH ) : nHCnv( nH ), nCnt( 1 ) {}
+ DdeItemImpData( sal_uLong nH ) : nHCnv( nH ), nCnt( 1 ) {}
};
SV_DECL_VARARR( DdeItemImp, DdeItemImpData, 1, 1 )
@@ -106,7 +106,7 @@ HDDEDATA CALLBACK _export DdeInternal::SvrCallback(
{
if( hText1 )
{
- USHORT n = 0;
+ sal_uInt16 n = 0;
while( STRING_NOTFOUND != n )
{
String s( sTopics.GetToken( 0, '\t', n ));
@@ -159,7 +159,7 @@ HDDEDATA CALLBACK _export DdeInternal::SvrCallback(
}
#else
String sTopics( pService->Topics() );
- USHORT n = 0;
+ sal_uInt16 n = 0;
while( STRING_NOTFOUND != n )
{
String s( sTopics.GetToken( 0, '\t', n ));
@@ -240,7 +240,7 @@ found:
return (HDDEDATA)NULL;
}
- BOOL bExec = BOOL(nCode == XTYP_EXECUTE);
+ sal_Bool bExec = sal_Bool(nCode == XTYP_EXECUTE);
pTopic = pC->pTopic;
if ( pTopic && !bExec )
pItem = FindItem( *pTopic, hText2 );
@@ -256,7 +256,7 @@ found:
else
pTopic->aItem.Erase();
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
pInst->hCurConvSvr = (long)hConv;
switch( nCode )
{
@@ -345,14 +345,14 @@ found:
pItem->IncMonitor( (long)hConv );
pInst->hCurConvSvr = NULL;
}
- return (HDDEDATA)TRUE;
+ return (HDDEDATA)sal_True;
case XTYP_ADVSTOP:
pItem->DecMonitor( (long)hConv );
if( !pItem->pImpData )
pTopic->StopAdviseLoop();
pInst->hCurConvSvr = NULL;
- return (HDDEDATA)TRUE;
+ return (HDDEDATA)sal_True;
case XTYP_EXECUTE:
{
@@ -400,7 +400,7 @@ DdeTopic* DdeInternal::FindTopic( DdeService& rService, HSZ hTopic )
{
DdeTopic* s;
DdeTopics& rTopics = rService.aTopics;
- int bWeiter = FALSE;
+ int bWeiter = sal_False;
DdeInstData* pInst = ImpGetInstData();
DBG_ASSERT(pInst,"SVDDE:No instance data");
@@ -433,7 +433,7 @@ DdeItem* DdeInternal::FindItem( DdeTopic& rTopic, HSZ hItem )
DdeItems& rItems = rTopic.aItems;
DdeInstData* pInst = ImpGetInstData();
DBG_ASSERT(pInst,"SVDDE:No instance data");
- int bWeiter = FALSE;
+ int bWeiter = sal_False;
do { // middle check loop
@@ -569,7 +569,7 @@ void DdeService::RemoveTopic( const DdeTopic& rTopic )
aTopics.Remove( t );
// JP 27.07.95: und alle Conversions loeschen !!!
// (sonst wird auf geloeschten Topics gearbeitet!!)
- for( ULONG n = pConv->Count(); n; )
+ for( sal_uLong n = pConv->Count(); n; )
{
Conversation* pC = pConv->GetObject( --n );
if( pC->pTopic == &rTopic )
@@ -585,21 +585,21 @@ void DdeService::RemoveTopic( const DdeTopic& rTopic )
// --- DdeService::HasCbFormat() -----------------------------------
-BOOL DdeService::HasCbFormat( USHORT nFmt )
+sal_Bool DdeService::HasCbFormat( sal_uInt16 nFmt )
{
- return BOOL( aFormats.GetPos( nFmt ) != LIST_ENTRY_NOTFOUND );
+ return sal_Bool( aFormats.GetPos( nFmt ) != LIST_ENTRY_NOTFOUND );
}
// --- DdeService::HasFormat() -------------------------------------
-BOOL DdeService::HasFormat( ULONG nFmt )
+sal_Bool DdeService::HasFormat( sal_uLong nFmt )
{
- return HasCbFormat( (USHORT)DdeData::GetExternalFormat( nFmt ));
+ return HasCbFormat( (sal_uInt16)DdeData::GetExternalFormat( nFmt ));
}
// --- DdeService::AddFormat() -------------------------------------
-void DdeService::AddFormat( ULONG nFmt )
+void DdeService::AddFormat( sal_uLong nFmt )
{
nFmt = DdeData::GetExternalFormat( nFmt );
aFormats.Remove( nFmt );
@@ -608,7 +608,7 @@ void DdeService::AddFormat( ULONG nFmt )
// --- DdeService::RemoveFormat() ----------------------------------
-void DdeService::RemoveFormat( ULONG nFmt )
+void DdeService::RemoveFormat( sal_uLong nFmt )
{
aFormats.Remove( DdeData::GetExternalFormat( nFmt ) );
}
@@ -645,9 +645,9 @@ const String& DdeTopic::GetName() const
// --- DdeTopic::IsSystemTopic() -----------------------------------
-BOOL DdeTopic::IsSystemTopic()
+sal_Bool DdeTopic::IsSystemTopic()
{
- return BOOL (GetName() == reinterpret_cast<const sal_Unicode*>(SZDDESYS_TOPIC));
+ return sal_Bool (GetName() == reinterpret_cast<const sal_Unicode*>(SZDDESYS_TOPIC));
}
// --- DdeTopic::AddItem() -----------------------------------------
@@ -741,7 +741,7 @@ void __EXPORT DdeTopic::_Disconnect( long nId )
// --- DdeTopic::Get() ---------------------------------------------
-DdeData* __EXPORT DdeTopic::Get( ULONG nFmt )
+DdeData* __EXPORT DdeTopic::Get( sal_uLong nFmt )
{
if ( aGetLink.IsSet() )
return (DdeData*)aGetLink.Call( (void*)nFmt );
@@ -751,22 +751,22 @@ DdeData* __EXPORT DdeTopic::Get( ULONG nFmt )
// --- DdeTopic::Put() ---------------------------------------------
-BOOL __EXPORT DdeTopic::Put( const DdeData* r )
+sal_Bool __EXPORT DdeTopic::Put( const DdeData* r )
{
if ( aPutLink.IsSet() )
- return (BOOL)aPutLink.Call( (void*) r );
+ return (sal_Bool)aPutLink.Call( (void*) r );
else
- return FALSE;
+ return sal_False;
}
// --- DdeTopic::Execute() -----------------------------------------
-BOOL __EXPORT DdeTopic::Execute( const String* r )
+sal_Bool __EXPORT DdeTopic::Execute( const String* r )
{
if ( aExecLink.IsSet() )
- return (BOOL)aExecLink.Call( (void*)r );
+ return (sal_Bool)aExecLink.Call( (void*)r );
else
- return FALSE;
+ return sal_False;
}
// --- DdeTopic::GetConvId() ---------------------------------------
@@ -780,16 +780,16 @@ long DdeTopic::GetConvId()
// --- DdeTopic::StartAdviseLoop() ---------------------------------
-BOOL DdeTopic::StartAdviseLoop()
+sal_Bool DdeTopic::StartAdviseLoop()
{
- return FALSE;
+ return sal_False;
}
// --- DdeTopic::StopAdviseLoop() ----------------------------------
-BOOL DdeTopic::StopAdviseLoop()
+sal_Bool DdeTopic::StopAdviseLoop()
{
- return FALSE;
+ return sal_False;
}
// --- DdeItem::DdeItem() ------------------------------------------
@@ -859,17 +859,17 @@ void DdeItem::NotifyClient()
// --- DdeItem::IncMonitor() ------------------------------------------
-void DdeItem::IncMonitor( ULONG nHCnv )
+void DdeItem::IncMonitor( sal_uLong nHCnv )
{
if( !pImpData )
{
pImpData = new DdeItemImp;
if( DDEGETPUTITEM == nType )
- ((DdeGetPutItem*)this)->AdviseLoop( TRUE );
+ ((DdeGetPutItem*)this)->AdviseLoop( sal_True );
}
else
{
- for( USHORT n = pImpData->Count(); n; )
+ for( sal_uInt16 n = pImpData->Count(); n; )
if( (*pImpData)[ --n ].nHCnv == nHCnv )
{
++(*pImpData)[ n ].nHCnv;
@@ -882,12 +882,12 @@ void DdeItem::IncMonitor( ULONG nHCnv )
// --- DdeItem::DecMonitor() ------------------------------------------
-void DdeItem::DecMonitor( ULONG nHCnv )
+void DdeItem::DecMonitor( sal_uLong nHCnv )
{
if( pImpData )
{
DdeItemImpData* pData = (DdeItemImpData*)pImpData->GetData();
- for( USHORT n = pImpData->Count(); n; --n, ++pData )
+ for( sal_uInt16 n = pImpData->Count(); n; --n, ++pData )
if( pData->nHCnv == nHCnv )
{
if( !pData->nCnt || !--pData->nCnt )
@@ -898,7 +898,7 @@ void DdeItem::DecMonitor( ULONG nHCnv )
{
delete pImpData, pImpData = 0;
if( DDEGETPUTITEM == nType )
- ((DdeGetPutItem*)this)->AdviseLoop( FALSE );
+ ((DdeGetPutItem*)this)->AdviseLoop( sal_False );
}
}
return ;
@@ -912,7 +912,7 @@ short DdeItem::GetLinks()
{
short nCnt = 0;
if( pImpData )
- for( USHORT n = pImpData->Count(); n; )
+ for( sal_uInt16 n = pImpData->Count(); n; )
nCnt = nCnt + (*pImpData)[ --n ].nCnt;
return nCnt;
}
@@ -944,21 +944,21 @@ DdeGetPutItem::DdeGetPutItem( const DdeItem& rItem )
// --- DdeGetPutData::Get() ----------------------------------------
-DdeData* DdeGetPutItem::Get( ULONG )
+DdeData* DdeGetPutItem::Get( sal_uLong )
{
return 0;
}
// --- DdeGetPutData::Put() ----------------------------------------
-BOOL DdeGetPutItem::Put( const DdeData* )
+sal_Bool DdeGetPutItem::Put( const DdeData* )
{
- return FALSE;
+ return sal_False;
}
// --- DdeGetPutData::AdviseLoop() ---------------------------------
-void DdeGetPutItem::AdviseLoop( BOOL )
+void DdeGetPutItem::AdviseLoop( sal_Bool )
{
}
@@ -1023,7 +1023,7 @@ String DdeService::Formats()
s += '\t';
p = buf;
- switch( (USHORT)f )
+ switch( (sal_uInt16)f )
{
case CF_TEXT:
p = reinterpret_cast<LPCTSTR>(String::CreateFromAscii("TEXT").GetBuffer());
@@ -1070,9 +1070,9 @@ String DdeService::Status()
// --- DdeService::IsBusy() ----------------------------------------
-BOOL __EXPORT DdeService::IsBusy()
+sal_Bool __EXPORT DdeService::IsBusy()
{
- return FALSE;
+ return sal_False;
}
// --- DdeService::GetHelp() ----------------------------------------
@@ -1082,14 +1082,14 @@ String __EXPORT DdeService::GetHelp()
return String();
}
-BOOL DdeTopic::MakeItem( const String& )
+sal_Bool DdeTopic::MakeItem( const String& )
{
- return FALSE;
+ return sal_False;
}
-BOOL DdeService::MakeTopic( const String& )
+sal_Bool DdeService::MakeTopic( const String& )
{
- return FALSE;
+ return sal_False;
}
String DdeService::SysTopicGet( const String& )
@@ -1097,8 +1097,8 @@ String DdeService::SysTopicGet( const String& )
return String();
}
-BOOL DdeService::SysTopicExecute( const String* )
+sal_Bool DdeService::SysTopicExecute( const String* )
{
- return FALSE;
+ return sal_False;
}
diff --git a/svl/source/svsql/converter.cxx b/svl/source/svsql/converter.cxx
index 3b162cecadee..2f6fa9f8c389 100644
--- a/svl/source/svsql/converter.cxx
+++ b/svl/source/svsql/converter.cxx
@@ -29,12 +29,12 @@
#include "precompiled_svl.hxx"
#include <svl/converter.hxx>
-INT32 SvDbaseConverter::ConvertPrecisionToDbase(INT32 _nLen, INT32 _nScale)
+sal_Int32 SvDbaseConverter::ConvertPrecisionToDbase(sal_Int32 _nLen, sal_Int32 _nScale)
{
return _nScale ? _nLen +2 : _nLen +1;
}
//------------------------------------------------------------------------
-INT32 SvDbaseConverter::ConvertPrecisionToOdbc(INT32 _nLen, INT32 _nScale)
+sal_Int32 SvDbaseConverter::ConvertPrecisionToOdbc(sal_Int32 _nLen, sal_Int32 _nScale)
{
return _nScale ? _nLen -2 : _nLen -1;
}
diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx
index fa5eca964a8c..af22c04c79ff 100644
--- a/svl/source/undo/undo.cxx
+++ b/svl/source/undo/undo.cxx
@@ -30,10 +30,16 @@
#include <com/sun/star/uno/Exception.hpp>
+#include <comphelper/flagguard.hxx>
#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
#include <svl/undo.hxx>
+#include <vector>
+#include <list>
+#include <limits>
+
using ::com::sun::star::uno::Exception;
// STATIC DATA -----------------------------------------------------------
@@ -55,14 +61,20 @@ SfxRepeatTarget::~SfxRepeatTarget()
//------------------------------------------------------------------------
-BOOL SfxUndoAction::IsLinked()
+SfxUndoContext::~SfxUndoContext()
+{
+}
+
+//------------------------------------------------------------------------
+
+sal_Bool SfxUndoAction::IsLinked()
{
return bLinked;
}
//------------------------------------------------------------------------
-void SfxUndoAction::SetLinked( BOOL bIsLinked )
+void SfxUndoAction::SetLinked( sal_Bool bIsLinked )
{
bLinked = bIsLinked;
}
@@ -79,15 +91,15 @@ SfxUndoAction::~SfxUndoAction()
SfxUndoAction::SfxUndoAction()
{
DBG_CTOR(SfxUndoAction, 0);
- SetLinked( FALSE );
+ SetLinked( sal_False );
}
//------------------------------------------------------------------------
-BOOL SfxUndoAction::Merge( SfxUndoAction * )
+sal_Bool SfxUndoAction::Merge( SfxUndoAction * )
{
DBG_CHKTHIS(SfxUndoAction, 0);
- return FALSE;
+ return sal_False;
}
//------------------------------------------------------------------------
@@ -101,7 +113,7 @@ XubString SfxUndoAction::GetComment() const
//------------------------------------------------------------------------
-USHORT SfxUndoAction::GetId() const
+sal_uInt16 SfxUndoAction::GetId() const
{
DBG_CHKTHIS(SfxUndoAction, 0);
return 0;
@@ -117,7 +129,6 @@ XubString SfxUndoAction::GetRepeatComment(SfxRepeatTarget&) const
//------------------------------------------------------------------------
-
void SfxUndoAction::Undo()
{
// die sind nur konzeptuell pure virtual
@@ -126,6 +137,14 @@ void SfxUndoAction::Undo()
//------------------------------------------------------------------------
+void SfxUndoAction::UndoWithContext( SfxUndoContext& i_context )
+{
+ (void)i_context;
+ Undo();
+}
+
+//------------------------------------------------------------------------
+
void SfxUndoAction::Redo()
{
// die sind nur konzeptuell pure virtual
@@ -134,6 +153,14 @@ void SfxUndoAction::Redo()
//------------------------------------------------------------------------
+void SfxUndoAction::RedoWithContext( SfxUndoContext& i_context )
+{
+ (void)i_context;
+ Redo();
+}
+
+//------------------------------------------------------------------------
+
void SfxUndoAction::Repeat(SfxRepeatTarget&)
{
// die sind nur konzeptuell pure virtual
@@ -143,213 +170,561 @@ void SfxUndoAction::Repeat(SfxRepeatTarget&)
//------------------------------------------------------------------------
-BOOL SfxUndoAction::CanRepeat(SfxRepeatTarget&) const
+sal_Bool SfxUndoAction::CanRepeat(SfxRepeatTarget&) const
{
- return TRUE;
+ return sal_True;
}
//========================================================================
+typedef ::std::vector< SfxUndoListener* > UndoListeners;
+
+struct SVL_DLLPRIVATE SfxUndoManager_Data
+{
+ ::osl::Mutex aMutex;
+ SfxUndoArray* pUndoArray;
+ SfxUndoArray* pActUndoArray;
+ SfxUndoArray* pFatherUndoArray;
+
+ sal_Int32 mnLockCount;
+ sal_Int32 mnMarks;
+ sal_Int32 mnEmptyMark;
+ bool mbDoing;
+ bool mbClearUntilTopLevel;
+
+ UndoListeners aListeners;
+
+ SfxUndoManager_Data( size_t i_nMaxUndoActionCount )
+ :pUndoArray( new SfxUndoArray( i_nMaxUndoActionCount ) )
+ ,pActUndoArray( NULL )
+ ,pFatherUndoArray( NULL )
+ ,mnLockCount( 0 )
+ ,mnMarks( 0 )
+ ,mnEmptyMark(MARK_INVALID)
+ ,mbDoing( false )
+ ,mbClearUntilTopLevel( false )
+ {
+ pActUndoArray = pUndoArray;
+ }
+
+ ~SfxUndoManager_Data()
+ {
+ delete pUndoArray;
+ }
+};
+
+//========================================================================
+
+namespace svl { namespace undo { namespace impl
+{
+ //--------------------------------------------------------------------
+ class SVL_DLLPRIVATE LockGuard
+ {
+ public:
+ LockGuard( SfxUndoManager& i_manager )
+ :m_manager( i_manager )
+ {
+ m_manager.ImplEnableUndo_Lock( false );
+ }
+
+ ~LockGuard()
+ {
+ m_manager.ImplEnableUndo_Lock( true );
+ }
+
+ private:
+ SfxUndoManager& m_manager;
+ };
+
+ //--------------------------------------------------------------------
+ typedef void ( SfxUndoListener::*UndoListenerVoidMethod )();
+ typedef void ( SfxUndoListener::*UndoListenerStringMethod )( const String& );
+
+ //--------------------------------------------------------------------
+ struct SVL_DLLPRIVATE NotifyUndoListener : public ::std::unary_function< SfxUndoListener*, void >
+ {
+ NotifyUndoListener()
+ :m_notificationMethod( NULL )
+ ,m_altNotificationMethod( NULL )
+ ,m_sActionComment()
+ {
+ }
+
+ NotifyUndoListener( UndoListenerVoidMethod i_notificationMethod )
+ :m_notificationMethod( i_notificationMethod )
+ ,m_altNotificationMethod( NULL )
+ ,m_sActionComment()
+ {
+ }
+
+ NotifyUndoListener( UndoListenerStringMethod i_notificationMethod, const String& i_actionComment )
+ :m_notificationMethod( NULL )
+ ,m_altNotificationMethod( i_notificationMethod )
+ ,m_sActionComment( i_actionComment )
+ {
+ }
+
+ bool is() const
+ {
+ return ( m_notificationMethod != NULL ) || ( m_altNotificationMethod != NULL );
+ }
+
+ void operator()( SfxUndoListener* i_listener ) const
+ {
+ OSL_PRECOND( is(), "NotifyUndoListener: this will crash!" );
+ if ( m_altNotificationMethod != NULL )
+ {
+ ( i_listener->*m_altNotificationMethod )( m_sActionComment );
+ }
+ else
+ {
+ ( i_listener->*m_notificationMethod )();
+ }
+ }
+
+ private:
+ UndoListenerVoidMethod m_notificationMethod;
+ UndoListenerStringMethod m_altNotificationMethod;
+ String m_sActionComment;
+ };
+
+ //--------------------------------------------------------------------
+ class SVL_DLLPRIVATE UndoManagerGuard
+ {
+ public:
+ UndoManagerGuard( SfxUndoManager_Data& i_managerData )
+ :m_rManagerData( i_managerData )
+ ,m_aGuard( i_managerData.aMutex )
+ ,m_notifiers()
+ {
+ }
+
+ ~UndoManagerGuard();
+
+ void clear()
+ {
+ m_aGuard.clear();
+ }
+
+ void reset()
+ {
+ m_aGuard.reset();
+ }
+
+ void cancelNotifications()
+ {
+ m_notifiers.clear();
+ }
+
+ /** marks the given Undo action for deletion
+
+ The Undo action will be put into a list, whose members will be deleted from within the destructor of the
+ UndoManagerGuard. This deletion will happen without the UndoManager's mutex locked.
+ */
+ void markForDeletion( SfxUndoAction* i_action )
+ {
+ // remember
+ if ( i_action )
+ m_aUndoActionsCleanup.push_back( i_action );
+ }
+
+ /** schedules the given SfxUndoListener method to be called for all registered listeners.
+
+ The notification will happen after the Undo manager's mutex has been released, and after all pending
+ deletions of Undo actions are done.
+ */
+ void scheduleNotification( UndoListenerVoidMethod i_notificationMethod )
+ {
+ m_notifiers.push_back( NotifyUndoListener( i_notificationMethod ) );
+ }
+
+ void scheduleNotification( UndoListenerStringMethod i_notificationMethod, const String& i_actionComment )
+ {
+ m_notifiers.push_back( NotifyUndoListener( i_notificationMethod, i_actionComment ) );
+ }
+
+ private:
+ SfxUndoManager_Data& m_rManagerData;
+ ::osl::ResettableMutexGuard m_aGuard;
+ ::std::list< SfxUndoAction* > m_aUndoActionsCleanup;
+ ::std::list< NotifyUndoListener > m_notifiers;
+ };
+
+ UndoManagerGuard::~UndoManagerGuard()
+ {
+ // copy members
+ UndoListeners aListenersCopy( m_rManagerData.aListeners );
+
+ // release mutex
+ m_aGuard.clear();
+
+ // delete all actions
+ while ( !m_aUndoActionsCleanup.empty() )
+ {
+ SfxUndoAction* pAction = m_aUndoActionsCleanup.front();
+ m_aUndoActionsCleanup.pop_front();
+ try
+ {
+ delete pAction;
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+
+ // handle scheduled notification
+ for ( ::std::list< NotifyUndoListener >::const_iterator notifier = m_notifiers.begin();
+ notifier != m_notifiers.end();
+ ++notifier
+ )
+ {
+ if ( notifier->is() )
+ ::std::for_each( aListenersCopy.begin(), aListenersCopy.end(), *notifier );
+ }
+ }
+} } }
+
+using namespace ::svl::undo::impl;
+
+//========================================================================
+
+SfxUndoManager::SfxUndoManager( size_t nMaxUndoActionCount )
+ :m_pData( new SfxUndoManager_Data( nMaxUndoActionCount ) )
+{
+}
-SfxUndoManager::SfxUndoManager( USHORT nMaxUndoActionCount )
- : pFatherUndoArray(0)
- , mbUndoEnabled( true )
+//------------------------------------------------------------------------
+
+SfxUndoManager::~SfxUndoManager()
{
- pUndoArray=new SfxUndoArray(nMaxUndoActionCount);
- pActUndoArray=pUndoArray;
+ UndoListeners aListenersCopy;
+ {
+ UndoManagerGuard aGuard( *m_pData );
+ aListenersCopy = m_pData->aListeners;
+ }
+ ::std::for_each( aListenersCopy.begin(), aListenersCopy.end(),
+ NotifyUndoListener( &SfxUndoListener::undoManagerDying ) );
}
//------------------------------------------------------------------------
+void SfxUndoManager::EnableUndo( bool i_enable )
+{
+ UndoManagerGuard aGuard( *m_pData );
+ ImplEnableUndo_Lock( i_enable );
-SfxUndoManager::~SfxUndoManager()
+}
+
+//------------------------------------------------------------------------
+
+void SfxUndoManager::ImplEnableUndo_Lock( bool const i_enable )
{
- delete pUndoArray;
+ if ( !i_enable )
+ ++m_pData->mnLockCount;
+ else
+ {
+ OSL_PRECOND( m_pData->mnLockCount > 0, "SfxUndoManager::ImplEnableUndo_NoNotify: not disabled, so why enabling?" );
+ if ( m_pData->mnLockCount > 0 )
+ --m_pData->mnLockCount;
+ }
}
//------------------------------------------------------------------------
-void SfxUndoManager::EnableUndo( bool bEnable )
+bool SfxUndoManager::IsUndoEnabled() const
{
- mbUndoEnabled = bEnable;
+ UndoManagerGuard aGuard( *m_pData );
+ return ImplIsUndoEnabled_Lock();
}
//------------------------------------------------------------------------
+bool SfxUndoManager::ImplIsUndoEnabled_Lock() const
+{
+ return m_pData->mnLockCount == 0;
+}
+
+//------------------------------------------------------------------------
-void SfxUndoManager::SetMaxUndoActionCount( USHORT nMaxUndoActionCount )
+void SfxUndoManager::SetMaxUndoActionCount( size_t nMaxUndoActionCount )
{
+ UndoManagerGuard aGuard( *m_pData );
+
// Remove entries from the pActUndoArray when we have to reduce
// the number of entries due to a lower nMaxUndoActionCount.
// Both redo and undo action entries will be removed until we reached the
// new nMaxUndoActionCount.
- long nNumToDelete = pActUndoArray->aUndoActions.Count() - nMaxUndoActionCount;
- if ( nNumToDelete > 0 )
+ long nNumToDelete = m_pData->pActUndoArray->aUndoActions.size() - nMaxUndoActionCount;
+ while ( nNumToDelete > 0 )
{
- while ( nNumToDelete > 0 )
+ size_t nPos = m_pData->pActUndoArray->aUndoActions.size();
+ if ( nPos > m_pData->pActUndoArray->nCurUndoAction )
{
- USHORT nPos = pActUndoArray->aUndoActions.Count();
- if ( nPos > pActUndoArray->nCurUndoAction )
+ SfxUndoAction* pAction = m_pData->pActUndoArray->aUndoActions[nPos-1].pAction;
+ if ( !pAction->IsLinked() )
{
- if ( !pActUndoArray->aUndoActions[nPos-1]->IsLinked() )
- {
- delete pActUndoArray->aUndoActions[nPos-1];
- pActUndoArray->aUndoActions.Remove( nPos-1 );
- --nNumToDelete;
- }
+ aGuard.markForDeletion( pAction );
+ m_pData->pActUndoArray->aUndoActions.Remove( nPos-1 );
+ --nNumToDelete;
}
+ }
- if ( nNumToDelete > 0 && pActUndoArray->nCurUndoAction > 0 )
+ if ( nNumToDelete > 0 && m_pData->pActUndoArray->nCurUndoAction > 0 )
+ {
+ SfxUndoAction* pAction = m_pData->pActUndoArray->aUndoActions[0].pAction;
+ if ( !pAction->IsLinked() )
{
- if ( !pActUndoArray->aUndoActions[0]->IsLinked() )
- {
- delete pActUndoArray->aUndoActions[0];
- pActUndoArray->aUndoActions.Remove(0);
- --pActUndoArray->nCurUndoAction;
- --nNumToDelete;
- }
+ aGuard.markForDeletion( pAction );
+ m_pData->pActUndoArray->aUndoActions.Remove(0);
+ --m_pData->pActUndoArray->nCurUndoAction;
+ --nNumToDelete;
}
-
- if ( nPos == pActUndoArray->aUndoActions.Count() )
- break; // Cannot delete more entries
}
+
+ if ( nPos == m_pData->pActUndoArray->aUndoActions.size() )
+ break; // Cannot delete more entries
}
- pActUndoArray->nMaxUndoActions = nMaxUndoActionCount;
+ m_pData->pActUndoArray->nMaxUndoActions = nMaxUndoActionCount;
}
//------------------------------------------------------------------------
-USHORT SfxUndoManager::GetMaxUndoActionCount() const
+size_t SfxUndoManager::GetMaxUndoActionCount() const
{
- return pActUndoArray->nMaxUndoActions;
+ UndoManagerGuard aGuard( *m_pData );
+ return m_pData->pActUndoArray->nMaxUndoActions;
}
//------------------------------------------------------------------------
-void SfxUndoManager::Clear()
+void SfxUndoManager::ImplClearCurrentLevel_NoNotify( UndoManagerGuard& i_guard )
{
- while ( pActUndoArray->aUndoActions.Count() )
+ // clear array
+ while ( !m_pData->pActUndoArray->aUndoActions.empty() )
{
- SfxUndoAction *pAction=
- pActUndoArray->aUndoActions[pActUndoArray->aUndoActions.Count() - 1];
- pActUndoArray->aUndoActions.Remove( pActUndoArray->aUndoActions.Count() - 1 );
- delete pAction;
+ size_t deletePos = m_pData->pActUndoArray->aUndoActions.size() - 1;
+ SfxUndoAction* pAction = m_pData->pActUndoArray->aUndoActions[ deletePos ].pAction;
+ i_guard.markForDeletion( pAction );
+ m_pData->pActUndoArray->aUndoActions.Remove( deletePos );
}
- pActUndoArray->nCurUndoAction = 0;
+ m_pData->pActUndoArray->nCurUndoAction = 0;
+
+ m_pData->mnMarks = 0;
+ m_pData->mnEmptyMark = MARK_INVALID;
}
//------------------------------------------------------------------------
-void SfxUndoManager::ClearRedo()
+void SfxUndoManager::Clear()
{
- while ( pActUndoArray->aUndoActions.Count() > pActUndoArray->nCurUndoAction )
- {
- SfxUndoAction *pAction=
- pActUndoArray->aUndoActions[pActUndoArray->aUndoActions.Count() - 1];
- pActUndoArray->aUndoActions.Remove( pActUndoArray->aUndoActions.Count() - 1 );
- delete pAction;
- }
+ UndoManagerGuard aGuard( *m_pData );
+
+ OSL_ENSURE( !ImplIsInListAction_Lock(), "SfxUndoManager::Clear: suspicious call - do you really wish to clear the current level?" );
+ ImplClearCurrentLevel_NoNotify( aGuard );
+
+ // notify listeners
+ aGuard.scheduleNotification( &SfxUndoListener::cleared );
}
//------------------------------------------------------------------------
-void SfxUndoManager::AddUndoAction( SfxUndoAction *pAction, BOOL bTryMerge )
+void SfxUndoManager::ClearAllLevels()
{
- if( mbUndoEnabled )
+ UndoManagerGuard aGuard( *m_pData );
+ ImplClearCurrentLevel_NoNotify( aGuard );
+
+ if ( ImplIsInListAction_Lock() )
+ {
+ m_pData->mbClearUntilTopLevel = true;
+ }
+ else
{
- // Redo-Actions loeschen
- for ( USHORT nPos = pActUndoArray->aUndoActions.Count();
- nPos > pActUndoArray->nCurUndoAction; --nPos )
- delete pActUndoArray->aUndoActions[nPos-1];
+ aGuard.scheduleNotification( &SfxUndoListener::cleared );
+ }
+}
- pActUndoArray->aUndoActions.Remove(
- pActUndoArray->nCurUndoAction,
- pActUndoArray->aUndoActions.Count() - pActUndoArray->nCurUndoAction );
+//------------------------------------------------------------------------
- if ( pActUndoArray->nMaxUndoActions )
- {
- SfxUndoAction *pTmpAction = pActUndoArray->nCurUndoAction ?
- pActUndoArray->aUndoActions[pActUndoArray->nCurUndoAction-1] : 0;
+void SfxUndoManager::ImplClearRedo_NoLock( bool const i_currentLevel )
+{
+ UndoManagerGuard aGuard( *m_pData );
+ ImplClearRedo( aGuard, i_currentLevel );
+}
- if ( !bTryMerge || !(pTmpAction && pTmpAction->Merge(pAction)) )
- {
- // auf Max-Anzahl anpassen
- if( pActUndoArray == pUndoArray )
- while( pActUndoArray->aUndoActions.Count() >=
- pActUndoArray->nMaxUndoActions &&
- !pActUndoArray->aUndoActions[0]->IsLinked() )
- {
- delete pActUndoArray->aUndoActions[0];
- pActUndoArray->aUndoActions.Remove(0);
- --pActUndoArray->nCurUndoAction;
- }
-
- // neue Action anh"angen
- const SfxUndoAction* pTemp = pAction;
- pActUndoArray->aUndoActions.Insert(
- pTemp, pActUndoArray->nCurUndoAction++ );
- return;
- }
- }
- }
- delete pAction;
+//------------------------------------------------------------------------
+
+void SfxUndoManager::ClearRedo()
+{
+ OSL_ENSURE( !IsInListAction(), "SfxUndoManager::ClearRedo: suspicious call - do you really wish to clear the current level?" );
+ ImplClearRedo_NoLock( CurrentLevel );
}
//------------------------------------------------------------------------
-USHORT SfxUndoManager::GetUndoActionCount() const
+void SfxUndoManager::Reset()
{
- return pActUndoArray->nCurUndoAction;
+ UndoManagerGuard aGuard( *m_pData );
+
+ // clear all locks
+ while ( !ImplIsUndoEnabled_Lock() )
+ ImplEnableUndo_Lock( true );
+
+ // cancel all list actions
+ while ( IsInListAction() )
+ ImplLeaveListAction( false, aGuard );
+
+ // clear both stacks
+ ImplClearCurrentLevel_NoNotify( aGuard );
+
+ // cancel the notifications scheduled by ImplLeaveListAction,
+ // as we want to do an own, dedicated notification
+ aGuard.cancelNotifications();
+
+ // schedule notification
+ aGuard.scheduleNotification( &SfxUndoListener::resetAll );
}
//------------------------------------------------------------------------
-XubString SfxUndoManager::GetUndoActionComment( USHORT nNo ) const
+void SfxUndoManager::ImplClearUndo( UndoManagerGuard& i_guard )
{
- DBG_ASSERT( nNo < pActUndoArray->nCurUndoAction, "svl::SfxUndoManager::GetUndoActionComment(), illegal id!" );
- if( nNo < pActUndoArray->nCurUndoAction )
+ while ( m_pData->pActUndoArray->nCurUndoAction > 0 )
{
- return pActUndoArray->aUndoActions[pActUndoArray->nCurUndoAction-1-nNo]->GetComment(); //!
+ SfxUndoAction* pUndoAction = m_pData->pActUndoArray->aUndoActions[0].pAction;
+ m_pData->pActUndoArray->aUndoActions.Remove( 0 );
+ i_guard.markForDeletion( pUndoAction );
+ --m_pData->pActUndoArray->nCurUndoAction;
}
- else
+ // TODO: notifications? We don't have clearedUndo, only cleared and clearedRedo at the SfxUndoListener
+}
+
+//------------------------------------------------------------------------
+
+void SfxUndoManager::ImplClearRedo( UndoManagerGuard& i_guard, bool const i_currentLevel )
+{
+ SfxUndoArray* pUndoArray = ( i_currentLevel == IUndoManager::CurrentLevel ) ? m_pData->pActUndoArray : m_pData->pUndoArray;
+
+ // clearance
+ while ( pUndoArray->aUndoActions.size() > pUndoArray->nCurUndoAction )
{
- XubString aEmpty;
- return aEmpty;
+ size_t deletePos = pUndoArray->aUndoActions.size() - 1;
+ SfxUndoAction* pAction = pUndoArray->aUndoActions[ deletePos ].pAction;
+ pUndoArray->aUndoActions.Remove( deletePos );
+ i_guard.markForDeletion( pAction );
}
+
+ // notification - only if the top level's stack was cleared
+ if ( i_currentLevel == IUndoManager::TopLevel )
+ i_guard.scheduleNotification( &SfxUndoListener::clearedRedo );
}
//------------------------------------------------------------------------
-USHORT SfxUndoManager::GetUndoActionId( USHORT nNo ) const
+bool SfxUndoManager::ImplAddUndoAction_NoNotify( SfxUndoAction *pAction, bool bTryMerge, bool bClearRedo, UndoManagerGuard& i_guard )
{
- DBG_ASSERT( nNo < pActUndoArray->nCurUndoAction, "svl::SfxUndoManager::GetUndoActionId(), illegal id!" );
- if( nNo < pActUndoArray->nCurUndoAction )
+ if ( !ImplIsUndoEnabled_Lock() || ( m_pData->pActUndoArray->nMaxUndoActions == 0 ) )
{
- return pActUndoArray->aUndoActions[pActUndoArray->nCurUndoAction-1-nNo]->GetId(); //!
+ i_guard.markForDeletion( pAction );
+ return false;
}
- else
+
+ // merge, if required
+ SfxUndoAction* pMergeWithAction = m_pData->pActUndoArray->nCurUndoAction ?
+ m_pData->pActUndoArray->aUndoActions[m_pData->pActUndoArray->nCurUndoAction-1].pAction : NULL;
+ if ( bTryMerge && ( !pMergeWithAction || !pMergeWithAction->Merge( pAction ) ) )
{
- return 0;
+ i_guard.markForDeletion( pAction );
+ return false;
+ }
+
+ // clear redo stack, if requested
+ if ( bClearRedo && ( ImplGetRedoActionCount_Lock( CurrentLevel ) > 0 ) )
+ ImplClearRedo( i_guard, IUndoManager::CurrentLevel );
+
+ // respect max number
+ if( m_pData->pActUndoArray == m_pData->pUndoArray )
+ {
+ while( m_pData->pActUndoArray->aUndoActions.size() >=
+ m_pData->pActUndoArray->nMaxUndoActions &&
+ !m_pData->pActUndoArray->aUndoActions[0].pAction->IsLinked() )
+ {
+ i_guard.markForDeletion( m_pData->pActUndoArray->aUndoActions[0].pAction );
+ m_pData->pActUndoArray->aUndoActions.Remove(0);
+ --m_pData->pActUndoArray->nCurUndoAction;
+ }
}
+
+ // append new action
+ m_pData->pActUndoArray->aUndoActions.Insert( pAction, m_pData->pActUndoArray->nCurUndoAction++ );
+ return true;
}
//------------------------------------------------------------------------
-SfxUndoAction* SfxUndoManager::GetUndoAction( USHORT nNo ) const
+void SfxUndoManager::AddUndoAction( SfxUndoAction *pAction, sal_Bool bTryMerge )
{
- DBG_ASSERT( nNo < pActUndoArray->nCurUndoAction, "svl::SfxUndoManager::GetUndoAction(), illegal id!" );
- if( nNo < pActUndoArray->nCurUndoAction )
+ UndoManagerGuard aGuard( *m_pData );
+
+ // add
+ if ( ImplAddUndoAction_NoNotify( pAction, bTryMerge, true, aGuard ) )
{
- return pActUndoArray->aUndoActions[pActUndoArray->nCurUndoAction-1-nNo]; //!
+ // notify listeners
+ aGuard.scheduleNotification( &SfxUndoListener::undoActionAdded, pAction->GetComment() );
}
- else
+}
+
+//------------------------------------------------------------------------
+
+size_t SfxUndoManager::GetUndoActionCount( bool const i_currentLevel ) const
+{
+ UndoManagerGuard aGuard( *m_pData );
+ const SfxUndoArray* pUndoArray = i_currentLevel ? m_pData->pActUndoArray : m_pData->pUndoArray;
+ return pUndoArray->nCurUndoAction;
+}
+
+//------------------------------------------------------------------------
+
+XubString SfxUndoManager::GetUndoActionComment( size_t nNo, bool const i_currentLevel ) const
+{
+ UndoManagerGuard aGuard( *m_pData );
+
+ String sComment;
+ const SfxUndoArray* pUndoArray = i_currentLevel ? m_pData->pActUndoArray : m_pData->pUndoArray;
+ DBG_ASSERT( nNo < pUndoArray->nCurUndoAction, "svl::SfxUndoManager::GetUndoActionComment: illegal index!" );
+ if( nNo < pUndoArray->nCurUndoAction )
{
- return 0;
+ sComment = pUndoArray->aUndoActions[ pUndoArray->nCurUndoAction - 1 - nNo ].pAction->GetComment();
}
+ return sComment;
+}
+
+//------------------------------------------------------------------------
+
+sal_uInt16 SfxUndoManager::GetUndoActionId() const
+{
+ UndoManagerGuard aGuard( *m_pData );
+
+ DBG_ASSERT( m_pData->pActUndoArray->nCurUndoAction > 0, "svl::SfxUndoManager::GetUndoActionId(), illegal id!" );
+ if ( m_pData->pActUndoArray->nCurUndoAction == 0 )
+ return NULL;
+ return m_pData->pActUndoArray->aUndoActions[m_pData->pActUndoArray->nCurUndoAction-1].pAction->GetId();
+}
+
+//------------------------------------------------------------------------
+
+SfxUndoAction* SfxUndoManager::GetUndoAction( size_t nNo ) const
+{
+ UndoManagerGuard aGuard( *m_pData );
+
+ DBG_ASSERT( nNo < m_pData->pActUndoArray->nCurUndoAction, "svl::SfxUndoManager::GetUndoAction(), illegal id!" );
+ if( nNo >= m_pData->pActUndoArray->nCurUndoAction )
+ return NULL;
+ return m_pData->pActUndoArray->aUndoActions[m_pData->pActUndoArray->nCurUndoAction-1-nNo].pAction;
}
//------------------------------------------------------------------------
@@ -357,196 +732,284 @@ SfxUndoAction* SfxUndoManager::GetUndoAction( USHORT nNo ) const
/** clears the redo stack and removes the top undo action */
void SfxUndoManager::RemoveLastUndoAction()
{
- DBG_ASSERT( pActUndoArray->nCurUndoAction, "svl::SfxUndoManager::RemoveLastUndoAction(), no action to remove?!" );
- if( pActUndoArray->nCurUndoAction )
- {
- pActUndoArray->nCurUndoAction--;
+ UndoManagerGuard aGuard( *m_pData );
+
+ ENSURE_OR_RETURN_VOID( m_pData->pActUndoArray->nCurUndoAction, "svl::SfxUndoManager::RemoveLastUndoAction(), no action to remove?!" );
- // delete redo-actions and top action
- USHORT nPos;
- for ( nPos = pActUndoArray->aUndoActions.Count(); nPos > pActUndoArray->nCurUndoAction; --nPos )
- delete pActUndoArray->aUndoActions[nPos-1];
+ m_pData->pActUndoArray->nCurUndoAction--;
- pActUndoArray->aUndoActions.Remove(
- pActUndoArray->nCurUndoAction,
- pActUndoArray->aUndoActions.Count() - pActUndoArray->nCurUndoAction );
+ // delete redo-actions and top action
+ for ( size_t nPos = m_pData->pActUndoArray->aUndoActions.size(); nPos > m_pData->pActUndoArray->nCurUndoAction; --nPos )
+ {
+ aGuard.markForDeletion( m_pData->pActUndoArray->aUndoActions[nPos-1].pAction );
}
+
+ m_pData->pActUndoArray->aUndoActions.Remove(
+ m_pData->pActUndoArray->nCurUndoAction,
+ m_pData->pActUndoArray->aUndoActions.size() - m_pData->pActUndoArray->nCurUndoAction );
}
//------------------------------------------------------------------------
-BOOL SfxUndoManager::Undo( USHORT )
+bool SfxUndoManager::IsDoing() const
{
- bool bUndoWasEnabled = mbUndoEnabled;
- mbUndoEnabled = false;
+ UndoManagerGuard aGuard( *m_pData );
+ return m_pData->mbDoing;
+}
- BOOL bRet = FALSE;
+//------------------------------------------------------------------------
- try
- {
- DBG_ASSERT( pActUndoArray == pUndoArray, "svl::SfxUndoManager::Undo(), LeaveListAction() not yet called!" );
- if ( pActUndoArray->nCurUndoAction )
- {
- Undo( *pActUndoArray->aUndoActions[ --pActUndoArray->nCurUndoAction ] );
- bRet = TRUE;
- }
- }
- catch( Exception& e )
- {
- mbUndoEnabled = bUndoWasEnabled;
- throw e;
- }
- mbUndoEnabled = bUndoWasEnabled;
- return bRet;
+sal_Bool SfxUndoManager::Undo()
+{
+ return ImplUndo( NULL );
}
//------------------------------------------------------------------------
-void SfxUndoManager::Undo( SfxUndoAction &rAction )
+sal_Bool SfxUndoManager::UndoWithContext( SfxUndoContext& i_context )
{
- bool bUndoWasEnabled = mbUndoEnabled;
- mbUndoEnabled = false;
+ return ImplUndo( &i_context );
+}
+
+//------------------------------------------------------------------------
+
+sal_Bool SfxUndoManager::ImplUndo( SfxUndoContext* i_contextOrNull )
+{
+ UndoManagerGuard aGuard( *m_pData );
+ OSL_ENSURE( !IsDoing(), "SfxUndoManager::Undo: *nested* Undo/Redo actions? How this?" );
+
+ ::comphelper::FlagGuard aDoingGuard( m_pData->mbDoing );
+ LockGuard aLockGuard( *this );
+
+ if ( ImplIsInListAction_Lock() )
+ {
+ OSL_ENSURE( false, "SfxUndoManager::Undo: not possible when within a list action!" );
+ return sal_False;
+ }
+
+ if ( m_pData->pActUndoArray->nCurUndoAction == 0 )
+ {
+ OSL_ENSURE( false, "SfxUndoManager::Undo: undo stack is empty!" );
+ return sal_False;
+ }
+
+ SfxUndoAction* pAction = m_pData->pActUndoArray->aUndoActions[ --m_pData->pActUndoArray->nCurUndoAction ].pAction;
+ const String sActionComment = pAction->GetComment();
try
{
- rAction.Undo();
+ // clear the guard/mutex before calling into the SfxUndoAction - this can be an extension-implemented UNO component
+ // nowadays ...
+ aGuard.clear();
+ if ( i_contextOrNull != NULL )
+ pAction->UndoWithContext( *i_contextOrNull );
+ else
+ pAction->Undo();
+ aGuard.reset();
}
- catch( Exception& e )
+ catch( ... )
{
- mbUndoEnabled = bUndoWasEnabled;
- throw e;
+ aGuard.reset();
+
+ // in theory, somebody might have tampered with all of *m_pData while the mutex was unlocked. So, see if
+ // we still find pAction in our current Undo array
+ size_t nCurAction = 0;
+ while ( nCurAction < m_pData->pActUndoArray->aUndoActions.size() )
+ {
+ if ( m_pData->pActUndoArray->aUndoActions[ nCurAction++ ].pAction == pAction )
+ {
+ // the Undo action is still there ...
+ // assume the error is a permanent failure, and clear the Undo stack
+ ImplClearUndo( aGuard );
+ throw;
+ }
+ }
+ OSL_ENSURE( false, "SfxUndoManager::Undo: can't clear the Undo stack after the failure - some other party was faster ..." );
+ throw;
}
- mbUndoEnabled = bUndoWasEnabled;
+ aGuard.scheduleNotification( &SfxUndoListener::actionUndone, sActionComment );
+
+ return sal_True;
}
//------------------------------------------------------------------------
-USHORT SfxUndoManager::GetRedoActionCount() const
+size_t SfxUndoManager::GetRedoActionCount( bool const i_currentLevel ) const
{
- return pActUndoArray->aUndoActions.Count() - pActUndoArray->nCurUndoAction; //!
+ UndoManagerGuard aGuard( *m_pData );
+ return ImplGetRedoActionCount_Lock( i_currentLevel );
}
//------------------------------------------------------------------------
-XubString SfxUndoManager::GetRedoActionComment( USHORT nNo ) const
+size_t SfxUndoManager::ImplGetRedoActionCount_Lock( bool const i_currentLevel ) const
{
- return pActUndoArray->aUndoActions[pActUndoArray->nCurUndoAction+nNo]->GetComment(); //!
+ const SfxUndoArray* pUndoArray = i_currentLevel ? m_pData->pActUndoArray : m_pData->pUndoArray;
+ return pUndoArray->aUndoActions.size() - pUndoArray->nCurUndoAction;
}
//------------------------------------------------------------------------
-USHORT SfxUndoManager::GetRedoActionId( USHORT nNo ) const
+XubString SfxUndoManager::GetRedoActionComment( size_t nNo, bool const i_currentLevel ) const
{
- return pActUndoArray->aUndoActions[pActUndoArray->nCurUndoAction+nNo]->GetId(); //!
+ UndoManagerGuard aGuard( *m_pData );
+ const SfxUndoArray* pUndoArray = i_currentLevel ? m_pData->pActUndoArray : m_pData->pUndoArray;
+ return pUndoArray->aUndoActions[ pUndoArray->nCurUndoAction + nNo ].pAction->GetComment();
}
//------------------------------------------------------------------------
-BOOL SfxUndoManager::Redo( USHORT )
+sal_Bool SfxUndoManager::Redo()
{
- bool bUndoWasEnabled = mbUndoEnabled;
- mbUndoEnabled = false;
-
- BOOL bRet = FALSE;
+ return ImplRedo( NULL );
+}
- try
- {
- if ( pActUndoArray->aUndoActions.Count() > pActUndoArray->nCurUndoAction )
- {
- Redo( *pActUndoArray->aUndoActions[pActUndoArray->nCurUndoAction++] );
- bRet = TRUE;
- }
- }
- catch( Exception& e )
- {
- mbUndoEnabled = bUndoWasEnabled;
- throw e;
- }
+//------------------------------------------------------------------------
- mbUndoEnabled = bUndoWasEnabled;
- return bRet;
+sal_Bool SfxUndoManager::RedoWithContext( SfxUndoContext& i_context )
+{
+ return ImplRedo( &i_context );
}
//------------------------------------------------------------------------
-void SfxUndoManager::Redo( SfxUndoAction &rAction )
+sal_Bool SfxUndoManager::ImplRedo( SfxUndoContext* i_contextOrNull )
{
- bool bUndoWasEnabled = mbUndoEnabled;
- mbUndoEnabled = false;
+ UndoManagerGuard aGuard( *m_pData );
+ OSL_ENSURE( !IsDoing(), "SfxUndoManager::Redo: *nested* Undo/Redo actions? How this?" );
+
+ ::comphelper::FlagGuard aDoingGuard( m_pData->mbDoing );
+ LockGuard aLockGuard( *this );
+
+ if ( ImplIsInListAction_Lock() )
+ {
+ OSL_ENSURE( false, "SfxUndoManager::Redo: not possible when within a list action!" );
+ return sal_False;
+ }
+
+ if ( m_pData->pActUndoArray->nCurUndoAction >= m_pData->pActUndoArray->aUndoActions.size() )
+ {
+ OSL_ENSURE( false, "SfxUndoManager::Redo: redo stack is empty!" );
+ return sal_False;
+ }
+ SfxUndoAction* pAction = m_pData->pActUndoArray->aUndoActions[ m_pData->pActUndoArray->nCurUndoAction++ ].pAction;
+ const String sActionComment = pAction->GetComment();
try
{
- rAction.Redo();
+ // clear the guard/mutex before calling into the SfxUndoAction - this can be a extension-implemented UNO component
+ // nowadays ...
+ aGuard.clear();
+ if ( i_contextOrNull != NULL )
+ pAction->RedoWithContext( *i_contextOrNull );
+ else
+ pAction->Redo();
+ aGuard.reset();
}
- catch( Exception& e )
+ catch( ... )
{
- mbUndoEnabled = bUndoWasEnabled;
- throw e;
+ aGuard.reset();
+
+ // in theory, somebody might have tampered with all of *m_pData while the mutex was unlocked. So, see if
+ // we still find pAction in our current Undo array
+ size_t nCurAction = 0;
+ while ( nCurAction < m_pData->pActUndoArray->aUndoActions.size() )
+ {
+ if ( m_pData->pActUndoArray->aUndoActions[ nCurAction ].pAction == pAction )
+ {
+ // the Undo action is still there ...
+ // assume the error is a permanent failure, and clear the Undo stack
+ ImplClearRedo( aGuard, IUndoManager::CurrentLevel );
+ throw;
+ }
+ ++nCurAction;
+ }
+ OSL_ENSURE( false, "SfxUndoManager::Redo: can't clear the Undo stack after the failure - some other party was faster ..." );
+ throw;
}
- mbUndoEnabled = bUndoWasEnabled;
+ aGuard.scheduleNotification( &SfxUndoListener::actionRedone, sActionComment );
+
+ return sal_True;
}
//------------------------------------------------------------------------
-USHORT SfxUndoManager::GetRepeatActionCount() const
+size_t SfxUndoManager::GetRepeatActionCount() const
{
- return pActUndoArray->aUndoActions.Count();
+ UndoManagerGuard aGuard( *m_pData );
+ return m_pData->pActUndoArray->aUndoActions.size();
}
//------------------------------------------------------------------------
-XubString SfxUndoManager::GetRepeatActionComment( SfxRepeatTarget &rTarget, USHORT nNo ) const
+XubString SfxUndoManager::GetRepeatActionComment( SfxRepeatTarget &rTarget) const
{
- return pActUndoArray->aUndoActions[ pActUndoArray->aUndoActions.Count() - 1 - nNo ]
+ UndoManagerGuard aGuard( *m_pData );
+ return m_pData->pActUndoArray->aUndoActions[ m_pData->pActUndoArray->aUndoActions.size() - 1 ].pAction
->GetRepeatComment(rTarget);
}
//------------------------------------------------------------------------
-BOOL SfxUndoManager::Repeat( SfxRepeatTarget &rTarget, USHORT /*nFrom*/, USHORT /*nCount*/ )
+sal_Bool SfxUndoManager::Repeat( SfxRepeatTarget &rTarget )
{
- if ( pActUndoArray->aUndoActions.Count() )
+ UndoManagerGuard aGuard( *m_pData );
+ if ( !m_pData->pActUndoArray->aUndoActions.empty() )
{
- Repeat( rTarget, *pActUndoArray->aUndoActions[ pActUndoArray->aUndoActions.Count() - 1 ] );
- return TRUE;
+ SfxUndoAction* pAction = m_pData->pActUndoArray->aUndoActions[ m_pData->pActUndoArray->aUndoActions.size() - 1 ].pAction;
+ aGuard.clear();
+ if ( pAction->CanRepeat( rTarget ) )
+ pAction->Repeat( rTarget );
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//------------------------------------------------------------------------
-void SfxUndoManager::Repeat( SfxRepeatTarget &rTarget, SfxUndoAction &rAction )
+sal_Bool SfxUndoManager::CanRepeat( SfxRepeatTarget &rTarget ) const
{
- if ( rAction.CanRepeat(rTarget) )
- rAction.Repeat(rTarget);
+ UndoManagerGuard aGuard( *m_pData );
+ if ( !m_pData->pActUndoArray->aUndoActions.empty() )
+ {
+ size_t nActionNo = m_pData->pActUndoArray->aUndoActions.size() - 1;
+ return m_pData->pActUndoArray->aUndoActions[nActionNo].pAction->CanRepeat(rTarget);
+ }
+ return sal_False;
}
//------------------------------------------------------------------------
-BOOL SfxUndoManager::CanRepeat( SfxRepeatTarget &rTarget, SfxUndoAction &rAction ) const
+void SfxUndoManager::AddUndoListener( SfxUndoListener& i_listener )
{
- return rAction.CanRepeat(rTarget);
+ UndoManagerGuard aGuard( *m_pData );
+ m_pData->aListeners.push_back( &i_listener );
}
//------------------------------------------------------------------------
-BOOL SfxUndoManager::CanRepeat( SfxRepeatTarget &rTarget, USHORT nNo ) const
+void SfxUndoManager::RemoveUndoListener( SfxUndoListener& i_listener )
{
- if ( pActUndoArray->aUndoActions.Count() > nNo )
+ UndoManagerGuard aGuard( *m_pData );
+ for ( UndoListeners::iterator lookup = m_pData->aListeners.begin();
+ lookup != m_pData->aListeners.end();
+ ++lookup
+ )
{
- USHORT nActionNo = pActUndoArray->aUndoActions.Count() - 1 - nNo;
- return pActUndoArray->aUndoActions[nActionNo]->CanRepeat(rTarget);
+ if ( (*lookup) == &i_listener )
+ {
+ m_pData->aListeners.erase( lookup );
+ break;
+ }
}
-
- return FALSE;
}
//------------------------------------------------------------------------
void SfxUndoManager::EnterListAction(
- const XubString& rComment, const XubString &rRepeatComment, USHORT nId )
+ const XubString& rComment, const XubString &rRepeatComment, sal_uInt16 nId )
/* [Beschreibung]
@@ -554,74 +1017,275 @@ void SfxUndoManager::EnterListAction(
*/
{
- if( !mbUndoEnabled )
+ UndoManagerGuard aGuard( *m_pData );
+
+ if( !ImplIsUndoEnabled_Lock() )
return;
- if ( !pUndoArray->nMaxUndoActions )
+ if ( !m_pData->pUndoArray->nMaxUndoActions )
return;
- pFatherUndoArray=pActUndoArray;
- SfxListUndoAction *pAction=new SfxListUndoAction(
- rComment, rRepeatComment, nId, pActUndoArray);
- AddUndoAction( pAction );
- pActUndoArray=pAction;
+ m_pData->pFatherUndoArray = m_pData->pActUndoArray;
+ SfxListUndoAction* pAction = new SfxListUndoAction( rComment, rRepeatComment, nId, m_pData->pActUndoArray );
+ OSL_VERIFY( ImplAddUndoAction_NoNotify( pAction, false, false, aGuard ) );
+ // expected to succeed: all conditions under which it could fail should have been checked already
+ m_pData->pActUndoArray = pAction;
+
+ // notification
+ aGuard.scheduleNotification( &SfxUndoListener::listActionEntered, rComment );
}
//------------------------------------------------------------------------
-void SfxUndoManager::LeaveListAction()
+bool SfxUndoManager::IsInListAction() const
+{
+ UndoManagerGuard aGuard( *m_pData );
+ return ImplIsInListAction_Lock();
+}
-/* [Beschreibung]
+//------------------------------------------------------------------------
- Verlaesst die aktuelle ListAction und geht eine Ebene nach oben.
-*/
+bool SfxUndoManager::ImplIsInListAction_Lock() const
{
- if ( !mbUndoEnabled )
- return;
+ return ( m_pData->pActUndoArray != m_pData->pUndoArray );
+}
- if ( !pUndoArray->nMaxUndoActions )
- return;
+//------------------------------------------------------------------------
+
+size_t SfxUndoManager::GetListActionDepth() const
+{
+ UndoManagerGuard aGuard( *m_pData );
+ size_t nDepth(0);
- if( pActUndoArray == pUndoArray )
+ SfxUndoArray* pLookup( m_pData->pActUndoArray );
+ while ( pLookup != m_pData->pUndoArray )
{
- DBG_ERROR( "svl::SfxUndoManager::LeaveListAction(), called without calling EnterListAction()!" );
- return;
+ pLookup = pLookup->pFatherUndoArray;
+ ++nDepth;
}
- DBG_ASSERT(pActUndoArray->pFatherUndoArray,"svl::SfxUndoManager::LeaveListAction(), no father undo array!?");
+ return nDepth;
+}
+
+//------------------------------------------------------------------------
- SfxUndoArray* pTmp=pActUndoArray;
- pActUndoArray=pActUndoArray->pFatherUndoArray;
+size_t SfxUndoManager::LeaveListAction()
+{
+ UndoManagerGuard aGuard( *m_pData );
+ size_t nCount = ImplLeaveListAction( false, aGuard );
- // If no undo action where added, delete the undo list action
- SfxUndoAction *pTmpAction= pActUndoArray->aUndoActions[pActUndoArray->nCurUndoAction-1];
- if(!pTmp->nCurUndoAction)
+ if ( m_pData->mbClearUntilTopLevel )
{
- pActUndoArray->aUndoActions.Remove( --pActUndoArray->nCurUndoAction);
- delete pTmpAction;
+ ImplClearCurrentLevel_NoNotify( aGuard );
+ if ( !ImplIsInListAction_Lock() )
+ {
+ m_pData->mbClearUntilTopLevel = false;
+ aGuard.scheduleNotification( &SfxUndoListener::cleared );
+ }
+ nCount = 0;
}
- else
+
+ return nCount;
+}
+
+//------------------------------------------------------------------------
+
+size_t SfxUndoManager::LeaveAndMergeListAction()
+{
+ UndoManagerGuard aGuard( *m_pData );
+ return ImplLeaveListAction( true, aGuard );
+}
+
+//------------------------------------------------------------------------
+
+size_t SfxUndoManager::ImplLeaveListAction( const bool i_merge, UndoManagerGuard& i_guard )
+{
+ if ( !ImplIsUndoEnabled_Lock() )
+ return 0;
+
+ if ( !m_pData->pUndoArray->nMaxUndoActions )
+ return 0;
+
+ if( !ImplIsInListAction_Lock() )
{
- // if the undo array has no comment, try to get it from its children
- SfxListUndoAction* pList = dynamic_cast< SfxListUndoAction * >( pTmpAction );
- if( pList && pList->GetComment().Len() == 0 )
+ DBG_ERROR( "svl::SfxUndoManager::ImplLeaveListAction, called without calling EnterListAction()!" );
+ return 0;
+ }
+
+ DBG_ASSERT( m_pData->pActUndoArray->pFatherUndoArray, "SfxUndoManager::ImplLeaveListAction, no father undo array!?" );
+
+ // the array/level which we're about to leave
+ SfxUndoArray* pArrayToLeave = m_pData->pActUndoArray;
+ // one step up
+ m_pData->pActUndoArray = m_pData->pActUndoArray->pFatherUndoArray;
+
+ // If no undo actions were added to the list, delete the list action
+ const size_t nListActionElements = pArrayToLeave->nCurUndoAction;
+ if ( nListActionElements == 0 )
+ {
+ SfxUndoAction* pCurrentAction= m_pData->pActUndoArray->aUndoActions[ m_pData->pActUndoArray->nCurUndoAction-1 ].pAction;
+ m_pData->pActUndoArray->aUndoActions.Remove( --m_pData->pActUndoArray->nCurUndoAction );
+ i_guard.markForDeletion( pCurrentAction );
+
+ i_guard.scheduleNotification( &SfxUndoListener::listActionCancelled );
+ return 0;
+ }
+
+ // now that it is finally clear the list action is non-trivial, and does participate in the Undo stack, clear
+ // the redo stack
+ ImplClearRedo( i_guard, IUndoManager::CurrentLevel );
+
+ SfxUndoAction* pCurrentAction= m_pData->pActUndoArray->aUndoActions[ m_pData->pActUndoArray->nCurUndoAction-1 ].pAction;
+ SfxListUndoAction* pListAction = dynamic_cast< SfxListUndoAction * >( pCurrentAction );
+ ENSURE_OR_RETURN( pListAction, "SfxUndoManager::ImplLeaveListAction: list action expected at this position!", nListActionElements );
+
+ if ( i_merge )
+ {
+ // merge the list action with its predecessor on the same level
+ OSL_ENSURE( m_pData->pActUndoArray->nCurUndoAction > 1,
+ "SfxUndoManager::ImplLeaveListAction: cannot merge the list action if there's no other action on the same level - check this beforehand!" );
+ if ( m_pData->pActUndoArray->nCurUndoAction > 1 )
{
- USHORT n;
- for( n = 0; n < pList->aUndoActions.Count(); n++ )
+ SfxUndoAction* pPreviousAction = m_pData->pActUndoArray->aUndoActions[ m_pData->pActUndoArray->nCurUndoAction - 2 ].pAction;
+ m_pData->pActUndoArray->aUndoActions.Remove( m_pData->pActUndoArray->nCurUndoAction - 2 );
+ --m_pData->pActUndoArray->nCurUndoAction;
+ pListAction->aUndoActions.Insert( pPreviousAction, 0 );
+ ++pListAction->nCurUndoAction;
+
+ pListAction->SetComment( pPreviousAction->GetComment() );
+ }
+ }
+
+ // if the undo array has no comment, try to get it from its children
+ if ( pListAction->GetComment().Len() == 0 )
+ {
+ for( size_t n = 0; n < pListAction->aUndoActions.size(); n++ )
+ {
+ if( pListAction->aUndoActions[n].pAction->GetComment().Len() )
{
- if( pList->aUndoActions[n]->GetComment().Len() )
- {
- pList->SetComment( pList->aUndoActions[n]->GetComment() );
- break;
- }
+ pListAction->SetComment( pListAction->aUndoActions[n].pAction->GetComment() );
+ break;
}
}
}
+
+ // notify listeners
+ i_guard.scheduleNotification( &SfxUndoListener::listActionLeft, pListAction->GetComment() );
+
+ // outta here
+ return nListActionElements;
}
//------------------------------------------------------------------------
+UndoStackMark SfxUndoManager::MarkTopUndoAction()
+{
+ UndoManagerGuard aGuard( *m_pData );
+
+ OSL_ENSURE( !IsInListAction(),
+ "SfxUndoManager::MarkTopUndoAction(): suspicious call!" );
+ OSL_ENSURE((m_pData->mnMarks + 1) < (m_pData->mnEmptyMark - 1),
+ "SfxUndoManager::MarkTopUndoAction(): mark overflow!");
+
+ size_t const nActionPos = m_pData->pUndoArray->nCurUndoAction;
+ if (0 == nActionPos)
+ {
+ --m_pData->mnEmptyMark;
+ return m_pData->mnEmptyMark;
+ }
-USHORT SfxListUndoAction::GetId() const
+ m_pData->pUndoArray->aUndoActions[ nActionPos-1 ].aMarks.push_back(
+ ++m_pData->mnMarks );
+ return m_pData->mnMarks;
+}
+
+//------------------------------------------------------------------------
+void SfxUndoManager::RemoveMark( UndoStackMark const i_mark )
+{
+ UndoManagerGuard aGuard( *m_pData );
+
+ if ((m_pData->mnEmptyMark < i_mark) || (MARK_INVALID == i_mark))
+ {
+ return; // nothing to remove
+ }
+ else if (i_mark == m_pData->mnEmptyMark)
+ {
+ --m_pData->mnEmptyMark; // never returned from MarkTop => invalid
+ return;
+ }
+
+ for ( size_t i=0; i<m_pData->pUndoArray->aUndoActions.size(); ++i )
+ {
+ MarkedUndoAction& rAction = m_pData->pUndoArray->aUndoActions[i];
+ for ( ::std::vector< UndoStackMark >::iterator markPos = rAction.aMarks.begin();
+ markPos != rAction.aMarks.end();
+ ++markPos
+ )
+ {
+ if ( *markPos == i_mark )
+ {
+ rAction.aMarks.erase( markPos );
+ return;
+ }
+ }
+ }
+ OSL_ENSURE( false, "SfxUndoManager::RemoveMark: mark not found!" );
+ // TODO: this might be too offensive. There are situations where we implicitly remove marks
+ // without our clients, in particular the client which created the mark, having a chance to know
+ // about this.
+}
+
+//------------------------------------------------------------------------
+bool SfxUndoManager::HasTopUndoActionMark( UndoStackMark const i_mark )
+{
+ UndoManagerGuard aGuard( *m_pData );
+
+ size_t nActionPos = m_pData->pUndoArray->nCurUndoAction;
+ if ( nActionPos == 0 )
+ {
+ return (i_mark == m_pData->mnEmptyMark);
+ }
+
+ const MarkedUndoAction& rAction =
+ m_pData->pUndoArray->aUndoActions[ nActionPos-1 ];
+ for ( ::std::vector< UndoStackMark >::const_iterator markPos = rAction.aMarks.begin();
+ markPos != rAction.aMarks.end();
+ ++markPos
+ )
+ {
+ if ( *markPos == i_mark )
+ return true;
+ }
+
+ return false;
+}
+
+//------------------------------------------------------------------------
+
+void SfxUndoManager::RemoveOldestUndoActions( size_t const i_count )
+{
+ UndoManagerGuard aGuard( *m_pData );
+
+ size_t nActionsToRemove = i_count;
+ while ( nActionsToRemove )
+ {
+ SfxUndoAction* pActionToRemove = m_pData->pUndoArray->aUndoActions[0].pAction;
+
+ if ( IsInListAction() && ( m_pData->pUndoArray->nCurUndoAction == 1 ) )
+ {
+ OSL_ENSURE( false, "SfxUndoManager::RemoveOldestUndoActions: cannot remove a not-yet-closed list action!" );
+ return;
+ }
+
+ aGuard.markForDeletion( pActionToRemove );
+ m_pData->pUndoArray->aUndoActions.Remove( 0 );
+ --m_pData->pUndoArray->nCurUndoAction;
+ --nActionsToRemove;
+ }
+}
+
+//------------------------------------------------------------------------
+
+sal_uInt16 SfxListUndoAction::GetId() const
{
return nId;
}
@@ -654,7 +1318,7 @@ SfxListUndoAction::SfxListUndoAction
(
const XubString &rComment,
const XubString rRepeatComment,
- USHORT Id,
+ sal_uInt16 Id,
SfxUndoArray *pFather
)
: nId(Id), aComment(rComment), aRepeatComment(rRepeatComment)
@@ -667,8 +1331,17 @@ SfxListUndoAction::SfxListUndoAction
void SfxListUndoAction::Undo()
{
- for(INT16 i=nCurUndoAction-1;i>=0;i--)
- aUndoActions[i]->Undo();
+ for(size_t i=nCurUndoAction;i>0;)
+ aUndoActions[--i].pAction->Undo();
+ nCurUndoAction=0;
+}
+
+//------------------------------------------------------------------------
+
+void SfxListUndoAction::UndoWithContext( SfxUndoContext& i_context )
+{
+ for(size_t i=nCurUndoAction;i>0;)
+ aUndoActions[--i].pAction->UndoWithContext( i_context );
nCurUndoAction=0;
}
@@ -676,39 +1349,48 @@ void SfxListUndoAction::Undo()
void SfxListUndoAction::Redo()
{
- for(USHORT i=nCurUndoAction;i<aUndoActions.Count();i++)
- aUndoActions[i]->Redo();
- nCurUndoAction = aUndoActions.Count();
+ for(size_t i=nCurUndoAction;i<aUndoActions.size();i++)
+ aUndoActions[i].pAction->Redo();
+ nCurUndoAction = aUndoActions.size();
+}
+
+//------------------------------------------------------------------------
+
+void SfxListUndoAction::RedoWithContext( SfxUndoContext& i_context )
+{
+ for(size_t i=nCurUndoAction;i<aUndoActions.size();i++)
+ aUndoActions[i].pAction->RedoWithContext( i_context );
+ nCurUndoAction = aUndoActions.size();
}
//------------------------------------------------------------------------
void SfxListUndoAction::Repeat(SfxRepeatTarget&rTarget)
{
- for(USHORT i=0;i<nCurUndoAction;i++)
- aUndoActions[i]->Repeat(rTarget);
+ for(size_t i=0;i<nCurUndoAction;i++)
+ aUndoActions[i].pAction->Repeat(rTarget);
}
//------------------------------------------------------------------------
-BOOL SfxListUndoAction::CanRepeat(SfxRepeatTarget&r) const
+sal_Bool SfxListUndoAction::CanRepeat(SfxRepeatTarget&r) const
{
- for(USHORT i=0;i<nCurUndoAction;i++)
- if(!aUndoActions[i]->CanRepeat(r))
- return FALSE;
- return TRUE;
+ for(size_t i=0;i<nCurUndoAction;i++)
+ if(!aUndoActions[i].pAction->CanRepeat(r))
+ return sal_False;
+ return sal_True;
}
//------------------------------------------------------------------------
-BOOL SfxListUndoAction::Merge( SfxUndoAction *pNextAction )
+sal_Bool SfxListUndoAction::Merge( SfxUndoAction *pNextAction )
{
- return aUndoActions.Count() && aUndoActions[aUndoActions.Count()-1]->Merge( pNextAction );
+ return !aUndoActions.empty() && aUndoActions[aUndoActions.size()-1].pAction->Merge( pNextAction );
}
//------------------------------------------------------------------------
-SfxLinkUndoAction::SfxLinkUndoAction(SfxUndoManager *pManager)
+SfxLinkUndoAction::SfxLinkUndoAction(::svl::IUndoManager *pManager)
/* [Beschreibung]
Richtet eine LinkAction ein, die auf einen weiteren UndoManager zeigt.
@@ -718,10 +1400,15 @@ SfxLinkUndoAction::SfxLinkUndoAction(SfxUndoManager *pManager)
{
pUndoManager = pManager;
+ SfxUndoManager* pUndoManagerImplementation = dynamic_cast< SfxUndoManager* >( pManager );
+ ENSURE_OR_THROW( pUndoManagerImplementation != NULL, "unsupported undo manager implementation!" );
+ // yes, this cast is dirty. But reaching into the the SfxUndoManager's implementation,
+ // directly accessing its internal stack, and tampering with an action on that stack
+ // is dirty, too.
if ( pManager->GetMaxUndoActionCount() )
{
- USHORT nPos = pManager->GetUndoActionCount()-1;
- pAction = pManager->pActUndoArray->aUndoActions[nPos];
+ size_t nPos = pManager->GetUndoActionCount()-1;
+ pAction = pUndoManagerImplementation->m_pData->pActUndoArray->aUndoActions[nPos].pAction;
pAction->SetLinked();
}
else
@@ -733,7 +1420,7 @@ SfxLinkUndoAction::SfxLinkUndoAction(SfxUndoManager *pManager)
void SfxLinkUndoAction::Undo()
{
if ( pAction )
- pUndoManager->Undo(1);
+ pUndoManager->Undo();
}
//------------------------------------------------------------------------
@@ -741,15 +1428,15 @@ void SfxLinkUndoAction::Undo()
void SfxLinkUndoAction::Redo()
{
if ( pAction )
- pUndoManager->Redo(1);
+ pUndoManager->Redo();
}
//------------------------------------------------------------------------
-BOOL SfxLinkUndoAction::CanRepeat(SfxRepeatTarget& r) const
+sal_Bool SfxLinkUndoAction::CanRepeat(SfxRepeatTarget& r) const
{
- return pAction && pUndoManager->CanRepeat(r,*pAction);
+ return pAction && pAction->CanRepeat(r);
}
@@ -758,8 +1445,8 @@ BOOL SfxLinkUndoAction::CanRepeat(SfxRepeatTarget& r) const
void SfxLinkUndoAction::Repeat(SfxRepeatTarget&r)
{
- if ( pAction )
- pUndoManager->Repeat(r,*pAction);
+ if ( pAction && pAction->CanRepeat( r ) )
+ pAction->Repeat( r );
}
@@ -789,7 +1476,7 @@ XubString SfxLinkUndoAction::GetRepeatComment(SfxRepeatTarget&r) const
SfxLinkUndoAction::~SfxLinkUndoAction()
{
if( pAction )
- pAction->SetLinked( FALSE );
+ pAction->SetLinked( sal_False );
}
@@ -797,20 +1484,16 @@ SfxLinkUndoAction::~SfxLinkUndoAction()
SfxUndoArray::~SfxUndoArray()
{
- while ( aUndoActions.Count() )
+ while ( !aUndoActions.empty() )
{
- SfxUndoAction *pAction =
- aUndoActions[ aUndoActions.Count() - 1 ];
- aUndoActions.Remove( aUndoActions.Count() - 1 );
+ SfxUndoAction *pAction = aUndoActions[ aUndoActions.size() - 1 ].pAction;
+ aUndoActions.Remove( aUndoActions.size() - 1 );
delete pAction;
}
}
-USHORT SfxLinkUndoAction::GetId() const
+sal_uInt16 SfxLinkUndoAction::GetId() const
{
return pAction ? pAction->GetId() : 0;
}
-
-
-
diff --git a/svl/unx/source/svdde/ddedummy.cxx b/svl/unx/source/svdde/ddedummy.cxx
index 4f92c80e36f2..e769ee73b9cb 100644
--- a/svl/unx/source/svdde/ddedummy.cxx
+++ b/svl/unx/source/svdde/ddedummy.cxx
@@ -42,7 +42,7 @@ DdeData::DdeData( const DdeData& )
{
}
-DdeData::DdeData( const void*, long, ULONG)
+DdeData::DdeData( const void*, long, sal_uLong)
{
}
@@ -50,11 +50,11 @@ DdeData::~DdeData( void )
{
}
-void DdeData::SetFormat( ULONG )
+void DdeData::SetFormat( sal_uLong )
{
}
-ULONG DdeData::GetFormat() const
+sal_uLong DdeData::GetFormat() const
{
return 0L;
}
@@ -111,7 +111,7 @@ void DdeTransaction::Execute(void)
{
}
-void DdeTransaction::Done( BOOL )
+void DdeTransaction::Done( sal_Bool )
{
}
@@ -168,34 +168,34 @@ void DdeTopic::RemoveItem( const DdeItem& )
{
}
-DdeData* DdeTopic::Get( ULONG )
+DdeData* DdeTopic::Get( sal_uLong )
{
return NULL;
}
-BOOL DdeTopic::MakeItem( const String& )
+sal_Bool DdeTopic::MakeItem( const String& )
{
- return FALSE;
+ return sal_False;
}
-BOOL DdeTopic::StartAdviseLoop()
+sal_Bool DdeTopic::StartAdviseLoop()
{
- return FALSE;
+ return sal_False;
}
-BOOL DdeTopic::StopAdviseLoop()
+sal_Bool DdeTopic::StopAdviseLoop()
{
- return FALSE;
+ return sal_False;
}
-BOOL DdeTopic::Execute( const String* )
+sal_Bool DdeTopic::Execute( const String* )
{
- return FALSE;
+ return sal_False;
}
-BOOL DdeTopic::Put( const DdeData* )
+sal_Bool DdeTopic::Put( const DdeData* )
{
- return FALSE;
+ return sal_False;
}
const String& DdeTopic::GetName() const
@@ -228,17 +228,17 @@ String DdeService::SysTopicGet(const String& rString) {
return rString;
}
-BOOL DdeService::SysTopicExecute(const String*) {
- return FALSE;
+sal_Bool DdeService::SysTopicExecute(const String*) {
+ return sal_False;
}
DdeService::~DdeService()
{
}
-BOOL DdeService::IsBusy()
+sal_Bool DdeService::IsBusy()
{
- return FALSE;
+ return sal_False;
}
String DdeService::GetHelp()
@@ -246,7 +246,7 @@ String DdeService::GetHelp()
return String::EmptyString();
}
-void DdeService::AddFormat( ULONG )
+void DdeService::AddFormat( sal_uLong )
{
}
@@ -258,9 +258,9 @@ void DdeService::RemoveTopic( const DdeTopic& )
{
}
-BOOL DdeService::MakeTopic( const String& )
+sal_Bool DdeService::MakeTopic( const String& )
{
- return FALSE;
+ return sal_False;
}
const String& DdeService::GetName() const
@@ -305,17 +305,17 @@ DdeItem( rItem )
{
}
-DdeData* DdeGetPutItem::Get( ULONG )
+DdeData* DdeGetPutItem::Get( sal_uLong )
{
return NULL;
}
-BOOL DdeGetPutItem::Put( const DdeData* )
+sal_Bool DdeGetPutItem::Put( const DdeData* )
{
- return FALSE;
+ return sal_False;
}
-void DdeGetPutItem::AdviseLoop( BOOL )
+void DdeGetPutItem::AdviseLoop( sal_Bool )
{
}
diff --git a/svl/util/svl.pmk b/svl/util/svl.pmk
deleted file mode 100644
index 854fb6d6d453..000000000000
--- a/svl/util/svl.pmk
+++ /dev/null
@@ -1,31 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-# define SVL_DLLIMPLEMENTATION (see @ svldllapi.h)
-CDEFS += -DSVL_DLLIMPLEMENTATION
-
-VISIBILITY_HIDDEN=TRUE