summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
Diffstat (limited to 'svtools')
-rw-r--r--svtools/AllLangResTarget_productregistration.mk6
-rw-r--r--svtools/AllLangResTarget_svt.mk6
-rw-r--r--svtools/Executable_bmp.mk38
-rw-r--r--svtools/Executable_bmpsum.mk38
-rw-r--r--svtools/Executable_g2g.mk39
-rwxr-xr-x[-rw-r--r--]svtools/JunitTest_svtools_unoapi.mk (renamed from svtools/util/svt.pmk)30
-rw-r--r--svtools/Library_hatchwindowfactory.mk39
-rw-r--r--svtools/Library_productregistration.mk39
-rw-r--r--svtools/Library_svt.mk39
-rw-r--r--svtools/Module_svtools.mk10
-rw-r--r--svtools/Package_inc.mk6
-rw-r--r--svtools/bmpmaker/bmp.cxx24
-rw-r--r--svtools/bmpmaker/bmpcore.cxx12
-rw-r--r--svtools/bmpmaker/bmpcore.hxx8
-rw-r--r--svtools/bmpmaker/bmpsum.cxx20
-rw-r--r--svtools/bmpmaker/g2g.cxx26
-rw-r--r--svtools/inc/svtools/DocumentInfoPreview.hxx2
-rw-r--r--svtools/inc/svtools/acceleratorexecute.hxx2
-rw-r--r--[-rwxr-xr-x]svtools/inc/svtools/accessibletable.hxx6
-rw-r--r--svtools/inc/svtools/accessibletableprovider.hxx14
-rw-r--r--svtools/inc/svtools/apearcfg.hxx32
-rw-r--r--svtools/inc/svtools/asynclink.hxx16
-rw-r--r--svtools/inc/svtools/brwbox.hxx256
-rw-r--r--svtools/inc/svtools/calendar.hxx96
-rw-r--r--svtools/inc/svtools/cliplistener.hxx2
-rw-r--r--svtools/inc/svtools/colctrl.hxx70
-rw-r--r--svtools/inc/svtools/ctrlbox.hxx140
-rw-r--r--svtools/inc/svtools/ctrltool.hxx44
-rw-r--r--svtools/inc/svtools/editbrowsebox.hxx20
-rw-r--r--svtools/inc/svtools/editimplementation.hxx4
-rw-r--r--svtools/inc/svtools/editsyntaxhighlighter.hxx2
-rw-r--r--svtools/inc/svtools/ehdl.hxx32
-rw-r--r--svtools/inc/svtools/embedhlp.hxx18
-rw-r--r--svtools/inc/svtools/expander.hxx10
-rw-r--r--svtools/inc/svtools/filectrl.hxx22
-rw-r--r--svtools/inc/svtools/filedlg.hxx8
-rw-r--r--svtools/inc/svtools/fileview.hxx4
-rw-r--r--svtools/inc/svtools/filter.hxx246
-rw-r--r--svtools/inc/svtools/fltcall.hxx8
-rw-r--r--svtools/inc/svtools/fltdefs.hxx62
-rw-r--r--svtools/inc/svtools/fmtfield.hxx100
-rw-r--r--svtools/inc/svtools/generictoolboxcontroller.hxx2
-rw-r--r--svtools/inc/svtools/grfmgr.hxx192
-rw-r--r--svtools/inc/svtools/headbar.hxx136
-rw-r--r--svtools/inc/svtools/htmlcfg.hxx36
-rw-r--r--svtools/inc/svtools/htmlout.hxx14
-rw-r--r--svtools/inc/svtools/htmltokn.h2
-rw-r--r--svtools/inc/svtools/imap.hxx34
-rw-r--r--svtools/inc/svtools/imapcirc.hxx20
-rw-r--r--svtools/inc/svtools/imapobj.hxx44
-rw-r--r--svtools/inc/svtools/imappoly.hxx20
-rw-r--r--svtools/inc/svtools/imaprect.hxx14
-rw-r--r--svtools/inc/svtools/inetimg.hxx4
-rw-r--r--svtools/inc/svtools/inettbc.hxx28
-rw-r--r--svtools/inc/svtools/ivctrl.hxx114
-rw-r--r--svtools/inc/svtools/javainteractionhandler.hxx2
-rw-r--r--svtools/inc/svtools/localresaccess.hxx2
-rw-r--r--svtools/inc/svtools/parhtml.hxx96
-rw-r--r--svtools/inc/svtools/parrtf.hxx8
-rw-r--r--svtools/inc/svtools/prgsbar.hxx14
-rw-r--r--svtools/inc/svtools/prnsetup.hxx2
-rw-r--r--svtools/inc/svtools/rtfout.hxx8
-rw-r--r--svtools/inc/svtools/ruler.hxx202
-rw-r--r--svtools/inc/svtools/scrwin.hxx14
-rw-r--r--svtools/inc/svtools/stdmenu.hxx2
-rw-r--r--svtools/inc/svtools/svicnvw.hxx76
-rw-r--r--svtools/inc/svtools/svlbitm.hxx70
-rw-r--r--svtools/inc/svtools/svlbox.hxx160
-rw-r--r--svtools/inc/svtools/svmedit.hxx34
-rw-r--r--svtools/inc/svtools/svmedit2.hxx12
-rw-r--r--svtools/inc/svtools/svparser.hxx72
-rw-r--r--svtools/inc/svtools/svtabbx.hxx92
-rw-r--r--svtools/inc/svtools/svtdata.hxx4
-rw-r--r--svtools/inc/svtools/svtools.hrc3
-rw-r--r--svtools/inc/svtools/svtreebx.hxx130
-rw-r--r--svtools/inc/svtools/svxbox.hxx70
-rw-r--r--svtools/inc/svtools/sychconv.hxx2
-rw-r--r--svtools/inc/svtools/syntaxhighlight.hxx28
-rw-r--r--svtools/inc/svtools/tabbar.hxx186
-rw-r--r--svtools/inc/svtools/table/tablecontrol.hxx6
-rw-r--r--svtools/inc/svtools/taskbar.hxx142
-rw-r--r--svtools/inc/svtools/testtool.hxx6
-rw-r--r--svtools/inc/svtools/textdata.hxx96
-rw-r--r--svtools/inc/svtools/texteng.hxx223
-rw-r--r--svtools/inc/svtools/textview.hxx70
-rw-r--r--svtools/inc/svtools/toolpanel/paneltabbar.hxx2
-rwxr-xr-xsvtools/inc/svtools/toolpanel/toolpaneldeck.hxx2
-rw-r--r--svtools/inc/svtools/transfer.hxx8
-rw-r--r--svtools/inc/svtools/treelist.hxx236
-rw-r--r--svtools/inc/svtools/ttprops.hxx40
-rw-r--r--svtools/inc/svtools/txtattr.hxx54
-rw-r--r--svtools/inc/svtools/unitconv.hxx6
-rw-r--r--svtools/inc/svtools/valueset.hxx180
-rw-r--r--svtools/inc/svtools/wallitem.hxx2
-rw-r--r--svtools/inc/svtools/wizardmachine.hxx4
-rw-r--r--svtools/inc/svtools/wizdlg.hxx30
-rw-r--r--svtools/inc/svtools/wmf.hxx12
-rw-r--r--svtools/inc/svtools/xtextedt.hxx18
-rw-r--r--[-rwxr-xr-x]svtools/inc/svtools/xwindowitem.hxx4
-rw-r--r--svtools/prj/build.lst1
-rw-r--r--svtools/prj/makefile.mk2
-rw-r--r--svtools/qa/unoapi/Test.java5
-rw-r--r--svtools/qa/unoapi/makefile.mk48
-rw-r--r--svtools/source/brwbox/brwbox1.cxx376
-rw-r--r--svtools/source/brwbox/brwbox2.cxx350
-rw-r--r--svtools/source/brwbox/brwbox3.cxx12
-rw-r--r--svtools/source/brwbox/brwhead.cxx4
-rw-r--r--svtools/source/brwbox/datwin.cxx98
-rw-r--r--svtools/source/brwbox/datwin.hxx64
-rw-r--r--svtools/source/brwbox/ebbcontrols.cxx28
-rw-r--r--svtools/source/brwbox/editbrowsebox.cxx2
-rw-r--r--svtools/source/brwbox/editbrowsebox2.cxx8
-rw-r--r--svtools/source/config/accessibilityoptions.cxx4
-rw-r--r--svtools/source/config/apearcfg.cxx18
-rw-r--r--svtools/source/config/colorcfg.cxx10
-rw-r--r--svtools/source/config/htmlcfg.cxx48
-rw-r--r--svtools/source/config/menuoptions.cxx12
-rw-r--r--svtools/source/config/miscopt.cxx10
-rw-r--r--svtools/source/config/printoptions.cxx6
-rw-r--r--svtools/source/contnr/fileview.cxx88
-rw-r--r--svtools/source/contnr/imivctl.hxx276
-rw-r--r--svtools/source/contnr/imivctl1.cxx862
-rw-r--r--svtools/source/contnr/imivctl2.cxx182
-rw-r--r--svtools/source/contnr/ivctrl.cxx92
-rw-r--r--svtools/source/contnr/svicnvw.cxx88
-rw-r--r--svtools/source/contnr/svimpbox.cxx626
-rw-r--r--svtools/source/contnr/svimpicn.cxx632
-rw-r--r--svtools/source/contnr/svlbitm.cxx78
-rw-r--r--svtools/source/contnr/svlbox.cxx278
-rw-r--r--svtools/source/contnr/svtabbx.cxx164
-rw-r--r--svtools/source/contnr/svtreebx.cxx284
-rw-r--r--svtools/source/contnr/templwin.cxx72
-rw-r--r--svtools/source/contnr/templwin.hxx12
-rw-r--r--svtools/source/contnr/treelist.cxx304
-rwxr-xr-xsvtools/source/control/asynclink.cxx12
-rwxr-xr-xsvtools/source/control/calendar.cxx494
-rwxr-xr-xsvtools/source/control/ctrlbox.cxx218
-rwxr-xr-xsvtools/source/control/ctrltool.cxx60
-rwxr-xr-xsvtools/source/control/filectrl.cxx12
-rwxr-xr-x[-rw-r--r--]svtools/source/control/fmtfield.cxx170
-rwxr-xr-xsvtools/source/control/headbar.cxx296
-rwxr-xr-xsvtools/source/control/inettbc.cxx133
-rwxr-xr-xsvtools/source/control/prgsbar.cxx32
-rwxr-xr-xsvtools/source/control/roadmap.cxx12
-rwxr-xr-xsvtools/source/control/ruler.cxx358
-rwxr-xr-xsvtools/source/control/scriptedtext.cxx2
-rwxr-xr-xsvtools/source/control/scrwin.cxx42
-rwxr-xr-x[-rw-r--r--]svtools/source/control/stdctrl.cxx2
-rwxr-xr-xsvtools/source/control/stdmenu.cxx100
-rwxr-xr-x[-rw-r--r--]svtools/source/control/svxbox.cxx132
-rwxr-xr-xsvtools/source/control/tabbar.cxx440
-rwxr-xr-xsvtools/source/control/taskbar.cxx24
-rwxr-xr-xsvtools/source/control/taskbox.cxx36
-rwxr-xr-xsvtools/source/control/taskmisc.cxx20
-rwxr-xr-xsvtools/source/control/taskstat.cxx134
-rw-r--r--svtools/source/control/toolbarmenu.cxx42
-rw-r--r--svtools/source/control/toolbarmenuacc.cxx6
-rw-r--r--svtools/source/control/toolbarmenuimp.hxx2
-rw-r--r--svtools/source/control/valueacc.cxx36
-rwxr-xr-xsvtools/source/control/valueimp.hxx12
-rw-r--r--svtools/source/control/valueset.cxx450
-rw-r--r--svtools/source/dialogs/addresstemplate.cxx6
-rw-r--r--svtools/source/dialogs/colctrl.cxx100
-rw-r--r--svtools/source/dialogs/colrdlg.cxx30
-rw-r--r--svtools/source/dialogs/filedlg.cxx12
-rw-r--r--svtools/source/dialogs/filedlg2.cxx140
-rw-r--r--svtools/source/dialogs/filedlg2.hxx30
-rw-r--r--svtools/source/dialogs/insdlg.cxx8
-rw-r--r--svtools/source/dialogs/mcvmath.cxx32
-rw-r--r--svtools/source/dialogs/mcvmath.hxx16
-rw-r--r--svtools/source/dialogs/prnsetup.cxx14
-rw-r--r--svtools/source/dialogs/property.cxx206
-rw-r--r--svtools/source/dialogs/wizdlg.cxx52
-rw-r--r--svtools/source/edit/editsyntaxhighlighter.cxx22
-rw-r--r--svtools/source/edit/svmedit.cxx278
-rw-r--r--svtools/source/edit/svmedit2.cxx14
-rw-r--r--svtools/source/edit/sychconv.cxx18
-rw-r--r--svtools/source/edit/syntaxhighlight.cxx208
-rw-r--r--svtools/source/edit/textdat2.hxx138
-rw-r--r--svtools/source/edit/textdata.cxx66
-rw-r--r--svtools/source/edit/textdoc.cxx206
-rw-r--r--svtools/source/edit/textdoc.hxx60
-rw-r--r--svtools/source/edit/texteng.cxx686
-rw-r--r--svtools/source/edit/textund2.hxx32
-rw-r--r--svtools/source/edit/textundo.cxx75
-rw-r--r--svtools/source/edit/textundo.hxx8
-rw-r--r--svtools/source/edit/textview.cxx442
-rw-r--r--svtools/source/edit/xtextedt.cxx86
-rw-r--r--svtools/source/filter.vcl/filter/FilterConfigItem.cxx4
-rw-r--r--svtools/source/filter.vcl/filter/exportdialog.cxx4
-rw-r--r--svtools/source/filter.vcl/filter/filter.cxx334
-rw-r--r--svtools/source/filter.vcl/filter/filter2.cxx316
-rw-r--r--svtools/source/filter.vcl/filter/sgfbram.cxx132
-rw-r--r--svtools/source/filter.vcl/filter/sgvmain.cxx202
-rw-r--r--svtools/source/filter.vcl/filter/sgvspln.cxx82
-rw-r--r--svtools/source/filter.vcl/filter/sgvtext.cxx364
-rw-r--r--svtools/source/filter.vcl/igif/decode.cxx50
-rw-r--r--svtools/source/filter.vcl/igif/decode.hxx32
-rw-r--r--svtools/source/filter.vcl/igif/gifread.cxx170
-rw-r--r--svtools/source/filter.vcl/ixbm/xbmread.cxx52
-rw-r--r--svtools/source/filter.vcl/ixpm/rgbtable.hxx6
-rw-r--r--svtools/source/filter.vcl/ixpm/xpmread.cxx164
-rw-r--r--svtools/source/filter.vcl/jpeg/jpeg.cxx58
-rw-r--r--svtools/source/filter.vcl/jpeg/jpeg.h1
-rw-r--r--svtools/source/filter.vcl/jpeg/jpegc.c14
-rw-r--r--svtools/source/filter.vcl/wmf/emfwr.cxx168
-rw-r--r--svtools/source/filter.vcl/wmf/emfwr.hxx30
-rw-r--r--svtools/source/filter.vcl/wmf/enhwmf.cxx184
-rw-r--r--svtools/source/filter.vcl/wmf/winmtf.cxx84
-rw-r--r--svtools/source/filter.vcl/wmf/winmtf.hxx94
-rw-r--r--svtools/source/filter.vcl/wmf/winwmf.cxx100
-rw-r--r--svtools/source/filter.vcl/wmf/wmf.cxx32
-rw-r--r--svtools/source/filter.vcl/wmf/wmfwr.cxx134
-rw-r--r--svtools/source/filter.vcl/wmf/wmfwr.hxx56
-rw-r--r--svtools/source/graphic/descriptor.cxx2
-rw-r--r--svtools/source/graphic/descriptor.hxx2
-rw-r--r--svtools/source/graphic/grfattr.cxx8
-rw-r--r--svtools/source/graphic/grfcache.cxx138
-rw-r--r--svtools/source/graphic/grfcache.hxx42
-rw-r--r--svtools/source/graphic/grfmgr.cxx136
-rw-r--r--svtools/source/graphic/grfmgr2.cxx142
-rw-r--r--svtools/source/graphic/provider.cxx2
-rw-r--r--svtools/source/hatchwindow/ipwin.cxx24
-rw-r--r--svtools/source/hatchwindow/ipwin.hxx8
-rw-r--r--svtools/source/inc/gifread.hxx66
-rw-r--r--svtools/source/inc/jpeg.hxx10
-rw-r--r--svtools/source/inc/msgrd.hxx6
-rw-r--r--svtools/source/inc/msgwr.hxx6
-rw-r--r--svtools/source/inc/property.hxx108
-rw-r--r--svtools/source/inc/sgfbram.hxx100
-rw-r--r--svtools/source/inc/sgffilt.hxx8
-rw-r--r--svtools/source/inc/sgvmain.hxx226
-rw-r--r--svtools/source/inc/sgvspln.hxx10
-rw-r--r--svtools/source/inc/svimpbox.hxx122
-rw-r--r--svtools/source/inc/svimpicn.hxx64
-rw-r--r--svtools/source/inc/xbmread.hxx6
-rw-r--r--svtools/source/inc/xpmread.hxx60
-rw-r--r--svtools/source/java/javainteractionhandler.cxx2
-rw-r--r--svtools/source/misc/acceleratorexecute.cxx2
-rw-r--r--svtools/source/misc/cliplistener.cxx2
-rw-r--r--svtools/source/misc/ehdl.cxx86
-rw-r--r--svtools/source/misc/embedhlp.cxx42
-rw-r--r--svtools/source/misc/embedtransfer.cxx8
-rw-r--r--svtools/source/misc/helpagentwindow.cxx2
-rw-r--r--svtools/source/misc/imagemgr.cxx353
-rw-r--r--svtools/source/misc/imagemgr.src23
-rw-r--r--svtools/source/misc/imap.cxx152
-rw-r--r--svtools/source/misc/imap2.cxx40
-rw-r--r--svtools/source/misc/imap3.cxx10
-rw-r--r--svtools/source/misc/itemdel.cxx2
-rwxr-xr-x[-rw-r--r--]svtools/source/misc/langtab.cxx4
-rw-r--r--svtools/source/misc/svtdata.cxx4
-rw-r--r--svtools/source/misc/templatefoldercache.cxx11
-rw-r--r--svtools/source/misc/transfer.cxx8
-rw-r--r--svtools/source/misc/transfer2.cxx12
-rw-r--r--svtools/source/misc/unitconv.cxx10
-rw-r--r--[-rwxr-xr-x]svtools/source/misc/xwindowitem.cxx4
-rw-r--r--svtools/source/plugapp/ttprops.cxx14
-rw-r--r--svtools/source/productregistration/registrationdlg.cxx2
-rw-r--r--svtools/source/svhtml/htmlkywd.cxx22
-rw-r--r--svtools/source/svhtml/htmlout.cxx32
-rw-r--r--svtools/source/svhtml/htmlsupp.cxx10
-rw-r--r--svtools/source/svhtml/parhtml.cxx304
-rw-r--r--svtools/source/svrtf/parrtf.cxx8
-rw-r--r--svtools/source/svrtf/rtfkeywd.cxx4
-rw-r--r--svtools/source/svrtf/rtfout.cxx10
-rw-r--r--svtools/source/svrtf/svparser.cxx66
-rw-r--r--svtools/source/table/defaultinputhandler.cxx6
-rw-r--r--svtools/source/table/gridtablerenderer.cxx12
-rw-r--r--svtools/source/table/tablecontrol.cxx8
-rw-r--r--svtools/source/table/tablecontrol_impl.cxx36
-rw-r--r--svtools/source/table/tablecontrol_impl.hxx6
-rw-r--r--svtools/source/toolpanel/drawerlayouter.cxx4
-rwxr-xr-xsvtools/source/toolpanel/paneltabbar.cxx14
-rwxr-xr-xsvtools/source/toolpanel/tablayouter.cxx2
-rwxr-xr-xsvtools/source/toolpanel/toolpaneldeck.cxx4
-rw-r--r--svtools/source/toolpanel/toolpaneldrawer.cxx18
-rw-r--r--svtools/source/toolpanel/toolpaneldrawer.hxx4
-rw-r--r--svtools/source/uno/addrtempuno.cxx2
-rw-r--r--svtools/source/uno/generictoolboxcontroller.cxx4
-rw-r--r--svtools/source/uno/genericunodialog.cxx2
-rw-r--r--svtools/source/uno/toolboxcontroller.cxx2
-rw-r--r--svtools/source/uno/treecontrolpeer.cxx50
-rw-r--r--svtools/source/uno/treecontrolpeer.hxx2
-rw-r--r--svtools/source/uno/unoiface.cxx8
-rw-r--r--svtools/source/uno/unoimap.cxx18
-rw-r--r--svtools/source/uno/wizard/wizardpagecontroller.cxx2
-rw-r--r--svtools/source/urlobj/inetimg.cxx20
-rw-r--r--svtools/workben/browser.cxx40
-rw-r--r--svtools/workben/stest.cxx6
-rw-r--r--svtools/workben/svdem.cxx52
-rwxr-xr-xsvtools/workben/toolpanel/toolpaneltest.cxx6
-rw-r--r--svtools/workben/urange.cxx8
293 files changed, 10814 insertions, 11026 deletions
diff --git a/svtools/AllLangResTarget_productregistration.mk b/svtools/AllLangResTarget_productregistration.mk
index af510d338c6e..e6f2fd093f07 100644
--- a/svtools/AllLangResTarget_productregistration.mk
+++ b/svtools/AllLangResTarget_productregistration.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/svtools/AllLangResTarget_svt.mk b/svtools/AllLangResTarget_svt.mk
index c41bc9d6b29e..6c13a6fcdb3f 100644
--- a/svtools/AllLangResTarget_svt.mk
+++ b/svtools/AllLangResTarget_svt.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/svtools/Executable_bmp.mk b/svtools/Executable_bmp.mk
index 67b21600e523..115665ed0d18 100644
--- a/svtools/Executable_bmp.mk
+++ b/svtools/Executable_bmp.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.
#
@@ -45,6 +45,7 @@ $(eval $(call gb_Executable_add_linked_libs,bmp,\
tl \
vcl \
vos3 \
+ $(gb_STDLIBS) \
))
$(eval $(call gb_Executable_add_exception_objects,bmp,\
@@ -52,35 +53,4 @@ $(eval $(call gb_Executable_add_exception_objects,bmp,\
svtools/bmpmaker/bmpcore \
))
-ifeq ($(OS),WNT)
-ifneq ($(USE_MINGW),)
-$(eval $(call gb_Executable_add_linked_libs,bmp,\
- mingwthrd \
- $(gb_MINGW_LIBSTDCPP) \
- mingw32 \
- $(gb_MINGW_LIBGCC) \
- uwinapi \
- moldname \
- mingwex \
- kernel32 \
- msvcrt \
- user32 \
-))
-else
-$(eval $(call gb_Executable_add_linked_libs,bmp,\
- kernel32 \
- msvcrt \
- oldnames \
- user32 \
- uwinapi \
-))
-endif
-endif
-
-ifeq ($(OS),LINUX)
-$(eval $(call gb_Executable_add_linked_libs,bmp,\
- dl \
- pthread \
-))
-endif
# vim: set noet sw=4 ts=4:
diff --git a/svtools/Executable_bmpsum.mk b/svtools/Executable_bmpsum.mk
index 6b2c0466f0ec..37fa508bdda2 100644
--- a/svtools/Executable_bmpsum.mk
+++ b/svtools/Executable_bmpsum.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.
#
@@ -42,41 +42,11 @@ $(eval $(call gb_Executable_add_linked_libs,bmpsum,\
tl \
vcl \
vos3 \
+ $(gb_STDLIBS) \
))
$(eval $(call gb_Executable_add_exception_objects,bmpsum,\
svtools/bmpmaker/bmpsum \
))
-ifeq ($(OS),WNT)
-ifneq ($(USE_MINGW),)
-$(eval $(call gb_Executable_add_linked_libs,bmpsum,\
- mingwthrd \
- $(gb_MINGW_LIBSTDCPP) \
- mingw32 \
- $(gb_MINGW_LIBGCC) \
- uwinapi \
- moldname \
- mingwex \
- kernel32 \
- msvcrt \
- user32 \
-))
-else
-$(eval $(call gb_Executable_add_linked_libs,bmpsum,\
- kernel32 \
- msvcrt \
- oldnames \
- user32 \
- uwinapi \
-))
-endif
-endif
-
-ifeq ($(OS),LINUX)
-$(eval $(call gb_Executable_add_linked_libs,bmpsum,\
- dl \
- pthread \
-))
-endif
# vim: set noet sw=4 ts=4:
diff --git a/svtools/Executable_g2g.mk b/svtools/Executable_g2g.mk
index d6b96970eacc..d55b37abd565 100644
--- a/svtools/Executable_g2g.mk
+++ b/svtools/Executable_g2g.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.
#
@@ -44,40 +44,11 @@ $(eval $(call gb_Executable_add_linked_libs,g2g,\
tl \
vcl \
vos3 \
+ $(gb_STDLIBS) \
))
$(eval $(call gb_Executable_add_exception_objects,g2g,\
svtools/bmpmaker/g2g \
))
-ifeq ($(OS),WNT)
-ifneq ($(USE_MINGW),)
-$(eval $(call gb_Executable_add_linked_libs,g2g,\
- mingwthrd \
- $(gb_MINGW_LIBSTDCPP) \
- mingw32 \
- $(gb_MINGW_LIBGCC) \
- uwinapi \
- moldname \
- mingwex \
- kernel32 \
- msvcrt \
- user32 \
-))
-else
-$(eval $(call gb_Executable_add_linked_libs,g2g,\
- kernel32 \
- msvcrt \
- oldnames \
- user32 \
- uwinapi \
-))
-endif
-endif
-ifeq ($(OS),LINUX)
-$(eval $(call gb_Executable_add_linked_libs,g2g,\
- pthread \
- dl \
- X11 \
-))
-endif
+
# vim: set noet sw=4 ts=4:
diff --git a/svtools/util/svt.pmk b/svtools/JunitTest_svtools_unoapi.mk
index 24d898f030c1..baaefc84c5be 100644..100755
--- a/svtools/util/svt.pmk
+++ b/svtools/JunitTest_svtools_unoapi.mk
@@ -2,7 +2,7 @@
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
+# Copyright 2000, 2011 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
@@ -25,7 +25,29 @@
#
#*************************************************************************
-# define SVT_DLLIMPLEMENTATION (see @ svtdllapi.h)
-CDEFS += -DSVT_DLLIMPLEMENTATION
+$(eval $(call gb_JunitTest_JunitTest,svtools_unoapi))
-VISIBILITY_HIDDEN=TRUE
+$(eval $(call gb_JunitTest_set_defs,svtools_unoapi,\
+ $$(DEFS) \
+ -Dorg.openoffice.test.arg.sce=$(SRCDIR)/svtools/qa/unoapi/svtools.sce \
+ -Dorg.openoffice.test.arg.xcl=$(SRCDIR)/svtools/qa/unoapi/knownissues.xcl \
+ -Dorg.openoffice.test.arg.tdoc=$(SRCDIR)/svtools/qa/unoapi/testdocuments \
+))
+
+$(eval $(call gb_JunitTest_add_jars,svtools_unoapi,\
+ $(OUTDIR)/bin/OOoRunner.jar \
+ $(OUTDIR)/bin/ridl.jar \
+ $(OUTDIR)/bin/test.jar \
+ $(OUTDIR)/bin/unoil.jar \
+ $(OUTDIR)/bin/jurt.jar \
+))
+
+$(eval $(call gb_JunitTest_add_sourcefiles,svtools_unoapi,\
+ svtools/qa/unoapi/Test \
+))
+
+$(eval $(call gb_JunitTest_add_classes,svtools_unoapi,\
+ org.openoffice.svtools.qa.unoapi.Test \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/svtools/Library_hatchwindowfactory.mk b/svtools/Library_hatchwindowfactory.mk
index 3e96d22588c8..b92313e446d7 100644
--- a/svtools/Library_hatchwindowfactory.mk
+++ b/svtools/Library_hatchwindowfactory.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.
#
@@ -47,6 +47,7 @@ $(eval $(call gb_Library_add_linked_libs,hatchwindowfactory,\
tk \
tl \
vcl \
+ $(gb_STDLIBS) \
))
$(eval $(call gb_Library_add_exception_objects,hatchwindowfactory,\
@@ -56,36 +57,4 @@ $(eval $(call gb_Library_add_exception_objects,hatchwindowfactory,\
svtools/source/hatchwindow/ipwin \
))
-ifeq ($(OS),LINUX)
-$(eval $(call gb_Library_add_linked_libs,hatchwindowfactory,\
- dl \
- m \
- pthread \
-))
-endif
-ifeq ($(OS),WNT)
-ifneq ($(USE_MINGW),)
-$(eval $(call gb_Library_add_linked_libs,hatchwindowfactory,\
- mingwthrd \
- $(gb_MINGW_LIBSTDCPP) \
- mingw32 \
- $(gb_MINGW_LIBGCC) \
- uwinapi \
- moldname \
- mingwex \
- kernel32 \
- msvcrt \
- user32 \
-))
-else
-$(eval $(call gb_Library_add_linked_libs,hatchwindowfactory,\
- kernel32 \
- msvcrt \
- oldnames \
- stl \
- user32 \
- uwinapi \
-))
-endif
-endif
# vim: set noet sw=4 ts=4:
diff --git a/svtools/Library_productregistration.mk b/svtools/Library_productregistration.mk
index 5df44f631097..6e76b1d6c9db 100644
--- a/svtools/Library_productregistration.mk
+++ b/svtools/Library_productregistration.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,6 +50,7 @@ $(eval $(call gb_Library_add_linked_libs,productregistration,\
tl \
utl \
vcl \
+ $(gb_STDLIBS) \
))
$(eval $(call gb_Library_add_exception_objects,productregistration,\
@@ -57,36 +58,4 @@ $(eval $(call gb_Library_add_exception_objects,productregistration,\
svtools/source/productregistration/registrationdlg \
))
-ifeq ($(OS),LINUX)
-$(eval $(call gb_Library_add_linked_libs,productregistration,\
- dl \
- m \
- pthread \
-))
-endif
-
-ifeq ($(OS),WNT)
-ifneq ($(USE_MINGW),)
-$(eval $(call gb_Library_add_linked_libs,productregistration,\
- mingwthrd \
- $(gb_MINGW_LIBSTDCPP) \
- mingw32 \
- $(gb_MINGW_LIBGCC) \
- uwinapi \
- moldname \
- mingwex \
- kernel32 \
- msvcrt \
- user32 \
-))
-else
-$(eval $(call gb_Library_add_linked_libs,productregistration,\
- kernel32 \
- msvcrt \
- oldnames \
- user32 \
- uwinapi \
-))
-endif
-endif
# vim: set noet sw=4 ts=4:
diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk
index fb0fae66ca12..8828a91c6b14 100644
--- a/svtools/Library_svt.mk
+++ b/svtools/Library_svt.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.
#
@@ -70,6 +70,7 @@ $(eval $(call gb_Library_add_linked_libs,svt,\
utl \
vcl \
vos3 \
+ $(gb_STDLIBS) \
))
ifeq ($(SYSTEM_JPEG),YES)
@@ -290,46 +291,14 @@ $(eval $(call gb_Library_add_cobjects,svt,\
svtools/source/filter.vcl/jpeg/jpegc \
))
-ifeq ($(OS),LINUX)
-$(eval $(call gb_Library_add_linked_libs,svt,\
- dl \
- m \
- pthread \
-))
-endif
-
ifeq ($(OS),WNT)
-ifneq ($(USE_MINGW),)
-$(eval $(call gb_Library_add_linked_libs,svt,\
- mingwthrd \
- $(gb_MINGW_LIBSTDCPP) \
- mingw32 \
- $(gb_MINGW_LIBGCC) \
- uwinapi \
- moldname \
- mingwex \
- advapi32 \
- gdi32 \
- kernel32 \
- msvcrt \
- ole32 \
- oleaut32 \
- user32 \
- uuid \
-))
-else
$(eval $(call gb_Library_add_linked_libs,svt,\
advapi32 \
gdi32 \
- kernel32 \
- msvcrt \
- oldnames \
ole32 \
oleaut32 \
user32 \
uuid \
- uwinapi \
))
endif
-endif
# vim: set noet sw=4 ts=4:
diff --git a/svtools/Module_svtools.mk b/svtools/Module_svtools.mk
index bc760add6d26..0b669d9dee1b 100644
--- a/svtools/Module_svtools.mk
+++ b/svtools/Module_svtools.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.
#
@@ -39,6 +39,10 @@ $(eval $(call gb_Module_add_targets,svtools,\
Package_inc \
))
+$(eval $(call gb_Module_add_subsequentcheck_targets,svtools,\
+ JunitTest_svtools_unoapi \
+))
+
#todo: javapatchres
#todo: jpeg on mac in svtools/util/makefile.mk
#todo: deliver errtxt.src as ehdl.srs
diff --git a/svtools/Package_inc.mk b/svtools/Package_inc.mk
index f6a48e845679..6cc92a14c823 100644
--- a/svtools/Package_inc.mk
+++ b/svtools/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/svtools/bmpmaker/bmp.cxx b/svtools/bmpmaker/bmp.cxx
index 76a4d3ef4043..43f285c1b422 100644
--- a/svtools/bmpmaker/bmp.cxx
+++ b/svtools/bmpmaker/bmp.cxx
@@ -54,19 +54,19 @@ class BmpApp : public BmpCreator
private:
String aOutputFileName;
- BYTE cExitCode;
+ sal_uInt8 cExitCode;
- BOOL GetCommandOption( const ::std::vector< String >& rArgs, const String& rSwitch, String& rSwitchParam );
- BOOL GetCommandOptions( const ::std::vector< String >& rArgs, const String& rSwitch, ::std::vector< String >& rSwitchParams );
+ sal_Bool GetCommandOption( const ::std::vector< String >& rArgs, const String& rSwitch, String& rSwitchParam );
+ sal_Bool GetCommandOptions( const ::std::vector< String >& rArgs, const String& rSwitch, ::std::vector< String >& rSwitchParams );
- void SetExitCode( BYTE cExit )
+ void SetExitCode( sal_uInt8 cExit )
{
if( ( EXIT_NOERROR == cExitCode ) || ( cExit != EXIT_NOERROR ) )
cExitCode = cExit;
}
void ShowUsage();
- virtual void Message( const String& rText, BYTE cExitCode );
+ virtual void Message( const String& rText, sal_uInt8 cExitCode );
public:
@@ -90,9 +90,9 @@ BmpApp::~BmpApp()
// -----------------------------------------------------------------------
-BOOL BmpApp::GetCommandOption( const ::std::vector< String >& rArgs, const String& rSwitch, String& rParam )
+sal_Bool BmpApp::GetCommandOption( const ::std::vector< String >& rArgs, const String& rSwitch, String& rParam )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
for( int i = 0, nCount = rArgs.size(); ( i < nCount ) && !bRet; i++ )
{
@@ -104,7 +104,7 @@ BOOL BmpApp::GetCommandOption( const ::std::vector< String >& rArgs, const Strin
if( aTestStr.CompareIgnoreCaseToAscii( rArgs[ i ] ) == COMPARE_EQUAL )
{
- bRet = TRUE;
+ bRet = sal_True;
if( i < ( nCount - 1 ) )
rParam = rArgs[ i + 1 ];
@@ -122,9 +122,9 @@ BOOL BmpApp::GetCommandOption( const ::std::vector< String >& rArgs, const Strin
// -----------------------------------------------------------------------
-BOOL BmpApp::GetCommandOptions( const ::std::vector< String >& rArgs, const String& rSwitch, ::std::vector< String >& rParams )
+sal_Bool BmpApp::GetCommandOptions( const ::std::vector< String >& rArgs, const String& rSwitch, ::std::vector< String >& rParams )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
for( int i = 0, nCount = rArgs.size(); ( i < nCount ); i++ )
{
@@ -154,7 +154,7 @@ BOOL BmpApp::GetCommandOptions( const ::std::vector< String >& rArgs, const Stri
// -----------------------------------------------------------------------
-void BmpApp::Message( const String& rText, BYTE cExit )
+void BmpApp::Message( const String& rText, sal_uInt8 cExit )
{
if( EXIT_NOERROR != cExit )
SetExitCode( cExit );
@@ -188,7 +188,7 @@ int BmpApp::Start( const ::std::vector< String >& rArgs )
if( rArgs.size() >= 6 )
{
LangInfo aLangInfo;
- USHORT nCurCmd = 0;
+ sal_uInt16 nCurCmd = 0;
const String aSrsName( rArgs[ nCurCmd++ ] );
::std::vector< String > aInDirVector;
ByteString aLangDir;
diff --git a/svtools/bmpmaker/bmpcore.cxx b/svtools/bmpmaker/bmpcore.cxx
index 9e134c06a670..ed3ae80b2788 100644
--- a/svtools/bmpmaker/bmpcore.cxx
+++ b/svtools/bmpmaker/bmpcore.cxx
@@ -72,7 +72,7 @@ BmpCreator::~BmpCreator()
// -----------------------------------------------------------------------------
-void BmpCreator::Message( const String&, BYTE )
+void BmpCreator::Message( const String&, sal_uInt8 )
{
}
@@ -329,7 +329,7 @@ void BmpCreator::Create( const String& rSRSName,
{
DirEntry aFileName( ImplGetSystemFileName( rSRSName ) ), aOutDir( ImplGetSystemFileName( rOutName ) );
::std::vector< DirEntry > aInDirs;
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
aFileName.ToAbs();
aOutDir.ToAbs();
@@ -361,7 +361,7 @@ void BmpCreator::Create( const String& rSRSName,
{
String aText;
ByteString aByteText;
- BOOL bLangDep = FALSE;
+ sal_Bool bLangDep = sal_False;
do
{
@@ -389,7 +389,7 @@ void BmpCreator::Create( const String& rSRSName,
aByteText.Search( '[' ) != STRING_NOTFOUND &&
aByteText.Search( ']' ) != STRING_NOTFOUND )
{
- bLangDep = TRUE;
+ bLangDep = sal_True;
}
if (!pSRS->ReadLine(aByteText))
@@ -401,13 +401,13 @@ void BmpCreator::Create( const String& rSRSName,
// if image list is not language dependent, don't do anything for languages except german
if( aText.Len() )
{
- bDone = TRUE;
+ bDone = sal_True;
ImplCreate( aInDirs, aOutDir, aName, rLang );
}
/* else if( ( rLang.mnLangNum != 49 ) && !bLangDep )
{
Message( String( RTL_CONSTASCII_USTRINGPARAM( "INFO: ImageList is not language dependent! Nothing to do for this language." ) ) );
- bDone = TRUE;
+ bDone = sal_True;
}*/
}
while ( aText.Len() );
diff --git a/svtools/bmpmaker/bmpcore.hxx b/svtools/bmpmaker/bmpcore.hxx
index ece4fa09cf78..ee836cc4a5e5 100644
--- a/svtools/bmpmaker/bmpcore.hxx
+++ b/svtools/bmpmaker/bmpcore.hxx
@@ -55,7 +55,7 @@
struct LangInfo
{
char maLangDir[ 257 ];
- USHORT mnLangNum;
+ sal_uInt16 mnLangNum;
};
// --------------
@@ -71,8 +71,8 @@ private:
Size aTotSize;
Point aPos;
SvFileStream* pSRS;
- ULONG nTotCount;
- USHORT nPos;
+ sal_uLong nTotCount;
+ sal_uInt16 nPos;
void ImplCreate( const ::std::vector< DirEntry >& rInDirs,
const DirEntry& rOut,
@@ -81,7 +81,7 @@ private:
protected:
- virtual void Message( const String& rText, BYTE cExitCode = EXIT_NOERROR );
+ virtual void Message( const String& rText, sal_uInt8 cExitCode = EXIT_NOERROR );
public:
diff --git a/svtools/bmpmaker/bmpsum.cxx b/svtools/bmpmaker/bmpsum.cxx
index 7c264e694a12..0ac43ce57148 100644
--- a/svtools/bmpmaker/bmpsum.cxx
+++ b/svtools/bmpmaker/bmpsum.cxx
@@ -58,16 +58,16 @@ private:
sal_uInt32 cExitCode;
- BOOL GetCommandOption( const ::std::vector< String >& rArgs, const String& rSwitch, String& rSwitchParam );
- BOOL GetCommandOptions( const ::std::vector< String >& rArgs, const String& rSwitch, ::std::vector< String >& rSwitchParams );
+ sal_Bool GetCommandOption( const ::std::vector< String >& rArgs, const String& rSwitch, String& rSwitchParam );
+ sal_Bool GetCommandOptions( const ::std::vector< String >& rArgs, const String& rSwitch, ::std::vector< String >& rSwitchParams );
- void SetExitCode( BYTE cExit )
+ void SetExitCode( sal_uInt8 cExit )
{
if( ( EXIT_NOERROR == cExitCode ) || ( cExit != EXIT_NOERROR ) )
cExitCode = cExit;
}
void ShowUsage();
- void Message( const String& rText, BYTE cExitCode );
+ void Message( const String& rText, sal_uInt8 cExitCode );
sal_uInt64 GetCRC( const BitmapEx& rBmpEx );
@@ -96,9 +96,9 @@ BmpSum::~BmpSum()
// -----------------------------------------------------------------------
-BOOL BmpSum::GetCommandOption( const ::std::vector< String >& rArgs, const String& rSwitch, String& rParam )
+sal_Bool BmpSum::GetCommandOption( const ::std::vector< String >& rArgs, const String& rSwitch, String& rParam )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
for( int i = 0, nCount = rArgs.size(); ( i < nCount ) && !bRet; i++ )
{
@@ -110,7 +110,7 @@ BOOL BmpSum::GetCommandOption( const ::std::vector< String >& rArgs, const Strin
if( aTestStr.CompareIgnoreCaseToAscii( rArgs[ i ] ) == COMPARE_EQUAL )
{
- bRet = TRUE;
+ bRet = sal_True;
if( i < ( nCount - 1 ) )
rParam = rArgs[ i + 1 ];
@@ -128,9 +128,9 @@ BOOL BmpSum::GetCommandOption( const ::std::vector< String >& rArgs, const Strin
// -----------------------------------------------------------------------
-BOOL BmpSum::GetCommandOptions( const ::std::vector< String >& rArgs, const String& rSwitch, ::std::vector< String >& rParams )
+sal_Bool BmpSum::GetCommandOptions( const ::std::vector< String >& rArgs, const String& rSwitch, ::std::vector< String >& rParams )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
for( int i = 0, nCount = rArgs.size(); ( i < nCount ); i++ )
{
@@ -160,7 +160,7 @@ BOOL BmpSum::GetCommandOptions( const ::std::vector< String >& rArgs, const Stri
// -----------------------------------------------------------------------
-void BmpSum::Message( const String& rText, BYTE nExitCode )
+void BmpSum::Message( const String& rText, sal_uInt8 nExitCode )
{
if( EXIT_NOERROR != nExitCode )
SetExitCode( nExitCode );
diff --git a/svtools/bmpmaker/g2g.cxx b/svtools/bmpmaker/g2g.cxx
index 6f4ee0f86279..0a308cccda40 100644
--- a/svtools/bmpmaker/g2g.cxx
+++ b/svtools/bmpmaker/g2g.cxx
@@ -56,13 +56,13 @@ class G2GApp
{
private:
- BYTE cExitCode;
+ sal_uInt8 cExitCode;
void ShowUsage();
- BOOL GetCommandOption( const ::std::vector< String >& rArgs, const String& rSwitch, String& rParam );
- void SetExitCode( BYTE cExit ) { if( ( EXIT_NOERROR == cExitCode ) || ( cExit != EXIT_NOERROR ) ) cExitCode = cExit; }
+ sal_Bool GetCommandOption( const ::std::vector< String >& rArgs, const String& rSwitch, String& rParam );
+ void SetExitCode( sal_uInt8 cExit ) { if( ( EXIT_NOERROR == cExitCode ) || ( cExit != EXIT_NOERROR ) ) cExitCode = cExit; }
- virtual void Message( const String& rText, BYTE cExitCode = EXIT_NOERROR );
+ virtual void Message( const String& rText, sal_uInt8 cExitCode = EXIT_NOERROR );
public:
@@ -86,9 +86,9 @@ G2GApp::~G2GApp()
// -----------------------------------------------------------------------
-BOOL G2GApp::GetCommandOption( const ::std::vector< String >& rArgs, const String& rSwitch, String& rParam )
+sal_Bool G2GApp::GetCommandOption( const ::std::vector< String >& rArgs, const String& rSwitch, String& rParam )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
for( int i = 0, nCount = rArgs.size(); ( i < nCount ) && !bRet; i++ )
{
@@ -100,7 +100,7 @@ BOOL G2GApp::GetCommandOption( const ::std::vector< String >& rArgs, const Strin
if( aTestStr.CompareIgnoreCaseToAscii( rArgs[ i ] ) == COMPARE_EQUAL )
{
- bRet = TRUE;
+ bRet = sal_True;
if( i < ( nCount - 1 ) )
rParam = rArgs[ i + 1 ];
@@ -118,7 +118,7 @@ BOOL G2GApp::GetCommandOption( const ::std::vector< String >& rArgs, const Strin
// -----------------------------------------------------------------------
-void G2GApp::Message( const String& rText, BYTE nExitCode )
+void G2GApp::Message( const String& rText, sal_uInt8 nExitCode )
{
if( EXIT_NOERROR != nExitCode )
SetExitCode( nExitCode );
@@ -148,7 +148,7 @@ void G2GApp::ShowUsage()
int G2GApp::Start( const ::std::vector< String >& rArgs )
{
int nCmdCount = rArgs.size();
- USHORT nCurCmd = 0;
+ sal_uInt16 nCurCmd = 0;
cExitCode = EXIT_NOERROR;
@@ -167,7 +167,7 @@ int G2GApp::Start( const ::std::vector< String >& rArgs )
if( aInFile.Len() && aOutFile.Len() && aFilterStr.Len() )
{
- const USHORT nExportFilter = aFilter.GetExportFormatNumberForShortName( aFilterStr );
+ const sal_uInt16 nExportFilter = aFilter.GetExportFormatNumberForShortName( aFilterStr );
if( GRFILTER_FORMAT_NOTFOUND == nExportFilter )
Message( String( RTL_CONSTASCII_USTRINGPARAM( "invalid graphic filter" ) ), EXIT_INVALID_GRAPHICFILTER );
@@ -198,9 +198,9 @@ int G2GApp::Start( const ::std::vector< String >& rArgs )
if( bHex )
{
- const BYTE cTransR = ( LOWERHEXTONUM( aHexStr.GetChar( 0 ) ) << 4 ) | LOWERHEXTONUM( aHexStr.GetChar( 1 ) );
- const BYTE cTransG = ( LOWERHEXTONUM( aHexStr.GetChar( 2 ) ) << 4 ) | LOWERHEXTONUM( aHexStr.GetChar( 3 ) );
- const BYTE cTransB = ( LOWERHEXTONUM( aHexStr.GetChar( 4 ) ) << 4 ) | LOWERHEXTONUM( aHexStr.GetChar( 5 ) );
+ const sal_uInt8 cTransR = ( LOWERHEXTONUM( aHexStr.GetChar( 0 ) ) << 4 ) | LOWERHEXTONUM( aHexStr.GetChar( 1 ) );
+ const sal_uInt8 cTransG = ( LOWERHEXTONUM( aHexStr.GetChar( 2 ) ) << 4 ) | LOWERHEXTONUM( aHexStr.GetChar( 3 ) );
+ const sal_uInt8 cTransB = ( LOWERHEXTONUM( aHexStr.GetChar( 4 ) ) << 4 ) | LOWERHEXTONUM( aHexStr.GetChar( 5 ) );
BitmapEx aBmpEx( aGraphic.GetBitmapEx() );
Bitmap aOldBmp( aBmpEx.GetBitmap() );
diff --git a/svtools/inc/svtools/DocumentInfoPreview.hxx b/svtools/inc/svtools/DocumentInfoPreview.hxx
index ae57b1a68b32..92c9c72b36bc 100644
--- a/svtools/inc/svtools/DocumentInfoPreview.hxx
+++ b/svtools/inc/svtools/DocumentInfoPreview.hxx
@@ -53,7 +53,7 @@ namespace svtools
::com::sun::star::document::XDocumentProperties>& i_xDocProps
,const String& i_rURL);
void InsertEntry( const String& rTitle, const String& rValue );
- void SetAutoScroll(BOOL _bAutoScroll);
+ void SetAutoScroll(sal_Bool _bAutoScroll);
};
}
diff --git a/svtools/inc/svtools/acceleratorexecute.hxx b/svtools/inc/svtools/acceleratorexecute.hxx
index 3ee79e1fca0c..b5e9f99d2c4b 100644
--- a/svtools/inc/svtools/acceleratorexecute.hxx
+++ b/svtools/inc/svtools/acceleratorexecute.hxx
@@ -222,7 +222,7 @@ class SVT_DLLPUBLIC AcceleratorExecute : private TMutexInit
specify the accelerator for execute.
@return [sal_Bool]
- TRUE if this key is configured and match to a command.
+ sal_True if this key is configured and match to a command.
Attention: This state does not mean the success state
of the corresponding execute. Because its done asynchronous!
*/
diff --git a/svtools/inc/svtools/accessibletable.hxx b/svtools/inc/svtools/accessibletable.hxx
index 8ff17a2b71c7..807760ef9b97 100755..100644
--- a/svtools/inc/svtools/accessibletable.hxx
+++ b/svtools/inc/svtools/accessibletable.hxx
@@ -101,7 +101,7 @@ public:
// Window
virtual Rectangle GetWindowExtentsRelative( Window *pRelativeWindow ) const = 0;
virtual void GrabFocus()= 0;
- virtual XACC GetAccessible( BOOL bCreate = TRUE )= 0;
+ virtual XACC GetAccessible( sal_Bool bCreate = sal_True )= 0;
virtual Window* GetAccessibleParentWindow() const= 0;
virtual Window* GetWindowInstance()= 0;
virtual sal_Int32 GetAccessibleControlCount() const = 0;
@@ -112,8 +112,8 @@ public:
virtual sal_Int32 GetSelectedRowCount() const= 0;
virtual bool IsRowSelected( long _nRow ) const= 0;
virtual sal_Bool ConvertPointToCellAddress( sal_Int32& _rnRow, sal_Int32& _rnColPos, const Point& _rPoint )= 0;
- virtual Rectangle calcHeaderRect( sal_Bool _bIsColumnBar, BOOL _bOnScreen = TRUE ) = 0;
- virtual Rectangle calcTableRect( BOOL _bOnScreen = TRUE ) = 0;
+ virtual Rectangle calcHeaderRect( sal_Bool _bIsColumnBar, sal_Bool _bOnScreen = sal_True ) = 0;
+ virtual Rectangle calcTableRect( sal_Bool _bOnScreen = sal_True ) = 0;
virtual Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex)= 0;
virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint)= 0;
virtual void FillAccessibleStateSetForCell( ::utl::AccessibleStateSetHelper& _rStateSet, sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const= 0;
diff --git a/svtools/inc/svtools/accessibletableprovider.hxx b/svtools/inc/svtools/accessibletableprovider.hxx
index d14aecce9f58..dba96768f8bf 100644
--- a/svtools/inc/svtools/accessibletableprovider.hxx
+++ b/svtools/inc/svtools/accessibletableprovider.hxx
@@ -91,7 +91,7 @@ public:
virtual void SetNoSelection() = 0;
virtual void SelectAll() = 0;
- virtual void SelectRow( long _nRow, BOOL _bSelect = TRUE, BOOL bExpand = TRUE ) = 0;
+ virtual void SelectRow( long _nRow, sal_Bool _bSelect = sal_True, sal_Bool bExpand = sal_True ) = 0;
virtual void SelectColumn( sal_uInt16 _nColumnPos, sal_Bool _bSelect = sal_True ) = 0;
virtual sal_Int32 GetSelectedRowCount() const = 0;
virtual sal_Int32 GetSelectedColumnCount() const = 0;
@@ -103,11 +103,11 @@ public:
/** @return <TRUE/>, if the cell is visible. */
virtual sal_Bool IsCellVisible( sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const = 0;
- virtual String GetAccessibleCellText( long _nRow, USHORT _nColumnPos ) const = 0;
+ virtual String GetAccessibleCellText( long _nRow, sal_uInt16 _nColumnPos ) const = 0;
- virtual Rectangle calcHeaderRect( sal_Bool _bIsColumnBar, BOOL _bOnScreen = TRUE ) = 0;
- virtual Rectangle calcTableRect( BOOL _bOnScreen = TRUE ) = 0;
- virtual Rectangle GetFieldRectPixelAbs( sal_Int32 _nRow, sal_uInt16 _nColumnPos, BOOL _bIsHeader, BOOL _bOnScreen = TRUE ) = 0;
+ virtual Rectangle calcHeaderRect( sal_Bool _bIsColumnBar, sal_Bool _bOnScreen = sal_True ) = 0;
+ virtual Rectangle calcTableRect( sal_Bool _bOnScreen = sal_True ) = 0;
+ virtual Rectangle GetFieldRectPixelAbs( sal_Int32 _nRow, sal_uInt16 _nColumnPos, sal_Bool _bIsHeader, sal_Bool _bOnScreen = sal_True ) = 0;
virtual XACC CreateAccessibleCell( sal_Int32 _nRow, sal_uInt16 _nColumnPos ) = 0;
virtual XACC CreateAccessibleRowHeader( sal_Int32 _nRow ) = 0;
@@ -129,12 +129,12 @@ public:
virtual void GrabTableFocus() = 0;
// OutputDevice
- virtual BOOL GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector ) = 0;
+ virtual sal_Bool GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector ) = 0;
// Window
virtual Rectangle GetWindowExtentsRelative( Window *pRelativeWindow ) const = 0;
virtual void GrabFocus() = 0;
- virtual XACC GetAccessible( BOOL bCreate = TRUE ) = 0;
+ virtual XACC GetAccessible( sal_Bool bCreate = sal_True ) = 0;
virtual Window* GetAccessibleParentWindow() const = 0;
virtual Window* GetWindowInstance() = 0;
diff --git a/svtools/inc/svtools/apearcfg.hxx b/svtools/inc/svtools/apearcfg.hxx
index 5dea74761e17..ef59e86df96c 100644
--- a/svtools/inc/svtools/apearcfg.hxx
+++ b/svtools/inc/svtools/apearcfg.hxx
@@ -59,9 +59,9 @@ class SVT_DLLPUBLIC SvtTabAppearanceCfg : public utl::ConfigItem
short nAAMinPixelHeight ;
#endif
- BOOL bMenuMouseFollow ;
+ sal_Bool bMenuMouseFollow ;
#if defined( UNX ) || defined ( FS_PRIV_DEBUG )
- BOOL bFontAntialiasing ;
+ sal_Bool bFontAntialiasing ;
#endif
static sal_Bool bInitialized ;
@@ -75,29 +75,29 @@ public:
virtual void Commit();
virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& _rPropertyNames);
- USHORT GetDragMode () const { return nDragMode; }
- void SetDragMode ( USHORT nSet );
+ sal_uInt16 GetDragMode () const { return nDragMode; }
+ void SetDragMode ( sal_uInt16 nSet );
- USHORT GetScaleFactor () const { return nScaleFactor; }
- void SetScaleFactor ( USHORT nSet );
+ sal_uInt16 GetScaleFactor () const { return nScaleFactor; }
+ void SetScaleFactor ( sal_uInt16 nSet );
- USHORT GetSnapMode () const { return nSnapMode; }
- void SetSnapMode ( USHORT nSet );
+ sal_uInt16 GetSnapMode () const { return nSnapMode; }
+ void SetSnapMode ( sal_uInt16 nSet );
- USHORT GetMiddleMouseButton () const { return nMiddleMouse; }
- void SetMiddleMouseButton ( USHORT nSet );
+ sal_uInt16 GetMiddleMouseButton () const { return nMiddleMouse; }
+ void SetMiddleMouseButton ( sal_uInt16 nSet );
void SetApplicationDefaults ( Application* pApp );
- void SetMenuMouseFollow(BOOL bSet) {bMenuMouseFollow = bSet; SetModified();}
- BOOL IsMenuMouseFollow() const{return bMenuMouseFollow;}
+ void SetMenuMouseFollow(sal_Bool bSet) {bMenuMouseFollow = bSet; SetModified();}
+ sal_Bool IsMenuMouseFollow() const{return bMenuMouseFollow;}
#if defined( UNX ) || defined ( FS_PRIV_DEBUG )
- void SetFontAntiAliasing( BOOL bSet ) { bFontAntialiasing = bSet; SetModified(); }
- BOOL IsFontAntiAliasing() const { return bFontAntialiasing; }
+ void SetFontAntiAliasing( sal_Bool bSet ) { bFontAntialiasing = bSet; SetModified(); }
+ sal_Bool IsFontAntiAliasing() const { return bFontAntialiasing; }
- USHORT GetFontAntialiasingMinPixelHeight( ) const { return nAAMinPixelHeight; }
- void SetFontAntialiasingMinPixelHeight( USHORT _nMinHeight ) { nAAMinPixelHeight = _nMinHeight; SetModified(); }
+ sal_uInt16 GetFontAntialiasingMinPixelHeight( ) const { return nAAMinPixelHeight; }
+ void SetFontAntialiasingMinPixelHeight( sal_uInt16 _nMinHeight ) { nAAMinPixelHeight = _nMinHeight; SetModified(); }
#endif
static sal_Bool IsInitialized() { return bInitialized; }
diff --git a/svtools/inc/svtools/asynclink.hxx b/svtools/inc/svtools/asynclink.hxx
index 41c6f3e92388..d5aebd370966 100644
--- a/svtools/inc/svtools/asynclink.hxx
+++ b/svtools/inc/svtools/asynclink.hxx
@@ -44,10 +44,10 @@ namespace svtools {
class SVT_DLLPUBLIC AsynchronLink
{
Link _aLink;
- ULONG _nEventId;
+ sal_uLong _nEventId;
Timer* _pTimer;
- BOOL _bInCall;
- BOOL* _pDeleted;
+ sal_Bool _bInCall;
+ sal_Bool* _pDeleted;
void* _pArg;
vos::OMutex* _pMutex;
@@ -56,19 +56,19 @@ class SVT_DLLPUBLIC AsynchronLink
public:
AsynchronLink( const Link& rLink ) :
- _aLink( rLink ), _nEventId( 0 ), _pTimer( 0 ), _bInCall( FALSE ),
+ _aLink( rLink ), _nEventId( 0 ), _pTimer( 0 ), _bInCall( sal_False ),
_pDeleted( 0 ), _pMutex( 0 ){}
- AsynchronLink() : _nEventId( 0 ), _pTimer( 0 ), _bInCall( FALSE ),
+ AsynchronLink() : _nEventId( 0 ), _pTimer( 0 ), _bInCall( sal_False ),
_pDeleted( 0 ), _pMutex( 0 ){}
~AsynchronLink();
void CreateMutex();
void operator=( const Link& rLink ) { _aLink = rLink; }
- void Call( void* pObj, BOOL bAllowDoubles = FALSE,
- BOOL bUseTimer = FALSE );
+ void Call( void* pObj, sal_Bool bAllowDoubles = sal_False,
+ sal_Bool bUseTimer = sal_False );
void ForcePendingCall( );
void ClearPendingCall( );
- BOOL IsSet() const { return _aLink.IsSet(); }
+ sal_Bool IsSet() const { return _aLink.IsSet(); }
Link GetLink() const { return _aLink; }
};
diff --git a/svtools/inc/svtools/brwbox.hxx b/svtools/inc/svtools/brwbox.hxx
index 42fb4b4d36ac..fe17531b3c92 100644
--- a/svtools/inc/svtools/brwbox.hxx
+++ b/svtools/inc/svtools/brwbox.hxx
@@ -67,7 +67,7 @@ namespace utl {
#define BROWSER_INVALIDID USHRT_MAX
#define BROWSER_ENDOFSELECTION (long)(SFX_ENDOFSELECTION)
-typedef ULONG BrowserMode;
+typedef sal_uLong BrowserMode;
#define BROWSER_COLUMNSELECTION 0x0001
#define BROWSER_MULTISELECTION 0x0002
@@ -153,20 +153,20 @@ class BrowseEvent
Window* pWin;
long nRow;
Rectangle aRect;
- USHORT nCol;
- USHORT nColId;
+ sal_uInt16 nCol;
+ sal_uInt16 nColId;
public:
BrowseEvent();
BrowseEvent( Window* pWindow,
long nAbsRow,
- USHORT nColumn, USHORT nColumnId,
+ sal_uInt16 nColumn, sal_uInt16 nColumnId,
const Rectangle& rRect );
Window* GetWindow() const { return pWin; }
long GetRow() const { return nRow; }
- USHORT GetColumn() const { return nCol; }
- USHORT GetColumnId() const { return nColId; }
+ sal_uInt16 GetColumn() const { return nCol; }
+ sal_uInt16 GetColumnId() const { return nColId; }
const Rectangle& GetRect() const { return aRect; }
};
@@ -180,7 +180,7 @@ public:
BrowserMouseEvent();
BrowserMouseEvent( BrowserDataWin* pWin, const MouseEvent& rEvt );
BrowserMouseEvent( Window* pWin, const MouseEvent& rEvt,
- long nAbsRow, USHORT nColumn, USHORT nColumnId,
+ long nAbsRow, sal_uInt16 nColumn, sal_uInt16 nColumnId,
const Rectangle& rRect );
};
@@ -253,45 +253,45 @@ class SVT_DLLPUBLIC BrowseBox
ScrollBar aHScroll; // horizontal scrollbar
long nDataRowHeight; // height of a single data-row
- USHORT nTitleLines; // number of lines in title row
- ULONG nControlAreaWidth; // width of fixed area beneeth hscroll
- BOOL bThumbDragging; // handle thumb dragging
- BOOL bColumnCursor; // single columns and fields selectable
- BOOL bMultiSelection;// allow multiple selected rows
- BOOL bKeepHighlight; // don't hide selection on LoseFocus
-
- BOOL bHLines; // draw lines between rows
- BOOL bVLines; // draw lines between columns
- BOOL bHDots; // draw lines between rows dotted
- BOOL bVDots; // draw lines between columns dotted
+ sal_uInt16 nTitleLines; // number of lines in title row
+ sal_uLong nControlAreaWidth; // width of fixed area beneeth hscroll
+ sal_Bool bThumbDragging; // handle thumb dragging
+ sal_Bool bColumnCursor; // single columns and fields selectable
+ sal_Bool bMultiSelection;// allow multiple selected rows
+ sal_Bool bKeepHighlight; // don't hide selection on LoseFocus
+
+ sal_Bool bHLines; // draw lines between rows
+ sal_Bool bVLines; // draw lines between columns
+ sal_Bool bHDots; // draw lines between rows dotted
+ sal_Bool bVDots; // draw lines between columns dotted
Color aGridLineColor; // color for lines, default dark grey
- BOOL bBootstrapped; // child windows resized etc.
+ sal_Bool bBootstrapped; // child windows resized etc.
long nTopRow; // no. of first visible row (0...)
long nCurRow; // no. of row with cursor
long nRowCount; // total number of rows in model
- USHORT nFirstCol; // no. of first visible scrollable column
- USHORT nCurColId; // column id of cursor
+ sal_uInt16 nFirstCol; // no. of first visible scrollable column
+ sal_uInt16 nCurColId; // column id of cursor
- BOOL bSelecting;
- BOOL bRowDividerDrag;
- BOOL bHit;
- BOOL mbInteractiveRowHeight;
+ sal_Bool bSelecting;
+ sal_Bool bRowDividerDrag;
+ sal_Bool bHit;
+ sal_Bool mbInteractiveRowHeight;
Point a1stPoint;
Point a2ndPoint;
long nResizeX; // mouse position at start of resizing
long nMinResizeX; // never drag more left
long nDragX; // last dragged column (MouseMove)
- USHORT nResizeCol; // resize this column in MouseMove
- BOOL bResizing; // mouse captured for column resizing
-
- BOOL bSelect; // select or deselect
- BOOL bSelectionIsVisible; // depending on focus
- BOOL bScrolling; // hidden cursor while scrolling
- BOOL bNotToggleSel; // set while in ToggleSelection() etc.
- BOOL bHasFocus; // set/unset in Get/LoseFocus
- BOOL bHideSelect; // hide selection (highlight)
- BOOL bHideCursor; // hide cursor (frame)
+ sal_uInt16 nResizeCol; // resize this column in MouseMove
+ sal_Bool bResizing; // mouse captured for column resizing
+
+ sal_Bool bSelect; // select or deselect
+ sal_Bool bSelectionIsVisible; // depending on focus
+ sal_Bool bScrolling; // hidden cursor while scrolling
+ sal_Bool bNotToggleSel; // set while in ToggleSelection() etc.
+ sal_Bool bHasFocus; // set/unset in Get/LoseFocus
+ sal_Bool bHideSelect; // hide selection (highlight)
+ sal_Bool bHideCursor; // hide cursor (frame)
Range aSelRange; // for selection expansion
BrowserColumns* pCols; // array of column-descriptions
@@ -304,7 +304,7 @@ class SVT_DLLPUBLIC BrowseBox
::std::auto_ptr< ::svt::BrowseBoxImpl > m_pImpl; // impl structure of the BrowseBox object
- BOOL m_bFocusOnlyCursor; // hide cursor if we don't have the focus
+ sal_Bool m_bFocusOnlyCursor; // hide cursor if we don't have the focus
Color m_aCursorColor; // special color for cursor, COL_TRANSPARENT for usual (VCL-painted) "inverted" cursor
BrowserMode m_nCurrentMode; // last argument of SetMode (redundant, as our other members represent the current settings, too)
@@ -312,16 +312,16 @@ private:
//#if 0 // _SOLAR__PRIVATE
SVT_DLLPRIVATE void ConstructImpl(BrowserMode nMode);
SVT_DLLPRIVATE void ExpandRowSelection( const BrowserMouseEvent& rEvt );
- SVT_DLLPRIVATE void ToggleSelection( BOOL bForce = FALSE );
+ SVT_DLLPRIVATE void ToggleSelection( sal_Bool bForce = sal_False );
SVT_DLLPRIVATE void UpdateScrollbars();
SVT_DLLPRIVATE void AutoSizeLastColumn();
SVT_DLLPRIVATE long ImpGetDataRowHeight() const;
- SVT_DLLPRIVATE Rectangle ImplFieldRectPixel( long nRow, USHORT nColId ) const;
- SVT_DLLPRIVATE USHORT FrozenColCount() const;
+ SVT_DLLPRIVATE Rectangle ImplFieldRectPixel( long nRow, sal_uInt16 nColId ) const;
+ SVT_DLLPRIVATE sal_uInt16 FrozenColCount() const;
- SVT_DLLPRIVATE void ColumnInserted( USHORT nPos );
+ SVT_DLLPRIVATE void ColumnInserted( sal_uInt16 nPos );
DECL_DLLPRIVATE_LINK( ScrollHdl, ScrollBar * );
DECL_DLLPRIVATE_LINK( EndScrollHdl, ScrollBar * );
@@ -330,26 +330,26 @@ private:
SVT_DLLPRIVATE long GetFrozenWidth() const;
//#endif
- BOOL GoToRow(long nRow, BOOL bRowColMove, BOOL bDoNotModifySelection = FALSE );
+ sal_Bool GoToRow(long nRow, sal_Bool bRowColMove, sal_Bool bDoNotModifySelection = sal_False );
- BOOL GoToColumnId( USHORT nColId, BOOL bMakeVisible, BOOL bRowColMove = FALSE);
- void SelectColumnPos( USHORT nCol, BOOL _bSelect, BOOL bMakeVisible);
- void SelectColumnId( USHORT nColId, BOOL _bSelect, BOOL bMakeVisible)
+ sal_Bool GoToColumnId( sal_uInt16 nColId, sal_Bool bMakeVisible, sal_Bool bRowColMove = sal_False);
+ void SelectColumnPos( sal_uInt16 nCol, sal_Bool _bSelect, sal_Bool bMakeVisible);
+ void SelectColumnId( sal_uInt16 nColId, sal_Bool _bSelect, sal_Bool bMakeVisible)
{ SelectColumnPos( GetColumnPos(nColId), _bSelect, bMakeVisible); }
- void ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, BOOL _bForeignDevice, BOOL _bDrawSelections);
+ void ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, sal_Bool _bForeignDevice, sal_Bool _bDrawSelections);
- BOOL PaintCursorIfHiddenOnce() const { return !m_bFocusOnlyCursor && !HasFocus(); }
+ sal_Bool PaintCursorIfHiddenOnce() const { return !m_bFocusOnlyCursor && !HasFocus(); }
- USHORT ToggleSelectedColumn();
- void SetToggledSelectedColumn(USHORT _nSelectedColumnId);
+ sal_uInt16 ToggleSelectedColumn();
+ void SetToggledSelectedColumn(sal_uInt16 _nSelectedColumnId);
protected:
/// retrieves the XAccessible implementation associated with the BrowseBox instance
::svt::IAccessibleFactory& getAccessibleFactory();
protected:
- USHORT ColCount() const;
+ sal_uInt16 ColCount() const;
// software plug for database access
// Der RowCount wird jetzt intern automatisch gezaehlt
@@ -362,19 +362,19 @@ protected:
// fuer Anzeige im VScrollBar z.B. auf "?" oder setzen
void SetRealRowCount( const String &rRealRowCount );
- // Return Value muss immer TRUE sein - SeekRow *muss* klappen!
+ // Return Value muss immer sal_True sein - SeekRow *muss* klappen!
// (sonst ASSERT) MI: wer hat das eingebaut? Das darf nicht so sein!
/** seeks for the given row position
@param nRow
nRow starts at 0
*/
- virtual BOOL SeekRow( long nRow ) = 0;
+ virtual sal_Bool SeekRow( long nRow ) = 0;
virtual void DrawCursor();
virtual void PaintRow( OutputDevice &rDev, const Rectangle &rRect );
virtual void PaintData( Window& rWin, const Rectangle& rRect );
virtual void PaintField( OutputDevice& rDev, const Rectangle& rRect,
- USHORT nColumnId ) const = 0;
+ sal_uInt16 nColumnId ) const = 0;
// Benachrichtigung an die abgeleitete Klasse, dass sich der sichtbare
// Bereich von Rows geaendert hat. Aus dieser Methode heraus darf
// die abgeleitete Klasse Aenderungen des Model mit Hilfe der Methoden
@@ -392,13 +392,13 @@ protected:
// dadurch aendert sich nur die Numerierung der sichtbaren Rows
// - Scrollen (und daraus resultierend eine andere erste sichtbare Row)
// - Resize des Fensters
- virtual void VisibleRowsChanged( long nNewTopRow, USHORT nNumRows);
+ virtual void VisibleRowsChanged( long nNewTopRow, sal_uInt16 nNumRows);
// Anzahl sichtbarer Rows in dem Fenster (inkl. "angeschnittener" Rows)
- USHORT GetVisibleRows()
- { return (USHORT)((pDataWin->GetOutputSizePixel().Height() - 1 )/ GetDataRowHeight() + 1); }
+ sal_uInt16 GetVisibleRows()
+ { return (sal_uInt16)((pDataWin->GetOutputSizePixel().Height() - 1 )/ GetDataRowHeight() + 1); }
long GetTopRow() { return nTopRow; }
- USHORT GetFirstVisibleColNumber() const { return nFirstCol; }
+ sal_uInt16 GetFirstVisibleColNumber() const { return nFirstCol; }
// Focus-Rect ein-/ausschalten
void DoShowCursor( const char *pWhoLog );
@@ -452,7 +452,7 @@ public:
virtual void GetFocus();
virtual void Resize();
virtual void Paint( const Rectangle& rRect );
- virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags );
+ virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags );
virtual void Command( const CommandEvent& rEvt );
virtual void StartDrag( sal_Int8 _nAction, const Point& _rPosPixel );
@@ -470,18 +470,18 @@ public:
virtual void EndScroll();
virtual void Select();
virtual void DoubleClick( const BrowserMouseEvent& rEvt );
- virtual BOOL IsCursorMoveAllowed( long nNewRow, USHORT nNewColId ) const;
+ virtual sal_Bool IsCursorMoveAllowed( long nNewRow, sal_uInt16 nNewColId ) const;
virtual void CursorMoved();
- virtual void ColumnMoved( USHORT nColId );
- virtual void ColumnResized( USHORT nColId );
- virtual long QueryColumnResize( USHORT nColId, long nWidth );
+ virtual void ColumnMoved( sal_uInt16 nColId );
+ virtual void ColumnResized( sal_uInt16 nColId );
+ virtual long QueryColumnResize( sal_uInt16 nColId, long nWidth );
/// called when the row height has been changed interactively
virtual void RowHeightChanged();
virtual long QueryMinimumRowHeight();
// Window-Control (pass to DataWindow)
- void SetUpdateMode( BOOL bUpdate );
- BOOL GetUpdateMode() const;
+ void SetUpdateMode( sal_Bool bUpdate );
+ sal_Bool GetUpdateMode() const;
// map-mode and font control
void SetFont( const Font& rNewFont );
@@ -495,73 +495,73 @@ public:
const Color& GetGridLineColor() const {return aGridLineColor;}
// inserting, changing, removing and freezing of columns
- void InsertHandleColumn( ULONG nWidth );
- void InsertDataColumn( USHORT nItemId, const Image& rImage,
+ void InsertHandleColumn( sal_uLong nWidth );
+ void InsertDataColumn( sal_uInt16 nItemId, const Image& rImage,
long nSize, HeaderBarItemBits nBits = HIB_STDSTYLE,
- USHORT nPos = HEADERBAR_APPEND );
- void InsertDataColumn( USHORT nItemId, const XubString& rText,
+ sal_uInt16 nPos = HEADERBAR_APPEND );
+ void InsertDataColumn( sal_uInt16 nItemId, const XubString& rText,
long nSize, HeaderBarItemBits nBits = HIB_STDSTYLE,
- USHORT nPos = HEADERBAR_APPEND );
- void InsertDataColumn( USHORT nItemId,
+ sal_uInt16 nPos = HEADERBAR_APPEND );
+ void InsertDataColumn( sal_uInt16 nItemId,
const Image& rImage, const XubString& rText,
long nSize, HeaderBarItemBits nBits = HIB_STDSTYLE,
- USHORT nPos = HEADERBAR_APPEND,
+ sal_uInt16 nPos = HEADERBAR_APPEND,
// Hilfstext bei leerem rText
const String* pHelpText = 0 );
- void SetColumnTitle( USHORT nColumnId, const String &rTitle );
- void SetColumnMode( USHORT nColumnId, BrowserColumnMode nFlags );
- void SetColumnWidth( USHORT nColumnId, ULONG nWidth );
- void SetColumnPos( USHORT nColumnId, USHORT nPos );
- void FreezeColumn( USHORT nColumnId, BOOL bFreeze = TRUE );
+ void SetColumnTitle( sal_uInt16 nColumnId, const String &rTitle );
+ void SetColumnMode( sal_uInt16 nColumnId, BrowserColumnMode nFlags );
+ void SetColumnWidth( sal_uInt16 nColumnId, sal_uLong nWidth );
+ void SetColumnPos( sal_uInt16 nColumnId, sal_uInt16 nPos );
+ void FreezeColumn( sal_uInt16 nColumnId, sal_Bool bFreeze = sal_True );
void UnfreezeColumns();
- void RemoveColumn( USHORT nColumnId );
+ void RemoveColumn( sal_uInt16 nColumnId );
void RemoveColumns();
// control of title and data row height
void SetDataRowHeight( long nPixel );
long GetDataRowHeight() const;
- void SetTitleLines( USHORT nLines );
- USHORT GetTitleLines() const { return nTitleLines; }
+ void SetTitleLines( sal_uInt16 nLines );
+ sal_uInt16 GetTitleLines() const { return nTitleLines; }
virtual long GetTitleHeight() const;
// access to dynamic values of cursor row
- String GetColumnTitle( USHORT nColumnId ) const;
- BrowserColumnMode GetColumnMode( USHORT nColumnId ) const;
- Rectangle GetFieldRect( USHORT nColumnId ) const;
- ULONG GetColumnWidth( USHORT nColumnId ) const;
- USHORT GetColumnId( USHORT nPos ) const;
- USHORT GetColumnPos( USHORT nColumnId ) const;
- BOOL IsFrozen( USHORT nColumnId ) const;
+ String GetColumnTitle( sal_uInt16 nColumnId ) const;
+ BrowserColumnMode GetColumnMode( sal_uInt16 nColumnId ) const;
+ Rectangle GetFieldRect( sal_uInt16 nColumnId ) const;
+ sal_uLong GetColumnWidth( sal_uInt16 nColumnId ) const;
+ sal_uInt16 GetColumnId( sal_uInt16 nPos ) const;
+ sal_uInt16 GetColumnPos( sal_uInt16 nColumnId ) const;
+ sal_Bool IsFrozen( sal_uInt16 nColumnId ) const;
// movement of visible area
void ResetScroll();
long ScrollColumns( long nColumns );
long ScrollRows( long nRows );
long ScrollPages( long nPagesY );
- BOOL MakeFieldVisible( long nRow, USHORT nColId, BOOL bComplete = FALSE );
+ sal_Bool MakeFieldVisible( long nRow, sal_uInt16 nColId, sal_Bool bComplete = sal_False );
// access and movement of cursor
long GetCurRow() const { return nCurRow; }
- USHORT GetCurColumnId() const { return nCurColId; }
- BOOL GoToRow( long nRow );
- BOOL GoToRowAndDoNotModifySelection( long nRow );
- BOOL GoToColumnId( USHORT nColId );
- BOOL GoToRowColumnId( long nRow, USHORT nColId );
+ sal_uInt16 GetCurColumnId() const { return nCurColId; }
+ sal_Bool GoToRow( long nRow );
+ sal_Bool GoToRowAndDoNotModifySelection( long nRow );
+ sal_Bool GoToColumnId( sal_uInt16 nColId );
+ sal_Bool GoToRowColumnId( long nRow, sal_uInt16 nColId );
// selections
virtual void SetNoSelection();
virtual void SelectAll();
- virtual void SelectRow( long nRow, BOOL _bSelect = TRUE, BOOL bExpand = TRUE );
- void SelectColumnPos( USHORT nCol, BOOL _bSelect = TRUE )
- { SelectColumnPos( nCol, _bSelect, TRUE); }
- void SelectColumnId( USHORT nColId, BOOL _bSelect = TRUE )
- { SelectColumnPos( GetColumnPos(nColId), _bSelect, TRUE); }
+ virtual void SelectRow( long nRow, sal_Bool _bSelect = sal_True, sal_Bool bExpand = sal_True );
+ void SelectColumnPos( sal_uInt16 nCol, sal_Bool _bSelect = sal_True )
+ { SelectColumnPos( nCol, _bSelect, sal_True); }
+ void SelectColumnId( sal_uInt16 nColId, sal_Bool _bSelect = sal_True )
+ { SelectColumnPos( GetColumnPos(nColId), _bSelect, sal_True); }
long GetSelectRowCount() const;
- USHORT GetSelectColumnCount() const;
+ sal_uInt16 GetSelectColumnCount() const;
virtual bool IsRowSelected( long nRow ) const;
- bool IsColumnSelected( USHORT nColumnId ) const;
+ bool IsColumnSelected( sal_uInt16 nColumnId ) const;
sal_Bool IsAllSelected() const;
- long FirstSelectedRow( BOOL bInverse = FALSE );
+ long FirstSelectedRow( sal_Bool bInverse = sal_False );
long LastSelectedRow();
long PrevSelectedRow();
long NextSelectedRow();
@@ -573,40 +573,40 @@ public:
long FirstSelectedColumn( ) const;
long NextSelectedColumn( ) const;
- BOOL IsResizing() const { return bResizing; }
+ sal_Bool IsResizing() const { return bResizing; }
// access to positions of fields, column and rows
Window& GetEventWindow() const;
Window& GetDataWindow() const { return *pDataWin; }
Rectangle GetRowRectPixel( long nRow,
- BOOL bRelToBrowser = TRUE ) const;
- Rectangle GetFieldRectPixel( long nRow, USHORT nColId,
- BOOL bRelToBrowser = TRUE) const;
- BOOL IsFieldVisible( long nRow, USHORT nColId,
- BOOL bComplete = FALSE ) const;
+ sal_Bool bRelToBrowser = sal_True ) const;
+ Rectangle GetFieldRectPixel( long nRow, sal_uInt16 nColId,
+ sal_Bool bRelToBrowser = sal_True) const;
+ sal_Bool IsFieldVisible( long nRow, sal_uInt16 nColId,
+ sal_Bool bComplete = sal_False ) const;
long GetRowAtYPosPixel( long nY,
- BOOL bRelToBrowser = TRUE ) const;
- USHORT GetColumnAtXPosPixel( long nX,
- BOOL bRelToBrowser = TRUE ) const;
+ sal_Bool bRelToBrowser = sal_True ) const;
+ sal_uInt16 GetColumnAtXPosPixel( long nX,
+ sal_Bool bRelToBrowser = sal_True ) const;
// invalidations
void Clear();
- void RowRemoved( long nRow, long nNumRows = 1, BOOL bDoPaint = TRUE );
- void RowModified( long nRow, USHORT nColId = USHRT_MAX );
- void RowInserted( long nRow, long nNumRows = 1, BOOL bDoPaint = TRUE, BOOL bKeepSelection = FALSE );
+ void RowRemoved( long nRow, long nNumRows = 1, sal_Bool bDoPaint = sal_True );
+ void RowModified( long nRow, sal_uInt16 nColId = USHRT_MAX );
+ void RowInserted( long nRow, long nNumRows = 1, sal_Bool bDoPaint = sal_True, sal_Bool bKeepSelection = sal_False );
// miscellanous
- void ReserveControlArea( USHORT nWidth = USHRT_MAX );
+ void ReserveControlArea( sal_uInt16 nWidth = USHRT_MAX );
Rectangle GetControlArea() const;
- BOOL ProcessKey( const KeyEvent& rEvt );
- void Dispatch( USHORT nId );
+ sal_Bool ProcessKey( const KeyEvent& rEvt );
+ void Dispatch( sal_uInt16 nId );
void SetMode( BrowserMode nMode = 0 );
BrowserMode GetMode( ) const { return m_nCurrentMode; }
bool IsInCommandEvent() const;
void SetCursorColor(const Color& _rCol);
Color GetCursorColor() const { return m_aCursorColor; }
- void ResetSelecting() { bSelecting = FALSE; }
+ void ResetSelecting() { bSelecting = sal_False; }
/** specifies that the user is allowed to interactively change the height of a row,
by simply dragging an arbitrary row separator.
@@ -614,21 +614,21 @@ public:
Note that this works only if there's a handle column, since only in this case,
there *is* something for the user to click onto
*/
- void EnableInteractiveRowHeight( BOOL _bEnable = TRUE ) { mbInteractiveRowHeight = _bEnable; }
- BOOL IsInteractiveRowHeightEnabled( ) const { return mbInteractiveRowHeight; }
+ void EnableInteractiveRowHeight( sal_Bool _bEnable = sal_True ) { mbInteractiveRowHeight = _bEnable; }
+ sal_Bool IsInteractiveRowHeightEnabled( ) const { return mbInteractiveRowHeight; }
/// access to selected methods, to be granted to the BrowserColumn
struct BrowserColumnAccess { friend class BrowserColumn; private: BrowserColumnAccess() { } };
/** public version of PaintField, with selected access rights for the BrowserColumn
*/
- void DoPaintField( OutputDevice& rDev, const Rectangle& rRect, USHORT nColumnId, BrowserColumnAccess ) const
+ void DoPaintField( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId, BrowserColumnAccess ) const
{ PaintField( rDev, rRect, nColumnId ); }
/** suggests a default width for a column containing a given text
The width is calculated so that the text fits completely, plus som margin.
*/
- ULONG GetDefaultColumnWidth( const String& _rText ) const;
+ sal_uLong GetDefaultColumnWidth( const String& _rText ) const;
/** GetCellText returns the text at the given position
@param _nRow
@@ -638,12 +638,12 @@ public:
@return
the text out of the cell
*/
- virtual String GetCellText(long _nRow, USHORT _nColId) const;
+ virtual String GetCellText(long _nRow, sal_uInt16 _nColId) const;
/** @return
the current column count
*/
- USHORT GetColumnCount() const { return ColCount(); }
+ sal_uInt16 GetColumnCount() const { return ColCount(); }
/** commitBrowseBoxEvent commit the event at all listeners of the browsebox
@param nEventId
@@ -692,7 +692,7 @@ public:
@return
the Rectangle
*/
- virtual Rectangle calcHeaderRect(sal_Bool _bIsColumnBar,BOOL _bOnScreen = TRUE);
+ virtual Rectangle calcHeaderRect(sal_Bool _bIsColumnBar,sal_Bool _bOnScreen = sal_True);
/** calculates the Rectangle of the table
@param _bOnScreen
@@ -700,7 +700,7 @@ public:
@return
the Rectangle
*/
- virtual Rectangle calcTableRect(BOOL _bOnScreen = TRUE);
+ virtual Rectangle calcTableRect(sal_Bool _bOnScreen = sal_True);
/**
@param _nRowId
@@ -712,7 +712,7 @@ public:
@return
the Rectangle
*/
- virtual Rectangle GetFieldRectPixelAbs(sal_Int32 _nRowId,sal_uInt16 _nColId, BOOL _bIsHeader, BOOL _bOnScreen = TRUE);
+ virtual Rectangle GetFieldRectPixelAbs(sal_Int32 _nRowId,sal_uInt16 _nColId, sal_Bool _bIsHeader, sal_Bool _bOnScreen = sal_True);
/// return <TRUE/> if and only if the accessible object for this instance has been created and is alive
sal_Bool isAccessibleAlive( ) const;
@@ -836,7 +836,7 @@ public:
virtual sal_uInt16 GetCurrColumn() const;
virtual sal_Bool HasRowHeader() const;
virtual sal_Bool IsCellFocusable() const;
- virtual BOOL GoToCell( sal_Int32 _nRow, sal_uInt16 _nColumn );
+ virtual sal_Bool GoToCell( sal_Int32 _nRow, sal_uInt16 _nColumn );
virtual void SelectColumn( sal_uInt16 _nColumn, sal_Bool _bSelect = sal_True );
virtual sal_Bool IsColumnSelected( long _nColumn ) const;
virtual sal_Int32 GetSelectedRowCount() const;
@@ -844,11 +844,11 @@ public:
virtual void GetAllSelectedRows( ::com::sun::star::uno::Sequence< sal_Int32 >& _rRows ) const;
virtual void GetAllSelectedColumns( ::com::sun::star::uno::Sequence< sal_Int32 >& _rColumns ) const;
virtual sal_Bool IsCellVisible( sal_Int32 _nRow, sal_uInt16 _nColumn ) const;
- virtual String GetAccessibleCellText(long _nRow, USHORT _nColPos) const;
- virtual BOOL GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector );
+ virtual String GetAccessibleCellText(long _nRow, sal_uInt16 _nColPos) const;
+ virtual sal_Bool GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector );
virtual Rectangle GetWindowExtentsRelative( Window *pRelativeWindow ) const;
virtual void GrabFocus();
- virtual XACC GetAccessible( BOOL bCreate = TRUE );
+ virtual XACC GetAccessible( sal_Bool bCreate = sal_True );
virtual Window* GetAccessibleParentWindow() const;
virtual Window* GetWindowInstance();
diff --git a/svtools/inc/svtools/calendar.hxx b/svtools/inc/svtools/calendar.hxx
index f85887873bb0..61e75705ba01 100644
--- a/svtools/inc/svtools/calendar.hxx
+++ b/svtools/inc/svtools/calendar.hxx
@@ -138,16 +138,16 @@ wenn man beispielsweise den Bereich eingrenzen oder erweitern will. Der
Bereich wird mit SelectDate()/SelectDateRange() umgesetzt und mit
GetSelectDateCount()/GetSelectDate() abgefragt. Wenn man wissen moechte,
in welche Richtung selektiert wird, kann dies ueber IsSelectLeft()
-abgefragt werden. TRUE bedeutet eine Selektion nach links oder oben,
-FALSE eine Selektion nach rechts oder unten.
+abgefragt werden. sal_True bedeutet eine Selektion nach links oder oben,
+sal_False eine Selektion nach rechts oder unten.
--------------------------------------------------------------------------
Wenn sich der Date-Range-Bereich anpasst und man dort die Selektion
uebernehmen will, sollte dies nur gemacht werden, wenn
-IsScrollDateRangeChanged() TRUE zurueckliefert. Denn diese Methode liefert
-TRUE zurueck, wenn der Bereich durch Betaetigung von den Scroll-Buttons
-ausgeloest wurde. Bei FALSE wurde dies durch Resize(), Methoden-Aufrufen
+IsScrollDateRangeChanged() sal_True zurueckliefert. Denn diese Methode liefert
+sal_True zurueck, wenn der Bereich durch Betaetigung von den Scroll-Buttons
+ausgeloest wurde. Bei sal_False wurde dies durch Resize(), Methoden-Aufrufen
oder durch Beendigung einer Selektion ausgeloest.
*************************************************************************/
@@ -169,7 +169,7 @@ oder durch Beendigung einer Selektion ausgeloest.
#define WB_MULTISELECT ((WinBits)0x00400000)
#endif
-#define DIB_BOLD ((USHORT)0x0001)
+#define DIB_BOLD ((sal_uInt16)0x0001)
// ------------
// - Calendar -
@@ -203,7 +203,7 @@ private:
Color* mpStandardColor;
Color* mpSaturdayColor;
Color* mpSundayColor;
- ULONG mnDayCount;
+ sal_uLong mnDayCount;
long mnDaysOffX;
long mnWeekDayOffY;
long mnDaysOffY;
@@ -218,10 +218,10 @@ private:
long mnDummy3;
long mnDummy4;
WinBits mnWinStyle;
- USHORT mnFirstYear;
- USHORT mnLastYear;
- USHORT mnRequestYear;
- BOOL mbCalc:1,
+ sal_uInt16 mnFirstYear;
+ sal_uInt16 mnLastYear;
+ sal_uInt16 mnRequestYear;
+ sal_Bool mbCalc:1,
mbFormat:1,
mbDrag:1,
mbSelection:1,
@@ -245,7 +245,7 @@ private:
Link maDoubleClickHdl;
Link maSelectHdl;
Timer maDragScrollTimer;
- USHORT mnDragScrollHitTest;
+ sal_uInt16 mnDragScrollHitTest;
#ifdef _SV_CALENDAR_CXX
using Control::ImplInitSettings;
@@ -255,30 +255,30 @@ private:
SVT_DLLPRIVATE void ImplGetWeekFont( Font& rFont ) const;
SVT_DLLPRIVATE void ImplFormat();
using Window::ImplHitTest;
- SVT_DLLPRIVATE USHORT ImplHitTest( const Point& rPos, Date& rDate ) const;
- SVT_DLLPRIVATE void ImplDrawSpin( BOOL bDrawPrev = TRUE, BOOL bDrawNext = TRUE );
+ SVT_DLLPRIVATE sal_uInt16 ImplHitTest( const Point& rPos, Date& rDate ) const;
+ SVT_DLLPRIVATE void ImplDrawSpin( sal_Bool bDrawPrev = sal_True, sal_Bool bDrawNext = sal_True );
SVT_DLLPRIVATE void ImplDrawDate( long nX, long nY,
- USHORT nDay, USHORT nMonth, USHORT nYear,
+ sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear,
DayOfWeek eDayOfWeek,
- BOOL bBack = TRUE, BOOL bOther = FALSE,
- ULONG nToday = 0 );
- SVT_DLLPRIVATE void ImplDraw( BOOL bPaint = FALSE );
+ sal_Bool bBack = sal_True, sal_Bool bOther = sal_False,
+ sal_uLong nToday = 0 );
+ SVT_DLLPRIVATE void ImplDraw( sal_Bool bPaint = sal_False );
SVT_DLLPRIVATE void ImplUpdateDate( const Date& rDate );
SVT_DLLPRIVATE void ImplUpdateSelection( Table* pOld );
- SVT_DLLPRIVATE void ImplMouseSelect( const Date& rDate, USHORT nHitTest,
- BOOL bMove, BOOL bExpand, BOOL bExtended );
- SVT_DLLPRIVATE void ImplUpdate( BOOL bCalcNew = FALSE );
+ SVT_DLLPRIVATE void ImplMouseSelect( const Date& rDate, sal_uInt16 nHitTest,
+ sal_Bool bMove, sal_Bool bExpand, sal_Bool bExtended );
+ SVT_DLLPRIVATE void ImplUpdate( sal_Bool bCalcNew = sal_False );
using Window::ImplScroll;
- SVT_DLLPRIVATE void ImplScroll( BOOL bPrev );
+ SVT_DLLPRIVATE void ImplScroll( sal_Bool bPrev );
SVT_DLLPRIVATE void ImplInvertDropPos();
SVT_DLLPRIVATE void ImplShowMenu( const Point& rPos, const Date& rDate );
- SVT_DLLPRIVATE void ImplTracking( const Point& rPos, BOOL bRepeat );
- SVT_DLLPRIVATE void ImplEndTracking( BOOL bCancel );
+ SVT_DLLPRIVATE void ImplTracking( const Point& rPos, sal_Bool bRepeat );
+ SVT_DLLPRIVATE void ImplEndTracking( sal_Bool bCancel );
SVT_DLLPRIVATE DayOfWeek ImplGetWeekStart() const;
#endif
protected:
- BOOL ShowDropPos( const Point& rPos, Date& rDate );
+ sal_Bool ShowDropPos( const Point& rPos, Date& rDate );
void HideDropPos();
DECL_STATIC_LINK( Calendar, ScrollHdl, Timer *);
@@ -316,29 +316,29 @@ public:
/// Set how many days of a week must reside in the first week of a year.
void SetMinimumNumberOfDaysInWeek( sal_Int16 nDays );
- void SelectDate( const Date& rDate, BOOL bSelect = TRUE );
+ void SelectDate( const Date& rDate, sal_Bool bSelect = sal_True );
void SelectDateRange( const Date& rStartDate, const Date& rEndDate,
- BOOL bSelect = TRUE );
+ sal_Bool bSelect = sal_True );
void SetNoSelection();
- BOOL IsDateSelected( const Date& rDate ) const;
- ULONG GetSelectDateCount() const;
- Date GetSelectDate( ULONG nIndex = 0 ) const;
- void EnableCallEverySelect( BOOL bEvery = TRUE ) { mbAllSel = bEvery; }
- BOOL IsCallEverySelectEnabled() const { return mbAllSel; }
+ sal_Bool IsDateSelected( const Date& rDate ) const;
+ sal_uLong GetSelectDateCount() const;
+ Date GetSelectDate( sal_uLong nIndex = 0 ) const;
+ void EnableCallEverySelect( sal_Bool bEvery = sal_True ) { mbAllSel = bEvery; }
+ sal_Bool IsCallEverySelectEnabled() const { return mbAllSel; }
- USHORT GetRequestYear() const { return mnRequestYear; }
+ sal_uInt16 GetRequestYear() const { return mnRequestYear; }
void SetCurDate( const Date& rNewDate );
Date GetCurDate() const { return maCurDate; }
void SetFirstDate( const Date& rNewFirstDate );
Date GetFirstDate() const { return maFirstDate; }
Date GetLastDate() const { return GetFirstDate() + mnDayCount; }
- ULONG GetDayCount() const { return mnDayCount; }
+ sal_uLong GetDayCount() const { return mnDayCount; }
Date GetFirstMonth() const;
Date GetLastMonth() const;
- USHORT GetMonthCount() const;
- BOOL GetDate( const Point& rPos, Date& rDate ) const;
+ sal_uInt16 GetMonthCount() const;
+ sal_Bool GetDate( const Point& rPos, Date& rDate ) const;
Rectangle GetDateRect( const Date& rDate ) const;
- BOOL GetDropDate( Date& rDate ) const;
+ sal_Bool GetDropDate( Date& rDate ) const;
long GetCurMonthPerLine() const { return mnMonthPerLine; }
long GetCurLines() const { return mnLines; }
@@ -353,7 +353,7 @@ public:
void AddDateInfo( const Date& rDate, const XubString& rText,
const Color* pTextColor = NULL,
const Color* pFrameColor = NULL,
- USHORT nFlags = 0 );
+ sal_uInt16 nFlags = 0 );
void RemoveDateInfo( const Date& rDate );
void ClearDateInfo();
XubString GetDateInfoText( const Date& rDate );
@@ -361,9 +361,9 @@ public:
void StartSelection();
void EndSelection();
- BOOL IsTravelSelect() const { return mbTravelSelect; }
- BOOL IsScrollDateRangeChanged() const { return mbScrollDateRange; }
- BOOL IsSelectLeft() const { return mbSelLeft; }
+ sal_Bool IsTravelSelect() const { return mbTravelSelect; }
+ sal_Bool IsScrollDateRangeChanged() const { return mbScrollDateRange; }
+ sal_Bool IsSelectLeft() const { return mbSelLeft; }
Size CalcWindowSizePixel( long nCalcMonthPerLine = 1,
long nCalcLines = 1 ) const;
@@ -459,8 +459,8 @@ private:
PushButton* mpTodayBtn;
PushButton* mpNoneBtn;
Date maDefaultDate;
- BOOL mbToday;
- BOOL mbNone;
+ sal_Bool mbToday;
+ sal_Bool mbNone;
Link maSelectHdl;
#ifdef _SV_CALENDAR_CXX
@@ -476,17 +476,17 @@ public:
virtual void Select();
- virtual BOOL ShowDropDown( BOOL bShow );
+ virtual sal_Bool ShowDropDown( sal_Bool bShow );
virtual Calendar* CreateCalendar( Window* pParent );
Calendar* GetCalendar();
void SetDefaultDate( const Date& rDate ) { maDefaultDate = rDate; }
Date GetDefaultDate() const { return maDefaultDate; }
- void EnableToday( BOOL bToday = TRUE ) { mbToday = bToday; }
- BOOL IsTodayEnabled() const { return mbToday; }
- void EnableNone( BOOL bNone = TRUE ) { mbNone = bNone; }
- BOOL IsNoneEnabled() const { return mbNone; }
+ void EnableToday( sal_Bool bToday = sal_True ) { mbToday = bToday; }
+ sal_Bool IsTodayEnabled() const { return mbToday; }
+ void EnableNone( sal_Bool bNone = sal_True ) { mbNone = bNone; }
+ sal_Bool IsNoneEnabled() const { return mbNone; }
void SetCalendarStyle( WinBits nStyle ) { mnCalendarStyle = nStyle; }
WinBits GetCalendarStyle() const { return mnCalendarStyle; }
diff --git a/svtools/inc/svtools/cliplistener.hxx b/svtools/inc/svtools/cliplistener.hxx
index ab20d6d7aa20..5051633bd6b6 100644
--- a/svtools/inc/svtools/cliplistener.hxx
+++ b/svtools/inc/svtools/cliplistener.hxx
@@ -46,7 +46,7 @@ public:
TransferableClipboardListener( const Link& rCallback );
~TransferableClipboardListener();
- void AddRemoveListener( Window* pWin, BOOL bAdd );
+ void AddRemoveListener( Window* pWin, sal_Bool bAdd );
void ClearCallbackLink();
// XEventListener
diff --git a/svtools/inc/svtools/colctrl.hxx b/svtools/inc/svtools/colctrl.hxx
index d76f8e881269..7841ce93952e 100644
--- a/svtools/inc/svtools/colctrl.hxx
+++ b/svtools/inc/svtools/colctrl.hxx
@@ -72,7 +72,7 @@ public:
Color GetColor() const { return maColor; };
void SetColor( const Color& rCol );
- void SetColor( const ColorHSB& rCol, BOOL bSetColor = TRUE );
+ void SetColor( const ColorHSB& rCol, sal_Bool bSetColor = sal_True );
short GetLuminance() const { return mnLuminance; };
void SetLuminance( short nLum );
@@ -111,27 +111,27 @@ enum CMCPosition { CMC_TOPLEFT, CMC_TOPRIGHT, CMC_BOTTOMLEFT, CMC_BOTTOMRIGHT, C
class ColorMixingControl : public ValueSet
{
private:
- USHORT mnRows;
- USHORT mnColumns;
+ sal_uInt16 mnRows;
+ sal_uInt16 mnColumns;
Color maColor[4];
void Initialize();
- Color CalcDifferenceColor( USHORT nCol1, USHORT nCol2, USHORT nSteps );
- void FillRow( USHORT nRow );
- void FillColumn( USHORT nColumn );
+ Color CalcDifferenceColor( sal_uInt16 nCol1, sal_uInt16 nCol2, sal_uInt16 nSteps );
+ void FillRow( sal_uInt16 nRow );
+ void FillColumn( sal_uInt16 nColumn );
public:
ColorMixingControl( Window* pParent, WinBits nStyle = 0,
- USHORT nRows = 4, USHORT nColumns = 4 );
+ sal_uInt16 nRows = 4, sal_uInt16 nColumns = 4 );
ColorMixingControl( Window* pParent, const ResId& rResId,
- USHORT nRows = 4, USHORT nColumns = 4 );
+ sal_uInt16 nRows = 4, sal_uInt16 nColumns = 4 );
~ColorMixingControl();
- USHORT GetRows() const { return mnRows; };
- void SetRows( USHORT nRows );
- USHORT GetColumns() const { return mnColumns; };
- void SetColumns( USHORT nColumns );
+ sal_uInt16 GetRows() const { return mnRows; };
+ void SetRows( sal_uInt16 nRows );
+ sal_uInt16 GetColumns() const { return mnColumns; };
+ void SetColumns( sal_uInt16 nColumns );
using ValueSet::GetColor;
Color GetColor( CMCPosition ePos ) const { return maColor[ ePos ]; };
@@ -149,23 +149,23 @@ public:
class ColorHSB
{
private:
- USHORT mnHue; // Farbwinkel, 360 Grad
- USHORT mnSat; // Saturation, 100 %
- USHORT mnBri; // Brightness, 100 %
+ sal_uInt16 mnHue; // Farbwinkel, 360 Grad
+ sal_uInt16 mnSat; // Saturation, 100 %
+ sal_uInt16 mnBri; // Brightness, 100 %
public:
ColorHSB()
{ mnHue=0; mnSat=0; mnBri=0; }
- ColorHSB( USHORT nH, USHORT nS, USHORT nB )
+ ColorHSB( sal_uInt16 nH, sal_uInt16 nS, sal_uInt16 nB )
{ mnHue=nH; mnSat=nS; mnBri=nB; }
ColorHSB( const Color& rColor );
- void SetHue( USHORT nH ) { mnHue=nH; }
- void SetSat( USHORT nS ) { mnSat=nS; }
- void SetBri( USHORT nB ) { mnBri=nB; }
- USHORT GetHue() const { return mnHue; }
- USHORT GetSat() const { return mnSat; }
- USHORT GetBri() const { return mnBri; }
+ void SetHue( sal_uInt16 nH ) { mnHue=nH; }
+ void SetSat( sal_uInt16 nS ) { mnSat=nS; }
+ void SetBri( sal_uInt16 nB ) { mnBri=nB; }
+ sal_uInt16 GetHue() const { return mnHue; }
+ sal_uInt16 GetSat() const { return mnSat; }
+ sal_uInt16 GetBri() const { return mnBri; }
Color GetRGB() const;
};
@@ -176,26 +176,26 @@ public:
class ColorCMYK
{
private:
- USHORT mnCyan;
- USHORT mnMagenta;
- USHORT mnYellow;
- USHORT mnKey;
+ sal_uInt16 mnCyan;
+ sal_uInt16 mnMagenta;
+ sal_uInt16 mnYellow;
+ sal_uInt16 mnKey;
public:
ColorCMYK()
{ mnCyan=0; mnMagenta=0; mnYellow=0; mnKey=100; }
- ColorCMYK( USHORT nC, USHORT nM, USHORT nY, USHORT nK )
+ ColorCMYK( sal_uInt16 nC, sal_uInt16 nM, sal_uInt16 nY, sal_uInt16 nK )
{ mnCyan=nC; mnMagenta=nM; mnYellow=nY; mnKey=nK; }
ColorCMYK( const Color& rColor );
- void SetCyan( USHORT nC ) { mnCyan=nC; }
- void SetMagenta( USHORT nM ) { mnMagenta=nM; }
- void SetYellow( USHORT nY ) { mnYellow=nY; }
- void SetKey( USHORT nK ) { mnKey=nK; }
- USHORT GetCyan() const { return mnCyan; }
- USHORT GetMagenta() const { return mnMagenta; }
- USHORT GetYellow() const { return mnYellow; }
- USHORT GetKey() const { return mnKey; }
+ void SetCyan( sal_uInt16 nC ) { mnCyan=nC; }
+ void SetMagenta( sal_uInt16 nM ) { mnMagenta=nM; }
+ void SetYellow( sal_uInt16 nY ) { mnYellow=nY; }
+ void SetKey( sal_uInt16 nK ) { mnKey=nK; }
+ sal_uInt16 GetCyan() const { return mnCyan; }
+ sal_uInt16 GetMagenta() const { return mnMagenta; }
+ sal_uInt16 GetYellow() const { return mnYellow; }
+ sal_uInt16 GetKey() const { return mnKey; }
Color GetRGB() const;
};
diff --git a/svtools/inc/svtools/ctrlbox.hxx b/svtools/inc/svtools/ctrlbox.hxx
index 9e6e942daf1e..46e3a64d49f6 100644
--- a/svtools/inc/svtools/ctrlbox.hxx
+++ b/svtools/inc/svtools/ctrlbox.hxx
@@ -181,60 +181,60 @@ public:
virtual void UserDraw( const UserDrawEvent& rUDEvt );
using ListBox::InsertEntry;
- virtual USHORT InsertEntry( const XubString& rStr,
- USHORT nPos = LISTBOX_APPEND );
- virtual USHORT InsertEntry( const Color& rColor, const XubString& rStr,
- USHORT nPos = LISTBOX_APPEND );
+ virtual sal_uInt16 InsertEntry( const XubString& rStr,
+ sal_uInt16 nPos = LISTBOX_APPEND );
+ virtual sal_uInt16 InsertEntry( const Color& rColor, const XubString& rStr,
+ sal_uInt16 nPos = LISTBOX_APPEND );
void InsertAutomaticEntry();
using ListBox::RemoveEntry;
- virtual void RemoveEntry( USHORT nPos );
+ virtual void RemoveEntry( sal_uInt16 nPos );
virtual void Clear();
void CopyEntries( const ColorListBox& rBox );
using ListBox::GetEntryPos;
- virtual USHORT GetEntryPos( const Color& rColor ) const;
- virtual Color GetEntryColor( USHORT nPos ) const;
+ virtual sal_uInt16 GetEntryPos( const Color& rColor ) const;
+ virtual Color GetEntryColor( sal_uInt16 nPos ) const;
Size GetImageSize() const { return aImageSize; }
- void SelectEntry( const XubString& rStr, BOOL bSelect = TRUE )
+ void SelectEntry( const XubString& rStr, sal_Bool bSelect = sal_True )
{ ListBox::SelectEntry( rStr, bSelect ); }
- void SelectEntry( const Color& rColor, BOOL bSelect = TRUE );
- XubString GetSelectEntry( USHORT nSelIndex = 0 ) const
+ void SelectEntry( const Color& rColor, sal_Bool bSelect = sal_True );
+ XubString GetSelectEntry( sal_uInt16 nSelIndex = 0 ) const
{ return ListBox::GetSelectEntry( nSelIndex ); }
- Color GetSelectEntryColor( USHORT nSelIndex = 0 ) const;
- BOOL IsEntrySelected( const XubString& rStr ) const
+ Color GetSelectEntryColor( sal_uInt16 nSelIndex = 0 ) const;
+ sal_Bool IsEntrySelected( const XubString& rStr ) const
{ return ListBox::IsEntrySelected( rStr ); }
- BOOL IsEntrySelected( const Color& rColor ) const;
+ sal_Bool IsEntrySelected( const Color& rColor ) const;
private:
// declared as private because some compilers would generate the default functions
ColorListBox( const ColorListBox& );
ColorListBox& operator =( const ColorListBox& );
- void SetEntryData( USHORT nPos, void* pNewData );
- void* GetEntryData( USHORT nPos ) const;
+ void SetEntryData( sal_uInt16 nPos, void* pNewData );
+ void* GetEntryData( sal_uInt16 nPos ) const;
};
-inline void ColorListBox::SelectEntry( const Color& rColor, BOOL bSelect )
+inline void ColorListBox::SelectEntry( const Color& rColor, sal_Bool bSelect )
{
- USHORT nPos = GetEntryPos( rColor );
+ sal_uInt16 nPos = GetEntryPos( rColor );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
ListBox::SelectEntryPos( nPos, bSelect );
}
-inline BOOL ColorListBox::IsEntrySelected( const Color& rColor ) const
+inline sal_Bool ColorListBox::IsEntrySelected( const Color& rColor ) const
{
- USHORT nPos = GetEntryPos( rColor );
+ sal_uInt16 nPos = GetEntryPos( rColor );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
return IsEntryPosSelected( nPos );
else
- return FALSE;
+ return sal_False;
}
-inline Color ColorListBox::GetSelectEntryColor( USHORT nSelIndex ) const
+inline Color ColorListBox::GetSelectEntryColor( sal_uInt16 nSelIndex ) const
{
- USHORT nPos = GetSelectEntryPos( nSelIndex );
+ sal_uInt16 nPos = GetSelectEntryPos( nSelIndex );
Color aColor;
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
aColor = GetEntryColor( nPos );
@@ -259,7 +259,7 @@ class SVT_DLLPUBLIC LineListBox : public ListBox
using Window::ImplInit;
SVT_DLLPRIVATE void ImplInit();
void UpdateLineColors( void );
- BOOL UpdatePaintLineColor( void ); // returns TRUE if maPaintCol has changed
+ sal_Bool UpdatePaintLineColor( void ); // returns sal_True if maPaintCol has changed
inline const Color& GetPaintColor( void ) const;
virtual void DataChanged( const DataChangedEvent& rDCEvt );
@@ -269,25 +269,25 @@ public:
virtual ~LineListBox();
using ListBox::InsertEntry;
- virtual USHORT InsertEntry( const XubString& rStr, USHORT nPos = LISTBOX_APPEND );
- virtual USHORT InsertEntry( long nLine1, long nLine2 = 0, long nDistance = 0, USHORT nPos = LISTBOX_APPEND );
+ virtual sal_uInt16 InsertEntry( const XubString& rStr, sal_uInt16 nPos = LISTBOX_APPEND );
+ virtual sal_uInt16 InsertEntry( long nLine1, long nLine2 = 0, long nDistance = 0, sal_uInt16 nPos = LISTBOX_APPEND );
using ListBox::RemoveEntry;
- virtual void RemoveEntry( USHORT nPos );
+ virtual void RemoveEntry( sal_uInt16 nPos );
virtual void Clear();
using ListBox::GetEntryPos;
- USHORT GetEntryPos( long nLine1, long nLine2 = 0, long nDistance = 0 ) const;
- long GetEntryLine1( USHORT nPos ) const;
- long GetEntryLine2( USHORT nPos ) const;
- long GetEntryDistance( USHORT nPos ) const;
-
- inline void SelectEntry( const XubString& rStr, BOOL bSelect = TRUE ) { ListBox::SelectEntry( rStr, bSelect ); }
- void SelectEntry( long nLine1, long nLine2 = 0, long nDistance = 0, BOOL bSelect = TRUE );
- long GetSelectEntryLine1( USHORT nSelIndex = 0 ) const;
- long GetSelectEntryLine2( USHORT nSelIndex = 0 ) const;
- long GetSelectEntryDistance( USHORT nSelIndex = 0 ) const;
- inline BOOL IsEntrySelected( const XubString& rStr ) const { return ListBox::IsEntrySelected( rStr ); }
- BOOL IsEntrySelected( long nLine1, long nLine2 = 0, long nDistance = 0 ) const;
+ sal_uInt16 GetEntryPos( long nLine1, long nLine2 = 0, long nDistance = 0 ) const;
+ long GetEntryLine1( sal_uInt16 nPos ) const;
+ long GetEntryLine2( sal_uInt16 nPos ) const;
+ long GetEntryDistance( sal_uInt16 nPos ) const;
+
+ inline void SelectEntry( const XubString& rStr, sal_Bool bSelect = sal_True ) { ListBox::SelectEntry( rStr, bSelect ); }
+ void SelectEntry( long nLine1, long nLine2 = 0, long nDistance = 0, sal_Bool bSelect = sal_True );
+ long GetSelectEntryLine1( sal_uInt16 nSelIndex = 0 ) const;
+ long GetSelectEntryLine2( sal_uInt16 nSelIndex = 0 ) const;
+ long GetSelectEntryDistance( sal_uInt16 nSelIndex = 0 ) const;
+ inline sal_Bool IsEntrySelected( const XubString& rStr ) const { return ListBox::IsEntrySelected( rStr ); }
+ sal_Bool IsEntrySelected( long nLine1, long nLine2 = 0, long nDistance = 0 ) const;
inline void SetUnit( FieldUnit eNewUnit ) { eUnit = eNewUnit; }
inline FieldUnit GetUnit() const { return eUnit; }
@@ -301,51 +301,51 @@ private:
// declared as private because some compilers would generate the default methods
LineListBox( const LineListBox& );
LineListBox& operator =( const LineListBox& );
- void SetEntryData( USHORT nPos, void* pNewData );
- void* GetEntryData( USHORT nPos ) const;
+ void SetEntryData( sal_uInt16 nPos, void* pNewData );
+ void* GetEntryData( sal_uInt16 nPos ) const;
};
-inline void LineListBox::SelectEntry( long nLine1, long nLine2, long nDistance, BOOL bSelect )
+inline void LineListBox::SelectEntry( long nLine1, long nLine2, long nDistance, sal_Bool bSelect )
{
- USHORT nPos = GetEntryPos( nLine1, nLine2, nDistance );
+ sal_uInt16 nPos = GetEntryPos( nLine1, nLine2, nDistance );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
ListBox::SelectEntryPos( nPos, bSelect );
}
-inline long LineListBox::GetSelectEntryLine1( USHORT nSelIndex ) const
+inline long LineListBox::GetSelectEntryLine1( sal_uInt16 nSelIndex ) const
{
- USHORT nPos = GetSelectEntryPos( nSelIndex );
+ sal_uInt16 nPos = GetSelectEntryPos( nSelIndex );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
return GetEntryLine1( nPos );
else
return 0;
}
-inline long LineListBox::GetSelectEntryLine2( USHORT nSelIndex ) const
+inline long LineListBox::GetSelectEntryLine2( sal_uInt16 nSelIndex ) const
{
- USHORT nPos = GetSelectEntryPos( nSelIndex );
+ sal_uInt16 nPos = GetSelectEntryPos( nSelIndex );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
return GetEntryLine2( nPos );
else
return 0;
}
-inline long LineListBox::GetSelectEntryDistance( USHORT nSelIndex ) const
+inline long LineListBox::GetSelectEntryDistance( sal_uInt16 nSelIndex ) const
{
- USHORT nPos = GetSelectEntryPos( nSelIndex );
+ sal_uInt16 nPos = GetSelectEntryPos( nSelIndex );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
return GetEntryDistance( nPos );
else
return 0;
}
-inline BOOL LineListBox::IsEntrySelected( long nLine1, long nLine2, long nDistance ) const
+inline sal_Bool LineListBox::IsEntrySelected( long nLine1, long nLine2, long nDistance ) const
{
- USHORT nPos = GetEntryPos( nLine1, nLine2, nDistance );
+ sal_uInt16 nPos = GetEntryPos( nLine1, nLine2, nDistance );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
return IsEntryPosSelected( nPos );
else
- return FALSE;
+ return sal_False;
}
inline void LineListBox::SetColor( const Color& rColor )
@@ -372,8 +372,8 @@ private:
Image maImagePrinterFont;
Image maImageBitmapFont;
Image maImageScalableFont;
- BOOL mbWYSIWYG;
- BOOL mbSymbols;
+ sal_Bool mbWYSIWYG;
+ sal_Bool mbSymbols;
#ifdef _CTRLBOX_CXX
SVT_DLLPRIVATE void ImplCalcUserItemSize();
@@ -393,11 +393,11 @@ public:
void Fill( const FontList* pList );
- void EnableWYSIWYG( BOOL bEnable = TRUE );
- BOOL IsWYSIWYGEnabled() const { return mbWYSIWYG; }
+ void EnableWYSIWYG( sal_Bool bEnable = sal_True );
+ sal_Bool IsWYSIWYGEnabled() const { return mbWYSIWYG; }
- void EnableSymbols( BOOL bEnable = TRUE );
- BOOL IsSymbolsEnabled() const { return mbSymbols; }
+ void EnableSymbols( sal_Bool bEnable = sal_True );
+ sal_Bool IsSymbolsEnabled() const { return mbSymbols; }
private:
// declared as private because some compilers would generate the default functions
@@ -447,13 +447,13 @@ class SVT_DLLPUBLIC FontSizeBox : public MetricBox
{
FontInfo aFontInfo;
const FontList* pFontList;
- USHORT nRelMin;
- USHORT nRelMax;
- USHORT nRelStep;
+ sal_uInt16 nRelMin;
+ sal_uInt16 nRelMax;
+ sal_uInt16 nRelStep;
short nPtRelMin;
short nPtRelMax;
short nPtRelStep;
- BOOL bRelativeMode:1,
+ sal_Bool bRelativeMode:1,
bRelative:1,
bPtRelative:1,
bStdSize:1;
@@ -476,22 +476,22 @@ public:
void Fill( const FontInfo* pInfo, const FontList* pList );
- void EnableRelativeMode( USHORT nMin = 50, USHORT nMax = 150,
- USHORT nStep = 5 );
+ void EnableRelativeMode( sal_uInt16 nMin = 50, sal_uInt16 nMax = 150,
+ sal_uInt16 nStep = 5 );
void EnablePtRelativeMode( short nMin = -200, short nMax = 200,
short nStep = 10 );
- BOOL IsRelativeMode() const { return bRelativeMode; }
- void SetRelative( BOOL bRelative = FALSE );
- BOOL IsRelative() const { return bRelative; }
- void SetPtRelative( BOOL bPtRel = TRUE )
- { bPtRelative = bPtRel; SetRelative( TRUE ); }
- BOOL IsPtRelative() const { return bPtRelative; }
+ sal_Bool IsRelativeMode() const { return bRelativeMode; }
+ void SetRelative( sal_Bool bRelative = sal_False );
+ sal_Bool IsRelative() const { return bRelative; }
+ void SetPtRelative( sal_Bool bPtRel = sal_True )
+ { bPtRelative = bPtRel; SetRelative( sal_True ); }
+ sal_Bool IsPtRelative() const { return bPtRelative; }
virtual void SetValue( sal_Int64 nNewValue, FieldUnit eInUnit );
virtual void SetValue( sal_Int64 nNewValue );
virtual sal_Int64 GetValue( FieldUnit eOutUnit ) const;
virtual sal_Int64 GetValue() const;
- sal_Int64 GetValue( USHORT nPos, FieldUnit eOutUnit ) const;
+ sal_Int64 GetValue( sal_uInt16 nPos, FieldUnit eOutUnit ) const;
void SetUserValue( sal_Int64 nNewValue, FieldUnit eInUnit );
void SetUserValue( sal_Int64 nNewValue ) { SetUserValue( nNewValue, FUNIT_NONE ); }
diff --git a/svtools/inc/svtools/ctrltool.hxx b/svtools/inc/svtools/ctrltool.hxx
index a0eb5db2b955..8444951a8623 100644
--- a/svtools/inc/svtools/ctrltool.hxx
+++ b/svtools/inc/svtools/ctrltool.hxx
@@ -63,7 +63,7 @@ class FontNameMenu, class FontStyleMenu, class FontSizeMenu
--------------------------------------------------------------------------
FontList::FontList( OutputDevice* pDevice, OutputDevice* pDevice2 = NULL,
- BOOL bAll = TRUE );
+ sal_Bool bAll = sal_True );
Konstruktor der Klasse FontList. Vom uebergebenen OutputDevice werden die
entsprechenden Fonts abgefragt. Das OutputDevice muss solange existieren,
@@ -80,8 +80,8 @@ Device-Schriften (eine fuer Drucker und eine fuer den Bildschirm) vorhanden
sind, wird die vom uebergebenen Device "pDevice" bevorzugt.
Mit dem dritten Parameter kann man angeben, ob nur skalierbare Schriften
-abgefragt werden sollen oder alle. Wenn TRUE uebergeben wird, werden auch
-Bitmap-Schriften mit abgefragt. Bei FALSE werden Vector-Schriften und
+abgefragt werden sollen oder alle. Wenn sal_True uebergeben wird, werden auch
+Bitmap-Schriften mit abgefragt. Bei sal_False werden Vector-Schriften und
scalierbare Schriften abgefragt.
--------------------------------------------------------------------------
@@ -147,11 +147,11 @@ von der FontList, sollte deshalb das Array nicht mehr referenziert werden.
// - FontList -
// ------------
-#define FONTLIST_FONTINFO_NOTFOUND ((USHORT)0xFFFF)
+#define FONTLIST_FONTINFO_NOTFOUND ((sal_uInt16)0xFFFF)
-#define FONTLIST_FONTNAMETYPE_PRINTER ((USHORT)0x0001)
-#define FONTLIST_FONTNAMETYPE_SCREEN ((USHORT)0x0002)
-#define FONTLIST_FONTNAMETYPE_SCALABLE ((USHORT)0x0004)
+#define FONTLIST_FONTNAMETYPE_PRINTER ((sal_uInt16)0x0001)
+#define FONTLIST_FONTNAMETYPE_SCREEN ((sal_uInt16)0x0002)
+#define FONTLIST_FONTNAMETYPE_SCALABLE ((sal_uInt16)0x0004)
class SVT_DLLPUBLIC FontList : private List
{
@@ -175,16 +175,16 @@ private:
OutputDevice* mpDev2;
#ifdef CTRLTOOL_CXX
- SVT_DLLPRIVATE ImplFontListNameInfo* ImplFind( const XubString& rSearchName, ULONG* pIndex ) const;
+ SVT_DLLPRIVATE ImplFontListNameInfo* ImplFind( const XubString& rSearchName, sal_uLong* pIndex ) const;
SVT_DLLPRIVATE ImplFontListNameInfo* ImplFindByName( const XubString& rStr ) const;
- SVT_DLLPRIVATE void ImplInsertFonts( OutputDevice* pDev, BOOL bAll,
- BOOL bInsertData );
+ SVT_DLLPRIVATE void ImplInsertFonts( OutputDevice* pDev, sal_Bool bAll,
+ sal_Bool bInsertData );
#endif
public:
FontList( OutputDevice* pDevice,
OutputDevice* pDevice2 = NULL,
- BOOL bAll = TRUE );
+ sal_Bool bAll = sal_True );
~FontList();
FontList* Clone() const;
@@ -192,7 +192,7 @@ public:
OutputDevice* GetDevice() const { return mpDev; }
OutputDevice* GetDevice2() const { return mpDev2; }
XubString GetFontMapText( const FontInfo& rInfo ) const;
- USHORT GetFontNameType( const XubString& rFontName ) const;
+ sal_uInt16 GetFontNameType( const XubString& rFontName ) const;
const XubString& GetNormalStr() const { return maNormal; }
const XubString& GetItalicStr() const { return maNormalItalic; }
@@ -207,11 +207,11 @@ public:
FontWeight eWeight,
FontItalic eItalic ) const;
- BOOL IsAvailable( const XubString& rName ) const;
- USHORT GetFontNameCount() const
- { return (USHORT)List::Count(); }
- const FontInfo& GetFontName( USHORT nFont ) const;
- USHORT GetFontNameType( USHORT nFont ) const;
+ sal_Bool IsAvailable( const XubString& rName ) const;
+ sal_uInt16 GetFontNameCount() const
+ { return (sal_uInt16)List::Count(); }
+ const FontInfo& GetFontName( sal_uInt16 nFont ) const;
+ sal_uInt16 GetFontNameType( sal_uInt16 nFont ) const;
sal_Handle GetFirstFontInfo( const XubString& rName ) const;
sal_Handle GetNextFontInfo( sal_Handle hFontInfo ) const;
const FontInfo& GetFontInfo( sal_Handle hFontInfo ) const;
@@ -233,19 +233,19 @@ class SVT_DLLPUBLIC FontSizeNames
{
private:
struct ImplFSNameItem* mpArray;
- ULONG mnElem;
+ sal_uLong mnElem;
public:
FontSizeNames( LanguageType eLanguage /* = LANGUAGE_DONTKNOW */ );
- ULONG Count() const { return mnElem; }
- BOOL IsEmpty() const { return !mnElem; }
+ sal_uLong Count() const { return mnElem; }
+ sal_Bool IsEmpty() const { return !mnElem; }
long Name2Size( const String& ) const;
String Size2Name( long ) const;
- String GetIndexName( ULONG nIndex ) const;
- long GetIndexSize( ULONG nIndex ) const;
+ String GetIndexName( sal_uLong nIndex ) const;
+ long GetIndexSize( sal_uLong nIndex ) const;
};
#endif // _CTRLTOOL_HXX
diff --git a/svtools/inc/svtools/editbrowsebox.hxx b/svtools/inc/svtools/editbrowsebox.hxx
index 26ff11e11ca2..24a8baa8ac4b 100644
--- a/svtools/inc/svtools/editbrowsebox.hxx
+++ b/svtools/inc/svtools/editbrowsebox.hxx
@@ -99,7 +99,7 @@ namespace svt
protected:
Control* pWindow;
- sal_Bool bSuspended; // <TRUE> if the window is hidden and disabled
+ sal_Bool bSuspended; // <sal_True> if the window is hidden and disabled
public:
TYPEINFO();
@@ -142,8 +142,8 @@ namespace svt
virtual String GetText( LineEnd aSeparator ) const = 0;
virtual void SetText( const String& _rStr ) = 0;
- virtual BOOL IsReadOnly() const = 0;
- virtual void SetReadOnly( BOOL bReadOnly ) = 0;
+ virtual sal_Bool IsReadOnly() const = 0;
+ virtual void SetReadOnly( sal_Bool bReadOnly ) = 0;
virtual xub_StrLen GetMaxTextLen() const = 0;
virtual void SetMaxTextLen( xub_StrLen _nMaxLen ) = 0;
@@ -178,8 +178,8 @@ namespace svt
virtual String GetText( LineEnd aSeparator ) const;
virtual void SetText( const String& _rStr );
- virtual BOOL IsReadOnly() const;
- virtual void SetReadOnly( BOOL bReadOnly );
+ virtual sal_Bool IsReadOnly() const;
+ virtual void SetReadOnly( sal_Bool bReadOnly );
virtual xub_StrLen GetMaxTextLen() const;
virtual void SetMaxTextLen( xub_StrLen _nMaxLen );
@@ -220,7 +220,7 @@ namespace svt
virtual void Modify();
private:
- BOOL dispatchKeyEvent( const KeyEvent& _rEvent );
+ sal_Bool dispatchKeyEvent( const KeyEvent& _rEvent );
};
//==================================================================
@@ -246,7 +246,7 @@ namespace svt
class SVT_DLLPUBLIC EditCellController : public CellController
{
IEditImplementation* m_pEditImplementation;
- BOOL m_bOwnImplementation; // did we create m_pEditImplementation?
+ sal_Bool m_bOwnImplementation; // did we create m_pEditImplementation?
public:
TYPEINFO();
@@ -302,7 +302,7 @@ namespace svt
virtual void GetFocus();
virtual long PreNotify(NotifyEvent& rEvt);
virtual void Paint(const Rectangle& rClientRect);
- virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags );
+ virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags );
virtual void StateChanged( StateChangedType nStateChange );
virtual void DataChanged( const DataChangedEvent& _rEvent );
virtual void Resize();
@@ -487,7 +487,7 @@ namespace svt
CellControllerRef aController,
aOldController;
- ULONG nStartEvent, nEndEvent, nCellModifiedEvent; // event ids
+ sal_uLong nStartEvent, nEndEvent, nCellModifiedEvent; // event ids
Window* m_pFocusWhileRequest;
// In ActivateCell, we grab the focus asynchronously, but if between requesting activation
// and the asynchornous event the focus has changed, we won't grab it for ourself.
@@ -664,7 +664,7 @@ namespace svt
virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint);
::com::sun::star::uno::Reference<
- ::com::sun::star::accessibility::XAccessible > CreateAccessibleCheckBoxCell(long _nRow, USHORT _nColumnPos,const TriState& eState,sal_Bool _bEnabled=sal_True);
+ ::com::sun::star::accessibility::XAccessible > CreateAccessibleCheckBoxCell(long _nRow, sal_uInt16 _nColumnPos,const TriState& eState,sal_Bool _bEnabled=sal_True);
protected:
// creates the accessible which wraps the active cell
void implCreateActiveAccessible( );
diff --git a/svtools/inc/svtools/editimplementation.hxx b/svtools/inc/svtools/editimplementation.hxx
index 987d94c7bcee..fcdd140d78d6 100644
--- a/svtools/inc/svtools/editimplementation.hxx
+++ b/svtools/inc/svtools/editimplementation.hxx
@@ -74,14 +74,14 @@ void GenericEditImplementation< EDIT >::SetSelection( const Selection& _rSelecti
//----------------------------------------------------------------------
template <class EDIT>
-void GenericEditImplementation< EDIT >::SetReadOnly( BOOL bReadOnly )
+void GenericEditImplementation< EDIT >::SetReadOnly( sal_Bool bReadOnly )
{
m_rEdit.SetReadOnly( bReadOnly );
}
//----------------------------------------------------------------------
template <class EDIT>
-BOOL GenericEditImplementation< EDIT >::IsReadOnly() const
+sal_Bool GenericEditImplementation< EDIT >::IsReadOnly() const
{
return m_rEdit.IsReadOnly();
}
diff --git a/svtools/inc/svtools/editsyntaxhighlighter.hxx b/svtools/inc/svtools/editsyntaxhighlighter.hxx
index 01add0c4ce1d..aca298fd1d31 100644
--- a/svtools/inc/svtools/editsyntaxhighlighter.hxx
+++ b/svtools/inc/svtools/editsyntaxhighlighter.hxx
@@ -41,7 +41,7 @@ class SVT_DLLPUBLIC MultiLineEditSyntaxHighlight : public MultiLineEdit
svtools::ColorConfig m_aColorConfig;
private:
- virtual void DoBracketHilight(USHORT aKey);
+ virtual void DoBracketHilight(sal_uInt16 aKey);
protected:
virtual long PreNotify( NotifyEvent& rNEvt );
diff --git a/svtools/inc/svtools/ehdl.hxx b/svtools/inc/svtools/ehdl.hxx
index 967c41636ea3..56255f48f2f2 100644
--- a/svtools/inc/svtools/ehdl.hxx
+++ b/svtools/inc/svtools/ehdl.hxx
@@ -43,16 +43,16 @@ class SVT_DLLPUBLIC SfxErrorContext : private ErrorContext
{
public:
SfxErrorContext(
- USHORT nCtxIdP, Window *pWin=0,
- USHORT nResIdP=USHRT_MAX, ResMgr *pMgrP=0);
+ sal_uInt16 nCtxIdP, Window *pWin=0,
+ sal_uInt16 nResIdP=USHRT_MAX, ResMgr *pMgrP=0);
SfxErrorContext(
- USHORT nCtxIdP, const String &aArg1, Window *pWin=0,
- USHORT nResIdP=USHRT_MAX, ResMgr *pMgrP=0);
- virtual BOOL GetString(ULONG nErrId, String &rStr);
+ sal_uInt16 nCtxIdP, const String &aArg1, Window *pWin=0,
+ sal_uInt16 nResIdP=USHRT_MAX, ResMgr *pMgrP=0);
+ virtual sal_Bool GetString(sal_uLong nErrId, String &rStr);
private:
- USHORT nCtxId;
- USHORT nResId;
+ sal_uInt16 nCtxId;
+ sal_uInt16 nResId;
ResMgr *pMgr;
String aArg1;
};
@@ -60,26 +60,26 @@ private:
class SVT_DLLPUBLIC SfxErrorHandler : private ErrorHandler
{
public:
- SfxErrorHandler(USHORT nId, ULONG lStart, ULONG lEnd, ResMgr *pMgr=0);
+ SfxErrorHandler(sal_uInt16 nId, sal_uLong lStart, sal_uLong lEnd, ResMgr *pMgr=0);
~SfxErrorHandler();
protected:
- virtual BOOL GetErrorString(ULONG lErrId, String &, USHORT&) const;
- virtual BOOL GetMessageString(ULONG lErrId, String &, USHORT&) const;
+ virtual sal_Bool GetErrorString(sal_uLong lErrId, String &, sal_uInt16&) const;
+ virtual sal_Bool GetMessageString(sal_uLong lErrId, String &, sal_uInt16&) const;
private:
- ULONG lStart;
- ULONG lEnd;
- USHORT nId;
+ sal_uLong lStart;
+ sal_uLong lEnd;
+ sal_uInt16 nId;
ResMgr *pMgr;
ResMgr *pFreeMgr;
//#if 0 // _SOLAR__PRIVATE
- SVT_DLLPRIVATE BOOL GetClassString(ULONG lErrId, String &) const;
+ SVT_DLLPRIVATE sal_Bool GetClassString(sal_uLong lErrId, String &) const;
//#endif
- virtual BOOL CreateString(
- const ErrorInfo *, String &, USHORT &) const;
+ virtual sal_Bool CreateString(
+ const ErrorInfo *, String &, sal_uInt16 &) const;
};
#endif
diff --git a/svtools/inc/svtools/embedhlp.hxx b/svtools/inc/svtools/embedhlp.hxx
index bc9770c1bcc8..46169d645c91 100644
--- a/svtools/inc/svtools/embedhlp.hxx
+++ b/svtools/inc/svtools/embedhlp.hxx
@@ -57,8 +57,8 @@ namespace svt
EmbeddedObjectRef_Impl* mpImp;
NS_UNO::Reference < NS_EMBED::XEmbeddedObject > mxObj;
- SVT_DLLPRIVATE SvStream* GetGraphicStream( BOOL bUpdate ) const;
- /* SVT_DLLPRIVATE */ void GetReplacement( BOOL bUpdate );
+ SVT_DLLPRIVATE SvStream* GetGraphicStream( sal_Bool bUpdate ) const;
+ /* SVT_DLLPRIVATE */ void GetReplacement( sal_Bool bUpdate );
SVT_DLLPRIVATE void Construct_Impl();
EmbeddedObjectRef& operator = ( const EmbeddedObjectRef& );
@@ -69,7 +69,7 @@ namespace svt
static void DrawPaintReplacement( const Rectangle &rRect, const String &rText, OutputDevice *pOut );
static void DrawShading( const Rectangle &rRect, OutputDevice *pOut );
- static BOOL TryRunningState( const NS_UNO::Reference < NS_EMBED::XEmbeddedObject >& );
+ static sal_Bool TryRunningState( const NS_UNO::Reference < NS_EMBED::XEmbeddedObject >& );
static void SetGraphicToContainer( const Graphic& rGraphic,
comphelper::EmbeddedObjectContainer& aContainer,
const ::rtl::OUString& aName,
@@ -94,7 +94,7 @@ namespace svt
~EmbeddedObjectRef();
EmbeddedObjectRef( const EmbeddedObjectRef& );
- BOOL TryRunningState();
+ sal_Bool TryRunningState();
// assigning to a container enables the object to exchange graphical representations with a storage
void AssignToContainer( comphelper::EmbeddedObjectContainer* pContainer, const ::rtl::OUString& rPersistName );
@@ -117,15 +117,15 @@ namespace svt
const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInGrStream,
const ::rtl::OUString& rMediaType );
- void UpdateReplacement() { GetReplacement( TRUE ); }
+ void UpdateReplacement() { GetReplacement( sal_True ); }
void UpdateReplacementOnDemand();
MapUnit GetMapUnit() const;
- void Lock( BOOL bLock = TRUE );
- BOOL IsLocked() const;
+ void Lock( sal_Bool bLock = sal_True );
+ sal_Bool IsLocked() const;
void Clear();
- BOOL is() const { return mxObj.is(); }
+ sal_Bool is() const { return mxObj.is(); }
- BOOL IsChart() const;
+ sal_Bool IsChart() const;
// #i104867#
// Provides a graphic version number for the fetchable Graphic during this object's lifetime. Internally,
diff --git a/svtools/inc/svtools/expander.hxx b/svtools/inc/svtools/expander.hxx
index c0f3cfc7632a..ec53a515c989 100644
--- a/svtools/inc/svtools/expander.hxx
+++ b/svtools/inc/svtools/expander.hxx
@@ -52,9 +52,9 @@ private:
Image aActiveImage;
Rectangle maFocusRect;
ImageList maExpanderImages;
- BOOL mbIsExpanded;
- BOOL mbHasFocusRect;
- BOOL mbIsInMouseDown;
+ sal_Bool mbIsExpanded;
+ sal_Bool mbHasFocusRect;
+ sal_Bool mbIsInMouseDown;
Link maToggleHdl;
SvExpanderStateType eType;
@@ -75,9 +75,9 @@ public:
SvExpander( Window* pParent, WinBits nStyle = 0 );
SvExpander( Window* pParent, const ResId& rResId );
- BOOL IsExpanded() {return mbIsExpanded;}
+ sal_Bool IsExpanded() {return mbIsExpanded;}
- void SetToExpanded(BOOL bFlag=TRUE);
+ void SetToExpanded(sal_Bool bFlag=sal_True);
void SetExpanderImage( SvExpanderStateType eType);
Image GetExpanderImage(SvExpanderStateType eType);
diff --git a/svtools/inc/svtools/filectrl.hxx b/svtools/inc/svtools/filectrl.hxx
index dd314bb23ca1..97475c8b38ca 100644
--- a/svtools/inc/svtools/filectrl.hxx
+++ b/svtools/inc/svtools/filectrl.hxx
@@ -39,14 +39,14 @@
#define STR_FILECTRL_BUTTONTEXT 333 // ID-Range?!
// Flags for FileControl
-typedef USHORT FileControlMode;
-#define FILECTRL_RESIZEBUTTONBYPATHLEN ((USHORT)0x0001)//if this is set, the button will become small as soon as the Text in the Edit Field is to long to be shown completely
+typedef sal_uInt16 FileControlMode;
+#define FILECTRL_RESIZEBUTTONBYPATHLEN ((sal_uInt16)0x0001)//if this is set, the button will become small as soon as the Text in the Edit Field is to long to be shown completely
// Flags for internal use of FileControl
-typedef USHORT FileControlMode_Internal;
-#define FILECTRL_INRESIZE ((USHORT)0x0001)
-#define FILECTRL_ORIGINALBUTTONTEXT ((USHORT)0x0002)
+typedef sal_uInt16 FileControlMode_Internal;
+#define FILECTRL_INRESIZE ((sal_uInt16)0x0001)
+#define FILECTRL_ORIGINALBUTTONTEXT ((sal_uInt16)0x0002)
class SVT_DLLPUBLIC FileControl : public Window
@@ -56,7 +56,7 @@ private:
PushButton maButton;
String maButtonText;
- BOOL mbOpenDlg;
+ sal_Bool mbOpenDlg;
Link maDialogCreatedHdl;
@@ -80,10 +80,10 @@ public:
Edit& GetEdit() { return maEdit; }
PushButton& GetButton() { return maButton; }
- void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags );
+ void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags );
- void SetOpenDialog( BOOL bOpen ) { mbOpenDlg = bOpen; }
- BOOL IsOpenDialog() const { return mbOpenDlg; }
+ void SetOpenDialog( sal_Bool bOpen ) { mbOpenDlg = bOpen; }
+ sal_Bool IsOpenDialog() const { return mbOpenDlg; }
void SetText( const XubString& rStr );
XubString GetText() const;
@@ -92,8 +92,8 @@ public:
void SetSelection( const Selection& rSelection ) { maEdit.SetSelection( rSelection ); }
Selection GetSelection() const { return maEdit.GetSelection(); }
- void SetReadOnly( BOOL bReadOnly = TRUE ) { maEdit.SetReadOnly( bReadOnly ); }
- BOOL IsReadOnly() const { return maEdit.IsReadOnly(); }
+ void SetReadOnly( sal_Bool bReadOnly = sal_True ) { maEdit.SetReadOnly( bReadOnly ); }
+ sal_Bool IsReadOnly() const { return maEdit.IsReadOnly(); }
//------
//manipulate the Button-Text:
diff --git a/svtools/inc/svtools/filedlg.hxx b/svtools/inc/svtools/filedlg.hxx
index c04e48fc7658..59fd393ea73c 100644
--- a/svtools/inc/svtools/filedlg.hxx
+++ b/svtools/inc/svtools/filedlg.hxx
@@ -53,7 +53,7 @@ protected:
UniString aDfltExt; // Default - Extension
public:
- PathDialog( Window* pParent, WinBits nWinStyle = 0, BOOL bCreateDir = TRUE );
+ PathDialog( Window* pParent, WinBits nWinStyle = 0, sal_Bool bCreateDir = sal_True );
~PathDialog();
virtual long OK();
@@ -92,9 +92,9 @@ public:
void RemoveAllFilter();
void SetCurFilter( const UniString& rFilter );
UniString GetCurFilter() const;
- USHORT GetFilterCount() const;
- UniString GetFilterName( USHORT nPos ) const;
- UniString GetFilterType( USHORT nPos ) const;
+ sal_uInt16 GetFilterCount() const;
+ UniString GetFilterName( sal_uInt16 nPos ) const;
+ UniString GetFilterType( sal_uInt16 nPos ) const;
void SetFileSelectHdl( const Link& rLink ) { aFileHdlLink = rLink; }
const Link& GetFileSelectHdl() const { return aFileHdlLink; }
diff --git a/svtools/inc/svtools/fileview.hxx b/svtools/inc/svtools/fileview.hxx
index db704a0e6784..a88009ffa7c3 100644
--- a/svtools/inc/svtools/fileview.hxx
+++ b/svtools/inc/svtools/fileview.hxx
@@ -189,7 +189,7 @@ public:
void SetDoubleClickHdl( const Link& rHdl );
void SetOpenDoneHdl( const Link& rHdl );
- ULONG GetSelectionCount() const;
+ sal_uLong GetSelectionCount() const;
SvLBoxEntry* FirstSelected() const;
SvLBoxEntry* NextSelected( SvLBoxEntry* pEntry ) const;
void EnableAutoResize();
@@ -199,7 +199,7 @@ public:
void EnableDelete( sal_Bool bEnable );
void EnableNameReplacing( sal_Bool bEnable = sal_True );
// translate folder names or display doc-title instead of file name
- // EnableContextMenu( TRUE )/EnableDelete(TRUE) disable name replacing!
+ // EnableContextMenu( sal_True )/EnableDelete(sal_True) disable name replacing!
// save and load column size and sort order
String GetConfigString() const;
diff --git a/svtools/inc/svtools/filter.hxx b/svtools/inc/svtools/filter.hxx
index 8c6f014d4219..66c80dde2d79 100644
--- a/svtools/inc/svtools/filter.hxx
+++ b/svtools/inc/svtools/filter.hxx
@@ -44,7 +44,7 @@
struct ImplDirEntryHelper
{
- static BOOL Exists( const INetURLObject& rObj );
+ static sal_Bool Exists( const INetURLObject& rObj );
static void Kill( const String& rStr );
};
@@ -64,8 +64,8 @@ class Graphic;
#define GRFILTER_OUTHINT_GREY 1
-#define GRFILTER_FORMAT_NOTFOUND ((USHORT)0xFFFF)
-#define GRFILTER_FORMAT_DONTKNOW ((USHORT)0xFFFF)
+#define GRFILTER_FORMAT_NOTFOUND ((sal_uInt16)0xFFFF)
+#define GRFILTER_FORMAT_DONTKNOW ((sal_uInt16)0xFFFF)
#define GRFILTER_I_FLAGS_SET_LOGSIZE_FOR_JPEG 00000001
#define GRFILTER_I_FLAGS_DONT_SET_LOGSIZE_FOR_JPEG 00000002
@@ -107,32 +107,32 @@ class Graphic;
// unterstuetzten Grafik-Fileformate
// ------------------------------------
-#define GFF_NOT ( (USHORT)0x0000 )
-#define GFF_BMP ( (USHORT)0x0001 )
-#define GFF_GIF ( (USHORT)0x0002 )
-#define GFF_JPG ( (USHORT)0x0003 )
-#define GFF_PCD ( (USHORT)0x0004 )
-#define GFF_PCX ( (USHORT)0x0005 )
-#define GFF_PNG ( (USHORT)0x0006 )
-#define GFF_TIF ( (USHORT)0x0007 )
-#define GFF_XBM ( (USHORT)0x0008 )
-#define GFF_XPM ( (USHORT)0x0009 )
-#define GFF_PBM ( (USHORT)0x000a )
-#define GFF_PGM ( (USHORT)0x000b )
-#define GFF_PPM ( (USHORT)0x000c )
-#define GFF_RAS ( (USHORT)0x000d )
-#define GFF_TGA ( (USHORT)0x000e )
-#define GFF_PSD ( (USHORT)0x000f )
-#define GFF_EPS ( (USHORT)0x0010 )
-#define GFF_DXF ( (USHORT)0x00f1 )
-#define GFF_MET ( (USHORT)0x00f2 )
-#define GFF_PCT ( (USHORT)0x00f3 )
-#define GFF_SGF ( (USHORT)0x00f4 )
-#define GFF_SVM ( (USHORT)0x00f5 )
-#define GFF_WMF ( (USHORT)0x00f6 )
-#define GFF_SGV ( (USHORT)0x00f7 )
-#define GFF_EMF ( (USHORT)0x00f8 )
-#define GFF_XXX ( (USHORT)0xffff )
+#define GFF_NOT ( (sal_uInt16)0x0000 )
+#define GFF_BMP ( (sal_uInt16)0x0001 )
+#define GFF_GIF ( (sal_uInt16)0x0002 )
+#define GFF_JPG ( (sal_uInt16)0x0003 )
+#define GFF_PCD ( (sal_uInt16)0x0004 )
+#define GFF_PCX ( (sal_uInt16)0x0005 )
+#define GFF_PNG ( (sal_uInt16)0x0006 )
+#define GFF_TIF ( (sal_uInt16)0x0007 )
+#define GFF_XBM ( (sal_uInt16)0x0008 )
+#define GFF_XPM ( (sal_uInt16)0x0009 )
+#define GFF_PBM ( (sal_uInt16)0x000a )
+#define GFF_PGM ( (sal_uInt16)0x000b )
+#define GFF_PPM ( (sal_uInt16)0x000c )
+#define GFF_RAS ( (sal_uInt16)0x000d )
+#define GFF_TGA ( (sal_uInt16)0x000e )
+#define GFF_PSD ( (sal_uInt16)0x000f )
+#define GFF_EPS ( (sal_uInt16)0x0010 )
+#define GFF_DXF ( (sal_uInt16)0x00f1 )
+#define GFF_MET ( (sal_uInt16)0x00f2 )
+#define GFF_PCT ( (sal_uInt16)0x00f3 )
+#define GFF_SGF ( (sal_uInt16)0x00f4 )
+#define GFF_SVM ( (sal_uInt16)0x00f5 )
+#define GFF_WMF ( (sal_uInt16)0x00f6 )
+#define GFF_SGV ( (sal_uInt16)0x00f7 )
+#define GFF_EMF ( (sal_uInt16)0x00f8 )
+#define GFF_XXX ( (sal_uInt16)0xffff )
// ---------------------
// - GraphicDescriptor -
@@ -145,38 +145,38 @@ class SVT_DLLPUBLIC GraphicDescriptor
String aPathExt;
Size aPixSize;
Size aLogSize;
- USHORT nBitsPerPixel;
- USHORT nPlanes;
- USHORT nFormat;
- BOOL bCompressed;
- BOOL bOwnStream;
+ sal_uInt16 nBitsPerPixel;
+ sal_uInt16 nPlanes;
+ sal_uInt16 nFormat;
+ sal_Bool bCompressed;
+ sal_Bool bOwnStream;
void ImpConstruct();
- BOOL ImpDetectBMP( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectGIF( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectJPG( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectPCD( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectPCX( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectPNG( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectTIF( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectXBM( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectXPM( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectPBM( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectPGM( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectPPM( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectRAS( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectTGA( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectPSD( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectEPS( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectDXF( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectMET( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectPCT( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectSGF( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectSVM( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectWMF( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectSGV( SvStream& rStm, BOOL bExtendedInfo );
- BOOL ImpDetectEMF( SvStream& rStm, BOOL bExtendedInfo );
+ sal_Bool ImpDetectBMP( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectGIF( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectJPG( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectPCD( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectPCX( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectPNG( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectTIF( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectXBM( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectXPM( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectPBM( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectPGM( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectPPM( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectRAS( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectTGA( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectPSD( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectEPS( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectDXF( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectMET( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectPCT( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectSGF( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectSVM( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectWMF( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectSGV( SvStream& rStm, sal_Bool bExtendedInfo );
+ sal_Bool ImpDetectEMF( SvStream& rStm, sal_Bool bExtendedInfo );
GraphicDescriptor( const GraphicDescriptor& );
GraphicDescriptor& operator=( const GraphicDescriptor& );
@@ -200,14 +200,14 @@ public:
virtual ~GraphicDescriptor();
// Startet die Detektion;
- // bei bExtendedInfo == TRUE werden soweit wie moeglich
+ // bei bExtendedInfo == sal_True werden soweit wie moeglich
// Daten aus dem jeweiligen FileHeader ermittelt
// ( Groesse, Farbtiefe usw. )
- virtual BOOL Detect( BOOL bExtendedInfo = FALSE );
+ virtual sal_Bool Detect( sal_Bool bExtendedInfo = sal_False );
// liefert das Fileformat nach erfolgreicher Detektion zurueck;
// wenn kein Format erkannt wurde, ist das Formart GFF_NOT
- USHORT GetFileFormat() const { return nFormat; }
+ sal_uInt16 GetFileFormat() const { return nFormat; }
// liefert die Pixel-Bildgroesse oder 0-Size zurueck
const Size& GetSizePixel() const { return (Size&) aPixSize; }
@@ -216,13 +216,13 @@ public:
const Size& GetSize_100TH_MM() const { return (Size&) aLogSize; }
// liefert die Bits/Pixel oder 0 zurueck
- USHORT GetBitsPerPixel() const { return nBitsPerPixel; }
+ sal_uInt16 GetBitsPerPixel() const { return nBitsPerPixel; }
// liefert die Anzahl der Planes oder 0 zurueck
- USHORT GetPlanes() const { return nPlanes; }
+ sal_uInt16 GetPlanes() const { return nPlanes; }
// zeigt an, ob das Bild evtl. komprimiert (wie auch immer) ist
- BOOL IsCompressed() const { return bCompressed; }
+ sal_Bool IsCompressed() const { return bCompressed; }
// gibt die Filternummer des Filters zurueck,
// der im GraphicFilter zum Lesen dieses Formats
@@ -236,8 +236,8 @@ public:
struct FilterErrorEx
{
- ULONG nFilterError;
- ULONG nStreamError;
+ sal_uLong nFilterError;
+ sal_uLong nStreamError;
long nDummy1;
long nDummy2;
long nDummy3;
@@ -257,7 +257,7 @@ class SVT_DLLPUBLIC GraphicFilter
private:
void ImplInit();
- ULONG ImplSetError( ULONG nError, const SvStream* pStm = NULL );
+ sal_uLong ImplSetError( sal_uLong nError, const SvStream* pStm = NULL );
sal_uInt16 ImpTestOrFindFormat( const String& rPath, SvStream& rStream, sal_uInt16& rFormat );
DECL_LINK( FilterCallback, ConvertData* pData );
@@ -285,73 +285,73 @@ public:
void SetFilterPath( const String& rFilterPath ) { aFilterPath = rFilterPath; };
- USHORT GetImportFormatCount();
- USHORT GetImportFormatNumber( const String& rFormatName );
- USHORT GetImportFormatNumberForMediaType( const String& rMediaType );
- USHORT GetImportFormatNumberForShortName( const String& rShortName );
+ sal_uInt16 GetImportFormatCount();
+ sal_uInt16 GetImportFormatNumber( const String& rFormatName );
+ sal_uInt16 GetImportFormatNumberForMediaType( const String& rMediaType );
+ sal_uInt16 GetImportFormatNumberForShortName( const String& rShortName );
sal_uInt16 GetImportFormatNumberForTypeName( const String& rType );
- String GetImportFormatName( USHORT nFormat );
- String GetImportFormatTypeName( USHORT nFormat );
- String GetImportFormatMediaType( USHORT nFormat );
- String GetImportFormatShortName( USHORT nFormat );
- String GetImportOSFileType( USHORT nFormat );
- String GetImportWildcard( USHORT nFormat, sal_Int32 nEntry = 0 );
- BOOL IsImportPixelFormat( USHORT nFormat );
-
- USHORT GetExportFormatCount();
- USHORT GetExportFormatNumber( const String& rFormatName );
- USHORT GetExportFormatNumberForMediaType( const String& rShortName );
- USHORT GetExportFormatNumberForShortName( const String& rShortName );
+ String GetImportFormatName( sal_uInt16 nFormat );
+ String GetImportFormatTypeName( sal_uInt16 nFormat );
+ String GetImportFormatMediaType( sal_uInt16 nFormat );
+ String GetImportFormatShortName( sal_uInt16 nFormat );
+ String GetImportOSFileType( sal_uInt16 nFormat );
+ String GetImportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry = 0 );
+ sal_Bool IsImportPixelFormat( sal_uInt16 nFormat );
+
+ sal_uInt16 GetExportFormatCount();
+ sal_uInt16 GetExportFormatNumber( const String& rFormatName );
+ sal_uInt16 GetExportFormatNumberForMediaType( const String& rShortName );
+ sal_uInt16 GetExportFormatNumberForShortName( const String& rShortName );
sal_uInt16 GetExportFormatNumberForTypeName( const String& rType );
- String GetExportFormatName( USHORT nFormat );
- String GetExportFormatTypeName( USHORT nFormat );
- String GetExportFormatMediaType( USHORT nFormat );
- String GetExportFormatShortName( USHORT nFormat );
- String GetExportOSFileType( USHORT nFormat );
- String GetExportWildcard( USHORT nFormat, sal_Int32 nEntry = 0 );
- BOOL IsExportPixelFormat( USHORT nFormat );
-
- BOOL HasImportDialog( USHORT nFormat );
- BOOL DoImportDialog( Window* pWindow, USHORT nFormat );
-
- BOOL HasExportDialog( USHORT nFormat );
- BOOL DoExportDialog( Window* pWindow, USHORT nFormat );
- BOOL DoExportDialog( Window* pWindow, USHORT nFormat, FieldUnit eFieldUnit );
-
- USHORT ExportGraphic( const Graphic& rGraphic, const INetURLObject& rPath,
- USHORT nFormat = GRFILTER_FORMAT_DONTKNOW,
+ String GetExportFormatName( sal_uInt16 nFormat );
+ String GetExportFormatTypeName( sal_uInt16 nFormat );
+ String GetExportFormatMediaType( sal_uInt16 nFormat );
+ String GetExportFormatShortName( sal_uInt16 nFormat );
+ String GetExportOSFileType( sal_uInt16 nFormat );
+ String GetExportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry = 0 );
+ sal_Bool IsExportPixelFormat( sal_uInt16 nFormat );
+
+ sal_Bool HasImportDialog( sal_uInt16 nFormat );
+ sal_Bool DoImportDialog( Window* pWindow, sal_uInt16 nFormat );
+
+ sal_Bool HasExportDialog( sal_uInt16 nFormat );
+ sal_Bool DoExportDialog( Window* pWindow, sal_uInt16 nFormat );
+ sal_Bool DoExportDialog( Window* pWindow, sal_uInt16 nFormat, FieldUnit eFieldUnit );
+
+ sal_uInt16 ExportGraphic( const Graphic& rGraphic, const INetURLObject& rPath,
+ sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW,
const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >* pFilterData = NULL );
- USHORT ExportGraphic( const Graphic& rGraphic, const String& rPath,
- SvStream& rOStm, USHORT nFormat = GRFILTER_FORMAT_DONTKNOW,
+ sal_uInt16 ExportGraphic( const Graphic& rGraphic, const String& rPath,
+ SvStream& rOStm, sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW,
const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >* pFilterData = NULL );
long GetExportGraphicHint() const { return nExpGraphHint; }
- USHORT CanImportGraphic( const INetURLObject& rPath,
- USHORT nFormat = GRFILTER_FORMAT_DONTKNOW,
- USHORT * pDeterminedFormat = NULL);
+ sal_uInt16 CanImportGraphic( const INetURLObject& rPath,
+ sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW,
+ sal_uInt16 * pDeterminedFormat = NULL);
- USHORT ImportGraphic( Graphic& rGraphic, const INetURLObject& rPath,
- USHORT nFormat = GRFILTER_FORMAT_DONTKNOW,
- USHORT * pDeterminedFormat = NULL, sal_uInt32 nImportFlags = 0 );
+ sal_uInt16 ImportGraphic( Graphic& rGraphic, const INetURLObject& rPath,
+ sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW,
+ sal_uInt16 * pDeterminedFormat = NULL, sal_uInt32 nImportFlags = 0 );
- USHORT CanImportGraphic( const String& rPath, SvStream& rStream,
- USHORT nFormat = GRFILTER_FORMAT_DONTKNOW,
- USHORT * pDeterminedFormat = NULL);
+ sal_uInt16 CanImportGraphic( const String& rPath, SvStream& rStream,
+ sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW,
+ sal_uInt16 * pDeterminedFormat = NULL);
- USHORT ImportGraphic( Graphic& rGraphic, const String& rPath,
+ sal_uInt16 ImportGraphic( Graphic& rGraphic, const String& rPath,
SvStream& rStream,
- USHORT nFormat = GRFILTER_FORMAT_DONTKNOW,
- USHORT * pDeterminedFormat = NULL, sal_uInt32 nImportFlags = 0 );
+ sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW,
+ sal_uInt16 * pDeterminedFormat = NULL, sal_uInt32 nImportFlags = 0 );
- USHORT ImportGraphic( Graphic& rGraphic, const String& rPath,
+ sal_uInt16 ImportGraphic( Graphic& rGraphic, const String& rPath,
SvStream& rStream,
- USHORT nFormat,
- USHORT * pDeterminedFormat, sal_uInt32 nImportFlags,
+ sal_uInt16 nFormat,
+ sal_uInt16 * pDeterminedFormat, sal_uInt32 nImportFlags,
com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >* pFilterData );
- BOOL Setup( USHORT nFormat );
+ sal_Bool Setup( sal_uInt16 nFormat );
- void Abort() { bAbort = TRUE; }
+ void Abort() { bAbort = sal_True; }
const FilterErrorEx& GetLastError() const;
void ResetLastError();
@@ -361,15 +361,15 @@ public:
static int LoadGraphic( const String& rPath, const String& rFilter,
Graphic& rGraphic,
GraphicFilter* pFilter = NULL,
- USHORT* pDeterminedFormat = NULL );
+ sal_uInt16* pDeterminedFormat = NULL );
};
// ------------------------------------
// - Windows Metafile Lesen/Schreiben -
// ------------------------------------
-SVT_DLLPUBLIC BOOL ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem* pConfigItem );
-SVT_DLLPUBLIC BOOL WriteWindowMetafile( SvStream& rStream, const GDIMetaFile& rMTF );
-SVT_DLLPUBLIC BOOL WriteWindowMetafileBits( SvStream& rStream, const GDIMetaFile& rMTF );
+SVT_DLLPUBLIC sal_Bool ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem* pConfigItem );
+SVT_DLLPUBLIC sal_Bool WriteWindowMetafile( SvStream& rStream, const GDIMetaFile& rMTF );
+SVT_DLLPUBLIC sal_Bool WriteWindowMetafileBits( SvStream& rStream, const GDIMetaFile& rMTF );
#endif //_FILTER_HXX
diff --git a/svtools/inc/svtools/fltcall.hxx b/svtools/inc/svtools/fltcall.hxx
index d0bf054d724e..3da14a9a83f9 100644
--- a/svtools/inc/svtools/fltcall.hxx
+++ b/svtools/inc/svtools/fltcall.hxx
@@ -55,19 +55,19 @@ struct FltCallDialogParameter
eFieldUnit ( eFiUni ) {};
};
-typedef BOOL (*PFilterCall)(SvStream & rStream, Graphic & rGraphic,
+typedef sal_Bool (*PFilterCall)(SvStream & rStream, Graphic & rGraphic,
FilterConfigItem* pConfigItem, sal_Bool bPrefDialog);
// Von diesem Typ sind sowohl Export-Filter-Funktionen als auch Import-Filter-Funktionen.
// rFileName ist der komplette Pfadname der zu importierenden bzw. zu exportierenden Datei.
// pCallBack darf auch NULL sein. pCallerData wird der Callback-Funktion uebergeben.
// pOptionsConfig darf NULL sein. Anderenfalls ist die Gruppe des Config schon gesetzt
// und darf von dem Filter nicht geaendert werden!
- // Wenn bPrefDialog==TRUE gilt, wird ggf. ein Preferences-Dialog durchgefuehrt.
+ // Wenn bPrefDialog==sal_True gilt, wird ggf. ein Preferences-Dialog durchgefuehrt.
-typedef BOOL ( *PFilterDlgCall )( FltCallDialogParameter& );
+typedef sal_Bool ( *PFilterDlgCall )( FltCallDialogParameter& );
// Von diesem Typ sind sowohl Export-Filter-Funktionen als auch Import-Filter-Funktionen.
// Uebergeben wird ein Pointer auf ein Parent-Fenster und auf die Options-Config.
- // pOptions und pWindow duerfen NULL sein, in diesem Fall wird FALSE zurueckgeliefert.
+ // pOptions und pWindow duerfen NULL sein, in diesem Fall wird sal_False zurueckgeliefert.
// Anderenfalls ist die Gruppe der Config schon gesetzt
// und darf von dem Filter nicht geaendert werden!
diff --git a/svtools/inc/svtools/fltdefs.hxx b/svtools/inc/svtools/fltdefs.hxx
index 86462c2faa33..fa987d912588 100644
--- a/svtools/inc/svtools/fltdefs.hxx
+++ b/svtools/inc/svtools/fltdefs.hxx
@@ -40,12 +40,12 @@
typedef struct RGBQUAD
{
- BYTE rgbBlue;
- BYTE rgbGreen;
- BYTE rgbRed;
- BYTE rgbReserved;
+ sal_uInt8 rgbBlue;
+ sal_uInt8 rgbGreen;
+ sal_uInt8 rgbRed;
+ sal_uInt8 rgbReserved;
- RGBQUAD( const BYTE cRed = 0, const BYTE cGreen = 0, const BYTE cBlue = 0 ) :
+ RGBQUAD( const sal_uInt8 cRed = 0, const sal_uInt8 cGreen = 0, const sal_uInt8 cBlue = 0 ) :
rgbBlue ( cBlue ),
rgbGreen ( cGreen ),
rgbRed ( cRed ),
@@ -53,7 +53,7 @@ typedef struct RGBQUAD
} RGBQUAD;
-typedef BYTE* PDIBBYTE;
+typedef sal_uInt8* PDIBBYTE;
#define MEMCPY memcpy
#define MEMSET memset
#define GLOBALALLOC(nSize) ((PDIBBYTE)GlobalAlloc(GMEM_FIXED,(nSize)))
@@ -62,18 +62,18 @@ typedef BYTE* PDIBBYTE;
#else
-typedef BYTE* PDIBBYTE;
+typedef sal_uInt8* PDIBBYTE;
#define MEMCPY memcpy
#define MEMSET memset
-#define GLOBALALLOC(nSize) ((PDIBBYTE)new BYTE[(nSize)])
+#define GLOBALALLOC(nSize) ((PDIBBYTE)new sal_uInt8[(nSize)])
#define GLOBALFREE(pPointer) (delete[] (pPointer))
#endif
#if defined ( OS2 ) || defined ( UNX )
-void ReadBitmap( SvStream& rIStream, Bitmap& rBmp, USHORT nDefaultHeight = 0, ULONG nOffBits = 0 );
-void ReplaceInfoHeader( SvStream& rStm, BYTE* pBuffer );
+void ReadBitmap( SvStream& rIStream, Bitmap& rBmp, sal_uInt16 nDefaultHeight = 0, sal_uLong nOffBits = 0 );
+void ReplaceInfoHeader( SvStream& rStm, sal_uInt8* pBuffer );
#ifdef OS2
#define RGBQUAD RGBQUADOS2
@@ -87,12 +87,12 @@ void ReplaceInfoHeader( SvStream& rStm, BYTE* pBuffer );
typedef struct RGBQUAD
{
- BYTE rgbBlue;
- BYTE rgbGreen;
- BYTE rgbRed;
- BYTE rgbReserved;
+ sal_uInt8 rgbBlue;
+ sal_uInt8 rgbGreen;
+ sal_uInt8 rgbRed;
+ sal_uInt8 rgbReserved;
- RGBQUAD( const BYTE cRed = 0, const BYTE cGreen = 0, const BYTE cBlue = 0 ) :
+ RGBQUAD( const sal_uInt8 cRed = 0, const sal_uInt8 cGreen = 0, const sal_uInt8 cBlue = 0 ) :
rgbBlue ( cBlue ),
rgbGreen ( cGreen ),
rgbRed ( cRed ),
@@ -101,27 +101,27 @@ typedef struct RGBQUAD
typedef struct BITMAPFILEHEADER
{
- UINT16 bfType;
- UINT32 bfSize;
- UINT16 bfReserved1;
- UINT16 bfReserved2;
- UINT32 bfOffBits;
+ sal_uInt16 bfType;
+ sal_uInt32 bfSize;
+ sal_uInt16 bfReserved1;
+ sal_uInt16 bfReserved2;
+ sal_uInt32 bfOffBits;
} BITMAPFILEHEADER;
typedef BITMAPFILEHEADER* PBITMAPFILEHEADER;
typedef struct BITMAPINFOHEADER
{
- UINT32 biSize;
- UINT32 biWidth;
- UINT32 biHeight;
- UINT16 biPlanes;
- UINT16 biBitCount;
- UINT32 biCompression;
- UINT32 biSizeImage;
- UINT32 biXPelsPerMeter;
- UINT32 biYPelsPerMeter;
- UINT32 biClrUsed;
- UINT32 biClrImportant;
+ sal_uInt32 biSize;
+ sal_uInt32 biWidth;
+ sal_uInt32 biHeight;
+ sal_uInt16 biPlanes;
+ sal_uInt16 biBitCount;
+ sal_uInt32 biCompression;
+ sal_uInt32 biSizeImage;
+ sal_uInt32 biXPelsPerMeter;
+ sal_uInt32 biYPelsPerMeter;
+ sal_uInt32 biClrUsed;
+ sal_uInt32 biClrImportant;
} BITMAPINFOHEADER;
typedef BITMAPINFOHEADER* PBITMAPINFOHEADER;
diff --git a/svtools/inc/svtools/fmtfield.hxx b/svtools/inc/svtools/fmtfield.hxx
index 9226f78b77fc..4e036e974828 100644
--- a/svtools/inc/svtools/fmtfield.hxx
+++ b/svtools/inc/svtools/fmtfield.hxx
@@ -44,7 +44,7 @@
namespace validation { class NumberValidator; }
#endif
-typedef USHORT FORMAT_CHANGE_TYPE;
+typedef sal_uInt16 FORMAT_CHANGE_TYPE;
#define FCT_KEYONLY 0x00 // only a new key was set
#define FCT_FORMATTER 0x01 // a new formatter weas set, usually implies a change of the key, too
#define FCT_PRECISION 0x02 // a new precision was set
@@ -60,7 +60,7 @@ private:
class StaticFormatter
{
static SvNumberFormatter* s_cFormatter;
- static ULONG s_nReferences;
+ static sal_uLong s_nReferences;
public:
StaticFormatter();
~StaticFormatter();
@@ -77,19 +77,19 @@ protected:
double m_dMinValue;
double m_dMaxValue;
- BOOL m_bHasMin : 1;
- BOOL m_bHasMax : 1;
+ sal_Bool m_bHasMin : 1;
+ sal_Bool m_bHasMax : 1;
- BOOL m_bStrictFormat : 1;
+ sal_Bool m_bStrictFormat : 1;
- BOOL m_bValueDirty : 1;
- BOOL m_bEnableEmptyField : 1;
- BOOL m_bAutoColor : 1;
- BOOL m_bEnableNaN : 1;
+ sal_Bool m_bValueDirty : 1;
+ sal_Bool m_bEnableEmptyField : 1;
+ sal_Bool m_bAutoColor : 1;
+ sal_Bool m_bEnableNaN : 1;
double m_dCurrentValue;
double m_dDefaultValue;
- ULONG m_nFormatKey;
+ sal_uLong m_nFormatKey;
SvNumberFormatter* m_pFormatter;
StaticFormatter m_aStaticFormatter;
@@ -100,7 +100,7 @@ protected:
// es macht einen Unterschied, ob man bei eingestellter Textformatierung beim LostFocus den aktuellen String durch
// den Formatter jagt und das Ergebnis anzeigt oder erst aus dem String ein double macht, das formatiert und dann
// ausgibt
- BOOL m_bTreatAsNumber;
+ sal_Bool m_bTreatAsNumber;
// und mit den folgenden Members koennen wir das Ganze hier auch zur formatierten Text-Ausgabe benutzen ...
String m_sCurrentTextValue;
String m_sDefaultText;
@@ -112,18 +112,18 @@ protected:
bool m_bUseInputStringForFormatting;
public:
- FormattedField(Window* pParent, WinBits nStyle = 0, SvNumberFormatter* pInitialFormatter = NULL, INT32 nFormatKey = 0);
- FormattedField(Window* pParent, const ResId& rResId, SvNumberFormatter* pInitialFormatter = NULL, INT32 nFormatKey = 0);
+ FormattedField(Window* pParent, WinBits nStyle = 0, SvNumberFormatter* pInitialFormatter = NULL, sal_Int32 nFormatKey = 0);
+ FormattedField(Window* pParent, const ResId& rResId, SvNumberFormatter* pInitialFormatter = NULL, sal_Int32 nFormatKey = 0);
virtual ~FormattedField();
// Min-/Max-Verwaltung
- BOOL HasMinValue() const { return m_bHasMin; }
- void ClearMinValue() { m_bHasMin = FALSE; }
+ sal_Bool HasMinValue() const { return m_bHasMin; }
+ void ClearMinValue() { m_bHasMin = sal_False; }
void SetMinValue(double dMin);
double GetMinValue() const { return m_dMinValue; }
- BOOL HasMaxValue() const { return m_bHasMax; }
- void ClearMaxValue() { m_bHasMax = FALSE; }
+ sal_Bool HasMaxValue() const { return m_bHasMax; }
+ void ClearMaxValue() { m_bHasMax = sal_False; }
void SetMaxValue(double dMax);
double GetMaxValue() const { return m_dMaxValue; }
@@ -137,30 +137,30 @@ public:
void SetTextValue(const XubString& rText);
// der String wird in ein double umgewandelt (durch den Formatter) und anschliessen in SetValue gesteckt
- BOOL IsEmptyFieldEnabled() const { return m_bEnableEmptyField; }
- void EnableEmptyField(BOOL bEnable);
+ sal_Bool IsEmptyFieldEnabled() const { return m_bEnableEmptyField; }
+ void EnableEmptyField(sal_Bool bEnable);
// wenn nicht enabled, wird beim Verlassen des Feldes der Text auf den letzten gueltigen zurueckgesetzt
- void SetDefaultValue(double dDefault) { m_dDefaultValue = dDefault; m_bValueDirty = TRUE; }
+ void SetDefaultValue(double dDefault) { m_dDefaultValue = dDefault; m_bValueDirty = sal_True; }
// wenn der aktuelle String ungueltig ist, liefert GetValue() diesen Default-Wert
double GetDefaultValue() const { return m_dDefaultValue; }
// Einstellungen fuer das Format
- ULONG GetFormatKey() const { return m_nFormatKey; }
- void SetFormatKey(ULONG nFormatKey);
+ sal_uLong GetFormatKey() const { return m_nFormatKey; }
+ void SetFormatKey(sal_uLong nFormatKey);
SvNumberFormatter* GetFormatter() const { return m_pFormatter; }
- void SetFormatter(SvNumberFormatter* pFormatter, BOOL bResetFormat = TRUE);
- // wenn bResetFormat FALSE ist, wird versucht, das alte eingestellte Format mit 'hinueberzuretten' (teuer, wenn es sich nicht
+ void SetFormatter(SvNumberFormatter* pFormatter, sal_Bool bResetFormat = sal_True);
+ // wenn bResetFormat sal_False ist, wird versucht, das alte eingestellte Format mit 'hinueberzuretten' (teuer, wenn es sich nicht
// um eines der Standard-Formate handelt, die in allen Formattern gleich sind)
- // wenn TRUE, wird als neuer FormatKey 0 gesetzt
+ // wenn sal_True, wird als neuer FormatKey 0 gesetzt
- BOOL GetThousandsSep() const;
- void SetThousandsSep(BOOL _bUseSeparator);
+ sal_Bool GetThousandsSep() const;
+ void SetThousandsSep(sal_Bool _bUseSeparator);
// the is no check if the current format is numeric, so be cautious when calling these functions
- USHORT GetDecimalDigits() const;
- void SetDecimalDigits(USHORT _nPrecision);
+ sal_uInt16 GetDecimalDigits() const;
+ void SetDecimalDigits(sal_uInt16 _nPrecision);
// the is no check if the current format is numeric, so be cautious when calling these functions
SvNumberFormatter* StandardFormatter() { return m_aStaticFormatter; }
@@ -169,11 +169,11 @@ public:
// also ist etwas Vorsicht angebracht ...
void GetFormat(XubString& rFormatString, LanguageType& eLang) const;
- BOOL SetFormat(const XubString& rFormatString, LanguageType eLang);
- // FALSE, wenn der FormatString nicht gesetzt werden konnte (also wahrscheinlich ungueltig ist)
+ sal_Bool SetFormat(const XubString& rFormatString, LanguageType eLang);
+ // sal_False, wenn der FormatString nicht gesetzt werden konnte (also wahrscheinlich ungueltig ist)
- BOOL IsStrictFormat() const { return m_bStrictFormat; }
- void SetStrictFormat(BOOL bEnable) { m_bStrictFormat = bEnable; }
+ sal_Bool IsStrictFormat() const { return m_bStrictFormat; }
+ void SetStrictFormat(sal_Bool bEnable) { m_bStrictFormat = bEnable; }
// Formatueberpruefung waehrend der Eingabe ?
// Spin-Handling
@@ -193,15 +193,15 @@ public:
void SetSpinLast(double dLast) { m_dSpinLast = dLast; }
double GetSpinLast() const { return m_dSpinLast; }
- BOOL TreatingAsNumber() const { return m_bTreatAsNumber; }
- void TreatAsNumber(BOOL bDoSo) { m_bTreatAsNumber = bDoSo; }
+ sal_Bool TreatingAsNumber() const { return m_bTreatAsNumber; }
+ void TreatAsNumber(sal_Bool bDoSo) { m_bTreatAsNumber = bDoSo; }
public:
virtual void SetText( const XubString& rStr );
virtual void SetText( const XubString& rStr, const Selection& rNewSelection );
void SetValidateText(const XubString& rText, const String* pErrorText = NULL);
- // die folgenden Methoden sind interesant, wenn m_bTreatAsNumber auf FALSE sitzt
+ // die folgenden Methoden sind interesant, wenn m_bTreatAsNumber auf sal_False sitzt
/** nehmen wir mal an, irgendjemand will das ganze schoene double-Handling gar nicht haben, sondern
einfach den Text formatiert ausgeben ...
(der Text wird einfach nur durch den Formatter gejagt und dann gesetzt)
@@ -222,12 +222,12 @@ public:
*/
void Commit();
- // enable automatic coloring. if set to TRUE, and the format the field is working with for any current value
+ // enable automatic coloring. if set to sal_True, and the format the field is working with for any current value
// says that it has to be painted in a special color (e.g. a format where negative numbers should be printed
// red), the text is painted with that color automatically.
// The color used is the same as returned by GetLastOutputColor()
- void SetAutoColor(BOOL _bAutomatic);
- BOOL GetAutoColor() const { return m_bAutoColor; }
+ void SetAutoColor(sal_Bool _bAutomatic);
+ sal_Bool GetAutoColor() const { return m_bAutoColor; }
/** enables handling of not-a-number value.
@@ -243,8 +243,8 @@ public:
control, and then tabs out of it, the text "foo" will persist, and GetValue will
return NaN in subsequent calls.
*/
- void EnableNotANumber( BOOL _bEnable );
- BOOL IsNotANumberEnabled( ) const { return m_bEnableNaN; }
+ void EnableNotANumber( sal_Bool _bEnable );
+ sal_Bool IsNotANumberEnabled( ) const { return m_bEnableNaN; }
/** When being set to true, the strings in the field are formatted using the
InputLine format. That's also what you get in Calc when you edit a cell
@@ -258,16 +258,16 @@ protected:
virtual void Modify();
// CheckText ueberschreiben fuer Ueberpruefung zur Eingabezeit
- virtual BOOL CheckText(const XubString&) const { return TRUE; }
+ virtual sal_Bool CheckText(const XubString&) const { return sal_True; }
// any aspect of the current format has changed
virtual void FormatChanged(FORMAT_CHANGE_TYPE nWhat);
void ImplSetTextImpl(const XubString& rNew, Selection* pNewSel);
- void ImplSetValue(double dValue, BOOL bForce);
- BOOL ImplGetValue(double& dNewVal);
+ void ImplSetValue(double dValue, sal_Bool bForce);
+ sal_Bool ImplGetValue(double& dNewVal);
- void ImplSetFormatKey(ULONG nFormatKey);
+ void ImplSetFormatKey(sal_uLong nFormatKey);
// SetFormatKey without FormatChanged notification
virtual SvNumberFormatter* CreateFormatter() { SetFormatter(StandardFormatter()); return m_pFormatter; }
@@ -313,7 +313,7 @@ public:
virtual ~DoubleNumericField();
protected:
- virtual BOOL CheckText(const XubString& sText) const;
+ virtual sal_Bool CheckText(const XubString& sText) const;
virtual void FormatChanged(FORMAT_CHANGE_TYPE nWhat);
void ResetConformanceTester();
@@ -327,8 +327,8 @@ protected:
class DoubleCurrencyField : public FormattedField
{
XubString m_sCurrencySymbol;
- BOOL m_bPrependCurrSym;
- BOOL m_bChangingFormat;
+ sal_Bool m_bPrependCurrSym;
+ sal_Bool m_bChangingFormat;
public:
DoubleCurrencyField(Window* pParent, WinBits nStyle = 0);
@@ -337,8 +337,8 @@ public:
XubString getCurrencySymbol() const { return m_sCurrencySymbol; }
void setCurrencySymbol(const XubString& _sSymbol);
- BOOL getPrependCurrSym() const { return m_bPrependCurrSym; }
- void setPrependCurrSym(BOOL _bPrepend);
+ sal_Bool getPrependCurrSym() const { return m_bPrependCurrSym; }
+ void setPrependCurrSym(sal_Bool _bPrepend);
protected:
virtual void FormatChanged(FORMAT_CHANGE_TYPE nWhat);
diff --git a/svtools/inc/svtools/generictoolboxcontroller.hxx b/svtools/inc/svtools/generictoolboxcontroller.hxx
index 0e9dc73a6882..674429bf2e4d 100644
--- a/svtools/inc/svtools/generictoolboxcontroller.hxx
+++ b/svtools/inc/svtools/generictoolboxcontroller.hxx
@@ -46,7 +46,7 @@ class SVT_DLLPUBLIC GenericToolboxController : public svt::ToolboxController
GenericToolboxController( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rServiceManager,
const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame,
ToolBox* pToolBox,
- USHORT nID,
+ sal_uInt16 nID,
const rtl::OUString& aCommand );
virtual ~GenericToolboxController();
diff --git a/svtools/inc/svtools/grfmgr.hxx b/svtools/inc/svtools/grfmgr.hxx
index 3ed608c1525d..9841d4e312ef 100644
--- a/svtools/inc/svtools/grfmgr.hxx
+++ b/svtools/inc/svtools/grfmgr.hxx
@@ -104,14 +104,14 @@ private:
long mnTopCrop;
long mnRightCrop;
long mnBottomCrop;
- USHORT mnRotate10;
+ sal_uInt16 mnRotate10;
short mnContPercent;
short mnLumPercent;
short mnRPercent;
short mnGPercent;
short mnBPercent;
- BOOL mbInvert;
- BYTE mcTransparency;
+ sal_Bool mbInvert;
+ sal_uInt8 mcTransparency;
GraphicDrawMode meDrawMode;
void* mpDummy;
@@ -121,14 +121,14 @@ public:
GraphicAttr();
~GraphicAttr();
- BOOL operator==( const GraphicAttr& rAttr ) const;
- BOOL operator!=( const GraphicAttr& rAttr ) const { return !( *this == rAttr ); }
+ sal_Bool operator==( const GraphicAttr& rAttr ) const;
+ sal_Bool operator!=( const GraphicAttr& rAttr ) const { return !( *this == rAttr ); }
void SetDrawMode( GraphicDrawMode eDrawMode ) { meDrawMode = eDrawMode; }
GraphicDrawMode GetDrawMode() const { return meDrawMode; }
- void SetMirrorFlags( ULONG nMirrFlags ) { mnMirrFlags = nMirrFlags; }
- ULONG GetMirrorFlags() const { return mnMirrFlags; }
+ void SetMirrorFlags( sal_uLong nMirrFlags ) { mnMirrFlags = nMirrFlags; }
+ sal_uLong GetMirrorFlags() const { return mnMirrFlags; }
void SetCrop( long nLeft_100TH_MM, long nTop_100TH_MM, long nRight_100TH_MM, long nBottom_100TH_MM )
{
@@ -140,8 +140,8 @@ public:
long GetRightCrop() const { return mnRightCrop; }
long GetBottomCrop() const { return mnBottomCrop; }
- void SetRotation( USHORT nRotate10 ) { mnRotate10 = nRotate10; }
- USHORT GetRotation() const { return mnRotate10; }
+ void SetRotation( sal_uInt16 nRotate10 ) { mnRotate10 = nRotate10; }
+ sal_uInt16 GetRotation() const { return mnRotate10; }
void SetLuminance( short nLuminancePercent ) { mnLumPercent = nLuminancePercent; }
short GetLuminance() const { return mnLumPercent; }
@@ -161,22 +161,22 @@ public:
void SetGamma( double fGamma ) { mfGamma = fGamma; }
double GetGamma() const { return mfGamma; }
- void SetInvert( BOOL bInvert ) { mbInvert = bInvert; }
- BOOL IsInvert() const { return mbInvert; }
+ void SetInvert( sal_Bool bInvert ) { mbInvert = bInvert; }
+ sal_Bool IsInvert() const { return mbInvert; }
- void SetTransparency( BYTE cTransparency ) { mcTransparency = cTransparency; }
- BYTE GetTransparency() const { return mcTransparency; }
+ void SetTransparency( sal_uInt8 cTransparency ) { mcTransparency = cTransparency; }
+ sal_uInt8 GetTransparency() const { return mcTransparency; }
- BOOL IsSpecialDrawMode() const { return( meDrawMode != GRAPHICDRAWMODE_STANDARD ); }
- BOOL IsMirrored() const { return( mnMirrFlags != 0UL ); }
- BOOL IsCropped() const
+ sal_Bool IsSpecialDrawMode() const { return( meDrawMode != GRAPHICDRAWMODE_STANDARD ); }
+ sal_Bool IsMirrored() const { return( mnMirrFlags != 0UL ); }
+ sal_Bool IsCropped() const
{
return( mnLeftCrop != 0 || mnTopCrop != 0 ||
mnRightCrop != 0 || mnBottomCrop != 0 );
}
- BOOL IsRotated() const { return( ( mnRotate10 % 3600 ) != 0 ); }
- BOOL IsTransparent() const { return( mcTransparency > 0 ); }
- BOOL IsAdjusted() const
+ sal_Bool IsRotated() const { return( ( mnRotate10 % 3600 ) != 0 ); }
+ sal_Bool IsTransparent() const { return( mcTransparency > 0 ); }
+ sal_Bool IsAdjusted() const
{
return( mnLumPercent != 0 || mnContPercent != 0 || mnRPercent != 0 ||
mnGPercent != 0 || mnBPercent != 0 || mfGamma != 1.0 || mbInvert );
@@ -202,7 +202,7 @@ private:
GraphicAttr maAttr;
Size maPrefSize;
MapMode maPrefMapMode;
- ULONG mnSizeBytes;
+ sal_uLong mnSizeBytes;
GraphicType meType;
GraphicManager* mpMgr;
String* mpLink;
@@ -210,17 +210,17 @@ private:
String* mpUserData;
Timer* mpSwapOutTimer;
GrfSimpleCacheObj* mpSimpleCache;
- ULONG mnAnimationLoopCount;
+ sal_uLong mnAnimationLoopCount;
void* mpDummy1;
void* mpDummy2;
- BOOL mbAutoSwapped : 1;
- BOOL mbTransparent : 1;
- BOOL mbAnimated : 1;
- BOOL mbEPS : 1;
- BOOL mbIsInSwapIn : 1;
- BOOL mbIsInSwapOut : 1;
- BOOL mbAlpha : 1;
- BOOL mbDummyFlag8 : 1;
+ sal_Bool mbAutoSwapped : 1;
+ sal_Bool mbTransparent : 1;
+ sal_Bool mbAnimated : 1;
+ sal_Bool mbEPS : 1;
+ sal_Bool mbIsInSwapIn : 1;
+ sal_Bool mbIsInSwapOut : 1;
+ sal_Bool mbAlpha : 1;
+ sal_Bool mbDummyFlag8 : 1;
void SVT_DLLPRIVATE ImplConstruct();
void SVT_DLLPRIVATE ImplAssignGraphicData();
@@ -228,9 +228,9 @@ private:
const ByteString* pID = NULL,
const GraphicObject* pCopyObj = NULL );
void SVT_DLLPRIVATE ImplAutoSwapIn();
- BOOL SVT_DLLPRIVATE ImplIsAutoSwapped() const { return mbAutoSwapped; }
- BOOL SVT_DLLPRIVATE ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rSz, const GraphicAttr* pAttr,
- PolyPolygon& rClipPolyPoly, BOOL& bRectClipRegion ) const;
+ sal_Bool SVT_DLLPRIVATE ImplIsAutoSwapped() const { return mbAutoSwapped; }
+ sal_Bool SVT_DLLPRIVATE ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rSz, const GraphicAttr* pAttr,
+ PolyPolygon& rClipPolyPoly, sal_Bool& bRectClipRegion ) const;
/** Render a given number of tiles in an optimized way
@@ -276,22 +276,22 @@ private:
bool SVT_DLLPRIVATE ImplRenderTempTile( VirtualDevice& rVDev, int nExponent,
int nNumTilesX, int nNumTilesY,
const Size& rTileSizePixel,
- const GraphicAttr* pAttr, ULONG nFlags );
+ const GraphicAttr* pAttr, sal_uLong nFlags );
/// internally called by ImplRenderTempTile()
bool SVT_DLLPRIVATE ImplRenderTileRecursive( VirtualDevice& rVDev, int nExponent, int nMSBFactor,
int nNumOrigTilesX, int nNumOrigTilesY,
int nRemainderTilesX, int nRemainderTilesY,
const Size& rTileSizePixel, const GraphicAttr* pAttr,
- ULONG nFlags, ImplTileInfo& rTileInfo );
+ sal_uLong nFlags, ImplTileInfo& rTileInfo );
bool SVT_DLLPRIVATE ImplDrawTiled( OutputDevice* pOut, const Rectangle& rArea, const Size& rSizePixel,
- const Size& rOffset, const GraphicAttr* pAttr, ULONG nFlags, int nTileCacheSize1D );
+ const Size& rOffset, const GraphicAttr* pAttr, sal_uLong nFlags, int nTileCacheSize1D );
bool SVT_DLLPRIVATE ImplDrawTiled( OutputDevice& rOut, const Point& rPos,
int nNumTilesX, int nNumTilesY,
const Size& rTileSize,
- const GraphicAttr* pAttr, ULONG nFlags );
+ const GraphicAttr* pAttr, sal_uLong nFlags );
void SVT_DLLPRIVATE ImplTransformBitmap( BitmapEx& rBmpEx,
const GraphicAttr& rAttr,
@@ -299,7 +299,7 @@ private:
const Size& rCropRightBottom,
const Rectangle& rCropRect,
const Size& rDstSize,
- BOOL bEnlarge ) const;
+ sal_Bool bEnlarge ) const;
DECL_LINK( ImplAutoSwapOutHdl, void* );
@@ -309,7 +309,7 @@ protected:
virtual SvStream* GetSwapStream() const;
// !!! to be removed
- virtual ULONG GetReleaseFromCache() const;
+ virtual sal_uLong GetReleaseFromCache() const;
virtual void Load( SvStream& );
virtual void Save( SvStream& );
@@ -327,14 +327,14 @@ public:
~GraphicObject();
GraphicObject& operator=( const GraphicObject& rCacheObj );
- BOOL operator==( const GraphicObject& rCacheObj ) const;
- BOOL operator!=( const GraphicObject& rCacheObj ) const { return !( *this == rCacheObj ); }
+ sal_Bool operator==( const GraphicObject& rCacheObj ) const;
+ sal_Bool operator!=( const GraphicObject& rCacheObj ) const { return !( *this == rCacheObj ); }
- BOOL HasSwapStreamHdl() const { return( mpSwapStreamHdl != NULL && mpSwapStreamHdl->IsSet() ); }
+ sal_Bool HasSwapStreamHdl() const { return( mpSwapStreamHdl != NULL && mpSwapStreamHdl->IsSet() ); }
void SetSwapStreamHdl();
- void SetSwapStreamHdl( const Link& rHdl, const ULONG nSwapOutTimeout = 0UL );
+ void SetSwapStreamHdl( const Link& rHdl, const sal_uLong nSwapOutTimeout = 0UL );
Link GetSwapStreamHdl() const;
- ULONG GetSwapOutTimeout() const { return( mpSwapOutTimer ? mpSwapOutTimer->GetTimeout() : 0 ); }
+ sal_uLong GetSwapOutTimeout() const { return( mpSwapOutTimer ? mpSwapOutTimer->GetTimeout() : 0 ); }
void FireSwapInRequest();
void FireSwapOutRequest();
@@ -342,8 +342,8 @@ public:
void SetGraphicManager( const GraphicManager& rMgr );
GraphicManager& GetGraphicManager() const { return *mpMgr; }
- BOOL IsCached( OutputDevice* pOut, const Point& rPt, const Size& rSz,
- const GraphicAttr* pAttr = NULL, ULONG nFlags = GRFMGR_DRAW_STANDARD) const;
+ sal_Bool IsCached( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+ const GraphicAttr* pAttr = NULL, sal_uLong nFlags = GRFMGR_DRAW_STANDARD) const;
void ReleaseFromCache();
const Graphic& GetGraphic() const;
@@ -381,12 +381,12 @@ public:
void SetAttr( const GraphicAttr& rAttr );
const GraphicAttr& GetAttr() const { return maAttr; }
- BOOL HasLink() const { return( mpLink != NULL && mpLink->Len() > 0 ); }
+ sal_Bool HasLink() const { return( mpLink != NULL && mpLink->Len() > 0 ); }
void SetLink();
void SetLink( const String& rLink );
String GetLink() const;
- BOOL HasUserData() const { return( mpUserData != NULL && mpUserData->Len() > 0 ); }
+ sal_Bool HasUserData() const { return( mpUserData != NULL && mpUserData->Len() > 0 ); }
void SetUserData();
void SetUserData( const String& rUserData );
String GetUserData() const;
@@ -396,36 +396,36 @@ public:
GraphicType GetType() const { return meType; }
const Size& GetPrefSize() const { return maPrefSize; }
const MapMode& GetPrefMapMode() const { return maPrefMapMode; }
- ULONG GetSizeBytes() const { return mnSizeBytes; }
- ULONG GetChecksum() const;
- BOOL IsTransparent() const { return mbTransparent; }
- BOOL IsAlpha() const { return mbAlpha; }
- BOOL IsAnimated() const { return mbAnimated; }
- BOOL IsEPS() const { return mbEPS; }
+ sal_uLong GetSizeBytes() const { return mnSizeBytes; }
+ sal_uLong GetChecksum() const;
+ sal_Bool IsTransparent() const { return mbTransparent; }
+ sal_Bool IsAlpha() const { return mbAlpha; }
+ sal_Bool IsAnimated() const { return mbAnimated; }
+ sal_Bool IsEPS() const { return mbEPS; }
void ResetAnimationLoopCount();
List* GetAnimationInfoList() const;
Link GetAnimationNotifyHdl() const { return maGraphic.GetAnimationNotifyHdl(); }
void SetAnimationNotifyHdl( const Link& rLink );
- BOOL SwapOut();
- BOOL SwapOut( SvStream* pOStm );
- BOOL SwapIn();
- BOOL SwapIn( SvStream* pIStm );
+ sal_Bool SwapOut();
+ sal_Bool SwapOut( SvStream* pOStm );
+ sal_Bool SwapIn();
+ sal_Bool SwapIn( SvStream* pIStm );
- BOOL IsInSwapIn() const { return mbIsInSwapIn; }
- BOOL IsInSwapOut() const { return mbIsInSwapOut; }
- BOOL IsInSwap() const { return( mbIsInSwapOut || mbIsInSwapOut ); }
- BOOL IsSwappedOut() const { return( mbAutoSwapped || maGraphic.IsSwapOut() ); }
+ sal_Bool IsInSwapIn() const { return mbIsInSwapIn; }
+ sal_Bool IsInSwapOut() const { return mbIsInSwapOut; }
+ sal_Bool IsInSwap() const { return( mbIsInSwapOut || mbIsInSwapOut ); }
+ sal_Bool IsSwappedOut() const { return( mbAutoSwapped || maGraphic.IsSwapOut() ); }
void SetSwapState();
- BOOL Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
- const GraphicAttr* pAttr = NULL, ULONG nFlags = GRFMGR_DRAW_STANDARD );
+ sal_Bool Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+ const GraphicAttr* pAttr = NULL, sal_uLong nFlags = GRFMGR_DRAW_STANDARD );
- BOOL DrawWithPDFHandling( OutputDevice& rOutDev,
+ sal_Bool DrawWithPDFHandling( OutputDevice& rOutDev,
const Point& rPt, const Size& rSz,
const GraphicAttr* pGrfAttr = NULL,
- const ULONG nFlags = GRFMGR_DRAW_STANDARD );
+ const sal_uLong nFlags = GRFMGR_DRAW_STANDARD );
/** Draw the graphic repeatedly into the given output rectangle
@@ -458,14 +458,14 @@ public:
is. This is useful if e.g. you want only a few, very large
bitmap drawings appear on the outdev.
- @return TRUE, if drawing completed successfully
+ @return sal_True, if drawing completed successfully
*/
- BOOL DrawTiled( OutputDevice* pOut, const Rectangle& rArea, const Size& rSize,
+ sal_Bool DrawTiled( OutputDevice* pOut, const Rectangle& rArea, const Size& rSize,
const Size& rOffset, const GraphicAttr* pAttr = NULL,
- ULONG nFlags = GRFMGR_DRAW_STANDARD, int nTileCacheSize1D=128 );
+ sal_uLong nFlags = GRFMGR_DRAW_STANDARD, int nTileCacheSize1D=128 );
- BOOL StartAnimation( OutputDevice* pOut, const Point& rPt, const Size& rSz, long nExtraData = 0L,
- const GraphicAttr* pAttr = NULL, ULONG nFlags = GRFMGR_DRAW_STANDARD,
+ sal_Bool StartAnimation( OutputDevice* pOut, const Point& rPt, const Size& rSz, long nExtraData = 0L,
+ const GraphicAttr* pAttr = NULL, sal_uLong nFlags = GRFMGR_DRAW_STANDARD,
OutputDevice* pFirstFrameOutDev = NULL );
void StopAnimation( OutputDevice* pOut = NULL, long nExtraData = 0L );
@@ -493,33 +493,33 @@ private:
GraphicManager( const GraphicManager& ) {}
GraphicManager& operator=( const GraphicManager& ) { return *this; }
- BOOL SVT_DLLPRIVATE ImplDraw( OutputDevice* pOut, const Point& rPt,
+ sal_Bool SVT_DLLPRIVATE ImplDraw( OutputDevice* pOut, const Point& rPt,
const Size& rSz, GraphicObject& rObj,
const GraphicAttr& rAttr,
- const ULONG nFlags, BOOL& rCached );
+ const sal_uLong nFlags, sal_Bool& rCached );
- BOOL SVT_DLLPRIVATE ImplCreateOutput( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+ sal_Bool SVT_DLLPRIVATE ImplCreateOutput( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const BitmapEx& rBmpEx, const GraphicAttr& rAttr,
- const ULONG nFlags, BitmapEx* pBmpEx = NULL );
- BOOL SVT_DLLPRIVATE ImplCreateOutput( OutputDevice* pOut,
+ const sal_uLong nFlags, BitmapEx* pBmpEx = NULL );
+ sal_Bool SVT_DLLPRIVATE ImplCreateOutput( OutputDevice* pOut,
const Point& rPt, const Size& rSz,
const GDIMetaFile& rMtf, const GraphicAttr& rAttr,
- const ULONG nFlags, GDIMetaFile& rOutMtf, BitmapEx& rOutBmpEx );
+ const sal_uLong nFlags, GDIMetaFile& rOutMtf, BitmapEx& rOutBmpEx );
- BOOL SVT_DLLPRIVATE ImplCreateScaled( const BitmapEx& rBmpEx,
+ sal_Bool SVT_DLLPRIVATE ImplCreateScaled( const BitmapEx& rBmpEx,
long* pMapIX, long* pMapFX, long* pMapIY, long* pMapFY,
long nStartX, long nEndX, long nStartY, long nEndY,
BitmapEx& rOutBmpEx );
- BOOL SVT_DLLPRIVATE ImplCreateRotatedScaled( const BitmapEx& rBmpEx,
- USHORT nRot10, const Size& rOutSzPix, const Size& rUntSzPix,
+ sal_Bool SVT_DLLPRIVATE ImplCreateRotatedScaled( const BitmapEx& rBmpEx,
+ sal_uInt16 nRot10, const Size& rOutSzPix, const Size& rUntSzPix,
long* pMapIX, long* pMapFX, long* pMapIY, long* pMapFY,
long nStartX, long nEndX, long nStartY, long nEndY,
BitmapEx& rOutBmpEx );
- static void SVT_DLLPRIVATE ImplAdjust( BitmapEx& rBmpEx, const GraphicAttr& rAttr, ULONG nAdjustmentFlags );
- static void SVT_DLLPRIVATE ImplAdjust( GDIMetaFile& rMtf, const GraphicAttr& rAttr, ULONG nAdjustmentFlags );
- static void SVT_DLLPRIVATE ImplAdjust( Animation& rAnimation, const GraphicAttr& rAttr, ULONG nAdjustmentFlags );
+ static void SVT_DLLPRIVATE ImplAdjust( BitmapEx& rBmpEx, const GraphicAttr& rAttr, sal_uLong nAdjustmentFlags );
+ static void SVT_DLLPRIVATE ImplAdjust( GDIMetaFile& rMtf, const GraphicAttr& rAttr, sal_uLong nAdjustmentFlags );
+ static void SVT_DLLPRIVATE ImplAdjust( Animation& rAnimation, const GraphicAttr& rAttr, sal_uLong nAdjustmentFlags );
static void SVT_DLLPRIVATE ImplDraw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const GDIMetaFile& rMtf, const GraphicAttr& rAttr );
@@ -529,42 +529,42 @@ private:
const ByteString* pID = NULL,
const GraphicObject* pCopyObj = NULL );
void SVT_DLLPRIVATE ImplUnregisterObj( const GraphicObject& rObj );
- inline BOOL SVT_DLLPRIVATE ImplHasObjects() const { return( maObjList.Count() > 0UL ); }
+ inline sal_Bool SVT_DLLPRIVATE ImplHasObjects() const { return( maObjList.Count() > 0UL ); }
// Only used in swap case by GraphicObject
void SVT_DLLPRIVATE ImplGraphicObjectWasSwappedOut( const GraphicObject& rObj );
- BOOL SVT_DLLPRIVATE ImplFillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute );
+ sal_Bool SVT_DLLPRIVATE ImplFillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute );
void SVT_DLLPRIVATE ImplGraphicObjectWasSwappedIn( const GraphicObject& rObj );
ByteString SVT_DLLPRIVATE ImplGetUniqueID( const GraphicObject& rObj ) const;
public:
- GraphicManager( ULONG nCacheSize = 10000000UL, ULONG nMaxObjCacheSize = 2400000UL );
+ GraphicManager( sal_uLong nCacheSize = 10000000UL, sal_uLong nMaxObjCacheSize = 2400000UL );
~GraphicManager();
- void SetMaxCacheSize( ULONG nNewCacheSize );
- ULONG GetMaxCacheSize() const;
+ void SetMaxCacheSize( sal_uLong nNewCacheSize );
+ sal_uLong GetMaxCacheSize() const;
- void SetMaxObjCacheSize( ULONG nNewMaxObjSize, BOOL bDestroyGreaterCached = FALSE );
- ULONG GetMaxObjCacheSize() const;
+ void SetMaxObjCacheSize( sal_uLong nNewMaxObjSize, sal_Bool bDestroyGreaterCached = sal_False );
+ sal_uLong GetMaxObjCacheSize() const;
- ULONG GetUsedCacheSize() const;
- ULONG GetFreeCacheSize() const;
+ sal_uLong GetUsedCacheSize() const;
+ sal_uLong GetFreeCacheSize() const;
- void SetCacheTimeout( ULONG nTimeoutSeconds );
- ULONG GetCacheTimeout() const;
+ void SetCacheTimeout( sal_uLong nTimeoutSeconds );
+ sal_uLong GetCacheTimeout() const;
void ClearCache();
void ReleaseFromCache( const GraphicObject& rObj );
- BOOL IsInCache( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+ sal_Bool IsInCache( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const GraphicObject& rObj, const GraphicAttr& rAttr ) const;
- BOOL DrawObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+ sal_Bool DrawObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
GraphicObject& rObj, const GraphicAttr& rAttr,
- const ULONG nFlags, BOOL& rCached );
+ const sal_uLong nFlags, sal_Bool& rCached );
};
#endif // _GRFMGR_HXX
diff --git a/svtools/inc/svtools/headbar.hxx b/svtools/inc/svtools/headbar.hxx
index c225a95d1f55..106184e040f6 100644
--- a/svtools/inc/svtools/headbar.hxx
+++ b/svtools/inc/svtools/headbar.hxx
@@ -105,7 +105,7 @@ StartDrag() Dieser Handler wird gerufen, wenn Draggen gestartet
wird, bzw. wenn ein Item angeklickt wurde.
In diesem Handler sollte spaetestens mit SetDragSize()
die Groesse der Size-Linie gesetzt werden, wenn
- IsItemMode() FALSE zurueckliefert.
+ IsItemMode() sal_False zurueckliefert.
Drag() Dieser Handler wird gerufen, wenn gedraggt wird. Wenn
mit SetDragSize() keine Groesse gesetzt wird, kann
dieser Handler dafuer benutzt werden, um die
@@ -116,12 +116,12 @@ Drag() Dieser Handler wird gerufen, wenn gedraggt wird. Wenn
EndDrag() Dieser Handler wird gerufen, wenn ein Drag-Vorgang
beendet wurde. Wenn im EndDrag-Handler GetCurItemId()
0 zurueckliefert, wurde der Drag-Vorgang abgebrochen.
- Wenn dies nicht der Fall ist und IsItemMode() FALSE
+ Wenn dies nicht der Fall ist und IsItemMode() sal_False
zurueckliefert, sollte von dem gedraggten Item
die neue Groesse mit GetItemSize() abgefragt werden
und entsprechend im dazugehoerigem Control uebernommen
- werden. Wenn IsItemMode() TRUE, GetCurItemId() eine Id
- und IsItemDrag() TRUE zurueckliefert, wurde dieses
+ werden. Wenn IsItemMode() sal_True, GetCurItemId() eine Id
+ und IsItemDrag() sal_True zurueckliefert, wurde dieses
Item verschoben. Es sollte dann mit GetItemPos() die
neue Position abgefragt werden und auch die Daten
im dazugehoerigem Control angepasst werden. Ansonsten
@@ -143,12 +143,12 @@ GetItemDragPos() Liefert die Position zurueck, an der ein Item verschoben
oder wenn kein ItemDrag aktiv ist.
IsItemMode() Mit dieser Methode kann abgefragt werden, ob fuer ein
Item oder einen Trenner der Handler gerufen wurde.
- TRUE - Handler wurde fuer das Item gerufen
- FALSE - Handler wurde fuer den Trenner gerufen
+ sal_True - Handler wurde fuer das Item gerufen
+ sal_False - Handler wurde fuer den Trenner gerufen
IsItemDrag() Mit dieser Methode kann abgefragt werden, ob ein
Item gedragt oder selektiert wurde.
- TRUE - Item wird verschoben
- FALSE - Item wird selektiert
+ sal_True - Item wird verschoben
+ sal_False - Item wird selektiert
SetDragSize() Mit dieser Methode wird gesetzt, wir gross der
Trennstrich sein soll, der vom Control gemalt wird.
Dies sollte so gross sein, wie das angrenzende Fenster
@@ -200,7 +200,7 @@ class ImplHeadItemList;
// - HeaderBarItemBits -
// ---------------------
-typedef USHORT HeaderBarItemBits;
+typedef sal_uInt16 HeaderBarItemBits;
// ----------------------------
// - Bits fuer HeaderBarItems -
@@ -227,8 +227,8 @@ typedef USHORT HeaderBarItemBits;
// - HeaderBar-Types -
// -------------------
-#define HEADERBAR_APPEND ((USHORT)0xFFFF)
-#define HEADERBAR_ITEM_NOTFOUND ((USHORT)0xFFFF)
+#define HEADERBAR_APPEND ((sal_uInt16)0xFFFF)
+#define HEADERBAR_ITEM_NOTFOUND ((sal_uInt16)0xFFFF)
#define HEADERBAR_FULLSIZE ((long)1000000000)
#define HEADERBAR_TEXTOFF 2
@@ -250,14 +250,14 @@ private:
long mnStartPos;
long mnDragPos;
long mnMouseOff;
- USHORT mnCurItemId;
- USHORT mnItemDragPos;
- BOOL mbDragable;
- BOOL mbDrag;
- BOOL mbItemDrag;
- BOOL mbOutDrag;
- BOOL mbButtonStyle;
- BOOL mbItemMode;
+ sal_uInt16 mnCurItemId;
+ sal_uInt16 mnItemDragPos;
+ sal_Bool mbDragable;
+ sal_Bool mbDrag;
+ sal_Bool mbItemDrag;
+ sal_Bool mbOutDrag;
+ sal_Bool mbButtonStyle;
+ sal_Bool mbItemMode;
Link maStartDragHdl;
Link maDragHdl;
Link maEndDragHdl;
@@ -272,25 +272,25 @@ private:
#ifdef _SV_HEADBAR_CXX
using Window::ImplInit;
SVT_DLLPRIVATE void ImplInit( WinBits nWinStyle );
- SVT_DLLPRIVATE void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
- SVT_DLLPRIVATE long ImplGetItemPos( USHORT nPos ) const;
- SVT_DLLPRIVATE Rectangle ImplGetItemRect( USHORT nPos ) const;
+ SVT_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
+ SVT_DLLPRIVATE long ImplGetItemPos( sal_uInt16 nPos ) const;
+ SVT_DLLPRIVATE Rectangle ImplGetItemRect( sal_uInt16 nPos ) const;
using Window::ImplHitTest;
- SVT_DLLPRIVATE USHORT ImplHitTest( const Point& rPos, long& nMouseOff, USHORT& nPos ) const;
- SVT_DLLPRIVATE void ImplInvertDrag( USHORT nStartPos, USHORT nEndPos );
+ SVT_DLLPRIVATE sal_uInt16 ImplHitTest( const Point& rPos, long& nMouseOff, sal_uInt16& nPos ) const;
+ SVT_DLLPRIVATE void ImplInvertDrag( sal_uInt16 nStartPos, sal_uInt16 nEndPos );
SVT_DLLPRIVATE void ImplDrawItem( OutputDevice* pDev,
- USHORT nPos, BOOL bHigh, BOOL bDrag,
+ sal_uInt16 nPos, sal_Bool bHigh, sal_Bool bDrag,
const Rectangle& rItemRect,
const Rectangle* pRect,
- ULONG nFlags );
- SVT_DLLPRIVATE void ImplDrawItem( USHORT nPos, BOOL bHigh = FALSE,
- BOOL bDrag = FALSE,
+ sal_uLong nFlags );
+ SVT_DLLPRIVATE void ImplDrawItem( sal_uInt16 nPos, sal_Bool bHigh = sal_False,
+ sal_Bool bDrag = sal_False,
const Rectangle* pRect = NULL );
- SVT_DLLPRIVATE void ImplUpdate( USHORT nPos,
- BOOL bEnd = FALSE, BOOL bDirect = FALSE );
- SVT_DLLPRIVATE void ImplStartDrag( const Point& rPos, BOOL bCommand );
+ SVT_DLLPRIVATE void ImplUpdate( sal_uInt16 nPos,
+ sal_Bool bEnd = sal_False, sal_Bool bDirect = sal_False );
+ SVT_DLLPRIVATE void ImplStartDrag( const Point& rPos, sal_Bool bCommand );
SVT_DLLPRIVATE void ImplDrag( const Point& rPos );
- SVT_DLLPRIVATE void ImplEndDrag( BOOL bCancel );
+ SVT_DLLPRIVATE void ImplEndDrag( sal_Bool bCancel );
#endif
public:
@@ -302,7 +302,7 @@ public:
virtual void MouseMove( const MouseEvent& rMEvt );
virtual void Tracking( const TrackingEvent& rTEvt );
virtual void Paint( const Rectangle& rRect );
- virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags );
+ virtual void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags );
virtual void Resize();
virtual void Command( const CommandEvent& rCEvt );
virtual void RequestHelp( const HelpEvent& rHEvt );
@@ -316,18 +316,18 @@ public:
virtual void Select();
virtual void DoubleClick();
- void InsertItem( USHORT nItemId, const Image& rImage,
+ void InsertItem( sal_uInt16 nItemId, const Image& rImage,
long nSize, HeaderBarItemBits nBits = HIB_STDSTYLE,
- USHORT nPos = HEADERBAR_APPEND );
- void InsertItem( USHORT nItemId, const XubString& rText,
+ sal_uInt16 nPos = HEADERBAR_APPEND );
+ void InsertItem( sal_uInt16 nItemId, const XubString& rText,
long nSize, HeaderBarItemBits nBits = HIB_STDSTYLE,
- USHORT nPos = HEADERBAR_APPEND );
- void InsertItem( USHORT nItemId,
+ sal_uInt16 nPos = HEADERBAR_APPEND );
+ void InsertItem( sal_uInt16 nItemId,
const Image& rImage, const XubString& rText,
long nSize, HeaderBarItemBits nBits = HIB_STDSTYLE,
- USHORT nPos = HEADERBAR_APPEND );
- void RemoveItem( USHORT nItemId );
- void MoveItem( USHORT nItemId, USHORT nNewPos );
+ sal_uInt16 nPos = HEADERBAR_APPEND );
+ void RemoveItem( sal_uInt16 nItemId );
+ void MoveItem( sal_uInt16 nItemId, sal_uInt16 nNewPos );
void Clear();
void SetOffset( long nNewOffset = 0 );
@@ -335,33 +335,33 @@ public:
inline void SetDragSize( long nNewSize = 0 ) { mnDragSize = nNewSize; }
long GetDragSize() const { return mnDragSize; }
- USHORT GetItemCount() const;
- USHORT GetItemPos( USHORT nItemId ) const;
- USHORT GetItemId( USHORT nPos ) const;
- USHORT GetItemId( const Point& rPos ) const;
- Rectangle GetItemRect( USHORT nItemId ) const;
- USHORT GetCurItemId() const { return mnCurItemId; }
+ sal_uInt16 GetItemCount() const;
+ sal_uInt16 GetItemPos( sal_uInt16 nItemId ) const;
+ sal_uInt16 GetItemId( sal_uInt16 nPos ) const;
+ sal_uInt16 GetItemId( const Point& rPos ) const;
+ Rectangle GetItemRect( sal_uInt16 nItemId ) const;
+ sal_uInt16 GetCurItemId() const { return mnCurItemId; }
long GetDragPos() const { return mnDragPos; }
- USHORT GetItemDragPos() const { return mnItemDragPos; }
- BOOL IsItemMode() const { return mbItemMode; }
- BOOL IsItemDrag() const { return mbItemDrag; }
-
- void SetItemSize( USHORT nItemId, long nNewSize );
- long GetItemSize( USHORT nItemId ) const;
- void SetItemBits( USHORT nItemId, HeaderBarItemBits nNewBits );
- HeaderBarItemBits GetItemBits( USHORT nItemId ) const;
- void SetItemData( USHORT nItemId, void* pNewData );
- void* GetItemData( USHORT nItemId ) const;
-
- void SetItemImage( USHORT nItemId, const Image& rImage );
- Image GetItemImage( USHORT nItemId ) const;
- void SetItemText( USHORT nItemId, const XubString& rText );
- XubString GetItemText( USHORT nItemId ) const;
-
- void SetHelpText( USHORT nItemId, const XubString& rText );
- XubString GetHelpText( USHORT nItemId ) const;
- void SetHelpId( USHORT nItemId, const rtl::OString& nHelpId );
- rtl::OString GetHelpId( USHORT nItemId ) const;
+ sal_uInt16 GetItemDragPos() const { return mnItemDragPos; }
+ sal_Bool IsItemMode() const { return mbItemMode; }
+ sal_Bool IsItemDrag() const { return mbItemDrag; }
+
+ void SetItemSize( sal_uInt16 nItemId, long nNewSize );
+ long GetItemSize( sal_uInt16 nItemId ) const;
+ void SetItemBits( sal_uInt16 nItemId, HeaderBarItemBits nNewBits );
+ HeaderBarItemBits GetItemBits( sal_uInt16 nItemId ) const;
+ void SetItemData( sal_uInt16 nItemId, void* pNewData );
+ void* GetItemData( sal_uInt16 nItemId ) const;
+
+ void SetItemImage( sal_uInt16 nItemId, const Image& rImage );
+ Image GetItemImage( sal_uInt16 nItemId ) const;
+ void SetItemText( sal_uInt16 nItemId, const XubString& rText );
+ XubString GetItemText( sal_uInt16 nItemId ) const;
+
+ void SetHelpText( sal_uInt16 nItemId, const XubString& rText );
+ XubString GetHelpText( sal_uInt16 nItemId ) const;
+ void SetHelpId( sal_uInt16 nItemId, const rtl::OString& nHelpId );
+ rtl::OString GetHelpId( sal_uInt16 nItemId ) const;
Size CalcWindowSizePixel() const;
@@ -383,7 +383,7 @@ public:
inline void SetCreateAccessibleHdl( const Link& rLink ) { maCreateAccessibleHdl = rLink; }
inline const Link& GetCreateAccessibleHdl() const { return maCreateAccessibleHdl; }
- inline BOOL IsDragable() const { return mbDragable; }
+ inline sal_Bool IsDragable() const { return mbDragable; }
/** Creates and returns the accessible object of the header bar. */
virtual ::com::sun::star::uno::Reference<
diff --git a/svtools/inc/svtools/htmlcfg.hxx b/svtools/inc/svtools/htmlcfg.hxx
index c27df0a9a67f..7778ffacfd7b 100644
--- a/svtools/inc/svtools/htmlcfg.hxx
+++ b/svtools/inc/svtools/htmlcfg.hxx
@@ -64,37 +64,37 @@ public:
virtual void Commit();
virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& _rPropertyNames);
- USHORT GetFontSize(USHORT nPos) const;
- void SetFontSize(USHORT nPos, USHORT nSize);
+ sal_uInt16 GetFontSize(sal_uInt16 nPos) const;
+ void SetFontSize(sal_uInt16 nPos, sal_uInt16 nSize);
- BOOL IsImportUnknown() const;
- void SetImportUnknown(BOOL bSet);
+ sal_Bool IsImportUnknown() const;
+ void SetImportUnknown(sal_Bool bSet);
- USHORT GetExportMode() const;
- void SetExportMode(USHORT nSet);
+ sal_uInt16 GetExportMode() const;
+ void SetExportMode(sal_uInt16 nSet);
- BOOL IsStarBasic() const;
- void SetStarBasic(BOOL bSet);
+ sal_Bool IsStarBasic() const;
+ void SetStarBasic(sal_Bool bSet);
- BOOL IsStarBasicWarning() const;
- void SetStarBasicWarning(BOOL bSet);
+ sal_Bool IsStarBasicWarning() const;
+ void SetStarBasicWarning(sal_Bool bSet);
- BOOL IsSaveGraphicsLocal() const;
- void SetSaveGraphicsLocal(BOOL bSet);
+ sal_Bool IsSaveGraphicsLocal() const;
+ void SetSaveGraphicsLocal(sal_Bool bSet);
- BOOL IsPrintLayoutExtension() const;
- void SetPrintLayoutExtension(BOOL bSet);
+ sal_Bool IsPrintLayoutExtension() const;
+ void SetPrintLayoutExtension(sal_Bool bSet);
- BOOL IsIgnoreFontFamily() const;
- void SetIgnoreFontFamily(BOOL bSet);
+ sal_Bool IsIgnoreFontFamily() const;
+ void SetIgnoreFontFamily(sal_Bool bSet);
sal_Bool IsDefaultTextEncoding() const;
rtl_TextEncoding GetTextEncoding() const;
void SetTextEncoding( rtl_TextEncoding );
static SvxHtmlOptions* Get();
- BOOL IsNumbersEnglishUS() const;
- void SetNumbersEnglishUS(BOOL bSet);
+ sal_Bool IsNumbersEnglishUS() const;
+ void SetNumbersEnglishUS(sal_Bool bSet);
void AddListenerLink( const Link& rLink );
void RemoveListenerLink( const Link& rLink );
diff --git a/svtools/inc/svtools/htmlout.hxx b/svtools/inc/svtools/htmlout.hxx
index 1a21f1154602..dbb8d63914a2 100644
--- a/svtools/inc/svtools/htmlout.hxx
+++ b/svtools/inc/svtools/htmlout.hxx
@@ -45,7 +45,7 @@ struct HTMLOutEvent
{
const sal_Char *pBasicName;
const sal_Char *pJavaName;
- USHORT nEvent;
+ sal_uInt16 nEvent;
};
struct SVT_DLLPUBLIC HTMLOutContext
@@ -71,7 +71,7 @@ struct HTMLOutFuncs
String *pNonConvertableChars = 0);
SVT_DLLPUBLIC static SvStream& Out_AsciiTag( SvStream&, const sal_Char* pStr,
- BOOL bOn = TRUE,
+ sal_Bool bOn = sal_True,
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252);
SVT_DLLPUBLIC static SvStream& Out_Char( SvStream&, sal_Unicode cChar,
HTMLOutContext& rContext,
@@ -79,13 +79,13 @@ struct HTMLOutFuncs
SVT_DLLPUBLIC static SvStream& Out_String( SvStream&, const String&,
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
String *pNonConvertableChars = 0 );
- SVT_DLLPUBLIC static SvStream& Out_Hex( SvStream&, ULONG nHex, BYTE nLen,
+ SVT_DLLPUBLIC static SvStream& Out_Hex( SvStream&, sal_uLong nHex, sal_uInt8 nLen,
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252 );
SVT_DLLPUBLIC static SvStream& Out_Color( SvStream&, const Color&,
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252 );
SVT_DLLPUBLIC static SvStream& Out_ImageMap( SvStream&, const String&, const ImageMap&, const String&,
const HTMLOutEvent *pEventTable,
- BOOL bOutStarBasic,
+ sal_Bool bOutStarBasic,
const sal_Char *pDelim = 0,
const sal_Char *pIndentArea = 0,
const sal_Char *pIndentMap = 0,
@@ -107,18 +107,18 @@ struct HTMLOutFuncs
// der 3. Parameter ist ein Array von HTMLOutEvents, das mit einem
// nur aus 0 bestehen Eintrag terminiert ist.
SVT_DLLPUBLIC static SvStream& Out_Events( SvStream&, const SvxMacroTableDtor&,
- const HTMLOutEvent*, BOOL bOutStarBasic,
+ const HTMLOutEvent*, sal_Bool bOutStarBasic,
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
String *pNonConvertableChars = 0 );
// <TD SDVAL="..." SDNUM="...">
SVT_DLLPUBLIC static ByteString& CreateTableDataOptionsValNum( ByteString& aStrTD,
- BOOL bValue, double fVal, ULONG nFormat,
+ sal_Bool bValue, double fVal, sal_uLong nFormat,
SvNumberFormatter& rFormatter,
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
String *pNonConvertableChars = 0 );
- SVT_DLLPUBLIC static BOOL PrivateURLToInternalImg( String& rURL );
+ SVT_DLLPUBLIC static sal_Bool PrivateURLToInternalImg( String& rURL );
};
#endif
diff --git a/svtools/inc/svtools/htmltokn.h b/svtools/inc/svtools/htmltokn.h
index 7c43c1463e25..5b577093ce8a 100644
--- a/svtools/inc/svtools/htmltokn.h
+++ b/svtools/inc/svtools/htmltokn.h
@@ -46,7 +46,7 @@ SVT_DLLPUBLIC int GetHTMLToken( const String& rName );
int GetHTMLOption( const String& rName );
// suche die 24-bit-Farbe zu einem Farbnamen (nicht gefunden = ULONG_MAX)
-SVT_DLLPUBLIC ULONG GetHTMLColor( const String& rName );
+SVT_DLLPUBLIC sal_uIntPtr GetHTMLColor( const String& rName );
// beginnen immer ab 256, groesser als ein char
const int HTML_TOKEN_START = 0x100;
diff --git a/svtools/inc/svtools/imap.hxx b/svtools/inc/svtools/imap.hxx
index 52212e365c87..e43d97eef9b9 100644
--- a/svtools/inc/svtools/imap.hxx
+++ b/svtools/inc/svtools/imap.hxx
@@ -53,13 +53,13 @@ protected:
// Binaer laden/speichern
void ImpWriteImageMap( SvStream& rOStm, const String& ) const ;
- void ImpReadImageMap( SvStream& rIStm, USHORT nCount, const String& );
+ void ImpReadImageMap( SvStream& rIStm, sal_uInt16 nCount, const String& );
// Im-/Export
void ImpWriteCERN( SvStream& rOStm, const String& rBaseURL ) const;
void ImpWriteNCSA( SvStream& rOStm, const String& rBaseURL ) const;
- ULONG ImpReadCERN( SvStream& rOStm, const String& rBaseURL );
- ULONG ImpReadNCSA( SvStream& rOStm, const String& rBaseURL );
+ sal_uLong ImpReadCERN( SvStream& rOStm, const String& rBaseURL );
+ sal_uLong ImpReadNCSA( SvStream& rOStm, const String& rBaseURL );
void ImpReadCERNLine( const ByteString& rLine, const String& rBaseURL );
Point ImpReadCERNCoords( const char** ppStr );
@@ -70,7 +70,7 @@ protected:
String ImpReadNCSAURL( const char** ppStr, const String& rBaseURL );
Point ImpReadNCSACoords( const char** ppStr );
- ULONG ImpDetectFormat( SvStream& rIStm );
+ sal_uLong ImpDetectFormat( SvStream& rIStm );
public:
@@ -89,8 +89,8 @@ public:
ImageMap& operator=( const ImageMap& rImageMap );
// Vergleichsoperator (es wird alles auf Gleichheit geprueft)
- BOOL operator==( const ImageMap& rImageMap );
- BOOL operator!=( const ImageMap& rImageMap );
+ sal_Bool operator==( const ImageMap& rImageMap );
+ sal_Bool operator!=( const ImageMap& rImageMap );
// In die Map wird ein neues IMap-Obkekt ans Ende eingefuegt
void InsertIMapObject( const IMapObject& rIMapObject );
@@ -101,7 +101,7 @@ public:
IMapObject* GetNextIMapObject() { return (IMapObject*) maList.Next(); }
IMapObject* GetLastIMapObject() { return (IMapObject*) maList.Last(); }
IMapObject* GetPrevIMapObject() { return (IMapObject*) maList.Prev(); }
- IMapObject* GetIMapObject( USHORT nPos ) const { return (IMapObject*) maList.GetObject( nPos ); }
+ IMapObject* GetIMapObject( sal_uInt16 nPos ) const { return (IMapObject*) maList.GetObject( nPos ); }
// Gibt das Objekt zurueck, das zuerst getroffen wurde oder NULL;
// Groessen- und Positionsangaben sind in 1/100mm;
@@ -112,16 +112,16 @@ public:
IMapObject* GetHitIMapObject( const Size& rOriginalSize,
const Size& rDisplaySize,
const Point& rRelHitPoint,
- ULONG nFlags = 0 );
+ sal_uLong nFlags = 0 );
// Gibt die Gesamtanzahl der IMap-Objekte zurueck
- UINT16 GetIMapObjectCount() const { return (UINT16) maList.Count(); }
+ sal_uInt16 GetIMapObjectCount() const { return (sal_uInt16) maList.Count(); }
// Loescht alle internen Objekte
void ClearImageMap();
// liefert die aktuelle Versionsnummer
- UINT16 GetVersion() const;
+ sal_uInt16 GetVersion() const;
// liefert / setzt den Namen der ImageMap
const String& GetName() const { return aName; }
@@ -137,8 +137,8 @@ public:
void Write ( SvStream& rOStm, const String& rBaseURL ) const;
void Read( SvStream& rIStm, const String& rBaseURL );
- void Write( SvStream& rOStm, ULONG nFormat, const String& rBaseURL ) const;
- ULONG Read( SvStream& rIStm, ULONG nFormat, const String& rBaseURL );
+ void Write( SvStream& rOStm, sal_uLong nFormat, const String& rBaseURL ) const;
+ sal_uLong Read( SvStream& rIStm, sal_uLong nFormat, const String& rBaseURL );
};
/******************************************************************************
@@ -152,18 +152,18 @@ public:
class IMapCompat
{
SvStream* pRWStm;
- ULONG nCompatPos;
- ULONG nTotalSize;
- USHORT nStmMode;
+ sal_uLong nCompatPos;
+ sal_uLong nTotalSize;
+ sal_uInt16 nStmMode;
IMapCompat() {}
IMapCompat( const IMapCompat& ) {}
IMapCompat& operator=( const IMapCompat& ) { return *this; }
- BOOL operator==( const IMapCompat& ) { return FALSE; }
+ sal_Bool operator==( const IMapCompat& ) { return sal_False; }
public:
- IMapCompat( SvStream& rStm, const USHORT nStreamMode );
+ IMapCompat( SvStream& rStm, const sal_uInt16 nStreamMode );
~IMapCompat();
};
diff --git a/svtools/inc/svtools/imapcirc.hxx b/svtools/inc/svtools/imapcirc.hxx
index e3ea5349d376..88f7fffa8d22 100644
--- a/svtools/inc/svtools/imapcirc.hxx
+++ b/svtools/inc/svtools/imapcirc.hxx
@@ -42,9 +42,9 @@ class Fraction;
class SVT_DLLPUBLIC IMapCircleObject : public IMapObject
{
Point aCenter;
- ULONG nRadius;
+ sal_uLong nRadius;
- void ImpConstruct( const Point& rCenter, ULONG nRad, BOOL bPixel );
+ void ImpConstruct( const Point& rCenter, sal_uLong nRad, sal_Bool bPixel );
protected:
@@ -55,21 +55,21 @@ protected:
public:
IMapCircleObject() {};
- IMapCircleObject( const Point& rCenter, ULONG nRad,
+ IMapCircleObject( const Point& rCenter, sal_uLong nRad,
const String& rURL,
const String& rAltText,
const String& rDesc,
const String& rTarget,
const String& rName,
- BOOL bActive = TRUE,
- BOOL bPixelCoords = TRUE );
+ sal_Bool bActive = sal_True,
+ sal_Bool bPixelCoords = sal_True );
virtual ~IMapCircleObject() {};
- virtual UINT16 GetType() const;
- virtual BOOL IsHit( const Point& rPoint ) const;
+ virtual sal_uInt16 GetType() const;
+ virtual sal_Bool IsHit( const Point& rPoint ) const;
- Point GetCenter( BOOL bPixelCoords = TRUE ) const;
- ULONG GetRadius( BOOL bPixelCoords = TRUE ) const;
+ Point GetCenter( sal_Bool bPixelCoords = sal_True ) const;
+ sal_uLong GetRadius( sal_Bool bPixelCoords = sal_True ) const;
// liefert das BoundRect des Kreis-Objektes in 1/100mm
virtual Rectangle GetBoundRect() const;
@@ -77,7 +77,7 @@ public:
void Scale( const Fraction& rFractX, const Fraction& rFracY );
using IMapObject::IsEqual;
- BOOL IsEqual( const IMapCircleObject& rEqObj );
+ sal_Bool IsEqual( const IMapCircleObject& rEqObj );
// Im-/Export
void WriteCERN( SvStream& rOStm, const String& rBaseURL ) const;
diff --git a/svtools/inc/svtools/imapobj.hxx b/svtools/inc/svtools/imapobj.hxx
index c557727124cc..42e6b1740b70 100644
--- a/svtools/inc/svtools/imapobj.hxx
+++ b/svtools/inc/svtools/imapobj.hxx
@@ -36,13 +36,13 @@ class Point;
class Rectangle;
class SvStream;
-#define IMAP_OBJ_NONE ((UINT16)0x0000)
-#define IMAP_OBJ_RECTANGLE ((UINT16)0x0001)
-#define IMAP_OBJ_CIRCLE ((UINT16)0x0002)
-#define IMAP_OBJ_POLYGON ((UINT16)0x0003)
-#define IMAP_OBJ_VERSION ((UINT16)0x0005)
+#define IMAP_OBJ_NONE ((sal_uInt16)0x0000)
+#define IMAP_OBJ_RECTANGLE ((sal_uInt16)0x0001)
+#define IMAP_OBJ_CIRCLE ((sal_uInt16)0x0002)
+#define IMAP_OBJ_POLYGON ((sal_uInt16)0x0003)
+#define IMAP_OBJ_VERSION ((sal_uInt16)0x0005)
-#define IMAGE_MAP_VERSION ((UINT16)0x0001)
+#define IMAGE_MAP_VERSION ((sal_uInt16)0x0001)
#define IMAPMAGIC "SDIMAP"
@@ -73,11 +73,11 @@ class SVT_DLLPUBLIC IMapObject
String aTarget;
String aName;
SvxMacroTableDtor aEventList;
- BOOL bActive;
+ sal_Bool bActive;
protected:
- UINT16 nReadVersion;
+ sal_uInt16 nReadVersion;
// Binaer-Im-/Export
virtual void WriteIMapObject( SvStream& rOStm ) const = 0;
@@ -99,12 +99,12 @@ public:
const String& rDesc,
const String& rTarget,
const String& rName,
- BOOL bActive );
+ sal_Bool bActive );
virtual ~IMapObject() {};
- virtual UINT16 GetVersion() const;
- virtual UINT16 GetType() const = 0;
- virtual BOOL IsHit( const Point& rPoint ) const = 0;
+ virtual sal_uInt16 GetVersion() const;
+ virtual sal_uInt16 GetType() const = 0;
+ virtual sal_Bool IsHit( const Point& rPoint ) const = 0;
void Write ( SvStream& rOStm, const String& rBaseURL ) const;
void Read( SvStream& rIStm, const String& rBaseURL );
@@ -126,33 +126,33 @@ public:
const String& GetName() const { return aName; }
void SetName( const String& rName ) { aName = rName; }
- BOOL IsActive() const { return bActive; }
- void SetActive( BOOL bSetActive = TRUE ) { bActive = bSetActive; }
+ sal_Bool IsActive() const { return bActive; }
+ void SetActive( sal_Bool bSetActive = sal_True ) { bActive = bSetActive; }
static Point GetPixelPoint( const Point& rLogPoint );
static Point GetLogPoint( const Point& rPixelPoint );
- BOOL IsEqual( const IMapObject& rEqObj );
+ sal_Bool IsEqual( const IMapObject& rEqObj );
// IMap-Events
inline const SvxMacroTableDtor& GetMacroTable() const { return aEventList;}
inline void SetMacroTable( const SvxMacroTableDtor& rTbl ) { aEventList = rTbl; }
- inline const SvxMacro& GetEvent( USHORT nEvent ) const;
- inline BOOL HasEvent( USHORT nEvent ) const;
- void SetEvent( USHORT nEvent, const SvxMacro& );
- inline BOOL DelEvent( USHORT nEvent );
+ inline const SvxMacro& GetEvent( sal_uInt16 nEvent ) const;
+ inline sal_Bool HasEvent( sal_uInt16 nEvent ) const;
+ void SetEvent( sal_uInt16 nEvent, const SvxMacro& );
+ inline sal_Bool DelEvent( sal_uInt16 nEvent );
};
-inline BOOL IMapObject::HasEvent( USHORT nEvent ) const
+inline sal_Bool IMapObject::HasEvent( sal_uInt16 nEvent ) const
{
return aEventList.IsKeyValid( nEvent );
}
-inline const SvxMacro& IMapObject::GetEvent( USHORT nEvent ) const
+inline const SvxMacro& IMapObject::GetEvent( sal_uInt16 nEvent ) const
{
return *(aEventList.Get( nEvent ));
}
-inline BOOL IMapObject::DelEvent( USHORT nEvent )
+inline sal_Bool IMapObject::DelEvent( sal_uInt16 nEvent )
{
SvxMacro *pMacro = aEventList.Remove( nEvent );
delete pMacro;
diff --git a/svtools/inc/svtools/imappoly.hxx b/svtools/inc/svtools/imappoly.hxx
index 00d22cbe2de0..e6d31f78597a 100644
--- a/svtools/inc/svtools/imappoly.hxx
+++ b/svtools/inc/svtools/imappoly.hxx
@@ -44,9 +44,9 @@ class SVT_DLLPUBLIC IMapPolygonObject : public IMapObject
{
Polygon aPoly;
Rectangle aEllipse;
- BOOL bEllipse;
+ sal_Bool bEllipse;
- SVT_DLLPRIVATE void ImpConstruct( const Polygon& rPoly, BOOL bPixel );
+ SVT_DLLPRIVATE void ImpConstruct( const Polygon& rPoly, sal_Bool bPixel );
protected:
@@ -54,7 +54,7 @@ protected:
virtual void WriteIMapObject( SvStream& rOStm ) const;
virtual void ReadIMapObject( SvStream& rIStm );
- BOOL ReadPreProLine( SvStream& rIStm, String& rStr );
+ sal_Bool ReadPreProLine( SvStream& rIStm, String& rStr );
public:
IMapPolygonObject() {};
@@ -64,26 +64,26 @@ public:
const String& rDesc,
const String& rTarget,
const String& rName,
- BOOL bActive = TRUE,
- BOOL bPixelCoords = TRUE );
+ sal_Bool bActive = sal_True,
+ sal_Bool bPixelCoords = sal_True );
virtual ~IMapPolygonObject() {};
- virtual UINT16 GetType() const;
- virtual BOOL IsHit( const Point& rPoint ) const;
+ virtual sal_uInt16 GetType() const;
+ virtual sal_Bool IsHit( const Point& rPoint ) const;
- Polygon GetPolygon( BOOL bPixelCoords = TRUE ) const;
+ Polygon GetPolygon( sal_Bool bPixelCoords = sal_True ) const;
// liefert das BoundRect des Polygon-Objektes in 1/100mm
virtual Rectangle GetBoundRect() const { return aPoly.GetBoundRect(); }
- BOOL HasExtraEllipse() const { return bEllipse; }
+ sal_Bool HasExtraEllipse() const { return bEllipse; }
const Rectangle& GetExtraEllipse() const { return aEllipse; }
void SetExtraEllipse( const Rectangle& rEllipse );
void Scale( const Fraction& rFractX, const Fraction& rFracY );
using IMapObject::IsEqual;
- BOOL IsEqual( const IMapPolygonObject& rEqObj );
+ sal_Bool IsEqual( const IMapPolygonObject& rEqObj );
// Im-/Export
void WriteCERN( SvStream& rOStm, const String& rBaseURL ) const;
diff --git a/svtools/inc/svtools/imaprect.hxx b/svtools/inc/svtools/imaprect.hxx
index 8eacaaaf3531..3e6d80f52bef 100644
--- a/svtools/inc/svtools/imaprect.hxx
+++ b/svtools/inc/svtools/imaprect.hxx
@@ -43,7 +43,7 @@ class SVT_DLLPUBLIC IMapRectangleObject : public IMapObject
{
Rectangle aRect;
- SVT_DLLPRIVATE void ImpConstruct( const Rectangle& rRect, BOOL bPixel );
+ SVT_DLLPRIVATE void ImpConstruct( const Rectangle& rRect, sal_Bool bPixel );
protected:
@@ -60,14 +60,14 @@ public:
const String& rDesc,
const String& rTarget,
const String& rName,
- BOOL bActive = TRUE,
- BOOL bPixelCoords = TRUE );
+ sal_Bool bActive = sal_True,
+ sal_Bool bPixelCoords = sal_True );
virtual ~IMapRectangleObject() {};
- virtual UINT16 GetType() const;
- virtual BOOL IsHit( const Point& rPoint ) const;
+ virtual sal_uInt16 GetType() const;
+ virtual sal_Bool IsHit( const Point& rPoint ) const;
- Rectangle GetRectangle( BOOL bPixelCoords = TRUE ) const;
+ Rectangle GetRectangle( sal_Bool bPixelCoords = sal_True ) const;
// liefert das BoundRect des Rechteck-Objektes in 1/100mm
virtual Rectangle GetBoundRect() const { return aRect; }
@@ -75,7 +75,7 @@ public:
void Scale( const Fraction& rFractX, const Fraction& rFracY );
using IMapObject::IsEqual;
- BOOL IsEqual( const IMapRectangleObject& rEqObj );
+ sal_Bool IsEqual( const IMapRectangleObject& rEqObj );
// Im-/Export
void WriteCERN( SvStream& rOStm, const String& rBaseURL ) const;
diff --git a/svtools/inc/svtools/inetimg.hxx b/svtools/inc/svtools/inetimg.hxx
index 924bbad831d6..61204e9d0935 100644
--- a/svtools/inc/svtools/inetimg.hxx
+++ b/svtools/inc/svtools/inetimg.hxx
@@ -77,8 +77,8 @@ public:
const Size& GetSizePixel() const { return aSizePixel; }
// Im-/Export
- sal_Bool Write( SvStream& rOStm, ULONG nFormat ) const;
- sal_Bool Read( SvStream& rIStm, ULONG nFormat );
+ sal_Bool Write( SvStream& rOStm, sal_uLong nFormat ) const;
+ sal_Bool Read( SvStream& rIStm, sal_uLong nFormat );
};
#endif // #ifndef _INETIMG_HXX
diff --git a/svtools/inc/svtools/inettbc.hxx b/svtools/inc/svtools/inettbc.hxx
index 9394f1ba5ccd..b65e8b0edea7 100644
--- a/svtools/inc/svtools/inettbc.hxx
+++ b/svtools/inc/svtools/inettbc.hxx
@@ -51,17 +51,17 @@ friend class SvtURLBox_Impl;
SvtMatchContext_Impl* pCtx;
SvtURLBox_Impl* pImp;
INetProtocol eSmartProtocol;
- BOOL bAutoCompleteMode : 1;
- BOOL bOnlyDirectories : 1;
- BOOL bModified : 1;
- BOOL bTryAutoComplete : 1;
- BOOL bCtrlClick : 1;
- BOOL bHistoryDisabled : 1;
- BOOL bNoSelection : 1;
- BOOL bIsAutoCompleteEnabled : 1;
+ sal_Bool bAutoCompleteMode : 1;
+ sal_Bool bOnlyDirectories : 1;
+ sal_Bool bModified : 1;
+ sal_Bool bTryAutoComplete : 1;
+ sal_Bool bCtrlClick : 1;
+ sal_Bool bHistoryDisabled : 1;
+ sal_Bool bNoSelection : 1;
+ sal_Bool bIsAutoCompleteEnabled : 1;
- SVT_DLLPRIVATE BOOL ProcessKey( const KeyCode& rCode );
- SVT_DLLPRIVATE void TryAutoComplete( BOOL bForce );
+ SVT_DLLPRIVATE sal_Bool ProcessKey( const KeyCode& rCode );
+ SVT_DLLPRIVATE void TryAutoComplete( sal_Bool bForce );
SVT_DLLPRIVATE void UpdatePicklistForSmartProtocol_Impl();
DECL_DLLPRIVATE_LINK( AutoCompleteHdl_Impl, void* );
using Window::ImplInit;
@@ -83,11 +83,11 @@ public:
const String& GetBaseURL() const { return aBaseURL; }
void SetOpenHdl( const Link& rLink ) { aOpenHdl = rLink; }
const Link& GetOpenHdl() const { return aOpenHdl; }
- void SetOnlyDirectories( BOOL bDir = TRUE );
- void SetNoURLSelection( BOOL bSet = TRUE );
+ void SetOnlyDirectories( sal_Bool bDir = sal_True );
+ void SetNoURLSelection( sal_Bool bSet = sal_True );
INetProtocol GetSmartProtocol() const { return eSmartProtocol; }
void SetSmartProtocol( INetProtocol eProt );
- BOOL IsCtrlOpen()
+ sal_Bool IsCtrlOpen()
{ return bCtrlClick; }
String GetURL();
void DisableHistory();
@@ -100,7 +100,7 @@ public:
void SetUrlFilter( const IUrlFilter* _pFilter );
const IUrlFilter* GetUrlFilter( ) const;
- inline void EnableAutocompletion( BOOL _bEnable = TRUE )
+ inline void EnableAutocompletion( sal_Bool _bEnable = sal_True )
{ bIsAutoCompleteEnabled = _bEnable; }
void SetPlaceHolder( const String& sPlaceHolder ) { aPlaceHolder = sPlaceHolder; }
String GetPlaceHolder() { return aPlaceHolder; }
diff --git a/svtools/inc/svtools/ivctrl.hxx b/svtools/inc/svtools/ivctrl.hxx
index 5bea4675b62e..9e42f12dffb1 100644
--- a/svtools/inc/svtools/ivctrl.hxx
+++ b/svtools/inc/svtools/ivctrl.hxx
@@ -85,7 +85,7 @@ class SvxIconChoiceCtrlEntry
Rectangle aRect; // Bounding-Rect des Entries
Rectangle aGridRect; // nur gesetzt im Grid-Modus
- ULONG nPos;
+ sal_uLong nPos;
// die Eintragsposition in der Eintragsliste entspricht der beim Insert vorgegebenen
// [Sortier-]Reihenfolge (->Reihenfolge der Anker in der Ankerliste!). Im AutoArrange-Modus
@@ -95,12 +95,12 @@ class SvxIconChoiceCtrlEntry
SvxIconChoiceCtrlEntry* pflink; // forward (rechter Nachbar)
SvxIconChoiceCtrlTextMode eTextMode;
- USHORT nX,nY; // fuer Tastatursteuerung
- USHORT nFlags;
+ sal_uInt16 nX,nY; // fuer Tastatursteuerung
+ sal_uInt16 nFlags;
- void ClearFlags( USHORT nMask ) { nFlags &= (~nMask); }
- void SetFlags( USHORT nMask ) { nFlags |= nMask; }
- void AssignFlags( USHORT _nFlags ) { nFlags = _nFlags; }
+ void ClearFlags( sal_uInt16 nMask ) { nFlags &= (~nMask); }
+ void SetFlags( sal_uInt16 nMask ) { nFlags |= nMask; }
+ void AssignFlags( sal_uInt16 _nFlags ) { nFlags = _nFlags; }
// setzt den linken Nachbarn (A <-> B ==> A <-> this <-> B)
void SetBacklink( SvxIconChoiceCtrlEntry* pA )
@@ -120,9 +120,9 @@ class SvxIconChoiceCtrlEntry
}
public:
- SvxIconChoiceCtrlEntry( USHORT nFlags = 0 );
- SvxIconChoiceCtrlEntry( const String& rText, const Image& rImage, USHORT nFlags = 0 );
- SvxIconChoiceCtrlEntry( const String& rText, const Image& rImage, const Image& rImageHC, USHORT nFlags = 0 );
+ SvxIconChoiceCtrlEntry( sal_uInt16 nFlags = 0 );
+ SvxIconChoiceCtrlEntry( const String& rText, const Image& rImage, sal_uInt16 nFlags = 0 );
+ SvxIconChoiceCtrlEntry( const String& rText, const Image& rImage, const Image& rImageHC, sal_uInt16 nFlags = 0 );
~SvxIconChoiceCtrlEntry () {}
void SetImage ( const Image& rImage ) { aImage = rImage; }
@@ -139,21 +139,21 @@ public:
const Rectangle & GetBoundRect() const { return aRect; }
- void SetFocus ( BOOL bSet )
+ void SetFocus ( sal_Bool bSet )
{ nFlags = ( bSet ? nFlags | ICNVIEW_FLAG_FOCUSED : nFlags & ~ICNVIEW_FLAG_FOCUSED ); }
SvxIconChoiceCtrlTextMode GetTextMode() const { return eTextMode; }
- USHORT GetFlags() const { return nFlags; }
- BOOL IsSelected() const { return (BOOL)((nFlags & ICNVIEW_FLAG_SELECTED) !=0); }
- BOOL IsFocused() const { return (BOOL)((nFlags & ICNVIEW_FLAG_FOCUSED) !=0); }
- BOOL IsInUse() const { return (BOOL)((nFlags & ICNVIEW_FLAG_IN_USE) !=0); }
- BOOL IsCursored() const { return (BOOL)((nFlags & ICNVIEW_FLAG_CURSORED) !=0); }
- BOOL IsDropTarget() const { return (BOOL)((nFlags & ICNVIEW_FLAG_DROP_TARGET) !=0); }
- BOOL IsBlockingEmphasis() const { return (BOOL)((nFlags & ICNVIEW_FLAG_BLOCK_EMPHASIS) !=0); }
- BOOL WasMoved() const { return (BOOL)((nFlags & ICNVIEW_FLAG_POS_MOVED) !=0); }
- void SetMoved( BOOL bMoved );
- BOOL IsPosLocked() const { return (BOOL)((nFlags & ICNVIEW_FLAG_POS_LOCKED) !=0); }
- void LockPos( BOOL bLock );
+ sal_uInt16 GetFlags() const { return nFlags; }
+ sal_Bool IsSelected() const { return (sal_Bool)((nFlags & ICNVIEW_FLAG_SELECTED) !=0); }
+ sal_Bool IsFocused() const { return (sal_Bool)((nFlags & ICNVIEW_FLAG_FOCUSED) !=0); }
+ sal_Bool IsInUse() const { return (sal_Bool)((nFlags & ICNVIEW_FLAG_IN_USE) !=0); }
+ sal_Bool IsCursored() const { return (sal_Bool)((nFlags & ICNVIEW_FLAG_CURSORED) !=0); }
+ sal_Bool IsDropTarget() const { return (sal_Bool)((nFlags & ICNVIEW_FLAG_DROP_TARGET) !=0); }
+ sal_Bool IsBlockingEmphasis() const { return (sal_Bool)((nFlags & ICNVIEW_FLAG_BLOCK_EMPHASIS) !=0); }
+ sal_Bool WasMoved() const { return (sal_Bool)((nFlags & ICNVIEW_FLAG_POS_MOVED) !=0); }
+ void SetMoved( sal_Bool bMoved );
+ sal_Bool IsPosLocked() const { return (sal_Bool)((nFlags & ICNVIEW_FLAG_POS_LOCKED) !=0); }
+ void LockPos( sal_Bool bLock );
// Nur bei AutoArrange gesetzt. Den Kopf der Liste gibts per SvxIconChoiceCtrl::GetPredecessorHead
SvxIconChoiceCtrlEntry* GetSuccessor() const { return pflink; }
SvxIconChoiceCtrlEntry* GetPredecessor() const { return pblink; }
@@ -174,10 +174,10 @@ class SvxIconChoiceCtrlColumnInfo
Image aColImage;
long nWidth;
SvxIconChoiceCtrlColumnAlign eAlignment;
- USHORT nSubItem;
+ sal_uInt16 nSubItem;
public:
- SvxIconChoiceCtrlColumnInfo( USHORT nSub, long nWd,
+ SvxIconChoiceCtrlColumnInfo( sal_uInt16 nSub, long nWd,
SvxIconChoiceCtrlColumnAlign eAlign ) :
nWidth( nWd ), eAlignment( eAlign ), nSubItem( nSub ) {}
SvxIconChoiceCtrlColumnInfo( const SvxIconChoiceCtrlColumnInfo& );
@@ -186,13 +186,13 @@ public:
void SetImage( const Image& rImg ) { aColImage = rImg; }
void SetWidth( long nWd ) { nWidth = nWd; }
void SetAlignment( SvxIconChoiceCtrlColumnAlign eAlign ) { eAlignment = eAlign; }
- void SetSubItem( USHORT nSub) { nSubItem = nSub; }
+ void SetSubItem( sal_uInt16 nSub) { nSubItem = nSub; }
const String& GetText() const { return aColText; }
const Image& GetImage() const { return aColImage; }
long GetWidth() const { return nWidth; }
SvxIconChoiceCtrlColumnAlign GetAlignment() const { return eAlignment; }
- USHORT GetSubItem() const { return nSubItem; }
+ sal_uInt16 GetSubItem() const { return nSubItem; }
};
//###################################################################################################################################
@@ -241,15 +241,15 @@ class SVT_DLLPUBLIC SvtIconChoiceCtrl : public Control
Link _aVisRectChangedHdl;
KeyEvent* _pCurKeyEvent;
SvxIconChoiceCtrl_Impl* _pImp;
- BOOL _bAutoFontColor;
+ sal_Bool _bAutoFontColor;
protected:
virtual void KeyInput( const KeyEvent& rKEvt );
- virtual BOOL EditedEntry( SvxIconChoiceCtrlEntry*, const XubString& rNewText, BOOL bCancelled );
+ virtual sal_Bool EditedEntry( SvxIconChoiceCtrlEntry*, const XubString& rNewText, sal_Bool bCancelled );
virtual void DocumentRectChanged();
virtual void VisibleRectChanged();
- virtual BOOL EditingEntry( SvxIconChoiceCtrlEntry* pEntry );
+ virtual sal_Bool EditingEntry( SvxIconChoiceCtrlEntry* pEntry );
virtual void Command( const CommandEvent& rCEvt );
virtual void Paint( const Rectangle& rRect );
virtual void MouseButtonDown( const MouseEvent& rMEvt );
@@ -269,11 +269,11 @@ protected:
virtual String GetEntryText(
SvxIconChoiceCtrlEntry* pEntry,
- BOOL bInplaceEdit );
+ sal_Bool bInplaceEdit );
virtual void FillLayoutData() const;
- void CallImplEventListeners(ULONG nEvent, void* pData);
+ void CallImplEventListeners(sal_uLong nEvent, void* pData);
public:
@@ -284,9 +284,9 @@ public:
void SetStyle( WinBits nWinStyle );
WinBits GetStyle() const;
- BOOL SetChoiceWithCursor ( BOOL bDo = TRUE );
+ sal_Bool SetChoiceWithCursor ( sal_Bool bDo = sal_True );
- void SetUpdateMode( BOOL bUpdateMode );
+ void SetUpdateMode( sal_Bool bUpdateMode );
void SetFont( const Font& rFont );
void SetPointFont( const Font& rFont );
@@ -299,17 +299,17 @@ public:
void ArrangeIcons();
- SvxIconChoiceCtrlEntry* InsertEntry( ULONG nPos = LIST_APPEND,
+ SvxIconChoiceCtrlEntry* InsertEntry( sal_uLong nPos = LIST_APPEND,
const Point* pPos = 0,
- USHORT nFlags = 0 );
+ sal_uInt16 nFlags = 0 );
SvxIconChoiceCtrlEntry* InsertEntry( const String& rText, const Image& rImage,
- ULONG nPos = LIST_APPEND,
+ sal_uLong nPos = LIST_APPEND,
const Point* pPos = 0,
- USHORT nFlags = 0 );
+ sal_uInt16 nFlags = 0 );
SvxIconChoiceCtrlEntry* InsertEntry( const String& rText, const Image& rImage, const Image& rImageHC,
- ULONG nPos = LIST_APPEND,
+ sal_uLong nPos = LIST_APPEND,
const Point* pPos = 0,
- USHORT nFlags = 0 );
+ sal_uInt16 nFlags = 0 );
/** creates automatic mnemonics for all icon texts in the control
*/
@@ -326,14 +326,14 @@ public:
void RemoveEntry( SvxIconChoiceCtrlEntry* pEntry );
- BOOL DoKeyInput( const KeyEvent& rKEvt );
+ sal_Bool DoKeyInput( const KeyEvent& rKEvt );
- BOOL IsEntryEditing() const;
+ sal_Bool IsEntryEditing() const;
void Clear();
- ULONG GetEntryCount() const;
- SvxIconChoiceCtrlEntry* GetEntry( ULONG nPos ) const;
- ULONG GetEntryListPos( SvxIconChoiceCtrlEntry* pEntry ) const;
+ sal_uLong GetEntryCount() const;
+ SvxIconChoiceCtrlEntry* GetEntry( sal_uLong nPos ) const;
+ sal_uLong GetEntryListPos( SvxIconChoiceCtrlEntry* pEntry ) const;
using Window::SetCursor;
void SetCursor( SvxIconChoiceCtrlEntry* pEntry );
SvxIconChoiceCtrlEntry* GetCursor() const;
@@ -341,16 +341,16 @@ public:
// Neu-Berechnung gecachter View-Daten und Invalidierung im Fenster
void InvalidateEntry( SvxIconChoiceCtrlEntry* pEntry );
- // bHit==FALSE: Eintrag gilt als getroffen, wenn Position im BoundRect liegt
- // ==TRUE : Bitmap oder Text muss getroffen sein
- SvxIconChoiceCtrlEntry* GetEntry( const Point& rPosPixel, BOOL bHit = FALSE ) const;
+ // bHit==sal_False: Eintrag gilt als getroffen, wenn Position im BoundRect liegt
+ // ==sal_True : Bitmap oder Text muss getroffen sein
+ SvxIconChoiceCtrlEntry* GetEntry( const Point& rPosPixel, sal_Bool bHit = sal_False ) const;
// Gibt den naechsten ueber pCurEntry liegenden Eintrag (ZOrder)
- SvxIconChoiceCtrlEntry* GetNextEntry( const Point& rPosPixel, SvxIconChoiceCtrlEntry* pCurEntry, BOOL ) const;
+ SvxIconChoiceCtrlEntry* GetNextEntry( const Point& rPosPixel, SvxIconChoiceCtrlEntry* pCurEntry, sal_Bool ) const;
// Gibt den naechsten unter pCurEntry liegenden Eintrag (ZOrder)
- SvxIconChoiceCtrlEntry* GetPrevEntry( const Point& rPosPixel, SvxIconChoiceCtrlEntry* pCurEntry, BOOL ) const;
+ SvxIconChoiceCtrlEntry* GetPrevEntry( const Point& rPosPixel, SvxIconChoiceCtrlEntry* pCurEntry, sal_Bool ) const;
- // in dem ULONG wird die Position in der Liste des gefunden Eintrags zurueckgegeben
- SvxIconChoiceCtrlEntry* GetSelectedEntry( ULONG& rPos ) const;
+ // in dem sal_uLong wird die Position in der Liste des gefunden Eintrags zurueckgegeben
+ SvxIconChoiceCtrlEntry* GetSelectedEntry( sal_uLong& rPos ) const;
void SetEntryTextMode( SvxIconChoiceCtrlTextMode eMode, SvxIconChoiceCtrlEntry* pEntry = 0 );
SvxIconChoiceCtrlTextMode GetEntryTextMode( const SvxIconChoiceCtrlEntry* pEntry = 0 ) const;
@@ -360,19 +360,19 @@ public:
void Flush();
- virtual BOOL HasBackground() const;
- virtual BOOL HasFont() const;
- virtual BOOL HasFontTextColor() const;
- virtual BOOL HasFontFillColor() const;
+ virtual sal_Bool HasBackground() const;
+ virtual sal_Bool HasFont() const;
+ virtual sal_Bool HasFontTextColor() const;
+ virtual sal_Bool HasFontFillColor() const;
- void SetFontColorToBackground ( BOOL bDo = TRUE ) { _bAutoFontColor = bDo; }
- BOOL AutoFontColor () { return _bAutoFontColor; }
+ void SetFontColorToBackground ( sal_Bool bDo = sal_True ) { _bAutoFontColor = bDo; }
+ sal_Bool AutoFontColor () { return _bAutoFontColor; }
Point GetLogicPos( const Point& rPosPixel ) const;
Point GetPixelPos( const Point& rPosLogic ) const;
void SetSelectionMode( SelectionMode eMode );
- BOOL HandleShortCutKey( const KeyEvent& rKeyEvent );
+ sal_Bool HandleShortCutKey( const KeyEvent& rKeyEvent );
Rectangle GetBoundingBox( SvxIconChoiceCtrlEntry* pEntry ) const;
Rectangle GetEntryCharacterBounds( const sal_Int32 _nEntryPos, const sal_Int32 _nCharacterIndex ) const;
diff --git a/svtools/inc/svtools/javainteractionhandler.hxx b/svtools/inc/svtools/javainteractionhandler.hxx
index 87ed9da0fc3d..56dbe0e03423 100644
--- a/svtools/inc/svtools/javainteractionhandler.hxx
+++ b/svtools/inc/svtools/javainteractionhandler.hxx
@@ -75,7 +75,7 @@ private:
bool m_bJavaNotFound_Handled;
bool m_bVMCreationFailure_Handled;
bool m_bRestartRequired_Handled;
- USHORT m_nResult_JavaDisabled;
+ sal_uInt16 m_nResult_JavaDisabled;
};
}
diff --git a/svtools/inc/svtools/localresaccess.hxx b/svtools/inc/svtools/localresaccess.hxx
index c72f68f64f03..b00a306d0535 100644
--- a/svtools/inc/svtools/localresaccess.hxx
+++ b/svtools/inc/svtools/localresaccess.hxx
@@ -68,7 +68,7 @@ namespace svt
FreeResource();
}
- inline BOOL IsAvailableRes( const ResId& _rId ) const
+ inline sal_Bool IsAvailableRes( const ResId& _rId ) const
{
return Resource::IsAvailableRes( _rId );
}
diff --git a/svtools/inc/svtools/parhtml.hxx b/svtools/inc/svtools/parhtml.hxx
index a302b40d9d4b..8de20132cbc4 100644
--- a/svtools/inc/svtools/parhtml.hxx
+++ b/svtools/inc/svtools/parhtml.hxx
@@ -120,7 +120,7 @@ public:
// ... als Enum pOptEnums ist ein HTMLOptionEnum-Array
sal_uInt16 GetEnum( const HTMLOptionEnum *pOptEnums,
sal_uInt16 nDflt=0 ) const;
- BOOL GetEnum( sal_uInt16 &rEnum, const HTMLOptionEnum *pOptEnums ) const;
+ sal_Bool GetEnum( sal_uInt16 &rEnum, const HTMLOptionEnum *pOptEnums ) const;
// ... und als ein par spezielle Enums
HTMLInputType GetInputType() const; // <INPUT TYPE=...>
@@ -134,20 +134,20 @@ SV_DECL_PTRARR(HTMLOptions,HTMLOptionPtr,16,16)
class SVT_DLLPUBLIC HTMLParser : public SvParser
{
- BOOL bNewDoc : 1; // neues Doc lesen ?
- BOOL bIsInHeader : 1; // scanne Header-Bereich
- BOOL bIsInBody : 1; // scanne Body-Bereich
- BOOL bReadListing : 1; // Lese Listings
- BOOL bReadXMP : 1; // Lese XMP
- BOOL bReadPRE : 1; // Lese preformatted Text
- BOOL bReadTextArea : 1; // Lese TEXTAREA
- BOOL bReadScript : 1; // Lesen von <SCRIPT>
- BOOL bReadStyle : 1; // Lesen von <STYLE>
- BOOL bEndTokenFound : 1; // </SCRIPT> oder </STYLE> gefunden
-
- BOOL bPre_IgnoreNewPara : 1; // Flags fuers lesen von PRE-Absaetzen
- BOOL bReadNextChar : 1; // TRUE: NextChar nochmals lesen (JavaScript!)
- BOOL bReadComment : 1; // TRUE: NextChar nochmals lesen (JavaScript!)
+ sal_Bool bNewDoc : 1; // neues Doc lesen ?
+ sal_Bool bIsInHeader : 1; // scanne Header-Bereich
+ sal_Bool bIsInBody : 1; // scanne Body-Bereich
+ sal_Bool bReadListing : 1; // Lese Listings
+ sal_Bool bReadXMP : 1; // Lese XMP
+ sal_Bool bReadPRE : 1; // Lese preformatted Text
+ sal_Bool bReadTextArea : 1; // Lese TEXTAREA
+ sal_Bool bReadScript : 1; // Lesen von <SCRIPT>
+ sal_Bool bReadStyle : 1; // Lesen von <STYLE>
+ sal_Bool bEndTokenFound : 1; // </SCRIPT> oder </STYLE> gefunden
+
+ sal_Bool bPre_IgnoreNewPara : 1; // Flags fuers lesen von PRE-Absaetzen
+ sal_Bool bReadNextChar : 1; // sal_True: NextChar nochmals lesen (JavaScript!)
+ sal_Bool bReadComment : 1; // sal_True: NextChar nochmals lesen (JavaScript!)
sal_uInt32 nPre_LinePos; // Pos in der Line im PRE-Tag
@@ -166,43 +166,43 @@ protected:
virtual ~HTMLParser();
- void FinishHeader( BOOL bBody ) { bIsInHeader = FALSE; bIsInBody = bBody; }
+ void FinishHeader( sal_Bool bBody ) { bIsInHeader = sal_False; bIsInBody = bBody; }
public:
- HTMLParser( SvStream& rIn, int bReadNewDoc = TRUE );
+ HTMLParser( SvStream& rIn, int bReadNewDoc = sal_True );
virtual SvParserState CallParser(); // Aufruf des Parsers
- BOOL IsNewDoc() const { return bNewDoc; }
- BOOL IsInHeader() const { return bIsInHeader; }
- BOOL IsInBody() const { return bIsInBody; }
- BOOL IsValidSyntax() const { return TRUE; }
- BOOL IsReadListing() const { return bReadListing; }
- BOOL IsReadXMP() const { return bReadXMP; }
- BOOL IsReadPRE() const { return bReadPRE; }
- BOOL IsReadScript() const { return bReadScript; }
- BOOL IsReadStyle() const { return bReadStyle; }
+ sal_Bool IsNewDoc() const { return bNewDoc; }
+ sal_Bool IsInHeader() const { return bIsInHeader; }
+ sal_Bool IsInBody() const { return bIsInBody; }
+ sal_Bool IsValidSyntax() const { return sal_True; }
+ sal_Bool IsReadListing() const { return bReadListing; }
+ sal_Bool IsReadXMP() const { return bReadXMP; }
+ sal_Bool IsReadPRE() const { return bReadPRE; }
+ sal_Bool IsReadScript() const { return bReadScript; }
+ sal_Bool IsReadStyle() const { return bReadStyle; }
- void SetReadNextChar() { bReadNextChar = TRUE; }
+ void SetReadNextChar() { bReadNextChar = sal_True; }
// PRE-/LISTING oder XMP-Modus starten/beenden oder Tags entsprechend
// filtern
- inline void StartPRE( BOOL bRestart=FALSE );
- void FinishPRE() { bReadPRE = FALSE; }
+ inline void StartPRE( sal_Bool bRestart=sal_False );
+ void FinishPRE() { bReadPRE = sal_False; }
int FilterPRE( int nToken );
- inline void StartListing( BOOL bRestart=FALSE );
- void FinishListing() { bReadListing = FALSE; }
+ inline void StartListing( sal_Bool bRestart=sal_False );
+ void FinishListing() { bReadListing = sal_False; }
int FilterListing( int nToken );
- inline void StartXMP( BOOL bRestart=FALSE );
- void FinishXMP() { bReadXMP = FALSE; }
+ inline void StartXMP( sal_Bool bRestart=sal_False );
+ void FinishXMP() { bReadXMP = sal_False; }
int FilterXMP( int nToken );
- void FinishTextArea() { bReadTextArea = FALSE; }
+ void FinishTextArea() { bReadTextArea = sal_False; }
// PRE-/LSITING- und XMP-Modus beenden
- void FinishPREListingXMP() { bReadPRE = bReadListing = bReadXMP = FALSE; }
+ void FinishPREListingXMP() { bReadPRE = bReadListing = bReadXMP = sal_False; }
// Das aktuelle Token dem aktuellen Modus (PRE, XMP, ...) entsprechend
// Filtern und die Flags setzen. Wird von Continue aufgerufen, bevor
@@ -212,7 +212,7 @@ public:
// Scannen eines Scripts beenden (sollte nur unmittelbar nach dem
// Lesen eines <SCRIPT> aufgerufen werden
- void EndScanScript() { bReadScript = FALSE; }
+ void EndScanScript() { bReadScript = sal_False; }
void ReadRawData( const sal_Char *pEndToken ) { aEndToken.AssignAscii(pEndToken); }
@@ -253,43 +253,43 @@ public:
// Ist der uebergebene 0-terminierte String (vermutlich) der Anfang
// eines HTML-Files? Er sollte mind. 80 Zeichen lang sein.
- // Mit Ausnahme des Falls, dass SwitchToUCS2==FALSE und
+ // Mit Ausnahme des Falls, dass SwitchToUCS2==sal_False und
// SVPAR_CS_DONTKNOW uebergeben wird muss der String mit zwei(!)
// 0-Bytes an einer geraden(!) Position terminiert sein.
static FASTBOOL IsHTMLFormat( const sal_Char* pHeader,
- BOOL bSwitchToUCS2 = FALSE,
+ sal_Bool bSwitchToUCS2 = sal_False,
rtl_TextEncoding eEnc=RTL_TEXTENCODING_DONTKNOW );
- BOOL ParseScriptOptions( String& rLangString, const String&, HTMLScriptLanguage& rLang,
+ sal_Bool ParseScriptOptions( String& rLangString, const String&, HTMLScriptLanguage& rLang,
String& rSrc, String& rLibrary, String& rModule );
// Einen Kommentar um den Inhalt von <SCRIPT> oder <STYLE> entfernen
// Bei 'bFull' wird ggf. die gesammte Zeile hinter einem "<!--"
// entfernt (fuer JavaSript)
- static void RemoveSGMLComment( String &rString, BOOL bFull );
+ static void RemoveSGMLComment( String &rString, sal_Bool bFull );
- static BOOL InternalImgToPrivateURL( String& rURL );
+ static sal_Bool InternalImgToPrivateURL( String& rURL );
static rtl_TextEncoding GetEncodingByHttpHeader( SvKeyValueIterator *pHTTPHeader );
- BOOL SetEncodingByHTTPHeader( SvKeyValueIterator *pHTTPHeader );
+ sal_Bool SetEncodingByHTTPHeader( SvKeyValueIterator *pHTTPHeader );
};
-inline void HTMLParser::StartPRE( BOOL bRestart )
+inline void HTMLParser::StartPRE( sal_Bool bRestart )
{
- bReadPRE = TRUE;
+ bReadPRE = sal_True;
bPre_IgnoreNewPara = !bRestart;
nPre_LinePos = 0UL;
}
-inline void HTMLParser::StartListing( BOOL bRestart )
+inline void HTMLParser::StartListing( sal_Bool bRestart )
{
- bReadListing = TRUE;
+ bReadListing = sal_True;
bPre_IgnoreNewPara = !bRestart;
nPre_LinePos = 0UL;
}
-inline void HTMLParser::StartXMP( BOOL bRestart )
+inline void HTMLParser::StartXMP( sal_Bool bRestart )
{
- bReadXMP = TRUE;
+ bReadXMP = sal_True;
bPre_IgnoreNewPara = !bRestart;
nPre_LinePos = 0UL;
}
diff --git a/svtools/inc/svtools/parrtf.hxx b/svtools/inc/svtools/parrtf.hxx
index b96e3937231d..212fe9cafaed 100644
--- a/svtools/inc/svtools/parrtf.hxx
+++ b/svtools/inc/svtools/parrtf.hxx
@@ -35,9 +35,9 @@
struct RtfParserState_Impl
{
rtl_TextEncoding eCodeSet;
- BYTE nUCharOverread;
+ sal_uInt8 nUCharOverread;
- RtfParserState_Impl( BYTE nUOverread, rtl_TextEncoding eCdSt )
+ RtfParserState_Impl( sal_uInt8 nUOverread, rtl_TextEncoding eCdSt )
: eCodeSet( eCdSt ), nUCharOverread( nUOverread )
{}
};
@@ -50,7 +50,7 @@ class SVT_DLLPUBLIC SvRTFParser : public SvParser
int nOpenBrakets;
rtl_TextEncoding eCodeSet, eUNICodeSet;
- BYTE nUCharOverread;
+ sal_uInt8 nUCharOverread;
private:
static short _inSkipGroup;
@@ -76,7 +76,7 @@ protected:
void SetUNICodeSet( rtl_TextEncoding eSet ) { eUNICodeSet = eSet; }
public:
- SvRTFParser( SvStream& rIn, BYTE nStackSize = 3 );
+ SvRTFParser( SvStream& rIn, sal_uInt8 nStackSize = 3 );
virtual SvParserState CallParser(); // Aufruf des Parsers
diff --git a/svtools/inc/svtools/prgsbar.hxx b/svtools/inc/svtools/prgsbar.hxx
index c02d400c6931..25411b696c84 100644
--- a/svtools/inc/svtools/prgsbar.hxx
+++ b/svtools/inc/svtools/prgsbar.hxx
@@ -72,15 +72,15 @@ private:
Point maPos;
long mnPrgsWidth;
long mnPrgsHeight;
- USHORT mnPercent;
- USHORT mnPercentCount;
- BOOL mbCalcNew;
+ sal_uInt16 mnPercent;
+ sal_uInt16 mnPercentCount;
+ sal_Bool mbCalcNew;
#ifdef _SV_PRGSBAR_CXX
using Window::ImplInit;
SVT_DLLPRIVATE void ImplInit();
- SVT_DLLPRIVATE void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
- SVT_DLLPRIVATE void ImplDrawProgress( USHORT nOldPerc, USHORT nNewPerc );
+ SVT_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
+ SVT_DLLPRIVATE void ImplDrawProgress( sal_uInt16 nOldPerc, sal_uInt16 nNewPerc );
#endif
public:
@@ -93,8 +93,8 @@ public:
virtual void StateChanged( StateChangedType nStateChange );
virtual void DataChanged( const DataChangedEvent& rDCEvt );
- void SetValue( USHORT nNewPercent );
- USHORT GetValue() const { return mnPercent; }
+ void SetValue( sal_uInt16 nNewPercent );
+ sal_uInt16 GetValue() const { return mnPercent; }
};
#endif // _PRGSBAR_HXX
diff --git a/svtools/inc/svtools/prnsetup.hxx b/svtools/inc/svtools/prnsetup.hxx
index 8e1ced9ed1a0..07f131fda07b 100644
--- a/svtools/inc/svtools/prnsetup.hxx
+++ b/svtools/inc/svtools/prnsetup.hxx
@@ -112,7 +112,7 @@ public:
void ImplFillPrnDlgListBox( const Printer* pPrinter,
ListBox* pBox, PushButton* pPropBtn );
-void ImplFreePrnDlgListBox( ListBox* pBox, BOOL bClear = TRUE );
+void ImplFreePrnDlgListBox( ListBox* pBox, sal_Bool bClear = sal_True );
Printer* ImplPrnDlgListBoxSelect( ListBox* pBox, PushButton* pPropBtn,
Printer* pPrinter, Printer* pTempPrinter );
Printer* ImplPrnDlgUpdatePrinter( Printer* pPrinter, Printer* pTempPrinter );
diff --git a/svtools/inc/svtools/rtfout.hxx b/svtools/inc/svtools/rtfout.hxx
index b9bfbc901848..72e488353b72 100644
--- a/svtools/inc/svtools/rtfout.hxx
+++ b/svtools/inc/svtools/rtfout.hxx
@@ -50,15 +50,15 @@ public:
static SvStream& Out_Char( SvStream&, sal_Unicode cChar,
int *pUCMode,
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
- BOOL bWriteHelpFile = FALSE );
+ sal_Bool bWriteHelpFile = sal_False );
static SvStream& Out_String( SvStream&, const String&,
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
- BOOL bWriteHelpFile = FALSE );
+ sal_Bool bWriteHelpFile = sal_False );
static SvStream& Out_Fontname( SvStream&, const String&,
rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
- BOOL bWriteHelpFile = FALSE );
+ sal_Bool bWriteHelpFile = sal_False );
- static SvStream& Out_Hex( SvStream&, ULONG nHex, BYTE nLen );
+ static SvStream& Out_Hex( SvStream&, sal_uLong nHex, sal_uInt8 nLen );
};
diff --git a/svtools/inc/svtools/ruler.hxx b/svtools/inc/svtools/ruler.hxx
index c2649b298ba6..6ad47779e1d9 100644
--- a/svtools/inc/svtools/ruler.hxx
+++ b/svtools/inc/svtools/ruler.hxx
@@ -138,7 +138,7 @@ SetMargin2() mit Parametern aufgerufen werden, kann bei diesen
folgendes angegeben werden:
long nPos - Offset zum NullPunkt in Pixel
- USHORT nStyle - Bit-Style:
+ sal_uInt16 nStyle - Bit-Style:
RULER_MARGIN_SIZEABLE
Rand kann in der Groesse veraendert werden.
@@ -154,7 +154,7 @@ initialisiert werden muessen:
long nPos - Offset zum NullPunkt in Pixel
long nWidth - Breite des Spaltenabstands in Pixel (kann zum
Beispiel fuer Tabellenspalten auch 0 sein)
- USHORT nStyle - Bit-Style:
+ sal_uInt16 nStyle - Bit-Style:
RULER_BORDER_SIZEABLE
Spaltenabstand kann in der Groesse veraendert
werden. Dieses Flag sollte nur gesetzt werden,
@@ -190,7 +190,7 @@ Parameter muss ein Array vom Typ RulerIndent uebergeben werden, wobei folgende
Werte initialisiert werden muessen:
long nPos - Offset zum NullPunkt in Pixel
- USHORT nStyle - Bit-Style:
+ sal_uInt16 nStyle - Bit-Style:
RULER_INDENT_TOP (Erstzeileneinzug)
RULER_INDENT_BOTTOM (Linker/Rechter Einzug)
RULER_INDENT_BORDER (Verical line that shows the border distance)
@@ -206,7 +206,7 @@ Parameter muss ein Array vom Typ RulerTab uebergeben werden, wobei folgende
Werte initialisiert werden muessen:
long nPos - Offset zum NullPunkt in Pixel
- USHORT nStyle - Bit-Style:
+ sal_uInt16 nStyle - Bit-Style:
RULER_TAB_DEFAULT (kann nicht selektiert werden)
RULER_TAB_LEFT
RULER_TAB_CENTER
@@ -223,7 +223,7 @@ muss ein Array vom Typ RulerLine uebergeben werden, wobei folgende Werte
initialisiert werden muessen:
long nPos - Offset zum NullPunkt in Pixel
- USHORT nStyle - Bit-Style (muss zur Zeit immer 0 sein)
+ sal_uInt16 nStyle - Bit-Style (muss zur Zeit immer 0 sein)
Mit SetArrows() koennen Bemassungspfeile im Lineal angezeigt werden. Wenn
Bemassungspfeile gesetzt werden, werden im Lineal auch keine Unterteilungen
@@ -234,7 +234,7 @@ uebergeben werden, wobei folgende Werte initialisiert werden muessen:
long nPos - Offset zum NullPunkt in Pixel
long nWidth - Breite des Pfeils
long nLogWidth - Breite des Pfeils in logischer Einheit
- USHORT nStyle - Bit-Style (muss zur Zeit immer 0 sein)
+ sal_uInt16 nStyle - Bit-Style (muss zur Zeit immer 0 sein)
Mit SetSourceUnit() wird die Einheit eingestellt, in welcher die logischen
Werte vorliegen, die bei SetArrows() uebergeben werden. Dabei werden nur die
@@ -246,7 +246,7 @@ Wenn auch vom Benutzer die Raender, Tabs, Border, ... ueber das Lineal
geaendert werden koennen, muss etwas mehr Aufwand getrieben werden. Dazu
muessen die Methoden StartDrag(), Drag() und EndDrag() ueberlagert werden.
Bei der Methode StartDrag() besteht die Moeglichkeit durch das zurueckgeben
-von FALSE das Draggen zu verhindern. Im Drag-Handler muss die Drag-Position
+von sal_False das Draggen zu verhindern. Im Drag-Handler muss die Drag-Position
abgefragt werden und die Werte muessen an die neue Position verschoben werden.
Dazu ruft man einfach die einzelnen Set-Methoden auf. Solange man sich
im Drag-Handler befindet, werden sich die Werte nur gemerkt und erst
@@ -254,10 +254,10 @@ danach das Lineal neu ausgegeben. Alle Handler koennen auch als Links ueber
entsprechende Set..Hdl()-Methoden gesetzt werden.
- StartDrag()
- Wird gerufen, wenn das Draggen gestartet wird. Wenn FALSE
- zurueckgegeben wird, wird das Draggen nicht ausgefuehrt. Bei TRUE
+ Wird gerufen, wenn das Draggen gestartet wird. Wenn sal_False
+ zurueckgegeben wird, wird das Draggen nicht ausgefuehrt. Bei sal_True
wird das Draggen zugelassen. Wenn der Handler nicht ueberlagert
- wird, wird FALSE zurueckgegeben.
+ wird, wird sal_False zurueckgegeben.
- EndDrag()
Wird gerufen, wenn das Draggen beendet wird.
@@ -325,7 +325,7 @@ es folgende Abfrage-Methoden.
gezogen, werden automatisch die alten Werte dargestellt, ohne das
der Drag-Handler gerufen wird.
Falls der Benutzer jedoch den Wert auf die alte Position
- zurueckgeschoben hat, liefert die Methode trotzdem FALSE. Falls
+ zurueckgeschoben hat, liefert die Methode trotzdem sal_False. Falls
dies vermieden werden soll, muss sich die Applikation im StartDrag-
Handler den alten Wert merken und im EndDrag-Handler den Wert
vergleichen.
@@ -372,7 +372,7 @@ es folgende Abfrage-Methoden.
gegebenenfalls ueber das Abfangen des MouseButtonDown-Handlers
auch ueber die rechte Maustaste etwas auf ein Item anzuwenden. Als
Paramter ueber gibt man die Fensterposition und gegebenenfalls
- einen Pointer auf einen USHORT, um die Array-Position eines
+ einen Pointer auf einen sal_uInt16, um die Array-Position eines
Tabs, Indent oder Borders mitzubekommen. Als Type werden folgende
Werte zurueckgegeben:
RULER_TYPE_DONTKNOW (kein Element im Linealbereich)
@@ -388,7 +388,7 @@ mit CancelDrag() abgebrochen werden. Folgende Methoden gibt es fuer die
Drag-Steuerung:
- IsDrag()
- Liefert TRUE zurueck, wenn sich das Lineal im Drag-Vorgang befindet.
+ Liefert sal_True zurueck, wenn sich das Lineal im Drag-Vorgang befindet.
- CancelDrag()
Bricht den Drag-Vorgang ab, falls einer durchgefuehrt wird. Dabei
@@ -443,7 +443,7 @@ womit man bestimmte Aktionen abfangen kann.
RULER_EXTRA_DONTKNOW (Nichts)
RULER_EXTRA_NULLOFFSET (Koordinaaten-Kreuz)
RULER_EXTRA_TAB (Tab)
- - USHORT nStyle Bitfeld als Style:
+ - sal_uInt16 nStyle Bitfeld als Style:
RULER_STYLE_HIGHLIGHT (selektiert)
RULER_TAB_... (ein Tab-Style)
@@ -553,9 +553,9 @@ enum RulerType { RULER_TYPE_DONTKNOW, RULER_TYPE_OUTSIDE,
enum RulerExtra { RULER_EXTRA_DONTKNOW,
RULER_EXTRA_NULLOFFSET, RULER_EXTRA_TAB };
-#define RULER_STYLE_HIGHLIGHT ((USHORT)0x8000)
-#define RULER_STYLE_DONTKNOW ((USHORT)0x4000)
-#define RULER_STYLE_INVISIBLE ((USHORT)0x2000)
+#define RULER_STYLE_HIGHLIGHT ((sal_uInt16)0x8000)
+#define RULER_STYLE_DONTKNOW ((sal_uInt16)0x4000)
+#define RULER_STYLE_INVISIBLE ((sal_uInt16)0x2000)
#define RULER_DRAGSIZE_MOVE 0
#define RULER_DRAGSIZE_1 1
@@ -574,24 +574,24 @@ enum RulerExtra { RULER_EXTRA_DONTKNOW,
// - RulerMargin -
// ---------------
-#define RULER_MARGIN_SIZEABLE ((USHORT)0x0001)
+#define RULER_MARGIN_SIZEABLE ((sal_uInt16)0x0001)
// ---------------
// - RulerBorder -
// ---------------
-#define RULER_BORDER_SIZEABLE ((USHORT)0x0001)
-#define RULER_BORDER_MOVEABLE ((USHORT)0x0002)
-#define RULER_BORDER_VARIABLE ((USHORT)0x0004)
-#define RULER_BORDER_TABLE ((USHORT)0x0008)
-#define RULER_BORDER_SNAP ((USHORT)0x0010)
-#define RULER_BORDER_MARGIN ((USHORT)0x0020)
+#define RULER_BORDER_SIZEABLE ((sal_uInt16)0x0001)
+#define RULER_BORDER_MOVEABLE ((sal_uInt16)0x0002)
+#define RULER_BORDER_VARIABLE ((sal_uInt16)0x0004)
+#define RULER_BORDER_TABLE ((sal_uInt16)0x0008)
+#define RULER_BORDER_SNAP ((sal_uInt16)0x0010)
+#define RULER_BORDER_MARGIN ((sal_uInt16)0x0020)
struct RulerBorder
{
long nPos;
long nWidth;
- USHORT nStyle;
+ sal_uInt16 nStyle;
//minimum/maximum position, supported for table borders/rows
long nMinPos;
long nMaxPos;
@@ -601,33 +601,33 @@ struct RulerBorder
// - RulerIndent -
// ---------------
-#define RULER_INDENT_TOP ((USHORT)0x0000)
-#define RULER_INDENT_BOTTOM ((USHORT)0x0001)
-#define RULER_INDENT_BORDER ((USHORT)0x0002)
-#define RULER_INDENT_STYLE ((USHORT)0x000F)
+#define RULER_INDENT_TOP ((sal_uInt16)0x0000)
+#define RULER_INDENT_BOTTOM ((sal_uInt16)0x0001)
+#define RULER_INDENT_BORDER ((sal_uInt16)0x0002)
+#define RULER_INDENT_STYLE ((sal_uInt16)0x000F)
struct RulerIndent
{
long nPos;
- USHORT nStyle;
+ sal_uInt16 nStyle;
};
// ------------
// - RulerTab -
// ------------
-#define RULER_TAB_LEFT ((USHORT)0x0000)
-#define RULER_TAB_RIGHT ((USHORT)0x0001)
-#define RULER_TAB_DECIMAL ((USHORT)0x0002)
-#define RULER_TAB_CENTER ((USHORT)0x0003)
-#define RULER_TAB_DEFAULT ((USHORT)0x0004)
-#define RULER_TAB_STYLE ((USHORT)0x000F)
-#define RULER_TAB_RTL ((USHORT)0x0010)
+#define RULER_TAB_LEFT ((sal_uInt16)0x0000)
+#define RULER_TAB_RIGHT ((sal_uInt16)0x0001)
+#define RULER_TAB_DECIMAL ((sal_uInt16)0x0002)
+#define RULER_TAB_CENTER ((sal_uInt16)0x0003)
+#define RULER_TAB_DEFAULT ((sal_uInt16)0x0004)
+#define RULER_TAB_STYLE ((sal_uInt16)0x000F)
+#define RULER_TAB_RTL ((sal_uInt16)0x0010)
struct RulerTab
{
long nPos;
- USHORT nStyle;
+ sal_uInt16 nStyle;
};
#define RULER_TAB_WIDTH 7
@@ -640,7 +640,7 @@ struct RulerTab
struct RulerLine
{
long nPos;
- USHORT nStyle;
+ sal_uInt16 nStyle;
};
// --------------
@@ -652,7 +652,7 @@ struct RulerArrow
long nPos;
long nWidth;
long nLogWidth;
- USHORT nStyle;
+ sal_uInt16 nStyle;
};
class ImplRulerData;
@@ -676,33 +676,33 @@ private:
long mnBorderWidth;
long mnStartDragPos;
long mnDragPos;
- ULONG mnUpdateEvtId;
+ sal_uLong mnUpdateEvtId;
ImplRulerData* mpSaveData;
ImplRulerData* mpData;
ImplRulerData* mpDragData;
Rectangle maExtraRect;
WinBits mnWinStyle;
- USHORT mnUnitIndex;
- USHORT mnDragAryPos;
- USHORT mnDragSize;
- USHORT mnDragScroll;
- USHORT mnDragModifier;
- USHORT mnExtraStyle;
- USHORT mnExtraClicks;
- USHORT mnExtraModifier;
+ sal_uInt16 mnUnitIndex;
+ sal_uInt16 mnDragAryPos;
+ sal_uInt16 mnDragSize;
+ sal_uInt16 mnDragScroll;
+ sal_uInt16 mnDragModifier;
+ sal_uInt16 mnExtraStyle;
+ sal_uInt16 mnExtraClicks;
+ sal_uInt16 mnExtraModifier;
RulerExtra meExtraType;
RulerType meDragType;
MapUnit meSourceUnit;
FieldUnit meUnit;
Fraction maZoom;
- BOOL mbCalc;
- BOOL mbFormat;
- BOOL mbDrag;
- BOOL mbDragDelete;
- BOOL mbDragCanceled;
- BOOL mbAutoWinWidth;
- BOOL mbActive;
- BYTE mnUpdateFlags;
+ sal_Bool mbCalc;
+ sal_Bool mbFormat;
+ sal_Bool mbDrag;
+ sal_Bool mbDragDelete;
+ sal_Bool mbDragCanceled;
+ sal_Bool mbAutoWinWidth;
+ sal_Bool mbActive;
+ sal_uInt8 mnUpdateFlags;
Link maStartDragHdl;
Link maDragHdl;
Link maEndDragHdl;
@@ -718,27 +718,27 @@ private:
SVT_DLLPRIVATE void ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter );
SVT_DLLPRIVATE void ImplDrawArrows( long nCenter );
SVT_DLLPRIVATE void ImplDrawBorders( long nMin, long nMax, long nVirTop, long nVirBottom );
- SVT_DLLPRIVATE void ImplDrawIndent( const Polygon& rPoly, USHORT nStyle );
+ SVT_DLLPRIVATE void ImplDrawIndent( const Polygon& rPoly, sal_uInt16 nStyle );
SVT_DLLPRIVATE void ImplDrawIndents( long nMin, long nMax, long nVirTop, long nVirBottom );
- SVT_DLLPRIVATE void ImplDrawTab( OutputDevice* pDevice, const Point& rPos, USHORT nStyle );
+ SVT_DLLPRIVATE void ImplDrawTab( OutputDevice* pDevice, const Point& rPos, sal_uInt16 nStyle );
SVT_DLLPRIVATE void ImplDrawTabs( long nMin, long nMax, long nVirTop, long nVirBottom );
using Window::ImplInit;
SVT_DLLPRIVATE void ImplInit( WinBits nWinBits );
- SVT_DLLPRIVATE void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
+ SVT_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
SVT_DLLPRIVATE void ImplCalc();
SVT_DLLPRIVATE void ImplFormat();
- SVT_DLLPRIVATE void ImplInitExtraField( BOOL bUpdate );
- SVT_DLLPRIVATE void ImplInvertLines( BOOL bErase = FALSE );
+ SVT_DLLPRIVATE void ImplInitExtraField( sal_Bool bUpdate );
+ SVT_DLLPRIVATE void ImplInvertLines( sal_Bool bErase = sal_False );
SVT_DLLPRIVATE void ImplDraw();
- SVT_DLLPRIVATE void ImplDrawExtra( BOOL bPaint = FALSE );
- SVT_DLLPRIVATE void ImplUpdate( BOOL bMustCalc = FALSE );
+ SVT_DLLPRIVATE void ImplDrawExtra( sal_Bool bPaint = sal_False );
+ SVT_DLLPRIVATE void ImplUpdate( sal_Bool bMustCalc = sal_False );
using Window::ImplHitTest;
- SVT_DLLPRIVATE BOOL ImplHitTest( const Point& rPos,
+ SVT_DLLPRIVATE sal_Bool ImplHitTest( const Point& rPos,
ImplRulerHitTest* pHitTest,
- BOOL bRequiredStyle = FALSE,
- USHORT nRequiredStyle = 0 ) const;
- SVT_DLLPRIVATE BOOL ImplDocHitTest( const Point& rPos, RulerType eDragType, ImplRulerHitTest* pHitTest ) const;
- SVT_DLLPRIVATE BOOL ImplStartDrag( ImplRulerHitTest* pHitTest, USHORT nModifier );
+ sal_Bool bRequiredStyle = sal_False,
+ sal_uInt16 nRequiredStyle = 0 ) const;
+ SVT_DLLPRIVATE sal_Bool ImplDocHitTest( const Point& rPos, RulerType eDragType, ImplRulerHitTest* pHitTest ) const;
+ SVT_DLLPRIVATE sal_Bool ImplStartDrag( ImplRulerHitTest* pHitTest, sal_uInt16 nModifier );
SVT_DLLPRIVATE void ImplDrag( const Point& rPos );
SVT_DLLPRIVATE void ImplEndDrag();
DECL_DLLPRIVATE_LINK( ImplUpdateHdl, void* );
@@ -769,7 +769,7 @@ public:
void Activate();
void Deactivate();
- BOOL IsActive() const { return mbActive; }
+ sal_Bool IsActive() const { return mbActive; }
void SetWinPos( long nOff = 0, long nWidth = 0 );
long GetWinOffset() const { return mnWinOff; }
@@ -789,67 +789,67 @@ public:
void SetSourceUnit( MapUnit eNewUnit ) { meSourceUnit = eNewUnit; }
MapUnit GetSourceUnit() const { return meSourceUnit; }
- void SetExtraType( RulerExtra eNewExtraType, USHORT nStyle = 0 );
+ void SetExtraType( RulerExtra eNewExtraType, sal_uInt16 nStyle = 0 );
RulerExtra GetExtraType() const { return meExtraType; }
- USHORT GetExtraStyle() const { return mnExtraStyle; }
- USHORT GetExtraClicks() const { return mnExtraClicks; }
- USHORT GetExtraModifier() const { return mnExtraModifier; }
+ sal_uInt16 GetExtraStyle() const { return mnExtraStyle; }
+ sal_uInt16 GetExtraClicks() const { return mnExtraClicks; }
+ sal_uInt16 GetExtraModifier() const { return mnExtraModifier; }
- BOOL StartDocDrag( const MouseEvent& rMEvt,
+ sal_Bool StartDocDrag( const MouseEvent& rMEvt,
RulerType eDragType = RULER_TYPE_DONTKNOW );
RulerType GetDocType( const Point& rPos,
RulerType eDragType = RULER_TYPE_DONTKNOW,
- USHORT* pAryPos = NULL ) const;
+ sal_uInt16* pAryPos = NULL ) const;
RulerType GetDragType() const { return meDragType; }
long GetDragPos() const { return mnDragPos; }
- USHORT GetDragAryPos() const { return mnDragAryPos; }
- USHORT GetDragSize() const { return mnDragSize; }
- BOOL IsDragDelete() const { return mbDragDelete; }
- BOOL IsDragCanceled() const { return mbDragCanceled; }
- USHORT GetDragScroll() const { return mnDragScroll; }
- USHORT GetDragModifier() const { return mnDragModifier; }
- BOOL IsDrag() const { return mbDrag; }
+ sal_uInt16 GetDragAryPos() const { return mnDragAryPos; }
+ sal_uInt16 GetDragSize() const { return mnDragSize; }
+ sal_Bool IsDragDelete() const { return mbDragDelete; }
+ sal_Bool IsDragCanceled() const { return mbDragCanceled; }
+ sal_uInt16 GetDragScroll() const { return mnDragScroll; }
+ sal_uInt16 GetDragModifier() const { return mnDragModifier; }
+ sal_Bool IsDrag() const { return mbDrag; }
void CancelDrag();
long GetClickPos() const { return mnDragPos; }
RulerType GetClickType() const { return meDragType; }
- USHORT GetClickAryPos() const { return mnDragAryPos; }
+ sal_uInt16 GetClickAryPos() const { return mnDragAryPos; }
using Window::GetType;
RulerType GetType( const Point& rPos,
- USHORT* pAryPos = NULL ) const;
+ sal_uInt16* pAryPos = NULL ) const;
void SetNullOffset( long nPos );
long GetNullOffset() const;
void SetMargin1() { SetMargin1( 0, RULER_STYLE_INVISIBLE ); }
- void SetMargin1( long nPos, USHORT nMarginStyle = RULER_MARGIN_SIZEABLE );
+ void SetMargin1( long nPos, sal_uInt16 nMarginStyle = RULER_MARGIN_SIZEABLE );
long GetMargin1() const;
- USHORT GetMargin1Style() const;
+ sal_uInt16 GetMargin1Style() const;
void SetMargin2() { SetMargin2( 0, RULER_STYLE_INVISIBLE ); }
- void SetMargin2( long nPos, USHORT nMarginStyle = RULER_MARGIN_SIZEABLE );
+ void SetMargin2( long nPos, sal_uInt16 nMarginStyle = RULER_MARGIN_SIZEABLE );
long GetMargin2() const;
- USHORT GetMargin2Style() const;
+ sal_uInt16 GetMargin2Style() const;
- void SetLines( USHORT n = 0, const RulerLine* pLineAry = NULL );
- USHORT GetLineCount() const;
+ void SetLines( sal_uInt16 n = 0, const RulerLine* pLineAry = NULL );
+ sal_uInt16 GetLineCount() const;
const RulerLine* GetLines() const;
- void SetArrows( USHORT n = 0, const RulerArrow* pArrowAry = NULL );
- USHORT GetArrowCount() const;
+ void SetArrows( sal_uInt16 n = 0, const RulerArrow* pArrowAry = NULL );
+ sal_uInt16 GetArrowCount() const;
const RulerArrow* GetArrows() const;
- void SetBorders( USHORT n = 0, const RulerBorder* pBrdAry = NULL );
- USHORT GetBorderCount() const;
+ void SetBorders( sal_uInt16 n = 0, const RulerBorder* pBrdAry = NULL );
+ sal_uInt16 GetBorderCount() const;
const RulerBorder* GetBorders() const;
- void SetIndents( USHORT n = 0, const RulerIndent* pIndentAry = NULL );
- USHORT GetIndentCount() const;
+ void SetIndents( sal_uInt16 n = 0, const RulerIndent* pIndentAry = NULL );
+ sal_uInt16 GetIndentCount() const;
const RulerIndent* GetIndents() const;
- void SetTabs( USHORT n = 0, const RulerTab* pTabAry = NULL );
- USHORT GetTabCount() const;
+ void SetTabs( sal_uInt16 n = 0, const RulerTab* pTabAry = NULL );
+ sal_uInt16 GetTabCount() const;
const RulerTab* GetTabs() const;
static void DrawTab( OutputDevice* pDevice,
- const Point& rPos, USHORT nStyle );
+ const Point& rPos, sal_uInt16 nStyle );
void SetStyle( WinBits nStyle );
WinBits GetStyle() const { return mnWinStyle; }
@@ -868,7 +868,7 @@ public:
const Link& GetExtraDownHdl() const { return maExtraDownHdl; }
//set text direction right-to-left
- void SetTextRTL(BOOL bRTL);
+ void SetTextRTL(sal_Bool bRTL);
};
#endif // _RULER_HXX
diff --git a/svtools/inc/svtools/scrwin.hxx b/svtools/inc/svtools/scrwin.hxx
index 1542ed667133..deeab0ee3fd9 100644
--- a/svtools/inc/svtools/scrwin.hxx
+++ b/svtools/inc/svtools/scrwin.hxx
@@ -40,7 +40,7 @@ class DataChangedEvent;
// - ScrollableWindow-Type -
// -------------------------
-typedef USHORT ScrollableWindowFlags;
+typedef sal_uInt16 ScrollableWindowFlags;
#define SCRWIN_THUMBDRAGGING 1
#define SCRWIN_VCENTER 2
@@ -62,7 +62,7 @@ private:
ScrollBar aVScroll; // the scrollbars
ScrollBar aHScroll;
ScrollBarBox aCornerWin; // window in the bottom right corner
- BOOL bScrolling:1, // user controlled scrolling
+ sal_Bool bScrolling:1, // user controlled scrolling
bHandleDragging:1, // scroll window while dragging
bHCenter:1,
bVCenter:1;
@@ -94,15 +94,15 @@ public:
Size GetTotalSize() { return PixelToLogic( aTotPixSz ); }
void SetVisibleSize( const Size& rNewSize );
- BOOL MakeVisible( const Rectangle& rTarget, BOOL bSloppy = FALSE );
+ sal_Bool MakeVisible( const Rectangle& rTarget, sal_Bool bSloppy = sal_False );
Rectangle GetVisibleArea() const;
- void SetLineSize( ULONG nHorz, ULONG nVert );
+ void SetLineSize( sal_uLong nHorz, sal_uLong nVert );
using Window::Scroll;
- virtual void Scroll( long nDeltaX, long nDeltaY, USHORT nFlags = 0 );
+ virtual void Scroll( long nDeltaX, long nDeltaY, sal_uInt16 nFlags = 0 );
void ScrollLines( long nLinesX, long nLinesY );
- void ScrollPages( long nPagesX, ULONG nOverlapX,
- long nPagesY, ULONG nOverlapY );
+ void ScrollPages( long nPagesX, sal_uLong nOverlapX,
+ long nPagesY, sal_uLong nOverlapY );
private:
SVT_DLLPRIVATE Size GetOutputSizePixel() const;
diff --git a/svtools/inc/svtools/stdmenu.hxx b/svtools/inc/svtools/stdmenu.hxx
index 1b7e9816a103..34626dbd7721 100644
--- a/svtools/inc/svtools/stdmenu.hxx
+++ b/svtools/inc/svtools/stdmenu.hxx
@@ -189,7 +189,7 @@ private:
Link maSelectHdl;
Link maHighlightHdl;
- SVT_DLLPRIVATE BOOL ImplIsAlreadyInserted( const XubString& rStyleName, USHORT nCount );
+ SVT_DLLPRIVATE sal_Bool ImplIsAlreadyInserted( const XubString& rStyleName, sal_uInt16 nCount );
public:
FontStyleMenu();
diff --git a/svtools/inc/svtools/svicnvw.hxx b/svtools/inc/svtools/svicnvw.hxx
index 68a76d25e108..6aab24a32d70 100644
--- a/svtools/inc/svtools/svicnvw.hxx
+++ b/svtools/inc/svtools/svicnvw.hxx
@@ -63,20 +63,20 @@ enum SvIconViewTextMode
class SvIcnVwDataEntry : public SvViewDataEntry
{
friend class SvImpIconView;
- USHORT nIcnVwFlags;
+ sal_uInt16 nIcnVwFlags;
SvIconViewTextMode eTextMode;
public:
Rectangle aRect; // Bounding-Rect des Entries
Rectangle aGridRect; // gesetzt im Grid-Modus
Size aTextSize; // nur gesetzt im Grid-Modus
- USHORT nX,nY; // fuer Tastatursteuerung
+ sal_uInt16 nX,nY; // fuer Tastatursteuerung
SvIcnVwDataEntry();
virtual ~SvIcnVwDataEntry();
- BOOL IsEntryPosLocked() const { return (BOOL)((nIcnVwFlags & ICNVW_FLAG_POS_LOCKED) !=0); }
- void ClearVwFlags( USHORT nMask ) { nIcnVwFlags &= (~nMask); }
- void SetVwFlags( USHORT nMask ) { nIcnVwFlags |= nMask; }
- USHORT GetVwFlags() const { return nIcnVwFlags; }
+ sal_Bool IsEntryPosLocked() const { return (sal_Bool)((nIcnVwFlags & ICNVW_FLAG_POS_LOCKED) !=0); }
+ void ClearVwFlags( sal_uInt16 nMask ) { nIcnVwFlags &= (~nMask); }
+ void SetVwFlags( sal_uInt16 nMask ) { nIcnVwFlags |= nMask; }
+ sal_uInt16 GetVwFlags() const { return nIcnVwFlags; }
SvIconViewTextMode GetTextMode() const { return eTextMode; }
};
@@ -89,7 +89,7 @@ class SvIconView : public SvLBox
SvImpIconView* pImp;
Image aCollapsedEntryBmp;
Image aExpandedEntryBmp;
- USHORT nIcnVwFlags;
+ sal_uInt16 nIcnVwFlags;
void SetModel( SvLBoxTreeList* );
protected:
@@ -121,15 +121,15 @@ public:
void DisconnectFromModel();
SvLBoxEntry* InsertEntry( const XubString& rText, SvLBoxEntry* pParent = 0,
- BOOL bChildsOnDemand = FALSE,
- ULONG nPos=LIST_APPEND );
+ sal_Bool bChildsOnDemand = sal_False,
+ sal_uLong nPos=LIST_APPEND );
SvLBoxEntry* InsertEntry( const XubString& rText,
const Image& rExpandedEntryBmp,
const Image& rCollapsedEntryBmp,
SvLBoxEntry* pParent = 0,
- BOOL bChildsOnDemand = FALSE,
- ULONG nPos = LIST_APPEND );
+ sal_Bool bChildsOnDemand = sal_False,
+ sal_uLong nPos = LIST_APPEND );
const Image& GetDefaultExpandedEntryBmp() const { return aExpandedEntryBmp;}
const Image& GetDefaultCollapsedEntryBmp() const { return aCollapsedEntryBmp;}
@@ -146,7 +146,7 @@ public:
virtual SvLBoxEntry* CloneEntry( SvLBoxEntry* pSource );
- virtual USHORT IsA();
+ virtual sal_uInt16 IsA();
virtual void RequestingChilds( SvLBoxEntry* pParent );
@@ -158,7 +158,7 @@ public:
virtual void Resize();
virtual void GetFocus();
virtual void LoseFocus();
- void SetUpdateMode( BOOL );
+ void SetUpdateMode( sal_Bool );
using SvListView::SetModel;
virtual void SetModel( SvLBoxTreeList*, SvLBoxEntry* pParent );
@@ -166,40 +166,40 @@ public:
virtual void ModelHasInserted( SvListEntry* pEntry );
virtual void ModelHasInsertedTree( SvListEntry* pEntry );
virtual void ModelIsMoving(SvListEntry* pSource,
- SvListEntry* pTargetParent, ULONG nChildPos );
+ SvListEntry* pTargetParent, sal_uLong nChildPos );
virtual void ModelHasMoved(SvListEntry* pSource );
virtual void ModelIsRemoving( SvListEntry* pEntry );
virtual void ModelHasRemoved( SvListEntry* pEntry );
virtual void ModelHasEntryInvalidated( SvListEntry* pEntry );
- virtual void ShowTargetEmphasis( SvLBoxEntry*, BOOL bShow );
+ virtual void ShowTargetEmphasis( SvLBoxEntry*, sal_Bool bShow );
using Window::GetDropTarget;
virtual SvLBoxEntry* GetDropTarget( const Point& );
virtual Region GetDragRegion() const;
// NotifyMoving/Copying ueberladen, da wir bei GetDropTarget
// einen "magic pointer" zurueckgeben, falls in einen leeren
// Bereich auf der IconView gedroppt wird.
- virtual BOOL NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos);
- virtual BOOL NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos);
+ virtual sal_Bool NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos);
+ virtual sal_Bool NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos);
// gibt TopLeft des BoundingRects zurueck
// Konvertierung in Fensterposition: MapMode.Origin addieren
Point GetEntryPosition( SvLBoxEntry* ) const;
void SetEntryPosition( SvLBoxEntry*, const Point& rDocPos);
void SetEntryPosition( SvLBoxEntry*, const Point& rDocPos,
- BOOL bAdjustAtGrid );
+ sal_Bool bAdjustAtGrid );
void SetFont( const Font& rFont );
void SetDefaultFont();
using SvLBox::GetEntry;
- SvLBoxEntry* GetEntry( const Point& rPixPos, BOOL ) const;
+ SvLBoxEntry* GetEntry( const Point& rPixPos, sal_Bool ) const;
// Gibt den naechsten ueber pCurEntry liegenden Eintrag (ZOrder)
- SvLBoxEntry* GetNextEntry( const Point& rPixPos, SvLBoxEntry* pCurEntry, BOOL ) const;
+ SvLBoxEntry* GetNextEntry( const Point& rPixPos, SvLBoxEntry* pCurEntry, sal_Bool ) const;
// Gibt den naechsten unter pCurEntry liegenden Eintrag (ZOrder)
- SvLBoxEntry* GetPrevEntry( const Point& rPixPos, SvLBoxEntry* pCurEntry, BOOL ) const;
+ SvLBoxEntry* GetPrevEntry( const Point& rPixPos, SvLBoxEntry* pCurEntry, sal_Bool ) const;
SvLBoxEntry* GetEntryFromLogicPos( const Point& rDocPos ) const;
@@ -213,8 +213,8 @@ public:
void SetSelectionMode( SelectionMode );
using SvListView::Select;
- BOOL Select( SvLBoxEntry* pEntry, BOOL bSelect=TRUE );
- void SelectAll( BOOL bSelect, BOOL bPaint=TRUE );
+ sal_Bool Select( SvLBoxEntry* pEntry, sal_Bool bSelect=sal_True );
+ void SelectAll( sal_Bool bSelect, sal_Bool bPaint=sal_True );
virtual void SetCurEntry( SvLBoxEntry* _pEntry );
virtual SvLBoxEntry*
GetCurEntry() const;
@@ -222,28 +222,28 @@ public:
// logische Koordinaten
void SelectRect(
const Rectangle& rRect,
- BOOL bAdd = FALSE,
+ sal_Bool bAdd = sal_False,
// die Schnittmenge mit rRect wird invertiert
- // wird bei bAdd == FALSE ignoriert
+ // wird bei bAdd == sal_False ignoriert
SvPtrarr* pOtherRects = 0,
short nBorderOffs = -5 );
- ULONG GetSelectionCount() const;
+ sal_uLong GetSelectionCount() const;
virtual void Arrange();
void SetSpaceBetweenEntries( long nHor, long Ver );
long GetHorSpaceBetweenEntries();
long GetVerSpaceBetweenEntries();
- void EnableInplaceEditing( BOOL bEnable );
+ void EnableInplaceEditing( sal_Bool bEnable );
void EditEntry( SvLBoxEntry* pEntry = 0 );
- virtual BOOL EditingEntry( SvLBoxEntry* pEntry, Selection& );
- virtual BOOL EditedEntry( SvLBoxEntry*, const XubString& rNewText );
+ virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& );
+ virtual sal_Bool EditedEntry( SvLBoxEntry*, const XubString& rNewText );
void SetCurParent( SvLBoxEntry* pNewParent );
SvLBoxEntry* GetCurParent() const;
- virtual void ModelNotification( USHORT nActionId, SvListEntry* pEntry1,
- SvListEntry* pEntry2, ULONG nPos );
+ virtual void ModelNotification( sal_uInt16 nActionId, SvListEntry* pEntry1,
+ SvListEntry* pEntry2, sal_uLong nPos );
// 0,0: Grid-Modus ausschalten
void SetGrid( long nDX, long nDY );
@@ -253,7 +253,7 @@ public:
// nDeltaX < 0 : View bewegt sich auf dem Doc nach links
// nDeltaX > 0 : View bewegt sich auf dem Doc nach rechts
using Window::Scroll;
- virtual void Scroll( long nDeltaX, long nDeltaY, USHORT nFlags = 0 );
+ virtual void Scroll( long nDeltaX, long nDeltaY, sal_uInt16 nFlags = 0 );
virtual void PrepareCommandEvent( const CommandEvent& );
virtual void StartDrag( sal_Int8 nAction, const Point& );
@@ -271,14 +271,14 @@ public:
const Point& rRefPosPixel,
long& rScrollX,
long& rScrollY,
- BOOL bInDragDrop = FALSE,
- USHORT nBorderWidth = 10 );
+ sal_Bool bInDragDrop = sal_False,
+ sal_uInt16 nBorderWidth = 10 );
using Window::EndTracking;
void EndTracking();
void AdjustAtGrid( SvLBoxEntry* pEntry = 0 );
- void LockEntryPos( SvLBoxEntry* pEntry, BOOL bLock = TRUE );
- BOOL IsEntryPosLocked( const SvLBoxEntry* pEntry ) const;
+ void LockEntryPos( SvLBoxEntry* pEntry, sal_Bool bLock = sal_True );
+ sal_Bool IsEntryPosLocked( const SvLBoxEntry* pEntry ) const;
void SetTextMode( SvIconViewTextMode, SvLBoxEntry* pEntry = 0 );
SvIconViewTextMode GetTextMode( const SvLBoxEntry* pEntry = 0 ) const;
diff --git a/svtools/inc/svtools/svlbitm.hxx b/svtools/inc/svtools/svlbitm.hxx
index 5158c38fbd87..e6881e6ddb44 100644
--- a/svtools/inc/svtools/svlbitm.hxx
+++ b/svtools/inc/svtools/svlbitm.hxx
@@ -66,11 +66,11 @@ private:
long nWidth;
long nHeight;
SvLBoxButtonData_Impl* pImpl;
- BOOL bDataOk;
+ sal_Bool bDataOk;
SvButtonState eState;
SVT_DLLPRIVATE void SetWidthAndHeight();
- SVT_DLLPRIVATE void InitData( BOOL bImagesFromDefault,
+ SVT_DLLPRIVATE void InitData( sal_Bool bImagesFromDefault,
bool _bRadioBtn, const Control* pControlForSettings = NULL );
public:
// include creating default images (CheckBox or RadioButton)
@@ -80,17 +80,17 @@ public:
SvLBoxButtonData();
~SvLBoxButtonData();
- USHORT GetIndex( USHORT nItemState );
+ sal_uInt16 GetIndex( sal_uInt16 nItemState );
inline long Width();
inline long Height();
void SetLink( const Link& rLink) { aLink=rLink; }
const Link& GetLink() const { return aLink; }
- BOOL IsRadio();
+ sal_Bool IsRadio();
// weil Buttons nicht von LinkHdl abgeleitet sind
void CallLink();
- void StoreButtonState( SvLBoxEntry* pEntry, USHORT nItemFlags );
- SvButtonState ConvertToButtonState( USHORT nItemFlags ) const;
+ void StoreButtonState( SvLBoxEntry* pEntry, sal_uInt16 nItemFlags );
+ SvButtonState ConvertToButtonState( sal_uInt16 nItemFlags ) const;
inline SvButtonState GetActButtonState() const;
SvLBoxEntry* GetActEntry() const;
@@ -100,7 +100,7 @@ public:
void SetDefaultImages( const Control* pControlForSettings = NULL );
// set images acording to the color scheeme of the Control
// pControlForSettings == NULL: settings are taken from Application
- BOOL HasDefaultImages( void ) const;
+ sal_Bool HasDefaultImages( void ) const;
};
inline long SvLBoxButtonData::Width()
@@ -128,14 +128,14 @@ class SVT_DLLPUBLIC SvLBoxString : public SvLBoxItem
{
XubString aStr;
public:
- SvLBoxString( SvLBoxEntry*,USHORT nFlags,const XubString& rStr);
+ SvLBoxString( SvLBoxEntry*,sal_uInt16 nFlags,const XubString& rStr);
SvLBoxString();
virtual ~SvLBoxString();
- virtual USHORT IsA();
+ virtual sal_uInt16 IsA();
void InitViewData( SvLBox*,SvLBoxEntry*,SvViewDataItem* );
XubString GetText() const { return aStr; }
void SetText( SvLBoxEntry*, const XubString& rStr );
- void Paint( const Point&, SvLBox& rDev, USHORT nFlags,SvLBoxEntry* );
+ void Paint( const Point&, SvLBox& rDev, sal_uInt16 nFlags,SvLBoxEntry* );
SvLBoxItem* Create() const;
void Clone( SvLBoxItem* pSource );
};
@@ -144,13 +144,13 @@ class SvLBoxBmp : public SvLBoxItem
{
Image aBmp;
public:
- SvLBoxBmp( SvLBoxEntry*, USHORT nFlags, Image );
+ SvLBoxBmp( SvLBoxEntry*, sal_uInt16 nFlags, Image );
SvLBoxBmp();
virtual ~SvLBoxBmp();
- virtual USHORT IsA();
+ virtual sal_uInt16 IsA();
void InitViewData( SvLBox*,SvLBoxEntry*,SvViewDataItem* );
void SetBitmap( SvLBoxEntry*, Image );
- void Paint( const Point&, SvLBox& rView, USHORT nFlags,SvLBoxEntry* );
+ void Paint( const Point&, SvLBox& rView, sal_uInt16 nFlags,SvLBoxEntry* );
SvLBoxItem* Create() const;
void Clone( SvLBoxItem* pSource );
};
@@ -173,9 +173,9 @@ class SVT_DLLPUBLIC SvLBoxButton : public SvLBoxItem
{
SvLBoxButtonData* pData;
SvLBoxButtonKind eKind;
- USHORT nItemFlags;
- USHORT nImgArrOffs;
- USHORT nBaseOffs;
+ sal_uInt16 nItemFlags;
+ sal_uInt16 nImgArrOffs;
+ sal_uInt16 nBaseOffs;
void ImplAdjustBoxSize( Size& io_rCtrlSize, ControlType i_eType, Window* pParent );
public:
@@ -185,31 +185,31 @@ public:
// (see SV_BMP_STATICIMAGE; nFlags are effectively ignored
// for that kind).
SvLBoxButton( SvLBoxEntry* pEntry,
- SvLBoxButtonKind eTheKind, USHORT nFlags,
+ SvLBoxButtonKind eTheKind, sal_uInt16 nFlags,
SvLBoxButtonData* pBData );
SvLBoxButton();
virtual ~SvLBoxButton();
void InitViewData( SvLBox*,SvLBoxEntry*,SvViewDataItem* );
- virtual USHORT IsA();
- void Check( SvLBox* pView, SvLBoxEntry*, BOOL bCheck );
- virtual BOOL ClickHdl(SvLBox* pView, SvLBoxEntry* );
- void Paint( const Point&, SvLBox& rView, USHORT nFlags,SvLBoxEntry* );
+ virtual sal_uInt16 IsA();
+ void Check( SvLBox* pView, SvLBoxEntry*, sal_Bool bCheck );
+ virtual sal_Bool ClickHdl(SvLBox* pView, SvLBoxEntry* );
+ void Paint( const Point&, SvLBox& rView, sal_uInt16 nFlags,SvLBoxEntry* );
SvLBoxItem* Create() const;
void Clone( SvLBoxItem* pSource );
- USHORT GetButtonFlags() const { return nItemFlags; }
- BOOL IsStateChecked() const { return (BOOL)(nItemFlags & SV_ITEMSTATE_CHECKED)!=0; }
- BOOL IsStateUnchecked() const { return (BOOL)(nItemFlags & SV_ITEMSTATE_UNCHECKED)!=0; }
- BOOL IsStateTristate() const { return (BOOL)(nItemFlags & SV_ITEMSTATE_TRISTATE)!=0; }
- BOOL IsStateHilighted() const { return (BOOL)(nItemFlags & SV_ITEMSTATE_HILIGHTED)!=0; }
+ sal_uInt16 GetButtonFlags() const { return nItemFlags; }
+ sal_Bool IsStateChecked() const { return (sal_Bool)(nItemFlags & SV_ITEMSTATE_CHECKED)!=0; }
+ sal_Bool IsStateUnchecked() const { return (sal_Bool)(nItemFlags & SV_ITEMSTATE_UNCHECKED)!=0; }
+ sal_Bool IsStateTristate() const { return (sal_Bool)(nItemFlags & SV_ITEMSTATE_TRISTATE)!=0; }
+ sal_Bool IsStateHilighted() const { return (sal_Bool)(nItemFlags & SV_ITEMSTATE_HILIGHTED)!=0; }
void SetStateChecked();
void SetStateUnchecked();
void SetStateTristate();
- void SetStateHilighted( BOOL bHilight );
+ void SetStateHilighted( sal_Bool bHilight );
SvLBoxButtonKind GetKind() const { return eKind; }
- void SetBaseOffs( USHORT nOffs ) { nBaseOffs = nOffs; }
- USHORT GetBaseOffs() const { return nBaseOffs; }
+ void SetBaseOffs( sal_uInt16 nOffs ) { nBaseOffs = nOffs; }
+ sal_uInt16 GetBaseOffs() const { return nBaseOffs; }
// Check whether this button can be modified via UI, sounding a beep if it
// cannot be modified:
@@ -231,7 +231,7 @@ inline void SvLBoxButton::SetStateTristate()
nItemFlags &= SV_STATE_MASK;
nItemFlags |= SV_ITEMSTATE_TRISTATE;
}
-inline void SvLBoxButton::SetStateHilighted( BOOL bHilight )
+inline void SvLBoxButton::SetStateHilighted( sal_Bool bHilight )
{
if ( bHilight )
nItemFlags |= SV_ITEMSTATE_HILIGHTED;
@@ -245,18 +245,18 @@ class SVT_DLLPUBLIC SvLBoxContextBmp : public SvLBoxItem
{
SvLBoxContextBmp_Impl* m_pImpl;
public:
- SvLBoxContextBmp( SvLBoxEntry*,USHORT nFlags,Image,Image,
- USHORT nEntryFlagsBmp1);
+ SvLBoxContextBmp( SvLBoxEntry*,sal_uInt16 nFlags,Image,Image,
+ sal_uInt16 nEntryFlagsBmp1);
SvLBoxContextBmp();
virtual ~SvLBoxContextBmp();
- virtual USHORT IsA();
+ virtual sal_uInt16 IsA();
void InitViewData( SvLBox*,SvLBoxEntry*,SvViewDataItem* );
- void Paint( const Point&, SvLBox& rView, USHORT nFlags,SvLBoxEntry* );
+ void Paint( const Point&, SvLBox& rView, sal_uInt16 nFlags,SvLBoxEntry* );
SvLBoxItem* Create() const;
void Clone( SvLBoxItem* pSource );
- BOOL SetModeImages( const Image& _rBitmap1, const Image& _rBitmap2, BmpColorMode _eMode = BMP_COLOR_NORMAL );
+ sal_Bool SetModeImages( const Image& _rBitmap1, const Image& _rBitmap2, BmpColorMode _eMode = BMP_COLOR_NORMAL );
void GetModeImages( Image& _rBitmap1, Image& _rBitmap2, BmpColorMode _eMode = BMP_COLOR_NORMAL ) const;
inline void SetBitmap1( const Image& _rImage, BmpColorMode _eMode = BMP_COLOR_NORMAL );
diff --git a/svtools/inc/svtools/svlbox.hxx b/svtools/inc/svtools/svlbox.hxx
index 95fbd9f014d1..fd524e512a9e 100644
--- a/svtools/inc/svtools/svlbox.hxx
+++ b/svtools/inc/svtools/svlbox.hxx
@@ -102,21 +102,21 @@ class SvLBoxTab
void* pUserData;
public:
SvLBoxTab();
- SvLBoxTab( long nPos, USHORT nFlags=SV_LBOXTAB_ADJUST_LEFT );
+ SvLBoxTab( long nPos, sal_uInt16 nFlags=SV_LBOXTAB_ADJUST_LEFT );
SvLBoxTab( const SvLBoxTab& );
~SvLBoxTab();
- USHORT nFlags;
+ sal_uInt16 nFlags;
void SetUserData( void* pPtr ) { pUserData = pPtr; }
void* GetUserData() const { return pUserData; }
- BOOL IsDynamic() const { return (BOOL)((nFlags & SV_LBOXTAB_DYNAMIC)!=0); }
+ sal_Bool IsDynamic() const { return (sal_Bool)((nFlags & SV_LBOXTAB_DYNAMIC)!=0); }
void SetPos( long nNewPos) { nPos = nNewPos; }
long GetPos() const { return nPos; }
long CalcOffset( long nItemLength, long nTabWidth );
// long CalcOffset( const String&, const OutputDevice& );
- BOOL IsEditable() const { return (BOOL)((nFlags & SV_LBOXTAB_EDITABLE)!=0); }
- BOOL IsPushable() const { return (BOOL)((nFlags & SV_LBOXTAB_PUSHABLE)!=0); }
+ sal_Bool IsEditable() const { return (sal_Bool)((nFlags & SV_LBOXTAB_EDITABLE)!=0); }
+ sal_Bool IsPushable() const { return (sal_Bool)((nFlags & SV_LBOXTAB_PUSHABLE)!=0); }
};
// *********************************************************************
@@ -138,7 +138,7 @@ class SvViewDataEntry : public SvViewData
{
public:
SvViewDataItem* pItemData; // ein Array von SvViewDataItems
- USHORT nItmCnt; // Anzahl Items fuer delete-operator
+ sal_uInt16 nItmCnt; // Anzahl Items fuer delete-operator
SvViewDataEntry();
virtual ~SvViewDataEntry();
@@ -151,20 +151,20 @@ public:
class SVT_DLLPUBLIC SvLBoxItem
{
public:
- SvLBoxItem( SvLBoxEntry*, USHORT nFlags );
+ SvLBoxItem( SvLBoxEntry*, sal_uInt16 nFlags );
SvLBoxItem();
virtual ~SvLBoxItem();
- virtual USHORT IsA() = 0;
+ virtual sal_uInt16 IsA() = 0;
const Size& GetSize( SvLBox* pView, SvLBoxEntry* pEntry );
const Size& GetSize( SvLBoxEntry*, SvViewDataEntry* );
- const Size& GetSize( SvViewDataEntry* pData, USHORT nItemPos )
+ const Size& GetSize( SvViewDataEntry* pData, sal_uInt16 nItemPos )
{
SvViewDataItem* pIData=pData->pItemData+nItemPos;
return pIData->aSize;
}
virtual void Paint( const Point& rPos, SvLBox& rOutDev,
- USHORT nViewDataEntryFlags,
+ sal_uInt16 nViewDataEntryFlags,
SvLBoxEntry* pEntry ) = 0;
virtual void InitViewData( SvLBox* pView, SvLBoxEntry* pEntry,
@@ -194,7 +194,7 @@ class SVT_DLLPUBLIC SvLBoxEntry : public SvListEntry
SvPtrarr aItems;
void* pUserData;
- USHORT nEntryFlags;
+ sal_uInt16 nEntryFlags;
//#if 0 // _SOLAR__PRIVATE
SVT_DLLPRIVATE void DeleteItems_Impl();
//#endif
@@ -203,24 +203,24 @@ public:
SvLBoxEntry();
virtual ~SvLBoxEntry();
- USHORT ItemCount() const { return (USHORT)aItems.Count(); }
+ sal_uInt16 ItemCount() const { return (sal_uInt16)aItems.Count(); }
// DARF NUR GERUFEN WERDEN, WENN DER EINTRAG NOCH NICHT IM MODEL
// EINGEFUEGT IST, DA SONST FUER DAS ITEM KEINE VIEW-ABHAENGIGEN
// DATEN ALLOZIERT WERDEN!
void AddItem( SvLBoxItem* pItem );
- void ReplaceItem( SvLBoxItem* pNewItem, USHORT nPos );
- SvLBoxItem* GetItem( USHORT nPos ) const { return (SvLBoxItem*)aItems.GetObject(nPos ); }
- SvLBoxItem* GetFirstItem( USHORT nId );
- USHORT GetPos( SvLBoxItem* pItem ) const { return aItems.GetPos( pItem ); }
+ void ReplaceItem( SvLBoxItem* pNewItem, sal_uInt16 nPos );
+ SvLBoxItem* GetItem( sal_uInt16 nPos ) const { return (SvLBoxItem*)aItems.GetObject(nPos ); }
+ SvLBoxItem* GetFirstItem( sal_uInt16 nId );
+ sal_uInt16 GetPos( SvLBoxItem* pItem ) const { return aItems.GetPos( pItem ); }
void* GetUserData() const { return pUserData; }
void SetUserData( void* pPtr ) { pUserData = pPtr; }
virtual void Clone( SvListEntry* pSource );
- void EnableChildsOnDemand( BOOL bEnable=TRUE );
- BOOL HasChildsOnDemand() const { return (BOOL)((nEntryFlags & SV_ENTRYFLAG_CHILDS_ON_DEMAND)!=0); }
- BOOL HasInUseEmphasis() const { return (BOOL)((nEntryFlags & SV_ENTRYFLAG_IN_USE)!=0); }
+ void EnableChildsOnDemand( sal_Bool bEnable=sal_True );
+ sal_Bool HasChildsOnDemand() const { return (sal_Bool)((nEntryFlags & SV_ENTRYFLAG_CHILDS_ON_DEMAND)!=0); }
+ sal_Bool HasInUseEmphasis() const { return (sal_Bool)((nEntryFlags & SV_ENTRYFLAG_IN_USE)!=0); }
- USHORT GetFlags() const { return nEntryFlags; }
- void SetFlags( USHORT nFlags ) { nEntryFlags = nFlags; }
+ sal_uInt16 GetFlags() const { return nEntryFlags; }
+ void SetFlags( sal_uInt16 nFlags ) { nEntryFlags = nFlags; }
};
// *********************************************************************
@@ -229,7 +229,7 @@ public:
#define WB_FORCE_SELECTION ((WinBits)0x8000)
-#define DragDropMode USHORT
+#define DragDropMode sal_uInt16
#define SV_DRAGDROP_NONE (DragDropMode)0x0000
#define SV_DRAGDROP_CTRL_MOVE (DragDropMode)0x0001
#define SV_DRAGDROP_CTRL_COPY (DragDropMode)0x0002
@@ -305,18 +305,18 @@ protected:
SvLBox_Impl* pLBoxImpl;
- USHORT nImpFlags;
+ sal_uInt16 nImpFlags;
// Move/CopySelection: Position des aktuellen Eintrags in Selektionsliste
- USHORT nCurEntrySelPos;
+ sal_uInt16 nCurEntrySelPos;
DragDropMode nDragDropMode;
SelectionMode eSelMode;
sal_Int8 nDragOptions;
- BOOL CheckDragAndDropMode( SvLBox* pSource, sal_Int8 );
- void ImplShowTargetEmphasis( SvLBoxEntry* pEntry, BOOL bShow);
- void EnableSelectionAsDropTarget( BOOL bEnable = TRUE,
- BOOL bWithChilds = TRUE );
+ sal_Bool CheckDragAndDropMode( SvLBox* pSource, sal_Int8 );
+ void ImplShowTargetEmphasis( SvLBoxEntry* pEntry, sal_Bool bShow);
+ void EnableSelectionAsDropTarget( sal_Bool bEnable = sal_True,
+ sal_Bool bWithChilds = sal_True );
// standard impl gibt 0 zurueck; muss von abgeleiteten Klassen, die
// D&D unterstuetzen, ueberladen werden
using Window::GetDropTarget;
@@ -331,23 +331,23 @@ protected:
// invalidate children on enable/disable
virtual void StateChanged( StateChangedType );
- virtual ULONG Insert( SvLBoxEntry* pEnt,SvLBoxEntry* pPar,ULONG nPos=LIST_APPEND);
- virtual ULONG Insert( SvLBoxEntry* pEntry,ULONG nRootPos = LIST_APPEND );
+ virtual sal_uLong Insert( SvLBoxEntry* pEnt,SvLBoxEntry* pPar,sal_uLong nPos=LIST_APPEND);
+ virtual sal_uLong Insert( SvLBoxEntry* pEntry,sal_uLong nRootPos = LIST_APPEND );
void InsertTree( SvLBoxEntry* pTree, SvLBoxEntry* pTarget) {pModel->InsertTree( pTree, pTarget ); }
// Inplace-Editing
SvInplaceEdit2* pEdCtrl;
- void EnableInplaceEditing( BOOL bEnable){if(bEnable)nImpFlags|=SVLBOX_EDT_ENABLED; else nImpFlags&=~SVLBOX_EDT_ENABLED;}
- BOOL IsInplaceEditingEnabled() const { return (BOOL)((nImpFlags&SVLBOX_EDT_ENABLED)!=0); }
+ void EnableInplaceEditing( sal_Bool bEnable){if(bEnable)nImpFlags|=SVLBOX_EDT_ENABLED; else nImpFlags&=~SVLBOX_EDT_ENABLED;}
+ sal_Bool IsInplaceEditingEnabled() const { return (sal_Bool)((nImpFlags&SVLBOX_EDT_ENABLED)!=0); }
virtual void EditingRequest( SvLBoxEntry* pEntry, SvLBoxItem* pItem,
const Point& rMousePos );
void EditText( const String&, const Rectangle&,const Selection&);
- void EditText( const String&, const Rectangle&,const Selection&, BOOL bMulti);
+ void EditText( const String&, const Rectangle&,const Selection&, sal_Bool bMulti);
void EditTextMultiLine( const String&, const Rectangle&,const Selection&);
void CancelTextEditing();
- BOOL IsEditingActive() const { return (BOOL)((nImpFlags & SVLBOX_IN_EDT)!=0); }
- BOOL EditingCanceled() const;
- void EndEditing( BOOL bCancel = FALSE );
+ sal_Bool IsEditingActive() const { return (sal_Bool)((nImpFlags & SVLBOX_IN_EDT)!=0); }
+ sal_Bool EditingCanceled() const;
+ void EndEditing( sal_Bool bCancel = sal_False );
bool IsEmptyTextAllowed() const;
void ForbidEmptyText();
// Callback EditText
@@ -365,7 +365,7 @@ protected:
virtual void Command( const CommandEvent& rCEvt );
virtual void KeyInput( const KeyEvent& rKEvt );
- virtual SvLBoxEntry* GetEntry( const Point& rPos, BOOL bHit=FALSE ) const;
+ virtual SvLBoxEntry* GetEntry( const Point& rPos, sal_Bool bHit=sal_False ) const;
virtual void ModelHasEntryInvalidated( SvListEntry* pEntry );
// handler and methods for Drag - finished handler. This link can be set
@@ -403,12 +403,12 @@ public:
void SetModel( SvLBoxTreeList* );
void DisconnectFromModel();
- virtual USHORT IsA();
- ULONG GetEntryCount() const {return pModel->GetEntryCount();}
+ virtual sal_uInt16 IsA();
+ sal_uLong GetEntryCount() const {return pModel->GetEntryCount();}
SvLBoxEntry* First() const { return (SvLBoxEntry*)(pModel->First()); }
- SvLBoxEntry* Next( SvLBoxEntry* pEntry, USHORT* pDepth=0 ) const { return (SvLBoxEntry*)(pModel->Next(pEntry,pDepth));}
- SvLBoxEntry* Prev( SvLBoxEntry* pEntry, USHORT* pDepth=0 ) const { return (SvLBoxEntry*)(pModel->Prev(pEntry,pDepth));}
- SvLBoxEntry* Last( USHORT* pDepth=0 ) const { return (SvLBoxEntry*)(pModel->Last(pDepth));}
+ SvLBoxEntry* Next( SvLBoxEntry* pEntry, sal_uInt16* pDepth=0 ) const { return (SvLBoxEntry*)(pModel->Next(pEntry,pDepth));}
+ SvLBoxEntry* Prev( SvLBoxEntry* pEntry, sal_uInt16* pDepth=0 ) const { return (SvLBoxEntry*)(pModel->Prev(pEntry,pDepth));}
+ SvLBoxEntry* Last( sal_uInt16* pDepth=0 ) const { return (SvLBoxEntry*)(pModel->Last(pDepth));}
SvLBoxEntry* FirstChild(SvLBoxEntry* pParent ) const { return (SvLBoxEntry*)(pModel->FirstChild(pParent)); }
SvLBoxEntry* NextSibling(SvLBoxEntry* pEntry ) const { return (SvLBoxEntry*)(pModel->NextSibling( pEntry )); }
@@ -421,9 +421,9 @@ public:
SvLBoxEntry* PrevSelected( SvLBoxEntry* pEntry ) const { return (SvLBoxEntry*)(SvListView::PrevSelected(pEntry)); }
SvLBoxEntry* LastSelected() const { return (SvLBoxEntry*)(SvListView::LastSelected()); }
- BOOL CopySelection( SvLBox* pSource, SvLBoxEntry* pTarget );
- BOOL MoveSelection( SvLBox* pSource, SvLBoxEntry* pTarget );
- BOOL MoveSelectionCopyFallbackPossible( SvLBox* pSource, SvLBoxEntry* pTarget, sal_Bool bAllowCopyFallback );
+ sal_Bool CopySelection( SvLBox* pSource, SvLBoxEntry* pTarget );
+ sal_Bool MoveSelection( SvLBox* pSource, SvLBoxEntry* pTarget );
+ sal_Bool MoveSelectionCopyFallbackPossible( SvLBox* pSource, SvLBoxEntry* pTarget, sal_Bool bAllowCopyFallback );
void RemoveSelection();
DragDropMode GetDragDropMode() const { return nDragDropMode; }
@@ -432,8 +432,8 @@ public:
virtual void SetSelectionMode( SelectionMode );
// pParent==0 -> Root-Ebene
- SvLBoxEntry* GetEntry( SvLBoxEntry* pParent, ULONG nPos ) const { return (SvLBoxEntry*)(pModel->GetEntry(pParent,nPos)); }
- SvLBoxEntry* GetEntry( ULONG nRootPos ) const { return (SvLBoxEntry*)(pModel->GetEntry(nRootPos)); }
+ SvLBoxEntry* GetEntry( SvLBoxEntry* pParent, sal_uLong nPos ) const { return (SvLBoxEntry*)(pModel->GetEntry(pParent,nPos)); }
+ SvLBoxEntry* GetEntry( sal_uLong nRootPos ) const { return (SvLBoxEntry*)(pModel->GetEntry(nRootPos)); }
SvLBoxEntry* GetEntryFromPath( const ::std::deque< sal_Int32 >& _rPath ) const;
void FillEntryPath( SvLBoxEntry* pEntry, ::std::deque< sal_Int32 >& _rPath ) const;
@@ -444,8 +444,8 @@ public:
SvLBoxEntry* GetRootLevelParent(SvLBoxEntry* pEntry ) const { return (SvLBoxEntry*)(pModel->GetRootLevelParent( pEntry ));}
using Window::GetChildCount;
- ULONG GetChildCount( SvLBoxEntry* pParent ) const { return pModel->GetChildCount(pParent); }
- ULONG GetLevelChildCount( SvLBoxEntry* pParent ) const;
+ sal_uLong GetChildCount( SvLBoxEntry* pParent ) const { return pModel->GetChildCount(pParent); }
+ sal_uLong GetLevelChildCount( SvLBoxEntry* pParent ) const;
SvViewDataEntry* GetViewDataEntry( SvListEntry* pEntry ) const { return (SvViewDataEntry*)SvListView::GetViewData(pEntry); }
SvViewDataItem* GetViewDataItem( SvListEntry*, SvLBoxItem* ) const;
@@ -488,21 +488,21 @@ public:
*/
bool HandleKeyInput( const KeyEvent& rKEvt );
- virtual BOOL Expand( SvLBoxEntry* pParent );
- virtual BOOL Collapse( SvLBoxEntry* pParent );
- virtual BOOL Select( SvLBoxEntry* pEntry, BOOL bSelect=TRUE );
- virtual ULONG SelectChilds( SvLBoxEntry* pParent, BOOL bSelect );
- virtual void SelectAll( BOOL bSelect, BOOL bPaint=TRUE );
+ virtual sal_Bool Expand( SvLBoxEntry* pParent );
+ virtual sal_Bool Collapse( SvLBoxEntry* pParent );
+ virtual sal_Bool Select( SvLBoxEntry* pEntry, sal_Bool bSelect=sal_True );
+ virtual sal_uLong SelectChilds( SvLBoxEntry* pParent, sal_Bool bSelect );
+ virtual void SelectAll( sal_Bool bSelect, sal_Bool bPaint=sal_True );
virtual void SetCurEntry( SvLBoxEntry* _pEntry ) = 0;
virtual SvLBoxEntry*
GetCurEntry() const = 0;
// Model
- void SetInUseEmphasis( SvLBoxEntry* pEntry, BOOL bInUse=TRUE);
+ void SetInUseEmphasis( SvLBoxEntry* pEntry, sal_Bool bInUse=sal_True);
// View
- void SetCursorEmphasis( SvLBoxEntry* pEntry, BOOL bCursored=TRUE);
- BOOL HasCursorEmphasis( SvLBoxEntry* pEntry ) const;
+ void SetCursorEmphasis( SvLBoxEntry* pEntry, sal_Bool bCursored=sal_True);
+ sal_Bool HasCursorEmphasis( SvLBoxEntry* pEntry ) const;
void SetSelectHdl( const Link& rNewHdl ) {aSelectHdl=rNewHdl; }
void SetDeselectHdl( const Link& rNewHdl ) {aDeselectHdl=rNewHdl; }
@@ -518,8 +518,8 @@ public:
virtual long ExpandingHdl();
virtual void SelectHdl();
virtual void DeselectHdl();
- virtual BOOL DoubleClickHdl();
- BOOL IsTravelSelect() const { return (BOOL)((nImpFlags&SVLBOX_IS_TRAVELSELECT)!=0);}
+ virtual sal_Bool DoubleClickHdl();
+ sal_Bool IsTravelSelect() const { return (sal_Bool)((nImpFlags&SVLBOX_IS_TRAVELSELECT)!=0);}
SvLBoxEntry* GetHdlEntry() const { return pHdlEntry; }
SvLBoxItem* GetHdlItem() const;
@@ -536,7 +536,7 @@ public:
virtual DragDropMode NotifyStartDrag( TransferDataContainer& rData,
SvLBoxEntry* );
virtual void DragFinished( sal_Int8 nDropAction );
- virtual BOOL NotifyAcceptDrop( SvLBoxEntry* );
+ virtual sal_Bool NotifyAcceptDrop( SvLBoxEntry* );
void SetDragOptions( sal_Int8 nOptions ) { nDragOptions = nOptions; }
sal_Int8 GetDragOptions() const { return nDragOptions; }
@@ -545,25 +545,25 @@ public:
SvLBox* GetTargetView() const;
virtual void NotifyRemoving( SvLBoxEntry* );
- virtual void ShowTargetEmphasis( SvLBoxEntry*, BOOL bShow );
+ virtual void ShowTargetEmphasis( SvLBoxEntry*, sal_Bool bShow );
virtual SvLBoxEntry* CloneEntry( SvLBoxEntry* pSource );
virtual SvLBoxEntry* CreateEntry() const; // zum 'new'en von Entries
- // Rueckgabe: TRUE==Ok, FALSE==Abbrechen
- virtual BOOL NotifyMoving(
+ // Rueckgabe: sal_True==Ok, sal_False==Abbrechen
+ virtual sal_Bool NotifyMoving(
SvLBoxEntry* pTarget, // D&D-Drop-Position in this->GetModel()
SvLBoxEntry* pEntry, // Zu verschiebender Entry aus
// GetSourceListBox()->GetModel()
SvLBoxEntry*& rpNewParent, // Neuer Target-Parent
- ULONG& rNewChildPos); // Position in Childlist des Target-Parents
+ sal_uLong& rNewChildPos); // Position in Childlist des Target-Parents
- // Rueckgabe: TRUE==Ok, FALSE==Abbrechen
- virtual BOOL NotifyCopying(
+ // Rueckgabe: sal_True==Ok, sal_False==Abbrechen
+ virtual sal_Bool NotifyCopying(
SvLBoxEntry* pTarget, // D&D-Drop-Position in this->GetModel()
SvLBoxEntry* pEntry, // Zu kopierender Entry aus
// GetSourceListBox()->GetModel()
SvLBoxEntry*& rpNewParent, // Neuer Target-Parent
- ULONG& rNewChildPos); // Position in Childlist des Target-Parents
+ sal_uLong& rNewChildPos); // Position in Childlist des Target-Parents
// ACCESSIBILITY ==========================================================
@@ -596,7 +596,7 @@ struct SvLBoxDDInfo
SvLBoxEntry* pDDStartEntry;
// relative Position im Eintrag bei Drag-Beginn (IconView)
long nMouseRelX,nMouseRelY;
- ULONG nRes1,nRes2,nRes3,nRes4;
+ sal_uLong nRes1,nRes2,nRes3,nRes4;
};
class SvInplaceEdit : public Edit
@@ -605,8 +605,8 @@ class SvInplaceEdit : public Edit
Accelerator aAccReturn;
Accelerator aAccEscape;
Timer aTimer;
- BOOL bCanceled;
- BOOL bAlreadyInCallBack;
+ sal_Bool bCanceled;
+ sal_Bool bAlreadyInCallBack;
//#if 0 // _SOLAR__PRIVATE
void CallCallBackHdl_Impl();
@@ -623,9 +623,9 @@ public:
virtual void KeyInput( const KeyEvent& rKEvt );
virtual void LoseFocus();
- BOOL EditingCanceled() const { return bCanceled; }
+ sal_Bool EditingCanceled() const { return bCanceled; }
String GetText() const { return Edit::GetText(); }
- void StopEditing( BOOL bCancel = FALSE );
+ void StopEditing( sal_Bool bCancel = sal_False );
};
class SvInplaceEdit2
@@ -635,9 +635,9 @@ class SvInplaceEdit2
Accelerator aAccEscape;
Timer aTimer;
Edit* pEdit;
- BOOL bCanceled;
- BOOL bAlreadyInCallBack;
- BOOL bMultiLine;
+ sal_Bool bCanceled;
+ sal_Bool bAlreadyInCallBack;
+ sal_Bool bMultiLine;
//#if 0 // _SOLAR__PRIVATE
void CallCallBackHdl_Impl();
@@ -649,14 +649,14 @@ class SvInplaceEdit2
public:
SvInplaceEdit2( Window* pParent, const Point& rPos, const Size& rSize,
const String& rData, const Link& rNotifyEditEnd,
- const Selection&, BOOL bMultiLine = FALSE );
+ const Selection&, sal_Bool bMultiLine = sal_False );
~SvInplaceEdit2();
- BOOL KeyInput( const KeyEvent& rKEvt );
+ sal_Bool KeyInput( const KeyEvent& rKEvt );
void LoseFocus();
- BOOL EditingCanceled() const { return bCanceled; }
+ sal_Bool EditingCanceled() const { return bCanceled; }
String GetText() const;
String GetSavedValue() const;
- void StopEditing( BOOL bCancel = FALSE );
+ void StopEditing( sal_Bool bCancel = sal_False );
void Hide();
};
@@ -667,7 +667,7 @@ inline SvViewDataItem* SvLBox::GetViewDataItem( SvListEntry* pEntry,
(SvViewDataEntry*)SvListView::GetViewData(pEntry);
DBG_ASSERT(pEntryData,"Entry not in View");
DBG_ASSERT(pEntryData->pItemData,"No ItemData");
- USHORT nItemPos = ((SvLBoxEntry*)pEntry)->GetPos( pItem );
+ sal_uInt16 nItemPos = ((SvLBoxEntry*)pEntry)->GetPos( pItem );
return (pEntryData->pItemData+nItemPos);
}
diff --git a/svtools/inc/svtools/svmedit.hxx b/svtools/inc/svtools/svmedit.hxx
index 9c8a4a34dbf6..01c2c46fee91 100644
--- a/svtools/inc/svtools/svmedit.hxx
+++ b/svtools/inc/svtools/svmedit.hxx
@@ -59,7 +59,7 @@ protected:
virtual long PreNotify( NotifyEvent& rNEvt );
long Notify( NotifyEvent& rNEvt );
using Control::ImplInitSettings;
- void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
+ void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
WinBits ImplInitStyle( WinBits nStyle );
ExtTextEngine* GetTextEngine() const;
@@ -78,17 +78,17 @@ public:
virtual void SetModifyFlag();
virtual void ClearModifyFlag();
- virtual BOOL IsModified() const;
+ virtual sal_Bool IsModified() const;
- virtual void EnableUpdateData( ULONG nTimeout = EDIT_UPDATEDATA_TIMEOUT );
+ virtual void EnableUpdateData( sal_uLong nTimeout = EDIT_UPDATEDATA_TIMEOUT );
virtual void DisableUpdateData() { delete pUpdateDataTimer; pUpdateDataTimer = NULL; }
- virtual ULONG IsUpdateDataEnabled() const;
+ virtual sal_uLong IsUpdateDataEnabled() const;
- virtual void SetReadOnly( BOOL bReadOnly = TRUE );
- virtual BOOL IsReadOnly() const;
+ virtual void SetReadOnly( sal_Bool bReadOnly = sal_True );
+ virtual sal_Bool IsReadOnly() const;
- void EnableFocusSelectionHide( BOOL bHide );
- BOOL IsFocusSelectionHideEnabled() const;
+ void EnableFocusSelectionHide( sal_Bool bHide );
+ sal_Bool IsFocusSelectionHideEnabled() const;
virtual void SetMaxTextLen( xub_StrLen nMaxLen = 0 );
virtual xub_StrLen GetMaxTextLen() const;
@@ -113,8 +113,8 @@ public:
String GetTextLines() const;
String GetTextLines( LineEnd aSeparator ) const;
- void SetRightToLeft( BOOL bRightToLeft );
- BOOL IsRightToLeft() const;
+ void SetRightToLeft( sal_Bool bRightToLeft );
+ sal_Bool IsRightToLeft() const;
void SaveValue() { aSaveValue = GetText(); }
const XubString& GetSavedValue() const { return aSaveValue; }
@@ -131,22 +131,22 @@ public:
Size CalcMinimumSize() const;
Size CalcAdjustedSize( const Size& rPrefSize ) const;
using Edit::CalcSize;
- Size CalcSize( USHORT nColumns, USHORT nLines ) const;
- void GetMaxVisColumnsAndLines( USHORT& rnCols, USHORT& rnLines ) const;
+ Size CalcSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const;
+ void GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const;
- void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags );
+ void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags );
- void SetLeftMargin( USHORT n );
- USHORT GetLeftMargin() const;
+ void SetLeftMargin( sal_uInt16 n );
+ sal_uInt16 GetLeftMargin() const;
virtual
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >
- GetComponentInterface(BOOL bCreate = TRUE);
+ GetComponentInterface(sal_Bool bCreate = sal_True);
void DisableSelectionOnFocus();
};
-inline ULONG MultiLineEdit::IsUpdateDataEnabled() const
+inline sal_uLong MultiLineEdit::IsUpdateDataEnabled() const
{
return pUpdateDataTimer ? pUpdateDataTimer->GetTimeout() : 0;
}
diff --git a/svtools/inc/svtools/svmedit2.hxx b/svtools/inc/svtools/svmedit2.hxx
index e09592cfc172..70bd623fef0a 100644
--- a/svtools/inc/svtools/svmedit2.hxx
+++ b/svtools/inc/svtools/svmedit2.hxx
@@ -40,14 +40,14 @@ public:
~ExtMultiLineEdit();
// methods of TextView
- void InsertText( const String& rNew, BOOL bSelect = FALSE );
- void SetAutoScroll( BOOL bAutoScroll );
- void EnableCursor( BOOL bEnable );
+ void InsertText( const String& rNew, sal_Bool bSelect = sal_False );
+ void SetAutoScroll( sal_Bool bAutoScroll );
+ void EnableCursor( sal_Bool bEnable );
// methods of TextEngine
- void SetAttrib( const TextAttrib& rAttr, ULONG nPara, USHORT nStart, USHORT nEnd );
- void SetLeftMargin( USHORT nLeftMargin );
- ULONG GetParagraphCount() const;
+ void SetAttrib( const TextAttrib& rAttr, sal_uLong nPara, sal_uInt16 nStart, sal_uInt16 nEnd );
+ void SetLeftMargin( sal_uInt16 nLeftMargin );
+ sal_uLong GetParagraphCount() const;
};
#endif
diff --git a/svtools/inc/svtools/svparser.hxx b/svtools/inc/svtools/svparser.hxx
index bd24298011e2..7eac9c93d425 100644
--- a/svtools/inc/svtools/svparser.hxx
+++ b/svtools/inc/svtools/svparser.hxx
@@ -58,21 +58,21 @@ class SVT_DLLPUBLIC SvParser : public SvRefBase
protected:
SvStream& rInput;
String aToken; // gescanntes Token
- ULONG nlLineNr; // akt. Zeilen Nummer
- ULONG nlLinePos; // akt. Spalten Nummer
+ sal_uLong nlLineNr; // akt. Zeilen Nummer
+ sal_uLong nlLinePos; // akt. Spalten Nummer
SvParser_Impl *pImplData; // interne Daten
long nTokenValue; // zusaetzlicher Wert (RTF)
- BOOL bTokenHasValue; // indicates whether nTokenValue is valid
+ sal_Bool bTokenHasValue; // indicates whether nTokenValue is valid
SvParserState eState; // Status auch in abgl. Klassen
rtl_TextEncoding eSrcEnc; // Source encoding
- ULONG nNextChPos;
+ sal_uLong nNextChPos;
sal_Unicode nNextCh; // Akt. Zeichen fuer die "lex"
- BOOL bDownloadingFile : 1;// TRUE: Es wird gerade ein externes
+ sal_Bool bDownloadingFile : 1;// sal_True: Es wird gerade ein externes
// File geladen. d.h. alle
// DataAvailable Links muessen
// ignoriert werden.
@@ -81,16 +81,16 @@ protected:
// Stream als ANSI gelesen,
// aber als CharSet DONTKNOW
// zurueckgegeben.
- BOOL bUCS2BSrcEnc : 1; // oder als big-endian UCS2
- BOOL bSwitchToUCS2 : 1; // Umschalten des ist erlaubt
+ sal_Bool bUCS2BSrcEnc : 1; // oder als big-endian UCS2
+ sal_Bool bSwitchToUCS2 : 1; // Umschalten des ist erlaubt
- BOOL bRTF_InTextRead : 1; // only for RTF-Parser!!!
+ sal_Bool bRTF_InTextRead : 1; // only for RTF-Parser!!!
struct TokenStackType
{
String sToken;
long nTokenValue;
- BOOL bTokenHasValue;
+ sal_Bool bTokenHasValue;
int nTokenId;
inline TokenStackType() { nTokenId = 0; }
@@ -100,7 +100,7 @@ protected:
// Methoden fuer Token-Stack
int SkipToken( short nCnt = -1 ); // n Tokens zurueck "skippen"
TokenStackType* GetStackPtr( short nCnt );
- inline BYTE GetStackPos() const;
+ inline sal_uInt8 GetStackPos() const;
// scanne das naechste Token:
// Tokenstack abarbeiten und ggfs. _GetNextToken() rufen. Diese
@@ -119,22 +119,22 @@ protected:
private:
TokenStackType* pTokenStack;
TokenStackType *pTokenStackPos;
- BYTE nTokenStackSize, nTokenStackPos;
+ sal_uInt8 nTokenStackSize, nTokenStackPos;
public:
// Konstruktor
- SvParser( SvStream& rIn, BYTE nStackSize = 3 );
+ SvParser( SvStream& rIn, sal_uInt8 nStackSize = 3 );
virtual SvParserState CallParser() = 0; // Aufruf des Parsers
inline SvParserState GetStatus() const { return eState; } // StatusInfo
- inline ULONG GetLineNr() const { return nlLineNr; }
- inline ULONG GetLinePos() const { return nlLinePos; }
- inline ULONG IncLineNr() { return ++nlLineNr; }
- inline ULONG IncLinePos() { return ++nlLinePos; }
- inline ULONG SetLineNr( ULONG nlNum ); // inline unten
- inline ULONG SetLinePos( ULONG nlPos ); // inline unten
+ inline sal_uLong GetLineNr() const { return nlLineNr; }
+ inline sal_uLong GetLinePos() const { return nlLinePos; }
+ inline sal_uLong IncLineNr() { return ++nlLineNr; }
+ inline sal_uLong IncLinePos() { return ++nlLinePos; }
+ inline sal_uLong SetLineNr( sal_uLong nlNum ); // inline unten
+ inline sal_uLong SetLinePos( sal_uLong nlPos ); // inline unten
sal_Unicode GetNextChar();
void RereadLookahead();
@@ -151,24 +151,24 @@ public:
/*virtual*/ void RestoreState();
virtual void Continue( int nToken );
- inline void SetDownloadingFile( BOOL bSet ) { bDownloadingFile = bSet; }
- inline BOOL IsDownloadingFile() const { return bDownloadingFile; }
+ inline void SetDownloadingFile( sal_Bool bSet ) { bDownloadingFile = bSet; }
+ inline sal_Bool IsDownloadingFile() const { return bDownloadingFile; }
// Set/get source encoding. The UCS2BEncoding flag is valid if source
// encoding is UCS2. It specifies a big endian encoding.
void SetSrcEncoding( rtl_TextEncoding eSrcEnc );
rtl_TextEncoding GetSrcEncoding() const { return eSrcEnc; }
- void SetSrcUCS2BEncoding( BOOL bSet ) { bUCS2BSrcEnc = bSet; }
- BOOL IsSrcUCS2BEncoding() const { return bUCS2BSrcEnc; }
+ void SetSrcUCS2BEncoding( sal_Bool bSet ) { bUCS2BSrcEnc = bSet; }
+ sal_Bool IsSrcUCS2BEncoding() const { return bUCS2BSrcEnc; }
// Darf der Zeichensatz auf UCS/2 umgeschaltet werden, wenn
// in den ersten beiden Zeichen im Stream eine BOM steht?
- void SetSwitchToUCS2( BOOL bSet ) { bSwitchToUCS2 = bSet; }
- BOOL IsSwitchToUCS2() const { return bSwitchToUCS2; }
+ void SetSwitchToUCS2( sal_Bool bSet ) { bSwitchToUCS2 = bSet; }
+ sal_Bool IsSwitchToUCS2() const { return bSwitchToUCS2; }
// Aus wie vielen Bytes betseht ein Zeichen
- inline USHORT GetCharSize() const;
+ inline sal_uInt16 GetCharSize() const;
int GetSaveToken() const;
@@ -176,8 +176,8 @@ public:
// 'pWhichIds' von Which-Ids. Es hat die Lange 'nWhichIds'.
// Die Which-Map wird nicht geloescht.
static void BuildWhichTbl( SvUShorts &rWhichMap,
- USHORT *pWhichIds,
- USHORT nWhichIds );
+ sal_uInt16 *pWhichIds,
+ sal_uInt16 nWhichIds );
};
@@ -189,16 +189,16 @@ SV_IMPL_REF(SvParser)
-inline ULONG SvParser::SetLineNr( ULONG nlNum )
-{ ULONG nlOld = nlLineNr; nlLineNr = nlNum; return nlOld; }
+inline sal_uLong SvParser::SetLineNr( sal_uLong nlNum )
+{ sal_uLong nlOld = nlLineNr; nlLineNr = nlNum; return nlOld; }
-inline ULONG SvParser::SetLinePos( ULONG nlPos )
-{ ULONG nlOld = nlLinePos; nlLinePos = nlPos; return nlOld; }
+inline sal_uLong SvParser::SetLinePos( sal_uLong nlPos )
+{ sal_uLong nlOld = nlLinePos; nlLinePos = nlPos; return nlOld; }
-inline BYTE SvParser::GetStackPos() const
+inline sal_uInt8 SvParser::GetStackPos() const
{ return nTokenStackPos; }
-inline USHORT SvParser::GetCharSize() const
+inline sal_uInt16 SvParser::GetCharSize() const
{
return (RTL_TEXTENCODING_UCS2 == eSrcEnc) ? 2 : 1;
}
@@ -263,7 +263,7 @@ class SVT_DLLPUBLIC SvKeyValueIterator : public SvRefBase,
/** Representation.
*/
SvKeyValueList_Impl* m_pList;
- USHORT m_nPos;
+ sal_uInt16 m_nPos;
public:
/** Construction/Destruction.
@@ -273,8 +273,8 @@ public:
/** Operation.
*/
- virtual BOOL GetFirst (SvKeyValue &rKeyVal);
- virtual BOOL GetNext (SvKeyValue &rKeyVal);
+ virtual sal_Bool GetFirst (SvKeyValue &rKeyVal);
+ virtual sal_Bool GetNext (SvKeyValue &rKeyVal);
virtual void Append (const SvKeyValue &rKeyVal);
};
diff --git a/svtools/inc/svtools/svtabbx.hxx b/svtools/inc/svtools/svtabbx.hxx
index 89fd92a4fc09..be891d69bbbc 100644
--- a/svtools/inc/svtools/svtabbx.hxx
+++ b/svtools/inc/svtools/svtabbx.hxx
@@ -47,10 +47,10 @@ enum SvTabJustify
struct TabListBoxEventData
{
SvLBoxEntry* m_pEntry;
- USHORT m_nColumn;
+ sal_uInt16 m_nColumn;
String m_sOldText;
- TabListBoxEventData( SvLBoxEntry* pEntry, USHORT nColumn, const String& rOldText ) :
+ TabListBoxEventData( SvLBoxEntry* pEntry, sal_uInt16 nColumn, const String& rOldText ) :
m_pEntry( pEntry ), m_nColumn( nColumn ), m_sOldText( rOldText ) {}
};
@@ -58,71 +58,71 @@ class SVT_DLLPUBLIC SvTabListBox : public SvTreeListBox
{
private:
SvLBoxTab* pTabList;
- USHORT nTabCount;
+ sal_uInt16 nTabCount;
XubString aCurEntry;
- ULONG nDummy1;
- ULONG nDummy2;
+ sal_uLong nDummy1;
+ sal_uLong nDummy2;
protected:
SvLBoxEntry* pViewParent;
- static const xub_Unicode* GetToken( const xub_Unicode* pPtr, USHORT& rLen );
+ static const xub_Unicode* GetToken( const xub_Unicode* pPtr, sal_uInt16& rLen );
virtual void SetTabs();
virtual void InitEntry( SvLBoxEntry*, const XubString&, const Image&, const Image&, SvLBoxButtonKind );
- String GetTabEntryText( ULONG nPos, USHORT nCol ) const;
- SvLBoxEntry* GetEntryOnPos( ULONG _nEntryPos ) const;
- SvLBoxEntry* GetChildOnPos( SvLBoxEntry* _pParent, ULONG _nEntryPos, ULONG& _rPos ) const;
+ String GetTabEntryText( sal_uLong nPos, sal_uInt16 nCol ) const;
+ SvLBoxEntry* GetEntryOnPos( sal_uLong _nEntryPos ) const;
+ SvLBoxEntry* GetChildOnPos( SvLBoxEntry* _pParent, sal_uLong _nEntryPos, sal_uLong& _rPos ) const;
public:
SvTabListBox( Window* pParent, WinBits = WB_BORDER );
SvTabListBox( Window* pParent, const ResId& );
~SvTabListBox();
void SetTabs( long* pTabs, MapUnit = MAP_APPFONT );
- USHORT TabCount() const { return (USHORT)nTabCount; }
+ sal_uInt16 TabCount() const { return (sal_uInt16)nTabCount; }
using SvTreeListBox::GetTab;
- long GetTab( USHORT nTab ) const;
- void SetTab( USHORT nTab, long nValue, MapUnit = MAP_APPFONT );
- long GetLogicTab( USHORT nTab );
+ long GetTab( sal_uInt16 nTab ) const;
+ void SetTab( sal_uInt16 nTab, long nValue, MapUnit = MAP_APPFONT );
+ long GetLogicTab( sal_uInt16 nTab );
virtual SvLBoxEntry* InsertEntry( const XubString& rText, SvLBoxEntry* pParent = 0,
- BOOL bChildsOnDemand = FALSE,
- ULONG nPos=LIST_APPEND, void* pUserData = 0,
+ sal_Bool bChildsOnDemand = sal_False,
+ sal_uLong nPos=LIST_APPEND, void* pUserData = 0,
SvLBoxButtonKind eButtonKind = SvLBoxButtonKind_enabledCheckbox );
virtual SvLBoxEntry* InsertEntry( const XubString& rText,
const Image& rExpandedEntryBmp,
const Image& rCollapsedEntryBmp,
SvLBoxEntry* pParent = 0,
- BOOL bChildsOnDemand = FALSE,
- ULONG nPos = LIST_APPEND, void* pUserData = 0,
+ sal_Bool bChildsOnDemand = sal_False,
+ sal_uLong nPos = LIST_APPEND, void* pUserData = 0,
SvLBoxButtonKind eButtonKind = SvLBoxButtonKind_enabledCheckbox );
- virtual SvLBoxEntry* InsertEntryToColumn( const XubString&, ULONG nPos = LIST_APPEND,
- USHORT nCol = 0xffff, void* pUserData = NULL );
+ virtual SvLBoxEntry* InsertEntryToColumn( const XubString&, sal_uLong nPos = LIST_APPEND,
+ sal_uInt16 nCol = 0xffff, void* pUserData = NULL );
virtual SvLBoxEntry* InsertEntryToColumn( const XubString&, SvLBoxEntry* pParent,
- ULONG nPos, USHORT nCol, void* pUserData = NULL );
+ sal_uLong nPos, sal_uInt16 nCol, void* pUserData = NULL );
virtual SvLBoxEntry* InsertEntryToColumn( const XubString&, const Image& rExpandedEntryBmp,
const Image& rCollapsedEntryBmp, SvLBoxEntry* pParent = NULL,
- ULONG nPos = LIST_APPEND, USHORT nCol = 0xffff, void* pUserData = NULL );
+ sal_uLong nPos = LIST_APPEND, sal_uInt16 nCol = 0xffff, void* pUserData = NULL );
virtual String GetEntryText( SvLBoxEntry* pEntry ) const;
- String GetEntryText( SvLBoxEntry*, USHORT nCol ) const;
- String GetEntryText( ULONG nPos, USHORT nCol = 0xffff ) const;
+ String GetEntryText( SvLBoxEntry*, sal_uInt16 nCol ) const;
+ String GetEntryText( sal_uLong nPos, sal_uInt16 nCol = 0xffff ) const;
using SvTreeListBox::SetEntryText;
- void SetEntryText( const XubString&, ULONG, USHORT nCol=0xffff );
- void SetEntryText(const XubString&,SvLBoxEntry*,USHORT nCol=0xffff);
- String GetCellText( ULONG nPos, USHORT nCol ) const;
- ULONG GetEntryPos( const XubString&, USHORT nCol = 0xffff );
- ULONG GetEntryPos( const SvLBoxEntry* pEntry ) const;
+ void SetEntryText( const XubString&, sal_uLong, sal_uInt16 nCol=0xffff );
+ void SetEntryText(const XubString&,SvLBoxEntry*,sal_uInt16 nCol=0xffff);
+ String GetCellText( sal_uLong nPos, sal_uInt16 nCol ) const;
+ sal_uLong GetEntryPos( const XubString&, sal_uInt16 nCol = 0xffff );
+ sal_uLong GetEntryPos( const SvLBoxEntry* pEntry ) const;
virtual void Resize();
- void SetTabJustify( USHORT nTab, SvTabJustify );
- SvTabJustify GetTabJustify( USHORT nTab ) const;
+ void SetTabJustify( sal_uInt16 nTab, SvTabJustify );
+ SvTabJustify GetTabJustify( sal_uInt16 nTab ) const;
};
-inline long SvTabListBox::GetTab( USHORT nTab ) const
+inline long SvTabListBox::GetTab( sal_uInt16 nTab ) const
{
DBG_ASSERT( nTab < nTabCount, "GetTabPos:Invalid Tab" );
return pTabList[nTab].GetPos();
@@ -160,17 +160,17 @@ public:
virtual void Paint( const Rectangle& );
void InitHeaderBar( HeaderBar* pHeaderBar );
- sal_Bool IsItemChecked( SvLBoxEntry* pEntry, USHORT nCol ) const;
+ sal_Bool IsItemChecked( SvLBoxEntry* pEntry, sal_uInt16 nCol ) const;
- virtual SvLBoxEntry* InsertEntryToColumn( const XubString&, ULONG nPos = LIST_APPEND,
- USHORT nCol = 0xffff, void* pUserData = NULL );
+ virtual SvLBoxEntry* InsertEntryToColumn( const XubString&, sal_uLong nPos = LIST_APPEND,
+ sal_uInt16 nCol = 0xffff, void* pUserData = NULL );
virtual SvLBoxEntry* InsertEntryToColumn( const XubString&, SvLBoxEntry* pParent,
- ULONG nPos, USHORT nCol, void* pUserData = NULL );
+ sal_uLong nPos, sal_uInt16 nCol, void* pUserData = NULL );
virtual SvLBoxEntry* InsertEntryToColumn( const XubString&, const Image& rExpandedEntryBmp,
const Image& rCollapsedEntryBmp, SvLBoxEntry* pParent = NULL,
- ULONG nPos = LIST_APPEND, USHORT nCol = 0xffff, void* pUserData = NULL );
- virtual ULONG Insert( SvLBoxEntry* pEnt,SvLBoxEntry* pPar,ULONG nPos=LIST_APPEND);
- virtual ULONG Insert( SvLBoxEntry* pEntry, ULONG nRootPos = LIST_APPEND );
+ sal_uLong nPos = LIST_APPEND, sal_uInt16 nCol = 0xffff, void* pUserData = NULL );
+ virtual sal_uLong Insert( SvLBoxEntry* pEnt,SvLBoxEntry* pPar,sal_uLong nPos=LIST_APPEND);
+ virtual sal_uLong Insert( SvLBoxEntry* pEntry, sal_uLong nRootPos = LIST_APPEND );
void RemoveEntry( SvLBoxEntry* _pEntry );
void Clear();
@@ -207,8 +207,8 @@ public:
virtual void SetNoSelection();
using SvListView::SelectAll;
virtual void SelectAll();
- virtual void SelectAll( BOOL bSelect, BOOL bPaint = TRUE );
- virtual void SelectRow( long _nRow, BOOL _bSelect = TRUE, BOOL bExpand = TRUE );
+ virtual void SelectAll( sal_Bool bSelect, sal_Bool bPaint = sal_True );
+ virtual void SelectRow( long _nRow, sal_Bool _bSelect = sal_True, sal_Bool bExpand = sal_True );
virtual void SelectColumn( sal_uInt16 _nColumn, sal_Bool _bSelect = sal_True );
virtual sal_Int32 GetSelectedRowCount() const;
virtual sal_Int32 GetSelectedColumnCount() const;
@@ -220,11 +220,11 @@ public:
/** @return <TRUE/>, if the cell is visible. */
virtual sal_Bool IsCellVisible( sal_Int32 _nRow, sal_uInt16 _nColumn ) const;
- virtual String GetAccessibleCellText( long _nRow, USHORT _nColumnPos ) const;
+ virtual String GetAccessibleCellText( long _nRow, sal_uInt16 _nColumnPos ) const;
- virtual Rectangle calcHeaderRect( sal_Bool _bIsColumnBar, BOOL _bOnScreen = TRUE );
- virtual Rectangle calcTableRect( BOOL _bOnScreen = TRUE );
- virtual Rectangle GetFieldRectPixelAbs( sal_Int32 _nRow, sal_uInt16 _nColumn, BOOL _bIsHeader, BOOL _bOnScreen = TRUE );
+ virtual Rectangle calcHeaderRect( sal_Bool _bIsColumnBar, sal_Bool _bOnScreen = sal_True );
+ virtual Rectangle calcTableRect( sal_Bool _bOnScreen = sal_True );
+ virtual Rectangle GetFieldRectPixelAbs( sal_Int32 _nRow, sal_uInt16 _nColumn, sal_Bool _bIsHeader, sal_Bool _bOnScreen = sal_True );
virtual XACC CreateAccessibleCell( sal_Int32 _nRow, sal_uInt16 _nColumn );
virtual XACC CreateAccessibleRowHeader( sal_Int32 _nRow );
@@ -248,12 +248,12 @@ public:
virtual void GrabTableFocus();
// OutputDevice
- virtual BOOL GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector );
+ virtual sal_Bool GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector );
// Window
virtual Rectangle GetWindowExtentsRelative( Window *pRelativeWindow ) const;
virtual void GrabFocus();
- virtual XACC GetAccessible( BOOL bCreate = TRUE );
+ virtual XACC GetAccessible( sal_Bool bCreate = sal_True );
virtual Window* GetAccessibleParentWindow() const;
/** Creates and returns the accessible object of the whole BrowseBox. */
diff --git a/svtools/inc/svtools/svtdata.hxx b/svtools/inc/svtools/svtdata.hxx
index ad7b60b3f2b7..d2012f067e38 100644
--- a/svtools/inc/svtools/svtdata.hxx
+++ b/svtools/inc/svtools/svtdata.hxx
@@ -60,8 +60,8 @@ public:
class SVT_DLLPUBLIC SvtResId: public ResId
{
public:
- SvtResId(USHORT nId, const ::com::sun::star::lang::Locale aLocale);
- SvtResId(USHORT nId);
+ SvtResId(sal_uInt16 nId, const ::com::sun::star::lang::Locale aLocale);
+ SvtResId(sal_uInt16 nId);
// VCL dependant, only available in SVT, not in SVL!
};
diff --git a/svtools/inc/svtools/svtools.hrc b/svtools/inc/svtools/svtools.hrc
index 0461064f7d96..b4bf84532b26 100644
--- a/svtools/inc/svtools/svtools.hrc
+++ b/svtools/inc/svtools/svtools.hrc
@@ -35,6 +35,9 @@
#define RID_SVTOOLS_BITMAP_START (RID_SVTOOLS_START + 0)
#define RID_SVTOOLS_IMAGELIST_START (RID_SVTOOLS_START + 0)
+#define ABOUT_STR_COPYRIGHT (RID_SVTOOLS_START + 1)
+#define ABOUT_STR_DEVELOPER_ARY (RID_SVTOOLS_START + 2)
+
//.............................................................................
// various unsorted stuff
diff --git a/svtools/inc/svtools/svtreebx.hxx b/svtools/inc/svtools/svtreebx.hxx
index 79402cb13f23..7705050bc3ca 100644
--- a/svtools/inc/svtools/svtreebx.hxx
+++ b/svtools/inc/svtools/svtreebx.hxx
@@ -70,12 +70,12 @@ class SVT_DLLPUBLIC SvTreeListBox : public SvLBox
Image aCurInsertedColBmp;
short nContextBmpWidthMax;
- USHORT nFirstSelTab, nLastSelTab;
+ sal_uInt16 nFirstSelTab, nLastSelTab;
short nEntryHeight;
short nEntryHeightOffs;
short nIndent;
short nFocusWidth;
- USHORT aContextBmpMode;
+ sal_uInt16 aContextBmpMode;
#ifdef _SVTREEBX_CXX
DECL_DLLPRIVATE_LINK( CheckButtonClick, SvLBoxButtonData * );
@@ -89,19 +89,19 @@ class SVT_DLLPUBLIC SvTreeListBox : public SvLBox
SVT_DLLPRIVATE void ImpEntryInserted( SvLBoxEntry* pEntry );
SVT_DLLPRIVATE long PaintEntry1( SvLBoxEntry*, long nLine,
- USHORT nTabFlagMask=0xffff,
- BOOL bHasClipRegion=FALSE );
+ sal_uInt16 nTabFlagMask=0xffff,
+ sal_Bool bHasClipRegion=sal_False );
SVT_DLLPRIVATE void InitTreeView();
SVT_DLLPRIVATE SvLBoxItem* GetItem_Impl( SvLBoxEntry*, long nX, SvLBoxTab** ppTab,
- USHORT nEmptyWidth );
+ sal_uInt16 nEmptyWidth );
SVT_DLLPRIVATE void ImplInitStyle();
#endif
protected:
SvLBoxButtonData* pCheckButtonData;
- USHORT nTreeFlags;
+ sal_uInt16 nTreeFlags;
SvLBoxEntry* pEdEntry;
SvLBoxItem* pEdItem;
@@ -119,13 +119,13 @@ protected:
// Bitmaps, beim Wechsel des Models usw. automatisch gerufen
virtual void SetTabs();
void SetTabs_Impl();
- void AddTab( long nPos,USHORT nFlags=SV_LBOXTAB_ADJUST_LEFT,
+ void AddTab( long nPos,sal_uInt16 nFlags=SV_LBOXTAB_ADJUST_LEFT,
void* pUserData = 0 );
- USHORT TabCount() const { return aTabs.Count(); }
+ sal_uInt16 TabCount() const { return aTabs.Count(); }
SvLBoxTab* GetFirstDynamicTab() const;
- SvLBoxTab* GetFirstDynamicTab( USHORT& rTabPos ) const;
- SvLBoxTab* GetFirstTab( USHORT nFlagMask, USHORT& rTabPos );
- SvLBoxTab* GetLastTab( USHORT nFlagMask, USHORT& rTabPos );
+ SvLBoxTab* GetFirstDynamicTab( sal_uInt16& rTabPos ) const;
+ SvLBoxTab* GetFirstTab( sal_uInt16 nFlagMask, sal_uInt16& rTabPos );
+ SvLBoxTab* GetLastTab( sal_uInt16 nFlagMask, sal_uInt16& rTabPos );
SvLBoxTab* GetTab( SvLBoxEntry*, SvLBoxItem* ) const;
void ClearTabList();
@@ -145,8 +145,8 @@ protected:
// in das Control hineingezeichnet werden
virtual void NotifyInvalidating();
- virtual ULONG GetAscInsertionPos( SvLBoxEntry*, SvLBoxEntry* pParent );
- virtual ULONG GetDescInsertionPos( SvLBoxEntry*, SvLBoxEntry* pParent );
+ virtual sal_uLong GetAscInsertionPos( SvLBoxEntry*, SvLBoxEntry* pParent );
+ virtual sal_uLong GetDescInsertionPos( SvLBoxEntry*, SvLBoxEntry* pParent );
virtual void Command( const CommandEvent& rCEvt );
virtual void RequestHelp( const HelpEvent& rHEvt );
@@ -155,11 +155,11 @@ protected:
virtual void DataChanged( const DataChangedEvent& rDCEvt );
virtual void StateChanged( StateChangedType nStateChange );
- void InitSettings(BOOL bFont,BOOL bForeground,BOOL bBackground);
- BOOL IsCellFocusEnabled() const;
- bool SetCurrentTabPos( USHORT _nNewPos );
- USHORT GetCurrentTabPos() const;
- void CallImplEventListeners(ULONG nEvent, void* pData);
+ void InitSettings(sal_Bool bFont,sal_Bool bForeground,sal_Bool bBackground);
+ sal_Bool IsCellFocusEnabled() const;
+ bool SetCurrentTabPos( sal_uInt16 _nNewPos );
+ sal_uInt16 GetCurrentTabPos() const;
+ void CallImplEventListeners(sal_uLong nEvent, void* pData);
void ImplEditEntry( SvLBoxEntry* pEntry );
@@ -200,16 +200,16 @@ public:
}
virtual SvLBoxEntry* InsertEntry( const XubString& rText, SvLBoxEntry* pParent = 0,
- BOOL bChildsOnDemand = FALSE,
- ULONG nPos=LIST_APPEND, void* pUserData = 0,
+ sal_Bool bChildsOnDemand = sal_False,
+ sal_uLong nPos=LIST_APPEND, void* pUserData = 0,
SvLBoxButtonKind eButtonKind = SvLBoxButtonKind_enabledCheckbox );
virtual SvLBoxEntry* InsertEntry( const XubString& rText,
const Image& rExpandedEntryBmp,
const Image& rCollapsedEntryBmp,
SvLBoxEntry* pParent = 0,
- BOOL bChildsOnDemand = FALSE,
- ULONG nPos = LIST_APPEND, void* pUserData = 0,
+ sal_Bool bChildsOnDemand = sal_False,
+ sal_uLong nPos = LIST_APPEND, void* pUserData = 0,
SvLBoxButtonKind eButtonKind = SvLBoxButtonKind_enabledCheckbox );
const Image& GetDefaultExpandedEntryBmp( BmpColorMode _eMode = BMP_COLOR_NORMAL ) const;
@@ -221,8 +221,8 @@ public:
void SetCheckButtonState( SvLBoxEntry*, SvButtonState );
SvButtonState GetCheckButtonState( SvLBoxEntry* ) const;
- void ShowExpandBitmapOnCursor( BOOL );
- BOOL IsExpandBitmapOnCursor() const { return (BOOL)(aContextBmpMode & SVLISTENTRYFLAG_FOCUSED)!=0; }
+ void ShowExpandBitmapOnCursor( sal_Bool );
+ sal_Bool IsExpandBitmapOnCursor() const { return (sal_Bool)(aContextBmpMode & SVLISTENTRYFLAG_FOCUSED)!=0; }
void SetEntryText(SvLBoxEntry*, const XubString& );
void SetExpandedEntryBmp( SvLBoxEntry* _pEntry, const Image& _rImage, BmpColorMode _eMode = BMP_COLOR_NORMAL );
@@ -239,24 +239,24 @@ public:
virtual SvLBoxEntry* CloneEntry( SvLBoxEntry* pSource );
- virtual USHORT IsA();
+ virtual sal_uInt16 IsA();
- void SetSublistOpenWithReturn( BOOL bMode = TRUE ); // open/close sublist with return/enter
- BOOL IsSublistOpenWithReturn() const;
- void SetSublistOpenWithLeftRight( BOOL bMode = TRUE ); // open/close sublist with cursor left/right
- BOOL IsSublistOpenWithLeftRight() const;
+ void SetSublistOpenWithReturn( sal_Bool bMode = sal_True ); // open/close sublist with return/enter
+ sal_Bool IsSublistOpenWithReturn() const;
+ void SetSublistOpenWithLeftRight( sal_Bool bMode = sal_True ); // open/close sublist with cursor left/right
+ sal_Bool IsSublistOpenWithLeftRight() const;
- void EnableInplaceEditing( BOOL bEnable );
- BOOL IsInplaceEditingEnabled() const { return SvLBox::IsInplaceEditingEnabled(); }
+ void EnableInplaceEditing( sal_Bool bEnable );
+ sal_Bool IsInplaceEditingEnabled() const { return SvLBox::IsInplaceEditingEnabled(); }
inline void ForbidEmptyText() { SvLBox::ForbidEmptyText(); }
// Editiert das erste StringItem des Entries, 0==Cursor
void EditEntry( SvLBoxEntry* pEntry = NULL );
void CancelEditing();
- virtual BOOL EditingEntry( SvLBoxEntry* pEntry, Selection& );
- virtual BOOL EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText );
- BOOL IsEditingActive() const { return SvLBox::IsEditingActive(); }
- void EndEditing( BOOL bCancel = FALSE ) { SvLBox::EndEditing( bCancel ); }
- BOOL EditingCanceled() const { return SvLBox::EditingCanceled(); }
+ virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& );
+ virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText );
+ sal_Bool IsEditingActive() const { return SvLBox::IsEditingActive(); }
+ void EndEditing( sal_Bool bCancel = sal_False ) { SvLBox::EndEditing( bCancel ); }
+ sal_Bool EditingCanceled() const { return SvLBox::EditingCanceled(); }
virtual void RequestingChilds( SvLBoxEntry* pParent );
@@ -268,9 +268,9 @@ public:
virtual void Resize();
virtual void GetFocus();
virtual void LoseFocus();
- void SetUpdateMode( BOOL );
+ void SetUpdateMode( sal_Bool );
// aktualisiert nicht die vertikale ScrollBar
- void SetUpdateModeFast( BOOL );
+ void SetUpdateModeFast( sal_Bool );
using SvListView::SetModel;
void SetModel( SvLBoxTreeList* );
@@ -278,19 +278,19 @@ public:
virtual void ModelHasInserted( SvListEntry* pEntry );
virtual void ModelHasInsertedTree( SvListEntry* pEntry );
virtual void ModelIsMoving(SvListEntry* pSource,
- SvListEntry* pTargetParent, ULONG nChildPos );
+ SvListEntry* pTargetParent, sal_uLong nChildPos );
virtual void ModelHasMoved(SvListEntry* pSource );
virtual void ModelIsRemoving( SvListEntry* pEntry );
virtual void ModelHasRemoved( SvListEntry* pEntry );
virtual void ModelHasEntryInvalidated( SvListEntry* pEntry );
- void ShowTargetEmphasis( SvLBoxEntry*, BOOL bShow );
+ void ShowTargetEmphasis( SvLBoxEntry*, sal_Bool bShow );
using Window::GetDropTarget;
SvLBoxEntry* GetDropTarget( const Point& );
void ScrollOutputArea( short nDeltaEntries );
short GetEntryHeight() const { return nEntryHeight; }
- void SetEntryHeight( short nHeight, BOOL bAlways = FALSE );
+ void SetEntryHeight( short nHeight, sal_Bool bAlways = sal_False );
Size GetOutputSizePixel() const;
short GetIndent() const { return nIndent; }
void SetIndent( short nIndent );
@@ -299,7 +299,7 @@ public:
Point GetEntryPosition( SvLBoxEntry* ) const;
void ShowEntry( SvLBoxEntry* ); // !!!OBSOLETE, use MakeVisible
virtual void MakeVisible( SvLBoxEntry* );
- void MakeVisible( SvLBoxEntry*, BOOL bMoveToTop );
+ void MakeVisible( SvLBoxEntry*, sal_Bool bMoveToTop );
void SetCollapsedNodeBmp( const Image&, BmpColorMode _eMode = BMP_COLOR_NORMAL );
void SetExpandedNodeBmp( const Image&, BmpColorMode _eMode = BMP_COLOR_NORMAL );
@@ -309,15 +309,15 @@ public:
void SetFont( const Font& rFont );
using Window::SetCursor;
- void SetCursor( SvLBoxEntry* pEntry, BOOL bForceNoSelect = FALSE );
+ void SetCursor( SvLBoxEntry* pEntry, sal_Bool bForceNoSelect = sal_False );
- SvLBoxEntry* GetEntry( const Point& rPos, BOOL bHit = FALSE ) const;
- SvLBoxEntry* GetEntry( SvLBoxEntry* pParent, ULONG nPos ) const { return SvLBox::GetEntry(pParent,nPos); }
- SvLBoxEntry* GetEntry( ULONG nRootPos ) const { return SvLBox::GetEntry(nRootPos);}
+ SvLBoxEntry* GetEntry( const Point& rPos, sal_Bool bHit = sal_False ) const;
+ SvLBoxEntry* GetEntry( SvLBoxEntry* pParent, sal_uLong nPos ) const { return SvLBox::GetEntry(pParent,nPos); }
+ SvLBoxEntry* GetEntry( sal_uLong nRootPos ) const { return SvLBox::GetEntry(nRootPos);}
void PaintEntry( SvLBoxEntry* );
long PaintEntry( SvLBoxEntry*, long nLine,
- USHORT nTabFlagMask=0xffff );
+ sal_uInt16 nTabFlagMask=0xffff );
virtual Rectangle GetFocusRect( SvLBoxEntry*, long nLine );
// Beruecksichtigt Einrueckung
virtual long GetTabPos( SvLBoxEntry*, SvLBoxTab* );
@@ -328,23 +328,23 @@ public:
void SetDragDropMode( DragDropMode );
void SetSelectionMode( SelectionMode );
- void SetAddMode( BOOL bAdd );
- BOOL IsAddMode() const;
-
- virtual BOOL Expand( SvLBoxEntry* pParent );
- virtual BOOL Collapse( SvLBoxEntry* pParent );
- virtual BOOL Select( SvLBoxEntry* pEntry, BOOL bSelect=TRUE );
- virtual ULONG SelectChilds( SvLBoxEntry* pParent, BOOL bSelect );
- virtual void SelectAll( BOOL bSelect, BOOL bPaint = TRUE );
+ void SetAddMode( sal_Bool bAdd );
+ sal_Bool IsAddMode() const;
+
+ virtual sal_Bool Expand( SvLBoxEntry* pParent );
+ virtual sal_Bool Collapse( SvLBoxEntry* pParent );
+ virtual sal_Bool Select( SvLBoxEntry* pEntry, sal_Bool bSelect=sal_True );
+ virtual sal_uLong SelectChilds( SvLBoxEntry* pParent, sal_Bool bSelect );
+ virtual void SelectAll( sal_Bool bSelect, sal_Bool bPaint = sal_True );
virtual void SetCurEntry( SvLBoxEntry* _pEntry );
virtual SvLBoxEntry*
GetCurEntry() const;
using Window::Invalidate;
- virtual void Invalidate( USHORT nFlags = 0);
- virtual void Invalidate( const Rectangle&, USHORT nFlags = 0 );
+ virtual void Invalidate( sal_uInt16 nFlags = 0);
+ virtual void Invalidate( const Rectangle&, sal_uInt16 nFlags = 0 );
- void SetHighlightRange(USHORT nFirstTab=0,USHORT nLastTab=0xffff);
+ void SetHighlightRange(sal_uInt16 nFirstTab=0,sal_uInt16 nLastTab=0xffff);
void RemoveHighlightRange();
virtual Region GetDragRegion() const;
@@ -353,16 +353,16 @@ public:
void RemoveParentKeepChilds( SvLBoxEntry* pParent );
DECL_LINK( DefaultCompare, SvSortData* );
- virtual void ModelNotification( USHORT nActionId, SvListEntry* pEntry1,
- SvListEntry* pEntry2, ULONG nPos );
+ virtual void ModelNotification( sal_uInt16 nActionId, SvListEntry* pEntry1,
+ SvListEntry* pEntry2, sal_uLong nPos );
long GetTextOffset() const;
void EndSelection();
- BOOL IsNodeButton( const Point& rPos ) const;
+ sal_Bool IsNodeButton( const Point& rPos ) const;
void RepaintScrollBars() const;
ScrollBar* GetVScroll();
ScrollBar* GetHScroll();
- void EnableAsyncDrag( BOOL b );
+ void EnableAsyncDrag( sal_Bool b );
SvLBoxEntry* GetFirstEntryInView() const;
SvLBoxEntry* GetNextEntryInView(SvLBoxEntry*) const;
@@ -375,11 +375,11 @@ public:
void CancelPendingEdit();
virtual PopupMenu* CreateContextMenu( void );
- virtual void ExcecuteContextMenuAction( USHORT nSelectedPopupEntry );
+ virtual void ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry );
void EnableContextMenuHandling( void );
- void EnableContextMenuHandling( BOOL bEnable );
- BOOL IsContextMenuHandlingEnabled( void ) const;
+ void EnableContextMenuHandling( sal_Bool bEnable );
+ sal_Bool IsContextMenuHandlingEnabled( void ) const;
void EnableList( bool _bEnable );
diff --git a/svtools/inc/svtools/svxbox.hxx b/svtools/inc/svtools/svxbox.hxx
index a4a920e692be..5697f39a4ca7 100644
--- a/svtools/inc/svtools/svxbox.hxx
+++ b/svtools/inc/svtools/svxbox.hxx
@@ -50,16 +50,16 @@ class SVT_DLLPUBLIC SvxBoxEntry
friend class SvxComboBox;
public:
- SvxBoxEntry( const String& aName, USHORT nId=0 );
+ SvxBoxEntry( const String& aName, sal_uInt16 nId=0 );
SvxBoxEntry( const SvxBoxEntry& rOrg );
SvxBoxEntry();
String aName;
- USHORT nId;
+ sal_uInt16 nId;
private:
- BOOL bModified;
- BOOL bNew;
+ sal_Bool bModified;
+ sal_Bool bNew;
};
// class SvxListBox ------------------------------------------------------
@@ -79,30 +79,30 @@ public:
void InsertNewEntry( const SvxBoxEntry& rEntry );
void InsertEntry( const SvxBoxEntry& rEntry,
- USHORT nId = LISTBOX_ENTRY_NOTFOUND );
+ sal_uInt16 nId = LISTBOX_ENTRY_NOTFOUND );
- void RemoveEntry( USHORT nPos );
+ void RemoveEntry( sal_uInt16 nPos );
void RemoveEntry( const SvxBoxEntry& rEntry );
void Clear();
- USHORT GetEntryPos( const SvxBoxEntry& rEntry ) const;
- const SvxBoxEntry& GetSvxBoxEntry( USHORT nIdx ) const;
+ sal_uInt16 GetEntryPos( const SvxBoxEntry& rEntry ) const;
+ const SvxBoxEntry& GetSvxBoxEntry( sal_uInt16 nIdx ) const;
- inline BOOL IsEntrySelected( const SvxBoxEntry& rEntry ) const;
- const SvxBoxEntry& GetSelectSvxBoxEntry( USHORT nIdx = 0 ) const;
+ inline sal_Bool IsEntrySelected( const SvxBoxEntry& rEntry ) const;
+ const SvxBoxEntry& GetSelectSvxBoxEntry( sal_uInt16 nIdx = 0 ) const;
inline void SelectEntry( const SvxBoxEntry& rEntry,
- BOOL bSelect = TRUE );
+ sal_Bool bSelect = sal_True );
- void ModifyEntry( USHORT nPos, const String& aName );
- USHORT GetModifiedCount() const;
- const SvxBoxEntry& GetModifiedEntry( USHORT nPos ) const;
+ void ModifyEntry( sal_uInt16 nPos, const String& aName );
+ sal_uInt16 GetModifiedCount() const;
+ const SvxBoxEntry& GetModifiedEntry( sal_uInt16 nPos ) const;
- USHORT GetRemovedCount() const;
- const SvxBoxEntry& GetRemovedEntry( USHORT nPos ) const;
+ sal_uInt16 GetRemovedCount() const;
+ const SvxBoxEntry& GetRemovedEntry( sal_uInt16 nPos ) const;
- USHORT GetNewCount() const;
- const SvxBoxEntry& GetNewEntry( USHORT nPos ) const;
+ sal_uInt16 GetNewCount() const;
+ const SvxBoxEntry& GetNewEntry( sal_uInt16 nPos ) const;
private:
SvxEntryLst aEntryLst;
@@ -115,10 +115,10 @@ private:
// inlines ---------------------------------------------------------------
-inline BOOL SvxListBox::IsEntrySelected( const SvxBoxEntry& aEntry ) const
+inline sal_Bool SvxListBox::IsEntrySelected( const SvxBoxEntry& aEntry ) const
{ return ListBox::IsEntrySelected( aEntry.aName ); }
-inline void SvxListBox::SelectEntry( const SvxBoxEntry& aEntry, BOOL bSelect )
+inline void SvxListBox::SelectEntry( const SvxBoxEntry& aEntry, sal_Bool bSelect )
{ ListBox::SelectEntry( aEntry.aName, bSelect ); }
// enum SvxComboBoxStyle -------------------------------------------------
@@ -143,33 +143,33 @@ class SVT_DLLPUBLIC SvxComboBox : public ComboBox
public:
SvxComboBox( Window* pParent,
- WinBits nBits = WB_BORDER, USHORT nStyleBits = SVX_CBS_ALL );
- SvxComboBox( Window* pParent, const ResId& rId, USHORT nStyleBits = SVX_CBS_ALL );
+ WinBits nBits = WB_BORDER, sal_uInt16 nStyleBits = SVX_CBS_ALL );
+ SvxComboBox( Window* pParent, const ResId& rId, sal_uInt16 nStyleBits = SVX_CBS_ALL );
~SvxComboBox();
void InsertNewEntry( const SvxBoxEntry& );
void InsertEntry( const SvxBoxEntry& );
- void RemoveEntry( USHORT nPos );
+ void RemoveEntry( sal_uInt16 nPos );
void RemoveEntry( const SvxBoxEntry& rEntry );
void Clear();
- USHORT GetEntryPos( const SvxBoxEntry& rEntry ) const;
- const SvxBoxEntry& GetEntry( USHORT nIdx ) const;
+ sal_uInt16 GetEntryPos( const SvxBoxEntry& rEntry ) const;
+ const SvxBoxEntry& GetEntry( sal_uInt16 nIdx ) const;
- void ModifyEntry( USHORT nPos, const String& aName );
- USHORT GetModifiedCount() const;
- const SvxBoxEntry& GetModifiedEntry( USHORT nPos ) const;
+ void ModifyEntry( sal_uInt16 nPos, const String& aName );
+ sal_uInt16 GetModifiedCount() const;
+ const SvxBoxEntry& GetModifiedEntry( sal_uInt16 nPos ) const;
- USHORT GetRemovedCount() const;
- const SvxBoxEntry& GetRemovedEntry( USHORT nPos ) const;
+ sal_uInt16 GetRemovedCount() const;
+ const SvxBoxEntry& GetRemovedEntry( sal_uInt16 nPos ) const;
- USHORT GetNewCount() const;
- const SvxBoxEntry& GetNewEntry( USHORT nPos ) const;
+ sal_uInt16 GetNewCount() const;
+ const SvxBoxEntry& GetNewEntry( sal_uInt16 nPos ) const;
- USHORT GetStyle() const { return nStyle; }
- void SetStyle( const USHORT nSt ) { nStyle = nSt; }
+ sal_uInt16 GetStyle() const { return nStyle; }
+ void SetStyle( const sal_uInt16 nSt ) { nStyle = nSt; }
String GetText() const;
@@ -177,7 +177,7 @@ private:
SvxEntryLst aEntryLst;
SvxEntryLst aDelEntryLst;
SvxBoxEntry aDefault;
- USHORT nStyle;
+ sal_uInt16 nStyle;
virtual void KeyInput( const KeyEvent& rKEvt );
diff --git a/svtools/inc/svtools/sychconv.hxx b/svtools/inc/svtools/sychconv.hxx
index 4056556a2100..c5ab6d78059c 100644
--- a/svtools/inc/svtools/sychconv.hxx
+++ b/svtools/inc/svtools/sychconv.hxx
@@ -41,7 +41,7 @@ class SymCharConverter
{
public:
- static BOOL Convert( Font& rFont, UniString& rString, OutputDevice* pDev = NULL );
+ static sal_Bool Convert( Font& rFont, UniString& rString, OutputDevice* pDev = NULL );
};
#endif // _CHARCONV_HXX
diff --git a/svtools/inc/svtools/syntaxhighlight.hxx b/svtools/inc/svtools/syntaxhighlight.hxx
index e406c33fc54f..5539e97b7a4d 100644
--- a/svtools/inc/svtools/syntaxhighlight.hxx
+++ b/svtools/inc/svtools/syntaxhighlight.hxx
@@ -74,7 +74,7 @@ enum TokenTypes
TT_PARAMETER
};
-struct HighlightPortion { UINT16 nBegin; UINT16 nEnd; TokenTypes tokenType; };
+struct HighlightPortion { sal_uInt16 nBegin; sal_uInt16 nEnd; TokenTypes tokenType; };
typedef std::vector<HighlightPortion> HighlightPortions;
@@ -110,23 +110,23 @@ class SimpleTokenizer_Impl
{
HighlighterLanguage aLanguage;
// Zeichen-Info-Tabelle
- USHORT aCharTypeTab[256];
+ sal_uInt16 aCharTypeTab[256];
const sal_Unicode* mpStringBegin;
const sal_Unicode* mpActualPos;
// Zeile und Spalte
- UINT32 nLine;
- UINT32 nCol;
+ sal_uInt32 nLine;
+ sal_uInt32 nCol;
sal_Unicode peekChar( void ) { return *mpActualPos; }
sal_Unicode getChar( void ) { nCol++; return *mpActualPos++; }
// Hilfsfunktion: Zeichen-Flag Testen
- BOOL testCharFlags( sal_Unicode c, USHORT nTestFlags );
+ sal_Bool testCharFlags( sal_Unicode c, sal_uInt16 nTestFlags );
// Neues Token holen, Leerstring == nix mehr da
- BOOL getNextToken( /*out*/TokenTypes& reType,
+ sal_Bool getNextToken( /*out*/TokenTypes& reType,
/*out*/const sal_Unicode*& rpStartPos, /*out*/const sal_Unicode*& rpEndPos );
String getTokStr( /*out*/const sal_Unicode* pStartPos, /*out*/const sal_Unicode* pEndPos );
@@ -138,16 +138,16 @@ class SimpleTokenizer_Impl
#endif
const char** ppListKeyWords;
- UINT16 nKeyWordCount;
+ sal_uInt16 nKeyWordCount;
public:
SimpleTokenizer_Impl( HighlighterLanguage aLang = HIGHLIGHT_BASIC );
~SimpleTokenizer_Impl( void );
- UINT16 parseLine( UINT32 nLine, const String* aSource );
- void getHighlightPortions( UINT32 nParseLine, const String& rLine,
+ sal_uInt16 parseLine( sal_uInt32 nLine, const String* aSource );
+ void getHighlightPortions( sal_uInt32 nParseLine, const String& rLine,
/*out*/HighlightPortions& portions );
- void setKeyWords( const char** ppKeyWords, UINT16 nCount );
+ void setKeyWords( const char** ppKeyWords, sal_uInt16 nCount );
};
@@ -163,7 +163,7 @@ class SVT_DLLPUBLIC SyntaxHighlighter
HighlighterLanguage eLanguage;
SimpleTokenizer_Impl* m_pSimpleTokenizer;
char* m_pKeyWords;
- UINT16 m_nKeyWordCount;
+ sal_uInt16 m_nKeyWordCount;
// void initializeKeyWords( HighlighterLanguage eLanguage );
@@ -177,10 +177,10 @@ public:
// nur Zeile 0 angegeben werden.
void initialize( HighlighterLanguage eLanguage_ );
- const Range notifyChange( UINT32 nLine, INT32 nLineCountDifference,
- const String* pChangedLines, UINT32 nArrayLength);
+ const Range notifyChange( sal_uInt32 nLine, sal_Int32 nLineCountDifference,
+ const String* pChangedLines, sal_uInt32 nArrayLength);
- void getHighlightPortions( UINT32 nLine, const String& rLine,
+ void getHighlightPortions( sal_uInt32 nLine, const String& rLine,
HighlightPortions& pPortions );
HighlighterLanguage GetLanguage() { return eLanguage;}
diff --git a/svtools/inc/svtools/tabbar.hxx b/svtools/inc/svtools/tabbar.hxx
index 2757811ba34e..cab942b452b6 100644
--- a/svtools/inc/svtools/tabbar.hxx
+++ b/svtools/inc/svtools/tabbar.hxx
@@ -86,10 +86,10 @@ DoubleClick - Wird gerufen, wenn ein DoubleClick im TabBar ausgeloest
ActivatePage - Wird gerufen, wenn eine andere Seite aktiviert wird.
GetCurPageId() gibt die aktivierte Seite zurueck.
DeactivatePage - Wird gerufen, wenn eine Seite deaktiviert wird. Wenn
- eine andere Seite aktiviert werden darf, muss TRUE
+ eine andere Seite aktiviert werden darf, muss sal_True
zurueckgegeben werden, wenn eine andere Seite von
der Aktivierung ausgeschlossen werden soll, muss
- FALSE zurueckgegeben werden. GetCurPageId() gibt die
+ sal_False zurueckgegeben werden. GetCurPageId() gibt die
zu deaktivierende Seite zurueck.
@@ -104,7 +104,7 @@ werden. Dabei muss in den Handlern folgendes implementiert werden:
Command - Wenn in diesem Handler das Dragging gestartet werden
soll, muss StartDrag() gerufen werden. Diese Methode
selektiert dann den entsprechenden Eintrag oder gibt
- FALSE zurueck, wenn das Dragging nicht durchgefuhert
+ sal_False zurueck, wenn das Dragging nicht durchgefuhert
werden kann.
QueryDrop - Dieser Handler wird von StarView immer dann gerufen, wenn
@@ -162,7 +162,7 @@ SwitchPage - Diese Methode muss vom QueryDrop-Handler gerufen werden,
Das umschalten der Seite passiert zeitverzoegert (500 ms)
und wird automatisch von dieser Methode verwaltet.
In der Methode muss die Position vom Event uebergeben
- werden. Diese Methode gibt TRUE zurueck, wenn die Page
+ werden. Diese Methode gibt sal_True zurueck, wenn die Page
umgeschaltet wurde.
EndSwitchPage - Diese Methode setzt die Daten fuer das umschalten der
@@ -223,7 +223,7 @@ EnableEditMode - Damit kann eingestellt werden, das bei Alt+LeftClick
Im StartRenaming()-Handler kann dann das Umbenennen
noch abgelehnt werden.
StartEditMode - Mit dieser Methode wird der EditModus auf einem
- Tab gestartet. FALSE wird zurueckgegeben, wenn
+ Tab gestartet. sal_False wird zurueckgegeben, wenn
der Editmodus schon aktiv ist, mit StartRenaming()
der Modus abgelehnt wurde oder kein Platz zum
Editieren vorhanden ist.
@@ -244,7 +244,7 @@ GetEditPageId - Mit dieser Methode wird in den Renaming-Handlern
StartRenaming() - Dieser Handler wird gerufen, wenn ueber StartEditMode()
der Editmodus gestartet wurde. Mit GetEditPageId()
kann abgefragt werden, welcher Tab umbenannt werden
- soll. FALSE sollte zurueckgegeben werden, wenn
+ soll. sal_False sollte zurueckgegeben werden, wenn
der Editmodus nicht gestartet werden soll.
AllowRenaming() - Dieser Handler wird gerufen, wenn der Editmodus
beendet wird (nicht bei Cancel). In diesem Handler
@@ -308,7 +308,7 @@ ueber einem bzw. ueber welchem Item durchgefuehrt wurde.
// - TabBarPageBits -
// ------------------
-typedef USHORT TabBarPageBits;
+typedef sal_uInt16 TabBarPageBits;
// -------------------------
// - Bits fuer TabBarPages -
@@ -320,8 +320,8 @@ typedef USHORT TabBarPageBits;
// - TabBar-Types -
// ----------------
-#define TABBAR_RENAMING_YES ((long)TRUE)
-#define TABBAR_RENAMING_NO ((long)FALSE)
+#define TABBAR_RENAMING_YES ((long)sal_True)
+#define TABBAR_RENAMING_NO ((long)sal_False)
#define TABBAR_RENAMING_CANCEL ((long)2)
// ----------
@@ -352,25 +352,25 @@ private:
long mnOffY;
long mnLastOffX;
long mnSplitSize;
- ULONG mnSwitchTime;
+ sal_uLong mnSwitchTime;
WinBits mnWinStyle;
- USHORT mnCurPageId;
- USHORT mnFirstPos;
- USHORT mnDropPos;
- USHORT mnSwitchId;
- USHORT mnEditId;
- BOOL mbFormat;
- BOOL mbFirstFormat;
- BOOL mbSizeFormat;
- BOOL mbAutoMaxWidth;
- BOOL mbInSwitching;
- BOOL mbAutoEditMode;
- BOOL mbEditCanceled;
- BOOL mbDropPos;
- BOOL mbInSelect;
- BOOL mbSelColor;
- BOOL mbSelTextColor;
- BOOL mbMirrored;
+ sal_uInt16 mnCurPageId;
+ sal_uInt16 mnFirstPos;
+ sal_uInt16 mnDropPos;
+ sal_uInt16 mnSwitchId;
+ sal_uInt16 mnEditId;
+ sal_Bool mbFormat;
+ sal_Bool mbFirstFormat;
+ sal_Bool mbSizeFormat;
+ sal_Bool mbAutoMaxWidth;
+ sal_Bool mbInSwitching;
+ sal_Bool mbAutoEditMode;
+ sal_Bool mbEditCanceled;
+ sal_Bool mbDropPos;
+ sal_Bool mbInSelect;
+ sal_Bool mbSelColor;
+ sal_Bool mbSelTextColor;
+ sal_Bool mbMirrored;
Link maSelectHdl;
Link maDoubleClickHdl;
Link maSplitHdl;
@@ -382,13 +382,13 @@ private:
using Window::ImplInit;
SVT_DLLPRIVATE void ImplInit( WinBits nWinStyle );
- SVT_DLLPRIVATE void ImplInitSettings( BOOL bFont, BOOL bBackground );
+ SVT_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bBackground );
SVT_DLLPRIVATE void ImplGetColors( Color& rFaceColor, Color& rFaceTextColor,
Color& rSelectColor, Color& rSelectTextColor );
- SVT_DLLPRIVATE void ImplShowPage( USHORT nPos );
- SVT_DLLPRIVATE BOOL ImplCalcWidth();
+ SVT_DLLPRIVATE void ImplShowPage( sal_uInt16 nPos );
+ SVT_DLLPRIVATE sal_Bool ImplCalcWidth();
SVT_DLLPRIVATE void ImplFormat();
- SVT_DLLPRIVATE USHORT ImplGetLastFirstPos();
+ SVT_DLLPRIVATE sal_uInt16 ImplGetLastFirstPos();
SVT_DLLPRIVATE void ImplInitControls();
SVT_DLLPRIVATE void ImplEnableControls();
SVT_DLLPRIVATE void ImplSelect();
@@ -422,102 +422,102 @@ public:
virtual void EndRenaming();
virtual void Mirror();
- void InsertPage( USHORT nPageId, const XubString& rText,
+ void InsertPage( sal_uInt16 nPageId, const XubString& rText,
TabBarPageBits nBits = 0,
- USHORT nPos = TabBar::APPEND );
- void RemovePage( USHORT nPageId );
- void MovePage( USHORT nPageId, USHORT nNewPos );
+ sal_uInt16 nPos = TabBar::APPEND );
+ void RemovePage( sal_uInt16 nPageId );
+ void MovePage( sal_uInt16 nPageId, sal_uInt16 nNewPos );
- Color GetTabBgColor( USHORT nPageId ) const;
- void SetTabBgColor( USHORT nPageId, const Color& aTabBgColor );
- BOOL IsDefaultTabBgColor( USHORT nPageId );
+ Color GetTabBgColor( sal_uInt16 nPageId ) const;
+ void SetTabBgColor( sal_uInt16 nPageId, const Color& aTabBgColor );
+ sal_Bool IsDefaultTabBgColor( sal_uInt16 nPageId );
void Clear();
- void EnablePage( USHORT nPageId, BOOL bEnable = TRUE );
- BOOL IsPageEnabled( USHORT nPageId ) const;
+ void EnablePage( sal_uInt16 nPageId, sal_Bool bEnable = sal_True );
+ sal_Bool IsPageEnabled( sal_uInt16 nPageId ) const;
- void SetPageBits( USHORT nPageId, TabBarPageBits nBits = 0 );
- TabBarPageBits GetPageBits( USHORT nPageId ) const;
+ void SetPageBits( sal_uInt16 nPageId, TabBarPageBits nBits = 0 );
+ TabBarPageBits GetPageBits( sal_uInt16 nPageId ) const;
- USHORT GetPageCount() const;
- USHORT GetPageId( USHORT nPos ) const;
- USHORT GetPagePos( USHORT nPageId ) const;
- USHORT GetPageId( const Point& rPos ) const;
- Rectangle GetPageRect( USHORT nPageId ) const;
+ sal_uInt16 GetPageCount() const;
+ sal_uInt16 GetPageId( sal_uInt16 nPos ) const;
+ sal_uInt16 GetPagePos( sal_uInt16 nPageId ) const;
+ sal_uInt16 GetPageId( const Point& rPos ) const;
+ Rectangle GetPageRect( sal_uInt16 nPageId ) const;
// returns the rectangle in which page tabs are drawn
Rectangle GetPageArea() const;
- void SetCurPageId( USHORT nPageId );
- USHORT GetCurPageId() const { return mnCurPageId; }
+ void SetCurPageId( sal_uInt16 nPageId );
+ sal_uInt16 GetCurPageId() const { return mnCurPageId; }
- void SetFirstPageId( USHORT nPageId );
- USHORT GetFirstPageId() const { return GetPageId( mnFirstPos ); }
- void MakeVisible( USHORT nPageId );
+ void SetFirstPageId( sal_uInt16 nPageId );
+ sal_uInt16 GetFirstPageId() const { return GetPageId( mnFirstPos ); }
+ void MakeVisible( sal_uInt16 nPageId );
- void SelectPage( USHORT nPageId, BOOL bSelect = TRUE );
- void SelectPageRange( BOOL bSelect = FALSE,
- USHORT nStartPos = 0,
- USHORT nEndPos = TabBar::APPEND );
- USHORT GetSelectPage( USHORT nSelIndex = 0 ) const;
- USHORT GetSelectPageCount() const;
- BOOL IsPageSelected( USHORT nPageId ) const;
+ void SelectPage( sal_uInt16 nPageId, sal_Bool bSelect = sal_True );
+ void SelectPageRange( sal_Bool bSelect = sal_False,
+ sal_uInt16 nStartPos = 0,
+ sal_uInt16 nEndPos = TabBar::APPEND );
+ sal_uInt16 GetSelectPage( sal_uInt16 nSelIndex = 0 ) const;
+ sal_uInt16 GetSelectPageCount() const;
+ sal_Bool IsPageSelected( sal_uInt16 nPageId ) const;
- void EnableAutoMaxPageWidth( BOOL bEnable = TRUE ) { mbAutoMaxWidth = bEnable; }
- BOOL IsAutoMaxPageWidthEnabled() const { return mbAutoMaxWidth; }
+ void EnableAutoMaxPageWidth( sal_Bool bEnable = sal_True ) { mbAutoMaxWidth = bEnable; }
+ sal_Bool IsAutoMaxPageWidthEnabled() const { return mbAutoMaxWidth; }
void SetMaxPageWidth( long nMaxWidth );
long GetMaxPageWidth() const { return mnMaxPageWidth; }
void ResetMaxPageWidth() { SetMaxPageWidth( 0 ); }
- BOOL IsMaxPageWidth() const { return mnMaxPageWidth != 0; }
+ sal_Bool IsMaxPageWidth() const { return mnMaxPageWidth != 0; }
- void EnableEditMode( BOOL bEnable = TRUE ) { mbAutoEditMode = bEnable; }
- BOOL IsEditModeEnabled() const { return mbAutoEditMode; }
- BOOL StartEditMode( USHORT nPageId );
- void EndEditMode( BOOL bCancel = FALSE );
+ void EnableEditMode( sal_Bool bEnable = sal_True ) { mbAutoEditMode = bEnable; }
+ sal_Bool IsEditModeEnabled() const { return mbAutoEditMode; }
+ sal_Bool StartEditMode( sal_uInt16 nPageId );
+ void EndEditMode( sal_Bool bCancel = sal_False );
void SetEditText( const XubString& rText ) { maEditText = rText; }
const XubString& GetEditText() const { return maEditText; }
- BOOL IsInEditMode() const { return (mpEdit != NULL); }
- BOOL IsEditModeCanceled() const { return mbEditCanceled; }
- USHORT GetEditPageId() const { return mnEditId; }
+ sal_Bool IsInEditMode() const { return (mpEdit != NULL); }
+ sal_Bool IsEditModeCanceled() const { return mbEditCanceled; }
+ sal_uInt16 GetEditPageId() const { return mnEditId; }
/** Mirrors the entire control including position of buttons and splitter.
Mirroring is done relative to the current direction of the GUI.
- @param bMirrored TRUE = the control will draw itself RTL in LTR GUI,
- and vice versa; FALSE = the control behaves according to the
+ @param bMirrored sal_True = the control will draw itself RTL in LTR GUI,
+ and vice versa; sal_False = the control behaves according to the
current direction of the GUI. */
- void SetMirrored( BOOL bMirrored = TRUE );
- /** Returns TRUE, if the control is set to mirrored mode (see SetMirrored()). */
- BOOL IsMirrored() const { return mbMirrored; }
+ void SetMirrored( sal_Bool bMirrored = sal_True );
+ /** Returns sal_True, if the control is set to mirrored mode (see SetMirrored()). */
+ sal_Bool IsMirrored() const { return mbMirrored; }
/** Sets the control to LTR or RTL mode regardless of the GUI direction.
- @param bRTL FALSE = the control will draw from left to right;
- TRUE = the control will draw from right to left. */
- void SetEffectiveRTL( BOOL bRTL );
- /** Returns TRUE, if the control draws from right to left (see SetEffectiveRTL()). */
- BOOL IsEffectiveRTL() const;
-
- BOOL StartDrag( const CommandEvent& rCEvt, Region& rRegion );
- USHORT ShowDropPos( const Point& rPos );
+ @param bRTL sal_False = the control will draw from left to right;
+ sal_True = the control will draw from right to left. */
+ void SetEffectiveRTL( sal_Bool bRTL );
+ /** Returns sal_True, if the control draws from right to left (see SetEffectiveRTL()). */
+ sal_Bool IsEffectiveRTL() const;
+
+ sal_Bool StartDrag( const CommandEvent& rCEvt, Region& rRegion );
+ sal_uInt16 ShowDropPos( const Point& rPos );
void HideDropPos();
- BOOL SwitchPage( const Point& rPos );
+ sal_Bool SwitchPage( const Point& rPos );
void EndSwitchPage();
- BOOL IsInSwitching() { return mbInSwitching; }
+ sal_Bool IsInSwitching() { return mbInSwitching; }
void SetSelectColor();
void SetSelectColor( const Color& rColor );
const Color& GetSelectColor() const { return maSelColor; }
- BOOL IsSelectColor() const { return mbSelColor; }
+ sal_Bool IsSelectColor() const { return mbSelColor; }
void SetSelectTextColor();
void SetSelectTextColor( const Color& rColor );
const Color& GetSelectTextColor() const { return maSelTextColor; }
- BOOL IsSelectTextColor() const { return mbSelTextColor; }
-
- void SetPageText( USHORT nPageId, const XubString& rText );
- XubString GetPageText( USHORT nPageId ) const;
- void SetHelpText( USHORT nPageId, const XubString& rText );
- XubString GetHelpText( USHORT nPageId ) const;
- void SetHelpId( USHORT nPageId, const rtl::OString& nHelpId );
- rtl::OString GetHelpId( USHORT nPageId ) const;
+ sal_Bool IsSelectTextColor() const { return mbSelTextColor; }
+
+ void SetPageText( sal_uInt16 nPageId, const XubString& rText );
+ XubString GetPageText( sal_uInt16 nPageId ) const;
+ void SetHelpText( sal_uInt16 nPageId, const XubString& rText );
+ XubString GetHelpText( sal_uInt16 nPageId ) const;
+ void SetHelpId( sal_uInt16 nPageId, const rtl::OString& nHelpId );
+ rtl::OString GetHelpId( sal_uInt16 nPageId ) const;
long GetSplitSize() const { return mnSplitSize; }
long GetMinSize() const;
diff --git a/svtools/inc/svtools/table/tablecontrol.hxx b/svtools/inc/svtools/table/tablecontrol.hxx
index f3b7ed88b565..28ac3583bd5a 100644
--- a/svtools/inc/svtools/table/tablecontrol.hxx
+++ b/svtools/inc/svtools/table/tablecontrol.hxx
@@ -192,7 +192,7 @@ namespace svt { namespace table
//// Window
virtual Rectangle GetWindowExtentsRelative( Window *pRelativeWindow ) const;
virtual void GrabFocus();
- virtual XACC GetAccessible( BOOL bCreate = TRUE );
+ virtual XACC GetAccessible( sal_Bool bCreate = sal_True );
virtual Window* GetAccessibleParentWindow() const;
virtual Window* GetWindowInstance();
virtual sal_Int32 GetAccessibleControlCount() const;
@@ -203,8 +203,8 @@ namespace svt { namespace table
virtual sal_Int32 GetSelectedRowCount() const;
virtual bool IsRowSelected( long _nRow ) const;
virtual sal_Bool ConvertPointToCellAddress( sal_Int32& _rnRow, sal_Int32& _rnColPos, const Point& _rPoint );
- virtual Rectangle calcHeaderRect( sal_Bool _bIsColumnBar, BOOL _bOnScreen = TRUE );
- virtual Rectangle calcTableRect( BOOL _bOnScreen = TRUE );
+ virtual Rectangle calcHeaderRect( sal_Bool _bIsColumnBar, sal_Bool _bOnScreen = sal_True );
+ virtual Rectangle calcTableRect( sal_Bool _bOnScreen = sal_True );
virtual Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex);
virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint);
virtual void FillAccessibleStateSetForCell( ::utl::AccessibleStateSetHelper& _rStateSet, sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const;
diff --git a/svtools/inc/svtools/taskbar.hxx b/svtools/inc/svtools/taskbar.hxx
index d4a6699e2d5e..b254473c7f19 100644
--- a/svtools/inc/svtools/taskbar.hxx
+++ b/svtools/inc/svtools/taskbar.hxx
@@ -150,11 +150,11 @@ public:
virtual void RequestHelp( const HelpEvent& rHEvt );
- void InsertButton( USHORT nItemId,
+ void InsertButton( sal_uInt16 nItemId,
const Image& rImage, const String& rText,
- USHORT nPos = TOOLBOX_APPEND )
+ sal_uInt16 nPos = TOOLBOX_APPEND )
{ InsertItem( nItemId, rImage, rText, TIB_LEFT | TIB_AUTOSIZE, nPos ); }
- void RemoveButton( USHORT nItemId )
+ void RemoveButton( sal_uInt16 nItemId )
{ RemoveItem( nItemId ); }
};
@@ -162,7 +162,7 @@ public:
// - TaskToolBox-Types -
// ---------------------
-#define TASKTOOLBOX_TASK_NOTFOUND ((USHORT)0xFFFF)
+#define TASKTOOLBOX_TASK_NOTFOUND ((sal_uInt16)0xFFFF)
// ---------------
// - TaskToolBox -
@@ -176,18 +176,18 @@ private:
ImplTaskItemList* mpItemList;
TaskBar* mpNotifyTaskBar;
Point maContextMenuPos;
- ULONG mnOldItemCount;
+ sal_uLong mnOldItemCount;
long mnMaxTextWidth;
long mnDummy1;
- USHORT mnUpdatePos;
- USHORT mnUpdateNewPos;
- USHORT mnActiveItemId;
- USHORT mnNewActivePos;
- USHORT mnTaskItem;
- USHORT mnSmallItem;
- USHORT mnDummy2;
- BOOL mbMinActivate;
- BOOL mbDummy1;
+ sal_uInt16 mnUpdatePos;
+ sal_uInt16 mnUpdateNewPos;
+ sal_uInt16 mnActiveItemId;
+ sal_uInt16 mnNewActivePos;
+ sal_uInt16 mnTaskItem;
+ sal_uInt16 mnSmallItem;
+ sal_uInt16 mnDummy2;
+ sal_Bool mbMinActivate;
+ sal_Bool mbDummy1;
Link maActivateTaskHdl;
Link maContextMenuHdl;
@@ -203,9 +203,9 @@ public:
TaskToolBox( Window* pParent, WinBits nWinStyle = 0 );
~TaskToolBox();
- void ActivateTaskItem( USHORT nItemId,
- BOOL bMinActivate = FALSE );
- USHORT GetTaskItem( const Point& rPos ) const;
+ void ActivateTaskItem( sal_uInt16 nItemId,
+ sal_Bool bMinActivate = sal_False );
+ sal_uInt16 GetTaskItem( const Point& rPos ) const;
virtual void ActivateTask();
virtual void ContextMenu();
@@ -219,12 +219,12 @@ public:
void StartUpdateTask();
void UpdateTask( const Image& rImage, const String& rText,
- BOOL bActive = FALSE );
+ sal_Bool bActive = sal_False );
void EndUpdateTask();
const Point& GetContextMenuPos() const { return maContextMenuPos; }
- USHORT GetTaskItem() const { return mnTaskItem; }
- BOOL IsMinActivate() const { return mbMinActivate; }
+ sal_uInt16 GetTaskItem() const { return mnTaskItem; }
+ sal_Bool IsMinActivate() const { return mbMinActivate; }
void SetActivateTaskHdl( const Link& rLink ) { maActivateTaskHdl = rLink; }
const Link& GetActivateTaskHdl() const { return maActivateTaskHdl; }
@@ -232,9 +232,9 @@ public:
const Link& GetContextMenuHdl() const { return maContextMenuHdl; }
};
-inline USHORT TaskToolBox::GetTaskItem( const Point& rPos ) const
+inline sal_uInt16 TaskToolBox::GetTaskItem( const Point& rPos ) const
{
- USHORT nId = GetItemId( rPos );
+ sal_uInt16 nId = GetItemId( rPos );
if ( nId )
return nId-1;
else
@@ -248,18 +248,18 @@ inline USHORT TaskToolBox::GetTaskItem( const Point& rPos ) const
class ITaskStatusNotify
{
public:
- virtual BOOL MouseButtonDown( USHORT nItemd, const MouseEvent& rMEvt );
- virtual BOOL MouseButtonUp( USHORT nItemd, const MouseEvent& rMEvt );
- virtual BOOL MouseMove( USHORT nItemd, const MouseEvent& rMEvt );
- virtual BOOL Command( USHORT nItemd, const CommandEvent& rCEvt );
- virtual BOOL UpdateHelp( USHORT nItemd );
+ virtual sal_Bool MouseButtonDown( sal_uInt16 nItemd, const MouseEvent& rMEvt );
+ virtual sal_Bool MouseButtonUp( sal_uInt16 nItemd, const MouseEvent& rMEvt );
+ virtual sal_Bool MouseMove( sal_uInt16 nItemd, const MouseEvent& rMEvt );
+ virtual sal_Bool Command( sal_uInt16 nItemd, const CommandEvent& rCEvt );
+ virtual sal_Bool UpdateHelp( sal_uInt16 nItemd );
};
// -----------------------
// - TaskStatusFieldItem -
// -----------------------
-#define TASKSTATUSFIELDITEM_FLASH ((USHORT)0x0001)
+#define TASKSTATUSFIELDITEM_FLASH ((sal_uInt16)0x0001)
class TaskStatusFieldItem
{
@@ -269,7 +269,7 @@ private:
XubString maQuickHelpText;
XubString maHelpText;
rtl::OString maHelpId;
- USHORT mnFlags;
+ sal_uInt16 mnFlags;
public:
TaskStatusFieldItem();
@@ -278,7 +278,7 @@ public:
const Image& rImage,
const XubString& rQuickHelpText,
const XubString& rHelpText,
- USHORT nFlags );
+ sal_uInt16 nFlags );
~TaskStatusFieldItem();
void SetNotifyObject( ITaskStatusNotify* pNotify ) { mpNotify = pNotify; }
@@ -291,8 +291,8 @@ public:
const XubString& GetHelpText() const { return maHelpText; }
void SetHelpId( const rtl::OString& rHelpId ) { maHelpId = rHelpId; }
const rtl::OString& GetHelpId() const { return maHelpId; }
- void SetFlags( USHORT nFlags ) { mnFlags = nFlags; }
- USHORT GetFlags() const { return mnFlags; }
+ void SetFlags( sal_uInt16 nFlags ) { mnFlags = nFlags; }
+ sal_uInt16 GetFlags() const { return mnFlags; }
const TaskStatusFieldItem& operator=( const TaskStatusFieldItem& rItem );
};
@@ -301,10 +301,10 @@ public:
// - TaskStatusBar -
// -----------------
-#define TASKSTATUSBAR_STATUSFIELDID ((USHORT)61000)
+#define TASKSTATUSBAR_STATUSFIELDID ((sal_uInt16)61000)
-#define TASKSTATUSBAR_CLOCKID ((USHORT)61000)
-#define TASKSTATUSFIELD_CLOCK ((USHORT)0x0001)
+#define TASKSTATUSBAR_CLOCKID ((sal_uInt16)61000)
+#define TASKSTATUSFIELD_CLOCK ((sal_uInt16)0x0001)
class SVT_DLLPUBLIC TaskStatusBar : public StatusBar
{
@@ -320,19 +320,19 @@ private:
long mnClockWidth;
long mnItemWidth;
long mnFieldWidth;
- USHORT mnFieldFlags;
- USHORT mnDummy1;
- BOOL mbFlashItems;
- BOOL mbOutInterval;
- BOOL mbDummy1;
- BOOL mbDummy2;
+ sal_uInt16 mnFieldFlags;
+ sal_uInt16 mnDummy1;
+ sal_Bool mbFlashItems;
+ sal_Bool mbOutInterval;
+ sal_Bool mbDummy1;
+ sal_Bool mbDummy2;
#ifdef _TASKBAR_CXX
- SVT_DLLPRIVATE ImplTaskSBFldItem* ImplGetFieldItem( USHORT nItemId ) const;
- SVT_DLLPRIVATE ImplTaskSBFldItem* ImplGetFieldItem( const Point& rPos, BOOL& rFieldRect ) const;
- SVT_DLLPRIVATE BOOL ImplUpdateClock();
- SVT_DLLPRIVATE BOOL ImplUpdateFlashItems();
- SVT_DLLPRIVATE void ImplUpdateField( BOOL bItems );
+ SVT_DLLPRIVATE ImplTaskSBFldItem* ImplGetFieldItem( sal_uInt16 nItemId ) const;
+ SVT_DLLPRIVATE ImplTaskSBFldItem* ImplGetFieldItem( const Point& rPos, sal_Bool& rFieldRect ) const;
+ SVT_DLLPRIVATE sal_Bool ImplUpdateClock();
+ SVT_DLLPRIVATE sal_Bool ImplUpdateFlashItems();
+ SVT_DLLPRIVATE void ImplUpdateField( sal_Bool bItems );
DECL_DLLPRIVATE_LINK( ImplTimerHdl, Timer* );
#endif
@@ -348,20 +348,20 @@ public:
virtual void UserDraw( const UserDrawEvent& rUDEvt );
void InsertStatusField( long nOffset = STATUSBAR_OFFSET,
- USHORT nPos = STATUSBAR_APPEND,
- USHORT nFlags = TASKSTATUSFIELD_CLOCK );
+ sal_uInt16 nPos = STATUSBAR_APPEND,
+ sal_uInt16 nFlags = TASKSTATUSFIELD_CLOCK );
void RemoveStatusField()
{ maTimer.Stop(); RemoveItem( TASKSTATUSBAR_STATUSFIELDID ); }
- void SetFieldFlags( USHORT nFlags );
- USHORT GetFieldFlags() const { return mnFieldFlags; }
+ void SetFieldFlags( sal_uInt16 nFlags );
+ sal_uInt16 GetFieldFlags() const { return mnFieldFlags; }
void SetNotifyObject( ITaskStatusNotify* pNotify ) { mpNotify = pNotify; }
ITaskStatusNotify* GetNotifyObject() const { return mpNotify; }
- void AddStatusFieldItem( USHORT nItemId, const TaskStatusFieldItem& rItem,
- USHORT nPos = 0xFFFF );
- void ModifyStatusFieldItem( USHORT nItemId, const TaskStatusFieldItem& rItem );
- void RemoveStatusFieldItem( USHORT nItemId );
- BOOL GetStatusFieldItem( USHORT nItemId, TaskStatusFieldItem& rItem ) const;
+ void AddStatusFieldItem( sal_uInt16 nItemId, const TaskStatusFieldItem& rItem,
+ sal_uInt16 nPos = 0xFFFF );
+ void ModifyStatusFieldItem( sal_uInt16 nItemId, const TaskStatusFieldItem& rItem );
+ void RemoveStatusFieldItem( sal_uInt16 nItemId );
+ sal_Bool GetStatusFieldItem( sal_uInt16 nItemId, TaskStatusFieldItem& rItem ) const;
};
// -----------
@@ -388,15 +388,15 @@ private:
long mnDummy3;
long mnDummy4;
WinBits mnWinBits;
- USHORT mnLines;
- BOOL mbStatusText;
- BOOL mbShowItems;
- BOOL mbAutoHide;
- BOOL mbAlignDummy1;
- BOOL mbDummy1;
- BOOL mbDummy2;
- BOOL mbDummy3;
- BOOL mbDummy4;
+ sal_uInt16 mnLines;
+ sal_Bool mbStatusText;
+ sal_Bool mbShowItems;
+ sal_Bool mbAutoHide;
+ sal_Bool mbAlignDummy1;
+ sal_Bool mbDummy1;
+ sal_Bool mbDummy2;
+ sal_Bool mbDummy3;
+ sal_Bool mbDummy4;
Link maTaskResizeHdl;
#ifdef _TASKBAR_CXX
@@ -424,10 +424,10 @@ public:
void Format();
- void SetLines( USHORT nLines );
- USHORT GetLines() const { return mnLines; }
- void EnableAutoHide( BOOL bAutoHide = TRUE );
- BOOL IsAutoHideEnabled() const { return mbAutoHide; }
+ void SetLines( sal_uInt16 nLines );
+ sal_uInt16 GetLines() const { return mnLines; }
+ void EnableAutoHide( sal_Bool bAutoHide = sal_True );
+ sal_Bool IsAutoHideEnabled() const { return mbAutoHide; }
void ShowStatusText( const String& rText );
void HideStatusText();
@@ -466,7 +466,7 @@ class SVT_DLLPUBLIC WindowArrange
private:
List* mpWinList;
void* mpDummy;
- ULONG mnDummy;
+ sal_uLong mnDummy;
#ifdef _TASKBAR_CXX
SVT_DLLPRIVATE void ImplTile( const Rectangle& rRect );
@@ -479,12 +479,12 @@ public:
WindowArrange();
~WindowArrange();
- void AddWindow( Window* pWindow, ULONG nPos = LIST_APPEND )
+ void AddWindow( Window* pWindow, sal_uLong nPos = LIST_APPEND )
{ mpWinList->Insert( (void*)pWindow, nPos ); }
void RemoveAllWindows()
{ mpWinList->Clear(); }
- void Arrange( USHORT nType, const Rectangle& rRect );
+ void Arrange( sal_uInt16 nType, const Rectangle& rRect );
};
#endif // _TASKBAR_HXX
diff --git a/svtools/inc/svtools/testtool.hxx b/svtools/inc/svtools/testtool.hxx
index ea00fe33cdbf..be0f217f4475 100644
--- a/svtools/inc/svtools/testtool.hxx
+++ b/svtools/inc/svtools/testtool.hxx
@@ -46,7 +46,7 @@ class RemoteControl
{
friend class StatementFlow;
- BOOL m_bIdleInserted;
+ sal_Bool m_bIdleInserted;
#if OSL_DEBUG_LEVEL > 1
EditWindow *m_pDbgWin;
#endif
@@ -55,14 +55,14 @@ class RemoteControl
public:
RemoteControl();
~RemoteControl();
- BOOL QueCommands( ULONG nServiceId, SvStream *pIn );
+ sal_Bool QueCommands( sal_uLong nServiceId, SvStream *pIn );
SvStream* GetReturnStream();
DECL_LINK( IdleHdl, Application* );
DECL_LINK( CommandHdl, Application* );
DECL_LINK( QueCommandsEvent, CommunicationLink* );
- ULONG nStoredServiceId;
+ sal_uLong nStoredServiceId;
SvStream *pStoredStream;
void ExecuteURL( String &aURL );
diff --git a/svtools/inc/svtools/textdata.hxx b/svtools/inc/svtools/textdata.hxx
index 809d64248eb6..e9654cc0378b 100644
--- a/svtools/inc/svtools/textdata.hxx
+++ b/svtools/inc/svtools/textdata.hxx
@@ -33,71 +33,51 @@
#include <svl/smplhint.hxx>
#include <tools/string.hxx>
-#define TEXTUNDO_START 100
-#define TEXTUNDO_REMOVECHARS 100
-#define TEXTUNDO_CONNECTPARAS 101
-#define TEXTUNDO_SPLITPARA 102
-#define TEXTUNDO_INSERTCHARS 103
-#define TEXTUNDO_DELCONTENT 104
-#define TEXTUNDO_DELETE 105
-#define TEXTUNDO_CUT 106
-#define TEXTUNDO_PASTE 107
-#define TEXTUNDO_INSERT 108
-#define TEXTUNDO_ATTRIBS 109
-#define TEXTUNDO_DRAGANDDROP 110
-#define TEXTUNDO_READ 111
-#define TEXTUNDO_END 149
-
-#define XTEXTUNDO_START 150
-#define XTEXTUNDO_END 199
-
-#define TEXTUNDO_USER 200
-
// Fuer Notify, wenn alle Absaetze geloescht wurden...
#define TEXT_PARA_ALL 0xFFFFFFFF
class TextPaM
{
private:
- ULONG mnPara;
- USHORT mnIndex;
+ sal_uLong mnPara;
+ sal_uInt16 mnIndex;
public:
TextPaM() { mnPara = 0, mnIndex = 0; }
- TextPaM( ULONG nPara, USHORT nIndex ) { mnPara = nPara, mnIndex = nIndex; }
+ TextPaM( sal_uLong nPara, sal_uInt16 nIndex ) { mnPara = nPara, mnIndex = nIndex; }
- ULONG GetPara() const { return mnPara; }
- ULONG& GetPara() { return mnPara; }
+ sal_uLong GetPara() const { return mnPara; }
+ sal_uLong& GetPara() { return mnPara; }
- USHORT GetIndex() const { return mnIndex; }
- USHORT& GetIndex() { return mnIndex; }
+ sal_uInt16 GetIndex() const { return mnIndex; }
+ sal_uInt16& GetIndex() { return mnIndex; }
- inline BOOL operator == ( const TextPaM& rPaM ) const;
- inline BOOL operator != ( const TextPaM& rPaM ) const;
- inline BOOL operator < ( const TextPaM& rPaM ) const;
- inline BOOL operator > ( const TextPaM& rPaM ) const;
+ inline sal_Bool operator == ( const TextPaM& rPaM ) const;
+ inline sal_Bool operator != ( const TextPaM& rPaM ) const;
+ inline sal_Bool operator < ( const TextPaM& rPaM ) const;
+ inline sal_Bool operator > ( const TextPaM& rPaM ) const;
};
-inline BOOL TextPaM::operator == ( const TextPaM& rPaM ) const
+inline sal_Bool TextPaM::operator == ( const TextPaM& rPaM ) const
{
- return ( ( mnPara == rPaM.mnPara ) && ( mnIndex == rPaM.mnIndex ) ) ? TRUE : FALSE;
+ return ( ( mnPara == rPaM.mnPara ) && ( mnIndex == rPaM.mnIndex ) ) ? sal_True : sal_False;
}
-inline BOOL TextPaM::operator != ( const TextPaM& rPaM ) const
+inline sal_Bool TextPaM::operator != ( const TextPaM& rPaM ) const
{
return !( *this == rPaM );
}
-inline BOOL TextPaM::operator < ( const TextPaM& rPaM ) const
+inline sal_Bool TextPaM::operator < ( const TextPaM& rPaM ) const
{
return ( ( mnPara < rPaM.mnPara ) ||
- ( ( mnPara == rPaM.mnPara ) && mnIndex < rPaM.mnIndex ) ) ? TRUE : FALSE;
+ ( ( mnPara == rPaM.mnPara ) && mnIndex < rPaM.mnIndex ) ) ? sal_True : sal_False;
}
-inline BOOL TextPaM::operator > ( const TextPaM& rPaM ) const
+inline sal_Bool TextPaM::operator > ( const TextPaM& rPaM ) const
{
return ( ( mnPara > rPaM.mnPara ) ||
- ( ( mnPara == rPaM.mnPara ) && mnIndex > rPaM.mnIndex ) ) ? TRUE : FALSE;
+ ( ( mnPara == rPaM.mnPara ) && mnIndex > rPaM.mnIndex ) ) ? sal_True : sal_False;
}
class SVT_DLLPUBLIC TextSelection
@@ -119,18 +99,18 @@ public:
void Justify();
- BOOL HasRange() const { return maStartPaM != maEndPaM; }
+ sal_Bool HasRange() const { return maStartPaM != maEndPaM; }
- inline BOOL operator == ( const TextSelection& rSel ) const;
- inline BOOL operator != ( const TextSelection& rSel ) const;
+ inline sal_Bool operator == ( const TextSelection& rSel ) const;
+ inline sal_Bool operator != ( const TextSelection& rSel ) const;
};
-inline BOOL TextSelection::operator == ( const TextSelection& rSel ) const
+inline sal_Bool TextSelection::operator == ( const TextSelection& rSel ) const
{
return ( ( maStartPaM == rSel.maStartPaM ) && ( maEndPaM == rSel.maEndPaM ) );
}
-inline BOOL TextSelection::operator != ( const TextSelection& rSel ) const
+inline sal_Bool TextSelection::operator != ( const TextSelection& rSel ) const
{
return !( *this == rSel );
}
@@ -153,30 +133,30 @@ inline BOOL TextSelection::operator != ( const TextSelection& rSel ) const
class SVT_DLLPUBLIC TextHint : public SfxSimpleHint
{
private:
- ULONG mnValue;
+ sal_uLong mnValue;
public:
TYPEINFO();
- TextHint( ULONG nId );
- TextHint( ULONG nId, ULONG nValue );
+ TextHint( sal_uLong nId );
+ TextHint( sal_uLong nId, sal_uLong nValue );
- ULONG GetValue() const { return mnValue; }
- void SetValue( ULONG n ) { mnValue = n; }
+ sal_uLong GetValue() const { return mnValue; }
+ void SetValue( sal_uLong n ) { mnValue = n; }
};
struct TEIMEInfos
{
String aOldTextAfterStartPos;
- USHORT* pAttribs;
+ sal_uInt16* pAttribs;
TextPaM aPos;
- USHORT nLen;
- BOOL bCursor;
- BOOL bWasCursorOverwrite;
+ sal_uInt16 nLen;
+ sal_Bool bCursor;
+ sal_Bool bWasCursorOverwrite;
TEIMEInfos( const TextPaM& rPos, const String& rOldTextAfterStartPos );
~TEIMEInfos();
- void CopyAttribs( const USHORT* pA, USHORT nL );
+ void CopyAttribs( const sal_uInt16* pA, sal_uInt16 nL );
void DestroyAttribs();
};
@@ -195,11 +175,11 @@ struct TEIMEInfos
template <class T> class ToolsList : public ::std::vector< T >
{
public:
- ULONG Count() const { return static_cast<ULONG>(::std::vector< T >::size()); }
- ULONG GetPos( T pObject ) const { return ( ::std::find( this->begin(), this->end(), pObject ) ) - this->begin(); }
- T GetObject( ULONG nIndex ) const { return (*this)[nIndex]; }
- void Insert( T pObject, ULONG nPos ) { ::std::vector< T >::insert( this->begin()+nPos, pObject ); }
- void Remove( ULONG nPos ) { ::std::vector< T >::erase( this->begin()+nPos ); }
+ sal_uLong Count() const { return static_cast<sal_uLong>(::std::vector< T >::size()); }
+ sal_uLong GetPos( T pObject ) const { return ( ::std::find( this->begin(), this->end(), pObject ) ) - this->begin(); }
+ T GetObject( sal_uLong nIndex ) const { return (*this)[nIndex]; }
+ void Insert( T pObject, sal_uLong nPos ) { ::std::vector< T >::insert( this->begin()+nPos, pObject ); }
+ void Remove( sal_uLong nPos ) { ::std::vector< T >::erase( this->begin()+nPos ); }
};
#endif // _TEXTDATA_HXX
diff --git a/svtools/inc/svtools/texteng.hxx b/svtools/inc/svtools/texteng.hxx
index ef27edee2efe..5a50fee0f68b 100644
--- a/svtools/inc/svtools/texteng.hxx
+++ b/svtools/inc/svtools/texteng.hxx
@@ -39,7 +39,6 @@ class TextAttrib;
class TextCharAttrib;
class TextUndo;
class TextUndoManager;
-class SfxUndoManager;
class EditSelFunctionSet;
class EditSelEngine;
class IdleFormatter;
@@ -49,6 +48,11 @@ class SfxUndoAction;
class KeyEvent;
class Timer;
+namespace svl
+{
+ class IUndoManager;
+}
+
class TextLine;
class TETextPortion;
#include <svl/brdcst.hxx>
@@ -117,110 +121,110 @@ private:
Font maFont;
Color maTextColor;
- USHORT mnCharHeight;
- USHORT mnFixCharWidth100;
+ sal_uInt16 mnCharHeight;
+ sal_uInt16 mnFixCharWidth100;
- ULONG mnMaxTextLen;
- ULONG mnMaxTextWidth;
- ULONG mnCurTextWidth;
- ULONG mnCurTextHeight;
- ULONG mnDefTab;
+ sal_uLong mnMaxTextLen;
+ sal_uLong mnMaxTextWidth;
+ sal_uLong mnCurTextWidth;
+ sal_uLong mnCurTextHeight;
+ sal_uLong mnDefTab;
TxtAlign meAlign;
- BOOL mbIsFormatting : 1; // Semaphore wegen der Hook's
- BOOL mbFormatted : 1;
- BOOL mbUpdate : 1;
- BOOL mbModified : 1;
- BOOL mbUndoEnabled : 1;
- BOOL mbIsInUndo : 1;
- BOOL mbDowning : 1;
- BOOL mbRightToLeft : 1;
- BOOL mbHasMultiLineParas : 1;
+ sal_Bool mbIsFormatting : 1; // Semaphore wegen der Hook's
+ sal_Bool mbFormatted : 1;
+ sal_Bool mbUpdate : 1;
+ sal_Bool mbModified : 1;
+ sal_Bool mbUndoEnabled : 1;
+ sal_Bool mbIsInUndo : 1;
+ sal_Bool mbDowning : 1;
+ sal_Bool mbRightToLeft : 1;
+ sal_Bool mbHasMultiLineParas : 1;
TextEngine( const TextEngine& ) : SfxBroadcaster() {}
TextEngine& operator=( const TextEngine& ) { return *this; }
protected:
- void CursorMoved( ULONG nNode );
+ void CursorMoved( sal_uLong nNode );
void TextModified();
void ImpInitDoc();
void ImpRemoveText();
TextPaM ImpDeleteText( const TextSelection& rSel );
- TextPaM ImpInsertText( const TextSelection& rSel, sal_Unicode c, BOOL bOverwrite = FALSE );
+ TextPaM ImpInsertText( const TextSelection& rSel, sal_Unicode c, sal_Bool bOverwrite = sal_False );
TextPaM ImpInsertText( const TextSelection& rSel, const String& rText );
- TextPaM ImpInsertParaBreak( const TextSelection& rTextSelection, BOOL bKeepEndingAttribs = TRUE );
- TextPaM ImpInsertParaBreak( const TextPaM& rPaM, BOOL bKeepEndingAttribs = TRUE );
- void ImpRemoveChars( const TextPaM& rPaM, USHORT nChars, SfxUndoAction* pCurUndo = 0 );
- TextPaM ImpConnectParagraphs( ULONG nLeft, ULONG nRight );
- void ImpRemoveParagraph( ULONG nPara );
- void ImpInitWritingDirections( ULONG nPara );
+ TextPaM ImpInsertParaBreak( const TextSelection& rTextSelection, sal_Bool bKeepEndingAttribs = sal_True );
+ TextPaM ImpInsertParaBreak( const TextPaM& rPaM, sal_Bool bKeepEndingAttribs = sal_True );
+ void ImpRemoveChars( const TextPaM& rPaM, sal_uInt16 nChars, SfxUndoAction* pCurUndo = 0 );
+ TextPaM ImpConnectParagraphs( sal_uLong nLeft, sal_uLong nRight );
+ void ImpRemoveParagraph( sal_uLong nPara );
+ void ImpInitWritingDirections( sal_uLong nPara );
LocaleDataWrapper* ImpGetLocaleDataWrapper();
// to remain compatible in the minor release we copy the above ImpInsertText
// function and add the extra parameter we need but make sure this function
// gets not exported. First and seconf parameter swapped to have a different signatur.
- SAL_DLLPRIVATE TextPaM ImpInsertText( sal_Unicode c, const TextSelection& rSel, BOOL bOverwrite = FALSE, BOOL bIsUserInput = sal_False );
+ SAL_DLLPRIVATE TextPaM ImpInsertText( sal_Unicode c, const TextSelection& rSel, sal_Bool bOverwrite = sal_False, sal_Bool bIsUserInput = sal_False );
// some other new functions needed that must not be exported to remain compatible
SAL_DLLPRIVATE ::com::sun::star::uno::Reference < ::com::sun::star::i18n::XExtendedInputSequenceChecker > GetInputSequenceChecker() const;
- SAL_DLLPRIVATE BOOL IsInputSequenceCheckingRequired( sal_Unicode c, const TextSelection& rCurSel ) const;
+ SAL_DLLPRIVATE sal_Bool IsInputSequenceCheckingRequired( sal_Unicode c, const TextSelection& rCurSel ) const;
// Broadcasten bzw. Selektionen anpassen:
- void ImpParagraphInserted( ULONG nPara );
- void ImpParagraphRemoved( ULONG nPara );
- void ImpCharsRemoved( ULONG nPara, USHORT nPos, USHORT nChars );
- void ImpCharsInserted( ULONG nPara, USHORT nPos, USHORT nChars );
- void ImpFormattingParagraph( ULONG nPara );
+ void ImpParagraphInserted( sal_uLong nPara );
+ void ImpParagraphRemoved( sal_uLong nPara );
+ void ImpCharsRemoved( sal_uLong nPara, sal_uInt16 nPos, sal_uInt16 nChars );
+ void ImpCharsInserted( sal_uLong nPara, sal_uInt16 nPos, sal_uInt16 nChars );
+ void ImpFormattingParagraph( sal_uLong nPara );
void ImpTextHeightChanged();
void ImpTextFormatted();
DECL_LINK( IdleFormatHdl, Timer * );
void CheckIdleFormatter();
- void IdleFormatAndUpdate( TextView* pCurView = 0, USHORT nMaxTimerRestarts = 5 );
+ void IdleFormatAndUpdate( TextView* pCurView = 0, sal_uInt16 nMaxTimerRestarts = 5 );
- BOOL CreateLines( ULONG nPara );
- void CreateAndInsertEmptyLine( ULONG nPara );
- void ImpBreakLine( ULONG nPara, TextLine* pLine, TETextPortion* pPortion, USHORT nPortionStart, long nRemainingWidth );
- USHORT SplitTextPortion( ULONG nPara, USHORT nPos );
- void CreateTextPortions( ULONG nPara, USHORT nStartPos );
- void RecalcTextPortion( ULONG nPara, USHORT nStartPos, short nNewChars );
- void SeekCursor( ULONG nNode, USHORT nPos, Font& rFont, OutputDevice* pOutDev );
+ sal_Bool CreateLines( sal_uLong nPara );
+ void CreateAndInsertEmptyLine( sal_uLong nPara );
+ void ImpBreakLine( sal_uLong nPara, TextLine* pLine, TETextPortion* pPortion, sal_uInt16 nPortionStart, long nRemainingWidth );
+ sal_uInt16 SplitTextPortion( sal_uLong nPara, sal_uInt16 nPos );
+ void CreateTextPortions( sal_uLong nPara, sal_uInt16 nStartPos );
+ void RecalcTextPortion( sal_uLong nPara, sal_uInt16 nStartPos, short nNewChars );
+ void SeekCursor( sal_uLong nNode, sal_uInt16 nPos, Font& rFont, OutputDevice* pOutDev );
void FormatDoc();
void FormatFullDoc();
void FormatAndUpdate( TextView* pCurView = 0 );
- BOOL IsFormatting() const { return mbIsFormatting; }
+ sal_Bool IsFormatting() const { return mbIsFormatting; }
void UpdateViews( TextView* pCurView = 0 );
- void SetUpdateMode( BOOL bUp, TextView* pCurView, BOOL bForceUpdate );
+ void SetUpdateMode( sal_Bool bUp, TextView* pCurView, sal_Bool bForceUpdate );
void ImpPaint( OutputDevice* pOut, const Point& rStartPos, Rectangle const* pPaintArea, TextSelection const* pPaintRange = 0, TextSelection const* pSelection = 0 );
void UpdateSelections();
- BOOL IsFormatted() const { return mbFormatted; }
+ sal_Bool IsFormatted() const { return mbFormatted; }
- USHORT GetCharPos( ULONG nPara, USHORT nLine, long nDocPosX, BOOL bSmart = FALSE );
- Rectangle GetEditCursor( const TextPaM& rPaM, BOOL bSpecial, BOOL bPreferPortionStart = FALSE );
- USHORT ImpFindIndex( ULONG nPortion, const Point& rPosInPara, BOOL bSmart );
- long ImpGetPortionXOffset( ULONG nPara, TextLine* pLine, USHORT nTextPortion );
- long ImpGetXPos( ULONG nPara, TextLine* pLine, USHORT nIndex, BOOL bPreferPortionStart = FALSE );
- long ImpGetOutputOffset( ULONG nPara, TextLine* pLine, USHORT nIndex, USHORT nIndex2 );
- BYTE ImpGetRightToLeft( ULONG nPara, USHORT nPos, USHORT* pStart = NULL, USHORT* pEnd = NULL );
- void ImpInitLayoutMode( OutputDevice* pOutDev, BOOL bDrawingR2LPortion = FALSE );
+ sal_uInt16 GetCharPos( sal_uLong nPara, sal_uInt16 nLine, long nDocPosX, sal_Bool bSmart = sal_False );
+ Rectangle GetEditCursor( const TextPaM& rPaM, sal_Bool bSpecial, sal_Bool bPreferPortionStart = sal_False );
+ sal_uInt16 ImpFindIndex( sal_uLong nPortion, const Point& rPosInPara, sal_Bool bSmart );
+ long ImpGetPortionXOffset( sal_uLong nPara, TextLine* pLine, sal_uInt16 nTextPortion );
+ long ImpGetXPos( sal_uLong nPara, TextLine* pLine, sal_uInt16 nIndex, sal_Bool bPreferPortionStart = sal_False );
+ long ImpGetOutputOffset( sal_uLong nPara, TextLine* pLine, sal_uInt16 nIndex, sal_uInt16 nIndex2 );
+ sal_uInt8 ImpGetRightToLeft( sal_uLong nPara, sal_uInt16 nPos, sal_uInt16* pStart = NULL, sal_uInt16* pEnd = NULL );
+ void ImpInitLayoutMode( OutputDevice* pOutDev, sal_Bool bDrawingR2LPortion = sal_False );
TxtAlign ImpGetAlign() const;
- ULONG CalcTextHeight();
- ULONG CalcParaHeight( ULONG nParagraph ) const;
- ULONG CalcTextWidth( ULONG nPara );
- ULONG CalcTextWidth( ULONG nPara, USHORT nPortionStart, USHORT nPortionLen, const Font* pFont = 0 );
- Range GetInvalidYOffsets( ULONG nPortion );
+ sal_uLong CalcTextHeight();
+ sal_uLong CalcParaHeight( sal_uLong nParagraph ) const;
+ sal_uLong CalcTextWidth( sal_uLong nPara );
+ sal_uLong CalcTextWidth( sal_uLong nPara, sal_uInt16 nPortionStart, sal_uInt16 nPortionLen, const Font* pFont = 0 );
+ Range GetInvalidYOffsets( sal_uLong nPortion );
// Fuer Undo/Redo
- void InsertContent( TextNode* pNode, ULONG nPara );
- TextPaM SplitContent( ULONG nNode, USHORT nSepPos );
- TextPaM ConnectContents( ULONG nLeftNode );
+ void InsertContent( TextNode* pNode, sal_uLong nPara );
+ TextPaM SplitContent( sal_uLong nNode, sal_uInt16 nSepPos );
+ TextPaM ConnectContents( sal_uLong nLeftNode );
// Ans API uebergebene PaM's und Selektionen auf einen gueltigen Bereich einstellen
void ValidateSelection( TextSelection& rSel ) const;
@@ -236,80 +240,81 @@ public:
String GetTextLines( LineEnd aSeparator = LINEEND_LF ) const;
void ReplaceText(const TextSelection& rSel, const String& rText);
- ULONG GetTextLen( LineEnd aSeparator = LINEEND_LF ) const;
- ULONG GetTextLen( const TextSelection& rSel, LineEnd aSeparator = LINEEND_LF ) const;
+ sal_uLong GetTextLen( LineEnd aSeparator = LINEEND_LF ) const;
+ sal_uLong GetTextLen( const TextSelection& rSel, LineEnd aSeparator = LINEEND_LF ) const;
void SetFont( const Font& rFont );
const Font& GetFont() const { return maFont; }
- void SetDefTab( USHORT nDefTab );
- USHORT GetDefTab() const;
+ void SetDefTab( sal_uInt16 nDefTab );
+ sal_uInt16 GetDefTab() const;
- void SetLeftMargin( USHORT n );
- USHORT GetLeftMargin() const;
+ void SetLeftMargin( sal_uInt16 n );
+ sal_uInt16 GetLeftMargin() const;
- void SetUpdateMode( BOOL bUpdate );
- BOOL GetUpdateMode() const { return mbUpdate; }
+ void SetUpdateMode( sal_Bool bUpdate );
+ sal_Bool GetUpdateMode() const { return mbUpdate; }
- USHORT GetViewCount() const;
- TextView* GetView( USHORT nView ) const;
+ sal_uInt16 GetViewCount() const;
+ TextView* GetView( sal_uInt16 nView ) const;
void InsertView( TextView* pTextView );
void RemoveView( TextView* pTextView );
TextView* GetActiveView() const;
void SetActiveView( TextView* pView );
- void SetMaxTextLen( ULONG nLen );
- ULONG GetMaxTextLen() const { return mnMaxTextLen; }
+ void SetMaxTextLen( sal_uLong nLen );
+ sal_uLong GetMaxTextLen() const { return mnMaxTextLen; }
- void SetMaxTextWidth( ULONG nWidth );
- ULONG GetMaxTextWidth() const { return mnMaxTextWidth; }
+ void SetMaxTextWidth( sal_uLong nWidth );
+ sal_uLong GetMaxTextWidth() const { return mnMaxTextWidth; }
- ULONG GetTextHeight() const;
- ULONG CalcTextWidth();
- USHORT GetCharHeight() const { return mnCharHeight; }
+ sal_uLong GetTextHeight() const;
+ sal_uLong CalcTextWidth();
+ sal_uInt16 GetCharHeight() const { return mnCharHeight; }
- ULONG GetParagraphCount() const;
- String GetText( ULONG nParagraph ) const;
- USHORT GetTextLen( ULONG nParagraph ) const;
- ULONG GetTextHeight( ULONG nParagraph ) const;
+ sal_uLong GetParagraphCount() const;
+ String GetText( sal_uLong nParagraph ) const;
+ sal_uInt16 GetTextLen( sal_uLong nParagraph ) const;
+ sal_uLong GetTextHeight( sal_uLong nParagraph ) const;
- USHORT GetLineCount( ULONG nParagraph ) const;
- USHORT GetLineLen( ULONG nParagraph, USHORT nLine ) const;
+ sal_uInt16 GetLineCount( sal_uLong nParagraph ) const;
+ sal_uInt16 GetLineLen( sal_uLong nParagraph, sal_uInt16 nLine ) const;
- void SetRightToLeft( BOOL bR2L );
- BOOL IsRightToLeft() const { return mbRightToLeft; }
+ void SetRightToLeft( sal_Bool bR2L );
+ sal_Bool IsRightToLeft() const { return mbRightToLeft; }
- BOOL HasUndoManager() const { return mpUndoManager ? TRUE : FALSE; }
- SfxUndoManager& GetUndoManager();
- void UndoActionStart( USHORT nId );
- void UndoActionEnd( USHORT nId );
- void InsertUndo( TextUndo* pUndo, BOOL bTryMerge = FALSE );
- BOOL IsInUndo() { return mbIsInUndo; }
- void SetIsInUndo( BOOL bInUndo ) { mbIsInUndo = bInUndo; }
+ sal_Bool HasUndoManager() const { return mpUndoManager ? sal_True : sal_False; }
+ ::svl::IUndoManager&
+ GetUndoManager();
+ void UndoActionStart( sal_uInt16 nId = 0 );
+ void UndoActionEnd();
+ void InsertUndo( TextUndo* pUndo, sal_Bool bTryMerge = sal_False );
+ sal_Bool IsInUndo() { return mbIsInUndo; }
+ void SetIsInUndo( sal_Bool bInUndo ) { mbIsInUndo = bInUndo; }
void ResetUndo();
- void EnableUndo( BOOL bEnable );
- BOOL IsUndoEnabled() { return mbUndoEnabled; }
+ void EnableUndo( sal_Bool bEnable );
+ sal_Bool IsUndoEnabled() { return mbUndoEnabled; }
- void SetModified( BOOL bModified ) { mbModified = bModified; }
- BOOL IsModified() const { return mbModified; }
+ void SetModified( sal_Bool bModified ) { mbModified = bModified; }
+ sal_Bool IsModified() const { return mbModified; }
- BOOL Read( SvStream& rInput, const TextSelection* pSel = NULL );
+ sal_Bool Read( SvStream& rInput, const TextSelection* pSel = NULL );
- BOOL Write( SvStream& rOutput, const TextSelection* pSel = NULL, BOOL bHTML = FALSE );
+ sal_Bool Write( SvStream& rOutput, const TextSelection* pSel = NULL, sal_Bool bHTML = sal_False );
- TextPaM GetPaM( const Point& rDocPos, BOOL bSmart = TRUE );
- Rectangle PaMtoEditCursor( const TextPaM& rPaM, BOOL bSpecial = FALSE );
+ TextPaM GetPaM( const Point& rDocPos, sal_Bool bSmart = sal_True );
+ Rectangle PaMtoEditCursor( const TextPaM& rPaM, sal_Bool bSpecial = sal_False );
String GetWord( const TextPaM& rCursorPos, TextPaM* pStartOfWord = 0 );
- BOOL HasAttrib( USHORT nWhich ) const;
- const TextAttrib* FindAttrib( const TextPaM& rPaM, USHORT nWhich ) const;
- const TextCharAttrib* FindCharAttrib( const TextPaM& rPaM, USHORT nWhich ) const;
+ sal_Bool HasAttrib( sal_uInt16 nWhich ) const;
+ const TextAttrib* FindAttrib( const TextPaM& rPaM, sal_uInt16 nWhich ) const;
+ const TextCharAttrib* FindCharAttrib( const TextPaM& rPaM, sal_uInt16 nWhich ) const;
- void RemoveAttribs( ULONG nPara, USHORT nWhich, BOOL bIdleFormatAndUpdate );
- void RemoveAttrib( ULONG nPara, const TextCharAttrib& rAttrib );
- void RemoveAttribs( ULONG nPara, BOOL bIdleFormatAndUpdate = TRUE );
- void SetAttrib( const TextAttrib& rAttr, ULONG nPara, USHORT nStart, USHORT nEnd, BOOL bIdleFormatAndUpdate = TRUE );
+ void RemoveAttribs( sal_uLong nPara, sal_uInt16 nWhich, sal_Bool bIdleFormatAndUpdate );
+ void RemoveAttrib( sal_uLong nPara, const TextCharAttrib& rAttrib );
+ void RemoveAttribs( sal_uLong nPara, sal_Bool bIdleFormatAndUpdate = sal_True );
+ void SetAttrib( const TextAttrib& rAttr, sal_uLong nPara, sal_uInt16 nStart, sal_uInt16 nEnd, sal_Bool bIdleFormatAndUpdate = sal_True );
TxtAlign GetTextAlign() const { return meAlign; }
void SetTextAlign( TxtAlign eAlign );
@@ -320,9 +325,9 @@ public:
::com::sun::star::lang::Locale GetLocale();
::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator > GetBreakIterator();
- static BOOL DoesKeyChangeText( const KeyEvent& rKeyEvent );
- static BOOL DoesKeyMoveCursor( const KeyEvent& rKeyEvent );
- static BOOL IsSimpleCharInput( const KeyEvent& rKeyEvent );
+ static sal_Bool DoesKeyChangeText( const KeyEvent& rKeyEvent );
+ static sal_Bool DoesKeyMoveCursor( const KeyEvent& rKeyEvent );
+ static sal_Bool IsSimpleCharInput( const KeyEvent& rKeyEvent );
};
#endif // _TEXTENG_HXX
diff --git a/svtools/inc/svtools/textview.hxx b/svtools/inc/svtools/textview.hxx
index c17084a1d693..f1f25685e68b 100644
--- a/svtools/inc/svtools/textview.hxx
+++ b/svtools/inc/svtools/textview.hxx
@@ -73,16 +73,16 @@ protected:
void ShowSelection();
void HideSelection();
void ShowSelection( const TextSelection& rSel );
- void ImpShowHideSelection( BOOL bShow, const TextSelection* pRange = NULL );
+ void ImpShowHideSelection( sal_Bool bShow, const TextSelection* pRange = NULL );
TextSelection ImpMoveCursor( const KeyEvent& rKeyEvent );
- TextPaM ImpDelete( BOOL bForward, BYTE nMode );
- void ImpSetSelection( const TextSelection& rNewSel, BOOL bUI );
- BOOL IsInSelection( const TextPaM& rPaM );
+ TextPaM ImpDelete( sal_Bool bForward, sal_uInt8 nMode );
+ void ImpSetSelection( const TextSelection& rNewSel, sal_Bool bUI );
+ sal_Bool IsInSelection( const TextPaM& rPaM );
void ImpPaint( OutputDevice* pOut, const Point& rStartPos, Rectangle const* pPaintArea, TextSelection const* pPaintRange = 0, TextSelection const* pSelection = 0 );
- void ImpPaint( const Rectangle& rRect, BOOL bUseVirtDev );
- void ImpShowCursor( BOOL bGotoCursor, BOOL bForceVisCursor, BOOL bEndKey );
+ void ImpPaint( const Rectangle& rRect, sal_Bool bUseVirtDev );
+ void ImpShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, sal_Bool bEndKey );
void ImpHighlight( const TextSelection& rSel );
void ImpSetSelection( const TextSelection& rSelection );
Point ImpGetOutputStartPos( const Point& rStartDocPos ) const;
@@ -91,7 +91,7 @@ protected:
void ImpShowDDCursor();
bool ImplTruncateNewText( rtl::OUString& rNewText ) const;
- BOOL ImplCheckTextLen( const String& rNewText );
+ sal_Bool ImplCheckTextLen( const String& rNewText );
VirtualDevice* GetVirtualDevice();
@@ -117,27 +117,27 @@ public:
void Invalidate();
void Scroll( long nHorzScroll, long nVertScroll );
- void ShowCursor( BOOL bGotoCursor = TRUE, BOOL bForceVisCursor = TRUE );
+ void ShowCursor( sal_Bool bGotoCursor = sal_True, sal_Bool bForceVisCursor = sal_True );
void HideCursor();
- void EnableCursor( BOOL bEnable );
- BOOL IsCursorEnabled() const;
+ void EnableCursor( sal_Bool bEnable );
+ sal_Bool IsCursorEnabled() const;
const TextSelection& GetSelection() const;
TextSelection& GetSelection();
void SetSelection( const TextSelection& rNewSel );
- void SetSelection( const TextSelection& rNewSel, BOOL bGotoCursor );
- BOOL HasSelection() const;
+ void SetSelection( const TextSelection& rNewSel, sal_Bool bGotoCursor );
+ sal_Bool HasSelection() const;
String GetSelected();
String GetSelected( LineEnd aSeparator );
void DeleteSelected();
- void InsertNewText( const rtl::OUString& rNew, BOOL bSelect = FALSE );
+ void InsertNewText( const rtl::OUString& rNew, sal_Bool bSelect = sal_False );
// deprecated: use InsertNewText instead
- void InsertText( const String& rNew, BOOL bSelect = FALSE );
+ void InsertText( const String& rNew, sal_Bool bSelect = sal_False );
- BOOL KeyInput( const KeyEvent& rKeyEvent );
+ sal_Bool KeyInput( const KeyEvent& rKeyEvent );
void Paint( const Rectangle& rRect );
void MouseButtonUp( const MouseEvent& rMouseEvent );
void MouseButtonDown( const MouseEvent& rMouseEvent );
@@ -154,8 +154,8 @@ public:
void Undo();
void Redo();
- BOOL Read( SvStream& rInput );
- BOOL Write( SvStream& rOutput );
+ sal_Bool Read( SvStream& rInput );
+ sal_Bool Write( SvStream& rOutput );
void SetStartDocPos( const Point& rPos );
const Point& GetStartDocPos() const;
@@ -163,26 +163,26 @@ public:
Point GetDocPos( const Point& rWindowPos ) const;
Point GetWindowPos( const Point& rDocPos ) const;
- void SetInsertMode( BOOL bInsert );
- BOOL IsInsertMode() const;
+ void SetInsertMode( sal_Bool bInsert );
+ sal_Bool IsInsertMode() const;
- void SetAutoIndentMode( BOOL bAutoIndent );
- BOOL IsAutoIndentMode() const;
+ void SetAutoIndentMode( sal_Bool bAutoIndent );
+ sal_Bool IsAutoIndentMode() const;
- void SetReadOnly( BOOL bReadOnly );
- BOOL IsReadOnly() const;
+ void SetReadOnly( sal_Bool bReadOnly );
+ sal_Bool IsReadOnly() const;
- void SetAutoScroll( BOOL bAutoScroll );
- BOOL IsAutoScroll() const;
+ void SetAutoScroll( sal_Bool bAutoScroll );
+ sal_Bool IsAutoScroll() const;
- BOOL SetCursorAtPoint( const Point& rPointPixel );
- BOOL IsSelectionAtPoint( const Point& rPointPixel );
+ sal_Bool SetCursorAtPoint( const Point& rPointPixel );
+ sal_Bool IsSelectionAtPoint( const Point& rPointPixel );
- void SetPaintSelection( BOOL bPaint);
- BOOL IsPaintSelection() const;
+ void SetPaintSelection( sal_Bool bPaint);
+ sal_Bool IsPaintSelection() const;
- void SetHighlightSelection( BOOL bSelectByHighlight );
- BOOL IsHighlightSelection() const;
+ void SetHighlightSelection( sal_Bool bSelectByHighlight );
+ sal_Bool IsHighlightSelection() const;
void EraseVirtualDevice();
@@ -192,8 +192,8 @@ public:
TextPaM PageDown( const TextPaM& rPaM );
TextPaM CursorUp( const TextPaM& rPaM );
TextPaM CursorDown( const TextPaM& rPaM );
- TextPaM CursorLeft( const TextPaM& rPaM, USHORT nCharacterIteratorMode );
- TextPaM CursorRight( const TextPaM& rPaM, USHORT nCharacterIteratorMode );
+ TextPaM CursorLeft( const TextPaM& rPaM, sal_uInt16 nCharacterIteratorMode );
+ TextPaM CursorRight( const TextPaM& rPaM, sal_uInt16 nCharacterIteratorMode );
TextPaM CursorWordLeft( const TextPaM& rPaM );
TextPaM CursorWordRight( const TextPaM& rPaM );
TextPaM CursorStartOfLine( const TextPaM& rPaM );
@@ -204,8 +204,8 @@ public:
TextPaM CursorEndOfDoc();
// Old, remove!
- TextPaM CursorLeft( const TextPaM& rPaM, BOOL bWordMode = FALSE );
- TextPaM CursorRight( const TextPaM& rPaM, BOOL bWordMode = FALSE );
+ TextPaM CursorLeft( const TextPaM& rPaM, sal_Bool bWordMode = sal_False );
+ TextPaM CursorRight( const TextPaM& rPaM, sal_Bool bWordMode = sal_False );
/**
Drag and Drop, deleting and selection regards all text that has an attribute
diff --git a/svtools/inc/svtools/toolpanel/paneltabbar.hxx b/svtools/inc/svtools/toolpanel/paneltabbar.hxx
index 668935d8a739..0d24b76e5684 100644
--- a/svtools/inc/svtools/toolpanel/paneltabbar.hxx
+++ b/svtools/inc/svtools/toolpanel/paneltabbar.hxx
@@ -88,7 +88,7 @@ namespace svt
virtual void DataChanged( const DataChangedEvent& i_rDataChanedEvent );
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >
- GetComponentInterface( BOOL i_bCreate );
+ GetComponentInterface( sal_Bool i_bCreate );
private:
::std::auto_ptr< PanelTabBar_Impl > m_pImpl;
diff --git a/svtools/inc/svtools/toolpanel/toolpaneldeck.hxx b/svtools/inc/svtools/toolpanel/toolpaneldeck.hxx
index a1009591ffba..15367703f39a 100755
--- a/svtools/inc/svtools/toolpanel/toolpaneldeck.hxx
+++ b/svtools/inc/svtools/toolpanel/toolpaneldeck.hxx
@@ -177,7 +177,7 @@ namespace svt
virtual void GetFocus();
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >
- GetComponentInterface( BOOL i_bCreate );
+ GetComponentInterface( sal_Bool i_bCreate );
private:
::std::auto_ptr< ToolPanelDeck_Impl > m_pImpl;
diff --git a/svtools/inc/svtools/transfer.hxx b/svtools/inc/svtools/transfer.hxx
index 5eac1484fff9..ce7d1fdc5e47 100644
--- a/svtools/inc/svtools/transfer.hxx
+++ b/svtools/inc/svtools/transfer.hxx
@@ -573,11 +573,11 @@ public:
void CopyImageMap( const ImageMap& rImgMap );
void CopyGraphic( const Graphic& rGrf );
void CopyString( const String& rStr );
- void CopyString( USHORT nFmt, const String& rStr );
- void CopyAny( USHORT nFmt, const ::com::sun::star::uno::Any& rAny );
+ void CopyString( sal_uInt16 nFmt, const String& rStr );
+ void CopyAny( sal_uInt16 nFmt, const ::com::sun::star::uno::Any& rAny );
- void CopyByteString( ULONG nFormatId, const ByteString& rStr );
- void CopyAnyData( ULONG nFormatId, const sal_Char* pData, ULONG nLen );
+ void CopyByteString( sal_uLong nFormatId, const ByteString& rStr );
+ void CopyAnyData( sal_uLong nFormatId, const sal_Char* pData, sal_uLong nLen );
sal_Bool HasAnyData() const;
diff --git a/svtools/inc/svtools/treelist.hxx b/svtools/inc/svtools/treelist.hxx
index 3ba013d90830..6576b6a736b2 100644
--- a/svtools/inc/svtools/treelist.hxx
+++ b/svtools/inc/svtools/treelist.hxx
@@ -66,10 +66,10 @@ class SvListEntry;
class SvTreeEntryList : public List // SvEntryListStd
{
public:
- SvTreeEntryList(USHORT nInitPos=16, USHORT nResize=16 )
+ SvTreeEntryList(sal_uInt16 nInitPos=16, sal_uInt16 nResize=16 )
: List( nInitPos, nResize )
{}
- SvTreeEntryList(USHORT BlockSize, USHORT InitSize, USHORT Resize )
+ SvTreeEntryList(sal_uInt16 BlockSize, sal_uInt16 InitSize, sal_uInt16 Resize )
: List(BlockSize, InitSize, Resize )
{}
@@ -84,8 +84,8 @@ friend class SvListView;
private:
SvListEntry* pParent;
SvTreeEntryList* pChilds;
- ULONG nAbsPos;
- ULONG nListPos;
+ sal_uLong nAbsPos;
+ sal_uLong nListPos;
void SetListPositions();
void InvalidateChildrensListPositions()
@@ -96,14 +96,14 @@ public:
SvListEntry();
SvListEntry( const SvListEntry& );
virtual ~SvListEntry();
- BOOL HasChilds() { return (BOOL)(pChilds!=0); }
- BOOL HasChildListPos() const
+ sal_Bool HasChilds() { return (sal_Bool)(pChilds!=0); }
+ sal_Bool HasChildListPos() const
{
if( pParent && !(pParent->nListPos & 0x80000000) )
- return TRUE;
- else return FALSE;
+ return sal_True;
+ else return sal_False;
}
- ULONG GetChildListPos() const
+ sal_uLong GetChildListPos() const
{
if( pParent && (pParent->nListPos & 0x80000000) )
pParent->SetListPositions();
@@ -119,26 +119,26 @@ class SvViewData
friend class SvTreeList;
friend class SvListView;
- ULONG nVisPos;
+ sal_uLong nVisPos;
protected:
- USHORT nFlags;
+ sal_uInt16 nFlags;
public:
SvViewData();
SvViewData( const SvViewData& );
virtual ~SvViewData();
- BOOL IsSelected() const { return (BOOL)(nFlags&SVLISTENTRYFLAG_SELECTED)!=0; }
- BOOL IsExpanded() const { return (BOOL)(nFlags&SVLISTENTRYFLAG_EXPANDED)!=0; }
- BOOL HasFocus() const { return (BOOL)(nFlags&SVLISTENTRYFLAG_FOCUSED)!=0; }
- void SetFocus( BOOL bFocus)
+ sal_Bool IsSelected() const { return (sal_Bool)(nFlags&SVLISTENTRYFLAG_SELECTED)!=0; }
+ sal_Bool IsExpanded() const { return (sal_Bool)(nFlags&SVLISTENTRYFLAG_EXPANDED)!=0; }
+ sal_Bool HasFocus() const { return (sal_Bool)(nFlags&SVLISTENTRYFLAG_FOCUSED)!=0; }
+ void SetFocus( sal_Bool bFocus)
{
if ( !bFocus )
nFlags &= (~SVLISTENTRYFLAG_FOCUSED);
else
nFlags |= SVLISTENTRYFLAG_FOCUSED;
}
- BOOL IsCursored() const { return (BOOL)(nFlags&SVLISTENTRYFLAG_CURSORED)!=0; }
- void SetCursored( BOOL bCursored )
+ sal_Bool IsCursored() const { return (sal_Bool)(nFlags&SVLISTENTRYFLAG_CURSORED)!=0; }
+ void SetCursored( sal_Bool bCursored )
{
if ( !bCursored )
nFlags &= (~SVLISTENTRYFLAG_CURSORED);
@@ -146,7 +146,7 @@ public:
nFlags |= SVLISTENTRYFLAG_CURSORED;
}
- USHORT GetFlags() const { return nFlags; }
+ sal_uInt16 GetFlags() const { return nFlags; }
void SetSelectable( bool bSelectable )
{
@@ -174,38 +174,38 @@ class SVT_DLLPUBLIC SvTreeList
friend class SvListView;
List aViewList;
- ULONG nEntryCount;
+ sal_uLong nEntryCount;
Link aCloneLink;
Link aCompareLink;
SvSortMode eSortMode;
- USHORT nRefCount;
+ sal_uInt16 nRefCount;
- BOOL bAbsPositionsValid;
+ sal_Bool bAbsPositionsValid;
SvListEntry* FirstVisible() const { return First(); }
- SvListEntry* NextVisible( const SvListView*,SvListEntry* pEntry, USHORT* pDepth=0 ) const;
- SvListEntry* PrevVisible( const SvListView*,SvListEntry* pEntry, USHORT* pDepth=0 ) const;
- SvListEntry* LastVisible( const SvListView*,USHORT* pDepth=0 ) const;
- SvListEntry* NextVisible( const SvListView*,SvListEntry* pEntry, USHORT& rDelta ) const;
- SvListEntry* PrevVisible( const SvListView*,SvListEntry* pEntry, USHORT& rDelta ) const;
-
- BOOL IsEntryVisible( const SvListView*,SvListEntry* pEntry ) const;
- SvListEntry* GetEntryAtVisPos( const SvListView*,ULONG nVisPos ) const;
- ULONG GetVisiblePos( const SvListView*,SvListEntry* pEntry ) const;
- ULONG GetVisibleCount( const SvListView* ) const;
- ULONG GetVisibleChildCount( const SvListView*,SvListEntry* pParent ) const;
+ SvListEntry* NextVisible( const SvListView*,SvListEntry* pEntry, sal_uInt16* pDepth=0 ) const;
+ SvListEntry* PrevVisible( const SvListView*,SvListEntry* pEntry, sal_uInt16* pDepth=0 ) const;
+ SvListEntry* LastVisible( const SvListView*,sal_uInt16* pDepth=0 ) const;
+ SvListEntry* NextVisible( const SvListView*,SvListEntry* pEntry, sal_uInt16& rDelta ) const;
+ SvListEntry* PrevVisible( const SvListView*,SvListEntry* pEntry, sal_uInt16& rDelta ) const;
+
+ sal_Bool IsEntryVisible( const SvListView*,SvListEntry* pEntry ) const;
+ SvListEntry* GetEntryAtVisPos( const SvListView*,sal_uLong nVisPos ) const;
+ sal_uLong GetVisiblePos( const SvListView*,SvListEntry* pEntry ) const;
+ sal_uLong GetVisibleCount( const SvListView* ) const;
+ sal_uLong GetVisibleChildCount( const SvListView*,SvListEntry* pParent ) const;
SvListEntry* FirstSelected( const SvListView*) const;
SvListEntry* NextSelected( const SvListView*,SvListEntry* pEntry ) const;
SvListEntry* PrevSelected( const SvListView*,SvListEntry* pEntry ) const;
SvListEntry* LastSelected( const SvListView*) const;
- BOOL Select( SvListView*,SvListEntry* pEntry, BOOL bSelect=TRUE );
- ULONG SelectChilds( SvListView*,SvListEntry* pParent, BOOL bSelect );
- void SelectAll( SvListView*,BOOL bSelect ); // ruft nicht Select-Hdl
- ULONG GetChildSelectionCount( const SvListView*,SvListEntry* pParent ) const;
+ sal_Bool Select( SvListView*,SvListEntry* pEntry, sal_Bool bSelect=sal_True );
+ sal_uLong SelectChilds( SvListView*,SvListEntry* pParent, sal_Bool bSelect );
+ void SelectAll( SvListView*,sal_Bool bSelect ); // ruft nicht Select-Hdl
+ sal_uLong GetChildSelectionCount( const SvListView*,SvListEntry* pParent ) const;
void Expand( SvListView*,SvListEntry* pParent );
void Collapse( SvListView*,SvListEntry* pParent );
@@ -214,12 +214,12 @@ class SVT_DLLPUBLIC SvTreeList
SVT_DLLPRIVATE void SetAbsolutePositions();
SVT_DLLPRIVATE SvTreeEntryList*CloneChilds( SvTreeEntryList* pChilds,
SvListEntry* pNewParent,
- ULONG& nCloneCount ) const;
+ sal_uLong& nCloneCount ) const;
SVT_DLLPRIVATE void SetListPositions( SvTreeEntryList* );
// rPos wird bei SortModeNone nicht geaendert
SVT_DLLPRIVATE void GetInsertionPos( SvListEntry* pEntry, SvListEntry* pParent,
- ULONG& rPos );
+ sal_uLong& rPos );
SVT_DLLPRIVATE void ResortChilds( SvListEntry* pParent );
//#endif /* _SOLAR__PRIVATE */
@@ -234,57 +234,57 @@ public:
void InsertView( SvListView* );
void RemoveView( SvListView* );
- ULONG GetViewCount() const { return aViewList.Count(); }
- SvListView* GetView(ULONG nPos) const {return (SvListView*)aViewList.GetObject(nPos);}
- void Broadcast( USHORT nActionId, SvListEntry* pEntry1=0,
- SvListEntry* pEntry2=0, ULONG nPos=0 );
+ sal_uLong GetViewCount() const { return aViewList.Count(); }
+ SvListView* GetView(sal_uLong nPos) const {return (SvListView*)aViewList.GetObject(nPos);}
+ void Broadcast( sal_uInt16 nActionId, SvListEntry* pEntry1=0,
+ SvListEntry* pEntry2=0, sal_uLong nPos=0 );
// informiert alle Listener
void InvalidateEntry( SvListEntry* );
- ULONG GetEntryCount() const { return nEntryCount; }
+ sal_uLong GetEntryCount() const { return nEntryCount; }
SvListEntry* First() const;
- SvListEntry* Next( SvListEntry* pEntry, USHORT* pDepth=0 ) const;
- SvListEntry* Prev( SvListEntry* pEntry, USHORT* pDepth=0 ) const;
- SvListEntry* Last( USHORT* pDepth=0 ) const;
+ SvListEntry* Next( SvListEntry* pEntry, sal_uInt16* pDepth=0 ) const;
+ SvListEntry* Prev( SvListEntry* pEntry, sal_uInt16* pDepth=0 ) const;
+ SvListEntry* Last( sal_uInt16* pDepth=0 ) const;
SvListEntry* FirstChild( SvListEntry* pParent ) const;
SvListEntry* NextSibling( SvListEntry* pEntry ) const;
SvListEntry* PrevSibling( SvListEntry* pEntry ) const;
SvListEntry* LastSibling( SvListEntry* pEntry ) const;
- ULONG Insert( SvListEntry* pEntry,SvListEntry* pPar,ULONG nPos=LIST_APPEND);
- ULONG Insert( SvListEntry* pEntry,ULONG nRootPos = LIST_APPEND ) { return Insert(pEntry, pRootItem, nRootPos ); }
+ sal_uLong Insert( SvListEntry* pEntry,SvListEntry* pPar,sal_uLong nPos=LIST_APPEND);
+ sal_uLong Insert( SvListEntry* pEntry,sal_uLong nRootPos = LIST_APPEND ) { return Insert(pEntry, pRootItem, nRootPos ); }
void InsertTree( SvListEntry* pTree, SvListEntry* pTarget );
void InsertTree( SvListEntry* pTree, SvListEntry* pTargetParent,
- ULONG nListPos );
+ sal_uLong nListPos );
// Entries muessen im gleichen Model stehen!
void Move( SvListEntry* pSource, SvListEntry* pTarget );
// erzeugt ggf. Child-List
- ULONG Move( SvListEntry* pSource, SvListEntry* pTargetParent,
- ULONG nListPos);
+ sal_uLong Move( SvListEntry* pSource, SvListEntry* pTargetParent,
+ sal_uLong nListPos);
void Copy( SvListEntry* pSource, SvListEntry* pTarget );
- ULONG Copy( SvListEntry* pSource, SvListEntry* pTargetParent,
- ULONG nListPos);
+ sal_uLong Copy( SvListEntry* pSource, SvListEntry* pTargetParent,
+ sal_uLong nListPos);
- BOOL Remove( SvListEntry* pEntry );
+ sal_Bool Remove( SvListEntry* pEntry );
void Clear();
- BOOL HasChilds( SvListEntry* pEntry ) const;
- BOOL HasParent( SvListEntry* pEntry ) const { return (BOOL)(pEntry->pParent!=pRootItem); }
- BOOL IsChild( SvListEntry* pParent, SvListEntry* pChild ) const;
- BOOL IsInChildList( SvListEntry* pParent, SvListEntry* pChild) const;
- SvListEntry* GetEntry( SvListEntry* pParent, ULONG nPos ) const;
- SvListEntry* GetEntry( ULONG nRootPos ) const;
- SvListEntry* GetEntryAtAbsPos( ULONG nAbsPos ) const;
+ sal_Bool HasChilds( SvListEntry* pEntry ) const;
+ sal_Bool HasParent( SvListEntry* pEntry ) const { return (sal_Bool)(pEntry->pParent!=pRootItem); }
+ sal_Bool IsChild( SvListEntry* pParent, SvListEntry* pChild ) const;
+ sal_Bool IsInChildList( SvListEntry* pParent, SvListEntry* pChild) const;
+ SvListEntry* GetEntry( SvListEntry* pParent, sal_uLong nPos ) const;
+ SvListEntry* GetEntry( sal_uLong nRootPos ) const;
+ SvListEntry* GetEntryAtAbsPos( sal_uLong nAbsPos ) const;
SvListEntry* GetParent( SvListEntry* pEntry ) const;
SvListEntry* GetRootLevelParent( SvListEntry* pEntry ) const;
SvTreeEntryList* GetChildList( SvListEntry* pParent ) const;
- ULONG GetAbsPos( SvListEntry* pEntry ) const;
- ULONG GetRelPos( SvListEntry* pChild ) const { return pChild->GetChildListPos(); }
- ULONG GetChildCount( SvListEntry* pParent ) const;
- USHORT GetDepth( SvListEntry* pEntry ) const;
- BOOL IsAtRootDepth( SvListEntry* pEntry ) const { return (BOOL)(pEntry->pParent==pRootItem); }
+ sal_uLong GetAbsPos( SvListEntry* pEntry ) const;
+ sal_uLong GetRelPos( SvListEntry* pChild ) const { return pChild->GetChildListPos(); }
+ sal_uLong GetChildCount( SvListEntry* pParent ) const;
+ sal_uInt16 GetDepth( SvListEntry* pEntry ) const;
+ sal_Bool IsAtRootDepth( SvListEntry* pEntry ) const { return (sal_Bool)(pEntry->pParent==pRootItem); }
// das Model ruft zum Clonen von Entries den Clone-Link auf,
// damit man sich nicht vom Model ableiten muss, wenn man
@@ -292,14 +292,14 @@ public:
// Deklaration des Clone-Handlers:
// DECL_LINK(CloneHdl,SvListEntry*);
// der Handler muss einen SvListEntry* zurueckgeben
- SvListEntry* Clone( SvListEntry* pEntry, ULONG& nCloneCount ) const;
+ SvListEntry* Clone( SvListEntry* pEntry, sal_uLong& nCloneCount ) const;
void SetCloneLink( const Link& rLink ) { aCloneLink=rLink; }
const Link& GetCloneLink() const { return aCloneLink; }
virtual SvListEntry* CloneEntry( SvListEntry* ) const; // ruft den Clone-Link
virtual SvListEntry* CreateEntry() const; // zum 'new'en von Entries
- USHORT GetRefCount() const { return nRefCount; }
- void SetRefCount( USHORT nRef ) { nRefCount = nRef; }
+ sal_uInt16 GetRefCount() const { return nRefCount; }
+ void SetRefCount( sal_uInt16 nRef ) { nRefCount = nRef; }
void SetSortMode( SvSortMode eMode ) { eSortMode = eMode; }
SvSortMode GetSortMode() const { return eSortMode; }
@@ -315,9 +315,9 @@ class SVT_DLLPUBLIC SvListView
{
friend class SvTreeList;
- ULONG nVisibleCount;
- ULONG nSelectionCount;
- BOOL bVisPositionsValid;
+ sal_uLong nVisibleCount;
+ sal_uLong nSelectionCount;
+ sal_Bool bVisPositionsValid;
//#if 0 // _SOLAR__PRIVATE
SVT_DLLPRIVATE void InitTable();
@@ -329,8 +329,8 @@ protected:
Table aDataTable; // Mapping SvListEntry -> ViewData
SvTreeList* pModel;
- void ActionMoving( SvListEntry* pEntry,SvListEntry* pTargetPrnt,ULONG nChildPos);
- void ActionMoved( SvListEntry* pEntry,SvListEntry* pTargetPrnt,ULONG nChildPos);
+ void ActionMoving( SvListEntry* pEntry,SvListEntry* pTargetPrnt,sal_uLong nChildPos);
+ void ActionMoved( SvListEntry* pEntry,SvListEntry* pTargetPrnt,sal_uLong nChildPos);
void ActionInserted( SvListEntry* pEntry );
void ActionInsertedTree( SvListEntry* pEntry );
void ActionRemoving( SvListEntry* pEntry );
@@ -345,40 +345,40 @@ public:
void Clear();
SvTreeList* GetModel() const { return pModel; }
virtual void SetModel( SvTreeList* );
- virtual void ModelNotification( USHORT nActionId, SvListEntry* pEntry1,
- SvListEntry* pEntry2, ULONG nPos );
+ virtual void ModelNotification( sal_uInt16 nActionId, SvListEntry* pEntry1,
+ SvListEntry* pEntry2, sal_uLong nPos );
- ULONG GetVisibleCount() const { return pModel->GetVisibleCount( (SvListView*)this );}
+ sal_uLong GetVisibleCount() const { return pModel->GetVisibleCount( (SvListView*)this );}
SvListEntry* FirstVisible() const { return pModel->FirstVisible(); }
- SvListEntry* NextVisible( SvListEntry* pEntry, USHORT* pDepth=0 ) const {return pModel->NextVisible(this,pEntry,pDepth); }
- SvListEntry* PrevVisible( SvListEntry* pEntry, USHORT* pDepth=0 ) const {return pModel->PrevVisible(this,pEntry,pDepth); }
- SvListEntry* LastVisible( USHORT* pDepth=0 ) const { return pModel->LastVisible(this,pDepth);}
- SvListEntry* NextVisible( SvListEntry* pEntry, USHORT& rDelta ) const { return pModel->NextVisible(this,pEntry,rDelta); }
- SvListEntry* PrevVisible( SvListEntry* pEntry, USHORT& rDelta ) const { return pModel->PrevVisible(this,pEntry,rDelta); }
+ SvListEntry* NextVisible( SvListEntry* pEntry, sal_uInt16* pDepth=0 ) const {return pModel->NextVisible(this,pEntry,pDepth); }
+ SvListEntry* PrevVisible( SvListEntry* pEntry, sal_uInt16* pDepth=0 ) const {return pModel->PrevVisible(this,pEntry,pDepth); }
+ SvListEntry* LastVisible( sal_uInt16* pDepth=0 ) const { return pModel->LastVisible(this,pDepth);}
+ SvListEntry* NextVisible( SvListEntry* pEntry, sal_uInt16& rDelta ) const { return pModel->NextVisible(this,pEntry,rDelta); }
+ SvListEntry* PrevVisible( SvListEntry* pEntry, sal_uInt16& rDelta ) const { return pModel->PrevVisible(this,pEntry,rDelta); }
- ULONG GetSelectionCount() const { return nSelectionCount; }
+ sal_uLong GetSelectionCount() const { return nSelectionCount; }
SvListEntry* FirstSelected() const { return pModel->FirstSelected(this);}
SvListEntry* NextSelected( SvListEntry* pEntry ) const { return pModel->NextSelected(this,pEntry); }
SvListEntry* PrevSelected( SvListEntry* pEntry ) const { return pModel->PrevSelected(this,pEntry); }
SvListEntry* LastSelected() const { return pModel->LastSelected(this); }
- SvListEntry* GetEntryAtVisPos( ULONG nVisPos ) const { return pModel->GetEntryAtVisPos((SvListView*)this,nVisPos); }
- ULONG GetVisiblePos( SvListEntry* pEntry ) const { return pModel->GetVisiblePos((SvListView*)this,pEntry); }
+ SvListEntry* GetEntryAtVisPos( sal_uLong nVisPos ) const { return pModel->GetEntryAtVisPos((SvListView*)this,nVisPos); }
+ sal_uLong GetVisiblePos( SvListEntry* pEntry ) const { return pModel->GetVisiblePos((SvListView*)this,pEntry); }
- ULONG GetVisibleChildCount(SvListEntry* pParent ) const { return pModel->GetVisibleChildCount((SvListView*)this,pParent); }
- ULONG GetChildSelectionCount( SvListEntry* pParent ) const { return pModel->GetChildSelectionCount((SvListView*)this,pParent); }
+ sal_uLong GetVisibleChildCount(SvListEntry* pParent ) const { return pModel->GetVisibleChildCount((SvListView*)this,pParent); }
+ sal_uLong GetChildSelectionCount( SvListEntry* pParent ) const { return pModel->GetChildSelectionCount((SvListView*)this,pParent); }
void Expand( SvListEntry* pParent ) { pModel->Expand((SvListView*)this,pParent); }
void Collapse( SvListEntry* pParent ) { pModel->Collapse((SvListView*)this,pParent); }
- BOOL Select( SvListEntry* pEntry, BOOL bSelect=TRUE ) { return pModel->Select((SvListView*)this,pEntry,bSelect); }
- ULONG SelectChilds( SvListEntry* pParent, BOOL bSelect ) { return pModel->SelectChilds((SvListView*)this,pParent, bSelect); }
+ sal_Bool Select( SvListEntry* pEntry, sal_Bool bSelect=sal_True ) { return pModel->Select((SvListView*)this,pEntry,bSelect); }
+ sal_uLong SelectChilds( SvListEntry* pParent, sal_Bool bSelect ) { return pModel->SelectChilds((SvListView*)this,pParent, bSelect); }
// ruft nicht Select-Hdl
- virtual void SelectAll( BOOL bSelect, BOOL ) { pModel->SelectAll((SvListView*)this, bSelect); }
- BOOL IsEntryVisible( SvListEntry* pEntry ) const { return pModel->IsEntryVisible((SvListView*)this,pEntry); }
- BOOL IsExpanded( SvListEntry* pEntry ) const;
- BOOL IsSelected( SvListEntry* pEntry ) const;
- BOOL HasEntryFocus( SvListEntry* pEntry ) const;
- void SetEntryFocus( SvListEntry* pEntry, BOOL bFocus ) const;
+ virtual void SelectAll( sal_Bool bSelect, sal_Bool ) { pModel->SelectAll((SvListView*)this, bSelect); }
+ sal_Bool IsEntryVisible( SvListEntry* pEntry ) const { return pModel->IsEntryVisible((SvListView*)this,pEntry); }
+ sal_Bool IsExpanded( SvListEntry* pEntry ) const;
+ sal_Bool IsSelected( SvListEntry* pEntry ) const;
+ sal_Bool HasEntryFocus( SvListEntry* pEntry ) const;
+ void SetEntryFocus( SvListEntry* pEntry, sal_Bool bFocus ) const;
SvViewData* GetViewData( SvListEntry* pEntry ) const;
- BOOL HasViewData() const { return aDataTable.Count() > 1;} // eine ROOT gibts immer
+ sal_Bool HasViewData() const { return aDataTable.Count() > 1;} // eine ROOT gibts immer
virtual SvViewData* CreateViewData( SvListEntry* pEntry );
virtual void InitViewData( SvViewData*, SvListEntry* pEntry );
@@ -386,38 +386,38 @@ public:
virtual void ModelHasInserted( SvListEntry* pEntry );
virtual void ModelHasInsertedTree( SvListEntry* pEntry );
virtual void ModelIsMoving( SvListEntry* pSource, SvListEntry* pTargetParent,
- ULONG nPos );
+ sal_uLong nPos );
virtual void ModelHasMoved( SvListEntry* pSource );
virtual void ModelIsRemoving( SvListEntry* pEntry );
virtual void ModelHasRemoved( SvListEntry* pEntry );
virtual void ModelHasEntryInvalidated( SvListEntry* pEntry );
};
-inline BOOL SvListView::IsExpanded( SvListEntry* pEntry ) const
+inline sal_Bool SvListView::IsExpanded( SvListEntry* pEntry ) const
{
DBG_ASSERT(pEntry,"IsExpanded:No Entry");
- SvViewData* pData = (SvViewData*)aDataTable.Get( (ULONG)pEntry );
+ SvViewData* pData = (SvViewData*)aDataTable.Get( (sal_uLong)pEntry );
DBG_ASSERT(pData,"Entry not in Table");
return pData->IsExpanded();
}
-inline BOOL SvListView::IsSelected( SvListEntry* pEntry ) const
+inline sal_Bool SvListView::IsSelected( SvListEntry* pEntry ) const
{
DBG_ASSERT(pEntry,"IsExpanded:No Entry");
- SvViewData* pData = (SvViewData*)aDataTable.Get( (ULONG)pEntry );
+ SvViewData* pData = (SvViewData*)aDataTable.Get( (sal_uLong)pEntry );
DBG_ASSERT(pData,"Entry not in Table");
return pData->IsSelected();
}
-inline BOOL SvListView::HasEntryFocus( SvListEntry* pEntry ) const
+inline sal_Bool SvListView::HasEntryFocus( SvListEntry* pEntry ) const
{
DBG_ASSERT(pEntry,"IsExpanded:No Entry");
- SvViewData* pData = (SvViewData*)aDataTable.Get( (ULONG)pEntry );
+ SvViewData* pData = (SvViewData*)aDataTable.Get( (sal_uLong)pEntry );
DBG_ASSERT(pData,"Entry not in Table");
return pData->HasFocus();
}
-inline void SvListView::SetEntryFocus( SvListEntry* pEntry, BOOL bFocus ) const
+inline void SvListView::SetEntryFocus( SvListEntry* pEntry, sal_Bool bFocus ) const
{
DBG_ASSERT(pEntry,"SetEntryFocus:No Entry");
- SvViewData* pData = (SvViewData*)aDataTable.Get( (ULONG)pEntry );
+ SvViewData* pData = (SvViewData*)aDataTable.Get( (sal_uLong)pEntry );
DBG_ASSERT(pData,"Entry not in Table");
pData->SetFocus(bFocus);
}
@@ -425,22 +425,22 @@ inline void SvListView::SetEntryFocus( SvListEntry* pEntry, BOOL bFocus ) const
inline SvViewData* SvListView::GetViewData( SvListEntry* pEntry ) const
{
#ifndef DBG_UTIL
- return (SvViewData*)aDataTable.Get( (ULONG)pEntry );
+ return (SvViewData*)aDataTable.Get( (sal_uLong)pEntry );
#else
- SvViewData* pResult = (SvViewData*)aDataTable.Get( (ULONG)pEntry );
+ SvViewData* pResult = (SvViewData*)aDataTable.Get( (sal_uLong)pEntry );
DBG_ASSERT(pResult,"Entry not in model or wrong view");
return pResult;
#endif
}
-inline BOOL SvTreeList::HasChilds( SvListEntry* pEntry ) const
+inline sal_Bool SvTreeList::HasChilds( SvListEntry* pEntry ) const
{
if ( !pEntry )
pEntry = pRootItem;
- return (BOOL)(pEntry->pChilds != 0);
+ return (sal_Bool)(pEntry->pChilds != 0);
}
-inline SvListEntry* SvTreeList::GetEntry( SvListEntry* pParent, ULONG nPos ) const
+inline SvListEntry* SvTreeList::GetEntry( SvListEntry* pParent, sal_uLong nPos ) const
{ if ( !pParent )
pParent = pRootItem;
SvListEntry* pRet = 0;
@@ -449,7 +449,7 @@ inline SvListEntry* SvTreeList::GetEntry( SvListEntry* pParent, ULONG nPos ) con
return pRet;
}
-inline SvListEntry* SvTreeList::GetEntry( ULONG nRootPos ) const
+inline SvListEntry* SvTreeList::GetEntry( sal_uLong nRootPos ) const
{
SvListEntry* pRet;
if ( nEntryCount )
@@ -480,18 +480,18 @@ class ClassName : public SvTreeList \
public: \
Type First() const \
{ return (Type)SvTreeList::First(); } \
- Type Next( SvListEntry* pEntry, USHORT* pDepth=0 ) const \
+ Type Next( SvListEntry* pEntry, sal_uInt16* pDepth=0 ) const \
{ return (Type)SvTreeList::Next(pEntry,pDepth); } \
- Type Prev( SvListEntry* pEntry, USHORT* pDepth=0 ) const \
+ Type Prev( SvListEntry* pEntry, sal_uInt16* pDepth=0 ) const \
{ return (Type)SvTreeList::Prev(pEntry,pDepth); } \
- Type Last( USHORT* pDepth=0 ) const \
+ Type Last( sal_uInt16* pDepth=0 ) const \
{ return (Type)SvTreeList::Last(pDepth); } \
\
- Type Clone( SvListEntry* pEntry, ULONG& nCloneCount ) const \
+ Type Clone( SvListEntry* pEntry, sal_uLong& nCloneCount ) const \
{ return (Type)SvTreeList::Clone(pEntry,nCloneCount); } \
- Type GetEntry( SvListEntry* pParent, ULONG nPos ) const \
+ Type GetEntry( SvListEntry* pParent, sal_uLong nPos ) const \
{ return (Type)SvTreeList::GetEntry(pParent,nPos); } \
- Type GetEntry( ULONG nRootPos ) const \
+ Type GetEntry( sal_uLong nRootPos ) const \
{ return (Type)SvTreeList::GetEntry(nRootPos); } \
Type GetParent( SvListEntry* pEntry ) const \
{ return (Type)SvTreeList::GetParent(pEntry); } \
@@ -507,7 +507,7 @@ public: \
using SvTreeList::LastSibling; \
Type LastSibling( Type pEntry ) const \
{ return (Type)SvTreeList::LastSibling(pEntry); } \
- Type GetEntryAtAbsPos( ULONG nAbsPos ) const \
+ Type GetEntryAtAbsPos( sal_uLong nAbsPos ) const \
{ return (Type)SvTreeList::GetEntryAtAbsPos( nAbsPos); } \
};
diff --git a/svtools/inc/svtools/ttprops.hxx b/svtools/inc/svtools/ttprops.hxx
index 15f080b9aa3d..1a6802b9a51c 100644
--- a/svtools/inc/svtools/ttprops.hxx
+++ b/svtools/inc/svtools/ttprops.hxx
@@ -36,7 +36,7 @@
class SfxPoolItem;
class Bitmap;
-// Defines zur Steuerung der Ausführung von Slots
+// Defines zur Steuerung der Ausf�hrung von Slots
#define EXECUTE_NO 0
#define EXECUTE_POSSIBLE 1
#define EXECUTE_YES 2
@@ -60,10 +60,10 @@ class Bitmap;
class SVT_DLLPUBLIC TTProperties : public ApplicationProperty
{
- USHORT nDonePRs; // Verwaltung für die Properties, die nur einmal gerufen werden mussen.
- SVT_DLLPRIVATE BOOL RequestProperty( USHORT nRequest );
+ sal_uInt16 nDonePRs; // Verwaltung f�r die Properties, die nur einmal gerufen werden mussen.
+ SVT_DLLPRIVATE sal_Bool RequestProperty( sal_uInt16 nRequest );
- BOOL HasSlots(){ return nPropertyVersion == TT_PROPERTIES_VERSION; }
+ sal_Bool HasSlots(){ return nPropertyVersion == TT_PROPERTIES_VERSION; }
public:
TYPEINFO();
@@ -75,31 +75,31 @@ public:
, nPropertyVersion( 0 )
{}
- BOOL GetSlots();
+ sal_Bool GetSlots();
/// ExecuteFunction
- USHORT mnSID;
+ sal_uInt16 mnSID;
SfxPoolItem** mppArgs;
- USHORT mnMode;
- USHORT ExecuteFunction( USHORT nSID, SfxPoolItem** ppArgs = NULL, USHORT nMode = 0 );
+ sal_uInt16 mnMode;
+ sal_uInt16 ExecuteFunction( sal_uInt16 nSID, SfxPoolItem** ppArgs = NULL, sal_uInt16 nMode = 0 );
/// Img
Bitmap *mpBmp;
- BOOL Img( Bitmap *pBmp );
+ sal_Bool Img( Bitmap *pBmp );
- static SvtResId GetSvtResId( USHORT nId );
+ static SvtResId GetSvtResId( sal_uInt16 nId );
- ULONG nSidOpenUrl;
- ULONG nSidFileName;
- ULONG nSidNewDocDirect;
- ULONG nSidCopy;
- ULONG nSidPaste;
- ULONG nSidSourceView;
- ULONG nSidSelectAll;
- ULONG nSidReferer;
+ sal_uLong nSidOpenUrl;
+ sal_uLong nSidFileName;
+ sal_uLong nSidNewDocDirect;
+ sal_uLong nSidCopy;
+ sal_uLong nSidPaste;
+ sal_uLong nSidSourceView;
+ sal_uLong nSidSelectAll;
+ sal_uLong nSidReferer;
- USHORT nActualPR;
- USHORT nPropertyVersion; // Wird bei jedem call gesetzt.
+ sal_uInt16 nActualPR;
+ sal_uInt16 nPropertyVersion; // Wird bei jedem call gesetzt.
};
#endif // _SVTOOLS_TTPROPS_HXX
diff --git a/svtools/inc/svtools/txtattr.hxx b/svtools/inc/svtools/txtattr.hxx
index 29723a38129b..46e0c82b6760 100644
--- a/svtools/inc/svtools/txtattr.hxx
+++ b/svtools/inc/svtools/txtattr.hxx
@@ -48,17 +48,17 @@ class Font;
class SVT_DLLPUBLIC TextAttrib
{
private:
- USHORT mnWhich;
+ sal_uInt16 mnWhich;
protected:
- TextAttrib( USHORT nWhich ) { mnWhich = nWhich; }
+ TextAttrib( sal_uInt16 nWhich ) { mnWhich = nWhich; }
TextAttrib( const TextAttrib& rAttr ) { mnWhich = rAttr.mnWhich; }
public:
virtual ~TextAttrib();
- USHORT Which() const { return mnWhich; }
+ sal_uInt16 Which() const { return mnWhich; }
virtual void SetFont( Font& rFont ) const = 0;
virtual TextAttrib* Clone() const = 0;
@@ -150,84 +150,84 @@ class TextCharAttrib
{
private:
TextAttrib* mpAttr;
- USHORT mnStart;
- USHORT mnEnd;
+ sal_uInt16 mnStart;
+ sal_uInt16 mnEnd;
protected:
public:
- TextCharAttrib( const TextAttrib& rAttr, USHORT nStart, USHORT nEnd );
+ TextCharAttrib( const TextAttrib& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd );
TextCharAttrib( const TextCharAttrib& rTextCharAttrib );
~TextCharAttrib();
const TextAttrib& GetAttr() const { return *mpAttr; }
- USHORT Which() const { return mpAttr->Which(); }
+ sal_uInt16 Which() const { return mpAttr->Which(); }
- USHORT GetStart() const { return mnStart; }
- USHORT& GetStart() { return mnStart; }
+ sal_uInt16 GetStart() const { return mnStart; }
+ sal_uInt16& GetStart() { return mnStart; }
- USHORT GetEnd() const { return mnEnd; }
- USHORT& GetEnd() { return mnEnd; }
+ sal_uInt16 GetEnd() const { return mnEnd; }
+ sal_uInt16& GetEnd() { return mnEnd; }
- inline USHORT GetLen() const;
+ inline sal_uInt16 GetLen() const;
- inline void MoveForward( USHORT nDiff );
- inline void MoveBackward( USHORT nDiff );
+ inline void MoveForward( sal_uInt16 nDiff );
+ inline void MoveBackward( sal_uInt16 nDiff );
- inline void Expand( USHORT nDiff );
- inline void Collaps( USHORT nDiff );
+ inline void Expand( sal_uInt16 nDiff );
+ inline void Collaps( sal_uInt16 nDiff );
- inline BOOL IsIn( USHORT nIndex );
- inline BOOL IsInside( USHORT nIndex );
- inline BOOL IsEmpty();
+ inline sal_Bool IsIn( sal_uInt16 nIndex );
+ inline sal_Bool IsInside( sal_uInt16 nIndex );
+ inline sal_Bool IsEmpty();
};
-inline USHORT TextCharAttrib::GetLen() const
+inline sal_uInt16 TextCharAttrib::GetLen() const
{
DBG_ASSERT( mnEnd >= mnStart, "TextCharAttrib: nEnd < nStart!" );
return mnEnd-mnStart;
}
-inline void TextCharAttrib::MoveForward( USHORT nDiff )
+inline void TextCharAttrib::MoveForward( sal_uInt16 nDiff )
{
DBG_ASSERT( ((long)mnEnd + nDiff) <= 0xFFFF, "TextCharAttrib: MoveForward?!" );
mnStart = mnStart + nDiff;
mnEnd = mnEnd + nDiff;
}
-inline void TextCharAttrib::MoveBackward( USHORT nDiff )
+inline void TextCharAttrib::MoveBackward( sal_uInt16 nDiff )
{
DBG_ASSERT( ((long)mnStart - nDiff) >= 0, "TextCharAttrib: MoveBackward?!" );
mnStart = mnStart - nDiff;
mnEnd = mnEnd - nDiff;
}
-inline void TextCharAttrib::Expand( USHORT nDiff )
+inline void TextCharAttrib::Expand( sal_uInt16 nDiff )
{
DBG_ASSERT( ( ((long)mnEnd + nDiff) <= (long)0xFFFF ), "TextCharAttrib: Expand?!" );
mnEnd = mnEnd + nDiff;
}
-inline void TextCharAttrib::Collaps( USHORT nDiff )
+inline void TextCharAttrib::Collaps( sal_uInt16 nDiff )
{
DBG_ASSERT( (long)mnEnd - nDiff >= (long)mnStart, "TextCharAttrib: Collaps?!" );
mnEnd = mnEnd - nDiff;
}
-inline BOOL TextCharAttrib::IsIn( USHORT nIndex )
+inline sal_Bool TextCharAttrib::IsIn( sal_uInt16 nIndex )
{
return ( ( mnStart <= nIndex ) && ( mnEnd >= nIndex ) );
}
-inline BOOL TextCharAttrib::IsInside( USHORT nIndex )
+inline sal_Bool TextCharAttrib::IsInside( sal_uInt16 nIndex )
{
return ( ( mnStart < nIndex ) && ( mnEnd > nIndex ) );
}
-inline BOOL TextCharAttrib::IsEmpty()
+inline sal_Bool TextCharAttrib::IsEmpty()
{
return mnStart == mnEnd;
}
diff --git a/svtools/inc/svtools/unitconv.hxx b/svtools/inc/svtools/unitconv.hxx
index becc41543396..c612506501b2 100644
--- a/svtools/inc/svtools/unitconv.hxx
+++ b/svtools/inc/svtools/unitconv.hxx
@@ -43,11 +43,11 @@ typedef long (*FUNC_CONVERT)(long);
// Functions -------------------------------------------------------------
-SVT_DLLPUBLIC void SetFieldUnit( MetricField& rCtrl, FieldUnit eUnit, BOOL bAll = FALSE );
-SVT_DLLPUBLIC void SetFieldUnit( MetricBox& rCtrl, FieldUnit eUnit, BOOL bAll = FALSE );
+SVT_DLLPUBLIC void SetFieldUnit( MetricField& rCtrl, FieldUnit eUnit, sal_Bool bAll = sal_False );
+SVT_DLLPUBLIC void SetFieldUnit( MetricBox& rCtrl, FieldUnit eUnit, sal_Bool bAll = sal_False );
SVT_DLLPUBLIC long CalcToUnit( float nIn, SfxMapUnit eUnit );
-SVT_DLLPUBLIC long CalcToPoint( long nIn, SfxMapUnit eUnit, USHORT nFaktor );
+SVT_DLLPUBLIC long CalcToPoint( long nIn, SfxMapUnit eUnit, sal_uInt16 nFaktor );
SVT_DLLPUBLIC long ItemToControl( long nIn, SfxMapUnit eItem, SfxFieldUnit eCtrl );
SVT_DLLPUBLIC long ControlToItem( long nIn, SfxFieldUnit eCtrl, SfxMapUnit eItem );
diff --git a/svtools/inc/svtools/valueset.hxx b/svtools/inc/svtools/valueset.hxx
index 0937d824daf0..620f20cffb46 100644
--- a/svtools/inc/svtools/valueset.hxx
+++ b/svtools/inc/svtools/valueset.hxx
@@ -149,7 +149,7 @@ Mit CalcWindowSizePixel() kann die genaue Fenstergroesse fuer eine bestimmte
Itemgroesse berechnet werden. Dazu muessen vorher aber alle relevanten
Daten (Spaltenanzahl/...) gesetzt werden und falls keine Zeilenanzahl
eingestellt wird, muessen auch alle Items eingefuegt werden. Falls das
-Window mit WB_BORDER/Border=TRUE erzeugt wurde, muss die Groesse mit
+Window mit WB_BORDER/Border=sal_True erzeugt wurde, muss die Groesse mit
SetOutputSizePixel() gesetzt werden, im anderen Fall koennen auch die
anderen Groessen-Methoden benutzt werden. Mit CalcItemSize() laesst sich
die innere und aeussere Groesse eines Items berechnen (dabei wird der
@@ -169,7 +169,7 @@ Da die Ausgabeflaeche vorberechnet wird, sollten erst alle Items eingefuegt
werden und dann erst Show() aufgerufen werden. Wenn dies nicht gemacht wird,
erscheint das erste Paint etwas langsamer. Deshalb sollte, wenn dieses
Control aus der Resource geladen wird und das Control erst im Programm
-mit Items versorgt wird, mit Hide = TRUE geladen werden und im Programm
+mit Items versorgt wird, mit Hide = sal_True geladen werden und im Programm
dann mit Show() angezeigt werden.
Bei einem sichbaren Control kann die Erzeugung der neuen Ausgabeflaeche
@@ -179,7 +179,7 @@ vor dem Paint aktiviert werden, indem Format() aufgerufen wird.
Wenn man ein Drag and Drop aus dem ValueSet heraus starten will, muss
der Command-Handler ueberlagert werden. Aus diesem muss dann StartDrag
-aufgerufen werden. Wenn diese Methode TRUE zurueckliefert, kann mit
+aufgerufen werden. Wenn diese Methode sal_True zurueckliefert, kann mit
ExecuteDrag() der Drag-Vorgang gestartet werden, ansonsten sollte keine
Verarbeitung stattfinden. Diese Methode sorgt dafuer, das das ValueSet
seine Verarbeitung abbricht und gegebenenfalls den Eintrag selektiert. Es
@@ -218,7 +218,7 @@ gewuenschten WinBits (vor Show) mit SetStyle() gesetzt werden.
// - ValueSet-Item-Typen -
// -----------------------
-#define VIB_NODOUBLECLICK ((USHORT)0x0080)
+#define VIB_NODOUBLECLICK ((sal_uInt16)0x0080)
// ------------------
// - ValueSet-Typen -
@@ -237,8 +237,8 @@ gewuenschten WinBits (vor Show) mit SetStyle() gesetzt werden.
// - ValueSet -
// ------------
-#define VALUESET_APPEND ((USHORT)0xFFFF)
-#define VALUESET_ITEM_NOTFOUND ((USHORT)0xFFFF)
+#define VALUESET_APPEND ((sal_uInt16)0xFFFF)
+#define VALUESET_ITEM_NOTFOUND ((sal_uInt16)0xFFFF)
class SVT_DLLPUBLIC ValueSet : public Control
{
@@ -254,27 +254,27 @@ private:
long mnLines;
long mnUserItemWidth;
long mnUserItemHeight;
- USHORT mnOldItemId;
- USHORT mnSelItemId;
- USHORT mnHighItemId;
- USHORT mnDropPos;
- USHORT mnCols;
- USHORT mnCurCol;
- USHORT mnUserCols;
- USHORT mnUserVisLines;
- USHORT mnFirstLine;
- USHORT mnSpacing;
- USHORT mnFrameStyle;
- BOOL mbFormat;
- BOOL mbHighlight;
- BOOL mbSelection;
- BOOL mbNoSelection;
- BOOL mbDrawSelection;
- BOOL mbBlackSel;
- BOOL mbDoubleSel;
- BOOL mbScroll;
- BOOL mbDropPos;
- BOOL mbFullMode;
+ sal_uInt16 mnOldItemId;
+ sal_uInt16 mnSelItemId;
+ sal_uInt16 mnHighItemId;
+ sal_uInt16 mnDropPos;
+ sal_uInt16 mnCols;
+ sal_uInt16 mnCurCol;
+ sal_uInt16 mnUserCols;
+ sal_uInt16 mnUserVisLines;
+ sal_uInt16 mnFirstLine;
+ sal_uInt16 mnSpacing;
+ sal_uInt16 mnFrameStyle;
+ sal_Bool mbFormat;
+ sal_Bool mbHighlight;
+ sal_Bool mbSelection;
+ sal_Bool mbNoSelection;
+ sal_Bool mbDrawSelection;
+ sal_Bool mbBlackSel;
+ sal_Bool mbDoubleSel;
+ sal_Bool mbScroll;
+ sal_Bool mbDropPos;
+ sal_Bool mbFullMode;
Color maColor;
Link maDoubleClickHdl;
Link maSelectHdl;
@@ -285,27 +285,27 @@ private:
using Control::ImplInitSettings;
using Window::ImplInit;
SVT_DLLPRIVATE void ImplInit();
- SVT_DLLPRIVATE void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground );
+ SVT_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
SVT_DLLPRIVATE void ImplInitScrollBar();
SVT_DLLPRIVATE void ImplDeleteItems();
SVT_DLLPRIVATE void ImplFormatItem( ValueSetItem* pItem );
SVT_DLLPRIVATE void ImplDrawItemText( const XubString& rStr );
SVT_DLLPRIVATE void ImplDrawSelect();
- SVT_DLLPRIVATE void ImplHideSelect( USHORT nItemId );
- SVT_DLLPRIVATE void ImplHighlightItem( USHORT nItemId, BOOL bIsSelection = TRUE );
- SVT_DLLPRIVATE void ImplDrawDropPos( BOOL bShow );
+ SVT_DLLPRIVATE void ImplHideSelect( sal_uInt16 nItemId );
+ SVT_DLLPRIVATE void ImplHighlightItem( sal_uInt16 nItemId, sal_Bool bIsSelection = sal_True );
+ SVT_DLLPRIVATE void ImplDrawDropPos( sal_Bool bShow );
SVT_DLLPRIVATE void ImplDraw();
using Window::ImplScroll;
- SVT_DLLPRIVATE BOOL ImplScroll( const Point& rPos );
- SVT_DLLPRIVATE USHORT ImplGetItem( const Point& rPoint, BOOL bMove = FALSE ) const;
- SVT_DLLPRIVATE ValueSetItem* ImplGetItem( USHORT nPos );
+ SVT_DLLPRIVATE sal_Bool ImplScroll( const Point& rPos );
+ SVT_DLLPRIVATE sal_uInt16 ImplGetItem( const Point& rPoint, sal_Bool bMove = sal_False ) const;
+ SVT_DLLPRIVATE ValueSetItem* ImplGetItem( sal_uInt16 nPos );
SVT_DLLPRIVATE ValueSetItem* ImplGetFirstItem();
- SVT_DLLPRIVATE USHORT ImplGetVisibleItemCount() const;
- SVT_DLLPRIVATE ValueSetItem* ImplGetVisibleItem( USHORT nVisiblePos );
+ SVT_DLLPRIVATE sal_uInt16 ImplGetVisibleItemCount() const;
+ SVT_DLLPRIVATE ValueSetItem* ImplGetVisibleItem( sal_uInt16 nVisiblePos );
SVT_DLLPRIVATE void ImplFireAccessibleEvent( short nEventId, const ::com::sun::star::uno::Any& rOldValue, const ::com::sun::star::uno::Any& rNewValue );
- SVT_DLLPRIVATE BOOL ImplHasAccessibleListeners();
- SVT_DLLPRIVATE void ImplTracking( const Point& rPos, BOOL bRepeat );
- SVT_DLLPRIVATE void ImplEndTracking( const Point& rPos, BOOL bCancel );
+ SVT_DLLPRIVATE sal_Bool ImplHasAccessibleListeners();
+ SVT_DLLPRIVATE void ImplTracking( const Point& rPos, sal_Bool bRepeat );
+ SVT_DLLPRIVATE void ImplEndTracking( const Point& rPos, sal_Bool bCancel );
DECL_DLLPRIVATE_LINK( ImplScrollHdl, ScrollBar* );
DECL_DLLPRIVATE_LINK( ImplTimerHdl, Timer* );
#endif
@@ -316,8 +316,8 @@ private:
protected:
- BOOL StartDrag( const CommandEvent& rCEvt, Region& rRegion );
- USHORT ShowDropPos( const Point& rPos );
+ sal_Bool StartDrag( const CommandEvent& rCEvt, Region& rRegion );
+ sal_uInt16 ShowDropPos( const Point& rPos );
void HideDropPos();
protected:
@@ -347,68 +347,68 @@ public:
virtual void DoubleClick();
virtual void UserDraw( const UserDrawEvent& rUDEvt );
- void InsertItem( USHORT nItemId, const Image& rImage,
- USHORT nPos = VALUESET_APPEND );
- void InsertItem( USHORT nItemId, const Color& rColor,
- USHORT nPos = VALUESET_APPEND );
- void InsertItem( USHORT nItemId,
+ void InsertItem( sal_uInt16 nItemId, const Image& rImage,
+ sal_uInt16 nPos = VALUESET_APPEND );
+ void InsertItem( sal_uInt16 nItemId, const Color& rColor,
+ sal_uInt16 nPos = VALUESET_APPEND );
+ void InsertItem( sal_uInt16 nItemId,
const Image& rImage, const XubString& rStr,
- USHORT nPos = VALUESET_APPEND );
- void InsertItem( USHORT nItemId,
+ sal_uInt16 nPos = VALUESET_APPEND );
+ void InsertItem( sal_uInt16 nItemId,
const Color& rColor, const XubString& rStr,
- USHORT nPos = VALUESET_APPEND );
- void InsertItem( USHORT nItemId,
- USHORT nPos = VALUESET_APPEND );
- void InsertSpace( USHORT nItemId,
- USHORT nPos = VALUESET_APPEND );
- void RemoveItem( USHORT nItemId );
+ sal_uInt16 nPos = VALUESET_APPEND );
+ void InsertItem( sal_uInt16 nItemId,
+ sal_uInt16 nPos = VALUESET_APPEND );
+ void InsertSpace( sal_uInt16 nItemId,
+ sal_uInt16 nPos = VALUESET_APPEND );
+ void RemoveItem( sal_uInt16 nItemId );
void CopyItems( const ValueSet& rValueSet );
void Clear();
- USHORT GetItemCount() const;
- USHORT GetItemPos( USHORT nItemId ) const;
- USHORT GetItemId( USHORT nPos ) const;
- USHORT GetItemId( const Point& rPos ) const;
- Rectangle GetItemRect( USHORT nItemId ) const;
-
- void EnableFullItemMode( BOOL bFullMode = TRUE );
- BOOL IsFullItemModeEnabled() const { return mbFullMode; }
- void SetColCount( USHORT nNewCols = 1 );
- USHORT GetColCount() const { return mnUserCols; }
- void SetLineCount( USHORT nNewLines = 0 );
- USHORT GetLineCount() const { return mnUserVisLines; }
+ sal_uInt16 GetItemCount() const;
+ sal_uInt16 GetItemPos( sal_uInt16 nItemId ) const;
+ sal_uInt16 GetItemId( sal_uInt16 nPos ) const;
+ sal_uInt16 GetItemId( const Point& rPos ) const;
+ Rectangle GetItemRect( sal_uInt16 nItemId ) const;
+
+ void EnableFullItemMode( sal_Bool bFullMode = sal_True );
+ sal_Bool IsFullItemModeEnabled() const { return mbFullMode; }
+ void SetColCount( sal_uInt16 nNewCols = 1 );
+ sal_uInt16 GetColCount() const { return mnUserCols; }
+ void SetLineCount( sal_uInt16 nNewLines = 0 );
+ sal_uInt16 GetLineCount() const { return mnUserVisLines; }
void SetItemWidth( long nItemWidth = 0 );
long GetItemWidth() const { return mnUserItemWidth; }
void SetItemHeight( long nLineHeight = 0 );
long GetItemHeight() const { return mnUserItemHeight; }
- void SetFirstLine( USHORT nNewLine = 0 );
- USHORT GetFirstLine() const { return mnFirstLine; }
+ void SetFirstLine( sal_uInt16 nNewLine = 0 );
+ sal_uInt16 GetFirstLine() const { return mnFirstLine; }
- void SelectItem( USHORT nItemId );
- USHORT GetSelectItemId() const { return mnSelItemId; }
- BOOL IsItemSelected( USHORT nItemId ) const
- { return ((!mbNoSelection && (nItemId == mnSelItemId)) ? TRUE : FALSE); }
+ void SelectItem( sal_uInt16 nItemId );
+ sal_uInt16 GetSelectItemId() const { return mnSelItemId; }
+ sal_Bool IsItemSelected( sal_uInt16 nItemId ) const
+ { return ((!mbNoSelection && (nItemId == mnSelItemId)) ? sal_True : sal_False); }
void SetNoSelection();
- BOOL IsNoSelection() const { return mbNoSelection; }
-
- void SetItemBits( USHORT nItemId, USHORT nBits );
- USHORT GetItemBits( USHORT nItemId ) const;
- void SetItemImage( USHORT nItemId, const Image& rImage );
- Image GetItemImage( USHORT nItemId ) const;
- void SetItemColor( USHORT nItemId, const Color& rColor );
- Color GetItemColor( USHORT nItemId ) const;
- void SetItemData( USHORT nItemId, void* pData );
- void* GetItemData( USHORT nItemId ) const;
- void SetItemText( USHORT nItemId, const XubString& rStr );
- XubString GetItemText( USHORT nItemId ) const;
+ sal_Bool IsNoSelection() const { return mbNoSelection; }
+
+ void SetItemBits( sal_uInt16 nItemId, sal_uInt16 nBits );
+ sal_uInt16 GetItemBits( sal_uInt16 nItemId ) const;
+ void SetItemImage( sal_uInt16 nItemId, const Image& rImage );
+ Image GetItemImage( sal_uInt16 nItemId ) const;
+ void SetItemColor( sal_uInt16 nItemId, const Color& rColor );
+ Color GetItemColor( sal_uInt16 nItemId ) const;
+ void SetItemData( sal_uInt16 nItemId, void* pData );
+ void* GetItemData( sal_uInt16 nItemId ) const;
+ void SetItemText( sal_uInt16 nItemId, const XubString& rStr );
+ XubString GetItemText( sal_uInt16 nItemId ) const;
void SetColor( const Color& rColor );
void SetColor() { SetColor( Color( COL_TRANSPARENT ) ); }
Color GetColor() const { return maColor; }
- BOOL IsColor() const { return maColor.GetTransparency() == 0; }
+ sal_Bool IsColor() const { return maColor.GetTransparency() == 0; }
- void SetExtraSpacing( USHORT nNewSpacing );
- USHORT GetExtraSpacing() { return mnSpacing; }
+ void SetExtraSpacing( sal_uInt16 nNewSpacing );
+ sal_uInt16 GetExtraSpacing() { return mnSpacing; }
void Format();
@@ -416,9 +416,9 @@ public:
void EndSelection();
Size CalcWindowSizePixel( const Size& rItemSize,
- USHORT nCalcCols = 0,
- USHORT nCalcLines = 0 );
- Size CalcItemSizePixel( const Size& rSize, BOOL bOut = TRUE ) const;
+ sal_uInt16 nCalcCols = 0,
+ sal_uInt16 nCalcLines = 0 );
+ Size CalcItemSizePixel( const Size& rSize, sal_Bool bOut = sal_True ) const;
long GetScrollWidth() const;
void SetSelectHdl( const Link& rLink ) { maSelectHdl = rLink; }
diff --git a/svtools/inc/svtools/wallitem.hxx b/svtools/inc/svtools/wallitem.hxx
index 533d5ae3f6d3..e8b45c080198 100644
--- a/svtools/inc/svtools/wallitem.hxx
+++ b/svtools/inc/svtools/wallitem.hxx
@@ -46,7 +46,7 @@ class Window;
class SfxItemSet;
typedef void* (*CreateSvxBrushTabPage)(Window *pParent, const SfxItemSet &rAttrSet);
-typedef USHORT* (*GetSvxBrushTabPageRanges)();
+typedef sal_uInt16* (*GetSvxBrushTabPageRanges)();
class Graphic;
class String;
diff --git a/svtools/inc/svtools/wizardmachine.hxx b/svtools/inc/svtools/wizardmachine.hxx
index 02562ac4bb63..5212fd67aed3 100644
--- a/svtools/inc/svtools/wizardmachine.hxx
+++ b/svtools/inc/svtools/wizardmachine.hxx
@@ -153,8 +153,8 @@ namespace svt
// restrict access to some aspects of our base class
SVT_DLLPRIVATE void AddPage( TabPage* pPage ) { WizardDialog::AddPage(pPage); }
SVT_DLLPRIVATE void RemovePage( TabPage* pPage ) { WizardDialog::RemovePage(pPage); }
- SVT_DLLPRIVATE void SetPage( USHORT nLevel, TabPage* pPage ) { WizardDialog::SetPage(nLevel, pPage); }
- // TabPage* GetPage( USHORT nLevel ) const { return WizardDialog::GetPage(nLevel); }
+ SVT_DLLPRIVATE void SetPage( sal_uInt16 nLevel, TabPage* pPage ) { WizardDialog::SetPage(nLevel, pPage); }
+ // TabPage* GetPage( sal_uInt16 nLevel ) const { return WizardDialog::GetPage(nLevel); }
// TODO: probably the complete page handling (next, previous etc.) should be prohibited ...
// IMPORTANT:
diff --git a/svtools/inc/svtools/wizdlg.hxx b/svtools/inc/svtools/wizdlg.hxx
index 5bd2db5672ed..cda86da2d249 100644
--- a/svtools/inc/svtools/wizdlg.hxx
+++ b/svtools/inc/svtools/wizdlg.hxx
@@ -66,7 +66,7 @@ berechnet und genommen.
ShowPrevPage()/ShowNextPage() zeigt die vorherige/naechste TabPage
an. Dazu wird zuerst der Deactivate-Handler vom Dialog gerufen und
-wenn dieser TRUE zurueckgegeben hat, wird der Acivate-Handler
+wenn dieser sal_True zurueckgegeben hat, wird der Acivate-Handler
vom Dialog gerufen und die entsprechende TabPage angezeigt.
Finnsh() kann gerufen werden, wenn der Finnish-Button betaetigt
wird. Dort wird dann auch noch der Deactivate-Page-Handler vom
@@ -117,10 +117,10 @@ Level 0 die erste Seite ist.
Der DeactivatePage()-Handler wird gerufen, wenn eine neue TabPage
angezeigt werden soll. In diesem Handler kann noch eine Fehler-
ueberprufung stattfinden und das Umschalten gegebenenfalls verhindert
-werden, indem FALSE zurueckgegeben wird. Der Handler kann auch als
+werden, indem sal_False zurueckgegeben wird. Der Handler kann auch als
Link gesetzt werden. Die Defaultimplementierung ruft den Link und
gibt den Rueckgabewert des Links zurueck und wenn kein Link gesetzt
-ist, wird TRUE zurueckgegeben.
+ist, wird sal_True zurueckgegeben.
--------------------------------------------------------------------------
@@ -146,7 +146,7 @@ maNextBtn.SetClickHdl( LINK( this, MyWizardDlg, ImplNextHdl ) );
SetViewWindow( &maPreview );
// Show line between Buttons and Page
-ShowButtonFixedLine( TRUE );
+ShowButtonFixedLine( sal_True );
// Call ActivatePage, because the first page should be created an activated
ActivatePage();
@@ -229,7 +229,7 @@ private:
PushButton* mpPrevBtn;
PushButton* mpNextBtn;
Window* mpViewWindow;
- USHORT mnCurLevel;
+ sal_uInt16 mnCurLevel;
WindowAlign meViewAlign;
Link maActivateHdl;
Link maDeactivateHdl;
@@ -257,7 +257,7 @@ private:
SVT_DLLPRIVATE void ImplPosCtrls();
SVT_DLLPRIVATE void ImplPosTabPage();
SVT_DLLPRIVATE void ImplShowTabPage( TabPage* pPage );
- SVT_DLLPRIVATE TabPage* ImplGetPage( USHORT nLevel ) const;
+ SVT_DLLPRIVATE TabPage* ImplGetPage( sal_uInt16 nLevel ) const;
#endif
public:
@@ -272,16 +272,16 @@ public:
virtual void ActivatePage();
virtual long DeactivatePage();
- BOOL ShowPrevPage();
- BOOL ShowNextPage();
- BOOL ShowPage( USHORT nLevel );
- BOOL Finnish( long nResult = 0 );
- USHORT GetCurLevel() const { return mnCurLevel; }
+ sal_Bool ShowPrevPage();
+ sal_Bool ShowNextPage();
+ sal_Bool ShowPage( sal_uInt16 nLevel );
+ sal_Bool Finnish( long nResult = 0 );
+ sal_uInt16 GetCurLevel() const { return mnCurLevel; }
void AddPage( TabPage* pPage );
void RemovePage( TabPage* pPage );
- void SetPage( USHORT nLevel, TabPage* pPage );
- TabPage* GetPage( USHORT nLevel ) const;
+ void SetPage( sal_uInt16 nLevel, TabPage* pPage );
+ TabPage* GetPage( sal_uInt16 nLevel ) const;
void AddButton( Button* pButton, long nOffset = 0 );
void RemoveButton( Button* pButton );
@@ -291,8 +291,8 @@ public:
void SetNextButton( PushButton* pButton ) { mpNextBtn = pButton; }
PushButton* GetNextButton() const { return mpNextBtn; }
- void ShowButtonFixedLine( BOOL bVisible );
- BOOL IsButtonFixedLineVisible();
+ void ShowButtonFixedLine( sal_Bool bVisible );
+ sal_Bool IsButtonFixedLineVisible();
void SetViewWindow( Window* pWindow ) { mpViewWindow = pWindow; }
Window* GetViewWindow() const { return mpViewWindow; }
diff --git a/svtools/inc/svtools/wmf.hxx b/svtools/inc/svtools/wmf.hxx
index a41b6180747b..678540beae32 100644
--- a/svtools/inc/svtools/wmf.hxx
+++ b/svtools/inc/svtools/wmf.hxx
@@ -31,16 +31,16 @@
#include "svtools/svtdllapi.h"
#include <svtools/fltcall.hxx>
-BOOL ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaFile, FilterConfigItem* pConfigItem = NULL );
+sal_Bool ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaFile, FilterConfigItem* pConfigItem = NULL );
-SVT_DLLPUBLIC BOOL ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem* pConfigItem );
+SVT_DLLPUBLIC sal_Bool ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem* pConfigItem );
-SVT_DLLPUBLIC BOOL ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pConfigItem = NULL, BOOL bPlaceable = TRUE );
+SVT_DLLPUBLIC sal_Bool ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pConfigItem = NULL, sal_Bool bPlaceable = sal_True );
-BOOL ConvertGDIMetaFileToEMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pConfigItem = NULL );
+sal_Bool ConvertGDIMetaFileToEMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pConfigItem = NULL );
-SVT_DLLPUBLIC BOOL WriteWindowMetafile( SvStream& rStream, const GDIMetaFile& rMTF );
+SVT_DLLPUBLIC sal_Bool WriteWindowMetafile( SvStream& rStream, const GDIMetaFile& rMTF );
-SVT_DLLPUBLIC BOOL WriteWindowMetafileBits( SvStream& rStream, const GDIMetaFile& rMTF );
+SVT_DLLPUBLIC sal_Bool WriteWindowMetafileBits( SvStream& rStream, const GDIMetaFile& rMTF );
#endif
diff --git a/svtools/inc/svtools/xtextedt.hxx b/svtools/inc/svtools/xtextedt.hxx
index 46c6441e005e..6b133fbe8c75 100644
--- a/svtools/inc/svtools/xtextedt.hxx
+++ b/svtools/inc/svtools/xtextedt.hxx
@@ -31,10 +31,6 @@
#include <svtools/texteng.hxx>
#include <svtools/textview.hxx>
-#define XTEXTUNDO_REPLACEALL (XTEXTUNDO_START+1)
-#define XTEXTUNDO_INDENTBLOCK 122
-#define XTEXTUNDO_UNINDENTBLOCK 123
-
namespace com {
namespace sun {
namespace star {
@@ -55,25 +51,25 @@ public:
void SetGroupChars( const String& r ) { maGroupChars = r; }
TextSelection MatchGroup( const TextPaM& rCursor ) const;
- BOOL Search( TextSelection& rSel, const ::com::sun::star::util::SearchOptions& rSearchOptions, BOOL bForward = TRUE );
+ sal_Bool Search( TextSelection& rSel, const ::com::sun::star::util::SearchOptions& rSearchOptions, sal_Bool bForward = sal_True );
};
class SVT_DLLPUBLIC ExtTextView : public TextView
{
protected:
- BOOL ImpIndentBlock( BOOL bRight );
+ sal_Bool ImpIndentBlock( sal_Bool bRight );
public:
ExtTextView( ExtTextEngine* pEng, Window* pWindow );
~ExtTextView();
- BOOL MatchGroup();
+ sal_Bool MatchGroup();
- BOOL Search( const ::com::sun::star::util::SearchOptions& rSearchOptions, BOOL bForward );
- USHORT Replace( const ::com::sun::star::util::SearchOptions& rSearchOptions, BOOL bAll, BOOL bForward );
+ sal_Bool Search( const ::com::sun::star::util::SearchOptions& rSearchOptions, sal_Bool bForward );
+ sal_uInt16 Replace( const ::com::sun::star::util::SearchOptions& rSearchOptions, sal_Bool bAll, sal_Bool bForward );
- BOOL IndentBlock();
- BOOL UnindentBlock();
+ sal_Bool IndentBlock();
+ sal_Bool UnindentBlock();
};
#endif // _XTEXTEDT_HXX
diff --git a/svtools/inc/svtools/xwindowitem.hxx b/svtools/inc/svtools/xwindowitem.hxx
index eca425cf1369..7e639904245f 100755..100644
--- a/svtools/inc/svtools/xwindowitem.hxx
+++ b/svtools/inc/svtools/xwindowitem.hxx
@@ -52,8 +52,8 @@ class SVT_DLLPUBLIC XWindowItem : public SfxPoolItem
public:
TYPEINFO();
XWindowItem();
- explicit XWindowItem( USHORT nWhich, Window * pWin );
- XWindowItem( USHORT nWhich, com::sun::star::uno::Reference< com::sun::star::awt::XWindow > & rxWin );
+ explicit XWindowItem( sal_uInt16 nWhich, Window * pWin );
+ XWindowItem( sal_uInt16 nWhich, com::sun::star::uno::Reference< com::sun::star::awt::XWindow > & rxWin );
XWindowItem( const XWindowItem &rItem );
~XWindowItem();
diff --git a/svtools/prj/build.lst b/svtools/prj/build.lst
index 3f9e02b26ca3..fd0f1a560c18 100644
--- a/svtools/prj/build.lst
+++ b/svtools/prj/build.lst
@@ -1,3 +1,2 @@
st svtools : l10n svl offuh toolkit ucbhelper unotools JPEG:jpeg cppu cppuhelper comphelper sal sot jvmfwk LIBXSLT:libxslt NULL
st svtools\prj nmake - all st_prj NULL
-st svtools\qa\unoapi nmake - all st_qa_unoapi NULL
diff --git a/svtools/prj/makefile.mk b/svtools/prj/makefile.mk
index c73a3d944bbf..e312a7ccab65 100644
--- a/svtools/prj/makefile.mk
+++ b/svtools/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/svtools/qa/unoapi/Test.java b/svtools/qa/unoapi/Test.java
index 8ae4af55ed61..b17f870d0b99 100644
--- a/svtools/qa/unoapi/Test.java
+++ b/svtools/qa/unoapi/Test.java
@@ -27,6 +27,7 @@ package org.openoffice.svtools.qa.unoapi;
import org.openoffice.Runner;
import org.openoffice.test.OfficeConnection;
+import org.openoffice.test.Argument;
import static org.junit.Assert.*;
public final class Test {
@@ -43,8 +44,8 @@ public final class Test {
@org.junit.Test public void test() {
assertTrue(
Runner.run(
- "-sce", "svtools.sce", "-xcl", "knownissues.xcl", "-cs",
- connection.getDescription()));
+ "-sce", Argument.get("sce"), "-xcl", Argument.get("xcl"), "-tdoc",
+ Argument.get("tdoc"), "-cs", connection.getDescription()));
}
private final OfficeConnection connection = new OfficeConnection();
diff --git a/svtools/qa/unoapi/makefile.mk b/svtools/qa/unoapi/makefile.mk
deleted file mode 100644
index e3afb77e637a..000000000000
--- a/svtools/qa/unoapi/makefile.mk
+++ /dev/null
@@ -1,48 +0,0 @@
-#*************************************************************************
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#***********************************************************************/
-
-.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
-nothing .PHONY:
-.ELSE
-
-PRJ = ../..
-PRJNAME = svtools
-TARGET = qa_unoapi
-
-.IF "$(OOO_JUNIT_JAR)" != ""
-PACKAGE = org/openoffice/svtools/qa/unoapi
-JAVATESTFILES = Test.java
-JAVAFILES = $(JAVATESTFILES)
-JARFILES = OOoRunner.jar ridl.jar test.jar
-EXTRAJARFILES = $(OOO_JUNIT_JAR)
-.END
-
-.INCLUDE: settings.mk
-.INCLUDE: target.mk
-.INCLUDE: installationtest.mk
-
-ALLTAR : javatest
-
-.END
diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx
index 3a29c4ae63fa..09fe2880fec0 100644
--- a/svtools/source/brwbox/brwbox1.cxx
+++ b/svtools/source/brwbox/brwbox1.cxx
@@ -99,7 +99,7 @@ namespace
void BrowseBox::ConstructImpl( BrowserMode nMode )
{
DBG_TRACE1( "BrowseBox: %p->ConstructImpl", this );
- bMultiSelection = FALSE;
+ bMultiSelection = sal_False;
pColSel = 0;
pDataWin = 0;
pVScroll = 0;
@@ -112,26 +112,26 @@ void BrowseBox::ConstructImpl( BrowserMode nMode )
InitSettings_Impl( this );
InitSettings_Impl( pDataWin );
- bBootstrapped = FALSE;
+ bBootstrapped = sal_False;
nDataRowHeight = 0;
nTitleLines = 1;
nFirstCol = 0;
nTopRow = 0;
nCurRow = BROWSER_ENDOFSELECTION;
nCurColId = 0;
- bResizing = FALSE;
- bSelect = FALSE;
- bSelecting = FALSE;
- bScrolling = FALSE;
- bSelectionIsVisible = FALSE;
- bNotToggleSel = FALSE;
- bRowDividerDrag = FALSE;
- bHit = FALSE;
- mbInteractiveRowHeight = FALSE;
- bHideSelect = FALSE;
+ bResizing = sal_False;
+ bSelect = sal_False;
+ bSelecting = sal_False;
+ bScrolling = sal_False;
+ bSelectionIsVisible = sal_False;
+ bNotToggleSel = sal_False;
+ bRowDividerDrag = sal_False;
+ bHit = sal_False;
+ mbInteractiveRowHeight = sal_False;
+ bHideSelect = sal_False;
bHideCursor = NO_CURSOR_HIDE;
nRowCount = 0;
- m_bFocusOnlyCursor = TRUE;
+ m_bFocusOnlyCursor = sal_True;
m_aCursorColor = COL_TRANSPARENT;
m_nCurrentMode = 0;
nControlAreaWidth = USHRT_MAX;
@@ -194,7 +194,7 @@ BrowseBox::~BrowseBox()
delete pVScroll;
// free columns-space
- for ( USHORT n = 0; n < pCols->Count(); ++n )
+ for ( sal_uInt16 n = 0; n < pCols->Count(); ++n )
delete pCols->GetObject(n);
delete pCols;
delete pColSel;
@@ -271,18 +271,18 @@ void BrowseBox::SetFont( const Font& rNewFont )
//-------------------------------------------------------------------
-ULONG BrowseBox::GetDefaultColumnWidth( const String& _rText ) const
+sal_uLong BrowseBox::GetDefaultColumnWidth( const String& _rText ) const
{
return GetDataWindow().GetTextWidth( _rText ) + GetDataWindow().GetTextWidth( '0' ) * 4;
}
//-------------------------------------------------------------------
-void BrowseBox::InsertHandleColumn( ULONG nWidth )
+void BrowseBox::InsertHandleColumn( sal_uLong nWidth )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- pCols->Insert( new BrowserColumn( 0, Image(), String(), nWidth, GetZoom(), 0 ), (ULONG) 0 );
+ pCols->Insert( new BrowserColumn( 0, Image(), String(), nWidth, GetZoom(), 0 ), (sal_uLong) 0 );
FreezeColumn( 0 );
// Headerbar anpassen
@@ -301,19 +301,19 @@ void BrowseBox::InsertHandleColumn( ULONG nWidth )
}
//-------------------------------------------------------------------
-void BrowseBox::InsertDataColumn( USHORT nItemId, const Image& rImage,
- long nWidth, HeaderBarItemBits nBits, USHORT nPos )
+void BrowseBox::InsertDataColumn( sal_uInt16 nItemId, const Image& rImage,
+ long nWidth, HeaderBarItemBits nBits, sal_uInt16 nPos )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
pCols->Insert( new BrowserColumn( nItemId, rImage, String(), nWidth, GetZoom(), nBits ),
- Min( nPos, (USHORT)(pCols->Count()) ) );
+ Min( nPos, (sal_uInt16)(pCols->Count()) ) );
if ( nCurColId == 0 )
nCurColId = nItemId;
if ( getDataWindow()->pHeaderBar )
{
// Handlecolumn nicht in der Headerbar
- USHORT nHeaderPos = nPos;
+ sal_uInt16 nHeaderPos = nPos;
if (nHeaderPos != HEADERBAR_APPEND && !GetColumnId(0))
nHeaderPos--;
getDataWindow()->pHeaderBar->InsertItem(
@@ -324,20 +324,20 @@ void BrowseBox::InsertDataColumn( USHORT nItemId, const Image& rImage,
//-------------------------------------------------------------------
-void BrowseBox::InsertDataColumn( USHORT nItemId, const XubString& rText,
- long nWidth, HeaderBarItemBits nBits, USHORT nPos )
+void BrowseBox::InsertDataColumn( sal_uInt16 nItemId, const XubString& rText,
+ long nWidth, HeaderBarItemBits nBits, sal_uInt16 nPos )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
pCols->Insert( new BrowserColumn( nItemId, Image(), rText, nWidth, GetZoom(), nBits ),
- Min( nPos, (USHORT)(pCols->Count()) ) );
+ Min( nPos, (sal_uInt16)(pCols->Count()) ) );
if ( nCurColId == 0 )
nCurColId = nItemId;
if ( getDataWindow()->pHeaderBar )
{
// Handlecolumn nicht in der Headerbar
- USHORT nHeaderPos = nPos;
+ sal_uInt16 nHeaderPos = nPos;
if (nHeaderPos != HEADERBAR_APPEND && !GetColumnId(0))
nHeaderPos--;
getDataWindow()->pHeaderBar->InsertItem(
@@ -348,21 +348,21 @@ void BrowseBox::InsertDataColumn( USHORT nItemId, const XubString& rText,
//-------------------------------------------------------------------
-void BrowseBox::InsertDataColumn( USHORT nItemId,
+void BrowseBox::InsertDataColumn( sal_uInt16 nItemId,
const Image& rImage, const XubString& rText,
- long nWidth, HeaderBarItemBits nBits, USHORT nPos,
+ long nWidth, HeaderBarItemBits nBits, sal_uInt16 nPos,
const String* pHelpText )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
pCols->Insert( new BrowserColumn( nItemId, rImage, rText, nWidth, GetZoom(), nBits ),
- Min( nPos, (USHORT)(pCols->Count()) ) );
+ Min( nPos, (sal_uInt16)(pCols->Count()) ) );
if ( nCurColId == 0 )
nCurColId = nItemId;
if ( getDataWindow()->pHeaderBar )
{
// Handlecolumn nicht in der Headerbar
- USHORT nHeaderPos = nPos;
+ sal_uInt16 nHeaderPos = nPos;
if (nHeaderPos != HEADERBAR_APPEND && !GetColumnId(0))
nHeaderPos--;
@@ -377,20 +377,20 @@ void BrowseBox::InsertDataColumn( USHORT nItemId,
ColumnInserted( nPos );
}
//-------------------------------------------------------------------
-USHORT BrowseBox::ToggleSelectedColumn()
+sal_uInt16 BrowseBox::ToggleSelectedColumn()
{
- USHORT nSelectedColId = USHRT_MAX;
+ sal_uInt16 nSelectedColId = USHRT_MAX;
if ( pColSel && pColSel->GetSelectCount() )
{
DoHideCursor( "ToggleSelectedColumn" );
ToggleSelection();
nSelectedColId = pCols->GetObject(pColSel->FirstSelected())->GetId();
- pColSel->SelectAll(FALSE);
+ pColSel->SelectAll(sal_False);
}
return nSelectedColId;
}
// -----------------------------------------------------------------------------
-void BrowseBox::SetToggledSelectedColumn(USHORT _nSelectedColumnId)
+void BrowseBox::SetToggledSelectedColumn(sal_uInt16 _nSelectedColumnId)
{
if ( pColSel && _nSelectedColumnId != USHRT_MAX )
{
@@ -401,7 +401,7 @@ void BrowseBox::SetToggledSelectedColumn(USHORT _nSelectedColumnId)
}
}
// -----------------------------------------------------------------------------
-void BrowseBox::FreezeColumn( USHORT nItemId, BOOL bFreeze )
+void BrowseBox::FreezeColumn( sal_uInt16 nItemId, sal_Bool bFreeze )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -410,7 +410,7 @@ void BrowseBox::FreezeColumn( USHORT nItemId, BOOL bFreeze )
return;
// get the position in the current array
- USHORT nItemPos = GetColumnPos( nItemId );
+ sal_uInt16 nItemPos = GetColumnPos( nItemId );
if ( nItemPos >= pCols->Count() )
// not available!
return;
@@ -420,7 +420,7 @@ void BrowseBox::FreezeColumn( USHORT nItemId, BOOL bFreeze )
return;
// remark the column selection
- USHORT nSelectedColId = ToggleSelectedColumn();
+ sal_uInt16 nSelectedColId = ToggleSelectedColumn();
// freeze or unfreeze?
if ( bFreeze )
@@ -429,11 +429,11 @@ void BrowseBox::FreezeColumn( USHORT nItemId, BOOL bFreeze )
if ( nItemPos != 0 && !pCols->GetObject(nItemPos-1)->IsFrozen() )
{
// move to the right of the last frozen column
- USHORT nFirstScrollable = FrozenColCount();
+ sal_uInt16 nFirstScrollable = FrozenColCount();
BrowserColumn *pColumn = pCols->GetObject(nItemPos);
- pCols->Remove( (ULONG) nItemPos );
+ pCols->Remove( (sal_uLong) nItemPos );
nItemPos = nFirstScrollable;
- pCols->Insert( pColumn, (ULONG) nItemPos );
+ pCols->Insert( pColumn, (sal_uLong) nItemPos );
}
// adjust the number of the first scrollable and visible column
@@ -446,11 +446,11 @@ void BrowseBox::FreezeColumn( USHORT nItemId, BOOL bFreeze )
if ( nItemPos != FrozenColCount()-1 )
{
// move to the leftmost scrollable colum
- USHORT nFirstScrollable = FrozenColCount();
+ sal_uInt16 nFirstScrollable = FrozenColCount();
BrowserColumn *pColumn = pCols->GetObject(nItemPos);
- pCols->Remove( (ULONG) nItemPos );
+ pCols->Remove( (sal_uLong) nItemPos );
nItemPos = nFirstScrollable;
- pCols->Insert( pColumn, (ULONG) nItemPos );
+ pCols->Insert( pColumn, (sal_uLong) nItemPos );
}
// adjust the number of the first scrollable and visible column
@@ -473,7 +473,7 @@ void BrowseBox::FreezeColumn( USHORT nItemId, BOOL bFreeze )
//-------------------------------------------------------------------
-void BrowseBox::SetColumnPos( USHORT nColumnId, USHORT nPos )
+void BrowseBox::SetColumnPos( sal_uInt16 nColumnId, sal_uInt16 nPos )
{
// never set pos of the handle-column
if ( nColumnId == 0 )
@@ -484,7 +484,7 @@ void BrowseBox::SetColumnPos( USHORT nColumnId, USHORT nPos )
return;
// get the position in the current array
- USHORT nOldPos = GetColumnPos( nColumnId );
+ sal_uInt16 nOldPos = GetColumnPos( nColumnId );
if ( nOldPos >= pCols->Count() )
// not available!
return;
@@ -493,7 +493,7 @@ void BrowseBox::SetColumnPos( USHORT nColumnId, USHORT nPos )
if (nOldPos != nPos)
{
// remark the column selection
- USHORT nSelectedColId = ToggleSelectedColumn();
+ sal_uInt16 nSelectedColId = ToggleSelectedColumn();
// determine old column area
Size aDataWinSize( pDataWin->GetSizePixel() );
@@ -503,7 +503,7 @@ void BrowseBox::SetColumnPos( USHORT nColumnId, USHORT nPos )
Rectangle aFromRect( GetFieldRect( nColumnId) );
aFromRect.Right() += 2*MIN_COLUMNWIDTH;
- USHORT nNextPos = nOldPos + 1;
+ sal_uInt16 nNextPos = nOldPos + 1;
if ( nOldPos > nPos )
nNextPos = nOldPos - 1;
@@ -546,7 +546,7 @@ void BrowseBox::SetColumnPos( USHORT nColumnId, USHORT nPos )
// adjust header bar positions
if ( getDataWindow()->pHeaderBar )
{
- USHORT nNewPos = nPos;
+ sal_uInt16 nNewPos = nPos;
if ( !GetColumnId(0) )
--nNewPos;
getDataWindow()->pHeaderBar->MoveItem(nColumnId,nNewPos);
@@ -588,7 +588,7 @@ void BrowseBox::SetColumnPos( USHORT nColumnId, USHORT nPos )
//-------------------------------------------------------------------
-void BrowseBox::SetColumnMode( USHORT nColumnId, BrowserColumnMode nFlags )
+void BrowseBox::SetColumnMode( sal_uInt16 nColumnId, BrowserColumnMode nFlags )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -597,7 +597,7 @@ void BrowseBox::SetColumnMode( USHORT nColumnId, BrowserColumnMode nFlags )
return;
// get the position in the current array
- USHORT nColumnPos = GetColumnPos( nColumnId );
+ sal_uInt16 nColumnPos = GetColumnPos( nColumnId );
if ( nColumnPos >= pCols->Count() )
// not available!
return;
@@ -617,7 +617,7 @@ void BrowseBox::SetColumnMode( USHORT nColumnId, BrowserColumnMode nFlags )
//-------------------------------------------------------------------
-void BrowseBox::SetColumnTitle( USHORT nItemId, const String& rTitle )
+void BrowseBox::SetColumnTitle( sal_uInt16 nItemId, const String& rTitle )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -626,7 +626,7 @@ void BrowseBox::SetColumnTitle( USHORT nItemId, const String& rTitle )
return;
// get the position in the current array
- USHORT nItemPos = GetColumnPos( nItemId );
+ sal_uInt16 nItemPos = GetColumnPos( nItemId );
if ( nItemPos >= pCols->Count() )
// not available!
return;
@@ -664,12 +664,12 @@ void BrowseBox::SetColumnTitle( USHORT nItemId, const String& rTitle )
//-------------------------------------------------------------------
-void BrowseBox::SetColumnWidth( USHORT nItemId, ULONG nWidth )
+void BrowseBox::SetColumnWidth( sal_uInt16 nItemId, sal_uLong nWidth )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
// get the position in the current array
- USHORT nItemPos = GetColumnPos( nItemId );
+ sal_uInt16 nItemPos = GetColumnPos( nItemId );
if ( nItemPos >= pCols->Count() )
return;
@@ -686,7 +686,7 @@ void BrowseBox::SetColumnWidth( USHORT nItemId, ULONG nWidth )
nMaxWidth -= getDataWindow()->bAutoSizeLastCol
? GetFieldRect(nItemId).Left()
: GetFrozenWidth();
- if ( ( (BrowserDataWin*)pDataWin )->bAutoSizeLastCol || nWidth > (ULONG)nMaxWidth )
+ if ( ( (BrowserDataWin*)pDataWin )->bAutoSizeLastCol || nWidth > (sal_uLong)nMaxWidth )
{
nWidth = nMaxWidth > 16 ? nMaxWidth : nOldWidth;
nWidth = QueryColumnResize( nItemId, nWidth );
@@ -697,11 +697,11 @@ void BrowseBox::SetColumnWidth( USHORT nItemId, ULONG nWidth )
// In AutoSizeLastColumn() wird SetColumnWidth mit nWidth==0xffff
// gerufen. Deshalb muss hier nochmal geprueft werden, ob sich die
// Breite tatsaechlich geaendert hat.
- if( (ULONG)nOldWidth == nWidth )
+ if( (sal_uLong)nOldWidth == nWidth )
return;
// soll die Aenderung sofort dargestellt werden?
- BOOL bUpdate = GetUpdateMode() &&
+ sal_Bool bUpdate = GetUpdateMode() &&
( pCols->GetObject(nItemPos)->IsFrozen() || nItemPos >= nFirstCol );
if ( bUpdate )
@@ -729,7 +729,7 @@ void BrowseBox::SetColumnWidth( USHORT nItemId, ULONG nWidth )
{
// X-Pos der veraenderten Spalte ermitteln
long nX = 0;
- for ( USHORT nCol = 0; nCol < nItemPos; ++nCol )
+ for ( sal_uInt16 nCol = 0; nCol < nItemPos; ++nCol )
{
BrowserColumn *pCol = pCols->GetObject(nCol);
if ( pCol->IsFrozen() || nCol >= nFirstCol )
@@ -738,18 +738,18 @@ void BrowseBox::SetColumnWidth( USHORT nItemId, ULONG nWidth )
// eigentliches scroll+invalidate
pDataWin->SetClipRegion();
- BOOL bSelVis = bSelectionIsVisible;
- bSelectionIsVisible = FALSE;
+ sal_Bool bSelVis = bSelectionIsVisible;
+ bSelectionIsVisible = sal_False;
if( GetBackground().IsScrollable() )
{
- Rectangle aScrRect( nX + std::min( (ULONG)nOldWidth, nWidth ), 0,
+ Rectangle aScrRect( nX + std::min( (sal_uLong)nOldWidth, nWidth ), 0,
GetSizePixel().Width() , // the header is longer than the datawin
pDataWin->GetPosPixel().Y() - 1 );
Control::Scroll( nWidth-nOldWidth, 0, aScrRect, SCROLL_FLAGS );
aScrRect.Bottom() = pDataWin->GetSizePixel().Height();
getDataWindow()->Scroll( nWidth-nOldWidth, 0, aScrRect, SCROLL_FLAGS );
- Rectangle aInvRect( nX, 0, nX + std::max( nWidth, (ULONG)nOldWidth ), USHRT_MAX );
+ Rectangle aInvRect( nX, 0, nX + std::max( nWidth, (sal_uLong)nOldWidth ), USHRT_MAX );
Control::Invalidate( aInvRect, INVALIDATE_NOCHILDREN );
( (BrowserDataWin*)pDataWin )->Invalidate( aInvRect );
}
@@ -787,7 +787,7 @@ void BrowseBox::AutoSizeLastColumn()
if ( getDataWindow()->bAutoSizeLastCol &&
getDataWindow()->GetUpdateMode() )
{
- USHORT nId = GetColumnId( (USHORT)pCols->Count() - 1 );
+ sal_uInt16 nId = GetColumnId( (sal_uInt16)pCols->Count() - 1 );
SetColumnWidth( nId, LONG_MAX );
ColumnResized( nId );
}
@@ -795,12 +795,12 @@ void BrowseBox::AutoSizeLastColumn()
//-------------------------------------------------------------------
-void BrowseBox::RemoveColumn( USHORT nItemId )
+void BrowseBox::RemoveColumn( sal_uInt16 nItemId )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
// Spaltenposition ermitteln
- USHORT nPos = GetColumnPos(nItemId);
+ sal_uInt16 nPos = GetColumnPos(nItemId);
if ( nPos >= ColCount() )
// nicht vorhanden
return;
@@ -814,7 +814,7 @@ void BrowseBox::RemoveColumn( USHORT nItemId )
nCurColId = 0;
// Spalte entfernen
- delete( pCols->Remove( (ULONG) nPos ));
+ delete( pCols->Remove( (sal_uLong) nPos ));
// OJ #93534#
if ( nFirstCol >= nPos && nFirstCol > FrozenColCount() )
{
@@ -884,12 +884,12 @@ void BrowseBox::RemoveColumns()
unsigned int nOldCount = pCols->Count();
// alle Spalten entfernen
while ( pCols->Count() )
- delete ( pCols->Remove( (ULONG) 0 ));
+ delete ( pCols->Remove( (sal_uLong) 0 ));
// Spaltenselektion korrigieren
if ( pColSel )
{
- pColSel->SelectAll(FALSE);
+ pColSel->SelectAll(sal_False);
pColSel->SetTotalRange( Range( 0, 0 ) );
}
@@ -947,11 +947,11 @@ void BrowseBox::RemoveColumns()
//-------------------------------------------------------------------
-String BrowseBox::GetColumnTitle( USHORT nId ) const
+String BrowseBox::GetColumnTitle( sal_uInt16 nId ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- USHORT nItemPos = GetColumnPos( nId );
+ sal_uInt16 nItemPos = GetColumnPos( nId );
if ( nItemPos >= pCols->Count() )
return String();
return pCols->GetObject(nItemPos)->Title();
@@ -966,11 +966,11 @@ long BrowseBox::GetRowCount() const
//-------------------------------------------------------------------
-USHORT BrowseBox::ColCount() const
+sal_uInt16 BrowseBox::ColCount() const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- return (USHORT) pCols->Count();
+ return (sal_uInt16) pCols->Count();
}
//-------------------------------------------------------------------
@@ -999,7 +999,7 @@ void BrowseBox::SetDataRowHeight( long nPixel )
//-------------------------------------------------------------------
-void BrowseBox::SetTitleLines( USHORT nLines )
+void BrowseBox::SetTitleLines( sal_uInt16 nLines )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -1019,9 +1019,9 @@ long BrowseBox::ScrollColumns( long nCols )
// implicitly hides cursor while scrolling
StartScroll();
- bScrolling = TRUE;
- BOOL bScrollable = pDataWin->GetBackground().IsScrollable();
- BOOL bInvalidateView = FALSE;
+ bScrolling = sal_True;
+ sal_Bool bScrollable = pDataWin->GetBackground().IsScrollable();
+ sal_Bool bInvalidateView = sal_False;
// scrolling one column to the right?
if ( nCols == 1 )
@@ -1032,7 +1032,7 @@ long BrowseBox::ScrollColumns( long nCols )
if ( !bScrollable )
{
- bInvalidateView = TRUE;
+ bInvalidateView = sal_True;
}
else
{
@@ -1078,7 +1078,7 @@ long BrowseBox::ScrollColumns( long nCols )
if ( !bScrollable )
{
- bInvalidateView = TRUE;
+ bInvalidateView = sal_True;
}
else
{
@@ -1113,7 +1113,7 @@ long BrowseBox::ScrollColumns( long nCols )
pDataWin->GetSizePixel() ) );
}
- nFirstCol = nFirstCol + (USHORT)nCols;
+ nFirstCol = nFirstCol + (sal_uInt16)nCols;
aHScroll.SetThumbPos( nFirstCol - FrozenColCount() );
}
@@ -1121,7 +1121,7 @@ long BrowseBox::ScrollColumns( long nCols )
if ( getDataWindow()->pHeaderBar )
{
long nWidth = 0;
- for ( USHORT nCol = 0;
+ for ( sal_uInt16 nCol = 0;
nCol < pCols->Count() && nCol < nFirstCol;
++nCol )
{
@@ -1145,7 +1145,7 @@ long BrowseBox::ScrollColumns( long nCols )
getDataWindow()->Update();
Update();
}
- bScrolling = FALSE;
+ bScrolling = sal_False;
EndScroll();
return nCols;
@@ -1169,8 +1169,8 @@ long BrowseBox::ScrollRows( long nRows )
if ( nNewTopRow == nTopRow )
return 0;
- USHORT nVisibleRows =
- (USHORT)(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1);
+ sal_uInt16 nVisibleRows =
+ (sal_uInt16)(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1);
VisibleRowsChanged(nNewTopRow, nVisibleRows);
@@ -1220,7 +1220,7 @@ long BrowseBox::ScrollPages( long )
//-------------------------------------------------------------------
-void BrowseBox::RowModified( long nRow, USHORT nColId )
+void BrowseBox::RowModified( long nRow, sal_uInt16 nColId )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -1235,7 +1235,7 @@ void BrowseBox::RowModified( long nRow, USHORT nColId )
else
{
// invalidate the specific field
- aRect = GetFieldRectPixel( nRow, nColId, FALSE );
+ aRect = GetFieldRectPixel( nRow, nColId, sal_False );
}
getDataWindow()->Invalidate( aRect );
}
@@ -1301,7 +1301,7 @@ void BrowseBox::Clear()
}
}
// -----------------------------------------------------------------------------
-void BrowseBox::RowInserted( long nRow, long nNumRows, BOOL bDoPaint, BOOL bKeepSelection )
+void BrowseBox::RowInserted( long nRow, long nNumRows, sal_Bool bDoPaint, sal_Bool bKeepSelection )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -1324,7 +1324,7 @@ void BrowseBox::RowInserted( long nRow, long nNumRows, BOOL bDoPaint, BOOL bKeep
#endif
// adjust total row count
- BOOL bLastRow = nRow >= nRowCount;
+ sal_Bool bLastRow = nRow >= nRowCount;
nRowCount += nNumRows;
DoHideCursor( "RowInserted" );
@@ -1368,9 +1368,9 @@ void BrowseBox::RowInserted( long nRow, long nNumRows, BOOL bDoPaint, BOOL bKeep
// adjust the cursor
if ( nCurRow == BROWSER_ENDOFSELECTION )
- GoToRow( 0, FALSE, bKeepSelection );
+ GoToRow( 0, sal_False, bKeepSelection );
else if ( nRow <= nCurRow )
- GoToRow( nCurRow += nNumRows, FALSE, bKeepSelection );
+ GoToRow( nCurRow += nNumRows, sal_False, bKeepSelection );
// adjust the vertical scrollbar
if ( bDoPaint )
@@ -1417,7 +1417,7 @@ void BrowseBox::RowInserted( long nRow, long nNumRows, BOOL bDoPaint, BOOL bKeep
//-------------------------------------------------------------------
-void BrowseBox::RowRemoved( long nRow, long nNumRows, BOOL bDoPaint )
+void BrowseBox::RowRemoved( long nRow, long nNumRows, sal_Bool bDoPaint )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -1590,20 +1590,20 @@ void BrowseBox::RowRemoved( long nRow, long nNumRows, BOOL bDoPaint )
//-------------------------------------------------------------------
-BOOL BrowseBox::GoToRow( long nRow)
+sal_Bool BrowseBox::GoToRow( long nRow)
{
- return GoToRow(nRow, FALSE, FALSE);
+ return GoToRow(nRow, sal_False, sal_False);
}
//-------------------------------------------------------------------
-BOOL BrowseBox::GoToRowAndDoNotModifySelection( long nRow )
+sal_Bool BrowseBox::GoToRowAndDoNotModifySelection( long nRow )
{
- return GoToRow( nRow, FALSE, TRUE );
+ return GoToRow( nRow, sal_False, sal_True );
}
//-------------------------------------------------------------------
-BOOL BrowseBox::GoToRow( long nRow, BOOL bRowColMove, BOOL bKeepSelection )
+sal_Bool BrowseBox::GoToRow( long nRow, sal_Bool bRowColMove, sal_Bool bKeepSelection )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -1611,22 +1611,22 @@ BOOL BrowseBox::GoToRow( long nRow, BOOL bRowColMove, BOOL bKeepSelection )
// nothing to do?
if ( nRow == nCurRow && ( bMultiSelection || uRow.nSel == nRow ) )
- return TRUE;
+ return sal_True;
// out of range?
if ( nRow < 0 || nRow >= nRowCount )
- return FALSE;
+ return sal_False;
// nicht erlaubt?
if ( ( !bRowColMove && !IsCursorMoveAllowed( nRow, nCurColId ) ) )
- return FALSE;
+ return sal_False;
if ( getDataWindow()->bNoScrollBack && nRow < nTopRow )
nRow = nTopRow;
// compute the last visible row
Size aSz( pDataWin->GetSizePixel() );
- USHORT nVisibleRows = USHORT( aSz.Height() / GetDataRowHeight() - 1 );
+ sal_uInt16 nVisibleRows = sal_uInt16( aSz.Height() / GetDataRowHeight() - 1 );
long nLastRow = nTopRow + nVisibleRows;
// suspend Updates
@@ -1638,11 +1638,11 @@ BOOL BrowseBox::GoToRow( long nRow, BOOL bRowColMove, BOOL bKeepSelection )
DoHideCursor( "GoToRow" );
// must we scroll?
- BOOL bWasVisible = bSelectionIsVisible;
+ sal_Bool bWasVisible = bSelectionIsVisible;
if (! bMultiSelection)
{
if( !bKeepSelection )
- bSelectionIsVisible = FALSE;
+ bSelectionIsVisible = sal_False;
}
if ( nRow < nTopRow )
ScrollRows( nRow - nTopRow );
@@ -1684,46 +1684,46 @@ BOOL BrowseBox::GoToRow( long nRow, BOOL bRowColMove, BOOL bKeepSelection )
if ( !bSelecting )
Select();
else
- bSelect = TRUE;
+ bSelect = sal_True;
}
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------
-BOOL BrowseBox::GoToColumnId( USHORT nColId)
+sal_Bool BrowseBox::GoToColumnId( sal_uInt16 nColId)
{
- return GoToColumnId(nColId,TRUE,FALSE);
+ return GoToColumnId(nColId,sal_True,sal_False);
}
-BOOL BrowseBox::GoToColumnId( USHORT nColId, BOOL bMakeVisible, BOOL bRowColMove)
+sal_Bool BrowseBox::GoToColumnId( sal_uInt16 nColId, sal_Bool bMakeVisible, sal_Bool bRowColMove)
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
if (!bColumnCursor)
- return FALSE;
+ return sal_False;
// erlaubt?
if (!bRowColMove && !IsCursorMoveAllowed( nCurRow, nColId ) )
- return FALSE;
+ return sal_False;
- if ( nColId != nCurColId || (bMakeVisible && !IsFieldVisible(nCurRow, nColId, TRUE)))
+ if ( nColId != nCurColId || (bMakeVisible && !IsFieldVisible(nCurRow, nColId, sal_True)))
{
- USHORT nNewPos = GetColumnPos(nColId);
+ sal_uInt16 nNewPos = GetColumnPos(nColId);
BrowserColumn* pColumn = pCols->GetObject( nNewPos );
DBG_ASSERT( pColumn, "no column object - invalid id?" );
if ( !pColumn )
- return FALSE;
+ return sal_False;
DoHideCursor( "GoToColumnId" );
nCurColId = nColId;
- USHORT nFirstPos = nFirstCol;
- USHORT nWidth = (USHORT)pColumn->Width();
- USHORT nLastPos = GetColumnAtXPosPixel(
- pDataWin->GetSizePixel().Width()-nWidth, FALSE );
- USHORT nFrozen = FrozenColCount();
+ sal_uInt16 nFirstPos = nFirstCol;
+ sal_uInt16 nWidth = (sal_uInt16)pColumn->Width();
+ sal_uInt16 nLastPos = GetColumnAtXPosPixel(
+ pDataWin->GetSizePixel().Width()-nWidth, sal_False );
+ sal_uInt16 nFrozen = FrozenColCount();
if ( bMakeVisible && nLastPos &&
nNewPos >= nFrozen && ( nNewPos < nFirstPos || nNewPos > nLastPos ) )
{
@@ -1736,35 +1736,35 @@ BOOL BrowseBox::GoToColumnId( USHORT nColId, BOOL bMakeVisible, BOOL bRowColMove
DoShowCursor( "GoToColumnId" );
if (!bRowColMove)
CursorMoved();
- return TRUE;
+ return sal_True;
}
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------
-BOOL BrowseBox::GoToRowColumnId( long nRow, USHORT nColId )
+sal_Bool BrowseBox::GoToRowColumnId( long nRow, sal_uInt16 nColId )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
// out of range?
if ( nRow < 0 || nRow >= nRowCount )
- return FALSE;
+ return sal_False;
if (!bColumnCursor)
- return FALSE;
+ return sal_False;
// nothing to do ?
if ( nRow == nCurRow && ( bMultiSelection || uRow.nSel == nRow ) &&
- nColId == nCurColId && IsFieldVisible(nCurRow, nColId, TRUE))
- return TRUE;
+ nColId == nCurColId && IsFieldVisible(nCurRow, nColId, sal_True))
+ return sal_True;
// erlaubt?
if (!IsCursorMoveAllowed(nRow, nColId))
- return FALSE;
+ return sal_False;
DoHideCursor( "GoToRowColumnId" );
- BOOL bMoved = GoToRow(nRow, TRUE) && GoToColumnId(nColId, TRUE, TRUE);
+ sal_Bool bMoved = GoToRow(nRow, sal_True) && GoToColumnId(nColId, sal_True, sal_True);
DoShowCursor( "GoToRowColumnId" );
if (bMoved)
@@ -1791,15 +1791,15 @@ void BrowseBox::SetNoSelection()
// unselect all
if ( bMultiSelection )
- uRow.pSel->SelectAll(FALSE);
+ uRow.pSel->SelectAll(sal_False);
else
uRow.nSel = BROWSER_ENDOFSELECTION;
if ( pColSel )
- pColSel->SelectAll(FALSE);
+ pColSel->SelectAll(sal_False);
if ( !bSelecting )
Select();
else
- bSelect = TRUE;
+ bSelect = sal_True;
// restore screen
DBG_TRACE1( "BrowseBox: %p->ShowCursor", this );
@@ -1835,7 +1835,7 @@ void BrowseBox::SetSelection( const MultiSelection &rSel )
if ( !bSelecting )
Select();
else
- bSelect = TRUE;
+ bSelect = sal_True;
// restore screen
ToggleSelection();
@@ -1865,8 +1865,8 @@ void BrowseBox::SelectAll()
// select all rows
if ( pColSel )
- pColSel->SelectAll(FALSE);
- uRow.pSel->SelectAll(TRUE);
+ pColSel->SelectAll(sal_False);
+ uRow.pSel->SelectAll(sal_True);
// Handle-Column nicht highlighten
BrowserColumn *pFirstCol = pCols->GetObject(0);
@@ -1876,8 +1876,8 @@ void BrowseBox::SelectAll()
if ( !bHideSelect )
{
Rectangle aHighlightRect;
- USHORT nVisibleRows =
- (USHORT)(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1);
+ sal_uInt16 nVisibleRows =
+ (sal_uInt16)(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1);
for ( long nRow = Max( nTopRow, uRow.pSel->FirstSelected() );
nRow != BROWSER_ENDOFSELECTION && nRow < nTopRow + nVisibleRows;
nRow = uRow.pSel->NextSelected() )
@@ -1890,7 +1890,7 @@ void BrowseBox::SelectAll()
if ( !bSelecting )
Select();
else
- bSelect = TRUE;
+ bSelect = sal_True;
// restore screen
DBG_TRACE1( "BrowseBox: %p->ShowCursor", this );
@@ -1920,7 +1920,7 @@ void BrowseBox::SelectAll()
//-------------------------------------------------------------------
-void BrowseBox::SelectRow( long nRow, BOOL _bSelect, BOOL bExpand )
+void BrowseBox::SelectRow( long nRow, sal_Bool _bSelect, sal_Bool bExpand )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -1928,7 +1928,7 @@ void BrowseBox::SelectRow( long nRow, BOOL _bSelect, BOOL bExpand )
{
// deselecting is impossible, selecting via cursor
if ( _bSelect )
- GoToRow(nRow, FALSE);
+ GoToRow(nRow, sal_False);
return;
}
@@ -1939,11 +1939,11 @@ void BrowseBox::SelectRow( long nRow, BOOL _bSelect, BOOL bExpand )
{
ToggleSelection();
if ( bMultiSelection )
- uRow.pSel->SelectAll(FALSE);
+ uRow.pSel->SelectAll(sal_False);
else
uRow.nSel = BROWSER_ENDOFSELECTION;
if ( pColSel )
- pColSel->SelectAll(FALSE);
+ pColSel->SelectAll(sal_False);
}
// set new selection
@@ -1971,7 +1971,7 @@ void BrowseBox::SelectRow( long nRow, BOOL _bSelect, BOOL bExpand )
if ( !bSelecting )
Select();
else
- bSelect = TRUE;
+ bSelect = sal_True;
// restore screen
DBG_TRACE1( "BrowseBox: %p->ShowCursor", this );
@@ -2004,7 +2004,7 @@ long BrowseBox::GetSelectRowCount() const
//-------------------------------------------------------------------
-void BrowseBox::SelectColumnPos( USHORT nNewColPos, BOOL _bSelect, BOOL bMakeVisible )
+void BrowseBox::SelectColumnPos( sal_uInt16 nNewColPos, sal_Bool _bSelect, sal_Bool bMakeVisible )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -2026,10 +2026,10 @@ void BrowseBox::SelectColumnPos( USHORT nNewColPos, BOOL _bSelect, BOOL bMakeVis
DBG_TRACE1( "BrowseBox: %p->HideCursor", this );
ToggleSelection();
if ( bMultiSelection )
- uRow.pSel->SelectAll(FALSE);
+ uRow.pSel->SelectAll(sal_False);
else
uRow.nSel = BROWSER_ENDOFSELECTION;
- pColSel->SelectAll(FALSE);
+ pColSel->SelectAll(sal_False);
if ( pColSel->Select( nNewColPos, _bSelect ) )
{
@@ -2037,7 +2037,7 @@ void BrowseBox::SelectColumnPos( USHORT nNewColPos, BOOL _bSelect, BOOL bMakeVis
// only highlight painted areas
pDataWin->Update();
- Rectangle aFieldRectPix( GetFieldRectPixel( nCurRow, nCurColId, FALSE ) );
+ Rectangle aFieldRectPix( GetFieldRectPixel( nCurRow, nCurColId, sal_False ) );
Rectangle aRect(
Point( aFieldRectPix.Left() - MIN_COLUMNWIDTH, 0 ),
Size( pCols->GetObject(nNewColPos)->Width(),
@@ -2046,7 +2046,7 @@ void BrowseBox::SelectColumnPos( USHORT nNewColPos, BOOL _bSelect, BOOL bMakeVis
if ( !bSelecting )
Select();
else
- bSelect = TRUE;
+ bSelect = sal_True;
if ( isAccessibleAlive() )
{
@@ -2070,12 +2070,12 @@ void BrowseBox::SelectColumnPos( USHORT nNewColPos, BOOL _bSelect, BOOL bMakeVis
//-------------------------------------------------------------------
-USHORT BrowseBox::GetSelectColumnCount() const
+sal_uInt16 BrowseBox::GetSelectColumnCount() const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
// while bAutoSelect (==!pColSel), 1 if any rows (yes rows!) else none
- return pColSel ? (USHORT) pColSel->GetSelectCount() :
+ return pColSel ? (sal_uInt16) pColSel->GetSelectCount() :
nCurRow >= 0 ? 1 : 0;
}
@@ -2093,7 +2093,7 @@ long BrowseBox::NextSelectedColumn( ) const
//-------------------------------------------------------------------
-long BrowseBox::FirstSelectedRow( BOOL bInverse )
+long BrowseBox::FirstSelectedRow( sal_Bool bInverse )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -2138,7 +2138,7 @@ bool BrowseBox::IsRowSelected( long nRow ) const
//-------------------------------------------------------------------
-bool BrowseBox::IsColumnSelected( USHORT nColumnId ) const
+bool BrowseBox::IsColumnSelected( sal_uInt16 nColumnId ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -2157,11 +2157,11 @@ sal_Bool BrowseBox::IsAllSelected() const
//-------------------------------------------------------------------
-BOOL BrowseBox::MakeFieldVisible
+sal_Bool BrowseBox::MakeFieldVisible
(
long nRow, // Zeilen-Nr des Feldes (beginnend mit 0)
- USHORT nColId, // Spalten-Id des Feldes
- BOOL bComplete // (== FALSE), TRUE => vollst"andig sichtbar machen
+ sal_uInt16 nColId, // Spalten-Id des Feldes
+ sal_Bool bComplete // (== sal_False), sal_True => vollst"andig sichtbar machen
)
/* [Beschreibung]
@@ -2172,11 +2172,11 @@ BOOL BrowseBox::MakeFieldVisible
[R"uckgabewert]
- BOOL TRUE
+ sal_Bool sal_True
Das angegebene Feld wurde sichtbar gemacht, bzw. war
bereits sichtbar.
- FALSE
+ sal_False
Das angegebene Feld konnte nicht sichtbar bzw. bei
'bComplete' nicht vollst"andig sichtbar gemacht werden.
*/
@@ -2186,16 +2186,16 @@ BOOL BrowseBox::MakeFieldVisible
if ( !bBootstrapped ||
( aTestSize.Width() == 0 && aTestSize.Height() == 0 ) )
- return FALSE;
+ return sal_False;
// ist es schon sichtbar?
- BOOL bVisible = IsFieldVisible( nRow, nColId, bComplete );
+ sal_Bool bVisible = IsFieldVisible( nRow, nColId, bComplete );
if ( bVisible )
- return TRUE;
+ return sal_True;
// Spaltenposition und Feld-Rechteck und Ausgabebereich berechnen
- USHORT nColPos = GetColumnPos( nColId );
- Rectangle aFieldRect = GetFieldRectPixel( nRow, nColId, FALSE );
+ sal_uInt16 nColPos = GetColumnPos( nColId );
+ Rectangle aFieldRect = GetFieldRectPixel( nRow, nColId, sal_False );
Rectangle aDataRect = Rectangle( Point(0, 0), pDataWin->GetSizePixel() );
// links au\serhalb?
@@ -2212,7 +2212,7 @@ BOOL BrowseBox::MakeFieldVisible
if ( ScrollColumns( 1 ) != 1 )
// nichts mehr zu scrollen
break;
- aFieldRect = GetFieldRectPixel( nRow, nColId, FALSE );
+ aFieldRect = GetFieldRectPixel( nRow, nColId, sal_False );
}
// oben au\serhalb?
@@ -2238,19 +2238,19 @@ BOOL BrowseBox::MakeFieldVisible
//-------------------------------------------------------------------
-BOOL BrowseBox::IsFieldVisible( long nRow, USHORT nColumnId,
- BOOL bCompletely ) const
+sal_Bool BrowseBox::IsFieldVisible( long nRow, sal_uInt16 nColumnId,
+ sal_Bool bCompletely ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
// durch frozen-Column verdeckt?
- USHORT nColPos = GetColumnPos( nColumnId );
+ sal_uInt16 nColPos = GetColumnPos( nColumnId );
if ( nColPos >= FrozenColCount() && nColPos < nFirstCol )
- return FALSE;
+ return sal_False;
Rectangle aRect( ImplFieldRectPixel( nRow, nColumnId ) );
if ( aRect.IsEmpty() )
- return FALSE;
+ return sal_False;
// get the visible area
Rectangle aOutRect( Point(0, 0), pDataWin->GetOutputSizePixel() );
@@ -2265,8 +2265,8 @@ BOOL BrowseBox::IsFieldVisible( long nRow, USHORT nColumnId,
//-------------------------------------------------------------------
-Rectangle BrowseBox::GetFieldRectPixel( long nRow, USHORT nColumnId,
- BOOL bRelToBrowser) const
+Rectangle BrowseBox::GetFieldRectPixel( long nRow, sal_uInt16 nColumnId,
+ sal_Bool bRelToBrowser) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -2288,7 +2288,7 @@ Rectangle BrowseBox::GetFieldRectPixel( long nRow, USHORT nColumnId,
//-------------------------------------------------------------------
-Rectangle BrowseBox::GetRowRectPixel( long nRow, BOOL bRelToBrowser ) const
+Rectangle BrowseBox::GetRowRectPixel( long nRow, sal_Bool bRelToBrowser ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -2317,14 +2317,14 @@ Rectangle BrowseBox::GetRowRectPixel( long nRow, BOOL bRelToBrowser ) const
//-------------------------------------------------------------------
-Rectangle BrowseBox::ImplFieldRectPixel( long nRow, USHORT nColumnId ) const
+Rectangle BrowseBox::ImplFieldRectPixel( long nRow, sal_uInt16 nColumnId ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
// compute the X-coordinte realtiv to DataWin by accumulation
long nColX = 0;
- USHORT nFrozenCols = FrozenColCount();
- USHORT nCol;
+ sal_uInt16 nFrozenCols = FrozenColCount();
+ sal_uInt16 nCol;
for ( nCol = 0;
nCol < pCols->Count() && pCols->GetObject(nCol)->GetId() != nColumnId;
++nCol )
@@ -2348,7 +2348,7 @@ Rectangle BrowseBox::ImplFieldRectPixel( long nRow, USHORT nColumnId ) const
//-------------------------------------------------------------------
-long BrowseBox::GetRowAtYPosPixel( long nY, BOOL bRelToBrowser ) const
+long BrowseBox::GetRowAtYPosPixel( long nY, sal_Bool bRelToBrowser ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -2369,7 +2369,7 @@ long BrowseBox::GetRowAtYPosPixel( long nY, BOOL bRelToBrowser ) const
//-------------------------------------------------------------------
-Rectangle BrowseBox::GetFieldRect( USHORT nColumnId ) const
+Rectangle BrowseBox::GetFieldRect( sal_uInt16 nColumnId ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -2378,14 +2378,14 @@ Rectangle BrowseBox::GetFieldRect( USHORT nColumnId ) const
//-------------------------------------------------------------------
-USHORT BrowseBox::GetColumnAtXPosPixel( long nX, BOOL ) const
+sal_uInt16 BrowseBox::GetColumnAtXPosPixel( long nX, sal_Bool ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
// accumulate the withds of the visible columns
long nColX = 0;
- USHORT nCol;
- for ( nCol = 0; nCol < USHORT(pCols->Count()); ++nCol )
+ sal_uInt16 nCol;
+ for ( nCol = 0; nCol < sal_uInt16(pCols->Count()); ++nCol )
{
BrowserColumn *pCol = pCols->GetObject(nCol);
if ( pCol->IsFrozen() || nCol >= nFirstCol )
@@ -2400,7 +2400,7 @@ USHORT BrowseBox::GetColumnAtXPosPixel( long nX, BOOL ) const
//-------------------------------------------------------------------
-void BrowseBox::ReserveControlArea( USHORT nWidth )
+void BrowseBox::ReserveControlArea( sal_uInt16 nWidth )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -2461,9 +2461,9 @@ void BrowseBox::SetMode( BrowserMode nMode )
DBG_ASSERT( !( getDataWindow()->bAutoVScroll && getDataWindow()->bNoVScroll ),
"BrowseBox::SetMode: AutoVScroll *and* NoVScroll?" );
if ( getDataWindow()->bAutoHScroll )
- getDataWindow()->bNoHScroll = FALSE;
+ getDataWindow()->bNoHScroll = sal_False;
if ( getDataWindow()->bAutoVScroll )
- getDataWindow()->bNoVScroll = FALSE;
+ getDataWindow()->bNoVScroll = sal_False;
if ( getDataWindow()->bNoHScroll )
aHScroll.Hide();
@@ -2577,40 +2577,40 @@ void BrowseBox::SetMode( BrowserMode nMode )
//-------------------------------------------------------------------
-void BrowseBox::VisibleRowsChanged( long, USHORT )
+void BrowseBox::VisibleRowsChanged( long, sal_uInt16 )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
// Das alte Verhalten: NumRows automatisch korrigieren:
if ( nRowCount < GetRowCount() )
{
- RowInserted(nRowCount,GetRowCount() - nRowCount,FALSE);
+ RowInserted(nRowCount,GetRowCount() - nRowCount,sal_False);
}
else if ( nRowCount > GetRowCount() )
{
- RowRemoved(nRowCount-(nRowCount - GetRowCount()),nRowCount - GetRowCount(),FALSE);
+ RowRemoved(nRowCount-(nRowCount - GetRowCount()),nRowCount - GetRowCount(),sal_False);
}
}
//-------------------------------------------------------------------
-BOOL BrowseBox::IsCursorMoveAllowed( long, USHORT ) const
+sal_Bool BrowseBox::IsCursorMoveAllowed( long, sal_uInt16 ) const
/* [Beschreibung]
Diese virtuelle Methode wird immer gerufen bevor der Cursor direkt
- bewegt werden soll. Durch 'return FALSE' kann verhindert werden, da\s
+ bewegt werden soll. Durch 'return sal_False' kann verhindert werden, da\s
dies geschieht, wenn z.B. ein Datensatz irgendwelchen Rules widerspricht.
Diese Methode wird nicht gerufen, wenn die Cursorbewegung durch
ein L"oschen oder Einf"ugen (einer Zeile/Spalte) ausgel"ost wird, also
genaugenommen nur eine Cursor-Korrektur vorliegt.
- Die Basisimplementierung liefert derzeit immer TRUE.
+ Die Basisimplementierung liefert derzeit immer sal_True.
*/
{
- return TRUE;
+ return sal_True;
}
//-------------------------------------------------------------------
@@ -2728,10 +2728,10 @@ void BrowseBox::LoseFocus()
if ( !bKeepHighlight )
{
ToggleSelection();
- bSelectionIsVisible = FALSE;
+ bSelectionIsVisible = sal_False;
}
- bHasFocus = FALSE;
+ bHasFocus = sal_False;
}
Control::LoseFocus();
}
@@ -2747,12 +2747,12 @@ void BrowseBox::GetFocus()
{
if ( !bSelectionIsVisible )
{
- bSelectionIsVisible = TRUE;
+ bSelectionIsVisible = sal_True;
if ( bBootstrapped )
ToggleSelection();
}
- bHasFocus = TRUE;
+ bHasFocus = sal_True;
DoShowCursor( "GetFocus" );
}
Control::GetFocus();
diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx
index 53c2a5ac86f6..c37fb6915725 100644
--- a/svtools/source/brwbox/brwbox2.cxx
+++ b/svtools/source/brwbox/brwbox2.cxx
@@ -177,7 +177,7 @@ void BrowseBox::StateChanged( StateChangedType nStateChange )
}
else if ( STATE_CHANGE_INITSHOW == nStateChange )
{
- bBootstrapped = TRUE; // muss zuerst gesetzt werden!
+ bBootstrapped = sal_True; // muss zuerst gesetzt werden!
Resize();
if ( bMultiSelection )
@@ -190,8 +190,8 @@ void BrowseBox::StateChanged( StateChangedType nStateChange )
if ( HasFocus() )
{
- bSelectionIsVisible = TRUE;
- bHasFocus = TRUE;
+ bSelectionIsVisible = sal_True;
+ bHasFocus = sal_True;
}
UpdateScrollbars();
AutoSizeLastColumn();
@@ -205,7 +205,7 @@ void BrowseBox::StateChanged( StateChangedType nStateChange )
pHeaderBar->SetZoom(GetZoom());
// let the cols calc their new widths and adjust the header bar
- for ( USHORT nPos = 0; nPos < pCols->Count(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < pCols->Count(); ++nPos )
{
pCols->GetObject(nPos)->ZoomChanged(GetZoom());
if ( pHeaderBar )
@@ -285,7 +285,7 @@ void BrowseBox::RowHeightChanged()
//-------------------------------------------------------------------
-long BrowseBox::QueryColumnResize( USHORT, long nWidth )
+long BrowseBox::QueryColumnResize( sal_uInt16, long nWidth )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
return nWidth;
@@ -293,14 +293,14 @@ long BrowseBox::QueryColumnResize( USHORT, long nWidth )
//-------------------------------------------------------------------
-void BrowseBox::ColumnResized( USHORT )
+void BrowseBox::ColumnResized( sal_uInt16 )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
}
//-------------------------------------------------------------------
-void BrowseBox::ColumnMoved( USHORT )
+void BrowseBox::ColumnMoved( sal_uInt16 )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
}
@@ -330,7 +330,7 @@ void BrowseBox::EndScroll()
#pragma optimize( "", off )
#endif
-void BrowseBox::ToggleSelection( BOOL bForce )
+void BrowseBox::ToggleSelection( sal_Bool bForce )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -342,8 +342,8 @@ void BrowseBox::ToggleSelection( BOOL bForce )
return;
// only highlight painted areas!
- bNotToggleSel = TRUE;
- if ( FALSE && !getDataWindow()->bInPaint )
+ bNotToggleSel = sal_True;
+ if ( sal_False && !getDataWindow()->bInPaint )
pDataWin->Update();
// accumulate areas of rows to highlight
@@ -372,7 +372,7 @@ void BrowseBox::ToggleSelection( BOOL bForce )
if ( aHighlightList.Count() && nLastRowInRect == ( nRow - 1 ) )
aHighlightList.First()->Union( aAddRect );
else
- aHighlightList.Insert( new Rectangle( aAddRect ), (ULONG) 0 );
+ aHighlightList.Insert( new Rectangle( aAddRect ), (sal_uLong) 0 );
nLastRowInRect = nRow;
}
@@ -391,7 +391,7 @@ void BrowseBox::ToggleSelection( BOOL bForce )
{
Rectangle aRect( GetFieldRectPixel(nCurRow,
pCols->GetObject(nColId)->GetId(),
- FALSE ) );
+ sal_False ) );
aRect.Left() -= MIN_COLUMNWIDTH;
aRect.Right() += MIN_COLUMNWIDTH;
aRect.Top() = 0;
@@ -399,7 +399,7 @@ void BrowseBox::ToggleSelection( BOOL bForce )
pDataWin->Invalidate( aRect );
}
- bNotToggleSel = FALSE;
+ bNotToggleSel = sal_False;
}
#ifdef _MSC_VER
@@ -410,15 +410,15 @@ void BrowseBox::ToggleSelection( BOOL bForce )
void BrowseBox::DrawCursor()
{
- BOOL bReallyHide = FALSE;
+ sal_Bool bReallyHide = sal_False;
if ( SMART_CURSOR_HIDE == bHideCursor )
{
if ( !GetSelectRowCount() && !GetSelectColumnCount() )
- bReallyHide = TRUE;
+ bReallyHide = sal_True;
}
else if ( HARD_CURSOR_HIDE == bHideCursor )
{
- bReallyHide = TRUE;
+ bReallyHide = sal_True;
}
bReallyHide |= !bSelectionIsVisible || !IsUpdateMode() || bScrolling || nCurRow < 0;
@@ -436,7 +436,7 @@ void BrowseBox::DrawCursor()
Rectangle aCursor;
if ( bColumnCursor )
{
- aCursor = GetFieldRectPixel( nCurRow, nCurColId, FALSE );
+ aCursor = GetFieldRectPixel( nCurRow, nCurColId, sal_False );
//! --aCursor.Bottom();
aCursor.Left() -= MIN_COLUMNWIDTH;
aCursor.Right() += 1;
@@ -481,11 +481,11 @@ void BrowseBox::DrawCursor()
//-------------------------------------------------------------------
-ULONG BrowseBox::GetColumnWidth( USHORT nId ) const
+sal_uLong BrowseBox::GetColumnWidth( sal_uInt16 nId ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- USHORT nItemPos = GetColumnPos( nId );
+ sal_uInt16 nItemPos = GetColumnPos( nId );
if ( nItemPos >= pCols->Count() )
return 0;
return pCols->GetObject(nItemPos)->Width();
@@ -493,7 +493,7 @@ ULONG BrowseBox::GetColumnWidth( USHORT nId ) const
//-------------------------------------------------------------------
-USHORT BrowseBox::GetColumnId( USHORT nPos ) const
+sal_uInt16 BrowseBox::GetColumnId( sal_uInt16 nPos ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -504,11 +504,11 @@ USHORT BrowseBox::GetColumnId( USHORT nPos ) const
//-------------------------------------------------------------------
-USHORT BrowseBox::GetColumnPos( USHORT nId ) const
+sal_uInt16 BrowseBox::GetColumnPos( sal_uInt16 nId ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- for ( USHORT nPos = 0; nPos < pCols->Count(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < pCols->Count(); ++nPos )
if ( pCols->GetObject(nPos)->GetId() == nId )
return nPos;
return BROWSER_INVALIDID;
@@ -516,14 +516,14 @@ USHORT BrowseBox::GetColumnPos( USHORT nId ) const
//-------------------------------------------------------------------
-BOOL BrowseBox::IsFrozen( USHORT nColumnId ) const
+sal_Bool BrowseBox::IsFrozen( sal_uInt16 nColumnId ) const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- for ( USHORT nPos = 0; nPos < pCols->Count(); ++nPos )
+ for ( sal_uInt16 nPos = 0; nPos < pCols->Count(); ++nPos )
if ( pCols->GetObject(nPos)->GetId() == nColumnId )
return pCols->GetObject(nPos)->IsFrozen();
- return FALSE;
+ return sal_False;
}
//-------------------------------------------------------------------
@@ -540,34 +540,34 @@ void BrowseBox::ExpandRowSelection( const BrowserMouseEvent& rEvt )
Range aJustifiedRange( aSelRange );
aJustifiedRange.Justify();
- BOOL bSelectThis = ( bSelect != aJustifiedRange.IsInside( rEvt.GetRow() ) );
+ sal_Bool bSelectThis = ( bSelect != aJustifiedRange.IsInside( rEvt.GetRow() ) );
if ( aJustifiedRange.IsInside( rEvt.GetRow() ) )
{
// down and up
while ( rEvt.GetRow() < aSelRange.Max() )
{ // ZTC/Mac bug - dont put these statemants together!
- SelectRow( aSelRange.Max(), bSelectThis, TRUE );
+ SelectRow( aSelRange.Max(), bSelectThis, sal_True );
--aSelRange.Max();
}
while ( rEvt.GetRow() > aSelRange.Max() )
{ // ZTC/Mac bug - dont put these statemants together!
- SelectRow( aSelRange.Max(), bSelectThis, TRUE );
+ SelectRow( aSelRange.Max(), bSelectThis, sal_True );
++aSelRange.Max();
}
}
else
{
// up and down
- BOOL bOldSelecting = bSelecting;
- bSelecting = TRUE;
+ sal_Bool bOldSelecting = bSelecting;
+ bSelecting = sal_True;
while ( rEvt.GetRow() < aSelRange.Max() )
{ // ZTC/Mac bug - dont put these statemants together!
--aSelRange.Max();
if ( !IsRowSelected( aSelRange.Max() ) )
{
- SelectRow( aSelRange.Max(), bSelectThis, TRUE );
- bSelect = TRUE;
+ SelectRow( aSelRange.Max(), bSelectThis, sal_True );
+ bSelect = sal_True;
}
}
while ( rEvt.GetRow() > aSelRange.Max() )
@@ -575,8 +575,8 @@ void BrowseBox::ExpandRowSelection( const BrowserMouseEvent& rEvt )
++aSelRange.Max();
if ( !IsRowSelected( aSelRange.Max() ) )
{
- SelectRow( aSelRange.Max(), bSelectThis, TRUE );
- bSelect = TRUE;
+ SelectRow( aSelRange.Max(), bSelectThis, sal_True );
+ bSelect = sal_True;
}
}
bSelecting = bOldSelecting;
@@ -586,9 +586,9 @@ void BrowseBox::ExpandRowSelection( const BrowserMouseEvent& rEvt )
}
else
if ( !bMultiSelection || !IsRowSelected( rEvt.GetRow() ) )
- SelectRow( rEvt.GetRow(), TRUE );
+ SelectRow( rEvt.GetRow(), sal_True );
- GoToRow( rEvt.GetRow(), FALSE );
+ GoToRow( rEvt.GetRow(), sal_False );
DoShowCursor( "ExpandRowSelection" );
}
@@ -601,21 +601,21 @@ void BrowseBox::Resize()
BrowseBox::StateChanged( STATE_CHANGE_INITSHOW );
if ( !pCols->Count() )
{
- getDataWindow()->bResizeOnPaint = TRUE;
+ getDataWindow()->bResizeOnPaint = sal_True;
return;
}
- getDataWindow()->bResizeOnPaint = FALSE;
+ getDataWindow()->bResizeOnPaint = sal_False;
// calc the size of the scrollbars
// (we can't ask the scrollbars for their widths cause if we're zoomed they still have to be
// resized - which is done in UpdateScrollbars)
- ULONG nSBSize = GetSettings().GetStyleSettings().GetScrollBarSize();
+ sal_uLong nSBSize = GetSettings().GetStyleSettings().GetScrollBarSize();
if (IsZoom())
- nSBSize = (ULONG)(nSBSize * (double)GetZoom());
+ nSBSize = (sal_uLong)(nSBSize * (double)GetZoom());
DoHideCursor( "Resize" );
- USHORT nOldVisibleRows =
- (USHORT)(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1);
+ sal_uInt16 nOldVisibleRows =
+ (sal_uInt16)(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1);
// did we need a horiz. scroll bar oder gibt es eine Control Area?
if ( !getDataWindow()->bNoHScroll &&
@@ -638,8 +638,8 @@ void BrowseBox::Resize()
Point( 0, GetTitleHeight() ),
Size( nDataWidth, nDataHeight ) );
- USHORT nVisibleRows =
- (USHORT)(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1);
+ sal_uInt16 nVisibleRows =
+ (sal_uInt16)(pDataWin->GetOutputSizePixel().Height() / GetDataRowHeight() + 1);
// TopRow ist unveraendert, aber die Anzahl sichtbarer Zeilen hat sich
// geaendert
@@ -681,8 +681,8 @@ void BrowseBox::Paint( const Rectangle& rRect )
return;
BrowserColumn *pFirstCol = pCols->GetObject(0);
- BOOL bHandleCol = pFirstCol && pFirstCol->GetId() == 0;
- BOOL bHeaderBar = getDataWindow()->pHeaderBar != NULL;
+ sal_Bool bHandleCol = pFirstCol && pFirstCol->GetId() == 0;
+ sal_Bool bHeaderBar = getDataWindow()->pHeaderBar != NULL;
// draw delimitational lines
if ( !getDataWindow()->bNoHScroll )
@@ -709,7 +709,7 @@ void BrowseBox::Paint( const Rectangle& rRect )
{
// iterate through columns to redraw
long nX = 0;
- USHORT nCol;
+ sal_uInt16 nCol;
for ( nCol = 0;
nCol < pCols->Count() && nX < rRect.Right();
++nCol )
@@ -729,7 +729,7 @@ void BrowseBox::Paint( const Rectangle& rRect )
{
ButtonFrame aButtonFrame( Point( nX, 0 ),
Size( pCol->Width()-1, GetTitleHeight()-1 ),
- pCol->Title(), FALSE, FALSE,
+ pCol->Title(), sal_False, sal_False,
0 != (BROWSER_COLUMN_TITLEABBREVATION&pCol->Flags()),
!IsEnabled());
aButtonFrame.Draw( *this );
@@ -774,9 +774,9 @@ void BrowseBox::PaintRow( OutputDevice&, const Rectangle& )
//-------------------------------------------------------------------
-void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags )
+void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags )
{
- BOOL bDrawSelection = (nFlags & WINDOW_DRAW_NOSELECTION) == 0;
+ sal_Bool bDrawSelection = (nFlags & WINDOW_DRAW_NOSELECTION) == 0;
// we need pixel coordinates
Size aRealSize = pDev->LogicToPixel(rSize);
@@ -820,7 +820,7 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
nDataRowHeight = nForeignHeightPixel;
// this counts for the column widths, too
- USHORT nPos;
+ sal_uInt16 nPos;
for ( nPos = 0; nPos < pCols->Count(); ++nPos )
{
BrowserColumn* pCurrent = pCols->GetObject(nPos);
@@ -865,7 +865,7 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
{
ButtonFrame aButtonFrame( aRealPos,
Size( pFirstCol->Width()-1, nTitleHeight-1 ),
- pFirstCol->Title(), FALSE, FALSE, FALSE, !IsEnabled());
+ pFirstCol->Title(), sal_False, sal_False, sal_False, !IsEnabled());
aButtonFrame.Draw( *pDev );
pDev->Push( PUSH_LINECOLOR );
@@ -888,7 +888,7 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
pDev->SetClipRegion( pDev->PixelToLogic( aRegion ) );
// do we have to paint the background
- BOOL bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && GetDataWindow().IsControlBackground();
+ sal_Bool bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && GetDataWindow().IsControlBackground();
if ( bBackground )
{
Rectangle aRect( aRealPos, aRealSize );
@@ -896,7 +896,7 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
pDev->DrawRect( aRect );
}
- ImplPaintData( *pDev, Rectangle( aRealPos, aRealSize ), TRUE, bDrawSelection );
+ ImplPaintData( *pDev, Rectangle( aRealPos, aRealSize ), sal_True, bDrawSelection );
// restore the column widths/data row height
nDataRowHeight = nOriginalHeight;
@@ -917,7 +917,7 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
//-------------------------------------------------------------------
-void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, BOOL _bForeignDevice, BOOL _bDrawSelections)
+void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, sal_Bool _bForeignDevice, sal_Bool _bDrawSelections)
{
Point aOverallAreaPos = _bForeignDevice ? _rRect.TopLeft() : Point(0,0);
Size aOverallAreaSize = _bForeignDevice ? _rRect.GetSize() : GetDataWindow().GetOutputSizePixel();
@@ -926,8 +926,8 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, BOOL
long nDataRowHeigt = GetDataRowHeight();
// compute relative rows to redraw
- ULONG nRelTopRow = _bForeignDevice ? 0 : ((ULONG)_rRect.Top() / nDataRowHeigt);
- ULONG nRelBottomRow = (ULONG)(_bForeignDevice ? aOverallAreaSize.Height() : _rRect.Bottom()) / nDataRowHeigt;
+ sal_uLong nRelTopRow = _bForeignDevice ? 0 : ((sal_uLong)_rRect.Top() / nDataRowHeigt);
+ sal_uLong nRelBottomRow = (sal_uLong)(_bForeignDevice ? aOverallAreaSize.Height() : _rRect.Bottom()) / nDataRowHeigt;
// cache frequently used values
Point aPos( aOverallAreaPos.X(), nRelTopRow * nDataRowHeigt + aOverallAreaPos.Y() );
@@ -947,19 +947,19 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, BOOL
Color aDelimiterLineColor( ::svtools::ColorConfig().GetColorValue( ::svtools::CALCGRID ).nColor );
// redraw the invalid fields
- BOOL bRetouching = FALSE;
- for ( ULONG nRelRow = nRelTopRow;
- nRelRow <= nRelBottomRow && (ULONG)nTopRow+nRelRow < (ULONG)nRowCount;
+ sal_Bool bRetouching = sal_False;
+ for ( sal_uLong nRelRow = nRelTopRow;
+ nRelRow <= nRelBottomRow && (sal_uLong)nTopRow+nRelRow < (sal_uLong)nRowCount;
++nRelRow, aPos.Y() += nDataRowHeigt )
{
// get row
// Zur Sicherheit auf zul"assigen Bereich abfragen:
- DBG_ASSERT( (USHORT)(nTopRow+nRelRow) < nRowCount, "BrowseBox::ImplPaintData: invalid seek" );
- if ( (nTopRow+long(nRelRow)) < 0 || (USHORT)(nTopRow+nRelRow) >= nRowCount )
+ DBG_ASSERT( (sal_uInt16)(nTopRow+nRelRow) < nRowCount, "BrowseBox::ImplPaintData: invalid seek" );
+ if ( (nTopRow+long(nRelRow)) < 0 || (sal_uInt16)(nTopRow+nRelRow) >= nRowCount )
continue;
// prepare row
- ULONG nRow = nTopRow+nRelRow;
+ sal_uLong nRow = nTopRow+nRelRow;
if ( !SeekRow( nRow) ) {
DBG_ERROR("BrowseBox::ImplPaintData: SeekRow gescheitert");
}
@@ -973,7 +973,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, BOOL
Size( _rRect.GetSize().Width(), nDataRowHeigt ) );
PaintRow( _rOut, aRowRect );
- BOOL bRowSelected = _bDrawSelections
+ sal_Bool bRowSelected = _bDrawSelections
&& !bHideSelect
&& IsRowSelected( nRow );
if ( bRowSelected )
@@ -985,7 +985,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, BOOL
}
// iterate through columns to redraw
- USHORT nCol;
+ sal_uInt16 nCol;
for ( nCol = 0; nCol < pCols->Count(); ++nCol )
{
// get column
@@ -1009,7 +1009,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, BOOL
}
// prepare Column-AutoHighlight
- BOOL bColAutoHighlight = _bDrawSelections
+ sal_Bool bColAutoHighlight = _bDrawSelections
&& bColumnCursor
&& IsColumnSelected( pCol->GetId() );
if ( bColAutoHighlight )
@@ -1023,7 +1023,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, BOOL
_rOut.DrawRect( aFieldRect );
}
- if (!m_bFocusOnlyCursor && (pCol->GetId() == GetCurColumnId()) && (nRow == (ULONG)GetCurRow()))
+ if (!m_bFocusOnlyCursor && (pCol->GetId() == GetCurColumnId()) && (nRow == (sal_uLong)GetCurRow()))
DrawCursor();
// draw a single field
@@ -1049,7 +1049,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, BOOL
Region aClipToField(Rectangle(aPos, aFieldSize));
_rOut.SetClipRegion(aClipToField);
}
- pCol->Draw( *this, _rOut, aPos, FALSE );
+ pCol->Draw( *this, _rOut, aPos, sal_False );
if (_bForeignDevice)
_rOut.SetClipRegion();
}
@@ -1067,7 +1067,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, BOOL
}
if ( nCol == pCols->Count() )
- bRetouching = TRUE;
+ bRetouching = sal_True;
// reset auto-highlight
if ( bRowSelected )
@@ -1129,7 +1129,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, BOOL
_rOut.SetLineColor( aDelimiterLineColor );
Point aVertPos( aOverallAreaPos.X() - 1, aOverallAreaPos.Y() );
long nDeltaY = aOverallAreaBRPos.Y();
- for ( USHORT nCol = 0; nCol < pCols->Count(); ++nCol )
+ for ( sal_uInt16 nCol = 0; nCol < pCols->Count(); ++nCol )
{
// get column
BrowserColumn *pCol = pCols->GetObject(nCol);
@@ -1177,7 +1177,7 @@ void BrowseBox::PaintData( Window& rWin, const Rectangle& rRect )
Resize();
// MI: wer war das denn? Window::Update();
- ImplPaintData(rWin, rRect, FALSE, TRUE);
+ ImplPaintData(rWin, rRect, sal_False, sal_True);
}
//-------------------------------------------------------------------
@@ -1193,19 +1193,19 @@ void BrowseBox::UpdateScrollbars()
BrowserDataWin *pBDW = (BrowserDataWin*) pDataWin;
if ( pBDW->bInUpdateScrollbars )
{
- pBDW->bHadRecursion = TRUE;
+ pBDW->bHadRecursion = sal_True;
return;
}
- pBDW->bInUpdateScrollbars = TRUE;
+ pBDW->bInUpdateScrollbars = sal_True;
// the size of the corner window (and the width of the VSB/height of the HSB)
- ULONG nCornerSize = GetSettings().GetStyleSettings().GetScrollBarSize();
+ sal_uLong nCornerSize = GetSettings().GetStyleSettings().GetScrollBarSize();
if (IsZoom())
- nCornerSize = (ULONG)(nCornerSize * (double)GetZoom());
+ nCornerSize = (sal_uLong)(nCornerSize * (double)GetZoom());
// needs VScroll?
long nMaxRows = (pDataWin->GetSizePixel().Height()) / GetDataRowHeight();
- BOOL bNeedsVScroll = getDataWindow()->bAutoVScroll
+ sal_Bool bNeedsVScroll = getDataWindow()->bAutoVScroll
? nTopRow || ( nRowCount > nMaxRows )
: !getDataWindow()->bNoVScroll;
Size aDataWinSize = pDataWin->GetSizePixel();
@@ -1227,10 +1227,10 @@ void BrowseBox::UpdateScrollbars()
}
// needs HScroll?
- ULONG nLastCol = GetColumnAtXPosPixel( aDataWinSize.Width() - 1 );
+ sal_uLong nLastCol = GetColumnAtXPosPixel( aDataWinSize.Width() - 1 );
- USHORT nFrozenCols = FrozenColCount();
- BOOL bNeedsHScroll = getDataWindow()->bAutoHScroll
+ sal_uInt16 nFrozenCols = FrozenColCount();
+ sal_Bool bNeedsHScroll = getDataWindow()->bAutoHScroll
? ( nFirstCol > nFrozenCols ) || ( nLastCol <= pCols->Count() )
: !getDataWindow()->bNoHScroll;
if ( !bNeedsHScroll )
@@ -1251,7 +1251,7 @@ void BrowseBox::UpdateScrollbars()
}
// adjust position and Width of horizontal scrollbar
- ULONG nHScrX = nControlAreaWidth == USHRT_MAX
+ sal_uLong nHScrX = nControlAreaWidth == USHRT_MAX
? 0
: nControlAreaWidth;
@@ -1310,7 +1310,7 @@ void BrowseBox::UpdateScrollbars()
// needs corner-window?
// (do that AFTER positioning BOTH scrollbars)
- ULONG nActualCorderWidth = 0;
+ sal_uLong nActualCorderWidth = 0;
if (aHScroll.IsVisible() && pVScroll && pVScroll->IsVisible() )
{
// if we have both scrollbars, the corner window fills the point of intersection of these two
@@ -1338,7 +1338,7 @@ void BrowseBox::UpdateScrollbars()
if ( getDataWindow()->pHeaderBar )
{
long nWidth = 0;
- for ( USHORT nCol = 0;
+ for ( sal_uInt16 nCol = 0;
nCol < pCols->Count() && nCol < nFirstCol;
++nCol )
{
@@ -1350,21 +1350,21 @@ void BrowseBox::UpdateScrollbars()
getDataWindow()->pHeaderBar->SetOffset( nWidth );
}
- pBDW->bInUpdateScrollbars = FALSE;
+ pBDW->bInUpdateScrollbars = sal_False;
if ( pBDW->bHadRecursion )
{
- pBDW->bHadRecursion = FALSE;
+ pBDW->bHadRecursion = sal_False;
UpdateScrollbars();
}
}
//-------------------------------------------------------------------
-void BrowseBox::SetUpdateMode( BOOL bUpdate )
+void BrowseBox::SetUpdateMode( sal_Bool bUpdate )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- BOOL bWasUpdate = IsUpdateMode();
+ sal_Bool bWasUpdate = IsUpdateMode();
if ( bWasUpdate == bUpdate )
return;
@@ -1392,7 +1392,7 @@ void BrowseBox::SetUpdateMode( BOOL bUpdate )
//-------------------------------------------------------------------
-BOOL BrowseBox::GetUpdateMode() const
+sal_Bool BrowseBox::GetUpdateMode() const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -1406,7 +1406,7 @@ long BrowseBox::GetFrozenWidth() const
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
long nWidth = 0;
- for ( USHORT nCol = 0;
+ for ( sal_uInt16 nCol = 0;
nCol < pCols->Count() && pCols->GetObject(nCol)->IsFrozen();
++nCol )
nWidth += pCols->GetObject(nCol)->Width();
@@ -1415,7 +1415,7 @@ long BrowseBox::GetFrozenWidth() const
//-------------------------------------------------------------------
-void BrowseBox::ColumnInserted( USHORT nPos )
+void BrowseBox::ColumnInserted( sal_uInt16 nPos )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
@@ -1426,10 +1426,10 @@ void BrowseBox::ColumnInserted( USHORT nPos )
//-------------------------------------------------------------------
-USHORT BrowseBox::FrozenColCount() const
+sal_uInt16 BrowseBox::FrozenColCount() const
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- USHORT nCol;
+ sal_uInt16 nCol;
for ( nCol = 0;
nCol < pCols->Count() && pCols->GetObject(nCol)->IsFrozen();
++nCol )
@@ -1506,7 +1506,7 @@ void BrowseBox::MouseButtonDown( const MouseEvent& rEvt )
long nX = 0;
long nWidth = GetOutputSizePixel().Width();
- for ( USHORT nCol = 0; nCol < pCols->Count() && nX < nWidth; ++nCol )
+ for ( sal_uInt16 nCol = 0; nCol < pCols->Count() && nX < nWidth; ++nCol )
{
// is this column visible?
BrowserColumn *pCol = pCols->GetObject(nCol);
@@ -1519,7 +1519,7 @@ void BrowseBox::MouseButtonDown( const MouseEvent& rEvt )
if ( pCol->GetId() && Abs( nR - rEvtPos.X() ) < 2 )
{
// start resizing the column
- bResizing = TRUE;
+ bResizing = sal_True;
nResizeCol = nCol;
nDragX = nResizeX = rEvtPos.X();
SetPointer( Pointer( POINTER_HSPLIT ) );
@@ -1542,7 +1542,7 @@ void BrowseBox::MouseButtonDown( const MouseEvent& rEvt )
// event occured out of data area
if ( rEvt.IsRight() )
pDataWin->Command(
- CommandEvent( Point( 1, LONG_MAX ), COMMAND_CONTEXTMENU, TRUE ) );
+ CommandEvent( Point( 1, LONG_MAX ), COMMAND_CONTEXTMENU, sal_True ) );
else
SetNoSelection();
}
@@ -1560,17 +1560,17 @@ void BrowseBox::MouseMove( const MouseEvent& rEvt )
Pointer aNewPointer;
- USHORT nX = 0;
- for ( USHORT nCol = 0;
- nCol < USHORT(pCols->Count()) &&
- ( nX + pCols->GetObject(nCol)->Width() ) < USHORT(GetOutputSizePixel().Width());
+ sal_uInt16 nX = 0;
+ for ( sal_uInt16 nCol = 0;
+ nCol < sal_uInt16(pCols->Count()) &&
+ ( nX + pCols->GetObject(nCol)->Width() ) < sal_uInt16(GetOutputSizePixel().Width());
++nCol )
// is this column visible?
if ( pCols->GetObject(nCol)->IsFrozen() || nCol >= nFirstCol )
{
// compute right end of column
BrowserColumn *pCol = pCols->GetObject(nCol);
- USHORT nR = (USHORT)(nX + pCol->Width() - 1);
+ sal_uInt16 nR = (sal_uInt16)(nX + pCol->Width() - 1);
// show resize-pointer?
if ( bResizing || ( pCol->GetId() &&
@@ -1585,8 +1585,8 @@ void BrowseBox::MouseMove( const MouseEvent& rEvt )
// erlaubte breite abholen und neues Delta
nDragX = Max( rEvt.GetPosPixel().X(), nMinResizeX );
long nDeltaX = nDragX - nResizeX;
- USHORT nId = GetColumnId(nResizeCol);
- ULONG nOldWidth = GetColumnWidth(nId);
+ sal_uInt16 nId = GetColumnId(nResizeCol);
+ sal_uLong nOldWidth = GetColumnWidth(nId);
nDragX = QueryColumnResize( GetColumnId(nResizeCol),
nOldWidth + nDeltaX )
+ nResizeX - nOldWidth;
@@ -1624,7 +1624,7 @@ void BrowseBox::MouseButtonUp( const MouseEvent & rEvt )
long nMaxX = pDataWin->GetSizePixel().Width();
nDragX = Min( nDragX, nMaxX );
long nDeltaX = nDragX - nResizeX;
- USHORT nId = GetColumnId(nResizeCol);
+ sal_uInt16 nId = GetColumnId(nResizeCol);
SetColumnWidth( GetColumnId(nResizeCol), GetColumnWidth(nId) + nDeltaX );
ColumnResized( nId );
}
@@ -1632,7 +1632,7 @@ void BrowseBox::MouseButtonUp( const MouseEvent & rEvt )
// end action
SetPointer( Pointer() );
ReleaseMouse();
- bResizing = FALSE;
+ bResizing = sal_False;
}
else
MouseButtonUp( BrowserMouseEvent( (BrowserDataWin*)pDataWin,
@@ -1644,8 +1644,8 @@ void BrowseBox::MouseButtonUp( const MouseEvent & rEvt )
//-------------------------------------------------------------------
-BOOL bExtendedMode = FALSE;
-BOOL bFieldMode = FALSE;
+sal_Bool bExtendedMode = sal_False;
+sal_Bool bFieldMode = sal_False;
void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
{
@@ -1660,14 +1660,14 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
if ( rEvt.GetRow() >= 0 )
{
GoToRow( rEvt.GetRow() );
- SelectRow( rEvt.GetRow(), TRUE, FALSE );
+ SelectRow( rEvt.GetRow(), sal_True, sal_False );
}
else
{
if ( bColumnCursor && rEvt.GetColumn() != 0 )
{
if ( rEvt.GetColumn() < pCols->Count() )
- SelectColumnPos( rEvt.GetColumn(), TRUE, FALSE);
+ SelectColumnPos( rEvt.GetColumn(), sal_True, sal_False);
}
}
DoubleClick( rEvt );
@@ -1679,7 +1679,7 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
if ( rEvt.GetClicks() == 1 )
{
// initialise flags
- bHit = FALSE;
+ bHit = sal_False;
a1stPoint =
a2ndPoint = PixelToLogic( rEvt.GetPosPixel() );
@@ -1692,7 +1692,7 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
}
// while selecting, no cursor
- bSelecting = TRUE;
+ bSelecting = sal_True;
DoHideCursor( "MouseButtonDown" );
// DataRow?
@@ -1708,19 +1708,19 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
{
ToggleSelection();
if ( bMultiSelection )
- uRow.pSel->SelectAll(FALSE);
+ uRow.pSel->SelectAll(sal_False);
else
uRow.nSel = BROWSER_ENDOFSELECTION;
if ( pColSel )
- pColSel->SelectAll(FALSE);
- bSelect = TRUE;
+ pColSel->SelectAll(sal_False);
+ bSelect = sal_True;
}
// expanding mode?
if ( rEvt.GetMode() & MOUSE_RANGESELECT )
{
// select the further touched rows too
- bSelect = TRUE;
+ bSelect = sal_True;
ExpandRowSelection( rEvt );
return;
}
@@ -1729,7 +1729,7 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
else if ( IsRowSelected( rEvt.GetRow() ) )
{
// auf Drag&Drop warten
- bHit = TRUE;
+ bHit = sal_True;
bExtendedMode = MOUSE_MULTISELECT ==
( rEvt.GetMode() & MOUSE_MULTISELECT );
return;
@@ -1743,7 +1743,7 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
aSelRange = Range( rEvt.GetRow(), rEvt.GetRow() );
SelectRow( rEvt.GetRow(),
!uRow.pSel->IsSelected( rEvt.GetRow() ) );
- bSelect = TRUE;
+ bSelect = sal_True;
return;
}
}
@@ -1751,9 +1751,9 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
// select directly
SetNoSelection();
GoToRow( rEvt.GetRow() );
- SelectRow( rEvt.GetRow(), TRUE );
+ SelectRow( rEvt.GetRow(), sal_True );
aSelRange = Range( rEvt.GetRow(), rEvt.GetRow() );
- bSelect = TRUE;
+ bSelect = sal_True;
}
else // Column/Field-Selection
{
@@ -1761,14 +1761,14 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
if ( IsColumnSelected( rEvt.GetColumn() ) ||
IsRowSelected( rEvt.GetRow() ) )
{
- bHit = TRUE;
- bFieldMode = TRUE;
+ bHit = sal_True;
+ bFieldMode = sal_True;
return;
}
SetNoSelection();
GoToRowColumnId( rEvt.GetRow(), rEvt.GetColumnId() );
- bSelect = TRUE;
+ bSelect = sal_True;
}
}
else
@@ -1782,11 +1782,11 @@ void BrowseBox::MouseButtonDown( const BrowserMouseEvent& rEvt )
SelectAll();
}
else
- SelectColumnId( rEvt.GetColumnId(), TRUE, FALSE );
+ SelectColumnId( rEvt.GetColumnId(), sal_True, sal_False );
}
// ggf. Cursor wieder an
- bSelecting = FALSE;
+ bSelecting = sal_False;
DoShowCursor( "MouseButtonDown" );
if ( bSelect )
Select();
@@ -1812,7 +1812,7 @@ void BrowseBox::MouseButtonUp( const BrowserMouseEvent &rEvt )
{
aSelRange = Range( rEvt.GetRow(), rEvt.GetRow() );
if ( bExtendedMode )
- SelectRow( rEvt.GetRow(), FALSE );
+ SelectRow( rEvt.GetRow(), sal_False );
else
{
SetNoSelection();
@@ -1821,19 +1821,19 @@ void BrowseBox::MouseButtonUp( const BrowserMouseEvent &rEvt )
else
{
GoToRow( rEvt.GetRow() );
- SelectRow( rEvt.GetRow(), TRUE );
+ SelectRow( rEvt.GetRow(), sal_True );
}
}
- bSelect = TRUE;
- bExtendedMode = FALSE;
- bFieldMode = FALSE;
- bHit = FALSE;
+ bSelect = sal_True;
+ bExtendedMode = sal_False;
+ bFieldMode = sal_False;
+ bHit = sal_False;
}
// activate cursor
if ( bSelecting )
{
- bSelecting = FALSE;
+ bSelecting = sal_False;
DoShowCursor( "MouseButtonUp" );
if ( bSelect )
Select();
@@ -1850,16 +1850,16 @@ void BrowseBox::KeyInput( const KeyEvent& rEvt )
//-------------------------------------------------------------------
-BOOL BrowseBox::ProcessKey( const KeyEvent& rEvt )
+sal_Bool BrowseBox::ProcessKey( const KeyEvent& rEvt )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
- USHORT nCode = rEvt.GetKeyCode().GetCode();
- BOOL bShift = rEvt.GetKeyCode().IsShift();
- BOOL bCtrl = rEvt.GetKeyCode().IsMod1();
- BOOL bAlt = rEvt.GetKeyCode().IsMod2();
+ sal_uInt16 nCode = rEvt.GetKeyCode().GetCode();
+ sal_Bool bShift = rEvt.GetKeyCode().IsShift();
+ sal_Bool bCtrl = rEvt.GetKeyCode().IsMod1();
+ sal_Bool bAlt = rEvt.GetKeyCode().IsMod2();
- USHORT nId = BROWSER_NONE;
+ sal_uInt16 nId = BROWSER_NONE;
if ( !bAlt && !bCtrl && !bShift )
{
@@ -1921,12 +1921,12 @@ BOOL BrowseBox::ProcessKey( const KeyEvent& rEvt )
//-------------------------------------------------------------------
-void BrowseBox::Dispatch( USHORT nId )
+void BrowseBox::Dispatch( sal_uInt16 nId )
{
DBG_CHKTHIS(BrowseBox,BrowseBoxCheckInvariants);
long nRowsOnPage = pDataWin->GetSizePixel().Height() / GetDataRowHeight();
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
switch ( nId )
{
@@ -1937,11 +1937,11 @@ void BrowseBox::Dispatch( USHORT nId )
case BROWSER_CURSORDOWN:
if ( ( GetCurRow() + 1 ) < nRowCount )
- bDone = GoToRow( GetCurRow() + 1, FALSE );
+ bDone = GoToRow( GetCurRow() + 1, sal_False );
break;
case BROWSER_CURSORUP:
if ( GetCurRow() > 0 )
- bDone = GoToRow( GetCurRow() - 1, FALSE );
+ bDone = GoToRow( GetCurRow() - 1, sal_False );
break;
case BROWSER_SELECTHOME:
if ( GetRowCount() )
@@ -1949,7 +1949,7 @@ void BrowseBox::Dispatch( USHORT nId )
DoHideCursor( "BROWSER_SELECTHOME" );
for ( long nRow = GetCurRow(); nRow >= 0; --nRow )
SelectRow( nRow );
- GoToRow( 0, TRUE );
+ GoToRow( 0, sal_True );
DoShowCursor( "BROWSER_SELECTHOME" );
}
break;
@@ -1960,7 +1960,7 @@ void BrowseBox::Dispatch( USHORT nId )
long nRows = GetRowCount();
for ( long nRow = GetCurRow(); nRow < nRows; ++nRow )
SelectRow( nRow );
- GoToRow( GetRowCount() - 1, TRUE );
+ GoToRow( GetRowCount() - 1, sal_True );
DoShowCursor( "BROWSER_SELECTEND" );
}
break;
@@ -1971,12 +1971,12 @@ void BrowseBox::Dispatch( USHORT nId )
// deselect the current row, if it isn't the first
// and there is no other selected row above
long nRow = GetCurRow();
- BOOL bLocalSelect = ( !IsRowSelected( nRow ) ||
+ sal_Bool bLocalSelect = ( !IsRowSelected( nRow ) ||
GetSelectRowCount() == 1 || IsRowSelected( nRow - 1 ) );
- SelectRow( nRow, bLocalSelect, TRUE );
- bDone = GoToRow( GetCurRow() + 1 , FALSE );
+ SelectRow( nRow, bLocalSelect, sal_True );
+ bDone = GoToRow( GetCurRow() + 1 , sal_False );
if ( bDone )
- SelectRow( GetCurRow(), TRUE, TRUE );
+ SelectRow( GetCurRow(), sal_True, sal_True );
}
else
bDone = ScrollRows( 1 ) != 0;
@@ -1988,40 +1988,40 @@ void BrowseBox::Dispatch( USHORT nId )
// deselect the current row, if it isn't the first
// and there is no other selected row under
long nRow = GetCurRow();
- BOOL bLocalSelect = ( !IsRowSelected( nRow ) ||
+ sal_Bool bLocalSelect = ( !IsRowSelected( nRow ) ||
GetSelectRowCount() == 1 || IsRowSelected( nRow + 1 ) );
- SelectRow( nCurRow, bLocalSelect, TRUE );
- bDone = GoToRow( nRow - 1 , FALSE );
+ SelectRow( nCurRow, bLocalSelect, sal_True );
+ bDone = GoToRow( nRow - 1 , sal_False );
if ( bDone )
- SelectRow( GetCurRow(), TRUE, TRUE );
+ SelectRow( GetCurRow(), sal_True, sal_True );
}
break;
case BROWSER_CURSORPAGEDOWN:
- bDone = (BOOL)ScrollRows( nRowsOnPage );
+ bDone = (sal_Bool)ScrollRows( nRowsOnPage );
break;
case BROWSER_CURSORPAGEUP:
- bDone = (BOOL)ScrollRows( -nRowsOnPage );
+ bDone = (sal_Bool)ScrollRows( -nRowsOnPage );
break;
case BROWSER_CURSOREND:
if ( bColumnCursor )
{
- USHORT nNewId = GetColumnId(ColCount() -1);
+ sal_uInt16 nNewId = GetColumnId(ColCount() -1);
bDone = (nNewId != 0) && GoToColumnId( nNewId );
break;
}
case BROWSER_CURSORENDOFFILE:
- bDone = GoToRow( nRowCount - 1, FALSE );
+ bDone = GoToRow( nRowCount - 1, sal_False );
break;
case BROWSER_CURSORRIGHT:
if ( bColumnCursor )
{
- USHORT nNewPos = GetColumnPos( GetCurColumnId() ) + 1;
- USHORT nNewId = GetColumnId( nNewPos );
+ sal_uInt16 nNewPos = GetColumnPos( GetCurColumnId() ) + 1;
+ sal_uInt16 nNewId = GetColumnId( nNewPos );
if (nNewId != 0) // Am Zeilenende ?
bDone = GoToColumnId( nNewId );
else
{
- USHORT nColId = ( GetColumnId(0) == 0 ) ? GetColumnId(1) : GetColumnId(0);
+ sal_uInt16 nColId = ( GetColumnId(0) == 0 ) ? GetColumnId(1) : GetColumnId(0);
if ( GetRowCount() )
bDone = ( nCurRow < GetRowCount() - 1 ) && GoToRowColumnId( nCurRow + 1, nColId );
else if ( ColCount() )
@@ -2034,18 +2034,18 @@ void BrowseBox::Dispatch( USHORT nId )
case BROWSER_CURSORHOME:
if ( bColumnCursor )
{
- USHORT nNewId = GetColumnId(1);
+ sal_uInt16 nNewId = GetColumnId(1);
bDone = (nNewId != 0) && GoToColumnId( nNewId );
break;
}
case BROWSER_CURSORTOPOFFILE:
- bDone = GoToRow( 0, FALSE );
+ bDone = GoToRow( 0, sal_False );
break;
case BROWSER_CURSORLEFT:
if ( bColumnCursor )
{
- USHORT nNewPos = GetColumnPos( GetCurColumnId() ) - 1;
- USHORT nNewId = GetColumnId( nNewPos );
+ sal_uInt16 nNewPos = GetColumnPos( GetCurColumnId() ) - 1;
+ sal_uInt16 nNewId = GetColumnId( nNewPos );
if (nNewId != 0)
bDone = GoToColumnId( nNewId );
else
@@ -2061,13 +2061,13 @@ void BrowseBox::Dispatch( USHORT nId )
break;
case BROWSER_ENHANCESELECTION:
if ( GetRowCount() )
- SelectRow( GetCurRow(), !IsRowSelected( GetCurRow() ), TRUE );
- bDone = TRUE;
+ SelectRow( GetCurRow(), !IsRowSelected( GetCurRow() ), sal_True );
+ bDone = sal_True;
break;
case BROWSER_SELECT:
if ( GetRowCount() )
- SelectRow( GetCurRow(), !IsRowSelected( GetCurRow() ), FALSE );
- bDone = TRUE;
+ SelectRow( GetCurRow(), !IsRowSelected( GetCurRow() ), sal_False );
+ bDone = sal_True;
break;
case BROWSER_MOVECOLUMNLEFT:
case BROWSER_MOVECOLUMNRIGHT:
@@ -2075,20 +2075,20 @@ void BrowseBox::Dispatch( USHORT nId )
BrowserHeader* pHeaderBar = getDataWindow()->pHeaderBar;
if ( pHeaderBar && pHeaderBar->IsDragable() )
{
- USHORT nColId = GetCurColumnId();
- BOOL bColumnSelected = IsColumnSelected(nColId);
- USHORT nNewPos = GetColumnPos(nColId);
- BOOL bMoveAllowed = FALSE;
+ sal_uInt16 nColId = GetCurColumnId();
+ sal_Bool bColumnSelected = IsColumnSelected(nColId);
+ sal_uInt16 nNewPos = GetColumnPos(nColId);
+ sal_Bool bMoveAllowed = sal_False;
if ( BROWSER_MOVECOLUMNLEFT == nId && nNewPos > 1 )
- --nNewPos,bMoveAllowed = TRUE;
+ --nNewPos,bMoveAllowed = sal_True;
else if ( BROWSER_MOVECOLUMNRIGHT == nId && nNewPos < (ColCount()-1) )
- ++nNewPos,bMoveAllowed = TRUE;
+ ++nNewPos,bMoveAllowed = sal_True;
if ( bMoveAllowed )
{
SetColumnPos( nColId, nNewPos );
ColumnMoved( nColId );
- MakeFieldVisible(GetCurRow(),nColId,TRUE);
+ MakeFieldVisible(GetCurRow(),nColId,sal_True);
if ( bColumnSelected )
SelectColumnId(nColId);
}
@@ -2119,7 +2119,7 @@ void BrowseBox::SetCursorColor(const Color& _rCol)
DoShowCursor("SetCursorColor");
}
// -----------------------------------------------------------------------------
-Rectangle BrowseBox::calcHeaderRect(sal_Bool _bIsColumnBar,BOOL _bOnScreen)
+Rectangle BrowseBox::calcHeaderRect(sal_Bool _bIsColumnBar,sal_Bool _bOnScreen)
{
Window* pParent = NULL;
if ( !_bOnScreen )
@@ -2143,14 +2143,14 @@ Rectangle BrowseBox::calcHeaderRect(sal_Bool _bIsColumnBar,BOOL _bOnScreen)
return Rectangle(aTopLeft,Size(nWidth,nHeight));
}
// -----------------------------------------------------------------------------
-Rectangle BrowseBox::calcTableRect(BOOL _bOnScreen)
+Rectangle BrowseBox::calcTableRect(sal_Bool _bOnScreen)
{
Window* pParent = NULL;
if ( !_bOnScreen )
pParent = GetAccessibleParentWindow();
Rectangle aRect( GetWindowExtentsRelative( pParent ) );
- Rectangle aRowBar = calcHeaderRect(FALSE,pParent == NULL);
+ Rectangle aRowBar = calcHeaderRect(sal_False,pParent == NULL);
long nX = aRowBar.Right() - aRect.Left();
long nY = aRowBar.Top() - aRect.Top();
@@ -2159,7 +2159,7 @@ Rectangle BrowseBox::calcTableRect(BOOL _bOnScreen)
return Rectangle(aRowBar.TopRight(), Size(aSize.A() - nX, aSize.B() - nY - aHScroll.GetSizePixel().Height()) );
}
// -----------------------------------------------------------------------------
-Rectangle BrowseBox::GetFieldRectPixelAbs( sal_Int32 _nRowId,sal_uInt16 _nColId, BOOL /*_bIsHeader*/, BOOL _bOnScreen )
+Rectangle BrowseBox::GetFieldRectPixelAbs( sal_Int32 _nRowId,sal_uInt16 _nColId, sal_Bool /*_bIsHeader*/, sal_Bool _bOnScreen )
{
Window* pParent = NULL;
if ( !_bOnScreen )
diff --git a/svtools/source/brwbox/brwbox3.cxx b/svtools/source/brwbox/brwbox3.cxx
index 102af1b6e1a1..966f8e8596fc 100644
--- a/svtools/source/brwbox/brwbox3.cxx
+++ b/svtools/source/brwbox/brwbox3.cxx
@@ -172,7 +172,7 @@ sal_Int32 BrowseBox::GetAccessibleControlCount() const
Reference< XAccessible > BrowseBox::CreateAccessibleControl( sal_Int32 )
{
- DBG_ASSERT( FALSE, "BrowseBox::CreateAccessibleControl: to be overwritten!" );
+ DBG_ASSERT( sal_False, "BrowseBox::CreateAccessibleControl: to be overwritten!" );
return NULL;
}
// -----------------------------------------------------------------------------
@@ -192,7 +192,7 @@ sal_Bool BrowseBox::ConvertPointToCellAddress(
sal_Bool BrowseBox::ConvertPointToRowHeader( sal_Int32& rnRow, const Point& rPoint )
{
rnRow = GetRowAtYPosPixel(rPoint.Y());
- // USHORT nColumnId = GetColumnAtXPosPixel(rPoint.X());
+ // sal_uInt16 nColumnId = GetColumnAtXPosPixel(rPoint.X());
return rnRow != BROWSER_INVALIDID;// && nColumnId == 0;
}
// -----------------------------------------------------------------------------
@@ -397,7 +397,7 @@ void BrowseBox::GrabTableFocus()
GrabFocus();
}
// -----------------------------------------------------------------------------
-String BrowseBox::GetCellText(long, USHORT ) const
+String BrowseBox::GetCellText(long, sal_uInt16 ) const
{
DBG_ASSERT(0,"This method has to be implemented by the derived classes! BUG!!");
return String();
@@ -531,13 +531,13 @@ sal_Bool BrowseBox::IsCellVisible( sal_Int32 _nRow, sal_uInt16 _nColumnPos ) con
return IsFieldVisible( _nRow, GetColumnId( _nColumnPos ) );
}
// -----------------------------------------------------------------------------
-String BrowseBox::GetAccessibleCellText(long _nRow, USHORT _nColPos) const
+String BrowseBox::GetAccessibleCellText(long _nRow, sal_uInt16 _nColPos) const
{
return GetCellText( _nRow, GetColumnId( _nColPos ) );
}
// -----------------------------------------------------------------------------
-BOOL BrowseBox::GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector )
+sal_Bool BrowseBox::GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector )
{
return Control::GetGlyphBoundRects( rOrigin, rStr, nIndex, nLen, nBase, rVector );
}
@@ -552,7 +552,7 @@ void BrowseBox::GrabFocus()
Control::GrabFocus();
}
// -----------------------------------------------------------------------------
-Reference< XAccessible > BrowseBox::GetAccessible( BOOL bCreate )
+Reference< XAccessible > BrowseBox::GetAccessible( sal_Bool bCreate )
{
return Control::GetAccessible( bCreate );
}
diff --git a/svtools/source/brwbox/brwhead.cxx b/svtools/source/brwbox/brwhead.cxx
index 39845b84f7e0..b517f6d931e5 100644
--- a/svtools/source/brwbox/brwhead.cxx
+++ b/svtools/source/brwbox/brwhead.cxx
@@ -79,7 +79,7 @@ void BrowserHeader::EndDrag()
Update();
// not aborted?
- USHORT nId = GetCurItemId();
+ sal_uInt16 nId = GetCurItemId();
if ( nId )
{
// Handle-Column?
@@ -98,7 +98,7 @@ void BrowserHeader::EndDrag()
// column drag
// Hat sich die Position eigentlich veraendert
// Handlecolumn beruecksichtigen
- USHORT nOldPos = _pBrowseBox->GetColumnPos(nId),
+ sal_uInt16 nOldPos = _pBrowseBox->GetColumnPos(nId),
nNewPos = GetItemPos( nId );
if (!_pBrowseBox->GetColumnId(0)) // Handle
diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx
index cb43e4989355..c13eabd2314e 100644
--- a/svtools/source/brwbox/datwin.cxx
+++ b/svtools/source/brwbox/datwin.cxx
@@ -67,7 +67,7 @@ void ButtonFrame::Draw( OutputDevice& rDev )
{
Window *pWin = (Window*) &rDev;
if( bPressed )
- pWin->DrawSelectionBackground( aRect, 0, TRUE, FALSE, FALSE );
+ pWin->DrawSelectionBackground( aRect, 0, sal_True, sal_False, sal_False );
}
else
{
@@ -84,10 +84,10 @@ void ButtonFrame::Draw( OutputDevice& rDev )
String aVal = rDev.GetEllipsisString(aText,aInnerRect.GetWidth() - 2*MIN_COLUMNWIDTH);
Font aFont( rDev.GetFont() );
- BOOL bOldTransp = aFont.IsTransparent();
+ sal_Bool bOldTransp = aFont.IsTransparent();
if ( !bOldTransp )
{
- aFont.SetTransparent( TRUE );
+ aFont.SetTransparent( sal_True );
rDev.SetFont( aFont );
}
@@ -102,7 +102,7 @@ void ButtonFrame::Draw( OutputDevice& rDev )
// restore settings
if ( !bOldTransp )
{
- aFont.SetTransparent(FALSE);
+ aFont.SetTransparent(sal_False);
rDev.SetFont( aFont );
}
if (m_bDrawDisabled)
@@ -123,14 +123,14 @@ void ButtonFrame::Draw( OutputDevice& rDev )
//-------------------------------------------------------------------
-BrowserColumn::BrowserColumn( USHORT nItemId, const class Image &rImage,
- const String& rTitle, ULONG nWidthPixel, const Fraction& rCurrentZoom,
+BrowserColumn::BrowserColumn( sal_uInt16 nItemId, const class Image &rImage,
+ const String& rTitle, sal_uLong nWidthPixel, const Fraction& rCurrentZoom,
HeaderBarItemBits nFlags )
: _nId( nItemId ),
_nWidth( nWidthPixel ),
_aImage( rImage ),
_aTitle( rTitle ),
- _bFrozen( FALSE ),
+ _bFrozen( sal_False ),
_nFlags( nFlags )
{
double n = (double)_nWidth;
@@ -145,7 +145,7 @@ BrowserColumn::~BrowserColumn()
//-------------------------------------------------------------------
-void BrowserColumn::SetWidth(ULONG nNewWidthPixel, const Fraction& rCurrentZoom)
+void BrowserColumn::SetWidth(sal_uLong nNewWidthPixel, const Fraction& rCurrentZoom)
{
_nWidth = nNewWidthPixel;
double n = (double)_nWidth;
@@ -156,13 +156,13 @@ void BrowserColumn::SetWidth(ULONG nNewWidthPixel, const Fraction& rCurrentZoom)
//-------------------------------------------------------------------
-void BrowserColumn::Draw( BrowseBox& rBox, OutputDevice& rDev, const Point& rPos, BOOL bCurs )
+void BrowserColumn::Draw( BrowseBox& rBox, OutputDevice& rDev, const Point& rPos, sal_Bool bCurs )
{
if ( _nId == 0 )
{
// paint handle column
ButtonFrame( rPos, Size( Width()-1, rBox.GetDataRowHeight()-1 ),
- String(), FALSE, bCurs,
+ String(), sal_False, bCurs,
0 != (BROWSER_COLUMN_TITLEABBREVATION&_nFlags) ).Draw( rDev );
Color aOldLineColor = rDev.GetLineColor();
rDev.SetLineColor( Color( COL_BLACK ) );
@@ -216,18 +216,18 @@ BrowserDataWin::BrowserDataWin( BrowseBox* pParent )
,pEventWin( pParent )
,pCornerWin( 0 )
,pDtorNotify( 0 )
- ,bInPaint( FALSE )
- ,bInCommand( FALSE )
- ,bNoScrollBack( FALSE )
- ,bNoHScroll( FALSE )
- ,bNoVScroll( FALSE )
- ,bUpdateMode( TRUE )
- ,bResizeOnPaint( FALSE )
- ,bUpdateOnUnlock( FALSE )
- ,bInUpdateScrollbars( FALSE )
- ,bHadRecursion( FALSE )
- ,bOwnDataChangedHdl( FALSE )
- ,bCallingDropCallback( FALSE )
+ ,bInPaint( sal_False )
+ ,bInCommand( sal_False )
+ ,bNoScrollBack( sal_False )
+ ,bNoHScroll( sal_False )
+ ,bNoVScroll( sal_False )
+ ,bUpdateMode( sal_True )
+ ,bResizeOnPaint( sal_False )
+ ,bUpdateOnUnlock( sal_False )
+ ,bInUpdateScrollbars( sal_False )
+ ,bHadRecursion( sal_False )
+ ,bOwnDataChangedHdl( sal_False )
+ ,bCallingDropCallback( sal_False )
,nUpdateLock( 0 )
,nCursorHidden( 0 )
,m_nDragRowDividerLimit( 0 )
@@ -241,7 +241,7 @@ BrowserDataWin::BrowserDataWin( BrowseBox* pParent )
BrowserDataWin::~BrowserDataWin()
{
if( pDtorNotify )
- *pDtorNotify = TRUE;
+ *pDtorNotify = sal_True;
}
//-------------------------------------------------------------------
@@ -253,14 +253,14 @@ void BrowserDataWin::LeaveUpdateLock()
if (bUpdateOnUnlock )
{
Control::Update();
- bUpdateOnUnlock = FALSE;
+ bUpdateOnUnlock = sal_False;
}
}
}
//-------------------------------------------------------------------
void InitSettings_Impl( Window *pWin,
- BOOL bFont, BOOL bForeground, BOOL bBackground )
+ sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground )
{
const StyleSettings& rStyleSettings =
pWin->GetSettings().GetStyleSettings();
@@ -296,7 +296,7 @@ void BrowserDataWin::Update()
if ( !nUpdateLock )
Control::Update();
else
- bUpdateOnUnlock = TRUE;
+ bUpdateOnUnlock = sal_True;
}
//-------------------------------------------------------------------
@@ -307,9 +307,9 @@ void BrowserDataWin::DataChanged( const DataChangedEvent& rDCEvt )
{
if( !bOwnDataChangedHdl )
{
- InitSettings_Impl( this, TRUE, TRUE, TRUE );
+ InitSettings_Impl( this, sal_True, sal_True, sal_True );
Invalidate();
- InitSettings_Impl( GetParent(), TRUE, TRUE, TRUE );
+ InitSettings_Impl( GetParent(), sal_True, sal_True, sal_True );
GetParent()->Invalidate();
GetParent()->Resize();
}
@@ -328,9 +328,9 @@ void BrowserDataWin::Paint( const Rectangle& rRect )
aInvalidRegion.Insert( new Rectangle( rRect ) );
return;
}
- bInPaint = TRUE;
+ bInPaint = sal_True;
( (BrowseBox*) GetParent() )->PaintData( *this, rRect );
- bInPaint = FALSE;
+ bInPaint = sal_False;
DoOutstandingInvalidations();
}
else
@@ -352,7 +352,7 @@ BrowseEvent BrowserDataWin::CreateBrowseEvent( const Point& rPosPixel )
// find column under mouse
long nMouseX = rPosPixel.X();
long nColX = 0;
- USHORT nCol;
+ sal_uInt16 nCol;
for ( nCol = 0;
nCol < pBox->pCols->Count() && nColX < GetSizePixel().Width();
++nCol )
@@ -362,7 +362,7 @@ BrowseEvent BrowserDataWin::CreateBrowseEvent( const Point& rPosPixel )
if ( nMouseX < nColX )
break;
}
- USHORT nColId = BROWSER_INVALIDID;
+ sal_uInt16 nColId = BROWSER_INVALIDID;
if ( nCol < pBox->pCols->Count() )
nColId = pBox->pCols->GetObject(nCol)->GetId();
@@ -424,14 +424,14 @@ void BrowserDataWin::Command( const CommandEvent& rEvt )
return;
Point aEventPos( rEvt.GetMousePosPixel() );
- long nRow = pBox->GetRowAtYPosPixel( aEventPos.Y(), FALSE);
+ long nRow = pBox->GetRowAtYPosPixel( aEventPos.Y(), sal_False);
MouseEvent aMouseEvt( aEventPos, 1, MOUSE_SELECT, MOUSE_LEFT );
if ( COMMAND_CONTEXTMENU == rEvt.GetCommand() && rEvt.IsMouseEvent() &&
nRow < pBox->GetRowCount() && !pBox->IsRowSelected(nRow) )
{
- BOOL bDeleted = FALSE;
+ sal_Bool bDeleted = sal_False;
pDtorNotify = &bDeleted;
- bInCommand = TRUE;
+ bInCommand = sal_True;
MouseButtonDown( aMouseEvt );
if( bDeleted )
return;
@@ -439,20 +439,20 @@ void BrowserDataWin::Command( const CommandEvent& rEvt )
if( bDeleted )
return;
pDtorNotify = 0;
- bInCommand = FALSE;
+ bInCommand = sal_False;
}
aEventPos.Y() += GetParent()->GetTitleHeight();
CommandEvent aEvt( aEventPos, rEvt.GetCommand(),
rEvt.IsMouseEvent(), rEvt.GetData() );
- bInCommand = TRUE;
- BOOL bDeleted = FALSE;
+ bInCommand = sal_True;
+ sal_Bool bDeleted = sal_False;
pDtorNotify = &bDeleted;
GetParent()->Command( aEvt );
if( bDeleted )
return;
pDtorNotify = 0;
- bInCommand = FALSE;
+ bInCommand = sal_False;
if ( COMMAND_STARTDRAG == rEvt.GetCommand() )
MouseButtonUp( aMouseEvt );
@@ -462,7 +462,7 @@ void BrowserDataWin::Command( const CommandEvent& rEvt )
//-------------------------------------------------------------------
-BOOL BrowserDataWin::ImplRowDividerHitTest( const BrowserMouseEvent& _rEvent )
+sal_Bool BrowserDataWin::ImplRowDividerHitTest( const BrowserMouseEvent& _rEvent )
{
if ( ! ( GetParent()->IsInteractiveRowHeightEnabled()
&& ( _rEvent.GetRow() >= 0 )
@@ -470,7 +470,7 @@ BOOL BrowserDataWin::ImplRowDividerHitTest( const BrowserMouseEvent& _rEvent )
&& ( _rEvent.GetColumnId() == 0 )
)
)
- return FALSE;
+ return sal_False;
long nDividerDistance = GetParent()->GetDataRowHeight() - ( _rEvent.GetPosPixel().Y() % GetParent()->GetDataRowHeight() );
return ( nDividerDistance <= 4 );
@@ -570,7 +570,7 @@ void BrowserDataWin::StartRowDividerDrag( const Point& _rStartPos )
m_nDragRowDividerLimit = nDragRowDividerCurrentPos - nDataRowHeight;
- GetParent()->bRowDividerDrag = TRUE;
+ GetParent()->bRowDividerDrag = sal_True;
GetParent()->ImplStartTracking();
Rectangle aDragSplitRect( 0, m_nDragRowDividerLimit, GetOutputSizePixel().Width(), nDragRowDividerCurrentPos );
@@ -594,7 +594,7 @@ void BrowserDataWin::Tracking( const TrackingEvent& rTEvt )
if ( rTEvt.IsTrackingEnded() )
{
HideTracking();
- GetParent()->bRowDividerDrag = FALSE;
+ GetParent()->bRowDividerDrag = sal_False;
GetParent()->ImplEndTracking();
if ( !rTEvt.IsTrackingCanceled() )
@@ -645,7 +645,7 @@ void BrowserDataWin::RequestHelp( const HelpEvent& rHEvt )
//===================================================================
BrowseEvent::BrowseEvent( Window* pWindow,
- long nAbsRow, USHORT nColumn, USHORT nColumnId,
+ long nAbsRow, sal_uInt16 nColumn, sal_uInt16 nColumnId,
const Rectangle& rRect ):
pWin(pWindow),
nRow(nAbsRow),
@@ -666,7 +666,7 @@ BrowserMouseEvent::BrowserMouseEvent( BrowserDataWin *pWindow,
//-------------------------------------------------------------------
BrowserMouseEvent::BrowserMouseEvent( Window *pWindow, const MouseEvent& rEvt,
- long nAbsRow, USHORT nColumn, USHORT nColumnId,
+ long nAbsRow, sal_uInt16 nColumn, sal_uInt16 nColumnId,
const Rectangle& rRect ):
MouseEvent(rEvt),
BrowseEvent( pWindow, nAbsRow, nColumn, nColumnId, rRect )
@@ -693,7 +693,7 @@ BrowserExecuteDropEvent::BrowserExecuteDropEvent( BrowserDataWin *pWindow, const
//-------------------------------------------------------------------
-void BrowserDataWin::SetUpdateMode( BOOL bMode )
+void BrowserDataWin::SetUpdateMode( sal_Bool bMode )
{
DBG_ASSERT( !bUpdateMode || aInvalidRegion.Count() == 0,
"invalid region not empty" );
@@ -720,7 +720,7 @@ void BrowserDataWin::DoOutstandingInvalidations()
//-------------------------------------------------------------------
-void BrowserDataWin::Invalidate( USHORT nFlags )
+void BrowserDataWin::Invalidate( sal_uInt16 nFlags )
{
if ( !GetUpdateMode() )
{
@@ -737,7 +737,7 @@ void BrowserDataWin::Invalidate( USHORT nFlags )
//-------------------------------------------------------------------
-void BrowserDataWin::Invalidate( const Rectangle& rRect, USHORT nFlags )
+void BrowserDataWin::Invalidate( const Rectangle& rRect, sal_uInt16 nFlags )
{
if ( !GetUpdateMode() )
aInvalidRegion.Insert( new Rectangle( rRect ) );
@@ -749,7 +749,7 @@ void BrowserDataWin::Invalidate( const Rectangle& rRect, USHORT nFlags )
void BrowserScrollBar::Tracking( const TrackingEvent& rTEvt )
{
- ULONG nPos = GetThumbPos();
+ sal_uLong nPos = GetThumbPos();
if ( nPos != _nLastPos )
{
if ( _nTip )
diff --git a/svtools/source/brwbox/datwin.hxx b/svtools/source/brwbox/datwin.hxx
index 1deb8aeb5b56..91b22d764bb0 100644
--- a/svtools/source/brwbox/datwin.hxx
+++ b/svtools/source/brwbox/datwin.hxx
@@ -53,18 +53,18 @@ class ButtonFrame
Rectangle aRect;
Rectangle aInnerRect;
String aText;
- BOOL bPressed;
- BOOL bCurs;
- BOOL bAbbr;
- BOOL m_bDrawDisabled;
+ sal_Bool bPressed;
+ sal_Bool bCurs;
+ sal_Bool bAbbr;
+ sal_Bool m_bDrawDisabled;
public:
ButtonFrame( const Point& rPt, const Size& rSz,
const String &rText,
- BOOL bPress = FALSE,
- BOOL bCursor = FALSE,
- BOOL bAbbreviate = TRUE,
- BOOL _bDrawDisabled = FALSE)
+ sal_Bool bPress = sal_False,
+ sal_Bool bCursor = sal_False,
+ sal_Bool bAbbreviate = sal_True,
+ sal_Bool _bDrawDisabled = sal_False)
:aRect( rPt, rSz )
,aInnerRect( Point( aRect.Left()+1, aRect.Top()+1 ),
Size( aRect.GetWidth()-2, aRect.GetHeight()-2 ) )
@@ -83,34 +83,34 @@ public:
class BrowserColumn
{
- USHORT _nId;
- ULONG _nOriginalWidth;
- ULONG _nWidth;
+ sal_uInt16 _nId;
+ sal_uLong _nOriginalWidth;
+ sal_uLong _nWidth;
Image _aImage;
String _aTitle;
- BOOL _bFrozen;
+ sal_Bool _bFrozen;
HeaderBarItemBits _nFlags;
public:
- BrowserColumn( USHORT nItemId, const Image &rImage,
- const String& rTitle, ULONG nWidthPixel, const Fraction& rCurrentZoom,
+ BrowserColumn( sal_uInt16 nItemId, const Image &rImage,
+ const String& rTitle, sal_uLong nWidthPixel, const Fraction& rCurrentZoom,
HeaderBarItemBits nFlags );
virtual ~BrowserColumn();
- USHORT GetId() const { return _nId; }
+ sal_uInt16 GetId() const { return _nId; }
- ULONG Width() { return _nWidth; }
+ sal_uLong Width() { return _nWidth; }
Image& GetImage() { return _aImage; }
String& Title() { return _aTitle; }
HeaderBarItemBits& Flags() { return _nFlags; }
- BOOL IsFrozen() const { return _bFrozen; }
- void Freeze( BOOL bFreeze = TRUE ) { _bFrozen = bFreeze; }
+ sal_Bool IsFrozen() const { return _bFrozen; }
+ void Freeze( sal_Bool bFreeze = sal_True ) { _bFrozen = bFreeze; }
virtual void Draw( BrowseBox& rBox, OutputDevice& rDev,
- const Point& rPos, BOOL bCurs );
+ const Point& rPos, sal_Bool bCurs );
- void SetWidth(ULONG nNewWidthPixel, const Fraction& rCurrentZoom);
+ void SetWidth(sal_uLong nNewWidthPixel, const Fraction& rCurrentZoom);
void ZoomChanged(const Fraction& rNewZoom);
};
@@ -125,7 +125,7 @@ public:
BrowserHeader* pHeaderBar; // only for BROWSER_HEADERBAR_NEW
Window* pEventWin; // Window of forwarded events
ScrollBarBox* pCornerWin; // Window in the corner btw the ScrollBars
- BOOL* pDtorNotify;
+ sal_Bool* pDtorNotify;
AutoTimer aMouseTimer; // recalls MouseMove on dragging out
MouseEvent aRepeatEvt; // a MouseEvent to repeat
Point aLastMousePos; // verhindert pseudo-MouseMoves
@@ -133,8 +133,8 @@ public:
String aRealRowCount; // zur Anzeige im VScrollBar
RectangleList aInvalidRegion; // invalidated Rectangles during !UpdateMode
- FASTBOOL bInPaint; // TRUE while in Paint
- FASTBOOL bInCommand; // TRUE while in Command
+ FASTBOOL bInPaint; // sal_True while in Paint
+ FASTBOOL bInCommand; // sal_True while in Command
FASTBOOL bNoScrollBack; // nur vorwaerts scrollen
FASTBOOL bNoHScroll; // kein horizontaler Scrollbar
FASTBOOL bNoVScroll; // no vertical scrollbar
@@ -148,7 +148,7 @@ public:
FASTBOOL bHadRecursion; // Rekursion war aufgetreten
FASTBOOL bOwnDataChangedHdl; // dont change colors in DataChanged
FASTBOOL bCallingDropCallback; // we're in a callback to AcceptDrop or ExecuteDrop curently
- USHORT nUpdateLock; // lock count, dont call Control::Update()!
+ sal_uInt16 nUpdateLock; // lock count, dont call Control::Update()!
short nCursorHidden; // new conuter for DoHide/ShowCursor
long m_nDragRowDividerLimit;
@@ -184,20 +184,20 @@ public:
{ return (BrowseBox*) Window::GetParent(); }
const String& GetRealRowCount() const { return aRealRowCount; }
- void SetUpdateMode( BOOL bMode );
+ void SetUpdateMode( sal_Bool bMode );
FASTBOOL GetUpdateMode() const { return bUpdateMode; }
void EnterUpdateLock() { ++nUpdateLock; }
void LeaveUpdateLock();
void Update();
void DoOutstandingInvalidations();
- void Invalidate( USHORT nFlags = 0 );
- void Invalidate( const Rectangle& rRect, USHORT nFlags = 0 );
- void Invalidate( const Region& rRegion, USHORT nFlags = 0 )
+ void Invalidate( sal_uInt16 nFlags = 0 );
+ void Invalidate( const Rectangle& rRect, sal_uInt16 nFlags = 0 );
+ void Invalidate( const Region& rRegion, sal_uInt16 nFlags = 0 )
{ Control::Invalidate( rRegion, nFlags ); }
protected:
void StartRowDividerDrag( const Point& _rStartPos );
- BOOL ImplRowDividerHitTest( const BrowserMouseEvent& _rEvent );
+ sal_Bool ImplRowDividerHitTest( const BrowserMouseEvent& _rEvent );
};
//-------------------------------------------------------------------
@@ -213,8 +213,8 @@ inline void BrowserDataWin::Repaint()
class BrowserScrollBar: public ScrollBar
{
- ULONG _nTip;
- ULONG _nLastPos;
+ sal_uLong _nTip;
+ sal_uLong _nLastPos;
BrowserDataWin* _pDataWin;
public:
@@ -234,7 +234,7 @@ public:
//===================================================================
void InitSettings_Impl( Window *pWin,
- BOOL bFont = TRUE, BOOL bForeground = TRUE, BOOL bBackground = TRUE );
+ sal_Bool bFont = sal_True, sal_Bool bForeground = sal_True, sal_Bool bBackground = sal_True );
//===================================================================
diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx
index edf56f0b9b34..9f870a9f0681 100644
--- a/svtools/source/brwbox/ebbcontrols.cxx
+++ b/svtools/source/brwbox/ebbcontrols.cxx
@@ -80,7 +80,7 @@ namespace svt
nPos = 0;
if (nPos >= GetEntryCount())
nPos = GetEntryCount() - 1;
- SetText(GetEntry(sal::static_int_cast< USHORT >(nPos)));
+ SetText(GetEntry(sal::static_int_cast< sal_uInt16 >(nPos)));
return 1;
}
}
@@ -187,7 +187,7 @@ namespace svt
nPos = 0;
if (nPos >= GetEntryCount())
nPos = GetEntryCount() - 1;
- SelectEntryPos(sal::static_int_cast< USHORT >(nPos));
+ SelectEntryPos(sal::static_int_cast< sal_uInt16 >(nPos));
Select(); // for calling Modify
return 1;
}
@@ -311,7 +311,7 @@ namespace svt
}
//------------------------------------------------------------------
- void CheckBoxControl::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags )
+ void CheckBoxControl::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags )
{
pBox->Draw(pDev,rPos,rSize,nFlags);
}
@@ -399,7 +399,7 @@ namespace svt
EditCellController::EditCellController( Edit* _pEdit )
:CellController( _pEdit )
,m_pEditImplementation( new EditImplementation( *_pEdit ) )
- ,m_bOwnImplementation( TRUE )
+ ,m_bOwnImplementation( sal_True )
{
}
@@ -407,7 +407,7 @@ namespace svt
EditCellController::EditCellController( MultiLineTextCell* _pEdit )
:CellController( _pEdit )
,m_pEditImplementation( new MultiLineEditImplementation( *_pEdit ) )
- ,m_bOwnImplementation( TRUE )
+ ,m_bOwnImplementation( sal_True )
{
}
@@ -415,7 +415,7 @@ namespace svt
EditCellController::EditCellController( IEditImplementation* _pImplementation )
:CellController( &_pImplementation->GetControl() )
,m_pEditImplementation( _pImplementation )
- ,m_bOwnImplementation( FALSE )
+ ,m_bOwnImplementation( sal_False )
{
}
@@ -552,21 +552,21 @@ namespace svt
//------------------------------------------------------------------
void MultiLineTextCell::Modify()
{
- GetTextEngine()->SetModified( TRUE );
+ GetTextEngine()->SetModified( sal_True );
MultiLineEdit::Modify();
}
//------------------------------------------------------------------
- BOOL MultiLineTextCell::dispatchKeyEvent( const KeyEvent& _rEvent )
+ sal_Bool MultiLineTextCell::dispatchKeyEvent( const KeyEvent& _rEvent )
{
Selection aOldSelection( GetSelection() );
- BOOL bWasModified = IsModified();
+ sal_Bool bWasModified = IsModified();
ClearModifyFlag( );
- BOOL bHandled = GetTextView()->KeyInput( _rEvent );
+ sal_Bool bHandled = GetTextView()->KeyInput( _rEvent );
- BOOL bIsModified = IsModified();
+ sal_Bool bIsModified = IsModified();
if ( bWasModified && !bIsModified )
// not sure whether this can really happen
SetModifyFlag();
@@ -579,9 +579,9 @@ namespace svt
if ( aNewSelection != aOldSelection // selection changed
|| bIsModified // or some other modification
)
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//------------------------------------------------------------------
@@ -599,7 +599,7 @@ namespace svt
const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent();
const KeyCode& rKeyCode = pKeyEvent->GetKeyCode();
- USHORT nCode = rKeyCode.GetCode();
+ sal_uInt16 nCode = rKeyCode.GetCode();
if ( ( nCode == KEY_RETURN ) && ( rKeyCode.GetModifier() == KEY_MOD1 ) )
{
diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx
index 4f0afbaf5d2d..04bb47c2ab3e 100644
--- a/svtools/source/brwbox/editbrowsebox.cxx
+++ b/svtools/source/brwbox/editbrowsebox.cxx
@@ -629,7 +629,7 @@ namespace svt
{
while ( GetSelectColumnCount( ) )
SelectColumnPos(
- sal::static_int_cast< USHORT >(FirstSelectedColumn()),
+ sal::static_int_cast< sal_uInt16 >(FirstSelectedColumn()),
sal_False );
Select();
}
diff --git a/svtools/source/brwbox/editbrowsebox2.cxx b/svtools/source/brwbox/editbrowsebox2.cxx
index ed62b2cb1520..9f247a580fc9 100644
--- a/svtools/source/brwbox/editbrowsebox2.cxx
+++ b/svtools/source/brwbox/editbrowsebox2.cxx
@@ -42,7 +42,7 @@ namespace svt
using namespace ::com::sun::star::accessibility::AccessibleEventId;
// -----------------------------------------------------------------------------
-Reference< XAccessible > EditBrowseBox::CreateAccessibleCheckBoxCell(long _nRow, USHORT _nColumnPos,const TriState& eState,sal_Bool _bEnabled)
+Reference< XAccessible > EditBrowseBox::CreateAccessibleCheckBoxCell(long _nRow, sal_uInt16 _nColumnPos,const TriState& eState,sal_Bool _bEnabled)
{
Reference< XAccessible > xAccessible( GetAccessible() );
Reference< XAccessibleContext > xAccContext;
@@ -163,7 +163,7 @@ void EditBrowseBox::DetermineFocus( const sal_uInt16 _nGetFocusFlags )
)
{
long nRows = GetRowCount();
- USHORT nCols = ColCount();
+ sal_uInt16 nCols = ColCount();
if ( ( nRows > 0 ) && ( nCols > 0 ) )
{
@@ -195,7 +195,7 @@ Rectangle EditBrowseBox::GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nCol
if ( SeekRow(_nRow) )
{
CellController* pController = GetController(
- _nRow, GetColumnId( sal::static_int_cast< USHORT >(_nColumnPos) ) );
+ _nRow, GetColumnId( sal::static_int_cast< sal_uInt16 >(_nColumnPos) ) );
if ( pController )
aRect = pController->GetWindow().GetCharacterBounds(_nIndex);
}
@@ -208,7 +208,7 @@ sal_Int32 EditBrowseBox::GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumn
if ( SeekRow(_nRow) )
{
CellController* pController = GetController(
- _nRow, GetColumnId( sal::static_int_cast< USHORT >(_nColumnPos) ) );
+ _nRow, GetColumnId( sal::static_int_cast< sal_uInt16 >(_nColumnPos) ) );
if ( pController )
nRet = pController->GetWindow().GetIndexForPoint(_rPoint);
}
diff --git a/svtools/source/config/accessibilityoptions.cxx b/svtools/source/config/accessibilityoptions.cxx
index b2d2c54232b0..1cd368df0f5f 100644
--- a/svtools/source/config/accessibilityoptions.cxx
+++ b/svtools/source/config/accessibilityoptions.cxx
@@ -515,14 +515,14 @@ SvtAccessibilityOptions::SvtAccessibilityOptions()
}
++sm_nAccessibilityRefCount;
}
- //StartListening( *sm_pSingleImplConfig, TRUE );
+ //StartListening( *sm_pSingleImplConfig, sal_True );
}
// -----------------------------------------------------------------------
SvtAccessibilityOptions::~SvtAccessibilityOptions()
{
- //EndListening( *sm_pSingleImplConfig, TRUE );
+ //EndListening( *sm_pSingleImplConfig, sal_True );
::osl::MutexGuard aGuard( SingletonMutex::get() );
if( !--sm_nAccessibilityRefCount )
{
diff --git a/svtools/source/config/apearcfg.cxx b/svtools/source/config/apearcfg.cxx
index 4a95d0c03dcd..1c581dbf8f53 100644
--- a/svtools/source/config/apearcfg.cxx
+++ b/svtools/source/config/apearcfg.cxx
@@ -59,9 +59,9 @@ SvtTabAppearanceCfg::SvtTabAppearanceCfg()
#if defined( UNX ) || defined ( FS_PRIV_DEBUG )
,nAAMinPixelHeight ( DEFAULT_AAMINHEIGHT )
#endif
- ,bMenuMouseFollow(FALSE)
+ ,bMenuMouseFollow(sal_False)
#if defined( UNX ) || defined ( FS_PRIV_DEBUG )
- ,bFontAntialiasing ( TRUE )
+ ,bFontAntialiasing ( sal_True )
#endif
{
RTL_LOGFILE_CONTEXT(aLog, "svtools SvtTabAppearanceCfg::SvtTabAppearanceCfg()");
@@ -165,7 +165,7 @@ void SvtTabAppearanceCfg::Notify( const com::sun::star::uno::Sequence< rtl::OUSt
Beschreibung:
--------------------------------------------------------------------*/
-void SvtTabAppearanceCfg::SetDragMode ( USHORT nSet )
+void SvtTabAppearanceCfg::SetDragMode ( sal_uInt16 nSet )
{
nDragMode = nSet;
SetModified();
@@ -175,7 +175,7 @@ void SvtTabAppearanceCfg::SetDragMode ( USHORT nSet )
Beschreibung:
--------------------------------------------------------------------*/
-void SvtTabAppearanceCfg::SetScaleFactor ( USHORT nSet )
+void SvtTabAppearanceCfg::SetScaleFactor ( sal_uInt16 nSet )
{
nScaleFactor = nSet;
SetModified();
@@ -185,7 +185,7 @@ void SvtTabAppearanceCfg::SetScaleFactor ( USHORT nSet )
Beschreibung:
--------------------------------------------------------------------*/
-void SvtTabAppearanceCfg::SetSnapMode ( USHORT nSet )
+void SvtTabAppearanceCfg::SetSnapMode ( sal_uInt16 nSet )
{
nSnapMode = nSet;
SetModified();
@@ -193,7 +193,7 @@ void SvtTabAppearanceCfg::SetSnapMode ( USHORT nSet )
/*--------------------------------------------------------------------
Beschreibung:
--------------------------------------------------------------------*/
-void SvtTabAppearanceCfg::SetMiddleMouseButton ( USHORT nSet )
+void SvtTabAppearanceCfg::SetMiddleMouseButton ( sal_uInt16 nSet )
{
nMiddleMouse = nSet;
SetModified();
@@ -211,7 +211,7 @@ void SvtTabAppearanceCfg::SetApplicationDefaults ( Application* pApp )
// SetStandard...Styles() resets the UseSystemUIFonts flag,
// but we don't want to change it now, so save the flag before ...
- BOOL bUseSystemUIFonts = hAppStyle.GetUseSystemUIFonts();
+ sal_Bool bUseSystemUIFonts = hAppStyle.GetUseSystemUIFonts();
hAppStyle.SetStandardStyles();
// and set it here
hAppStyle.SetUseSystemUIFonts( bUseSystemUIFonts );
@@ -230,7 +230,7 @@ void SvtTabAppearanceCfg::SetApplicationDefaults ( Application* pApp )
// Mouse Snap
MouseSettings hMouseSettings = hAppSettings.GetMouseSettings();
- ULONG nMouseOptions = hMouseSettings.GetOptions();
+ sal_uLong nMouseOptions = hMouseSettings.GetOptions();
nMouseOptions &= ! (MOUSE_OPTION_AUTOCENTERPOS | MOUSE_OPTION_AUTODEFBTNPOS);
@@ -251,7 +251,7 @@ void SvtTabAppearanceCfg::SetApplicationDefaults ( Application* pApp )
// Merge and Publish Settings
- ULONG nFollow = hMouseSettings.GetFollow();
+ sal_uLong nFollow = hMouseSettings.GetFollow();
if(bMenuMouseFollow)
nFollow |= MOUSE_FOLLOW_MENU;
else
diff --git a/svtools/source/config/colorcfg.cxx b/svtools/source/config/colorcfg.cxx
index 7a151d609e6e..91e93cc65998 100644
--- a/svtools/source/config/colorcfg.cxx
+++ b/svtools/source/config/colorcfg.cxx
@@ -550,7 +550,7 @@ ColorConfigValue ColorConfig::GetColorValue(ColorConfigEntry eEntry, sal_Bool bS
if(COL_AUTO == sal::static_int_cast<ColorData>(aRet.nColor))
aRet.nColor = ColorConfig::GetDefaultColor(eEntry).GetColor();
//#103495# don't allow grey between 40% and 60% as application background
- const UINT8 nRed = COLORDATA_RED( aRet.nColor);
+ const sal_uInt8 nRed = COLORDATA_RED( aRet.nColor);
if(eEntry == APPBACKGROUND &&
(nRed == COLORDATA_GREEN( aRet.nColor)) &&
(nRed == COLORDATA_BLUE( aRet.nColor)) &&
@@ -569,14 +569,14 @@ EditableColorConfig::EditableColorConfig() :
m_pImpl(new ColorConfig_Impl),
m_bModified(sal_False)
{
- m_pImpl->BlockBroadcasts(TRUE);
+ m_pImpl->BlockBroadcasts(sal_True);
}
/*-- 25.03.2002 12:03:08---------------------------------------------------
-----------------------------------------------------------------------*/
EditableColorConfig::~EditableColorConfig()
{
- m_pImpl->BlockBroadcasts(FALSE);
+ m_pImpl->BlockBroadcasts(sal_False);
if(m_bModified)
m_pImpl->SetModified();
if(m_pImpl->IsModified())
@@ -674,12 +674,12 @@ void EditableColorConfig::Commit()
// -----------------------------------------------------------------------------
void EditableColorConfig::DisableBroadcast()
{
- m_pImpl->BlockBroadcasts(TRUE);
+ m_pImpl->BlockBroadcasts(sal_True);
}
// -----------------------------------------------------------------------------
void EditableColorConfig::EnableBroadcast()
{
- m_pImpl->BlockBroadcasts(FALSE);
+ m_pImpl->BlockBroadcasts(sal_False);
}
// -----------------------------------------------------------------------------
diff --git a/svtools/source/config/htmlcfg.cxx b/svtools/source/config/htmlcfg.cxx
index b8a9660ee8dc..1be097f17ab5 100644
--- a/svtools/source/config/htmlcfg.cxx
+++ b/svtools/source/config/htmlcfg.cxx
@@ -276,7 +276,7 @@ void SvxHtmlOptions::AddListenerLink( const Link& rLink )
void SvxHtmlOptions::RemoveListenerLink( const Link& rLink )
{
- for ( USHORT n=0; n<pImp->aList.Count(); n++ )
+ for ( sal_uInt16 n=0; n<pImp->aList.Count(); n++ )
{
if ( (*pImp->aList.GetObject(n) ) == rLink )
{
@@ -288,7 +288,7 @@ void SvxHtmlOptions::RemoveListenerLink( const Link& rLink )
void SvxHtmlOptions::CallListeners()
{
- for ( USHORT n = 0; n < pImp->aList.Count(); ++n )
+ for ( sal_uInt16 n = 0; n < pImp->aList.Count(); ++n )
pImp->aList.GetObject(n)->Call( this );
}
@@ -300,14 +300,14 @@ void SvxHtmlOptions::Notify( const com::sun::star::uno::Sequence< rtl::OUString
}
// -----------------------------------------------------------------------
-USHORT SvxHtmlOptions::GetFontSize(USHORT nPos) const
+sal_uInt16 SvxHtmlOptions::GetFontSize(sal_uInt16 nPos) const
{
if(nPos < HTML_FONT_COUNT)
- return (USHORT)pImp->aFontSizeArr[nPos];
+ return (sal_uInt16)pImp->aFontSizeArr[nPos];
return 0;
}
// -----------------------------------------------------------------------
-void SvxHtmlOptions::SetFontSize(USHORT nPos, USHORT nSize)
+void SvxHtmlOptions::SetFontSize(sal_uInt16 nPos, sal_uInt16 nSize)
{
if(nPos < HTML_FONT_COUNT)
{
@@ -321,7 +321,7 @@ void SvxHtmlOptions::SetFontSize(USHORT nPos, USHORT nSize)
// -----------------------------------------------------------------------
-BOOL SvxHtmlOptions::IsImportUnknown() const
+sal_Bool SvxHtmlOptions::IsImportUnknown() const
{
return 0 != (pImp->nFlags & HTMLCFG_UNKNOWN_TAGS) ;
}
@@ -329,7 +329,7 @@ BOOL SvxHtmlOptions::IsImportUnknown() const
// -----------------------------------------------------------------------
-void SvxHtmlOptions::SetImportUnknown(BOOL bSet)
+void SvxHtmlOptions::SetImportUnknown(sal_Bool bSet)
{
if(bSet)
pImp->nFlags |= HTMLCFG_UNKNOWN_TAGS;
@@ -341,15 +341,15 @@ void SvxHtmlOptions::SetImportUnknown(BOOL bSet)
// -----------------------------------------------------------------------
-USHORT SvxHtmlOptions::GetExportMode() const
+sal_uInt16 SvxHtmlOptions::GetExportMode() const
{
- return (USHORT)pImp->nExportMode;
+ return (sal_uInt16)pImp->nExportMode;
}
// -----------------------------------------------------------------------
-void SvxHtmlOptions::SetExportMode(USHORT nSet)
+void SvxHtmlOptions::SetExportMode(sal_uInt16 nSet)
{
if(nSet <= HTML_CFG_MAX )
{
@@ -362,7 +362,7 @@ void SvxHtmlOptions::SetExportMode(USHORT nSet)
// -----------------------------------------------------------------------
-BOOL SvxHtmlOptions::IsStarBasic() const
+sal_Bool SvxHtmlOptions::IsStarBasic() const
{
return 0 != (pImp->nFlags & HTMLCFG_STAR_BASIC) ;
}
@@ -370,7 +370,7 @@ BOOL SvxHtmlOptions::IsStarBasic() const
// -----------------------------------------------------------------------
-void SvxHtmlOptions::SetStarBasic(BOOL bSet)
+void SvxHtmlOptions::SetStarBasic(sal_Bool bSet)
{
if(bSet)
pImp->nFlags |= HTMLCFG_STAR_BASIC;
@@ -383,14 +383,14 @@ void SvxHtmlOptions::SetStarBasic(BOOL bSet)
--------------------------------------------------*/
-BOOL SvxHtmlOptions::IsSaveGraphicsLocal() const
+sal_Bool SvxHtmlOptions::IsSaveGraphicsLocal() const
{
return 0 != (pImp->nFlags & HTMLCFG_LOCAL_GRF) ;
}
/*-----------------14.02.97 08.34-------------------
--------------------------------------------------*/
-void SvxHtmlOptions::SetSaveGraphicsLocal(BOOL bSet)
+void SvxHtmlOptions::SetSaveGraphicsLocal(sal_Bool bSet)
{
if(bSet)
pImp->nFlags |= HTMLCFG_LOCAL_GRF;
@@ -403,9 +403,9 @@ void SvxHtmlOptions::SetSaveGraphicsLocal(BOOL bSet)
--------------------------------------------------*/
-BOOL SvxHtmlOptions::IsPrintLayoutExtension() const
+sal_Bool SvxHtmlOptions::IsPrintLayoutExtension() const
{
- BOOL bRet = 0 != (pImp->nFlags & HTMLCFG_PRINT_LAYOUT_EXTENSION);
+ sal_Bool bRet = 0 != (pImp->nFlags & HTMLCFG_PRINT_LAYOUT_EXTENSION);
switch( pImp->nExportMode )
{
case HTML_CFG_MSIE_40:
@@ -413,14 +413,14 @@ BOOL SvxHtmlOptions::IsPrintLayoutExtension() const
case HTML_CFG_WRITER :
break;
default:
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
/*-----------------10/21/97 08:34am-----------------
--------------------------------------------------*/
-void SvxHtmlOptions::SetPrintLayoutExtension(BOOL bSet)
+void SvxHtmlOptions::SetPrintLayoutExtension(sal_Bool bSet)
{
if(bSet)
pImp->nFlags |= HTMLCFG_PRINT_LAYOUT_EXTENSION;
@@ -433,14 +433,14 @@ void SvxHtmlOptions::SetPrintLayoutExtension(BOOL bSet)
--------------------------------------------------*/
-BOOL SvxHtmlOptions::IsIgnoreFontFamily() const
+sal_Bool SvxHtmlOptions::IsIgnoreFontFamily() const
{
return 0 != (pImp->nFlags & HTMLCFG_IGNORE_FONT_FAMILY) ;
}
/*-----------------10.07.98 10.02-------------------
--------------------------------------------------*/
-void SvxHtmlOptions::SetIgnoreFontFamily(BOOL bSet)
+void SvxHtmlOptions::SetIgnoreFontFamily(sal_Bool bSet)
{
if(bSet)
pImp->nFlags |= HTMLCFG_IGNORE_FONT_FAMILY;
@@ -451,14 +451,14 @@ void SvxHtmlOptions::SetIgnoreFontFamily(BOOL bSet)
/* -----------------05.02.99 09:03-------------------
*
* --------------------------------------------------*/
-BOOL SvxHtmlOptions::IsStarBasicWarning() const
+sal_Bool SvxHtmlOptions::IsStarBasicWarning() const
{
return 0 != (pImp->nFlags & HTMLCFG_IS_BASIC_WARNING) ;
}
/* -----------------05.02.99 09:03-------------------
*
* --------------------------------------------------*/
-void SvxHtmlOptions::SetStarBasicWarning(BOOL bSet)
+void SvxHtmlOptions::SetStarBasicWarning(sal_Bool bSet)
{
if(bSet)
pImp->nFlags |= HTMLCFG_IS_BASIC_WARNING;
@@ -506,14 +506,14 @@ SvxHtmlOptions* SvxHtmlOptions::Get()
/* ---------------------- 2006-06-07T21:02+0200 ---------------------- */
-BOOL SvxHtmlOptions::IsNumbersEnglishUS() const
+sal_Bool SvxHtmlOptions::IsNumbersEnglishUS() const
{
return 0 != (pImp->nFlags & HTMLCFG_NUMBERS_ENGLISH_US) ;
}
/* ---------------------- 2006-06-07T21:02+0200 ---------------------- */
-void SvxHtmlOptions::SetNumbersEnglishUS(BOOL bSet)
+void SvxHtmlOptions::SetNumbersEnglishUS(sal_Bool bSet)
{
if(bSet)
pImp->nFlags |= HTMLCFG_NUMBERS_ENGLISH_US;
diff --git a/svtools/source/config/menuoptions.cxx b/svtools/source/config/menuoptions.cxx
index e33251050b81..28f52fe2b23b 100644
--- a/svtools/source/config/menuoptions.cxx
+++ b/svtools/source/config/menuoptions.cxx
@@ -176,7 +176,7 @@ class SvtMenuOptions_Impl : public ConfigItem
{
m_bDontHideDisabledEntries = bState;
SetModified();
- for ( USHORT n=0; n<aList.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aList.Count(); n++ )
aList.GetObject(n)->Call( this );
Commit();
}
@@ -185,7 +185,7 @@ class SvtMenuOptions_Impl : public ConfigItem
{
m_bFollowMouse = bState;
SetModified();
- for ( USHORT n=0; n<aList.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aList.Count(); n++ )
aList.GetObject(n)->Call( this );
Commit();
}
@@ -194,7 +194,7 @@ class SvtMenuOptions_Impl : public ConfigItem
{
m_nMenuIcons = bState;
SetModified();
- for ( USHORT n=0; n<aList.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aList.Count(); n++ )
aList.GetObject(n)->Call( this );
Commit();
}
@@ -299,7 +299,7 @@ SvtMenuOptions_Impl::~SvtMenuOptions_Impl()
Commit();
}
- for ( USHORT n=0; n<aList.Count(); )
+ for ( sal_uInt16 n=0; n<aList.Count(); )
delete aList.Remove(n);
}
@@ -358,7 +358,7 @@ void SvtMenuOptions_Impl::Notify( const Sequence< OUString >& seqPropertyNames )
if ( bMenuSettingsChanged )
m_nMenuIcons = bSystemMenuIcons ? 2 : bMenuIcons;
- for ( USHORT n=0; n<aList.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aList.Count(); n++ )
aList.GetObject(n)->Call( this );
}
@@ -427,7 +427,7 @@ void SvtMenuOptions_Impl::AddListenerLink( const Link& rLink )
void SvtMenuOptions_Impl::RemoveListenerLink( const Link& rLink )
{
- for ( USHORT n=0; n<aList.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aList.Count(); n++ )
{
if ( (*aList.GetObject(n) ) == rLink )
{
diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx
index 2f455734a01d..9668a2144ebf 100644
--- a/svtools/source/config/miscopt.cxx
+++ b/svtools/source/config/miscopt.cxx
@@ -81,7 +81,7 @@ using namespace ::com::sun::star;
#define PROPERTYCOUNT 6
-#define VCL_TOOLBOX_STYLE_FLAT ((USHORT)0x0004) // from <vcl/toolbox.hxx>
+#define VCL_TOOLBOX_STYLE_FLAT ((sal_uInt16)0x0004) // from <vcl/toolbox.hxx>
DECLARE_LIST( LinkList, Link * )
@@ -374,7 +374,7 @@ SvtMiscOptions_Impl::~SvtMiscOptions_Impl()
Commit();
}
- for ( USHORT n=0; n<aList.Count(); )
+ for ( sal_uInt16 n=0; n<aList.Count(); )
delete aList.Remove(n);
}
@@ -467,7 +467,7 @@ void SvtMiscOptions_Impl::AddListenerLink( const Link& rLink )
void SvtMiscOptions_Impl::RemoveListenerLink( const Link& rLink )
{
- for ( USHORT n=0; n<aList.Count(); n++ )
+ for ( sal_uInt16 n=0; n<aList.Count(); n++ )
{
if ( (*aList.GetObject(n) ) == rLink )
{
@@ -479,7 +479,7 @@ void SvtMiscOptions_Impl::RemoveListenerLink( const Link& rLink )
void SvtMiscOptions_Impl::CallListeners()
{
- for ( USHORT n = 0; n < aList.Count(); ++n )
+ for ( sal_uInt16 n = 0; n < aList.Count(); ++n )
aList.GetObject(n)->Call( this );
}
@@ -725,7 +725,7 @@ sal_Int16 SvtMiscOptions::GetCurrentSymbolsSize() const
{
// Use system settings, we have to retrieve the toolbar icon size from the
// Application class
- ULONG nStyleIconSize = Application::GetSettings().GetStyleSettings().GetToolbarIconSize();
+ sal_uLong nStyleIconSize = Application::GetSettings().GetStyleSettings().GetToolbarIconSize();
if ( nStyleIconSize == STYLE_TOOLBAR_ICONSIZE_LARGE )
eOptSymbolsSize = SFX_SYMBOLS_SIZE_LARGE;
else
diff --git a/svtools/source/config/printoptions.cxx b/svtools/source/config/printoptions.cxx
index 46e1f737d347..237d7f79a1c1 100644
--- a/svtools/source/config/printoptions.cxx
+++ b/svtools/source/config/printoptions.cxx
@@ -75,7 +75,7 @@
// - statics -
// -----------
-static USHORT aDPIArray[] = { 72, 96, 150, 200, 300, 600 };
+static sal_uInt16 aDPIArray[] = { 72, 96, 150, 200, 300, 600 };
#define DPI_COUNT (sizeof(aDPIArray)/sizeof(aDPIArray[0 ]))
@@ -748,7 +748,7 @@ void SvtBasePrintOptions::GetPrinterOptions( PrinterOptions& rOptions ) const
rOptions.SetReducedGradientStepCount( GetReducedGradientStepCount() );
rOptions.SetReduceBitmaps( IsReduceBitmaps() );
rOptions.SetReducedBitmapMode( (PrinterBitmapMode) GetReducedBitmapMode() );
- rOptions.SetReducedBitmapResolution( aDPIArray[ Min( (USHORT) GetReducedBitmapResolution(), (USHORT)( DPI_COUNT - 1 ) ) ] );
+ rOptions.SetReducedBitmapResolution( aDPIArray[ Min( (sal_uInt16) GetReducedBitmapResolution(), (sal_uInt16)( DPI_COUNT - 1 ) ) ] );
rOptions.SetReducedBitmapIncludesTransparency( IsReducedBitmapIncludesTransparency() );
rOptions.SetConvertToGreyscales( IsConvertToGreyscales() );
}
@@ -771,7 +771,7 @@ void SvtBasePrintOptions::SetPrinterOptions( const PrinterOptions& rOptions )
SetReducedBitmapIncludesTransparency( rOptions.IsReducedBitmapIncludesTransparency() );
SetConvertToGreyscales( rOptions.IsConvertToGreyscales() );
- const USHORT nDPI = rOptions.GetReducedBitmapResolution();
+ const sal_uInt16 nDPI = rOptions.GetReducedBitmapResolution();
if( nDPI < aDPIArray[ 0 ] )
SetReducedBitmapResolution( 0 );
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index c9b9b23786b4..4ea086ad7580 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -113,7 +113,7 @@ namespace
struct ReleaseSolarMutex
{
private:
- ULONG m_nCount;
+ sal_uLong m_nCount;
public:
inline ReleaseSolarMutex()
@@ -219,7 +219,7 @@ private:
sal_Bool Kill( const OUString& rURL );
protected:
- virtual BOOL DoubleClickHdl();
+ virtual sal_Bool DoubleClickHdl();
virtual ::rtl::OUString GetAccessibleObjectDescription( ::svt::AccessibleBrowseBoxObjType _eType, sal_Int32 _nPos ) const;
public:
@@ -228,7 +228,7 @@ public:
virtual void Resize();
virtual void KeyInput( const KeyEvent& rKEvt );
- virtual BOOL EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText );
+ virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText );
void ClearAll();
HeaderBar* GetHeaderBar() const { return mpHeaderBar; }
@@ -243,7 +243,7 @@ public:
DECL_LINK( ResetQuickSearch_Impl, Timer * );
virtual PopupMenu* CreateContextMenu( void );
- virtual void ExcecuteContextMenuAction( USHORT nSelectedPopentry );
+ virtual void ExcecuteContextMenuAction( sal_uInt16 nSelectedPopentry );
};
// class HashedEntry --------------------------------------------------
@@ -473,9 +473,9 @@ void NameTranslationList::Init()
aConfig.SetGroup( ByteString( pSection ) );
- USHORT nKeyCnt = aConfig.GetKeyCount();
+ sal_uInt16 nKeyCnt = aConfig.GetKeyCount();
- for( USHORT nCnt = 0 ; nCnt < nKeyCnt ; ++nCnt )
+ for( sal_uInt16 nCnt = 0 ; nCnt < nKeyCnt ; ++nCnt )
Insert( new NameTranslationEntry( aConfig.GetKeyName( nCnt ), aConfig.ReadKey( nCnt ) ) );
}
}
@@ -615,7 +615,7 @@ public:
String FolderInserted( const OUString& rURL,
const OUString& rTitle );
- ULONG GetEntryPos( const OUString& rURL );
+ sal_uLong GetEntryPos( const OUString& rURL );
inline void EnableContextMenu( sal_Bool bEnable );
inline void EnableDelete( sal_Bool bEnable );
@@ -965,7 +965,7 @@ PopupMenu* ViewTabListBox_Impl::CreateContextMenu( void )
// -----------------------------------------------------------------------
-void ViewTabListBox_Impl::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry )
+void ViewTabListBox_Impl::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry )
{
switch ( nSelectedPopupEntry )
{
@@ -983,7 +983,7 @@ void ViewTabListBox_Impl::ExcecuteContextMenuAction( USHORT nSelectedPopupEntry
void ViewTabListBox_Impl::ClearAll()
{
- for ( USHORT i = 0; i < GetEntryCount(); ++i )
+ for ( sal_uInt16 i = 0; i < GetEntryCount(); ++i )
delete (SvtContentEntry*)GetEntry(i)->GetUserData();
Clear();
}
@@ -1059,10 +1059,10 @@ void ViewTabListBox_Impl::DeleteEntries()
}
// -----------------------------------------------------------------------
-BOOL ViewTabListBox_Impl::EditedEntry( SvLBoxEntry* pEntry,
+sal_Bool ViewTabListBox_Impl::EditedEntry( SvLBoxEntry* pEntry,
const XubString& rNewText )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
OUString aURL;
SvtContentEntry* pData = (SvtContentEntry*)pEntry->GetUserData();
@@ -1107,7 +1107,7 @@ BOOL ViewTabListBox_Impl::EditedEntry( SvLBoxEntry* pEntry,
pData->maURL = aURL;
pEntry->SetUserData( pData );
- bRet = TRUE;
+ bRet = sal_True;
}
}
catch( Exception const & )
@@ -1145,7 +1145,7 @@ void ViewTabListBox_Impl::DoQuickSearch( const xub_Unicode& rChar )
SvLBoxEntry* pEntry = GetEntry( mnSearchIndex );
if ( pEntry )
{
- SelectAll( FALSE );
+ SelectAll( sal_False );
Select( pEntry );
SetCurEntry( pEntry );
MakeVisible( pEntry );
@@ -1161,10 +1161,10 @@ void ViewTabListBox_Impl::DoQuickSearch( const xub_Unicode& rChar )
}
// -----------------------------------------------------------------------
-BOOL ViewTabListBox_Impl::DoubleClickHdl()
+sal_Bool ViewTabListBox_Impl::DoubleClickHdl()
{
SvHeaderTabListBox::DoubleClickHdl();
- return FALSE;
+ return sal_False;
// this means "do no additional handling". Especially this means that the SvImpLBox does not
// recognize that the entry at the double click position change after the handler call (which is
// the case if in the handler, our content was replaced)
@@ -1311,7 +1311,7 @@ void SvtFileView::OpenFolder( const Sequence< OUString >& aContents )
{
mpImp->mpView->ClearAll();
const OUString* pFileProperties = aContents.getConstArray();
- UINT32 i, nCount = aContents.getLength();
+ sal_uInt32 i, nCount = aContents.getLength();
for ( i = 0; i < nCount; ++i )
{
String aRow( pFileProperties[i] );
@@ -1343,7 +1343,7 @@ void SvtFileView::OpenFolder( const Sequence< OUString >& aContents )
// detect image
sal_Bool bDoInsert = sal_True;
INetURLObject aObj( aImageURL.Len() > 0 ? aImageURL : aURL );
- Image aImage = SvFileInformationManager::GetImage( aObj, FALSE, isHighContrast( this ) );
+ Image aImage = SvFileInformationManager::GetImage( aObj, sal_False, isHighContrast( this ) );
if ( bDoInsert )
{
@@ -1391,7 +1391,7 @@ sal_Bool SvtFileView::CreateNewFolder( const String& rNewFolder )
String sTitle = aObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
String sEntry = mpImp->FolderInserted( sURL, sTitle );
SvLBoxEntry* pEntry = mpImp->mpView->InsertEntry( sEntry, mpImp->maFolderImage, mpImp->maFolderImage );
- SvtContentEntry* pUserData = new SvtContentEntry( sURL, TRUE );
+ SvtContentEntry* pUserData = new SvtContentEntry( sURL, sal_True );
pEntry->SetUserData( pUserData );
mpImp->mpView->MakeVisible( pEntry );
bRet = sal_True;
@@ -1577,7 +1577,7 @@ void SvtFileView::CancelRunningAsyncAction()
void SvtFileView::SetNoSelection()
{
- mpImp->mpView->SelectAll( FALSE );
+ mpImp->mpView->SelectAll( sal_False );
}
// -----------------------------------------------------------------------
@@ -1612,7 +1612,7 @@ void SvtFileView::SetDoubleClickHdl( const Link& rHdl )
// -----------------------------------------------------------------------
-ULONG SvtFileView::GetSelectionCount() const
+sal_uLong SvtFileView::GetSelectionCount() const
{
return mpImp->mpView->GetSelectionCount();
}
@@ -1684,7 +1684,7 @@ void SvtFileView::EndInplaceEditing( bool _bCancel )
IMPL_LINK( SvtFileView, HeaderSelect_Impl, HeaderBar*, pBar )
{
DBG_ASSERT( pBar, "no headerbar" );
- USHORT nItemID = pBar->GetCurItemId();
+ sal_uInt16 nItemID = pBar->GetCurItemId();
HeaderBarItemBits nBits;
@@ -1705,7 +1705,7 @@ IMPL_LINK( SvtFileView, HeaderSelect_Impl, HeaderBar*, pBar )
nBits = pBar->GetItemBits( nItemID );
- BOOL bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW );
+ sal_Bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW );
if ( bUp )
{
@@ -1729,10 +1729,10 @@ IMPL_LINK( SvtFileView, HeaderEndDrag_Impl, HeaderBar*, pBar )
if ( !pBar->IsItemMode() )
{
Size aSize;
- USHORT nTabs = pBar->GetItemCount();
+ sal_uInt16 nTabs = pBar->GetItemCount();
long nTmpSize = 0;
- for ( USHORT i = 1; i <= nTabs; ++i )
+ for ( sal_uInt16 i = 1; i <= nTabs; ++i )
{
long nWidth = pBar->GetItemSize(i);
aSize.Width() = nWidth + nTmpSize;
@@ -1755,14 +1755,14 @@ String SvtFileView::GetConfigString() const
sRet += String::CreateFromInt32( mpImp->mnSortColumn );
sRet += ';';
HeaderBarItemBits nBits = pBar->GetItemBits( mpImp->mnSortColumn );
- BOOL bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW );
+ sal_Bool bUp = ( ( nBits & HIB_UPARROW ) == HIB_UPARROW );
sRet += bUp ? '1' : '0';
sRet += ';';
- USHORT nCount = pBar->GetItemCount();
- for ( USHORT i = 0; i < nCount; ++i )
+ sal_uInt16 nCount = pBar->GetItemCount();
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
- USHORT nId = pBar->GetItemId(i);
+ sal_uInt16 nId = pBar->GetItemId(i);
sRet += String::CreateFromInt32( nId );
sRet += ';';
sRet += String::CreateFromInt32( pBar->GetItemSize( nId ) );
@@ -1779,9 +1779,9 @@ void SvtFileView::SetConfigString( const String& rCfgStr )
HeaderBar* pBar = mpImp->mpView->GetHeaderBar();
DBG_ASSERT( pBar, "invalid headerbar" );
- USHORT nIdx = 0;
- mpImp->mnSortColumn = (USHORT)rCfgStr.GetToken( 0, ';', nIdx ).ToInt32();
- BOOL bUp = (BOOL)(USHORT)rCfgStr.GetToken( 0, ';', nIdx ).ToInt32();
+ sal_uInt16 nIdx = 0;
+ mpImp->mnSortColumn = (sal_uInt16)rCfgStr.GetToken( 0, ';', nIdx ).ToInt32();
+ sal_Bool bUp = (sal_Bool)(sal_uInt16)rCfgStr.GetToken( 0, ';', nIdx ).ToInt32();
HeaderBarItemBits nBits = pBar->GetItemBits( mpImp->mnSortColumn );
if ( bUp )
@@ -1798,7 +1798,7 @@ void SvtFileView::SetConfigString( const String& rCfgStr )
while ( nIdx != STRING_NOTFOUND )
{
- USHORT nItemId = (USHORT)rCfgStr.GetToken( 0, ';', nIdx ).ToInt32();
+ sal_uInt16 nItemId = (sal_uInt16)rCfgStr.GetToken( 0, ';', nIdx ).ToInt32();
pBar->SetItemSize( nItemId, rCfgStr.GetToken( 0, ';', nIdx ).ToInt32() );
}
@@ -2192,7 +2192,7 @@ void SvtFileView_Impl::OpenFolder_Impl()
{
::osl::MutexGuard aGuard( maMutex );
- mpView->SetUpdateMode( FALSE );
+ mpView->SetUpdateMode( sal_False );
mpView->ClearAll();
std::vector< SortingData_Impl* >::iterator aIt;
@@ -2215,7 +2215,7 @@ void SvtFileView_Impl::OpenFolder_Impl()
InitSelection();
++mnSuspendSelectCallback;
- mpView->SetUpdateMode( TRUE );
+ mpView->SetUpdateMode( sal_True );
--mnSuspendSelectCallback;
ResetCursor();
@@ -2227,9 +2227,9 @@ void SvtFileView_Impl::ResetCursor()
// deselect
SvLBoxEntry* pEntry = mpView->FirstSelected();
if ( pEntry )
- mpView->Select( pEntry, FALSE );
+ mpView->Select( pEntry, sal_False );
// set cursor to the first entry
- mpView->SetCursor( mpView->First(), TRUE );
+ mpView->SetCursor( mpView->First(), sal_True );
mpView->Update();
}
@@ -2361,10 +2361,10 @@ void SvtFileView_Impl::CreateDisplayText_Impl()
::svtools::VolumeInfo aVolInfo( (*aIt)->mbIsVolume, (*aIt)->mbIsRemote,
(*aIt)->mbIsRemoveable, (*aIt)->mbIsFloppy,
(*aIt)->mbIsCompactDisc );
- (*aIt)->maImage = SvFileInformationManager::GetFolderImage( aVolInfo, FALSE, isHighContrast( mpView ) );
+ (*aIt)->maImage = SvFileInformationManager::GetFolderImage( aVolInfo, sal_False, isHighContrast( mpView ) );
}
else
- (*aIt)->maImage = SvFileInformationManager::GetFileImage( INetURLObject( (*aIt)->maTargetURL ), FALSE, isHighContrast( mpView ));
+ (*aIt)->maImage = SvFileInformationManager::GetFileImage( INetURLObject( (*aIt)->maTargetURL ), sal_False, isHighContrast( mpView ));
}
}
@@ -2449,7 +2449,7 @@ void SvtFileView_Impl::CreateVector_Impl( const Sequence < OUString > &rList )
// detect the image
INetURLObject aObj( pEntry->maImageURL.getLength() ? pEntry->maImageURL : pEntry->maTargetURL );
- pEntry->maImage = SvFileInformationManager::GetImage( aObj, FALSE, isHighContrast( mpView ) );
+ pEntry->maImage = SvFileInformationManager::GetImage( aObj, sal_False, isHighContrast( mpView ) );
maContent.push_back( pEntry );
}
@@ -2480,7 +2480,7 @@ void SvtFileView_Impl::Resort_Impl( sal_Int16 nColumn, sal_Bool bAscending )
if ( !mbIsFirstResort )
{
- ULONG nPos = GetEntryPos( aEntryURL );
+ sal_uLong nPos = GetEntryPos( aEntryURL );
if ( nPos < mpView->GetEntryCount() )
{
pEntry = mpView->GetEntry( nPos );
@@ -2569,7 +2569,7 @@ sal_Bool CompareSortingData_Impl( SortingData_Impl* const aOne, SortingData_Impl
}
}
- // when the two elements are equal, we must not return TRUE (which would
+ // when the two elements are equal, we must not return sal_True (which would
// happen if we just return ! ( a < b ) when not sorting ascending )
if ( bEqual )
return sal_False;
@@ -2659,7 +2659,7 @@ String SvtFileView_Impl::FolderInserted( const OUString& rURL, const OUString& r
::svtools::VolumeInfo aVolInfo;
pData->maType = SvFileInformationManager::GetFolderDescription( aVolInfo );
- pData->maImage = SvFileInformationManager::GetFolderImage( aVolInfo, FALSE, isHighContrast( mpView ) );
+ pData->maImage = SvFileInformationManager::GetFolderImage( aVolInfo, sal_False, isHighContrast( mpView ) );
OUString aValue;
OUString aTab = OUString::createFromAscii( "\t" );
@@ -2688,12 +2688,12 @@ String SvtFileView_Impl::FolderInserted( const OUString& rURL, const OUString& r
}
// -----------------------------------------------------------------------
-ULONG SvtFileView_Impl::GetEntryPos( const OUString& rURL )
+sal_uLong SvtFileView_Impl::GetEntryPos( const OUString& rURL )
{
::osl::MutexGuard aGuard( maMutex );
std::vector< SortingData_Impl* >::iterator aIt;
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
for ( aIt = maContent.begin(); aIt != maContent.end(); aIt++ )
{
diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx
index 6b0f2cdccdd8..a54d578593cd 100644
--- a/svtools/source/contnr/imivctl.hxx
+++ b/svtools/source/contnr/imivctl.hxx
@@ -59,7 +59,7 @@ class IcnGridMap_Impl;
#define F_VER_SBARSIZE_WITH_HBAR 0x0001
#define F_HOR_SBARSIZE_WITH_VBAR 0x0002
-#define F_PAINTED 0x0004 // TRUE nach erstem Paint
+#define F_PAINTED 0x0004 // sal_True nach erstem Paint
#define F_ADD_MODE 0x0008
#define F_SELECTING_RECT 0x0020
#define F_DOWN_CTRL 0x0080
@@ -108,11 +108,11 @@ enum IcnViewFieldType
//
struct LocalFocus
{
- BOOL bOn;
+ sal_Bool bOn;
Rectangle aRect;
Color aPenColor;
- LocalFocus() { bOn = FALSE; }
+ LocalFocus() { bOn = sal_False; }
};
///////////////////////////////////////////////////////////////////////////////
@@ -132,18 +132,18 @@ private:
public:
EntryList_Impl(
SvxIconChoiceCtrl_Impl*,
- USHORT _nInitSize = 1024,
- USHORT _nReSize = 1024 );
+ sal_uInt16 _nInitSize = 1024,
+ sal_uInt16 _nReSize = 1024 );
EntryList_Impl(
SvxIconChoiceCtrl_Impl*,
- USHORT _nBlockSize,
- USHORT _nInitSize,
- USHORT _nReSize );
+ sal_uInt16 _nBlockSize,
+ sal_uInt16 _nInitSize,
+ sal_uInt16 _nReSize );
~EntryList_Impl();
void Clear();
- void Insert( SvxIconChoiceCtrlEntry* pEntry, ULONG nPos );
- SvxIconChoiceCtrlEntry* Remove( ULONG nPos );
+ void Insert( SvxIconChoiceCtrlEntry* pEntry, sal_uLong nPos );
+ SvxIconChoiceCtrlEntry* Remove( sal_uLong nPos );
void Remove( SvxIconChoiceCtrlEntry* pEntry );
};
@@ -158,7 +158,7 @@ class SvxIconChoiceCtrl_Impl
friend class EntryList_Impl;
friend class IcnGridMap_Impl;
- BOOL bChooseWithCursor;
+ sal_Bool bChooseWithCursor;
EntryList_Impl aEntries;
ScrollBar aVerSBar;
ScrollBar aHorSBar;
@@ -188,12 +188,12 @@ class SvxIconChoiceCtrl_Impl
IcnViewEdit_Impl* pEdit;
WinBits nWinBits;
long nMaxBoundHeight; // Hoehe des hoechsten BoundRects
- USHORT nFlags;
- USHORT nCurTextDrawFlags;
- ULONG nUserEventAdjustScrBars;
- ULONG nUserEventShowCursor;
+ sal_uInt16 nFlags;
+ sal_uInt16 nCurTextDrawFlags;
+ sal_uLong nUserEventAdjustScrBars;
+ sal_uLong nUserEventShowCursor;
SvxIconChoiceCtrlEntry* pCurHighlightFrame;
- BOOL bHighlightFramePressed;
+ sal_Bool bHighlightFramePressed;
SvxIconChoiceCtrlEntry* pHead; // Eintrag oben links
SvxIconChoiceCtrlEntry* pCursor;
SvxIconChoiceCtrlEntry* pPrevDropTarget;
@@ -211,16 +211,16 @@ class SvxIconChoiceCtrl_Impl
SvxIconChoiceCtrlEntry* pCurEditedEntry;
SvxIconChoiceCtrlTextMode eTextMode;
SelectionMode eSelectionMode;
- ULONG nSelectionCount;
+ sal_uLong nSelectionCount;
SvxIconChoiceCtrlPositionMode ePositionMode;
- BOOL bBoundRectsDirty;
- BOOL bUpdateMode;
- BOOL bEntryEditingEnabled;
- BOOL bInDragDrop;
+ sal_Bool bBoundRectsDirty;
+ sal_Bool bUpdateMode;
+ sal_Bool bEntryEditingEnabled;
+ sal_Bool bInDragDrop;
- void ShowCursor( BOOL bShow );
+ void ShowCursor( sal_Bool bShow );
- void ImpArrange( BOOL bKeepPredecessors = FALSE );
+ void ImpArrange( sal_Bool bKeepPredecessors = sal_False );
void AdjustVirtSize( const Rectangle& );
void ResetVirtSize();
void CheckScrollBars();
@@ -235,16 +235,16 @@ class SvxIconChoiceCtrl_Impl
DECL_LINK( VisRectChangedHdl, void* );
DECL_LINK( CallSelectHdlHdl, void* );
- void AdjustScrollBars( BOOL bVirtSizeGrowedOnly = FALSE);
+ void AdjustScrollBars( sal_Bool bVirtSizeGrowedOnly = sal_False);
void PositionScrollBars( long nRealWidth, long nRealHeight );
long GetScrollBarPageSize( long nVisibleRange ) const { return ((nVisibleRange*75)/100); }
long GetScrollBarLineSize() const { return nMaxBoundHeight / 2; }
- BOOL HandleScrollCommand( const CommandEvent& rCmd );
+ sal_Bool HandleScrollCommand( const CommandEvent& rCmd );
void ToDocPos( Point& rPosPixel ) { rPosPixel -= pView->GetMapMode().GetOrigin(); }
void InitScrollBarBox();
SvxIconChoiceCtrlEntry* FindNewCursor();
void ToggleSelection( SvxIconChoiceCtrlEntry* );
- void DeselectAllBut( SvxIconChoiceCtrlEntry*, BOOL bPaintSync=FALSE );
+ void DeselectAllBut( SvxIconChoiceCtrlEntry*, sal_Bool bPaintSync=sal_False );
void Center( SvxIconChoiceCtrlEntry* pEntry ) const;
void StopEditTimer() { aEditTimer.Stop(); }
void StartEditTimer() { aEditTimer.Start(); }
@@ -253,13 +253,13 @@ class SvxIconChoiceCtrl_Impl
void SelectRect(
SvxIconChoiceCtrlEntry* pEntry1,
SvxIconChoiceCtrlEntry* pEntry2,
- BOOL bAdd = TRUE,
+ sal_Bool bAdd = sal_True,
SvPtrarr* pOtherRects = 0 );
void SelectRange(
SvxIconChoiceCtrlEntry* pStart,
SvxIconChoiceCtrlEntry* pEnd,
- BOOL bAdd = TRUE );
+ sal_Bool bAdd = sal_True );
void AddSelectedRect( const Rectangle& );
void AddSelectedRect(
@@ -275,27 +275,27 @@ class SvxIconChoiceCtrl_Impl
Point AdjustAtGrid(
const Rectangle& rCenterRect, // "Schwerpunkt" des Objekts (typ. Bmp-Rect)
const Rectangle& rBoundRect ) const;
- ULONG GetPredecessorGrid( const Point& rDocPos) const;
+ sal_uLong GetPredecessorGrid( const Point& rDocPos) const;
void InitPredecessors();
void ClearPredecessors();
- BOOL CheckVerScrollBar();
- BOOL CheckHorScrollBar();
+ sal_Bool CheckVerScrollBar();
+ sal_Bool CheckHorScrollBar();
void CancelUserEvents();
- void EntrySelected( SvxIconChoiceCtrlEntry* pEntry, BOOL bSelect,
- BOOL bSyncPaint );
+ void EntrySelected( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bSelect,
+ sal_Bool bSyncPaint );
void SaveSelection( List** );
- void RepaintEntries( USHORT nEntryFlagsMask );
+ void RepaintEntries( sal_uInt16 nEntryFlagsMask );
void SetListPositions();
void SetDefaultTextSize();
- BOOL IsAutoArrange() const {
- return (BOOL)(ePositionMode == IcnViewPositionModeAutoArrange); }
- BOOL IsAutoAdjust() const {
- return (BOOL)(ePositionMode == IcnViewPositionModeAutoAdjust); }
+ sal_Bool IsAutoArrange() const {
+ return (sal_Bool)(ePositionMode == IcnViewPositionModeAutoArrange); }
+ sal_Bool IsAutoAdjust() const {
+ return (sal_Bool)(ePositionMode == IcnViewPositionModeAutoAdjust); }
void DocRectChanged() { aDocRectChangedTimer.Start(); }
void VisRectChanged() { aVisRectChangedTimer.Start(); }
- void SetOrigin( const Point&, BOOL bDoNotUpdateWallpaper = FALSE );
+ void SetOrigin( const Point&, sal_Bool bDoNotUpdateWallpaper = sal_False );
DECL_LINK( TextEditEndedHdl, IcnViewEdit_Impl* );
@@ -303,7 +303,7 @@ class SvxIconChoiceCtrl_Impl
void HideFocus ();
void DrawFocusRect ( OutputDevice* pOut );
- BOOL IsMnemonicChar( sal_Unicode cChar, ULONG& rPos ) const;
+ sal_Bool IsMnemonicChar( sal_Unicode cChar, sal_uLong& rPos ) const;
public:
@@ -315,52 +315,52 @@ public:
SvxIconChoiceCtrl_Impl( SvtIconChoiceCtrl* pView, WinBits nWinStyle );
~SvxIconChoiceCtrl_Impl();
- BOOL SetChoiceWithCursor ( BOOL bDo = TRUE ) { BOOL bOld=bChooseWithCursor; bChooseWithCursor = bDo; return bOld; }
- void Clear( BOOL bInCtor = FALSE );
+ sal_Bool SetChoiceWithCursor ( sal_Bool bDo = sal_True ) { sal_Bool bOld=bChooseWithCursor; bChooseWithCursor = bDo; return bOld; }
+ void Clear( sal_Bool bInCtor = sal_False );
void SetStyle( WinBits nWinStyle );
WinBits GetStyle() const { return nWinBits; }
- void InsertEntry( SvxIconChoiceCtrlEntry*, ULONG nPos, const Point* pPos=0 );
+ void InsertEntry( SvxIconChoiceCtrlEntry*, sal_uLong nPos, const Point* pPos=0 );
void CreateAutoMnemonics( MnemonicGenerator* _pGenerator = NULL );
void RemoveEntry( SvxIconChoiceCtrlEntry* pEntry );
void FontModified();
- void SelectAll( BOOL bSelect = TRUE, BOOL bPaint = TRUE );
+ void SelectAll( sal_Bool bSelect = sal_True, sal_Bool bPaint = sal_True );
void SelectEntry(
SvxIconChoiceCtrlEntry*,
- BOOL bSelect,
- BOOL bCallHdl = TRUE,
- BOOL bAddToSelection = FALSE,
- BOOL bSyncPaint = FALSE );
+ sal_Bool bSelect,
+ sal_Bool bCallHdl = sal_True,
+ sal_Bool bAddToSelection = sal_False,
+ sal_Bool bSyncPaint = sal_False );
void Paint( const Rectangle& rRect );
- BOOL MouseButtonDown( const MouseEvent& );
- BOOL MouseButtonUp( const MouseEvent& );
- BOOL MouseMove( const MouseEvent&);
- BOOL RequestHelp( const HelpEvent& rHEvt );
+ sal_Bool MouseButtonDown( const MouseEvent& );
+ sal_Bool MouseButtonUp( const MouseEvent& );
+ sal_Bool MouseMove( const MouseEvent&);
+ sal_Bool RequestHelp( const HelpEvent& rHEvt );
void SetCursor_Impl(
SvxIconChoiceCtrlEntry* pOldCursor,
SvxIconChoiceCtrlEntry* pNewCursor,
- BOOL bMod1,
- BOOL bShift,
- BOOL bPaintSync = FALSE);
- BOOL KeyInput( const KeyEvent& );
+ sal_Bool bMod1,
+ sal_Bool bShift,
+ sal_Bool bPaintSync = sal_False);
+ sal_Bool KeyInput( const KeyEvent& );
void Resize();
void GetFocus();
void LoseFocus();
- void SetUpdateMode( BOOL bUpdate );
- BOOL GetUpdateMode() const { return bUpdateMode; }
- void PaintEntry( SvxIconChoiceCtrlEntry* pEntry, BOOL bIsBackgroundPainted=FALSE );
+ void SetUpdateMode( sal_Bool bUpdate );
+ sal_Bool GetUpdateMode() const { return bUpdateMode; }
+ void PaintEntry( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bIsBackgroundPainted=sal_False );
void PaintEntry(
SvxIconChoiceCtrlEntry*,
const Point&,
OutputDevice* pOut = 0,
- BOOL bIsBackgroundPainted = FALSE);
+ sal_Bool bIsBackgroundPainted = sal_False);
void PaintEntryVirtOutDev( SvxIconChoiceCtrlEntry* );
void SetEntryPos(
SvxIconChoiceCtrlEntry* pEntry,
const Point& rPos,
- BOOL bAdjustRow = FALSE,
- BOOL bCheckScrollBars = FALSE,
- BOOL bKeepGridMap = FALSE );
+ sal_Bool bAdjustRow = sal_False,
+ sal_Bool bCheckScrollBars = sal_False,
+ sal_Bool bKeepGridMap = sal_False );
void InvalidateEntry( SvxIconChoiceCtrlEntry* );
IcnViewFieldType GetItem( SvxIconChoiceCtrlEntry*, const Point& rAbsPos );
@@ -370,25 +370,25 @@ public:
SvxIconChoiceCtrlEntry* GetCurEntry() const { return pCursor; }
void SetCursor(
SvxIconChoiceCtrlEntry*,
- // TRUE == bei Single-Selection die Sel. mitfuehren
- BOOL bSyncSingleSelection = TRUE,
- BOOL bShowFocusAsync = FALSE );
+ // sal_True == bei Single-Selection die Sel. mitfuehren
+ sal_Bool bSyncSingleSelection = sal_True,
+ sal_Bool bShowFocusAsync = sal_False );
- SvxIconChoiceCtrlEntry* GetEntry( const Point& rDocPos, BOOL bHit = FALSE );
+ SvxIconChoiceCtrlEntry* GetEntry( const Point& rDocPos, sal_Bool bHit = sal_False );
SvxIconChoiceCtrlEntry* GetNextEntry( const Point& rDocPos, SvxIconChoiceCtrlEntry* pCurEntry );
SvxIconChoiceCtrlEntry* GetPrevEntry( const Point& rDocPos, SvxIconChoiceCtrlEntry* pCurEntry );
Point GetEntryPos( SvxIconChoiceCtrlEntry* );
- void MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, BOOL bBound = TRUE );
+ void MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bBound = sal_True );
- void Arrange(BOOL bKeepPredecessors = FALSE, long nSetMaxVirtWidth =0, long nSetMaxVirtHeight =0 );
+ void Arrange(sal_Bool bKeepPredecessors = sal_False, long nSetMaxVirtWidth =0, long nSetMaxVirtHeight =0 );
Rectangle CalcFocusRect( SvxIconChoiceCtrlEntry* );
Rectangle CalcBmpRect( SvxIconChoiceCtrlEntry*, const Point* pPos = 0 );
Rectangle CalcTextRect(
SvxIconChoiceCtrlEntry*,
const Point* pPos = 0,
- BOOL bForInplaceEdit = FALSE,
+ sal_Bool bForInplaceEdit = sal_False,
const String* pStr = 0 );
long CalcBoundingWidth( SvxIconChoiceCtrlEntry* ) const;
@@ -405,44 +405,44 @@ public:
void RecalcAllBoundingRectsSmart();
const Rectangle& GetEntryBoundRect( SvxIconChoiceCtrlEntry* );
void InvalidateBoundingRect( SvxIconChoiceCtrlEntry* );
- void InvalidateBoundingRect( Rectangle& rRect ) { rRect.Right() = LONG_MAX; bBoundRectsDirty = TRUE; }
- BOOL IsBoundingRectValid( const Rectangle& rRect ) const { return (BOOL)( rRect.Right() != LONG_MAX ); }
+ void InvalidateBoundingRect( Rectangle& rRect ) { rRect.Right() = LONG_MAX; bBoundRectsDirty = sal_True; }
+ sal_Bool IsBoundingRectValid( const Rectangle& rRect ) const { return (sal_Bool)( rRect.Right() != LONG_MAX ); }
void PaintEmphasis(
const Rectangle& rRect1,
const Rectangle& rRect2,
- BOOL bSelected,
- BOOL bDropTarget,
- BOOL bCursored,
+ sal_Bool bSelected,
+ sal_Bool bDropTarget,
+ sal_Bool bCursored,
OutputDevice* pOut,
- BOOL bIsBackgroundPainted = FALSE);
+ sal_Bool bIsBackgroundPainted = sal_False);
void PaintItem(
const Rectangle& rRect,
IcnViewFieldType eItem,
SvxIconChoiceCtrlEntry* pEntry,
- USHORT nPaintFlags,
+ sal_uInt16 nPaintFlags,
OutputDevice* pOut,
const String* pStr = 0,
::vcl::ControlLayoutData* _pLayoutData = NULL );
- // berechnet alle BoundingRects neu, wenn bMustRecalcBoundingRects == TRUE
+ // berechnet alle BoundingRects neu, wenn bMustRecalcBoundingRects == sal_True
void CheckBoundingRects() { if (bBoundRectsDirty) RecalcAllBoundingRectsSmart(); }
// berechnet alle invalidierten BoundingRects neu
void UpdateBoundingRects();
- void ShowTargetEmphasis( SvxIconChoiceCtrlEntry* pEntry, BOOL bShow );
+ void ShowTargetEmphasis( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bShow );
void PrepareCommandEvent( const CommandEvent& );
void Command( const CommandEvent& rCEvt );
void ToTop( SvxIconChoiceCtrlEntry* );
- ULONG GetSelectionCount() const;
+ sal_uLong GetSelectionCount() const;
void SetGrid( const Size& );
Size GetMinGrid() const;
- ULONG GetGridCount(
+ sal_uLong GetGridCount(
const Size& rSize,
- BOOL bCheckScrBars,
- BOOL bSmartScrBar ) const;
- void Scroll( long nDeltaX, long nDeltaY, BOOL bScrollBar = FALSE );
+ sal_Bool bCheckScrBars,
+ sal_Bool bSmartScrBar ) const;
+ void Scroll( long nDeltaX, long nDeltaY, sal_Bool bScrollBar = sal_False );
const Size& GetItemSize( SvxIconChoiceCtrlEntry*, IcnViewFieldType ) const;
void HideDDIcon();
@@ -451,67 +451,67 @@ public:
SvxIconChoiceCtrlEntry* pRefEntry,
const Point& rPos );
- BOOL IsOver(
+ sal_Bool IsOver(
SvPtrarr* pSelectedRectList,
const Rectangle& rEntryBoundRect ) const;
void SelectRect(
const Rectangle&,
- BOOL bAdd = TRUE,
+ sal_Bool bAdd = sal_True,
SvPtrarr* pOtherRects = 0 );
void CalcScrollOffsets(
const Point& rRefPosPixel,
long& rX,
long& rY,
- BOOL bDragDrop = FALSE,
- USHORT nBorderWidth = 10 );
+ sal_Bool bDragDrop = sal_False,
+ sal_uInt16 nBorderWidth = 10 );
- BOOL IsTextHit( SvxIconChoiceCtrlEntry* pEntry, const Point& rDocPos );
+ sal_Bool IsTextHit( SvxIconChoiceCtrlEntry* pEntry, const Point& rDocPos );
void MakeVisible(
const Rectangle& rDocPos,
- BOOL bInScrollBarEvent=FALSE,
- BOOL bCallRectChangedHdl = TRUE );
+ sal_Bool bInScrollBarEvent=sal_False,
+ sal_Bool bCallRectChangedHdl = sal_True );
void AdjustEntryAtGrid( SvxIconChoiceCtrlEntry* pStart = 0 );
void SetEntryTextMode( SvxIconChoiceCtrlTextMode, SvxIconChoiceCtrlEntry* pEntry = 0 );
SvxIconChoiceCtrlTextMode GetTextMode( const SvxIconChoiceCtrlEntry* pEntry = 0 ) const;
void ShowEntryFocusRect( const SvxIconChoiceCtrlEntry* pEntry );
- void EnableEntryEditing( BOOL bEnable ) { bEntryEditingEnabled = bEnable; }
- BOOL IsEntryEditingEnabled() const { return bEntryEditingEnabled; }
- BOOL IsEntryEditing() const { return (BOOL)(pCurEditedEntry!=0); }
+ void EnableEntryEditing( sal_Bool bEnable ) { bEntryEditingEnabled = bEnable; }
+ sal_Bool IsEntryEditingEnabled() const { return bEntryEditingEnabled; }
+ sal_Bool IsEntryEditing() const { return (sal_Bool)(pCurEditedEntry!=0); }
void EditEntry( SvxIconChoiceCtrlEntry* pEntry );
- void StopEntryEditing( BOOL bCancel );
- void LockEntryPos( SvxIconChoiceCtrlEntry* pEntry, BOOL bLock );
- ULONG GetEntryCount() const { return aEntries.Count(); }
- SvxIconChoiceCtrlEntry* GetEntry( ULONG nPos ) const { return (SvxIconChoiceCtrlEntry*)aEntries.GetObject(nPos); }
- SvxIconChoiceCtrlEntry* GetFirstSelectedEntry( ULONG& ) const;
- SvxIconChoiceCtrlEntry* GetNextSelectedEntry( ULONG& ) const;
+ void StopEntryEditing( sal_Bool bCancel );
+ void LockEntryPos( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bLock );
+ sal_uLong GetEntryCount() const { return aEntries.Count(); }
+ SvxIconChoiceCtrlEntry* GetEntry( sal_uLong nPos ) const { return (SvxIconChoiceCtrlEntry*)aEntries.GetObject(nPos); }
+ SvxIconChoiceCtrlEntry* GetFirstSelectedEntry( sal_uLong& ) const;
+ SvxIconChoiceCtrlEntry* GetNextSelectedEntry( sal_uLong& ) const;
SvxIconChoiceCtrlEntry* GetHdlEntry() const { return pHdlEntry; }
void SetHdlEntry( SvxIconChoiceCtrlEntry* pEntry ) { pHdlEntry = pEntry; }
SvxIconChoiceCtrlTextMode GetEntryTextModeSmart( const SvxIconChoiceCtrlEntry* pEntry ) const;
void SetSelectionMode( SelectionMode eMode ) { eSelectionMode=eMode; }
SelectionMode GetSelectionMode() const { return eSelectionMode; }
- BOOL AreEntriesMoved() const { return (BOOL)((nFlags & F_MOVED_ENTRIES)!=0); }
- void SetEntriesMoved( BOOL bMoved )
+ sal_Bool AreEntriesMoved() const { return (sal_Bool)((nFlags & F_MOVED_ENTRIES)!=0); }
+ void SetEntriesMoved( sal_Bool bMoved )
{
if( bMoved ) nFlags |= F_MOVED_ENTRIES;
else nFlags &= ~(F_MOVED_ENTRIES);
}
- ULONG GetEntryListPos( SvxIconChoiceCtrlEntry* ) const;
- void SetEntryListPos( SvxIconChoiceCtrlEntry* pEntry, ULONG nNewPos );
+ sal_uLong GetEntryListPos( SvxIconChoiceCtrlEntry* ) const;
+ void SetEntryListPos( SvxIconChoiceCtrlEntry* pEntry, sal_uLong nNewPos );
void SetEntryImageSize( const Size& rSize ) { aImageSize = rSize; }
- void SetEntryFlags( SvxIconChoiceCtrlEntry* pEntry, USHORT nFlags );
- SvxIconChoiceCtrlEntry* GoLeftRight( SvxIconChoiceCtrlEntry*, BOOL bRight );
- SvxIconChoiceCtrlEntry* GoUpDown( SvxIconChoiceCtrlEntry*, BOOL bDown );
+ void SetEntryFlags( SvxIconChoiceCtrlEntry* pEntry, sal_uInt16 nFlags );
+ SvxIconChoiceCtrlEntry* GoLeftRight( SvxIconChoiceCtrlEntry*, sal_Bool bRight );
+ SvxIconChoiceCtrlEntry* GoUpDown( SvxIconChoiceCtrlEntry*, sal_Bool bDown );
void InitSettings();
Rectangle GetOutputRect() const;
- BOOL ArePredecessorsSet() const { return (BOOL)(pHead != 0); }
+ sal_Bool ArePredecessorsSet() const { return (sal_Bool)(pHead != 0); }
SvxIconChoiceCtrlEntry* GetPredecessorHead() const { return pHead; }
void SetEntryPredecessor(SvxIconChoiceCtrlEntry* pEntry,SvxIconChoiceCtrlEntry* pPredecessor);
- BOOL GetEntryPredecessor(SvxIconChoiceCtrlEntry* pEntry,SvxIconChoiceCtrlEntry** ppPredecessor);
+ sal_Bool GetEntryPredecessor(SvxIconChoiceCtrlEntry* pEntry,SvxIconChoiceCtrlEntry** ppPredecessor);
// liefert gueltige Ergebnisse nur im AutoArrange-Modus!
SvxIconChoiceCtrlEntry* FindEntryPredecessor( SvxIconChoiceCtrlEntry* pEntry, const Point& );
@@ -519,24 +519,24 @@ public:
SvxIconChoiceCtrlPositionMode GetPositionMode() const { return ePositionMode;}
void Flush();
- void SetColumn( USHORT nIndex, const SvxIconChoiceCtrlColumnInfo& );
- const SvxIconChoiceCtrlColumnInfo* GetColumn( USHORT nIndex ) const;
- const SvxIconChoiceCtrlColumnInfo* GetItemColumn( USHORT nSubItem, long& rLeft ) const;
+ void SetColumn( sal_uInt16 nIndex, const SvxIconChoiceCtrlColumnInfo& );
+ const SvxIconChoiceCtrlColumnInfo* GetColumn( sal_uInt16 nIndex ) const;
+ const SvxIconChoiceCtrlColumnInfo* GetItemColumn( sal_uInt16 nSubItem, long& rLeft ) const;
Rectangle GetDocumentRect() const { return Rectangle( Point(), aVirtOutputSize ); }
Rectangle GetVisibleRect() const { return GetOutputRect(); }
- void SetEntryHighlightFrame( SvxIconChoiceCtrlEntry* pEntry,BOOL bKeepHighlightFlags=FALSE );
+ void SetEntryHighlightFrame( SvxIconChoiceCtrlEntry* pEntry,sal_Bool bKeepHighlightFlags=sal_False );
void HideEntryHighlightFrame();
void DrawHighlightFrame( OutputDevice* pOut,
- const Rectangle& rBmpRect, BOOL bHide );
+ const Rectangle& rBmpRect, sal_Bool bHide );
void StopSelectTimer() { aCallSelectHdlTimer.Stop(); }
void Tracking( const TrackingEvent& rTEvt );
Point GetPopupMenuPosPixel() const;
- BOOL HandleShortCutKey( const KeyEvent& rKeyEvent );
+ sal_Bool HandleShortCutKey( const KeyEvent& rKeyEvent );
- void CallEventListeners( ULONG nEvent, void* pData = NULL );
+ void CallEventListeners( sal_uLong nEvent, void* pData = NULL );
inline ::svt::IAccessibleFactory&
GetAccessibleFactory() { return aAccFactory.getFactory(); }
@@ -558,12 +558,12 @@ class IcnCursor_Impl
void ImplCreate();
void Create() { if( !pColumns ) ImplCreate(); }
- USHORT GetSortListPos( SvPtrarr* pList, long nValue, int bVertical);
- SvxIconChoiceCtrlEntry* SearchCol(USHORT nCol,USHORT nTop,USHORT nBottom,USHORT nPref,
- BOOL bDown, BOOL bSimple );
+ sal_uInt16 GetSortListPos( SvPtrarr* pList, long nValue, int bVertical);
+ SvxIconChoiceCtrlEntry* SearchCol(sal_uInt16 nCol,sal_uInt16 nTop,sal_uInt16 nBottom,sal_uInt16 nPref,
+ sal_Bool bDown, sal_Bool bSimple );
- SvxIconChoiceCtrlEntry* SearchRow(USHORT nRow,USHORT nRight,USHORT nLeft,USHORT nPref,
- BOOL bRight, BOOL bSimple );
+ SvxIconChoiceCtrlEntry* SearchRow(sal_uInt16 nRow,sal_uInt16 nRight,sal_uInt16 nLeft,sal_uInt16 nPref,
+ sal_Bool bRight, sal_Bool bSimple );
public:
IcnCursor_Impl( SvxIconChoiceCtrl_Impl* pOwner );
@@ -571,9 +571,9 @@ public:
void Clear();
// fuer Cursortravelling usw.
- SvxIconChoiceCtrlEntry* GoLeftRight( SvxIconChoiceCtrlEntry*, BOOL bRight );
- SvxIconChoiceCtrlEntry* GoUpDown( SvxIconChoiceCtrlEntry*, BOOL bDown );
- SvxIconChoiceCtrlEntry* GoPageUpDown( SvxIconChoiceCtrlEntry*, BOOL bDown );
+ SvxIconChoiceCtrlEntry* GoLeftRight( SvxIconChoiceCtrlEntry*, sal_Bool bRight );
+ SvxIconChoiceCtrlEntry* GoUpDown( SvxIconChoiceCtrlEntry*, sal_Bool bDown );
+ SvxIconChoiceCtrlEntry* GoPageUpDown( SvxIconChoiceCtrlEntry*, sal_Bool bDown );
// Erzeugt fuer jede Zeile (Hoehe=nGridDY) eine nach BoundRect.Left()
// sortierte Liste der Eintraege, die in ihr stehen. Eine Liste kann
@@ -585,7 +585,7 @@ public:
// ----------------------------------------------------------------------------------------------
-typedef ULONG GridId;
+typedef sal_uLong GridId;
#define GRID_NOT_FOUND ((GridId)ULONG_MAX)
@@ -593,14 +593,14 @@ class IcnGridMap_Impl
{
Rectangle _aLastOccupiedGrid;
SvxIconChoiceCtrl_Impl* _pView;
- BOOL* _pGridMap;
- USHORT _nGridCols, _nGridRows;
+ sal_Bool* _pGridMap;
+ sal_uInt16 _nGridCols, _nGridRows;
void Expand();
void Create_Impl();
void Create() { if(!_pGridMap) Create_Impl(); }
- void GetMinMapSize( USHORT& rDX, USHORT& rDY ) const;
+ void GetMinMapSize( sal_uInt16& rDX, sal_uInt16& rDY ) const;
public:
IcnGridMap_Impl(SvxIconChoiceCtrl_Impl* pView);
@@ -608,22 +608,22 @@ public:
void Clear();
- GridId GetGrid( const Point& rDocPos, BOOL* pbClipped = 0 );
- GridId GetGrid( USHORT nGridX, USHORT nGridY );
- GridId GetUnoccupiedGrid( BOOL bOccupyFound=TRUE );
+ GridId GetGrid( const Point& rDocPos, sal_Bool* pbClipped = 0 );
+ GridId GetGrid( sal_uInt16 nGridX, sal_uInt16 nGridY );
+ GridId GetUnoccupiedGrid( sal_Bool bOccupyFound=sal_True );
- void OccupyGrids( const Rectangle&, BOOL bOccupy = TRUE );
- void OccupyGrids( const SvxIconChoiceCtrlEntry*, BOOL bOccupy = TRUE );
- void OccupyGrid( GridId nId, BOOL bOccupy = TRUE )
+ void OccupyGrids( const Rectangle&, sal_Bool bOccupy = sal_True );
+ void OccupyGrids( const SvxIconChoiceCtrlEntry*, sal_Bool bOccupy = sal_True );
+ void OccupyGrid( GridId nId, sal_Bool bOccupy = sal_True )
{
- DBG_ASSERT(!_pGridMap || nId<(ULONG)(_nGridCols*_nGridRows),"OccupyGrid: Bad GridId");
- if(_pGridMap && nId < (ULONG)(_nGridCols *_nGridRows) )
+ DBG_ASSERT(!_pGridMap || nId<(sal_uLong)(_nGridCols*_nGridRows),"OccupyGrid: Bad GridId");
+ if(_pGridMap && nId < (sal_uLong)(_nGridCols *_nGridRows) )
_pGridMap[ nId ] = bOccupy;
}
Rectangle GetGridRect( GridId );
- void GetGridCoord( GridId, USHORT& rGridX, USHORT& rGridY );
- static ULONG GetGridCount( const Size& rSizePixel, USHORT nGridWidth, USHORT nGridHeight );
+ void GetGridCoord( GridId, sal_uInt16& rGridX, sal_uInt16& rGridY );
+ static sal_uLong GetGridCount( const Size& rSizePixel, sal_uInt16 nGridWidth, sal_uInt16 nGridHeight );
void OutputSizeChanged();
};
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index ff7c42e9309a..3963ce48c255 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -68,7 +68,7 @@ struct SvxIconChoiceCtrlEntry_Impl
: _pEntry( pEntry), _aPos( rBoundRect.TopLeft()) {}
};
-static BOOL bEndScrollInvalidate = TRUE;
+static sal_Bool bEndScrollInvalidate = sal_True;
// ----------------------------------------------------------------------------------------------
@@ -78,9 +78,9 @@ class IcnViewEdit_Impl : public MultiLineEdit
Accelerator aAccReturn;
Accelerator aAccEscape;
Timer aTimer;
- BOOL bCanceled;
- BOOL bAlreadyInCallback;
- BOOL bGrabFocus;
+ sal_Bool bCanceled;
+ sal_Bool bAlreadyInCallback;
+ sal_Bool bGrabFocus;
void CallCallBackHdl_Impl();
DECL_LINK( Timeout_Impl, Timer * );
@@ -99,9 +99,9 @@ public:
~IcnViewEdit_Impl();
virtual void KeyInput( const KeyEvent& rKEvt );
virtual long PreNotify( NotifyEvent& rNEvt );
- BOOL EditingCanceled() const { return bCanceled; }
- void StopEditing( BOOL bCancel = FALSE );
- BOOL IsGrabFocus() const { return bGrabFocus; }
+ sal_Bool EditingCanceled() const { return bCanceled; }
+ void StopEditing( sal_Bool bCancel = sal_False );
+ sal_Bool IsGrabFocus() const { return bGrabFocus; }
};
// ----------------------------------------------------------------------------------------------
@@ -117,7 +117,7 @@ SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl( SvtIconChoiceCtrl* pCurView,
aImageSize( 32, 32 ),
pColumns( 0 )
{
- bChooseWithCursor=FALSE;
+ bChooseWithCursor=sal_False;
pEntryPaintDev = 0;
pCurEditedEntry = 0;
pCurHighlightFrame = 0;
@@ -128,10 +128,10 @@ SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl( SvtIconChoiceCtrl* pCurView,
pHdlEntry = 0;
pHead = NULL;
pCursor = NULL;
- bUpdateMode = TRUE;
- bEntryEditingEnabled = FALSE;
- bInDragDrop = FALSE;
- bHighlightFramePressed = FALSE;
+ bUpdateMode = sal_True;
+ bEntryEditingEnabled = sal_False;
+ bInDragDrop = sal_False;
+ bHighlightFramePressed = sal_False;
eSelectionMode = MULTIPLE_SELECTION;
pView = pCurView;
pZOrderList = new List; //SvPtrarr;
@@ -171,7 +171,7 @@ SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl( SvtIconChoiceCtrl* pCurView,
aVisRectChangedTimer.SetTimeout( 50 );
aVisRectChangedTimer.SetTimeoutHdl(LINK(this,SvxIconChoiceCtrl_Impl,VisRectChangedHdl));
- Clear( TRUE );
+ Clear( sal_True );
SetGrid( Size(100, 70) );
}
@@ -195,17 +195,17 @@ SvxIconChoiceCtrl_Impl::~SvxIconChoiceCtrl_Impl()
ClearColumnList();
}
-void SvxIconChoiceCtrl_Impl::Clear( BOOL bInCtor )
+void SvxIconChoiceCtrl_Impl::Clear( sal_Bool bInCtor )
{
- StopEntryEditing( TRUE );
+ StopEntryEditing( sal_True );
nSelectionCount = 0;
DELETEZ(pDraggedSelection);
- bInDragDrop = FALSE;
+ bInDragDrop = sal_False;
pCurHighlightFrame = 0;
StopEditTimer();
CancelUserEvents();
- ShowCursor( FALSE );
- bBoundRectsDirty = FALSE;
+ ShowCursor( sal_False );
+ bBoundRectsDirty = sal_False;
nMaxBoundHeight = 0;
nFlags &= ~(F_PAINTED | F_MOVED_ENTRIES);
@@ -229,8 +229,8 @@ void SvxIconChoiceCtrl_Impl::Clear( BOOL bInCtor )
pView->Invalidate(INVALIDATE_NOCHILDREN);
}
AdjustScrollBars();
- ULONG nCount = aEntries.Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ sal_uLong nCount = aEntries.Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pCur = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur );
delete pCur;
@@ -259,19 +259,19 @@ void SvxIconChoiceCtrl_Impl::SetStyle( WinBits nWinStyle )
IMPL_LINK( SvxIconChoiceCtrl_Impl, ScrollUpDownHdl, ScrollBar*, pScrollBar )
{
- StopEntryEditing( TRUE );
+ StopEntryEditing( sal_True );
// Pfeil hoch: delta=-1; Pfeil runter: delta=+1
- Scroll( 0, pScrollBar->GetDelta(), TRUE );
- bEndScrollInvalidate = TRUE;
+ Scroll( 0, pScrollBar->GetDelta(), sal_True );
+ bEndScrollInvalidate = sal_True;
return 0;
}
IMPL_LINK( SvxIconChoiceCtrl_Impl, ScrollLeftRightHdl, ScrollBar*, pScrollBar )
{
- StopEntryEditing( TRUE );
+ StopEntryEditing( sal_True );
// Pfeil links: delta=-1; Pfeil rechts: delta=+1
- Scroll( pScrollBar->GetDelta(), 0, TRUE );
- bEndScrollInvalidate = TRUE;
+ Scroll( pScrollBar->GetDelta(), 0, sal_True );
+ bEndScrollInvalidate = sal_True;
return 0;
}
@@ -293,11 +293,11 @@ void SvxIconChoiceCtrl_Impl::FontModified()
DELETEZ(pDDTempDev);
DELETEZ(pEntryPaintDev);
SetDefaultTextSize();
- ShowCursor( FALSE );
- ShowCursor( TRUE );
+ ShowCursor( sal_False );
+ ShowCursor( sal_True );
}
-void SvxIconChoiceCtrl_Impl::InsertEntry( SvxIconChoiceCtrlEntry* pEntry, ULONG nPos,
+void SvxIconChoiceCtrl_Impl::InsertEntry( SvxIconChoiceCtrlEntry* pEntry, sal_uLong nPos,
const Point* pPos )
{
StopEditTimer();
@@ -314,13 +314,13 @@ void SvxIconChoiceCtrl_Impl::InsertEntry( SvxIconChoiceCtrlEntry* pEntry, ULONG
{
Size aSize( CalcBoundingSize( pEntry ) );
SetBoundingRect_Impl( pEntry, *pPos, aSize );
- SetEntryPos( pEntry, *pPos, FALSE, TRUE, TRUE /*keep grid map*/ );
+ SetEntryPos( pEntry, *pPos, sal_False, sal_True, sal_True /*keep grid map*/ );
pEntry->nFlags |= ICNVIEW_FLAG_POS_MOVED;
- SetEntriesMoved( TRUE );
+ SetEntriesMoved( sal_True );
}
else
{
- // wenn der UpdateMode TRUE ist, wollen wir nicht pauschal alle
+ // wenn der UpdateMode sal_True ist, wollen wir nicht pauschal alle
// BoundRects auf 'zu ueberpruefen' setzen, sondern nur das des
// neuen Eintrags. Deshalb kein InvalidateBoundingRect aufrufen!
pEntry->aRect.Right() = LONG_MAX;
@@ -347,8 +347,8 @@ void SvxIconChoiceCtrl_Impl::CreateAutoMnemonics( MnemonicGenerator* _pGenerator
pAutoDeleteOwnGenerator.reset( _pGenerator );
}
- ULONG nEntryCount = GetEntryCount();
- ULONG i;
+ sal_uLong nEntryCount = GetEntryCount();
+ sal_uLong i;
// insert texts in generator
for( i = 0; i < nEntryCount; ++i )
@@ -381,8 +381,8 @@ void SvxIconChoiceCtrl_Impl::SetListPositions()
if( nFlags & F_ENTRYLISTPOS_VALID )
return;
- ULONG nCount = aEntries.Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ sal_uLong nCount = aEntries.Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur );
pEntry->nPos = nCur;
@@ -392,14 +392,14 @@ void SvxIconChoiceCtrl_Impl::SetListPositions()
void SvxIconChoiceCtrl_Impl::RemoveEntry( SvxIconChoiceCtrlEntry* pEntry )
{
- BOOL bSyncSingleSelection;
+ sal_Bool bSyncSingleSelection;
// bei Single-Selection wird die Selektion beim Umsetzen des Cursors
// mitgefuehrt. Das soll aber nur erfolgen, wenn ueberhaupt ein
// Eintrag selektiert ist.
if( GetSelectionCount() )
- bSyncSingleSelection = TRUE;
+ bSyncSingleSelection = sal_True;
else
- bSyncSingleSelection = FALSE;
+ bSyncSingleSelection = sal_False;
if( pEntry == pCurHighlightFrame )
pCurHighlightFrame = 0;
@@ -407,7 +407,7 @@ void SvxIconChoiceCtrl_Impl::RemoveEntry( SvxIconChoiceCtrlEntry* pEntry )
if( bInDragDrop )
{
DELETEZ(pDraggedSelection);
- bInDragDrop = FALSE;
+ bInDragDrop = sal_False;
}
if( pEntry->IsSelected() )
@@ -424,25 +424,25 @@ void SvxIconChoiceCtrl_Impl::RemoveEntry( SvxIconChoiceCtrlEntry* pEntry )
pAnchor = 0;
if( pEntry->IsSelected() )
nSelectionCount--;
- BOOL bEntryBoundValid = IsBoundingRectValid( pEntry->aRect );
+ sal_Bool bEntryBoundValid = IsBoundingRectValid( pEntry->aRect );
if( bEntryBoundValid )
pView->Invalidate( pEntry->aRect );
- BOOL bSetNewCursor = FALSE;
+ sal_Bool bSetNewCursor = sal_False;
SvxIconChoiceCtrlEntry* pNewCursor = NULL;
if( pEntry == pCursor )
{
- bSetNewCursor = TRUE;
+ bSetNewCursor = sal_True;
pNewCursor = FindNewCursor();
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
pCursor = 0;
}
- BOOL bCurEntryPosValid = (nFlags & F_ENTRYLISTPOS_VALID) ? TRUE : FALSE;
+ sal_Bool bCurEntryPosValid = (nFlags & F_ENTRYLISTPOS_VALID) ? sal_True : sal_False;
if( bCurEntryPosValid && aEntries.GetObject(aEntries.Count()-1) != pEntry )
nFlags &= ~F_ENTRYLISTPOS_VALID;
- ULONG nPos = pZOrderList->GetPos( (void*)pEntry );
+ sal_uLong nPos = pZOrderList->GetPos( (void*)pEntry );
pZOrderList->Remove( nPos );
if( bCurEntryPosValid )
{
@@ -460,12 +460,12 @@ void SvxIconChoiceCtrl_Impl::RemoveEntry( SvxIconChoiceCtrlEntry* pEntry )
{
// Fokusrechteck asynchron einblenden, um das Loeschen einer
// Multiselektion zu beschleunigen.
- SetCursor( pNewCursor, bSyncSingleSelection, TRUE );
+ SetCursor( pNewCursor, bSyncSingleSelection, sal_True );
}
}
-void SvxIconChoiceCtrl_Impl::SelectEntry( SvxIconChoiceCtrlEntry* pEntry, BOOL bSelect,
- BOOL bCallHdl, BOOL bAdd, BOOL bSyncPaint )
+void SvxIconChoiceCtrl_Impl::SelectEntry( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bSelect,
+ sal_Bool bCallHdl, sal_Bool bAdd, sal_Bool bSyncPaint )
{
if( eSelectionMode == NO_SELECTION )
return;
@@ -482,7 +482,7 @@ void SvxIconChoiceCtrl_Impl::SelectEntry( SvxIconChoiceCtrlEntry* pEntry, BOOL b
if( pEntry->IsSelected() != bSelect )
{
pHdlEntry = pEntry;
- USHORT nEntryFlags = pEntry->GetFlags();
+ sal_uInt16 nEntryFlags = pEntry->GetFlags();
if( bSelect )
{
nEntryFlags |= ICNVIEW_FLAG_SELECTED;
@@ -503,8 +503,8 @@ void SvxIconChoiceCtrl_Impl::SelectEntry( SvxIconChoiceCtrlEntry* pEntry, BOOL b
}
}
-void SvxIconChoiceCtrl_Impl::EntrySelected( SvxIconChoiceCtrlEntry* pEntry, BOOL bSelect,
- BOOL bSyncPaint )
+void SvxIconChoiceCtrl_Impl::EntrySelected( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bSelect,
+ sal_Bool bSyncPaint )
{
// bei SingleSelection dafuer sorgen, dass der Cursor immer
// auf dem (einzigen) selektierten Eintrag steht. Aber nur,
@@ -524,7 +524,7 @@ void SvxIconChoiceCtrl_Impl::EntrySelected( SvxIconChoiceCtrlEntry* pEntry, BOOL
if( bUpdateMode )
{
if( pEntry == pCursor )
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
if( pView->IsTracking() && (bSelect || !pView->HasBackground()) ) // beim Tracken immer synchron
PaintEntry( pEntry );
else if( bSyncPaint ) // synchron & mit virtuellem OutDev!
@@ -534,7 +534,7 @@ void SvxIconChoiceCtrl_Impl::EntrySelected( SvxIconChoiceCtrlEntry* pEntry, BOOL
pView->Invalidate( CalcFocusRect( pEntry ) );
}
if( pEntry == pCursor )
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
} // if( bUpdateMode )
// --> OD 2009-05-27 #i101012#
@@ -551,9 +551,9 @@ void SvxIconChoiceCtrl_Impl::ResetVirtSize()
StopEditTimer();
aVirtOutputSize.Width() = 0;
aVirtOutputSize.Height() = 0;
- BOOL bLockedEntryFound = FALSE;
- const ULONG nCount = aEntries.Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ sal_Bool bLockedEntryFound = sal_False;
+ const sal_uLong nCount = aEntries.Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pCur = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur );
pCur->ClearFlags( ICNVIEW_FLAG_POS_MOVED );
@@ -564,7 +564,7 @@ void SvxIconChoiceCtrl_Impl::ResetVirtSize()
FindBoundingRect( pCur );
else
AdjustVirtSize( pCur->aRect );
- bLockedEntryFound = TRUE;
+ bLockedEntryFound = sal_True;
}
else
InvalidateBoundingRect( pCur->aRect );
@@ -576,8 +576,8 @@ void SvxIconChoiceCtrl_Impl::ResetVirtSize()
if( aVirtOutputSize.Width() < aRealOutputSize.Width() ||
aVirtOutputSize.Height() < aRealOutputSize.Height() )
{
- ULONG nGridCount = IcnGridMap_Impl::GetGridCount(
- aRealOutputSize, (USHORT)nGridDX, (USHORT)nGridDY );
+ sal_uLong nGridCount = IcnGridMap_Impl::GetGridCount(
+ aRealOutputSize, (sal_uInt16)nGridDX, (sal_uInt16)nGridDY );
if( nGridCount < nCount )
{
if( nWinBits & WB_ALIGN_TOP )
@@ -625,11 +625,11 @@ void SvxIconChoiceCtrl_Impl::AdjustVirtSize( const Rectangle& rRect )
void SvxIconChoiceCtrl_Impl::InitPredecessors()
{
DBG_ASSERT(!pHead,"SvxIconChoiceCtrl_Impl::InitPredecessors() >> Already initialized");
- ULONG nCount = aEntries.Count();
+ sal_uLong nCount = aEntries.Count();
if( nCount )
{
SvxIconChoiceCtrlEntry* pPrev = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( 0 );
- for( ULONG nCur = 1; nCur <= nCount; nCur++ )
+ for( sal_uLong nCur = 1; nCur <= nCount; nCur++ )
{
pPrev->ClearFlags( ICNVIEW_FLAG_POS_LOCKED | ICNVIEW_FLAG_POS_MOVED |
ICNVIEW_FLAG_PRED_SET);
@@ -654,8 +654,8 @@ void SvxIconChoiceCtrl_Impl::ClearPredecessors()
{
if( pHead )
{
- ULONG nCount = aEntries.Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ sal_uLong nCount = aEntries.Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pCur = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur );
pCur->pflink = 0;
@@ -666,7 +666,7 @@ void SvxIconChoiceCtrl_Impl::ClearPredecessors()
}
}
-void SvxIconChoiceCtrl_Impl::Arrange( BOOL bKeepPredecessors, long nSetMaxVirtWidth, long nSetMaxVirtHeight )
+void SvxIconChoiceCtrl_Impl::Arrange( sal_Bool bKeepPredecessors, long nSetMaxVirtWidth, long nSetMaxVirtHeight )
{
if ( nSetMaxVirtWidth != 0 )
nMaxVirtWidth = nSetMaxVirtWidth;
@@ -681,23 +681,23 @@ void SvxIconChoiceCtrl_Impl::Arrange( BOOL bKeepPredecessors, long nSetMaxVirtWi
ImpArrange( bKeepPredecessors );
}
-void SvxIconChoiceCtrl_Impl::ImpArrange( BOOL bKeepPredecessors )
+void SvxIconChoiceCtrl_Impl::ImpArrange( sal_Bool bKeepPredecessors )
{
static Point aEmptyPoint;
- BOOL bOldUpdate = bUpdateMode;
+ sal_Bool bOldUpdate = bUpdateMode;
Rectangle aCurOutputArea( GetOutputRect() );
if( (nWinBits & WB_SMART_ARRANGE) && aCurOutputArea.TopLeft() != aEmptyPoint )
- bUpdateMode = FALSE;
+ bUpdateMode = sal_False;
aAutoArrangeTimer.Stop();
nFlags &= ~F_MOVED_ENTRIES;
nFlags |= F_ARRANGING;
StopEditTimer();
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
ResetVirtSize();
if( !bKeepPredecessors )
ClearPredecessors();
- bBoundRectsDirty = FALSE;
+ bBoundRectsDirty = sal_False;
SetOrigin( Point() );
VisRectChanged();
RecalcAllBoundingRectsSmart();
@@ -710,12 +710,12 @@ void SvxIconChoiceCtrl_Impl::ImpArrange( BOOL bKeepPredecessors )
MakeVisible( aCurOutputArea );
SetUpdateMode( bOldUpdate );
}
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
void SvxIconChoiceCtrl_Impl::Paint( const Rectangle& rRect )
{
- bEndScrollInvalidate = FALSE;
+ bEndScrollInvalidate = sal_False;
#if defined(OV_DRAWGRID)
Color aOldColor ( pView->GetLineColor() );
@@ -764,14 +764,14 @@ void SvxIconChoiceCtrl_Impl::Paint( const Rectangle& rRect )
if( !pCursor )
{
// set cursor to item with focus-flag
- BOOL bfound = FALSE;
- for ( ULONG i = 0; i < pView->GetEntryCount() && !bfound; i++)
+ sal_Bool bfound = sal_False;
+ for ( sal_uLong i = 0; i < pView->GetEntryCount() && !bfound; i++)
{
SvxIconChoiceCtrlEntry* pEntry = pView->GetEntry ( i );
if( pEntry->IsFocused() )
{
pCursor = pEntry;
- bfound=TRUE;
+ bfound=sal_True;
}
}
@@ -783,31 +783,31 @@ void SvxIconChoiceCtrl_Impl::Paint( const Rectangle& rRect )
if ( pView->HasFocus() )
GetFocus();
- ULONG nCount = pZOrderList->Count();
+ sal_uLong nCount = pZOrderList->Count();
if( !nCount )
return;
- BOOL bResetClipRegion = FALSE;
+ sal_Bool bResetClipRegion = sal_False;
if( !pView->IsClipRegion() )
{
Rectangle aOutputArea( GetOutputRect() );
- bResetClipRegion = TRUE;
+ bResetClipRegion = sal_True;
pView->SetClipRegion( aOutputArea );
}
- const USHORT nListInitSize = aEntries.Count() > USHRT_MAX ?
- USHRT_MAX : (USHORT)aEntries.Count();
+ const sal_uInt16 nListInitSize = aEntries.Count() > USHRT_MAX ?
+ USHRT_MAX : (sal_uInt16)aEntries.Count();
List* pNewZOrderList = new List( nListInitSize );
List* pPaintedEntries = new List( nListInitSize );
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
while( nCount )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)(pZOrderList->GetObject(nPos ));
const Rectangle& rBoundRect = GetEntryBoundRect( pEntry );
if( rRect.IsOver( rBoundRect ) )
{
- PaintEntry( pEntry, rBoundRect.TopLeft(), pView, TRUE );
+ PaintEntry( pEntry, rBoundRect.TopLeft(), pView, sal_True );
// Eintraege, die neu gezeichnet werden, auf Top setzen
pPaintedEntries->Insert( pEntry, LIST_APPEND );
}
@@ -822,7 +822,7 @@ void SvxIconChoiceCtrl_Impl::Paint( const Rectangle& rRect )
nCount = pPaintedEntries->Count();
if( nCount )
{
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
pZOrderList->Insert( pPaintedEntries->GetObject(nCur), LIST_APPEND);
}
delete pPaintedEntries;
@@ -831,20 +831,20 @@ void SvxIconChoiceCtrl_Impl::Paint( const Rectangle& rRect )
pView->SetClipRegion();
}
-void SvxIconChoiceCtrl_Impl::RepaintEntries( USHORT nEntryFlagsMask )
+void SvxIconChoiceCtrl_Impl::RepaintEntries( sal_uInt16 nEntryFlagsMask )
{
- const ULONG nCount = pZOrderList->Count();
+ const sal_uLong nCount = pZOrderList->Count();
if( !nCount )
return;
- BOOL bResetClipRegion = FALSE;
+ sal_Bool bResetClipRegion = sal_False;
Rectangle aOutRect( GetOutputRect() );
if( !pView->IsClipRegion() )
{
- bResetClipRegion = TRUE;
+ bResetClipRegion = sal_True;
pView->SetClipRegion( aOutRect );
}
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)(pZOrderList->GetObject(nCur));
if( pEntry->GetFlags() & nEntryFlagsMask )
@@ -880,28 +880,28 @@ IcnViewFieldType SvxIconChoiceCtrl_Impl::GetItem( SvxIconChoiceCtrlEntry* pEntry
return IcnViewFieldTypeDontknow;
}
-BOOL SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
+sal_Bool SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
{
- BOOL bHandled = TRUE;
- bHighlightFramePressed = FALSE;
+ sal_Bool bHandled = sal_True;
+ bHighlightFramePressed = sal_False;
StopEditTimer();
- BOOL bGotFocus = (BOOL)(!pView->HasFocus() && !(nWinBits & WB_NOPOINTERFOCUS));
+ sal_Bool bGotFocus = (sal_Bool)(!pView->HasFocus() && !(nWinBits & WB_NOPOINTERFOCUS));
if( !(nWinBits & WB_NOPOINTERFOCUS) )
pView->GrabFocus();
Point aDocPos( rMEvt.GetPosPixel() );
if(aDocPos.X()>=aOutputSize.Width() || aDocPos.Y()>=aOutputSize.Height())
- return FALSE;
+ return sal_False;
ToDocPos( aDocPos );
- SvxIconChoiceCtrlEntry* pEntry = GetEntry( aDocPos, TRUE );
+ SvxIconChoiceCtrlEntry* pEntry = GetEntry( aDocPos, sal_True );
if( pEntry )
- MakeEntryVisible( pEntry, FALSE );
+ MakeEntryVisible( pEntry, sal_False );
if( rMEvt.IsShift() && eSelectionMode != SINGLE_SELECTION )
{
if( pEntry )
- SetCursor_Impl( pCursor, pEntry, rMEvt.IsMod1(), rMEvt.IsShift(), TRUE);
- return TRUE;
+ SetCursor_Impl( pCursor, pEntry, rMEvt.IsMod1(), rMEvt.IsShift(), sal_True);
+ return sal_True;
}
if( pAnchor && (rMEvt.IsShift() || rMEvt.IsMod1())) // Tastaturselektion?
@@ -932,7 +932,7 @@ BOOL SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
if( !pEntry && !(nWinBits & WB_NODRAGSELECTION))
pView->StartTracking( STARTTRACK_SCROLLREPEAT );
- return TRUE;
+ return sal_True;
}
else
{
@@ -954,17 +954,17 @@ BOOL SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
pView->StartTracking( STARTTRACK_SCROLLREPEAT );
}
else
- bHandled = FALSE;
+ bHandled = sal_False;
return bHandled;
}
}
- BOOL bSelected = pEntry->IsSelected();
- BOOL bEditingEnabled = IsEntryEditingEnabled();
+ sal_Bool bSelected = pEntry->IsSelected();
+ sal_Bool bEditingEnabled = IsEntryEditingEnabled();
if( rMEvt.GetClicks() == 2 )
{
DeselectAllBut( pEntry );
- SelectEntry( pEntry, TRUE, TRUE, FALSE, TRUE );
+ SelectEntry( pEntry, sal_True, sal_True, sal_False, sal_True );
pHdlEntry = pEntry;
pView->ClickIcon();
}
@@ -995,8 +995,8 @@ BOOL SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
if( rMEvt.IsLeft() && (nWinBits & WB_HIGHLIGHTFRAME) )
{
pCurHighlightFrame = 0; // Neues painten des Frames erzwingen
- bHighlightFramePressed = TRUE;
- SetEntryHighlightFrame( pEntry, TRUE );
+ bHighlightFramePressed = sal_True;
+ SetEntryHighlightFrame( pEntry, sal_True );
}
}
else
@@ -1005,9 +1005,9 @@ BOOL SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
{
if( !bSelected )
{
- DeselectAllBut( pEntry, TRUE /* Synchron painten */ );
+ DeselectAllBut( pEntry, sal_True /* Synchron painten */ );
SetCursor( pEntry );
- SelectEntry( pEntry, TRUE, TRUE, FALSE, TRUE );
+ SelectEntry( pEntry, sal_True, sal_True, sal_False, sal_True );
}
else
{
@@ -1027,13 +1027,13 @@ BOOL SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
return bHandled;
}
-BOOL SvxIconChoiceCtrl_Impl::MouseButtonUp( const MouseEvent& rMEvt )
+sal_Bool SvxIconChoiceCtrl_Impl::MouseButtonUp( const MouseEvent& rMEvt )
{
- BOOL bHandled = FALSE;
+ sal_Bool bHandled = sal_False;
if( rMEvt.IsRight() && (nFlags & (F_DOWN_CTRL | F_DOWN_DESELECT) ))
{
nFlags &= ~(F_DOWN_CTRL | F_DOWN_DESELECT);
- bHandled = TRUE;
+ bHandled = sal_True;
}
Point aDocPos( rMEvt.GetPosPixel() );
@@ -1046,32 +1046,32 @@ BOOL SvxIconChoiceCtrl_Impl::MouseButtonUp( const MouseEvent& rMEvt )
// Ctrl & MultiSelection
ToggleSelection( pDocEntry );
SetCursor( pDocEntry );
- bHandled = TRUE;
+ bHandled = sal_True;
}
else if( nFlags & F_DOWN_DESELECT )
{
DeselectAllBut( pDocEntry );
SetCursor( pDocEntry );
- SelectEntry( pDocEntry, TRUE, TRUE, FALSE, TRUE );
- bHandled = TRUE;
+ SelectEntry( pDocEntry, sal_True, sal_True, sal_False, sal_True );
+ bHandled = sal_True;
}
}
nFlags &= ~(F_DOWN_CTRL | F_DOWN_DESELECT);
if( nFlags & F_START_EDITTIMER_IN_MOUSEUP )
{
- bHandled = TRUE;
+ bHandled = sal_True;
StartEditTimer();
nFlags &= ~F_START_EDITTIMER_IN_MOUSEUP;
}
if((nWinBits & WB_HIGHLIGHTFRAME) && bHighlightFramePressed && pCurHighlightFrame)
{
- bHandled = TRUE;
+ bHandled = sal_True;
SvxIconChoiceCtrlEntry* pEntry = pCurHighlightFrame;
pCurHighlightFrame = 0; // Neues painten des Frames erzwingen
- bHighlightFramePressed = FALSE;
- SetEntryHighlightFrame( pEntry, TRUE );
+ bHighlightFramePressed = sal_False;
+ SetEntryHighlightFrame( pEntry, sal_True );
#if 0
CallSelectHandler( pCurHighlightFrame );
#else
@@ -1080,27 +1080,27 @@ BOOL SvxIconChoiceCtrl_Impl::MouseButtonUp( const MouseEvent& rMEvt )
// set focus on Icon
SvxIconChoiceCtrlEntry* pOldCursor = pCursor;
- SetCursor_Impl( pOldCursor, pHdlEntry, FALSE, FALSE, TRUE );
+ SetCursor_Impl( pOldCursor, pHdlEntry, sal_False, sal_False, sal_True );
#endif
pHdlEntry = 0;
}
return bHandled;
}
-BOOL SvxIconChoiceCtrl_Impl::MouseMove( const MouseEvent& rMEvt )
+sal_Bool SvxIconChoiceCtrl_Impl::MouseMove( const MouseEvent& rMEvt )
{
const Point aDocPos( pView->PixelToLogic(rMEvt.GetPosPixel()) );
if( pView->IsTracking() )
- return FALSE;
+ return sal_False;
else if( nWinBits & WB_HIGHLIGHTFRAME )
{
- SvxIconChoiceCtrlEntry* pEntry = GetEntry( aDocPos, TRUE );
+ SvxIconChoiceCtrlEntry* pEntry = GetEntry( aDocPos, sal_True );
SetEntryHighlightFrame( pEntry );
}
else
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
void SvxIconChoiceCtrl_Impl::Tracking( const TrackingEvent& rTEvt )
@@ -1124,7 +1124,7 @@ void SvxIconChoiceCtrl_Impl::Tracking( const TrackingEvent& rTEvt )
long nScrollDX, nScrollDY;
- CalcScrollOffsets( aPosPixel, nScrollDX, nScrollDY, FALSE );
+ CalcScrollOffsets( aPosPixel, nScrollDX, nScrollDY, sal_False );
if( nScrollDX || nScrollDY )
{
pView->HideTracking();
@@ -1134,7 +1134,7 @@ void SvxIconChoiceCtrl_Impl::Tracking( const TrackingEvent& rTEvt )
if( aRect != aCurSelectionRect )
{
pView->HideTracking();
- BOOL bAdd = (nFlags & F_ADD_MODE) ? TRUE : FALSE;
+ sal_Bool bAdd = (nFlags & F_ADD_MODE) ? sal_True : sal_False;
SelectRect( aRect, bAdd, &aSelectedRectList );
}
pView->ShowTracking( aRect, SHOWTRACK_SMALL | SHOWTRACK_CLIP );
@@ -1142,25 +1142,25 @@ void SvxIconChoiceCtrl_Impl::Tracking( const TrackingEvent& rTEvt )
}
void SvxIconChoiceCtrl_Impl::SetCursor_Impl( SvxIconChoiceCtrlEntry* pOldCursor,
- SvxIconChoiceCtrlEntry* pNewCursor, BOOL bMod1, BOOL bShift, BOOL bPaintSync )
+ SvxIconChoiceCtrlEntry* pNewCursor, sal_Bool bMod1, sal_Bool bShift, sal_Bool bPaintSync )
{
if( pNewCursor )
{
SvxIconChoiceCtrlEntry* pFilterEntry = 0;
- BOOL bDeselectAll = FALSE;
+ sal_Bool bDeselectAll = sal_False;
if( eSelectionMode != SINGLE_SELECTION )
{
if( !bMod1 && !bShift )
- bDeselectAll = TRUE;
+ bDeselectAll = sal_True;
else if( bShift && !bMod1 && !pAnchor )
{
- bDeselectAll = TRUE;
+ bDeselectAll = sal_True;
pFilterEntry = pOldCursor;
}
}
if( bDeselectAll )
DeselectAllBut( pFilterEntry, bPaintSync );
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
MakeEntryVisible( pNewCursor );
SetCursor( pNewCursor );
if( bMod1 && !bShift )
@@ -1182,58 +1182,58 @@ void SvxIconChoiceCtrl_Impl::SetCursor_Impl( SvxIconChoiceCtrlEntry* pOldCursor,
}
else
{
- SelectEntry( pCursor, TRUE, TRUE, FALSE, bPaintSync );
+ SelectEntry( pCursor, sal_True, sal_True, sal_False, bPaintSync );
aCurSelectionRect = GetEntryBoundRect( pCursor );
}
}
}
-BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
+sal_Bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
{
StopEditTimer();
- BOOL bMod2 = rKEvt.GetKeyCode().IsMod2();
+ sal_Bool bMod2 = rKEvt.GetKeyCode().IsMod2();
sal_Unicode cChar = rKEvt.GetCharCode();
- ULONG nPos = (ULONG)-1;
+ sal_uLong nPos = (sal_uLong)-1;
if ( bMod2 && cChar && IsMnemonicChar( cChar, nPos ) )
{
// shortcut is clicked
SvxIconChoiceCtrlEntry* pNewCursor = GetEntry( nPos );
SvxIconChoiceCtrlEntry* pOldCursor = pCursor;
if ( pNewCursor != pOldCursor )
- SetCursor_Impl( pOldCursor, pNewCursor, FALSE, FALSE, FALSE );
- return TRUE;
+ SetCursor_Impl( pOldCursor, pNewCursor, sal_False, sal_False, sal_False );
+ return sal_True;
}
if ( bMod2 )
// no actions with <ALT>
- return FALSE;
+ return sal_False;
- BOOL bKeyUsed = TRUE;
- BOOL bMod1 = rKEvt.GetKeyCode().IsMod1();
- BOOL bShift = rKEvt.GetKeyCode().IsShift();
+ sal_Bool bKeyUsed = sal_True;
+ sal_Bool bMod1 = rKEvt.GetKeyCode().IsMod1();
+ sal_Bool bShift = rKEvt.GetKeyCode().IsShift();
if( eSelectionMode == SINGLE_SELECTION || eSelectionMode == NO_SELECTION)
{
- bShift = FALSE;
- bMod1 = FALSE;
+ bShift = sal_False;
+ bMod1 = sal_False;
}
if( bMod1 )
nFlags |= F_ADD_MODE;
- BOOL bDeselectAll = FALSE;
+ sal_Bool bDeselectAll = sal_False;
if( eSelectionMode != SINGLE_SELECTION )
{
if( !bMod1 && !bShift )
- bDeselectAll = TRUE;
+ bDeselectAll = sal_True;
if( bShift && !bMod1 && !pAnchor )
- bDeselectAll = TRUE;
+ bDeselectAll = sal_True;
}
SvxIconChoiceCtrlEntry* pNewCursor;
SvxIconChoiceCtrlEntry* pOldCursor = pCursor;
- USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
switch( nCode )
{
case KEY_UP:
@@ -1242,10 +1242,10 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
{
MakeEntryVisible( pCursor );
if( nCode == KEY_UP )
- pNewCursor = pImpCursor->GoUpDown(pCursor,FALSE);
+ pNewCursor = pImpCursor->GoUpDown(pCursor,sal_False);
else
- pNewCursor = pImpCursor->GoPageUpDown(pCursor,FALSE);
- SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, TRUE );
+ pNewCursor = pImpCursor->GoPageUpDown(pCursor,sal_False);
+ SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, sal_True );
if( !pNewCursor )
{
Rectangle aRect( GetEntryBoundRect( pCursor ) );
@@ -1272,10 +1272,10 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
if( pCursor )
{
if( nCode == KEY_DOWN )
- pNewCursor=pImpCursor->GoUpDown( pCursor,TRUE );
+ pNewCursor=pImpCursor->GoUpDown( pCursor,sal_True );
else
- pNewCursor=pImpCursor->GoPageUpDown( pCursor,TRUE );
- SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, TRUE );
+ pNewCursor=pImpCursor->GoPageUpDown( pCursor,sal_True );
+ SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, sal_True );
if ( bChooseWithCursor && pNewCursor != NULL)
{
@@ -1290,8 +1290,8 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
case KEY_RIGHT:
if( pCursor )
{
- pNewCursor=pImpCursor->GoLeftRight(pCursor,TRUE );
- SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, TRUE );
+ pNewCursor=pImpCursor->GoLeftRight(pCursor,sal_True );
+ SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, sal_True );
}
break;
@@ -1299,8 +1299,8 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
if( pCursor )
{
MakeEntryVisible( pCursor );
- pNewCursor = pImpCursor->GoLeftRight(pCursor,FALSE );
- SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, TRUE );
+ pNewCursor = pImpCursor->GoLeftRight(pCursor,sal_False );
+ SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, sal_True );
if( !pNewCursor )
{
Rectangle aRect( GetEntryBoundRect(pCursor));
@@ -1320,13 +1320,13 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
if( pView->IsTracking() )
{
HideSelectionRect();
- //SelectAll( FALSE );
+ //SelectAll( sal_False );
SetNoSelection();
ClearSelectedRectList();
nFlags &= ~F_TRACKING;
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
#endif
@@ -1335,7 +1335,7 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
if( !bMod1 && !bShift )
EditTimeoutHdl( 0 );
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_F8:
@@ -1347,7 +1347,7 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
nFlags |= F_ADD_MODE;
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_SPACE:
@@ -1355,12 +1355,12 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
{
if( !bMod1 )
{
- //SelectAll( FALSE );
+ //SelectAll( sal_False );
SetNoSelection();
ClearSelectedRectList();
// click Icon with spacebar
- SetEntryHighlightFrame( GetCurEntry(), TRUE );
+ SetEntryHighlightFrame( GetCurEntry(), sal_True );
pView->ClickIcon();
pHdlEntry = pCurHighlightFrame;
pCurHighlightFrame=0;
@@ -1389,9 +1389,9 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
case KEY_DIVIDE :
case KEY_A:
if( bMod1 && (eSelectionMode != SINGLE_SELECTION))
- SelectAll( TRUE );
+ SelectAll( sal_True );
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_SUBTRACT:
@@ -1399,7 +1399,7 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
if( bMod1 )
SetNoSelection();
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_RETURN:
@@ -1409,14 +1409,14 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
/*pView->*/EditEntry( pCursor );
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_END:
if( pCursor )
{
pNewCursor = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( aEntries.Count() - 1 );
- SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, TRUE );
+ SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, sal_True );
}
break;
@@ -1424,12 +1424,12 @@ BOOL SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
if( pCursor )
{
pNewCursor = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( 0 );
- SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, TRUE );
+ SetCursor_Impl( pOldCursor, pNewCursor, bMod1, bShift, sal_True );
}
break;
default:
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
}
return bKeyUsed;
@@ -1455,7 +1455,7 @@ void SvxIconChoiceCtrl_Impl::PositionScrollBars( long nRealWidth, long nRealHeig
aVerSBar.SetPosPixel( aPos );
}
-void SvxIconChoiceCtrl_Impl::AdjustScrollBars( BOOL )
+void SvxIconChoiceCtrl_Impl::AdjustScrollBars( sal_Bool )
{
Rectangle aOldOutRect( GetOutputRect() );
long nVirtHeight = aVirtOutputSize.Height();
@@ -1487,7 +1487,7 @@ void SvxIconChoiceCtrl_Impl::AdjustScrollBars( BOOL )
sal_Bool bNoVerSBar = ( nWinBits & WB_NOVSCROLL ) != 0;
sal_Bool bNoHorSBar = ( nWinBits & WB_NOHSCROLL ) != 0;
- USHORT nResult = 0;
+ sal_uInt16 nResult = 0;
if( nVirtHeight )
{
// activate ver scrollbar ?
@@ -1625,23 +1625,23 @@ void SvxIconChoiceCtrl_Impl::Resize()
VisRectChanged();
}
-BOOL SvxIconChoiceCtrl_Impl::CheckHorScrollBar()
+sal_Bool SvxIconChoiceCtrl_Impl::CheckHorScrollBar()
{
if( !pZOrderList || !aHorSBar.IsVisible() )
- return FALSE;
+ return sal_False;
const MapMode& rMapMode = pView->GetMapMode();
Point aOrigin( rMapMode.GetOrigin() );
if(!( nWinBits & WB_HSCROLL) && !aOrigin.X() )
{
long nWidth = aOutputSize.Width();
- const ULONG nCount = pZOrderList->Count();
+ const sal_uLong nCount = pZOrderList->Count();
long nMostRight = 0;
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)pZOrderList->GetObject(nCur);
long nRight = GetEntryBoundRect(pEntry).Right();
if( nRight > nWidth )
- return FALSE;
+ return sal_False;
if( nRight > nMostRight )
nMostRight = nRight;
}
@@ -1658,28 +1658,28 @@ BOOL SvxIconChoiceCtrl_Impl::CheckHorScrollBar()
aSize.Height() += nHorSBarHeight;
aVerSBar.SetSizePixel( aSize );
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SvxIconChoiceCtrl_Impl::CheckVerScrollBar()
+sal_Bool SvxIconChoiceCtrl_Impl::CheckVerScrollBar()
{
if( !pZOrderList || !aVerSBar.IsVisible() )
- return FALSE;
+ return sal_False;
const MapMode& rMapMode = pView->GetMapMode();
Point aOrigin( rMapMode.GetOrigin() );
if(!( nWinBits & WB_VSCROLL) && !aOrigin.Y() )
{
long nDeepest = 0;
long nHeight = aOutputSize.Height();
- const ULONG nCount = pZOrderList->Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ const sal_uLong nCount = pZOrderList->Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)pZOrderList->GetObject(nCur);
long nBottom = GetEntryBoundRect(pEntry).Bottom();
if( nBottom > nHeight )
- return FALSE;
+ return sal_False;
if( nBottom > nDeepest )
nDeepest = nBottom;
}
@@ -1696,9 +1696,9 @@ BOOL SvxIconChoiceCtrl_Impl::CheckVerScrollBar()
aSize.Width() += nVerSBarWidth;
aHorSBar.SetSizePixel( aSize );
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -1721,7 +1721,7 @@ void SvxIconChoiceCtrl_Impl::GetFocus()
if( pCursor )
{
pCursor->SetFlags( ICNVIEW_FLAG_FOCUSED );
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
}
@@ -1730,7 +1730,7 @@ void SvxIconChoiceCtrl_Impl::LoseFocus()
StopEditTimer();
if( pCursor )
pCursor->ClearFlags( ICNVIEW_FLAG_FOCUSED );
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
// HideFocus ();
// pView->Invalidate ( aFocus.aRect );
@@ -1738,7 +1738,7 @@ void SvxIconChoiceCtrl_Impl::LoseFocus()
RepaintEntries( ICNVIEW_FLAG_SELECTED );
}
-void SvxIconChoiceCtrl_Impl::SetUpdateMode( BOOL bUpdate )
+void SvxIconChoiceCtrl_Impl::SetUpdateMode( sal_Bool bUpdate )
{
if( bUpdate != bUpdateMode )
{
@@ -1753,7 +1753,7 @@ void SvxIconChoiceCtrl_Impl::SetUpdateMode( BOOL bUpdate )
}
}
-void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, BOOL bIsBackgroundPainted )
+void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bIsBackgroundPainted )
{
Point aPos( GetEntryPos( pEntry ) );
PaintEntry( pEntry, aPos, 0, bIsBackgroundPainted );
@@ -1762,8 +1762,8 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, BOOL bI
// Prios der Emphasis: bDropTarget => bCursored => bSelected
void SvxIconChoiceCtrl_Impl::PaintEmphasis(
const Rectangle& rTextRect, const Rectangle& rImageRect,
- BOOL bSelected, BOOL bDropTarget, BOOL bCursored, OutputDevice* pOut,
- BOOL bIsBackgroundPainted )
+ sal_Bool bSelected, sal_Bool bDropTarget, sal_Bool bCursored, OutputDevice* pOut,
+ sal_Bool bIsBackgroundPainted )
{
static Color aTransparent( COL_TRANSPARENT );
@@ -1783,14 +1783,14 @@ void SvxIconChoiceCtrl_Impl::PaintEmphasis(
const StyleSettings& rSettings = pOut->GetSettings().GetStyleSettings();
Color aOldFillColor( pOut->GetFillColor() );
- BOOL bSolidTextRect = FALSE;
- BOOL bSolidImageRect = FALSE;
+ sal_Bool bSolidTextRect = sal_False;
+ sal_Bool bSolidImageRect = sal_False;
if( bDropTarget && ( eSelectionMode != NO_SELECTION ) )
{
pOut->SetFillColor( rSettings.GetHighlightColor() );
- bSolidTextRect = TRUE;
- bSolidImageRect = TRUE;
+ bSolidTextRect = sal_True;
+ bSolidImageRect = sal_True;
}
else
{
@@ -1803,7 +1803,7 @@ void SvxIconChoiceCtrl_Impl::PaintEmphasis(
const Color& rFillColor = pView->GetFont().GetFillColor();
pOut->SetFillColor( rFillColor );
if( rFillColor != aTransparent )
- bSolidTextRect = TRUE;
+ bSolidTextRect = sal_True;
}
}
}
@@ -1843,14 +1843,14 @@ void SvxIconChoiceCtrl_Impl::PaintEmphasis(
void SvxIconChoiceCtrl_Impl::PaintItem( const Rectangle& rRect,
- IcnViewFieldType eItem, SvxIconChoiceCtrlEntry* pEntry, USHORT nPaintFlags,
+ IcnViewFieldType eItem, SvxIconChoiceCtrlEntry* pEntry, sal_uInt16 nPaintFlags,
OutputDevice* pOut, const String* pStr, ::vcl::ControlLayoutData* _pLayoutData )
{
if( eItem == IcnViewFieldTypeText )
{
String aText;
if( !pStr )
- aText = pView->GetEntryText( pEntry, FALSE );
+ aText = pView->GetEntryText( pEntry, sal_False );
else
aText = *pStr;
@@ -1866,7 +1866,7 @@ void SvxIconChoiceCtrl_Impl::PaintItem( const Rectangle& rRect,
{
Color aBkgColor( pOut->GetBackground().GetColor() );
Color aFontColor;
- USHORT nColor = ( aBkgColor.GetRed() + aBkgColor.GetGreen() + aBkgColor.GetBlue() ) / 3;
+ sal_uInt16 nColor = ( aBkgColor.GetRed() + aBkgColor.GetGreen() + aBkgColor.GetBlue() ) / 3;
if ( nColor > 127 )
aFontColor.SetColor ( COL_BLACK );
else
@@ -1944,19 +1944,19 @@ void SvxIconChoiceCtrl_Impl::PaintEntryVirtOutDev( SvxIconChoiceCtrlEntry* pEntr
void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const Point& rPos,
- OutputDevice* pOut, BOOL bIsBackgroundPainted )
+ OutputDevice* pOut, sal_Bool bIsBackgroundPainted )
{
if( !pOut )
pOut = pView;
- BOOL bSelected = FALSE;
+ sal_Bool bSelected = sal_False;
if( eSelectionMode != NO_SELECTION )
bSelected = pEntry->IsSelected();
- BOOL bCursored = pEntry->IsCursored();
- BOOL bDropTarget = pEntry->IsDropTarget();
- BOOL bNoEmphasis = pEntry->IsBlockingEmphasis();
+ sal_Bool bCursored = pEntry->IsCursored();
+ sal_Bool bDropTarget = pEntry->IsDropTarget();
+ sal_Bool bNoEmphasis = pEntry->IsBlockingEmphasis();
Font aTempFont( pOut->GetFont() );
@@ -1968,8 +1968,8 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const P
}
*/
- String aEntryText( pView->GetEntryText( pEntry, FALSE ) );
- Rectangle aTextRect( CalcTextRect(pEntry,&rPos,FALSE,&aEntryText));
+ String aEntryText( pView->GetEntryText( pEntry, sal_False ) );
+ Rectangle aTextRect( CalcTextRect(pEntry,&rPos,sal_False,&aEntryText));
Rectangle aBmpRect( CalcBmpRect(pEntry, &rPos ) );
sal_Bool bShowSelection =
@@ -2009,14 +2009,14 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const P
pOut->SetFillColor( );
}
- BOOL bResetClipRegion = FALSE;
+ sal_Bool bResetClipRegion = sal_False;
if( !pView->IsClipRegion() && (aVerSBar.IsVisible() || aHorSBar.IsVisible()) )
{
Rectangle aOutputArea( GetOutputRect() );
if( aOutputArea.IsOver(aTextRect) || aOutputArea.IsOver(aBmpRect) )
{
pView->SetClipRegion( aOutputArea );
- bResetClipRegion = TRUE;
+ bResetClipRegion = sal_True;
}
}
@@ -2032,10 +2032,10 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const P
#endif
sal_Bool bLargeIconMode = WB_ICON == ( nWinBits & (VIEWMODE_MASK) );
- USHORT nBmpPaintFlags = PAINTFLAG_VER_CENTERED;
+ sal_uInt16 nBmpPaintFlags = PAINTFLAG_VER_CENTERED;
if ( bLargeIconMode )
nBmpPaintFlags |= PAINTFLAG_HOR_CENTERED;
- USHORT nTextPaintFlags = bLargeIconMode ? PAINTFLAG_HOR_CENTERED : PAINTFLAG_VER_CENTERED;
+ sal_uInt16 nTextPaintFlags = bLargeIconMode ? PAINTFLAG_HOR_CENTERED : PAINTFLAG_VER_CENTERED;
if( !bNoEmphasis )
PaintEmphasis(aTextRect,aBmpRect,bSelected,bDropTarget,bCursored,pOut,bIsBackgroundPainted);
@@ -2051,7 +2051,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const P
// Highlight-Frame zeichnen
if( pEntry == pCurHighlightFrame && !bNoEmphasis )
- DrawHighlightFrame( pOut, CalcFocusRect( pEntry ), FALSE );
+ DrawHighlightFrame( pOut, CalcFocusRect( pEntry ), sal_False );
pOut->SetFont( aTempFont );
if( bResetClipRegion )
@@ -2059,15 +2059,15 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const P
}
void SvxIconChoiceCtrl_Impl::SetEntryPos( SvxIconChoiceCtrlEntry* pEntry, const Point& rPos,
- BOOL bAdjustAtGrid, BOOL bCheckScrollBars, BOOL bKeepGridMap )
+ sal_Bool bAdjustAtGrid, sal_Bool bCheckScrollBars, sal_Bool bKeepGridMap )
{
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
Rectangle aBoundRect( GetEntryBoundRect( pEntry ));
pView->Invalidate( aBoundRect );
ToTop( pEntry );
if( !IsAutoArrange() )
{
- BOOL bAdjustVirtSize = FALSE;
+ sal_Bool bAdjustVirtSize = sal_False;
if( rPos != aBoundRect.TopLeft() )
{
Point aGridOffs(
@@ -2078,7 +2078,7 @@ void SvxIconChoiceCtrl_Impl::SetEntryPos( SvxIconChoiceCtrlEntry* pEntry, const
aBoundRect.SetPos( rPos );
pEntry->aRect = aBoundRect;
pEntry->aGridRect.SetPos( rPos + aGridOffs );
- bAdjustVirtSize = TRUE;
+ bAdjustVirtSize = sal_True;
}
if( bAdjustAtGrid )
{
@@ -2097,7 +2097,7 @@ void SvxIconChoiceCtrl_Impl::SetEntryPos( SvxIconChoiceCtrlEntry* pEntry, const
Point aNewPos( AdjustAtGrid( aCenterRect, rBoundRect ) );
Rectangle aNewBoundRect( aNewPos, pEntry->aRect.GetSize());
AdjustVirtSize( aNewBoundRect );
- bAdjustVirtSize = FALSE;
+ bAdjustVirtSize = sal_False;
}
AdjustEntryAtGrid( pEntry );
ToTop( pEntry );
@@ -2117,7 +2117,7 @@ void SvxIconChoiceCtrl_Impl::SetEntryPos( SvxIconChoiceCtrlEntry* pEntry, const
SetEntryPredecessor( pEntry, pPrev );
aAutoArrangeTimer.Start();
}
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
void SvxIconChoiceCtrl_Impl::SetNoSelection()
@@ -2126,16 +2126,16 @@ void SvxIconChoiceCtrl_Impl::SetNoSelection()
if( !(nFlags & F_CLEARING_SELECTION ))
{
nFlags |= F_CLEARING_SELECTION;
- DeselectAllBut( 0, TRUE );
+ DeselectAllBut( 0, sal_True );
nFlags &= ~F_CLEARING_SELECTION;
}
}
-SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetEntry( const Point& rDocPos, BOOL bHit )
+SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetEntry( const Point& rDocPos, sal_Bool bHit )
{
CheckBoundingRects();
// Z-Order-Liste vom Ende her absuchen
- ULONG nCount = pZOrderList->Count();
+ sal_uLong nCount = pZOrderList->Count();
while( nCount )
{
nCount--;
@@ -2166,11 +2166,11 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetNextEntry( const Point& rDocP
{
CheckBoundingRects();
SvxIconChoiceCtrlEntry* pTarget = 0;
- const ULONG nStartPos = pZOrderList->GetPos( (void*)pCurEntry );
+ const sal_uLong nStartPos = pZOrderList->GetPos( (void*)pCurEntry );
if( nStartPos != LIST_ENTRY_NOTFOUND )
{
- const ULONG nCount = pZOrderList->Count();
- for( ULONG nCur = nStartPos+1; nCur < nCount; nCur++ )
+ const sal_uLong nCount = pZOrderList->Count();
+ for( sal_uLong nCur = nStartPos+1; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)(pZOrderList->GetObject(nCur));
if( pEntry->aRect.IsInside( rDocPos ) )
@@ -2187,7 +2187,7 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetPrevEntry( const Point& rDocP
{
CheckBoundingRects();
SvxIconChoiceCtrlEntry* pTarget = 0;
- ULONG nStartPos = pZOrderList->GetPos( (void*)pCurEntry );
+ sal_uLong nStartPos = pZOrderList->GetPos( (void*)pCurEntry );
if( nStartPos != LIST_ENTRY_NOTFOUND && nStartPos != 0 )
{
nStartPos--;
@@ -2209,7 +2209,7 @@ Point SvxIconChoiceCtrl_Impl::GetEntryPos( SvxIconChoiceCtrlEntry* pEntry )
return pEntry->aRect.TopLeft();
}
-void SvxIconChoiceCtrl_Impl::MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, BOOL bBound )
+void SvxIconChoiceCtrl_Impl::MakeEntryVisible( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bBound )
{
if ( bBound )
{
@@ -2263,7 +2263,7 @@ Rectangle SvxIconChoiceCtrl_Impl::CalcBmpRect( SvxIconChoiceCtrlEntry* pEntry, c
}
Rectangle SvxIconChoiceCtrl_Impl::CalcTextRect( SvxIconChoiceCtrlEntry* pEntry,
- const Point* pEntryPos, BOOL bEdit, const String* pStr )
+ const Point* pEntryPos, sal_Bool bEdit, const String* pStr )
{
String aEntryText;
if( !pStr )
@@ -2381,8 +2381,8 @@ void SvxIconChoiceCtrl_Impl::RecalcAllBoundingRects()
{
nMaxBoundHeight = 0;
pZOrderList->Clear();
- ULONG nCount = aEntries.Count();
- ULONG nCur;
+ sal_uLong nCount = aEntries.Count();
+ sal_uLong nCur;
SvxIconChoiceCtrlEntry* pEntry;
if( !IsAutoArrange() || !pHead )
@@ -2407,7 +2407,7 @@ void SvxIconChoiceCtrl_Impl::RecalcAllBoundingRects()
nCur++;
}
}
- bBoundRectsDirty = FALSE;
+ bBoundRectsDirty = sal_False;
AdjustScrollBars();
}
@@ -2415,9 +2415,9 @@ void SvxIconChoiceCtrl_Impl::RecalcAllBoundingRectsSmart()
{
nMaxBoundHeight = 0;
pZOrderList->Clear();
- ULONG nCur;
+ sal_uLong nCur;
SvxIconChoiceCtrlEntry* pEntry;
- const ULONG nCount = aEntries.Count();
+ const sal_uLong nCount = aEntries.Count();
if( !IsAutoArrange() || !pHead )
{
@@ -2460,8 +2460,8 @@ void SvxIconChoiceCtrl_Impl::RecalcAllBoundingRectsSmart()
void SvxIconChoiceCtrl_Impl::UpdateBoundingRects()
{
- const ULONG nCount = aEntries.Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ const sal_uLong nCount = aEntries.Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur );
GetEntryBoundRect( pEntry );
@@ -2477,7 +2477,7 @@ void SvxIconChoiceCtrl_Impl::FindBoundingRect( SvxIconChoiceCtrlEntry* pEntry )
return;
}
Size aSize( CalcBoundingSize( pEntry ) );
- Point aPos(pGridMap->GetGridRect(pGridMap->GetUnoccupiedGrid(TRUE)).TopLeft());
+ Point aPos(pGridMap->GetGridRect(pGridMap->GetUnoccupiedGrid(sal_True)).TopLeft());
SetBoundingRect_Impl( pEntry, aPos, aSize );
}
@@ -2492,33 +2492,33 @@ void SvxIconChoiceCtrl_Impl::SetBoundingRect_Impl( SvxIconChoiceCtrlEntry* pEntr
}
-void SvxIconChoiceCtrl_Impl::SetCursor( SvxIconChoiceCtrlEntry* pEntry, BOOL bSyncSingleSelection,
- BOOL bShowFocusAsync )
+void SvxIconChoiceCtrl_Impl::SetCursor( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bSyncSingleSelection,
+ sal_Bool bShowFocusAsync )
{
if( pEntry == pCursor )
{
if( pCursor && eSelectionMode == SINGLE_SELECTION && bSyncSingleSelection &&
!pCursor->IsSelected() )
- SelectEntry( pCursor, TRUE, TRUE );
+ SelectEntry( pCursor, sal_True, sal_True );
return;
}
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
SvxIconChoiceCtrlEntry* pOldCursor = pCursor;
pCursor = pEntry;
if( pOldCursor )
{
pOldCursor->ClearFlags( ICNVIEW_FLAG_FOCUSED );
if( eSelectionMode == SINGLE_SELECTION && bSyncSingleSelection )
- SelectEntry( pOldCursor, FALSE, TRUE ); // alten Cursor deselektieren
+ SelectEntry( pOldCursor, sal_False, sal_True ); // alten Cursor deselektieren
}
if( pCursor )
{
ToTop( pCursor );
pCursor->SetFlags( ICNVIEW_FLAG_FOCUSED );
if( eSelectionMode == SINGLE_SELECTION && bSyncSingleSelection )
- SelectEntry( pCursor, TRUE, TRUE );
+ SelectEntry( pCursor, sal_True, sal_True );
if( !bShowFocusAsync )
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
else
{
if( !nUserEventShowCursor )
@@ -2530,7 +2530,7 @@ void SvxIconChoiceCtrl_Impl::SetCursor( SvxIconChoiceCtrlEntry* pEntry, BOOL bSy
}
-void SvxIconChoiceCtrl_Impl::ShowCursor( BOOL bShow )
+void SvxIconChoiceCtrl_Impl::ShowCursor( sal_Bool bShow )
{
if( !pCursor || !bShow || !pView->HasFocus() )
{
@@ -2569,7 +2569,7 @@ void SvxIconChoiceCtrl_Impl::ShowDDIcon( SvxIconChoiceCtrlEntry* pRefEntry, cons
DELETEZ(pDDDev);
DELETEZ(pDDBufDev);
}
- BOOL bSelected = pRefEntry->IsSelected();
+ sal_Bool bSelected = pRefEntry->IsSelected();
pRefEntry->ClearFlags( ICNVIEW_FLAG_SELECTED );
if( !pDDDev )
{
@@ -2706,16 +2706,16 @@ void SvxIconChoiceCtrl_Impl::InvalidateBoundingRect( SvxIconChoiceCtrlEntry* pEn
}
-BOOL SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd )
+sal_Bool SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd )
{
Rectangle aDocRect( GetDocumentRect() );
Rectangle aVisRect( GetVisibleRect() );
if( aVisRect.IsInside( aDocRect ))
- return FALSE;
+ return sal_False;
Size aDocSize( aDocRect.GetSize() );
Size aVisSize( aVisRect.GetSize() );
- BOOL bHor = aDocSize.Width() > aVisSize.Width();
- BOOL bVer = aDocSize.Height() > aVisSize.Height();
+ sal_Bool bHor = aDocSize.Width() > aVisSize.Width();
+ sal_Bool bVer = aDocSize.Height() > aVisSize.Height();
long nScrollDX = 0, nScrollDY = 0;
@@ -2724,7 +2724,7 @@ BOOL SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd )
case COMMAND_STARTAUTOSCROLL:
{
pView->EndTracking();
- USHORT nScrollFlags = 0;
+ sal_uInt16 nScrollFlags = 0;
if( bHor )
nScrollFlags |= AUTOSCROLL_HORZ;
if( bVer )
@@ -2732,7 +2732,7 @@ BOOL SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd )
if( nScrollFlags )
{
pView->StartAutoScroll( nScrollFlags );
- return TRUE;
+ return sal_True;
}
}
break;
@@ -2742,7 +2742,7 @@ BOOL SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd )
const CommandWheelData* pData = rCmd.GetWheelData();
if( pData && (COMMAND_WHEEL_SCROLL == pData->GetMode()) && !pData->IsHorz() )
{
- ULONG nScrollLines = pData->GetScrollLines();
+ sal_uLong nScrollLines = pData->GetScrollLines();
if( nScrollLines == COMMAND_WHEEL_PAGESCROLL )
{
nScrollDY = GetScrollBarPageSize( aVisSize.Width() );
@@ -2777,9 +2777,9 @@ BOOL SvxIconChoiceCtrl_Impl::HandleScrollCommand( const CommandEvent& rCmd )
aVisRect.Left() -= nScrollDX;
aVisRect.Right() -= nScrollDX;
MakeVisible( aVisRect );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -2806,7 +2806,7 @@ void SvxIconChoiceCtrl_Impl::ToTop( SvxIconChoiceCtrlEntry* pEntry )
{
if( pZOrderList->GetObject( pZOrderList->Count() - 1 ) != pEntry )
{
- ULONG nPos = pZOrderList->GetPos( (void*)pEntry );
+ sal_uLong nPos = pZOrderList->GetPos( (void*)pEntry );
pZOrderList->Remove( nPos );
pZOrderList->Insert( pEntry, LIST_APPEND );
}
@@ -2826,10 +2826,10 @@ void SvxIconChoiceCtrl_Impl::ClipAtVirtOutRect( Rectangle& rRect ) const
// rRect: Bereich des Dokumentes (in Dokumentkoordinaten), der
// sichtbar gemacht werden soll.
-// bScrBar == TRUE: Das Rect wurde aufgrund eines ScrollBar-Events berechnet
+// bScrBar == sal_True: Das Rect wurde aufgrund eines ScrollBar-Events berechnet
-void SvxIconChoiceCtrl_Impl::MakeVisible( const Rectangle& rRect, BOOL bScrBar,
- BOOL bCallRectChangedHdl )
+void SvxIconChoiceCtrl_Impl::MakeVisible( const Rectangle& rRect, sal_Bool bScrBar,
+ sal_Bool bCallRectChangedHdl )
{
Rectangle aVirtRect( rRect );
ClipAtVirtOutRect( aVirtRect );
@@ -2875,7 +2875,7 @@ void SvxIconChoiceCtrl_Impl::MakeVisible( const Rectangle& rRect, BOOL bScrBar,
{
HideDDIcon();
pView->Update();
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
}
// Origin fuer SV invertieren (damit wir in
@@ -2883,7 +2883,7 @@ void SvxIconChoiceCtrl_Impl::MakeVisible( const Rectangle& rRect, BOOL bScrBar,
aOrigin *= -1;
SetOrigin( aOrigin );
- BOOL bScrollable = pView->GetBackground().IsScrollable();
+ sal_Bool bScrollable = pView->GetBackground().IsScrollable();
if( pView->HasBackground() && !bScrollable )
{
Rectangle aRect( GetOutputRect());
@@ -2915,7 +2915,7 @@ void SvxIconChoiceCtrl_Impl::MakeVisible( const Rectangle& rRect, BOOL bScrBar,
}
if( GetUpdateMode() )
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
// pruefen, ob ScrollBars noch benoetigt werden
CheckScrollBars();
@@ -2936,15 +2936,15 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::FindNewCursor()
SvxIconChoiceCtrlEntry* pNewCursor;
if( pCursor )
{
- pNewCursor = pImpCursor->GoLeftRight( pCursor, FALSE );
+ pNewCursor = pImpCursor->GoLeftRight( pCursor, sal_False );
if( !pNewCursor )
{
- pNewCursor = pImpCursor->GoLeftRight( pCursor, TRUE );
+ pNewCursor = pImpCursor->GoLeftRight( pCursor, sal_True );
if( !pNewCursor )
{
- pNewCursor = pImpCursor->GoUpDown( pCursor, FALSE );
+ pNewCursor = pImpCursor->GoUpDown( pCursor, sal_False );
if( !pNewCursor )
- pNewCursor = pImpCursor->GoUpDown( pCursor, TRUE );
+ pNewCursor = pImpCursor->GoUpDown( pCursor, sal_True );
}
}
}
@@ -2954,7 +2954,7 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::FindNewCursor()
return pNewCursor;
}
-ULONG SvxIconChoiceCtrl_Impl::GetSelectionCount() const
+sal_uLong SvxIconChoiceCtrl_Impl::GetSelectionCount() const
{
if( (nWinBits & WB_HIGHLIGHTFRAME) && pCurHighlightFrame )
return 1;
@@ -2963,27 +2963,27 @@ ULONG SvxIconChoiceCtrl_Impl::GetSelectionCount() const
void SvxIconChoiceCtrl_Impl::ToggleSelection( SvxIconChoiceCtrlEntry* pEntry )
{
- BOOL bSel;
+ sal_Bool bSel;
if( pEntry->IsSelected() )
- bSel = FALSE;
+ bSel = sal_False;
else
- bSel = TRUE;
- SelectEntry( pEntry, bSel, TRUE, TRUE );
+ bSel = sal_True;
+ SelectEntry( pEntry, bSel, sal_True, sal_True );
}
void SvxIconChoiceCtrl_Impl::DeselectAllBut( SvxIconChoiceCtrlEntry* pThisEntryNot,
- BOOL bPaintSync )
+ sal_Bool bPaintSync )
{
ClearSelectedRectList();
//
// !!!!!!! Todo: Evtl. Z-Orderlist abarbeiten !!!!!!!
//
- ULONG nCount = aEntries.Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ sal_uLong nCount = aEntries.Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur );
if( pEntry != pThisEntryNot && pEntry->IsSelected() )
- SelectEntry( pEntry, FALSE, TRUE, TRUE, bPaintSync );
+ SelectEntry( pEntry, sal_False, sal_True, sal_True, bPaintSync );
}
pAnchor = 0;
nFlags &= (~F_ADD_MODE);
@@ -3119,7 +3119,7 @@ void SvxIconChoiceCtrl_Impl::Center( SvxIconChoiceCtrlEntry* pEntry ) const
// Die Deltas entsprechen Offsets, um die die View auf dem Doc verschoben wird
// links, hoch: Offsets < 0
// rechts, runter: Offsets > 0
-void SvxIconChoiceCtrl_Impl::Scroll( long nDeltaX, long nDeltaY, BOOL bScrollBar )
+void SvxIconChoiceCtrl_Impl::Scroll( long nDeltaX, long nDeltaY, sal_Bool bScrollBar )
{
const MapMode& rMapMode = pView->GetMapMode();
Point aOrigin( rMapMode.GetOrigin() );
@@ -3172,7 +3172,7 @@ static Rectangle GetHotSpot( const Rectangle& rRect )
}
void SvxIconChoiceCtrl_Impl::SelectRect( SvxIconChoiceCtrlEntry* pEntry1, SvxIconChoiceCtrlEntry* pEntry2,
- BOOL bAdd, SvPtrarr* pOtherRects )
+ sal_Bool bAdd, SvPtrarr* pOtherRects )
{
DBG_ASSERT(pEntry1 && pEntry2,"SelectEntry: Invalid Entry-Ptr");
Rectangle aRect( GetEntryBoundRect( pEntry1 ) );
@@ -3180,7 +3180,7 @@ void SvxIconChoiceCtrl_Impl::SelectRect( SvxIconChoiceCtrlEntry* pEntry1, SvxIco
SelectRect( aRect, bAdd, pOtherRects );
}
-void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, BOOL bAdd,
+void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, sal_Bool bAdd,
SvPtrarr* pOtherRects )
{
aCurSelectionRect = rRect;
@@ -3188,53 +3188,53 @@ void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, BOOL bAdd,
return;
// Flag setzen, damit im Select kein ToTop gerufen wird
- BOOL bAlreadySelectingRect = nFlags & F_SELECTING_RECT ? TRUE : FALSE;
+ sal_Bool bAlreadySelectingRect = nFlags & F_SELECTING_RECT ? sal_True : sal_False;
nFlags |= F_SELECTING_RECT;
CheckBoundingRects();
pView->Update();
- const ULONG nCount = pZOrderList->Count();
+ const sal_uLong nCount = pZOrderList->Count();
Rectangle aRect( rRect );
aRect.Justify();
- BOOL bCalcOverlap = (bAdd && pOtherRects && pOtherRects->Count()) ? TRUE : FALSE;
+ sal_Bool bCalcOverlap = (bAdd && pOtherRects && pOtherRects->Count()) ? sal_True : sal_False;
- BOOL bResetClipRegion = FALSE;
+ sal_Bool bResetClipRegion = sal_False;
if( !pView->IsClipRegion() )
{
- bResetClipRegion = TRUE;
+ bResetClipRegion = sal_True;
pView->SetClipRegion( GetOutputRect() );
}
- for( ULONG nPos = 0; nPos < nCount; nPos++ )
+ for( sal_uLong nPos = 0; nPos < nCount; nPos++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)(pZOrderList->GetObject(nPos ));
if( !IsBoundingRectValid( pEntry->aRect ))
FindBoundingRect( pEntry );
Rectangle aBoundRect( GetHotSpot( pEntry->aRect ) );
- BOOL bSelected = pEntry->IsSelected();
+ sal_Bool bSelected = pEntry->IsSelected();
- BOOL bOverlaps;
+ sal_Bool bOverlaps;
if( bCalcOverlap )
bOverlaps = IsOver( pOtherRects, aBoundRect );
else
- bOverlaps = FALSE;
- BOOL bOver = aRect.IsOver( aBoundRect );
+ bOverlaps = sal_False;
+ sal_Bool bOver = aRect.IsOver( aBoundRect );
if( bOver && !bOverlaps )
{
// Ist im neuen Selektionsrechteck und in keinem alten
// => selektieren
if( !bSelected )
- SelectEntry( pEntry, TRUE, TRUE, TRUE );
+ SelectEntry( pEntry, sal_True, sal_True, sal_True );
}
else if( !bAdd )
{
// ist ausserhalb des Selektionsrechtecks
// => Selektion entfernen
if( bSelected )
- SelectEntry( pEntry, FALSE, TRUE, TRUE );
+ SelectEntry( pEntry, sal_False, sal_True, sal_True );
}
else if( bAdd && bOverlaps )
{
@@ -3254,19 +3254,19 @@ void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, BOOL bAdd,
{
// Schnittmenge zwischen alten Rects & aktuellem Rect desel.
if( bSelected )
- SelectEntry( pEntry, FALSE, TRUE, TRUE );
+ SelectEntry( pEntry, sal_False, sal_True, sal_True );
}
else
{
// Eintrag eines alten Rects selektieren
if( !bSelected )
- SelectEntry( pEntry, TRUE, TRUE, TRUE );
+ SelectEntry( pEntry, sal_True, sal_True, sal_True );
}
}
else if( !bOver && bSelected )
{
// Der Eintrag liegt voellig ausserhalb und wird deshalb desel.
- SelectEntry( pEntry, FALSE, TRUE, TRUE );
+ SelectEntry( pEntry, sal_False, sal_True, sal_True );
}
}
@@ -3281,13 +3281,13 @@ void SvxIconChoiceCtrl_Impl::SelectRect( const Rectangle& rRect, BOOL bAdd,
void SvxIconChoiceCtrl_Impl::SelectRange(
SvxIconChoiceCtrlEntry* pStart,
SvxIconChoiceCtrlEntry* pEnd,
- BOOL bAdd )
+ sal_Bool bAdd )
{
- ULONG nFront = GetEntryListPos( pStart );
- ULONG nBack = GetEntryListPos( pEnd );
- ULONG nFirst = std::min( nFront, nBack );
- ULONG nLast = std::max( nFront, nBack );
- ULONG i;
+ sal_uLong nFront = GetEntryListPos( pStart );
+ sal_uLong nBack = GetEntryListPos( pEnd );
+ sal_uLong nFirst = std::min( nFront, nBack );
+ sal_uLong nLast = std::max( nFront, nBack );
+ sal_uLong i;
SvxIconChoiceCtrlEntry* pEntry;
if ( ! bAdd )
@@ -3298,7 +3298,7 @@ void SvxIconChoiceCtrl_Impl::SelectRange(
{
pEntry = GetEntry( i );
if( pEntry->IsSelected() )
- SelectEntry( pEntry, FALSE, TRUE, TRUE, TRUE );
+ SelectEntry( pEntry, sal_False, sal_True, sal_True, sal_True );
}
}
@@ -3307,33 +3307,33 @@ void SvxIconChoiceCtrl_Impl::SelectRange(
{
pEntry = GetEntry( i );
if( ! pEntry->IsSelected() )
- SelectEntry( pEntry, TRUE, TRUE, TRUE, TRUE );
+ SelectEntry( pEntry, sal_True, sal_True, sal_True, sal_True );
}
if ( ! bAdd )
{
// deselect everything behind the last entry if not in
// adding mode
- ULONG nEnd = GetEntryCount();
+ sal_uLong nEnd = GetEntryCount();
for ( ; i<nEnd; i++ )
{
pEntry = GetEntry( i );
if( pEntry->IsSelected() )
- SelectEntry( pEntry, FALSE, TRUE, TRUE, TRUE );
+ SelectEntry( pEntry, sal_False, sal_True, sal_True, sal_True );
}
}
}
-BOOL SvxIconChoiceCtrl_Impl::IsOver( SvPtrarr* pRectList, const Rectangle& rBoundRect ) const
+sal_Bool SvxIconChoiceCtrl_Impl::IsOver( SvPtrarr* pRectList, const Rectangle& rBoundRect ) const
{
- const USHORT nCount = pRectList->Count();
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ const sal_uInt16 nCount = pRectList->Count();
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
Rectangle* pRect = (Rectangle*)pRectList->GetObject( nCur );
if( rBoundRect.IsOver( *pRect ))
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
void SvxIconChoiceCtrl_Impl::AddSelectedRect( SvxIconChoiceCtrlEntry* pEntry1,
@@ -3354,8 +3354,8 @@ void SvxIconChoiceCtrl_Impl::AddSelectedRect( const Rectangle& rRect )
void SvxIconChoiceCtrl_Impl::ClearSelectedRectList()
{
- const USHORT nCount = aSelectedRectList.Count();
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ const sal_uInt16 nCount = aSelectedRectList.Count();
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
Rectangle* pRect = (Rectangle*)aSelectedRectList.GetObject( nCur );
delete pRect;
@@ -3364,7 +3364,7 @@ void SvxIconChoiceCtrl_Impl::ClearSelectedRectList()
}
void SvxIconChoiceCtrl_Impl::CalcScrollOffsets( const Point& rPosPixel,
- long& rX, long& rY, BOOL isInDragDrop, USHORT nBorderWidth)
+ long& rX, long& rY, sal_Bool isInDragDrop, sal_uInt16 nBorderWidth)
{
// Scrolling der View, falls sich der Mauszeiger im Grenzbereich des
// Fensters befindet
@@ -3372,8 +3372,8 @@ void SvxIconChoiceCtrl_Impl::CalcScrollOffsets( const Point& rPosPixel,
long nPixelToScrollY = 0;
Size aWndSize = aOutputSize;
- nBorderWidth = (USHORT)(Min( (long)(aWndSize.Height()-1), (long)nBorderWidth ));
- nBorderWidth = (USHORT)(Min( (long)(aWndSize.Width()-1), (long)nBorderWidth ));
+ nBorderWidth = (sal_uInt16)(Min( (long)(aWndSize.Height()-1), (long)nBorderWidth ));
+ nBorderWidth = (sal_uInt16)(Min( (long)(aWndSize.Width()-1), (long)nBorderWidth ));
if ( rPosPixel.X() < nBorderWidth )
{
@@ -3434,16 +3434,16 @@ void SvxIconChoiceCtrl_Impl::PrepareCommandEvent( const CommandEvent& rCEvt )
StopEditTimer();
SvxIconChoiceCtrlEntry* pEntry = pView->GetEntry( rCEvt.GetMousePosPixel() );
if( (nFlags & F_DOWN_CTRL) && pEntry && !pEntry->IsSelected() )
- SelectEntry( pEntry, TRUE, TRUE );
+ SelectEntry( pEntry, sal_True, sal_True );
nFlags &= ~(F_DOWN_CTRL | F_DOWN_DESELECT);
}
-BOOL SvxIconChoiceCtrl_Impl::IsTextHit( SvxIconChoiceCtrlEntry* pEntry, const Point& rDocPos )
+sal_Bool SvxIconChoiceCtrl_Impl::IsTextHit( SvxIconChoiceCtrlEntry* pEntry, const Point& rDocPos )
{
Rectangle aRect( CalcTextRect( pEntry ));
if( aRect.IsInside( rDocPos ) )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
IMPL_LINK(SvxIconChoiceCtrl_Impl, EditTimeoutHdl, Timer*, EMPTYARG )
@@ -3469,8 +3469,8 @@ void SvxIconChoiceCtrl_Impl::AdjustEntryAtGrid( SvxIconChoiceCtrlEntry* pStart )
{
SvPtrarr aLists;
pImpCursor->CreateGridAjustData( aLists, pStart );
- const USHORT nCount = aLists.Count();
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ const sal_uInt16 nCount = aLists.Count();
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
AdjustAtGrid( *(SvPtrarr*)aLists[ nCur ], pStart );
IcnCursor_Impl::DestroyGridAdjustData( aLists );
CheckScrollBars();
@@ -3482,18 +3482,18 @@ void SvxIconChoiceCtrl_Impl::AdjustAtGrid( const SvPtrarr& rRow, SvxIconChoiceCt
if( !rRow.Count() )
return;
- BOOL bGo;
+ sal_Bool bGo;
if( !pStart )
- bGo = TRUE;
+ bGo = sal_True;
else
- bGo = FALSE;
+ bGo = sal_False;
long nCurRight = 0;
- for( USHORT nCur = 0; nCur < rRow.Count(); nCur++ )
+ for( sal_uInt16 nCur = 0; nCur < rRow.Count(); nCur++ )
{
SvxIconChoiceCtrlEntry* pCur = (SvxIconChoiceCtrlEntry*)rRow[ nCur ];
if( !bGo && pCur == pStart )
- bGo = TRUE;
+ bGo = sal_True;
//SvIcnVwDataEntry* pViewData = ICNVIEWDATA(pCur);
// Massgebend (fuer unser Auge) ist die Bitmap, da sonst
@@ -3557,7 +3557,7 @@ void SvxIconChoiceCtrl_Impl::SetEntryTextMode( SvxIconChoiceCtrlTextMode eMode,
if( eTextMode == IcnShowTextDontKnow )
eTextMode = IcnShowTextShort;
eTextMode = eMode;
- Arrange( TRUE );
+ Arrange( sal_True );
}
}
else
@@ -3611,20 +3611,20 @@ void SvxIconChoiceCtrl_Impl::ShowFocus ( Rectangle& rRect )
{
Color aBkgColor ( pView->GetBackground().GetColor() );
Color aPenColor;
- USHORT nColor = ( aBkgColor.GetRed() + aBkgColor.GetGreen() + aBkgColor.GetBlue() ) / 3;
+ sal_uInt16 nColor = ( aBkgColor.GetRed() + aBkgColor.GetGreen() + aBkgColor.GetBlue() ) / 3;
if ( nColor > 128 )
aPenColor.SetColor ( COL_BLACK );
else
aPenColor.SetColor( COL_WHITE );
- aFocus.bOn = TRUE;
+ aFocus.bOn = sal_True;
aFocus.aPenColor = aPenColor;
aFocus.aRect = rRect;
}
void SvxIconChoiceCtrl_Impl::HideFocus ()
{
- aFocus.bOn = FALSE;
+ aFocus.bOn = sal_False;
}
void SvxIconChoiceCtrl_Impl::DrawFocusRect ( OutputDevice* pOut )
@@ -3644,12 +3644,12 @@ void SvxIconChoiceCtrl_Impl::DrawFocusRect ( OutputDevice* pOut )
pOut->DrawPolyLine ( aPolygon, aLineInfo );
}
-sal_Bool SvxIconChoiceCtrl_Impl::IsMnemonicChar( sal_Unicode cChar, ULONG& rPos ) const
+sal_Bool SvxIconChoiceCtrl_Impl::IsMnemonicChar( sal_Unicode cChar, sal_uLong& rPos ) const
{
sal_Bool bRet = sal_False;
const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper();
- ULONG nEntryCount = GetEntryCount();
- for ( ULONG i = 0; i < nEntryCount; ++i )
+ sal_uLong nEntryCount = GetEntryCount();
+ for ( sal_uLong i = 0; i < nEntryCount; ++i )
{
if ( rI18nHelper.MatchMnemonic( GetEntry( i )->GetText(), cChar ) )
{
@@ -3675,7 +3675,7 @@ IMPL_LINK(SvxIconChoiceCtrl_Impl, UserEventHdl, void*, nId )
else if( nId == EVENTID_SHOW_CURSOR )
{
nUserEventShowCursor = 0;
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
return 0;
}
@@ -3697,12 +3697,12 @@ void SvxIconChoiceCtrl_Impl::CancelUserEvents()
void SvxIconChoiceCtrl_Impl::InvalidateEntry( SvxIconChoiceCtrlEntry* pEntry )
{
if( pEntry == pCursor )
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
pView->Invalidate( pEntry->aRect );
Center( pEntry );
pView->Invalidate( pEntry->aRect );
if( pEntry == pCursor )
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
void SvxIconChoiceCtrl_Impl::EditEntry( SvxIconChoiceCtrlEntry* pEntry )
@@ -3711,13 +3711,13 @@ void SvxIconChoiceCtrl_Impl::EditEntry( SvxIconChoiceCtrlEntry* pEntry )
if( !pEntry )
return;
- StopEntryEditing( TRUE );
+ StopEntryEditing( sal_True );
DELETEZ(pEdit);
SetNoSelection();
pCurEditedEntry = pEntry;
- String aEntryText( pView->GetEntryText( pEntry, TRUE ) );
- Rectangle aRect( CalcTextRect( pEntry, 0, TRUE, &aEntryText ) );
+ String aEntryText( pView->GetEntryText( pEntry, sal_True ) );
+ Rectangle aRect( CalcTextRect( pEntry, 0, sal_True, &aEntryText ) );
MakeVisible( aRect );
Point aPos( aRect.TopLeft() );
aPos = pView->GetPixelPos( aPos );
@@ -3758,7 +3758,7 @@ IMPL_LINK( SvxIconChoiceCtrl_Impl, TextEditEndedHdl, IcnViewEdit_Impl*, EMPTYARG
if( pView->EditedEntry( pCurEditedEntry, aText, pEdit->EditingCanceled() ) )
InvalidateEntry( pCurEditedEntry );
if( !GetSelectionCount() )
- SelectEntry( pCurEditedEntry, TRUE );
+ SelectEntry( pCurEditedEntry, sal_True );
pEdit->Hide();
if( pEdit->IsGrabFocus() )
@@ -3769,13 +3769,13 @@ IMPL_LINK( SvxIconChoiceCtrl_Impl, TextEditEndedHdl, IcnViewEdit_Impl*, EMPTYARG
return 0;
}
-void SvxIconChoiceCtrl_Impl::StopEntryEditing( BOOL bCancel )
+void SvxIconChoiceCtrl_Impl::StopEntryEditing( sal_Bool bCancel )
{
if( pEdit )
pEdit->StopEditing( bCancel );
}
-void SvxIconChoiceCtrl_Impl::LockEntryPos( SvxIconChoiceCtrlEntry* pEntry, BOOL bLock )
+void SvxIconChoiceCtrl_Impl::LockEntryPos( SvxIconChoiceCtrlEntry* pEntry, sal_Bool bLock )
{
if( bLock )
pEntry->SetFlags( ICNVIEW_FLAG_POS_LOCKED );
@@ -3783,7 +3783,7 @@ void SvxIconChoiceCtrl_Impl::LockEntryPos( SvxIconChoiceCtrlEntry* pEntry, BOOL
pEntry->ClearFlags( ICNVIEW_FLAG_POS_LOCKED );
}
-SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetFirstSelectedEntry( ULONG& rPos ) const
+SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetFirstSelectedEntry( sal_uLong& rPos ) const
{
if( !GetSelectionCount() )
return 0;
@@ -3794,10 +3794,10 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetFirstSelectedEntry( ULONG& rP
return pCurHighlightFrame;
}
- ULONG nCount = aEntries.Count();
+ sal_uLong nCount = aEntries.Count();
if( !pHead )
{
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur );
if( pEntry->IsSelected() )
@@ -3829,14 +3829,14 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetFirstSelectedEntry( ULONG& rP
}
// kein Round Robin!
-SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetNextSelectedEntry( ULONG& rStartPos ) const
+SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetNextSelectedEntry( sal_uLong& rStartPos ) const
{
- ULONG nCount = aEntries.Count();
+ sal_uLong nCount = aEntries.Count();
if( rStartPos > nCount || !GetSelectionCount() )
return 0;
if( !pHead )
{
- for( ULONG nCur = rStartPos+1; nCur < nCount; nCur++ )
+ for( sal_uLong nCur = rStartPos+1; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur );
if( pEntry->IsSelected() )
@@ -3865,15 +3865,15 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetNextSelectedEntry( ULONG& rSt
return 0;
}
-void SvxIconChoiceCtrl_Impl::SelectAll( BOOL bSelect, BOOL bPaint )
+void SvxIconChoiceCtrl_Impl::SelectAll( sal_Bool bSelect, sal_Bool bPaint )
{
- bPaint = TRUE;
+ bPaint = sal_True;
- ULONG nCount = aEntries.Count();
- for( ULONG nCur = 0; nCur < nCount && (bSelect || GetSelectionCount() ); nCur++ )
+ sal_uLong nCount = aEntries.Count();
+ for( sal_uLong nCur = 0; nCur < nCount && (bSelect || GetSelectionCount() ); nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)aEntries.GetObject( nCur );
- SelectEntry( pEntry, bSelect, TRUE, TRUE, bPaint );
+ SelectEntry( pEntry, bSelect, sal_True, sal_True, bPaint );
}
nFlags &= (~F_ADD_MODE);
pAnchor = 0;
@@ -3883,7 +3883,7 @@ void SvxIconChoiceCtrl_Impl::SaveSelection( List** ppList )
{
if( !*ppList )
*ppList = new List;
- ULONG nPos;
+ sal_uLong nPos;
SvxIconChoiceCtrlEntry* pEntry = GetFirstSelectedEntry( nPos );
while( pEntry && GetSelectionCount() != (*ppList)->Count() )
{
@@ -3896,12 +3896,12 @@ IcnViewEdit_Impl::IcnViewEdit_Impl( SvtIconChoiceCtrl* pParent, const Point& rPo
const Size& rSize, const XubString& rData, const Link& rNotifyEditEnd ) :
MultiLineEdit( pParent, (pParent->GetStyle() & WB_ICON) ? WB_CENTER : WB_LEFT),
aCallBackHdl( rNotifyEditEnd ),
- bCanceled( FALSE ),
- bAlreadyInCallback( FALSE ),
- bGrabFocus( FALSE )
+ bCanceled( sal_False ),
+ bAlreadyInCallback( sal_False ),
+ bGrabFocus( sal_False )
{
Font aFont( pParent->GetPointFont() );
- aFont.SetTransparent( FALSE );
+ aFont.SetTransparent( sal_False );
SetControlFont( aFont );
if( !pParent->HasFontFillColor() )
{
@@ -3941,7 +3941,7 @@ void IcnViewEdit_Impl::CallCallBackHdl_Impl()
aTimer.Stop();
if ( !bAlreadyInCallback )
{
- bAlreadyInCallback = TRUE;
+ bAlreadyInCallback = sal_True;
GetpApp()->RemoveAccel( &aAccReturn );
GetpApp()->RemoveAccel( &aAccEscape );
Hide();
@@ -3957,16 +3957,16 @@ IMPL_LINK( IcnViewEdit_Impl, Timeout_Impl, Timer*, EMPTYARG )
IMPL_LINK( IcnViewEdit_Impl, ReturnHdl_Impl, Accelerator*, EMPTYARG )
{
- bCanceled = FALSE;
- bGrabFocus = TRUE;
+ bCanceled = sal_False;
+ bGrabFocus = sal_True;
CallCallBackHdl_Impl();
return 1;
}
IMPL_LINK( IcnViewEdit_Impl, EscapeHdl_Impl, Accelerator*, EMPTYARG )
{
- bCanceled = TRUE;
- bGrabFocus = TRUE;
+ bCanceled = sal_True;
+ bGrabFocus = sal_True;
CallCallBackHdl_Impl();
return 1;
}
@@ -3974,19 +3974,19 @@ IMPL_LINK( IcnViewEdit_Impl, EscapeHdl_Impl, Accelerator*, EMPTYARG )
void IcnViewEdit_Impl::KeyInput( const KeyEvent& rKEvt )
{
KeyCode aCode = rKEvt.GetKeyCode();
- USHORT nCode = aCode.GetCode();
+ sal_uInt16 nCode = aCode.GetCode();
switch ( nCode )
{
case KEY_ESCAPE:
- bCanceled = TRUE;
- bGrabFocus = TRUE;
+ bCanceled = sal_True;
+ bGrabFocus = sal_True;
CallCallBackHdl_Impl();
break;
case KEY_RETURN:
- bCanceled = FALSE;
- bGrabFocus = TRUE;
+ bCanceled = sal_False;
+ bGrabFocus = sal_True;
CallCallBackHdl_Impl();
break;
@@ -4002,7 +4002,7 @@ long IcnViewEdit_Impl::PreNotify( NotifyEvent& rNEvt )
if ( !bAlreadyInCallback &&
((!Application::GetFocusWindow()) || !IsChild(Application::GetFocusWindow())))
{
- bCanceled = FALSE;
+ bCanceled = sal_False;
aTimer.SetTimeout(10);
aTimer.SetTimeoutHdl(LINK(this,IcnViewEdit_Impl,Timeout_Impl));
aTimer.Start();
@@ -4011,7 +4011,7 @@ long IcnViewEdit_Impl::PreNotify( NotifyEvent& rNEvt )
return 0;
}
-void IcnViewEdit_Impl::StopEditing( BOOL bCancel )
+void IcnViewEdit_Impl::StopEditing( sal_Bool bCancel )
{
if ( !bAlreadyInCallback )
{
@@ -4020,22 +4020,22 @@ void IcnViewEdit_Impl::StopEditing( BOOL bCancel )
}
}
-ULONG SvxIconChoiceCtrl_Impl::GetEntryListPos( SvxIconChoiceCtrlEntry* pEntry ) const
+sal_uLong SvxIconChoiceCtrl_Impl::GetEntryListPos( SvxIconChoiceCtrlEntry* pEntry ) const
{
if( !(nFlags & F_ENTRYLISTPOS_VALID ))
((SvxIconChoiceCtrl_Impl*)this)->SetListPositions();
return pEntry->nPos;
}
-void SvxIconChoiceCtrl_Impl::SetEntryListPos( SvxIconChoiceCtrlEntry* pListEntry, ULONG nNewPos )
+void SvxIconChoiceCtrl_Impl::SetEntryListPos( SvxIconChoiceCtrlEntry* pListEntry, sal_uLong nNewPos )
{
- ULONG nCurPos = GetEntryListPos( pListEntry );
+ sal_uLong nCurPos = GetEntryListPos( pListEntry );
if( nCurPos == nNewPos )
return;
aEntries.List::Remove( nCurPos );
aEntries.List::Insert( (void*)pListEntry, nNewPos );
// Eintragspositionen anpassen
- ULONG nStart, nEnd;
+ sal_uLong nStart, nEnd;
if( nNewPos < nCurPos )
{
nStart = nNewPos;
@@ -4053,19 +4053,19 @@ void SvxIconChoiceCtrl_Impl::SetEntryListPos( SvxIconChoiceCtrlEntry* pListEntry
}
}
-void SvxIconChoiceCtrl_Impl::SetEntryFlags( SvxIconChoiceCtrlEntry* pEntry, USHORT nEntryFlags )
+void SvxIconChoiceCtrl_Impl::SetEntryFlags( SvxIconChoiceCtrlEntry* pEntry, sal_uInt16 nEntryFlags )
{
pEntry->nFlags = nEntryFlags;
if( nEntryFlags & ICNVIEW_FLAG_POS_MOVED )
nFlags |= F_MOVED_ENTRIES;
}
-SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GoLeftRight( SvxIconChoiceCtrlEntry* pStart, BOOL bRight )
+SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GoLeftRight( SvxIconChoiceCtrlEntry* pStart, sal_Bool bRight )
{
return pImpCursor->GoLeftRight( pStart, bRight );
}
-SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GoUpDown( SvxIconChoiceCtrlEntry* pStart, BOOL bDown )
+SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GoUpDown( SvxIconChoiceCtrlEntry* pStart, sal_Bool bDown )
{
return pImpCursor->GoUpDown( pStart, bDown );
}
@@ -4116,14 +4116,14 @@ void SvxIconChoiceCtrl_Impl::InitSettings()
}
}
-EntryList_Impl::EntryList_Impl( SvxIconChoiceCtrl_Impl* pOwner, USHORT _nInitSize , USHORT _nReSize ) :
+EntryList_Impl::EntryList_Impl( SvxIconChoiceCtrl_Impl* pOwner, sal_uInt16 _nInitSize , sal_uInt16 _nReSize ) :
List( _nInitSize, _nReSize ),
_pOwner( pOwner )
{
_pOwner->pHead = 0;
}
-EntryList_Impl::EntryList_Impl( SvxIconChoiceCtrl_Impl* pOwner, USHORT _nBlockSize, USHORT _nInitSize, USHORT _nReSize ) :
+EntryList_Impl::EntryList_Impl( SvxIconChoiceCtrl_Impl* pOwner, sal_uInt16 _nBlockSize, sal_uInt16 _nInitSize, sal_uInt16 _nReSize ) :
List( _nBlockSize, _nInitSize, _nReSize ),
_pOwner( pOwner )
{
@@ -4141,14 +4141,14 @@ void EntryList_Impl::Clear()
List::Clear();
}
-void EntryList_Impl::Insert( SvxIconChoiceCtrlEntry* pEntry, ULONG nPos )
+void EntryList_Impl::Insert( SvxIconChoiceCtrlEntry* pEntry, sal_uLong nPos )
{
List::Insert( pEntry, nPos );
if( _pOwner->pHead )
pEntry->SetBacklink( _pOwner->pHead->pblink );
}
-SvxIconChoiceCtrlEntry* EntryList_Impl::Remove( ULONG nPos )
+SvxIconChoiceCtrlEntry* EntryList_Impl::Remove( sal_uLong nPos )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)List::Remove( nPos );
DBG_ASSERT(pEntry,"EntryList_Impl::Remove > Entry not found");
@@ -4182,14 +4182,14 @@ void EntryList_Impl::Removed_Impl( SvxIconChoiceCtrlEntry* pEntry )
void SvxIconChoiceCtrl_Impl::SetPositionMode( SvxIconChoiceCtrlPositionMode eMode )
{
- ULONG nCur;
+ sal_uLong nCur;
if( eMode == ePositionMode )
return;
SvxIconChoiceCtrlPositionMode eOldMode = ePositionMode;
ePositionMode = eMode;
- ULONG nCount = aEntries.Count();
+ sal_uLong nCount = aEntries.Count();
if( eOldMode == IcnViewPositionModeAutoArrange )
{
@@ -4258,12 +4258,12 @@ void SvxIconChoiceCtrl_Impl::SetEntryPredecessor( SvxIconChoiceCtrlEntry* pEntry
if( pEntry == pPredecessor )
return;
- ULONG nPos1 = GetEntryListPos( pEntry );
+ sal_uLong nPos1 = GetEntryListPos( pEntry );
if( !pHead )
{
if( pPredecessor )
{
- ULONG nPos2 = GetEntryListPos( pPredecessor );
+ sal_uLong nPos2 = GetEntryListPos( pPredecessor );
if( nPos1 == (nPos2 + 1) )
return; // ist schon Vorgaenger
}
@@ -4277,16 +4277,16 @@ void SvxIconChoiceCtrl_Impl::SetEntryPredecessor( SvxIconChoiceCtrlEntry* pEntry
if( !pPredecessor && pHead == pEntry )
return; // ist schon der Erste
- BOOL bSetHead = FALSE;
+ sal_Bool bSetHead = sal_False;
if( !pPredecessor )
{
- bSetHead = TRUE;
+ bSetHead = sal_True;
pPredecessor = pHead->pblink;
}
if( pEntry == pHead )
{
pHead = pHead->pflink;
- bSetHead = FALSE;
+ bSetHead = sal_False;
}
if( pEntry != pPredecessor )
{
@@ -4299,12 +4299,12 @@ void SvxIconChoiceCtrl_Impl::SetEntryPredecessor( SvxIconChoiceCtrlEntry* pEntry
aAutoArrangeTimer.Start();
}
-BOOL SvxIconChoiceCtrl_Impl::GetEntryPredecessor( SvxIconChoiceCtrlEntry* pEntry,
+sal_Bool SvxIconChoiceCtrl_Impl::GetEntryPredecessor( SvxIconChoiceCtrlEntry* pEntry,
SvxIconChoiceCtrlEntry** ppPredecessor )
{
*ppPredecessor = 0;
if( !pHead )
- return FALSE;
+ return sal_False;
DBG_ASSERT(pEntry->pblink,"GetEntryPredecessor: Backward link not set");
DBG_ASSERT(pEntry->pflink,"GetEntryPredecessor: Forward link not set");
@@ -4312,14 +4312,14 @@ BOOL SvxIconChoiceCtrl_Impl::GetEntryPredecessor( SvxIconChoiceCtrlEntry* pEntry
{
SvxIconChoiceCtrlEntry* pFirst = (SvxIconChoiceCtrlEntry*)aEntries.GetObject(0);
if( pFirst != pEntry )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
*ppPredecessor = pEntry->pblink;
if( !(pEntry->nFlags & ICNVIEW_FLAG_PRED_SET) &&
(GetEntryListPos( *ppPredecessor ) + 1) == GetEntryListPos( pEntry ))
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::FindEntryPredecessor( SvxIconChoiceCtrlEntry* pEntry,
@@ -4328,8 +4328,8 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::FindEntryPredecessor( SvxIconCho
Point aPos( rPosTopLeft ); //TopLeft
Rectangle aCenterRect( CalcBmpRect( pEntry, &aPos ));
Point aNewPos( aCenterRect.Center() );
- ULONG nGrid = GetPredecessorGrid( aNewPos );
- ULONG nCount = aEntries.Count();
+ sal_uLong nGrid = GetPredecessorGrid( aNewPos );
+ sal_uLong nCount = aEntries.Count();
if( nGrid == ULONG_MAX )
return 0;
if( nGrid >= nCount )
@@ -4339,26 +4339,26 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::FindEntryPredecessor( SvxIconCho
SvxIconChoiceCtrlEntry* pCur = pHead; // Grid 0
// todo: Liste von hinten aufrollen wenn nGrid > nCount/2
- for( ULONG nCur = 0; nCur < nGrid; nCur++ )
+ for( sal_uLong nCur = 0; nCur < nGrid; nCur++ )
pCur = pCur->pflink;
return pCur;
}
-ULONG SvxIconChoiceCtrl_Impl::GetPredecessorGrid( const Point& rPos) const
+sal_uLong SvxIconChoiceCtrl_Impl::GetPredecessorGrid( const Point& rPos) const
{
Point aPos( rPos );
aPos.X() -= LROFFS_WINBORDER;
aPos.Y() -= TBOFFS_WINBORDER;
- USHORT nMaxCol = (USHORT)(aVirtOutputSize.Width() / nGridDX);
+ sal_uInt16 nMaxCol = (sal_uInt16)(aVirtOutputSize.Width() / nGridDX);
if( nMaxCol )
nMaxCol--;
- USHORT nGridX = (USHORT)(aPos.X() / nGridDX);
+ sal_uInt16 nGridX = (sal_uInt16)(aPos.X() / nGridDX);
if( nGridX > nMaxCol )
nGridX = nMaxCol;
- USHORT nGridY = (USHORT)(aPos.Y() / nGridDY);
- USHORT nGridsX = (USHORT)(aOutputSize.Width() / nGridDX);
- ULONG nGrid = (nGridY * nGridsX) + nGridX;
+ sal_uInt16 nGridY = (sal_uInt16)(aPos.Y() / nGridDY);
+ sal_uInt16 nGridsX = (sal_uInt16)(aOutputSize.Width() / nGridDX);
+ sal_uLong nGrid = (nGridY * nGridsX) + nGridX;
long nMiddle = (nGridX * nGridDX) + (nGridDX / 2);
if( rPos.X() < nMiddle )
{
@@ -4378,27 +4378,27 @@ void SvxIconChoiceCtrl_Impl::Flush()
}
}
-BOOL SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt )
+sal_Bool SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt )
{
if ( !(rHEvt.GetMode() & HELPMODE_QUICK ) )
- return FALSE;
+ return sal_False;
Point aPos( pView->ScreenToOutputPixel(rHEvt.GetMousePosPixel() ) );
aPos -= pView->GetMapMode().GetOrigin();
- SvxIconChoiceCtrlEntry* pEntry = GetEntry( aPos, TRUE );
+ SvxIconChoiceCtrlEntry* pEntry = GetEntry( aPos, sal_True );
if ( !pEntry )
- return FALSE;
+ return sal_False;
String sQuickHelpText = pEntry->GetQuickHelpText();
- String aEntryText( pView->GetEntryText( pEntry, FALSE ) );
- Rectangle aTextRect( CalcTextRect( pEntry, 0, FALSE, &aEntryText ) );
+ String aEntryText( pView->GetEntryText( pEntry, sal_False ) );
+ Rectangle aTextRect( CalcTextRect( pEntry, 0, sal_False, &aEntryText ) );
if ( ( !aTextRect.IsInside( aPos ) || !aEntryText.Len() ) && !sQuickHelpText.Len() )
- return FALSE;
+ return sal_False;
Rectangle aOptTextRect( aTextRect );
aOptTextRect.Bottom() = LONG_MAX;
- USHORT nNewFlags = nCurTextDrawFlags;
+ sal_uInt16 nNewFlags = nCurTextDrawFlags;
nNewFlags &= ~( TEXT_DRAW_CLIP | TEXT_DRAW_ENDELLIPSIS );
aOptTextRect = pView->GetTextRect( aOptTextRect, aEntryText, nNewFlags );
if ( aOptTextRect != aTextRect || sQuickHelpText.Len() > 0 )
@@ -4419,7 +4419,7 @@ BOOL SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt )
Help::ShowQuickHelp( (Window*)pView, aOptTextRect, sHelpText, QUICKHELP_LEFT | QUICKHELP_VCENTER );
}
- return TRUE;
+ return sal_True;
}
void SvxIconChoiceCtrl_Impl::ClearColumnList()
@@ -4427,8 +4427,8 @@ void SvxIconChoiceCtrl_Impl::ClearColumnList()
if( !pColumns )
return;
- const USHORT nCount = pColumns->Count();
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ const sal_uInt16 nCount = pColumns->Count();
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlColumnInfo* pInfo = (SvxIconChoiceCtrlColumnInfo*)
pColumns->GetObject( nCur );
@@ -4437,7 +4437,7 @@ void SvxIconChoiceCtrl_Impl::ClearColumnList()
DELETEZ(pColumns);
}
-void SvxIconChoiceCtrl_Impl::SetColumn( USHORT nIndex, const SvxIconChoiceCtrlColumnInfo& rInfo)
+void SvxIconChoiceCtrl_Impl::SetColumn( sal_uInt16 nIndex, const SvxIconChoiceCtrlColumnInfo& rInfo)
{
if( !pColumns )
pColumns = new SvPtrarr;
@@ -4467,22 +4467,22 @@ void SvxIconChoiceCtrl_Impl::SetColumn( USHORT nIndex, const SvxIconChoiceCtrlCo
Arrange( IsAutoArrange() );
}
-const SvxIconChoiceCtrlColumnInfo* SvxIconChoiceCtrl_Impl::GetColumn( USHORT nIndex ) const
+const SvxIconChoiceCtrlColumnInfo* SvxIconChoiceCtrl_Impl::GetColumn( sal_uInt16 nIndex ) const
{
if( !pColumns || nIndex >= pColumns->Count() )
return 0;
return (const SvxIconChoiceCtrlColumnInfo*)pColumns->GetObject( nIndex );
}
-const SvxIconChoiceCtrlColumnInfo* SvxIconChoiceCtrl_Impl::GetItemColumn( USHORT nSubItem,
+const SvxIconChoiceCtrlColumnInfo* SvxIconChoiceCtrl_Impl::GetItemColumn( sal_uInt16 nSubItem,
long& rLeft ) const
{
rLeft = 0;
if( !pColumns )
return 0;
- const USHORT nCount = pColumns->Count();
+ const sal_uInt16 nCount = pColumns->Count();
const SvxIconChoiceCtrlColumnInfo* pCol = 0;
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
pCol = (const SvxIconChoiceCtrlColumnInfo*)pColumns->GetObject( nCur );
if( !pCol || pCol->GetSubItem() == nSubItem )
@@ -4493,7 +4493,7 @@ const SvxIconChoiceCtrlColumnInfo* SvxIconChoiceCtrl_Impl::GetItemColumn( USHORT
}
void SvxIconChoiceCtrl_Impl::DrawHighlightFrame(
- OutputDevice* pOut, const Rectangle& rBmpRect, BOOL bHide )
+ OutputDevice* pOut, const Rectangle& rBmpRect, sal_Bool bHide )
{
Rectangle aBmpRect( rBmpRect );
long nBorder = 2;
@@ -4509,7 +4509,7 @@ void SvxIconChoiceCtrl_Impl::DrawHighlightFrame(
else
{
DecorationView aDecoView( pOut );
- USHORT nDecoFlags;
+ sal_uInt16 nDecoFlags;
if ( bHighlightFramePressed )
nDecoFlags = FRAME_HIGHLIGHT_TESTBACKGROUND | FRAME_HIGHLIGHT_IN;
else
@@ -4519,20 +4519,20 @@ void SvxIconChoiceCtrl_Impl::DrawHighlightFrame(
}
void SvxIconChoiceCtrl_Impl::SetEntryHighlightFrame( SvxIconChoiceCtrlEntry* pEntry,
- BOOL bKeepHighlightFlags )
+ sal_Bool bKeepHighlightFlags )
{
if( pEntry == pCurHighlightFrame )
return;
if( !bKeepHighlightFlags )
- bHighlightFramePressed = FALSE;
+ bHighlightFramePressed = sal_False;
HideEntryHighlightFrame();
pCurHighlightFrame = pEntry;
if( pEntry )
{
Rectangle aBmpRect( CalcFocusRect(pEntry) );
- DrawHighlightFrame( pView, aBmpRect, FALSE );
+ DrawHighlightFrame( pView, aBmpRect, sal_False );
}
}
@@ -4544,7 +4544,7 @@ void SvxIconChoiceCtrl_Impl::HideEntryHighlightFrame()
SvxIconChoiceCtrlEntry* pEntry = pCurHighlightFrame;
pCurHighlightFrame = 0;
Rectangle aBmpRect( CalcFocusRect(pEntry) );
- DrawHighlightFrame( pView, aBmpRect, TRUE );
+ DrawHighlightFrame( pView, aBmpRect, sal_True );
}
void SvxIconChoiceCtrl_Impl::CallSelectHandler( SvxIconChoiceCtrlEntry* )
@@ -4585,7 +4585,7 @@ Point SvxIconChoiceCtrl_Impl::GetPopupMenuPosPixel() const
SvxIconChoiceCtrlEntry* pEntry = GetCurEntry();
if( !pEntry || !pEntry->IsSelected() )
{
- ULONG nNext;
+ sal_uLong nNext;
pEntry = GetFirstSelectedEntry( nNext );
}
if( pEntry )
@@ -4597,14 +4597,14 @@ Point SvxIconChoiceCtrl_Impl::GetPopupMenuPosPixel() const
return aResult;
}
-void SvxIconChoiceCtrl_Impl::SetOrigin( const Point& rPos, BOOL bDoNotUpdateWallpaper )
+void SvxIconChoiceCtrl_Impl::SetOrigin( const Point& rPos, sal_Bool bDoNotUpdateWallpaper )
{
MapMode aMapMode( pView->GetMapMode() );
aMapMode.SetOrigin( rPos );
pView->SetMapMode( aMapMode );
if( !bDoNotUpdateWallpaper )
{
- BOOL bScrollable = pView->GetBackground().IsScrollable();
+ sal_Bool bScrollable = pView->GetBackground().IsScrollable();
if( pView->HasBackground() && !bScrollable )
{
Rectangle aRect( GetOutputRect());
@@ -4615,8 +4615,8 @@ void SvxIconChoiceCtrl_Impl::SetOrigin( const Point& rPos, BOOL bDoNotUpdateWall
}
}
-ULONG SvxIconChoiceCtrl_Impl::GetGridCount( const Size& rSize, BOOL bCheckScrBars,
- BOOL bSmartScrBar ) const
+sal_uLong SvxIconChoiceCtrl_Impl::GetGridCount( const Size& rSize, sal_Bool bCheckScrBars,
+ sal_Bool bSmartScrBar ) const
{
Size aSize( rSize );
if( bCheckScrBars && aHorSBar.IsVisible() )
@@ -4634,19 +4634,19 @@ ULONG SvxIconChoiceCtrl_Impl::GetGridCount( const Size& rSize, BOOL bCheckScrBar
if( aSize.Height() < 0 )
aSize.Height() = 0;
- return IcnGridMap_Impl::GetGridCount( aSize, (USHORT)nGridDX, (USHORT)nGridDY );
+ return IcnGridMap_Impl::GetGridCount( aSize, (sal_uInt16)nGridDX, (sal_uInt16)nGridDY );
}
-BOOL SvxIconChoiceCtrl_Impl::HandleShortCutKey( const KeyEvent& rKEvt )
+sal_Bool SvxIconChoiceCtrl_Impl::HandleShortCutKey( const KeyEvent& rKEvt )
{
StopEditTimer();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
DBG_ASSERT( rKEvt.GetKeyCode().IsMod2(), "*SvxIconChoiceCtrl_Impl::HandleShortCutKey(): no <ALT> pressed!?" );
sal_Unicode cChar = rKEvt.GetCharCode();
- ULONG nPos = (ULONG)-1;
+ sal_uLong nPos = (sal_uLong)-1;
if( cChar && IsMnemonicChar( cChar, nPos ) )
{
@@ -4655,7 +4655,7 @@ BOOL SvxIconChoiceCtrl_Impl::HandleShortCutKey( const KeyEvent& rKEvt )
SvxIconChoiceCtrlEntry* pOldCursor = pCursor;
if( pNewCursor != pOldCursor )
{
- SetCursor_Impl( pOldCursor, pNewCursor, FALSE, FALSE, FALSE );
+ SetCursor_Impl( pOldCursor, pNewCursor, sal_False, sal_False, sal_False );
if( pNewCursor != NULL )
{
@@ -4665,7 +4665,7 @@ BOOL SvxIconChoiceCtrl_Impl::HandleShortCutKey( const KeyEvent& rKEvt )
pCurHighlightFrame = NULL;
}
}
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -4673,7 +4673,7 @@ BOOL SvxIconChoiceCtrl_Impl::HandleShortCutKey( const KeyEvent& rKEvt )
// -----------------------------------------------------------------------
-void SvxIconChoiceCtrl_Impl::CallEventListeners( ULONG nEvent, void* pData )
+void SvxIconChoiceCtrl_Impl::CallEventListeners( sal_uLong nEvent, void* pData )
{
pView->CallImplEventListeners( nEvent, pData );
}
diff --git a/svtools/source/contnr/imivctl2.cxx b/svtools/source/contnr/imivctl2.cxx
index 7cb92e8cef07..539477c03599 100644
--- a/svtools/source/contnr/imivctl2.cxx
+++ b/svtools/source/contnr/imivctl2.cxx
@@ -47,14 +47,14 @@ IcnCursor_Impl::~IcnCursor_Impl()
delete[] pRows;
}
-USHORT IcnCursor_Impl::GetSortListPos( SvPtrarr* pList, long nValue,
+sal_uInt16 IcnCursor_Impl::GetSortListPos( SvPtrarr* pList, long nValue,
int bVertical )
{
- USHORT nCount = (USHORT)pList->Count();
+ sal_uInt16 nCount = (sal_uInt16)pList->Count();
if( !nCount )
return 0;
- USHORT nCurPos = 0;
+ sal_uInt16 nCurPos = 0;
long nPrevValue = LONG_MIN;
while( nCount )
{
@@ -66,7 +66,7 @@ USHORT IcnCursor_Impl::GetSortListPos( SvPtrarr* pList, long nValue,
else
nCurValue = rRect.Left();
if( nValue >= nPrevValue && nValue <= nCurValue )
- return (USHORT)nCurPos;
+ return (sal_uInt16)nCurPos;
nPrevValue = nCurValue;
nCount--;
nCurPos++;
@@ -84,8 +84,8 @@ void IcnCursor_Impl::ImplCreate()
pColumns = new SvPtrarr[ nCols ];
pRows = new SvPtrarr[ nRows ];
- ULONG nCount = pView->aEntries.Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ sal_uLong nCount = pView->aEntries.Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)pView->aEntries.GetObject( nCur );
// const Rectangle& rRect = pView->GetEntryBoundRect( pEntry );
@@ -99,10 +99,10 @@ void IcnCursor_Impl::ImplCreate()
if( nX >= nCols )
nX = sal::static_int_cast< short >(nCols - 1);
- USHORT nIns = GetSortListPos( &pColumns[nX], rRect.Top(), TRUE );
+ sal_uInt16 nIns = GetSortListPos( &pColumns[nX], rRect.Top(), sal_True );
pColumns[ nX ].Insert( pEntry, nIns );
- nIns = GetSortListPos( &pRows[nY], rRect.Left(), FALSE );
+ nIns = GetSortListPos( &pRows[nY], rRect.Left(), sal_False );
pRows[ nY ].Insert( pEntry, nIns );
pEntry->nX = nX;
@@ -127,12 +127,12 @@ void IcnCursor_Impl::Clear()
}
}
-SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(USHORT nCol,USHORT nTop,USHORT nBottom,
- USHORT, BOOL bDown, BOOL bSimple )
+SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(sal_uInt16 nCol,sal_uInt16 nTop,sal_uInt16 nBottom,
+ sal_uInt16, sal_Bool bDown, sal_Bool bSimple )
{
DBG_ASSERT(pCurEntry,"SearchCol: No reference entry");
SvPtrarr* pList = &(pColumns[ nCol ]);
- const USHORT nCount = pList->Count();
+ const sal_uInt16 nCount = pList->Count();
if( !nCount )
return 0;
@@ -140,7 +140,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(USHORT nCol,USHORT nTop,USHORT
if( bSimple )
{
- USHORT nListPos = pList->GetPos( pCurEntry );
+ sal_uInt16 nListPos = pList->GetPos( pCurEntry );
DBG_ASSERT(nListPos!=0xffff,"Entry not in Col-List");
if( bDown )
{
@@ -173,18 +173,18 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(USHORT nCol,USHORT nTop,USHORT
if( nTop > nBottom )
{
- USHORT nTemp = nTop;
+ sal_uInt16 nTemp = nTop;
nTop = nBottom;
nBottom = nTemp;
}
long nMinDistance = LONG_MAX;
SvxIconChoiceCtrlEntry* pResult = 0;
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)(pList->GetObject( nCur ));
if( pEntry != pCurEntry )
{
- USHORT nY = pEntry->nY;
+ sal_uInt16 nY = pEntry->nY;
if( nY >= nTop && nY <= nBottom )
{
const Rectangle& rRect = pView->GetEntryBoundRect( pEntry );
@@ -202,12 +202,12 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchCol(USHORT nCol,USHORT nTop,USHORT
return pResult;
}
-SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(USHORT nRow,USHORT nLeft,USHORT nRight,
- USHORT, BOOL bRight, BOOL bSimple )
+SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(sal_uInt16 nRow,sal_uInt16 nLeft,sal_uInt16 nRight,
+ sal_uInt16, sal_Bool bRight, sal_Bool bSimple )
{
DBG_ASSERT(pCurEntry,"SearchRow: No reference entry");
SvPtrarr* pList = &(pRows[ nRow ]);
- const USHORT nCount = pList->Count();
+ const sal_uInt16 nCount = pList->Count();
if( !nCount )
return 0;
@@ -215,7 +215,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(USHORT nRow,USHORT nLeft,USHOR
if( bSimple )
{
- USHORT nListPos = pList->GetPos( pCurEntry );
+ sal_uInt16 nListPos = pList->GetPos( pCurEntry );
DBG_ASSERT(nListPos!=0xffff,"Entry not in Row-List");
if( bRight )
{
@@ -248,18 +248,18 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(USHORT nRow,USHORT nLeft,USHOR
}
if( nRight < nLeft )
{
- USHORT nTemp = nRight;
+ sal_uInt16 nTemp = nRight;
nRight = nLeft;
nLeft = nTemp;
}
long nMinDistance = LONG_MAX;
SvxIconChoiceCtrlEntry* pResult = 0;
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)(pList->GetObject( nCur ));
if( pEntry != pCurEntry )
{
- USHORT nX = pEntry->nX;
+ sal_uInt16 nX = pEntry->nX;
if( nX >= nLeft && nX <= nRight )
{
const Rectangle& rRect = pView->GetEntryBoundRect( pEntry );
@@ -281,7 +281,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(USHORT nRow,USHORT nLeft,USHOR
/*
Sucht ab dem uebergebenen Eintrag den naechsten rechts- bzw.
- linksstehenden. Suchverfahren am Beispiel bRight = TRUE:
+ linksstehenden. Suchverfahren am Beispiel bRight = sal_True:
c
b c
@@ -296,21 +296,21 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::SearchRow(USHORT nRow,USHORT nLeft,USHOR
a,b,c : 2., 3., 4. Suchrechteck
*/
-SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoLeftRight( SvxIconChoiceCtrlEntry* pCtrlEntry, BOOL bRight )
+SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoLeftRight( SvxIconChoiceCtrlEntry* pCtrlEntry, sal_Bool bRight )
{
SvxIconChoiceCtrlEntry* pResult;
pCurEntry = pCtrlEntry;
Create();
- USHORT nY = pCtrlEntry->nY;
- USHORT nX = pCtrlEntry->nX;
+ sal_uInt16 nY = pCtrlEntry->nY;
+ sal_uInt16 nX = pCtrlEntry->nX;
DBG_ASSERT(nY< nRows,"GoLeftRight:Bad column");
DBG_ASSERT(nX< nCols,"GoLeftRight:Bad row");
// Nachbar auf gleicher Zeile ?
if( bRight )
pResult = SearchRow(
- nY, nX, sal::static_int_cast< USHORT >(nCols-1), nX, TRUE, TRUE );
+ nY, nX, sal::static_int_cast< sal_uInt16 >(nCols-1), nX, sal_True, sal_True );
else
- pResult = SearchRow( nY, nX ,0, nX, FALSE, TRUE );
+ pResult = SearchRow( nY, nX ,0, nX, sal_False, sal_True );
if( pResult )
return pResult;
@@ -328,11 +328,11 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoLeftRight( SvxIconChoiceCtrlEntry* pCt
nLastCol = -1; // 0-1
}
- USHORT nRowMin = nY;
- USHORT nRowMax = nY;
+ sal_uInt16 nRowMin = nY;
+ sal_uInt16 nRowMax = nY;
do
{
- SvxIconChoiceCtrlEntry* pEntry = SearchCol((USHORT)nCurCol,nRowMin,nRowMax,nY,TRUE, FALSE);
+ SvxIconChoiceCtrlEntry* pEntry = SearchCol((sal_uInt16)nCurCol,nRowMin,nRowMax,nY,sal_True, sal_False);
if( pEntry )
return pEntry;
if( nRowMin )
@@ -344,7 +344,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoLeftRight( SvxIconChoiceCtrlEntry* pCt
return 0;
}
-SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoPageUpDown( SvxIconChoiceCtrlEntry* pStart, BOOL bDown)
+SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoPageUpDown( SvxIconChoiceCtrlEntry* pStart, sal_Bool bDown)
{
if( pView->IsAutoArrange() && !(pView->nWinBits & WB_ALIGN_TOP) )
{
@@ -366,7 +366,7 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoPageUpDown( SvxIconChoiceCtrlEntry* pS
nNewPos = 0;
}
if( nPos != nNewPos )
- return (SvxIconChoiceCtrlEntry*)pView->aEntries.GetObject( (ULONG)nNewPos );
+ return (SvxIconChoiceCtrlEntry*)pView->aEntries.GetObject( (sal_uLong)nNewPos );
return 0;
}
long nOpt = pView->GetEntryBoundRect( pStart ).Top();
@@ -404,11 +404,11 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoPageUpDown( SvxIconChoiceCtrlEntry* pS
return 0;
}
-SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoUpDown( SvxIconChoiceCtrlEntry* pCtrlEntry, BOOL bDown)
+SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoUpDown( SvxIconChoiceCtrlEntry* pCtrlEntry, sal_Bool bDown)
{
if( pView->IsAutoArrange() && !(pView->nWinBits & WB_ALIGN_TOP) )
{
- ULONG nPos = pView->GetEntryListPos( pCtrlEntry );
+ sal_uLong nPos = pView->GetEntryListPos( pCtrlEntry );
if( bDown && nPos < (pView->aEntries.Count() - 1) )
return (SvxIconChoiceCtrlEntry*)pView->aEntries.GetObject( nPos + 1 );
else if( !bDown && nPos > 0 )
@@ -419,17 +419,17 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoUpDown( SvxIconChoiceCtrlEntry* pCtrlE
SvxIconChoiceCtrlEntry* pResult;
pCurEntry = pCtrlEntry;
Create();
- USHORT nY = pCtrlEntry->nY;
- USHORT nX = pCtrlEntry->nX;
+ sal_uInt16 nY = pCtrlEntry->nY;
+ sal_uInt16 nX = pCtrlEntry->nX;
DBG_ASSERT(nY<nRows,"GoUpDown:Bad column");
DBG_ASSERT(nX<nCols,"GoUpDown:Bad row");
// Nachbar in gleicher Spalte ?
if( bDown )
pResult = SearchCol(
- nX, nY, sal::static_int_cast< USHORT >(nRows-1), nY, TRUE, TRUE );
+ nX, nY, sal::static_int_cast< sal_uInt16 >(nRows-1), nY, sal_True, sal_True );
else
- pResult = SearchCol( nX, nY ,0, nY, FALSE, TRUE );
+ pResult = SearchCol( nX, nY ,0, nY, sal_False, sal_True );
if( pResult )
return pResult;
@@ -447,11 +447,11 @@ SvxIconChoiceCtrlEntry* IcnCursor_Impl::GoUpDown( SvxIconChoiceCtrlEntry* pCtrlE
nLastRow = -1; // 0-1
}
- USHORT nColMin = nX;
- USHORT nColMax = nX;
+ sal_uInt16 nColMin = nX;
+ sal_uInt16 nColMax = nX;
do
{
- SvxIconChoiceCtrlEntry* pEntry = SearchRow((USHORT)nCurRow,nColMin,nColMax,nX,TRUE, FALSE);
+ SvxIconChoiceCtrlEntry* pEntry = SearchRow((sal_uInt16)nCurRow,nColMin,nColMax,nX,sal_True, sal_False);
if( pEntry )
return pEntry;
if( nColMin )
@@ -493,23 +493,23 @@ void IcnCursor_Impl::CreateGridAjustData( SvPtrarr& rLists, SvxIconChoiceCtrlEnt
{
if( !pRefEntry )
{
- USHORT nGridRows = (USHORT)(pView->aVirtOutputSize.Height() / pView->nGridDY);
+ sal_uInt16 nGridRows = (sal_uInt16)(pView->aVirtOutputSize.Height() / pView->nGridDY);
nGridRows++; // wg. Abrundung!
if( !nGridRows )
return;
- for( USHORT nCurList = 0; nCurList < nGridRows; nCurList++ )
+ for( sal_uInt16 nCurList = 0; nCurList < nGridRows; nCurList++ )
{
SvPtrarr* pRow = new SvPtrarr;
rLists.Insert( (void*)pRow, nCurList );
}
- const ULONG nCount = pView->aEntries.Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ const sal_uLong nCount = pView->aEntries.Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)pView->aEntries.GetObject( nCur );
const Rectangle& rRect = pView->GetEntryBoundRect( pEntry );
short nY = (short)( ((rRect.Top()+rRect.Bottom())/2) / pView->nGridDY );
- USHORT nIns = GetSortListPos((SvPtrarr*)rLists[nY],rRect.Left(),FALSE);
+ sal_uInt16 nIns = GetSortListPos((SvPtrarr*)rLists[nY],rRect.Left(),sal_False);
((SvPtrarr*)rLists[ nY ])->Insert( pEntry, nIns );
}
}
@@ -522,8 +522,8 @@ void IcnCursor_Impl::CreateGridAjustData( SvPtrarr& rLists, SvxIconChoiceCtrlEnt
short nRefRow = (short)( ((rRefRect.Top()+rRefRect.Bottom())/2) / pView->nGridDY );
SvPtrarr* pRow = new SvPtrarr;
rLists.Insert( (void*)pRow, 0 );
- ULONG nCount = pView->aEntries.Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ sal_uLong nCount = pView->aEntries.Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvxIconChoiceCtrlEntry* pEntry = (SvxIconChoiceCtrlEntry*)pView->aEntries.GetObject( nCur );
Rectangle rRect( pView->CalcBmpRect(pEntry) );
@@ -531,7 +531,7 @@ void IcnCursor_Impl::CreateGridAjustData( SvPtrarr& rLists, SvxIconChoiceCtrlEnt
short nY = (short)( ((rRect.Top()+rRect.Bottom())/2) / pView->nGridDY );
if( nY == nRefRow )
{
- USHORT nIns = GetSortListPos( pRow, rRect.Left(), FALSE );
+ sal_uInt16 nIns = GetSortListPos( pRow, rRect.Left(), sal_False );
pRow->Insert( pEntry, nIns );
}
}
@@ -541,8 +541,8 @@ void IcnCursor_Impl::CreateGridAjustData( SvPtrarr& rLists, SvxIconChoiceCtrlEnt
//static
void IcnCursor_Impl::DestroyGridAdjustData( SvPtrarr& rLists )
{
- const USHORT nCount = rLists.Count();
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ const sal_uInt16 nCount = rLists.Count();
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
SvPtrarr* pArr = (SvPtrarr*)rLists[ nCur ];
delete pArr;
@@ -569,16 +569,16 @@ void IcnGridMap_Impl::Expand()
Create_Impl();
else
{
- USHORT nNewGridRows = _nGridRows;
- USHORT nNewGridCols = _nGridCols;
+ sal_uInt16 nNewGridRows = _nGridRows;
+ sal_uInt16 nNewGridCols = _nGridCols;
if( _pView->nWinBits & WB_ALIGN_TOP )
nNewGridRows += 50;
else
nNewGridCols += 50;
- BOOL* pNewGridMap = new BOOL[nNewGridRows*nNewGridCols];
- memset( pNewGridMap, 0, nNewGridRows * nNewGridCols * sizeof(BOOL) );
- memcpy( pNewGridMap, _pGridMap, _nGridRows * _nGridCols * sizeof(BOOL) );
+ sal_Bool* pNewGridMap = new sal_Bool[nNewGridRows*nNewGridCols];
+ memset( pNewGridMap, 0, nNewGridRows * nNewGridCols * sizeof(sal_Bool) );
+ memcpy( pNewGridMap, _pGridMap, _nGridRows * _nGridCols * sizeof(sal_Bool) );
delete[] _pGridMap;
_pGridMap = pNewGridMap;
_nGridRows = nNewGridRows;
@@ -597,15 +597,15 @@ void IcnGridMap_Impl::Create_Impl()
else
_nGridCols += 50;
- _pGridMap = new BOOL[ _nGridRows * _nGridCols];
+ _pGridMap = new sal_Bool[ _nGridRows * _nGridCols];
memset( (void*)_pGridMap, 0, _nGridRows * _nGridCols );
- const ULONG nCount = _pView->aEntries.Count();
- for( ULONG nCur=0; nCur < nCount; nCur++ )
+ const sal_uLong nCount = _pView->aEntries.Count();
+ for( sal_uLong nCur=0; nCur < nCount; nCur++ )
OccupyGrids( (SvxIconChoiceCtrlEntry*)_pView->aEntries.GetObject( nCur ));
}
-void IcnGridMap_Impl::GetMinMapSize( USHORT& rDX, USHORT& rDY ) const
+void IcnGridMap_Impl::GetMinMapSize( sal_uInt16& rDX, sal_uInt16& rDY ) const
{
long nX, nY;
if( _pView->nWinBits & WB_ALIGN_TOP )
@@ -643,11 +643,11 @@ void IcnGridMap_Impl::GetMinMapSize( USHORT& rDX, USHORT& rDY ) const
if( !nDY )
nDY++;
- rDX = (USHORT)nDX;
- rDY = (USHORT)nDY;
+ rDX = (sal_uInt16)nDX;
+ rDY = (sal_uInt16)nDY;
}
-GridId IcnGridMap_Impl::GetGrid( USHORT nGridX, USHORT nGridY )
+GridId IcnGridMap_Impl::GetGrid( sal_uInt16 nGridX, sal_uInt16 nGridY )
{
Create();
if( _pView->nWinBits & WB_ALIGN_TOP )
@@ -656,7 +656,7 @@ GridId IcnGridMap_Impl::GetGrid( USHORT nGridX, USHORT nGridY )
return nGridY + ( nGridX * _nGridRows );
}
-GridId IcnGridMap_Impl::GetGrid( const Point& rDocPos, BOOL* pbClipped )
+GridId IcnGridMap_Impl::GetGrid( const Point& rDocPos, sal_Bool* pbClipped )
{
Create();
@@ -666,28 +666,28 @@ GridId IcnGridMap_Impl::GetGrid( const Point& rDocPos, BOOL* pbClipped )
nY -= TBOFFS_WINBORDER;
nX /= _pView->nGridDX;
nY /= _pView->nGridDY;
- BOOL bClipped = FALSE;
+ sal_Bool bClipped = sal_False;
if( nX >= _nGridCols )
{
nX = _nGridCols - 1;
- bClipped = TRUE;
+ bClipped = sal_True;
}
if( nY >= _nGridRows )
{
nY = _nGridRows - 1;
- bClipped = TRUE;
+ bClipped = sal_True;
}
- GridId nId = GetGrid( (USHORT)nX, (USHORT)nY );
+ GridId nId = GetGrid( (sal_uInt16)nX, (sal_uInt16)nY );
if( pbClipped )
*pbClipped = bClipped;
- DBG_ASSERT(nId <(ULONG)(_nGridCols*_nGridRows),"GetGrid failed");
+ DBG_ASSERT(nId <(sal_uLong)(_nGridCols*_nGridRows),"GetGrid failed");
return nId;
}
Rectangle IcnGridMap_Impl::GetGridRect( GridId nId )
{
Create();
- USHORT nGridX, nGridY;
+ sal_uInt16 nGridX, nGridY;
GetGridCoord( nId, nGridX, nGridY );
const long nLeft = nGridX * _pView->nGridDX+ LROFFS_WINBORDER;
const long nTop = nGridY * _pView->nGridDY + TBOFFS_WINBORDER;
@@ -697,28 +697,28 @@ Rectangle IcnGridMap_Impl::GetGridRect( GridId nId )
nTop + _pView->nGridDY );
}
-GridId IcnGridMap_Impl::GetUnoccupiedGrid( BOOL bOccupyFound )
+GridId IcnGridMap_Impl::GetUnoccupiedGrid( sal_Bool bOccupyFound )
{
Create();
- ULONG nStart = 0;
- BOOL bExpanded = FALSE;
+ sal_uLong nStart = 0;
+ sal_Bool bExpanded = sal_False;
while( 1 )
{
- const ULONG nCount = (USHORT)(_nGridCols * _nGridRows);
- for( ULONG nCur = nStart; nCur < nCount; nCur++ )
+ const sal_uLong nCount = (sal_uInt16)(_nGridCols * _nGridRows);
+ for( sal_uLong nCur = nStart; nCur < nCount; nCur++ )
{
if( !_pGridMap[ nCur ] )
{
if( bOccupyFound )
- _pGridMap[ nCur ] = TRUE;
+ _pGridMap[ nCur ] = sal_True;
return (GridId)nCur;
}
}
DBG_ASSERT(!bExpanded,"ExpandGrid failed");
if( bExpanded )
return 0; // prevent never ending loop
- bExpanded = TRUE;
+ bExpanded = sal_True;
Expand();
nStart = nCount;
}
@@ -729,7 +729,7 @@ GridId IcnGridMap_Impl::GetUnoccupiedGrid( BOOL bOccupyFound )
// Bounding-Rect, kann aber zu kleinen Ueberlappungen fuehren
#define OCCUPY_CENTER
-void IcnGridMap_Impl::OccupyGrids( const SvxIconChoiceCtrlEntry* pEntry, BOOL bOccupy )
+void IcnGridMap_Impl::OccupyGrids( const SvxIconChoiceCtrlEntry* pEntry, sal_Bool bOccupy )
{
if( !_pGridMap || !_pView->IsBoundingRectValid( pEntry->aRect ))
return;
@@ -741,7 +741,7 @@ void IcnGridMap_Impl::OccupyGrids( const SvxIconChoiceCtrlEntry* pEntry, BOOL bO
}
-void IcnGridMap_Impl::OccupyGrids( const Rectangle& rRect, BOOL bUsed )
+void IcnGridMap_Impl::OccupyGrids( const Rectangle& rRect, sal_Bool bUsed )
{
if( !_pGridMap )
return;
@@ -755,17 +755,17 @@ void IcnGridMap_Impl::OccupyGrids( const Rectangle& rRect, BOOL bUsed )
else
_aLastOccupiedGrid.SetEmpty();
- BOOL bTopLeftClipped, bBottomRightClipped;
+ sal_Bool bTopLeftClipped, bBottomRightClipped;
GridId nIdTL = GetGrid( rRect.TopLeft(), &bTopLeftClipped );
GridId nIdBR = GetGrid( rRect.BottomRight(), &bBottomRightClipped );
if( bTopLeftClipped && bBottomRightClipped )
return;
- USHORT nX1,nX2,nY1,nY2;
+ sal_uInt16 nX1,nX2,nY1,nY2;
GetGridCoord( nIdTL, nX1, nY1 );
GetGridCoord( nIdBR, nX2, nY2 );
- USHORT nTemp;
+ sal_uInt16 nTemp;
if( nX1 > nX2 )
{
nTemp = nX1;
@@ -794,20 +794,20 @@ void IcnGridMap_Impl::Clear()
}
}
-ULONG IcnGridMap_Impl::GetGridCount( const Size& rSizePixel, USHORT nDX, USHORT nDY)
+sal_uLong IcnGridMap_Impl::GetGridCount( const Size& rSizePixel, sal_uInt16 nDX, sal_uInt16 nDY)
{
long ndx = (rSizePixel.Width() - LROFFS_WINBORDER) / nDX;
if( ndx < 0 ) ndx *= -1;
long ndy = (rSizePixel.Height() - TBOFFS_WINBORDER) / nDY;
if( ndy < 0 ) ndy *= -1;
- return (ULONG)(ndx * ndy);
+ return (sal_uLong)(ndx * ndy);
}
void IcnGridMap_Impl::OutputSizeChanged()
{
if( _pGridMap )
{
- USHORT nCols, nRows;
+ sal_uInt16 nCols, nRows;
GetMinMapSize( nCols, nRows );
if( _pView->nWinBits & WB_ALIGN_TOP )
{
@@ -829,18 +829,18 @@ void IcnGridMap_Impl::OutputSizeChanged()
// Independendly of the views alignment (TOP or LEFT) the gridmap
// should contain the data in a continues region, to make it possible
// to copy the whole block if the gridmap needs to be expanded.
-void IcnGridMap_Impl::GetGridCoord( GridId nId, USHORT& rGridX, USHORT& rGridY )
+void IcnGridMap_Impl::GetGridCoord( GridId nId, sal_uInt16& rGridX, sal_uInt16& rGridY )
{
Create();
if( _pView->nWinBits & WB_ALIGN_TOP )
{
- rGridX = (USHORT)(nId % _nGridCols);
- rGridY = (USHORT)(nId / _nGridCols);
+ rGridX = (sal_uInt16)(nId % _nGridCols);
+ rGridY = (sal_uInt16)(nId / _nGridCols);
}
else
{
- rGridX = (USHORT)(nId / _nGridRows);
- rGridY = (USHORT)(nId % _nGridRows);
+ rGridX = (sal_uInt16)(nId / _nGridRows);
+ rGridY = (sal_uInt16)(nId % _nGridRows);
}
}
diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx
index 9d494e5c32db..8a94d3ff086b 100644
--- a/svtools/source/contnr/ivctrl.cxx
+++ b/svtools/source/contnr/ivctrl.cxx
@@ -41,7 +41,7 @@ using namespace ::com::sun::star::accessibility;
|
\*****************************************************************************/
-SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( const String& rText, const Image& rImage, USHORT _nFlags )
+SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( const String& rText, const Image& rImage, sal_uInt16 _nFlags )
{
aText = rText;
aImage = rImage;
@@ -54,7 +54,7 @@ SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( const String& rText, const Image
pflink = 0;
}
-SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( const String& rText, const Image& rImage, const Image& rImageHC, USHORT _nFlags )
+SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( const String& rText, const Image& rImage, const Image& rImageHC, sal_uInt16 _nFlags )
{
aText = rText;
aImage = rImage;
@@ -67,7 +67,7 @@ SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( const String& rText, const Image
pflink = 0;
}
-SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( USHORT _nFlags )
+SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( sal_uInt16 _nFlags )
{
pUserData = NULL;
@@ -77,7 +77,7 @@ SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( USHORT _nFlags )
pflink = 0;
}
-void SvxIconChoiceCtrlEntry::SetMoved( BOOL bMoved )
+void SvxIconChoiceCtrlEntry::SetMoved( sal_Bool bMoved )
{
if( bMoved )
nFlags |= ICNVIEW_FLAG_POS_MOVED;
@@ -85,7 +85,7 @@ void SvxIconChoiceCtrlEntry::SetMoved( BOOL bMoved )
nFlags &= ~ICNVIEW_FLAG_POS_MOVED;
}
-void SvxIconChoiceCtrlEntry::LockPos( BOOL bLock )
+void SvxIconChoiceCtrlEntry::LockPos( sal_Bool bLock )
{
if( bLock )
nFlags |= ICNVIEW_FLAG_POS_LOCKED;
@@ -130,7 +130,7 @@ SvtIconChoiceCtrl::SvtIconChoiceCtrl( Window* pParent, WinBits nWinStyle ) :
_pCurKeyEvent ( NULL ),
_pImp ( new SvxIconChoiceCtrl_Impl( this, nWinStyle ) ),
- _bAutoFontColor ( FALSE )
+ _bAutoFontColor ( sal_False )
{
SetLineColor();
@@ -145,7 +145,7 @@ SvtIconChoiceCtrl::SvtIconChoiceCtrl( Window* pParent, const ResId& rResId ) :
_pCurKeyEvent ( NULL ),
_pImp ( new SvxIconChoiceCtrl_Impl( this, WB_BORDER ) ),
- _bAutoFontColor ( FALSE )
+ _bAutoFontColor ( sal_False )
{
SetLineColor();
@@ -160,14 +160,14 @@ SvtIconChoiceCtrl::~SvtIconChoiceCtrl()
delete _pImp;
}
-SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( ULONG nPos, const Point* pPos, USHORT nFlags )
+SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( sal_uLong nPos, const Point* pPos, sal_uInt16 nFlags )
{
SvxIconChoiceCtrlEntry* pEntry = new SvxIconChoiceCtrlEntry( nFlags );
_pImp->InsertEntry( pEntry, nPos, pPos );
return pEntry;
}
-SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( const String& rText, const Image& rImage, ULONG nPos, const Point* pPos, USHORT nFlags )
+SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( const String& rText, const Image& rImage, sal_uLong nPos, const Point* pPos, sal_uInt16 nFlags )
{
SvxIconChoiceCtrlEntry* pEntry = new SvxIconChoiceCtrlEntry( rText, rImage, nFlags);
@@ -176,7 +176,7 @@ SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( const String& rText, con
return pEntry;
}
-SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( const String& rText, const Image& rImage, const Image& rImageHC, ULONG nPos, const Point* pPos, USHORT nFlags )
+SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( const String& rText, const Image& rImage, const Image& rImageHC, sal_uLong nPos, const Point* pPos, sal_uInt16 nFlags )
{
SvxIconChoiceCtrlEntry* pEntry = new SvxIconChoiceCtrlEntry( rText, rImage, rImageHC, nFlags);
@@ -185,37 +185,37 @@ SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( const String& rText, con
return pEntry;
}
-BOOL SvtIconChoiceCtrl::EditedEntry( SvxIconChoiceCtrlEntry*, const XubString&, BOOL )
+sal_Bool SvtIconChoiceCtrl::EditedEntry( SvxIconChoiceCtrlEntry*, const XubString&, sal_Bool )
{
- return TRUE;
+ return sal_True;
}
-BOOL SvtIconChoiceCtrl::EditingEntry( SvxIconChoiceCtrlEntry* )
+sal_Bool SvtIconChoiceCtrl::EditingEntry( SvxIconChoiceCtrlEntry* )
{
- return TRUE;
+ return sal_True;
}
void SvtIconChoiceCtrl::DrawEntryImage( SvxIconChoiceCtrlEntry* pEntry, const Point& rPos, OutputDevice& rDev )
{
rDev.DrawImage( rPos, GetSettings().GetStyleSettings().GetHighContrastMode() ? pEntry->GetImageHC() : pEntry->GetImage() );
}
-String SvtIconChoiceCtrl::GetEntryText( SvxIconChoiceCtrlEntry* pEntry, BOOL )
+String SvtIconChoiceCtrl::GetEntryText( SvxIconChoiceCtrlEntry* pEntry, sal_Bool )
{
return pEntry->GetText();
}
-BOOL SvtIconChoiceCtrl::HasBackground() const
+sal_Bool SvtIconChoiceCtrl::HasBackground() const
{
- return FALSE;
+ return sal_False;
}
-BOOL SvtIconChoiceCtrl::HasFont() const
+sal_Bool SvtIconChoiceCtrl::HasFont() const
{
- return FALSE;
+ return sal_False;
}
-BOOL SvtIconChoiceCtrl::HasFontTextColor() const
+sal_Bool SvtIconChoiceCtrl::HasFontTextColor() const
{
- return TRUE;
+ return sal_True;
}
-BOOL SvtIconChoiceCtrl::HasFontFillColor() const
+sal_Bool SvtIconChoiceCtrl::HasFontFillColor() const
{
- return TRUE;
+ return sal_True;
}
void SvtIconChoiceCtrl::Paint( const Rectangle& rRect )
@@ -247,7 +247,7 @@ void SvtIconChoiceCtrl::ArrangeIcons()
Size aFullSize;
Rectangle aEntryRect;
- for ( ULONG i = 0; i < GetEntryCount(); i++ )
+ for ( sal_uLong i = 0; i < GetEntryCount(); i++ )
{
SvxIconChoiceCtrlEntry* pEntry = GetEntry ( i );
aEntryRect = _pImp->GetEntryBoundRect ( pEntry );
@@ -255,14 +255,14 @@ void SvtIconChoiceCtrl::ArrangeIcons()
aFullSize.setWidth ( aFullSize.getWidth()+aEntryRect.GetWidth() );
}
- _pImp->Arrange ( FALSE, aFullSize.getWidth() );
+ _pImp->Arrange ( sal_False, aFullSize.getWidth() );
}
else if ( GetStyle() & WB_ALIGN_LEFT )
{
Size aFullSize;
Rectangle aEntryRect;
- for ( ULONG i = 0; i < GetEntryCount(); i++ )
+ for ( sal_uLong i = 0; i < GetEntryCount(); i++ )
{
SvxIconChoiceCtrlEntry* pEntry = GetEntry ( i );
aEntryRect = _pImp->GetEntryBoundRect ( pEntry );
@@ -270,13 +270,13 @@ void SvtIconChoiceCtrl::ArrangeIcons()
aFullSize.setHeight ( aFullSize.getHeight()+aEntryRect.GetHeight() );
}
- _pImp->Arrange ( FALSE, 0, aFullSize.getHeight() );
+ _pImp->Arrange ( sal_False, 0, aFullSize.getHeight() );
}
else
{
_pImp->Arrange();
}
- _pImp->Arrange( FALSE, 0, 1000 );
+ _pImp->Arrange( sal_False, 0, 1000 );
}
void SvtIconChoiceCtrl::Resize()
{
@@ -312,7 +312,7 @@ void SvtIconChoiceCtrl::GetFocus()
{
_pImp->GetFocus();
Control::GetFocus();
- ULONG nPos;
+ sal_uLong nPos;
SvxIconChoiceCtrlEntry* pSelectedEntry = GetSelectedEntry ( nPos );
if ( pSelectedEntry )
_pImp->CallEventListeners( VCLEVENT_LISTBOX_SELECT, pSelectedEntry );
@@ -324,7 +324,7 @@ void SvtIconChoiceCtrl::LoseFocus()
Control::LoseFocus();
}
-void SvtIconChoiceCtrl::SetUpdateMode( BOOL bUpdate )
+void SvtIconChoiceCtrl::SetUpdateMode( sal_Bool bUpdate )
{
Control::SetUpdateMode( bUpdate );
_pImp->SetUpdateMode( bUpdate );
@@ -346,7 +346,7 @@ void SvtIconChoiceCtrl::SetPointFont( const Font& rFont )
_pImp->FontModified();
}
}
-SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetEntry( const Point& rPixPos, BOOL bHit ) const
+SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetEntry( const Point& rPixPos, sal_Bool bHit ) const
{
Point aPos( rPixPos );
aPos -= GetMapMode().GetOrigin();
@@ -377,25 +377,25 @@ SvxIconChoiceCtrlTextMode SvtIconChoiceCtrl::GetEntryTextMode( const SvxIconChoi
return _pImp->GetEntryTextModeSmart( pEntry );
}
-SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetNextEntry( const Point& rPixPos, SvxIconChoiceCtrlEntry* pCurEntry, BOOL ) const
+SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetNextEntry( const Point& rPixPos, SvxIconChoiceCtrlEntry* pCurEntry, sal_Bool ) const
{
Point aPos( rPixPos );
aPos -= GetMapMode().GetOrigin();
return ((SvtIconChoiceCtrl*)this)->_pImp->GetNextEntry( aPos, pCurEntry );
}
-SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetPrevEntry( const Point& rPixPos, SvxIconChoiceCtrlEntry* pCurEntry, BOOL ) const
+SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetPrevEntry( const Point& rPixPos, SvxIconChoiceCtrlEntry* pCurEntry, sal_Bool ) const
{
Point aPos( rPixPos );
aPos -= GetMapMode().GetOrigin();
return ((SvtIconChoiceCtrl*)this)->_pImp->GetPrevEntry( aPos, pCurEntry );
}
-ULONG SvtIconChoiceCtrl::GetEntryCount() const
+sal_uLong SvtIconChoiceCtrl::GetEntryCount() const
{
return _pImp->GetEntryCount();
}
-SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetEntry( ULONG nPos ) const
+SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetEntry( sal_uLong nPos ) const
{
return _pImp->GetEntry( nPos );
}
@@ -415,30 +415,30 @@ void SvtIconChoiceCtrl::RemoveEntry( SvxIconChoiceCtrlEntry* pEntry )
_pImp->RemoveEntry( pEntry );
}
-SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetSelectedEntry( ULONG& rPos ) const
+SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetSelectedEntry( sal_uLong& rPos ) const
{
return _pImp->GetFirstSelectedEntry( rPos );
}
void SvtIconChoiceCtrl::ClickIcon()
{
- ULONG nPos;
+ sal_uLong nPos;
GetSelectedEntry ( nPos );
_aClickIconHdl.Call( this );
}
-BOOL SvtIconChoiceCtrl::IsEntryEditing() const
+sal_Bool SvtIconChoiceCtrl::IsEntryEditing() const
{
return _pImp->IsEntryEditing();
}
-BOOL SvtIconChoiceCtrl::SetChoiceWithCursor ( BOOL bDo )
+sal_Bool SvtIconChoiceCtrl::SetChoiceWithCursor ( sal_Bool bDo )
{
return _pImp->SetChoiceWithCursor (bDo);
}
void SvtIconChoiceCtrl::KeyInput( const KeyEvent& rKEvt )
{
- BOOL bKeyUsed = DoKeyInput( rKEvt );
+ sal_Bool bKeyUsed = DoKeyInput( rKEvt );
if ( !bKeyUsed )
{
_pCurKeyEvent = (KeyEvent*)&rKEvt;
@@ -446,17 +446,17 @@ void SvtIconChoiceCtrl::KeyInput( const KeyEvent& rKEvt )
_pCurKeyEvent = NULL;
}
}
-BOOL SvtIconChoiceCtrl::DoKeyInput( const KeyEvent& rKEvt )
+sal_Bool SvtIconChoiceCtrl::DoKeyInput( const KeyEvent& rKEvt )
{
// unter OS/2 bekommen wir auch beim Editieren Key-Up/Down
if( IsEntryEditing() )
- return TRUE;
+ return sal_True;
_pCurKeyEvent = (KeyEvent*)&rKEvt;
- BOOL bHandled = _pImp->KeyInput( rKEvt );
+ sal_Bool bHandled = _pImp->KeyInput( rKEvt );
_pCurKeyEvent = NULL;
return bHandled;
}
-ULONG SvtIconChoiceCtrl::GetEntryListPos( SvxIconChoiceCtrlEntry* pEntry ) const
+sal_uLong SvtIconChoiceCtrl::GetEntryListPos( SvxIconChoiceCtrlEntry* pEntry ) const
{
return _pImp->GetEntryListPos( pEntry );
}
@@ -561,7 +561,7 @@ void SvtIconChoiceCtrl::SetSelectionMode( SelectionMode eMode )
_pImp->SetSelectionMode( eMode );
}
-BOOL SvtIconChoiceCtrl::HandleShortCutKey( const KeyEvent& r )
+sal_Bool SvtIconChoiceCtrl::HandleShortCutKey( const KeyEvent& r )
{
return _pImp->HandleShortCutKey( r );
}
@@ -615,7 +615,7 @@ void SvtIconChoiceCtrl::SetNoSelection()
_pImp->SetNoSelection();
}
-void SvtIconChoiceCtrl::CallImplEventListeners(ULONG nEvent, void* pData)
+void SvtIconChoiceCtrl::CallImplEventListeners(sal_uLong nEvent, void* pData)
{
CallEventListeners(nEvent, pData);
}
diff --git a/svtools/source/contnr/svicnvw.cxx b/svtools/source/contnr/svicnvw.cxx
index 6fd0f5bf0c9c..72768dd01746 100644
--- a/svtools/source/contnr/svicnvw.cxx
+++ b/svtools/source/contnr/svicnvw.cxx
@@ -106,7 +106,7 @@ void SvIconView::DisconnectFromModel()
SvLBoxEntry* SvIconView::InsertEntry( const XubString& rText,
- SvLBoxEntry* pParent, BOOL bChildsOnDemand, ULONG nPos )
+ SvLBoxEntry* pParent, sal_Bool bChildsOnDemand, sal_uLong nPos )
{
SvLBoxEntry* pEntry = CreateEntry(
rText, aCollapsedEntryBmp, aExpandedEntryBmp );
@@ -122,7 +122,7 @@ SvLBoxEntry* SvIconView::InsertEntry( const XubString& rText,
SvLBoxEntry* SvIconView::InsertEntry( const XubString& rText,
const Image& rExpEntryBmp,
const Image& rCollEntryBmp,
- SvLBoxEntry* pParent, BOOL bChildsOnDemand, ULONG nPos)
+ SvLBoxEntry* pParent, sal_Bool bChildsOnDemand, sal_uLong nPos)
{
SvLBoxEntry* pEntry = CreateEntry(
rText, rCollEntryBmp, rExpEntryBmp );
@@ -218,7 +218,7 @@ SvLBoxEntry* SvIconView::CloneEntry( SvLBoxEntry* pSource )
}
-USHORT SvIconView::IsA()
+sal_uInt16 SvIconView::IsA()
{
return SV_LISTBOX_ID_ICONVIEW;
}
@@ -226,7 +226,7 @@ USHORT SvIconView::IsA()
void SvIconView::RequestingChilds( SvLBoxEntry* pParent )
{
if ( !pParent->HasChilds() )
- InsertEntry( String::CreateFromAscii("<dummy>"), pParent, FALSE, LIST_APPEND );
+ InsertEntry( String::CreateFromAscii("<dummy>"), pParent, sal_False, LIST_APPEND );
}
void __EXPORT SvIconView::Paint( const Rectangle& rRect )
@@ -256,7 +256,7 @@ void __EXPORT SvIconView::KeyInput( const KeyEvent& rKEvt )
return;
nImpFlags |= SVLBOX_IS_TRAVELSELECT;
- BOOL bKeyUsed = pImp->KeyInput( rKEvt );
+ sal_Bool bKeyUsed = pImp->KeyInput( rKEvt );
if ( !bKeyUsed )
SvLBox::KeyInput( rKEvt );
nImpFlags &= ~SVLBOX_IS_TRAVELSELECT;
@@ -280,7 +280,7 @@ void __EXPORT SvIconView::LoseFocus()
SvLBox::LoseFocus();
}
-void SvIconView::SetUpdateMode( BOOL bUpdate )
+void SvIconView::SetUpdateMode( sal_Bool bUpdate )
{
Control::SetUpdateMode( bUpdate );
if ( bUpdate )
@@ -319,7 +319,7 @@ void __EXPORT SvIconView::ModelHasInsertedTree( SvListEntry* pEntry )
}
void __EXPORT SvIconView::ModelIsMoving(SvListEntry* pSource,
- SvListEntry* /* pTargetParent */ , ULONG /* nChildPos */ )
+ SvListEntry* /* pTargetParent */ , sal_uLong /* nChildPos */ )
{
pImp->MovingEntry( (SvLBoxEntry*)pSource );
}
@@ -348,7 +348,7 @@ void __EXPORT SvIconView::ModelHasEntryInvalidated( SvListEntry* pEntry )
pImp->ModelHasEntryInvalidated( pEntry );
}
-void SvIconView::ShowTargetEmphasis( SvLBoxEntry* pEntry, BOOL bShow )
+void SvIconView::ShowTargetEmphasis( SvLBoxEntry* pEntry, sal_Bool bShow )
{
pImp->ShowTargetEmphasis( pEntry, bShow );
}
@@ -360,10 +360,10 @@ Point SvIconView::GetEntryPosition( SvLBoxEntry* pEntry ) const
void SvIconView::SetEntryPosition( SvLBoxEntry* pEntry, const Point& rPos)
{
- pImp->SetEntryPosition( pEntry, rPos, FALSE, TRUE );
+ pImp->SetEntryPosition( pEntry, rPos, sal_False, sal_True );
}
-void SvIconView::SetEntryPosition( SvLBoxEntry* pEntry, const Point& rPos, BOOL bAdjustAtGrid )
+void SvIconView::SetEntryPosition( SvLBoxEntry* pEntry, const Point& rPos, sal_Bool bAdjustAtGrid )
{
pImp->SetEntryPosition( pEntry, rPos, bAdjustAtGrid );
}
@@ -371,7 +371,7 @@ void SvIconView::SetEntryPosition( SvLBoxEntry* pEntry, const Point& rPos, BOOL
void SvIconView::SetFont( const Font& rFont )
{
Font aTempFont( rFont );
- aTempFont.SetTransparent( TRUE );
+ aTempFont.SetTransparent( sal_True );
SvLBox::SetFont( aTempFont );
RecalcViewData();
pImp->ChangedFont();
@@ -387,7 +387,7 @@ SvLBoxEntry* SvIconView::GetDropTarget( const Point& rPos )
return pImp->GetDropTarget( rPos );
}
-SvLBoxEntry* SvIconView::GetEntry( const Point& rPixPos, BOOL ) const
+SvLBoxEntry* SvIconView::GetEntry( const Point& rPixPos, sal_Bool ) const
{
Point aPos( rPixPos );
aPos -= GetMapMode().GetOrigin();
@@ -440,10 +440,10 @@ void SvIconView::SetSelectionMode( SelectionMode eSelectMode )
pImp->SetSelectionMode( eSelectMode );
}
-BOOL SvIconView::Select( SvLBoxEntry* pEntry, BOOL bSelect )
+sal_Bool SvIconView::Select( SvLBoxEntry* pEntry, sal_Bool bSelect )
{
EndEditing();
- BOOL bRetVal = SvListView::Select( pEntry, bSelect );
+ sal_Bool bRetVal = SvListView::Select( pEntry, bSelect );
if( bRetVal )
{
pImp->EntrySelected( pEntry, bSelect );
@@ -453,7 +453,7 @@ BOOL SvIconView::Select( SvLBoxEntry* pEntry, BOOL bSelect )
return bRetVal;
}
-void SvIconView::SelectAll( BOOL bSelect, BOOL )
+void SvIconView::SelectAll( sal_Bool bSelect, sal_Bool )
{
SvLBoxEntry* pEntry = pImp->GetCurParent();
pEntry = FirstChild( pEntry );
@@ -478,7 +478,7 @@ SvLBoxEntry* SvIconView::GetCurEntry() const
void SvIconView::Arrange()
{
#ifdef DBG_UTIL
- USHORT n=1;
+ sal_uInt16 n=1;
if( n == 1 && n-1 == 0 )
{
pImp->Arrange();
@@ -498,20 +498,20 @@ void SvIconView::SetSpaceBetweenEntries( long nX, long nY )
pImp->SetSpaceBetweenEntries( nX, nY );
}
-BOOL SvIconView::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos )
+sal_Bool SvIconView::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos )
{
return pImp->NotifyMoving(pTarget,pEntry,rpNewParent,rNewChildPos);
}
-BOOL SvIconView::NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos )
+sal_Bool SvIconView::NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos )
{
return pImp->NotifyCopying(pTarget,pEntry,rpNewParent,rNewChildPos);
}
-void SvIconView::EnableInplaceEditing( BOOL bEnable )
+void SvIconView::EnableInplaceEditing( sal_Bool bEnable )
{
SvLBox::EnableInplaceEditing( bEnable );
}
@@ -524,7 +524,7 @@ void SvIconView::EditingRequest( SvLBoxEntry* pEntry, SvLBoxItem* pItem,
Selection aSel( SELECTION_MIN, SELECTION_MAX );
if ( EditingEntry( pEntry, aSel ) )
{
- SelectAll( FALSE );
+ SelectAll( sal_False );
EditItemText( pEntry, (SvLBoxString*)pItem, aSel );
}
}
@@ -537,7 +537,7 @@ void SvIconView::EditItemText( SvLBoxEntry* pEntry, SvLBoxItem* pItem,
DBG_ASSERT(pEntry&&pItem,"EditItemText:Params?");
pCurEdEntry = pEntry;
pCurEdItem = pItem;
- Rectangle aRect( pImp->CalcTextRect( pEntry, (SvLBoxString*)pItem,0,TRUE ));
+ Rectangle aRect( pImp->CalcTextRect( pEntry, (SvLBoxString*)pItem,0,sal_True ));
aRect.Bottom() += 4;
pImp->MakeVisible( aRect ); // vor der Umrechnung in Pixel-Koord. rufen!
@@ -564,7 +564,7 @@ void SvIconView::EditItemText( SvLBoxEntry* pEntry, SvLBoxItem* pItem,
#endif
#endif // OS2
- EditText( ((SvLBoxString*)pItem)->GetText(), aRect, rSel, TRUE );
+ EditText( ((SvLBoxString*)pItem)->GetText(), aRect, rSel, sal_True );
}
void SvIconView::EditEntry( SvLBoxEntry* pEntry )
@@ -579,7 +579,7 @@ void SvIconView::EditEntry( SvLBoxEntry* pEntry )
Selection aSel( SELECTION_MIN, SELECTION_MAX );
if( EditingEntry( pEntry, aSel ) )
{
- SelectAll( FALSE );
+ SelectAll( sal_False );
EditItemText( pEntry, pItem, aSel );
}
}
@@ -599,14 +599,14 @@ void SvIconView::EditedText( const XubString& rStr )
}
-BOOL SvIconView::EditingEntry( SvLBoxEntry*, Selection& )
+sal_Bool SvIconView::EditingEntry( SvLBoxEntry*, Selection& )
{
- return TRUE;
+ return sal_True;
}
-BOOL SvIconView::EditedEntry( SvLBoxEntry*, const XubString& )
+sal_Bool SvIconView::EditedEntry( SvLBoxEntry*, const XubString& )
{
- return TRUE;
+ return sal_True;
}
@@ -659,9 +659,9 @@ Region SvIconView::GetDragRegion() const
return aRegion;
}
-ULONG SvIconView::GetSelectionCount() const
+sal_uLong SvIconView::GetSelectionCount() const
{
- return (ULONG)(pImp->GetSelectionCount());
+ return (sal_uLong)(pImp->GetSelectionCount());
}
void SvIconView::SetGrid( long nDX, long nDY )
@@ -669,18 +669,18 @@ void SvIconView::SetGrid( long nDX, long nDY )
pImp->SetGrid( nDX, nDY );
}
-void SvIconView::ModelNotification( USHORT nActionId, SvListEntry* pEntry1,
- SvListEntry* pEntry2, ULONG nPos )
+void SvIconView::ModelNotification( sal_uInt16 nActionId, SvListEntry* pEntry1,
+ SvListEntry* pEntry2, sal_uLong nPos )
{
SvLBox::ModelNotification( nActionId, pEntry1, pEntry2, nPos );
switch( nActionId )
{
case LISTACTION_RESORTING:
- SetUpdateMode( FALSE );
+ SetUpdateMode( sal_False );
break;
case LISTACTION_RESORTED:
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
Arrange();
break;
@@ -692,9 +692,9 @@ void SvIconView::ModelNotification( USHORT nActionId, SvListEntry* pEntry1,
}
-void SvIconView::Scroll( long nDeltaX, long nDeltaY, USHORT )
+void SvIconView::Scroll( long nDeltaX, long nDeltaY, sal_uInt16 )
{
- pImp->Scroll( nDeltaX, nDeltaY, FALSE );
+ pImp->Scroll( nDeltaX, nDeltaY, sal_False );
}
void SvIconView::PrepareCommandEvent( const CommandEvent& rCEvt )
@@ -705,7 +705,7 @@ void SvIconView::PrepareCommandEvent( const CommandEvent& rCEvt )
void SvIconView::StartDrag( sal_Int8 nAction, const Point& rPos )
{
pImp->SttDrag( rPos );
- SvLBoxEntry* pEntry = GetEntry( rPos, TRUE );
+ SvLBoxEntry* pEntry = GetEntry( rPos, sal_True );
pImp->mpViewData = pEntry;
SvLBox::StartDrag( nAction, rPos );
}
@@ -751,14 +751,14 @@ void SvIconView::HideShowDDIcon( SvLBoxEntry* pRefEntry, const Point& rPos )
pImp->HideShowDDIcon( pRefEntry, rPos );
}
-void SvIconView::SelectRect( const Rectangle& rRect, BOOL bAdd,
+void SvIconView::SelectRect( const Rectangle& rRect, sal_Bool bAdd,
SvPtrarr* pRects, short nOffs )
{
pImp->SelectRect( rRect, bAdd, pRects, nOffs );
}
void SvIconView::CalcScrollOffsets( const Point& rRefPosPixel, long& rX, long& rY,
- BOOL b, USHORT nBorderWidth )
+ sal_Bool b, sal_uInt16 nBorderWidth )
{
pImp->CalcScrollOffsets( rRefPosPixel, rX, rY, b, nBorderWidth );
}
@@ -782,7 +782,7 @@ void SvIconView::AdjustAtGrid( SvLBoxEntry* pEntry )
pImp->AdjustAtGrid( pEntry );
}
-void SvIconView::LockEntryPos( SvLBoxEntry* pEntry, BOOL bLock )
+void SvIconView::LockEntryPos( SvLBoxEntry* pEntry, sal_Bool bLock )
{
SvIcnVwDataEntry* pViewData = (SvIcnVwDataEntry*)GetViewData( pEntry );
if( bLock )
@@ -791,7 +791,7 @@ void SvIconView::LockEntryPos( SvLBoxEntry* pEntry, BOOL bLock )
pViewData->ClearVwFlags( ICNVW_FLAG_POS_LOCKED );
}
-BOOL SvIconView::IsEntryPosLocked( const SvLBoxEntry* pEntry ) const
+sal_Bool SvIconView::IsEntryPosLocked( const SvLBoxEntry* pEntry ) const
{
const SvIcnVwDataEntry* pViewData = (const SvIcnVwDataEntry*)GetViewData( (SvListEntry*)pEntry );
return pViewData->IsEntryPosLocked();
@@ -807,14 +807,14 @@ SvIconViewTextMode SvIconView::GetTextMode( const SvLBoxEntry* pEntry ) const
return pImp->GetTextMode( pEntry );
}
-SvLBoxEntry* SvIconView::GetNextEntry( const Point& rPixPos, SvLBoxEntry* pCurEntry, BOOL ) const
+SvLBoxEntry* SvIconView::GetNextEntry( const Point& rPixPos, SvLBoxEntry* pCurEntry, sal_Bool ) const
{
Point aPos( rPixPos );
aPos -= GetMapMode().GetOrigin();
return ((SvIconView*)this)->pImp->GetNextEntry( aPos, pCurEntry );
}
-SvLBoxEntry* SvIconView::GetPrevEntry( const Point& rPixPos, SvLBoxEntry* pCurEntry, BOOL ) const
+SvLBoxEntry* SvIconView::GetPrevEntry( const Point& rPixPos, SvLBoxEntry* pCurEntry, sal_Bool ) const
{
Point aPos( rPixPos );
aPos -= GetMapMode().GetOrigin();
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index 74c6bb163797..7d63304203cd 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -71,7 +71,7 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvLBoxTreeList* pLBTree, WinBits n
pView = pLBView;
pTree = pLBTree;
aSelEng.SetFunctionSet( (FunctionSet*)&aFctSet );
- aSelEng.ExpandSelectionOnMouseMove( FALSE );
+ aSelEng.ExpandSelectionOnMouseMove( sal_False );
SetStyle( nWinStyle );
SetSelectionMode( SINGLE_SELECTION );
SetDragDropMode( 0 );
@@ -97,7 +97,7 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvLBoxTreeList* pLBTree, WinBits n
nYoffsNodeBmp = 0;
nNodeBmpWidth = 0;
- bAsyncBeginDrag = FALSE;
+ bAsyncBeginDrag = sal_False;
aAsyncBeginDragTimer.SetTimeout( 0 );
aAsyncBeginDragTimer.SetTimeoutHdl( LINK(this,SvImpLBox,BeginDragHdl));
// Button-Animation in Listbox
@@ -115,11 +115,11 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvLBoxTreeList* pLBTree, WinBits n
pMostRightEntry = 0;
nCurUserEvent = 0xffffffff;
- bUpdateMode = TRUE;
- bInVScrollHdl = FALSE;
+ bUpdateMode = sal_True;
+ bInVScrollHdl = sal_False;
nFlags |= F_FILLING;
- bSubLstOpRet = bSubLstOpLR = bContextMenuHandling = bIsCellFocusEnabled = FALSE;
+ bSubLstOpRet = bSubLstOpLR = bContextMenuHandling = bIsCellFocusEnabled = sal_False;
}
SvImpLBox::~SvImpLBox()
@@ -163,7 +163,7 @@ short SvImpLBox::UpdateContextBmpWidthVector( SvLBoxEntry* pEntry, short nWidth
{
DBG_ASSERT( pView->pModel, "View and Model aren't valid!" );
- USHORT nDepth = pView->pModel->GetDepth( pEntry );
+ sal_uInt16 nDepth = pView->pModel->GetDepth( pEntry );
// initialize vector if necessary
std::vector< short >::size_type nSize = aContextBmpWidthVector.size();
while ( nDepth > nSize )
@@ -211,7 +211,7 @@ void SvImpLBox::UpdateContextBmpWidthVectorFromMovedEntry( SvLBoxEntry* pEntry )
void SvImpLBox::UpdateContextBmpWidthMax( SvLBoxEntry* pEntry )
{
- USHORT nDepth = pView->pModel->GetDepth( pEntry );
+ sal_uInt16 nDepth = pView->pModel->GetDepth( pEntry );
if( aContextBmpWidthVector.size() < 1 )
return;
short nWidth = aContextBmpWidthVector[ nDepth ];
@@ -246,7 +246,7 @@ void SvImpLBox::SetStyle( WinBits i_nWinStyle )
{
m_nStyle = i_nWinStyle;
if ( ( m_nStyle & WB_SIMPLEMODE) && ( aSelEng.GetSelectionMode() == MULTIPLE_SELECTION ) )
- aSelEng.AddAlways( TRUE );
+ aSelEng.AddAlways( sal_True );
}
void SvImpLBox::SetExtendedWindowBits( ExtendedWinBits _nBits )
@@ -333,11 +333,11 @@ IMPL_LINK( SvImpLBox, ScrollUpDownHdl, ScrollBar *, pScrollBar )
nFlags &= (~F_FILLING);
- bInVScrollHdl = TRUE;
+ bInVScrollHdl = sal_True;
if( pView->IsEditingActive() )
{
- pView->EndEditing( TRUE ); // Cancel
+ pView->EndEditing( sal_True ); // Cancel
pView->Update();
}
BeginScroll();
@@ -347,7 +347,7 @@ IMPL_LINK( SvImpLBox, ScrollUpDownHdl, ScrollBar *, pScrollBar )
if( nDelta == 1 )
CursorDown();
else
- PageDown( (USHORT) nDelta );
+ PageDown( (sal_uInt16) nDelta );
}
else
{
@@ -355,9 +355,9 @@ IMPL_LINK( SvImpLBox, ScrollUpDownHdl, ScrollBar *, pScrollBar )
if( nDelta == 1 )
CursorUp();
else
- PageUp( (USHORT) nDelta );
+ PageUp( (sal_uInt16) nDelta );
}
- bInVScrollHdl = FALSE;
+ bInVScrollHdl = sal_False;
return 0;
}
@@ -369,13 +369,13 @@ void SvImpLBox::CursorDown()
{
nFlags &= (~F_FILLING);
pView->NotifyScrolling( -1 );
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
pView->Update();
pStartEntry = pNextFirstToDraw;
Rectangle aArea( GetVisibleArea() );
pView->Scroll( 0, -(pView->GetEntryHeight()), aArea, SCROLL_NOCHILDREN );
pView->Update();
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
pView->NotifyScrolled();
}
}
@@ -388,31 +388,31 @@ void SvImpLBox::CursorUp()
nFlags &= (~F_FILLING);
long nEntryHeight = pView->GetEntryHeight();
pView->NotifyScrolling( 1 );
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
pView->Update();
pStartEntry = pPrevFirstToDraw;
Rectangle aArea( GetVisibleArea() );
aArea.Bottom() -= nEntryHeight;
pView->Scroll( 0, nEntryHeight, aArea, SCROLL_NOCHILDREN );
pView->Update();
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
pView->NotifyScrolled();
}
}
-void SvImpLBox::PageDown( USHORT nDelta )
+void SvImpLBox::PageDown( sal_uInt16 nDelta )
{
- USHORT nRealDelta = nDelta;
+ sal_uInt16 nRealDelta = nDelta;
if( !nDelta )
return;
SvLBoxEntry* pNext;
pNext = (SvLBoxEntry*)(pView->NextVisible( pStartEntry, nRealDelta ));
- if( (ULONG)pNext == (ULONG)pStartEntry )
+ if( (sal_uLong)pNext == (sal_uLong)pStartEntry )
return;
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
nFlags &= (~F_FILLING);
pView->Update();
@@ -436,21 +436,21 @@ void SvImpLBox::PageDown( USHORT nDelta )
pView->NotifyScrolled();
}
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
-void SvImpLBox::PageUp( USHORT nDelta )
+void SvImpLBox::PageUp( sal_uInt16 nDelta )
{
- USHORT nRealDelta = nDelta;
+ sal_uInt16 nRealDelta = nDelta;
if( !nDelta )
return;
SvLBoxEntry* pPrev = (SvLBoxEntry*)(pView->PrevVisible( pStartEntry, nRealDelta ));
- if( (ULONG)pPrev == (ULONG)pStartEntry )
+ if( (sal_uLong)pPrev == (sal_uLong)pStartEntry )
return;
nFlags &= (~F_FILLING);
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
pView->Update();
pStartEntry = pPrev;
@@ -470,10 +470,10 @@ void SvImpLBox::PageUp( USHORT nDelta )
pView->NotifyScrolled();
}
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
-void SvImpLBox::KeyUp( BOOL bPageUp, BOOL bNotifyScroll )
+void SvImpLBox::KeyUp( sal_Bool bPageUp, sal_Bool bNotifyScroll )
{
if( !aVerSBar.IsVisible() )
return;
@@ -507,7 +507,7 @@ void SvImpLBox::KeyUp( BOOL bPageUp, BOOL bNotifyScroll )
}
-void SvImpLBox::KeyDown( BOOL bPageDown, BOOL bNotifyScroll )
+void SvImpLBox::KeyDown( sal_Bool bPageDown, sal_Bool bNotifyScroll )
{
if( !aVerSBar.IsVisible() )
return;
@@ -582,15 +582,15 @@ void SvImpLBox::InvalidateEntry( SvLBoxEntry* pEntry )
}
if( !(nFlags & F_IN_PAINT ))
{
- BOOL bHasFocusRect = FALSE;
+ sal_Bool bHasFocusRect = sal_False;
if( pEntry==pCursor && pView->HasFocus() )
{
- bHasFocusRect = TRUE;
- ShowCursor( FALSE );
+ bHasFocusRect = sal_True;
+ ShowCursor( sal_False );
}
InvalidateEntry( GetEntryLine( pEntry ) );
if( bHasFocusRect )
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
}
@@ -615,7 +615,7 @@ void SvImpLBox::RecalcFocusRect()
// Setzt Cursor. Passt bei SingleSelection die Selektion an
//
-void SvImpLBox::SetCursor( SvLBoxEntry* pEntry, BOOL bForceNoSelect )
+void SvImpLBox::SetCursor( SvLBoxEntry* pEntry, sal_Bool bForceNoSelect )
{
SvViewDataEntry* pViewDataNewCur = 0;
if( pEntry )
@@ -638,18 +638,18 @@ void SvImpLBox::SetCursor( SvLBoxEntry* pEntry, BOOL bForceNoSelect )
SvLBoxEntry* pOldCursor = pCursor;
if( pCursor && pEntry != pCursor )
{
- pView->SetEntryFocus( pCursor, FALSE );
+ pView->SetEntryFocus( pCursor, sal_False );
if( bSimpleTravel )
- pView->Select( pCursor, FALSE );
+ pView->Select( pCursor, sal_False );
pView->HideFocus();
}
pCursor = pEntry;
if( pCursor )
{
- pViewDataNewCur->SetFocus( TRUE );
+ pViewDataNewCur->SetFocus( sal_True );
if(!bForceNoSelect && bSimpleTravel && !(nFlags & F_DESEL_ALL) && GetUpdateMode())
{
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
}
// Mehrfachselektion: Im Cursor-Move selektieren, wenn
// nicht im Add-Mode (Ctrl-F8)
@@ -658,11 +658,11 @@ void SvImpLBox::SetCursor( SvLBoxEntry* pEntry, BOOL bForceNoSelect )
!(nFlags & F_DESEL_ALL) && !aSelEng.IsAddMode() &&
!bForceNoSelect )
{
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
}
else
{
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
if( pAnchor )
@@ -676,7 +676,7 @@ void SvImpLBox::SetCursor( SvLBoxEntry* pEntry, BOOL bForceNoSelect )
pView->OnCurrentEntryChanged();
}
-void SvImpLBox::ShowCursor( BOOL bShow )
+void SvImpLBox::ShowCursor( sal_Bool bShow )
{
if( !bShow || !pCursor || !pView->HasFocus() )
{
@@ -701,8 +701,8 @@ void SvImpLBox::ShowCursor( BOOL bShow )
-void SvImpLBox::UpdateAll( BOOL bInvalidateCompleteView,
- BOOL bUpdateVerScrollBar )
+void SvImpLBox::UpdateAll( sal_Bool bInvalidateCompleteView,
+ sal_Bool bUpdateVerScrollBar )
{
if( bUpdateVerScrollBar )
FindMostRight(0);
@@ -711,8 +711,8 @@ void SvImpLBox::UpdateAll( BOOL bInvalidateCompleteView,
FillView();
ShowVerSBar();
if( bSimpleTravel && pCursor && pView->HasFocus() )
- pView->Select( pCursor, TRUE );
- ShowCursor( TRUE );
+ pView->Select( pCursor, sal_True );
+ ShowCursor( sal_True );
if( bInvalidateCompleteView )
pView->Invalidate();
else
@@ -726,7 +726,7 @@ IMPL_LINK_INLINE_START( SvImpLBox, ScrollLeftRightHdl, ScrollBar *, pScrollBar )
{
if( pView->IsEditingActive() )
{
- pView->EndEditing( TRUE ); // Cancel
+ pView->EndEditing( sal_True ); // Cancel
pView->Update();
}
pView->nFocusWidth = -1;
@@ -743,7 +743,7 @@ void SvImpLBox::KeyLeftRight( long nDelta )
BeginScroll();
nFlags &= (~F_FILLING);
pView->NotifyScrolling( 0 ); // 0 == horizontales Scrolling
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
// neuen Origin berechnen
long nPos = aHorSBar.GetThumbPos();
@@ -761,7 +761,7 @@ void SvImpLBox::KeyLeftRight( long nDelta )
else
pView->Invalidate();
RecalcFocusRect();
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
pView->NotifyScrolled();
}
@@ -780,8 +780,8 @@ SvLBoxEntry* SvImpLBox::GetClickedEntry( const Point& rPoint ) const
if( pView->GetEntryCount() == 0 || !pStartEntry || !pView->GetEntryHeight())
return 0;
- USHORT nClickedEntry = (USHORT)(rPoint.Y() / pView->GetEntryHeight() );
- USHORT nTemp = nClickedEntry;
+ sal_uInt16 nClickedEntry = (sal_uInt16)(rPoint.Y() / pView->GetEntryHeight() );
+ sal_uInt16 nTemp = nClickedEntry;
SvLBoxEntry* pEntry = (SvLBoxEntry*)(pView->NextVisible( pStartEntry, nTemp ));
return pEntry;
}
@@ -790,13 +790,13 @@ SvLBoxEntry* SvImpLBox::GetClickedEntry( const Point& rPoint ) const
// prueft, ob der Eintrag "richtig" getroffen wurde
// (Focusrect+ ContextBitmap bei TreeListBox)
//
-BOOL SvImpLBox::EntryReallyHit(SvLBoxEntry* pEntry,const Point& rPosPixel,long nLine)
+sal_Bool SvImpLBox::EntryReallyHit(SvLBoxEntry* pEntry,const Point& rPosPixel,long nLine)
{
- BOOL bRet;
+ sal_Bool bRet;
// bei "besonderen" Entries (mit CheckButtons usw.) sind wir
// nicht so pingelig
if( pEntry->ItemCount() >= 3 )
- return TRUE;
+ return sal_True;
Rectangle aRect( pView->GetFocusRect( pEntry, nLine ));
aRect.Right() = GetOutputSize().Width() - pView->GetMapMode().GetOrigin().X();
@@ -809,9 +809,9 @@ BOOL SvImpLBox::EntryReallyHit(SvLBoxEntry* pEntry,const Point& rPosPixel,long n
Point aPos( rPosPixel );
aPos -= pView->GetMapMode().GetOrigin();
if( aRect.IsInside( aPos ) )
- bRet = TRUE;
+ bRet = sal_True;
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
@@ -824,8 +824,8 @@ SvLBoxEntry* SvImpLBox::GetEntry( const Point& rPoint ) const
|| !pView->GetEntryHeight())
return 0;
- USHORT nClickedEntry = (USHORT)(rPoint.Y() / pView->GetEntryHeight() );
- USHORT nTemp = nClickedEntry;
+ sal_uInt16 nClickedEntry = (sal_uInt16)(rPoint.Y() / pView->GetEntryHeight() );
+ sal_uInt16 nTemp = nClickedEntry;
SvLBoxEntry* pEntry = (SvLBoxEntry*)(pView->NextVisible( pStartEntry, nTemp ));
if( nTemp != nClickedEntry )
pEntry = 0;
@@ -833,7 +833,7 @@ SvLBoxEntry* SvImpLBox::GetEntry( const Point& rPoint ) const
}
-SvLBoxEntry* SvImpLBox::MakePointVisible(const Point& rPoint,BOOL bNotifyScroll)
+SvLBoxEntry* SvImpLBox::MakePointVisible(const Point& rPoint,sal_Bool bNotifyScroll)
{
if( !pCursor )
return 0;
@@ -848,19 +848,19 @@ SvLBoxEntry* SvImpLBox::MakePointVisible(const Point& rPoint,BOOL bNotifyScroll)
pEntry = (SvLBoxEntry*)(pView->NextVisible( pCursor ));
if( pEntry && pEntry != pCursor )
- pView->SetEntryFocus( pCursor, FALSE );
+ pView->SetEntryFocus( pCursor, sal_False );
if( nY < 0 )
- KeyUp( FALSE, bNotifyScroll );
+ KeyUp( sal_False, bNotifyScroll );
else
- KeyDown( FALSE, bNotifyScroll );
+ KeyDown( sal_False, bNotifyScroll );
}
else
{
pEntry = GetClickedEntry( rPoint );
if( !pEntry )
{
- USHORT nSteps = 0xFFFF;
+ sal_uInt16 nSteps = 0xFFFF;
// LastVisible ist noch nicht implementiert!
pEntry = (SvLBoxEntry*)(pView->NextVisible( pStartEntry, nSteps ));
}
@@ -869,7 +869,7 @@ SvLBoxEntry* SvImpLBox::MakePointVisible(const Point& rPoint,BOOL bNotifyScroll)
if( pEntry != pCursor &&
aSelEng.GetSelectionMode() == SINGLE_SELECTION
)
- pView->Select( pCursor, FALSE );
+ pView->Select( pCursor, sal_False );
}
}
return pEntry;
@@ -897,11 +897,11 @@ void SvImpLBox::Paint( const Rectangle& rRect )
SvLBoxEntry* pFirst = pView->First();
if( pFirst != pStartEntry )
{
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
pStartEntry = pView->First();
aVerSBar.SetThumbPos( 0 );
StopUserEvent();
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
nCurUserEvent = Application::PostUserEvent(LINK(this,SvImpLBox,MyUserEvent),(void*)1);
return;
}
@@ -913,8 +913,8 @@ void SvImpLBox::Paint( const Rectangle& rRect )
}
#ifdef XX_OV
- ULONG nXAbsPos = (USHORT)pTree->GetAbsPos( pStartEntry );
- ULONG nXVisPos = pView->GetVisiblePos( pStartEntry );
+ sal_uLong nXAbsPos = (sal_uInt16)pTree->GetAbsPos( pStartEntry );
+ sal_uLong nXVisPos = pView->GetVisiblePos( pStartEntry );
SvLBoxString* pXStr = (SvLBoxString*)pStartEntry->GetFirstItem( SV_ITEM_ID_LBOXSTRING);
#endif
@@ -927,8 +927,8 @@ void SvImpLBox::Paint( const Rectangle& rRect )
long nEntryHeight = pView->GetEntryHeight();
// Bereich der zu zeichnenden Entries berechnen
- USHORT nStartLine = (USHORT)( rRect.Top() / nEntryHeight );
- USHORT nCount = (USHORT)( nRectHeight / nEntryHeight );
+ sal_uInt16 nStartLine = (sal_uInt16)( rRect.Top() / nEntryHeight );
+ sal_uInt16 nCount = (sal_uInt16)( nRectHeight / nEntryHeight );
nCount += 2; // keine Zeile vergessen
long nY = nStartLine * nEntryHeight;
@@ -948,10 +948,10 @@ void SvImpLBox::Paint( const Rectangle& rRect )
pView->SetClipRegion( aClipRegion );
- for( USHORT n=0; n< nCount && pEntry; n++ )
+ for( sal_uInt16 n=0; n< nCount && pEntry; n++ )
{
/*long nMaxRight=*/
- pView->PaintEntry1( pEntry, nY, 0xffff, TRUE );
+ pView->PaintEntry1( pEntry, nY, 0xffff, sal_True );
nY += nEntryHeight;
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
}
@@ -959,7 +959,7 @@ void SvImpLBox::Paint( const Rectangle& rRect )
if ( !pCursor && ( ( nExtendedWinBits & EWB_NO_AUTO_CURENTRY ) == 0 ) )
{
// do not select if multiselection or explicit set
- BOOL bNotSelect = ( aSelEng.GetSelectionMode() == MULTIPLE_SELECTION )
+ sal_Bool bNotSelect = ( aSelEng.GetSelectionMode() == MULTIPLE_SELECTION )
|| ( ( m_nStyle & WB_NOINITIALSELECTION ) == WB_NOINITIALSELECTION );
SetCursor( pStartEntry, bNotSelect );
}
@@ -975,12 +975,12 @@ void SvImpLBox::Paint( const Rectangle& rRect )
nFlags &= (~F_IN_PAINT);
}
-void SvImpLBox::MakeVisible( SvLBoxEntry* pEntry, BOOL bMoveToTop )
+void SvImpLBox::MakeVisible( SvLBoxEntry* pEntry, sal_Bool bMoveToTop )
{
if( !pEntry )
return;
- BOOL bInView = IsEntryInView( pEntry );
+ sal_Bool bInView = IsEntryInView( pEntry );
if( bInView && (!bMoveToTop || pStartEntry == pEntry) )
return; // ist schon sichtbar
@@ -997,7 +997,7 @@ void SvImpLBox::MakeVisible( SvLBoxEntry* pEntry, BOOL bMoveToTop )
if( !pView->IsExpanded( pParent ) )
{
#ifdef DBG_UTIL
- BOOL bRet =
+ sal_Bool bRet =
#endif
pView->Expand( pParent );
DBG_ASSERT(bRet,"Not expanded!");
@@ -1011,10 +1011,10 @@ void SvImpLBox::MakeVisible( SvLBoxEntry* pEntry, BOOL bMoveToTop )
}
pStartEntry = pEntry;
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
FillView();
aVerSBar.SetThumbPos( (long)(pView->GetVisiblePos( pStartEntry )) );
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
pView->Invalidate();
}
@@ -1030,21 +1030,21 @@ void SvImpLBox::RepaintSelectionItems()
if( nNodeBmpTabDistance == NODE_BMP_TABDIST_NOTVALID )
SetNodeBmpTabDistance();
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
long nEntryHeight = pView->GetEntryHeight();
- ULONG nCount = nVisibleCount;
+ sal_uLong nCount = nVisibleCount;
long nY = 0;
SvLBoxEntry* pEntry = pStartEntry;
- for( ULONG n=0; n< nCount && pEntry; n++ )
+ for( sal_uLong n=0; n< nCount && pEntry; n++ )
{
pView->PaintEntry1( pEntry, nY, 0xffff ); //wg. ItemsetBrowser SV_LBOXTAB_SHOW_SELECTION );
nY += nEntryHeight;
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
}
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
@@ -1080,7 +1080,7 @@ void SvImpLBox::DrawNet()
SvLBoxTab* pFirstDynamicTab = pView->GetFirstDynamicTab();
while( pTree->GetDepth( pEntry ) > 0 )
pEntry = pView->GetParent( pEntry );
- USHORT nOffs = (USHORT)(pView->GetVisiblePos( pStartEntry ) -
+ sal_uInt16 nOffs = (sal_uInt16)(pView->GetVisiblePos( pStartEntry ) -
pView->GetVisiblePos( pEntry ));
long nY = 0;
nY -= ( nOffs * nEntryHeight );
@@ -1095,12 +1095,12 @@ void SvImpLBox::DrawNet()
aCol = rStyleSettings.GetShadowColor();
pView->SetLineColor( aCol );
Point aPos1, aPos2;
- USHORT nDistance;
- ULONG nMax = nVisibleCount + nOffs + 1;
+ sal_uInt16 nDistance;
+ sal_uLong nMax = nVisibleCount + nOffs + 1;
const Image& rExpandedNodeBitmap = GetExpandedNodeBmp();
- for( ULONG n=0; n< nMax && pEntry; n++ )
+ for( sal_uLong n=0; n< nMax && pEntry; n++ )
{
if( pView->IsExpanded(pEntry) )
{
@@ -1116,7 +1116,7 @@ void SvImpLBox::DrawNet()
pChild = pView->FirstChild( pEntry );
DBG_ASSERT(pChild,"Child?");
pChild = pTree->LastSibling( pChild );
- nDistance = (USHORT)(pView->GetVisiblePos(pChild) -
+ nDistance = (sal_uInt16)(pView->GetVisiblePos(pChild) -
pView->GetVisiblePos(pEntry));
aPos2 = aPos1;
aPos2.Y() += nDistance * nEntryHeight;
@@ -1171,7 +1171,7 @@ static long GetOptSize( TabBar* pTabBar )
return pTabBar->CalcWindowSizePixel().Width();
}
-void SvImpLBox::PositionScrollBars( Size& rSize, USHORT nMask )
+void SvImpLBox::PositionScrollBars( Size& rSize, sal_uInt16 nMask )
{
long nOverlap = 0;
@@ -1229,19 +1229,19 @@ void SvImpLBox::PositionScrollBars( Size& rSize, USHORT nMask )
}
// nResult: Bit0 == VerSBar Bit1 == HorSBar
-USHORT SvImpLBox::AdjustScrollBars( Size& rSize )
+sal_uInt16 SvImpLBox::AdjustScrollBars( Size& rSize )
{
long nEntryHeight = pView->GetEntryHeight();
if( !nEntryHeight )
return 0;
- USHORT nResult = 0;
+ sal_uInt16 nResult = 0;
Size aOSize( pView->Control::GetOutputSizePixel() );
const WinBits nWindowStyle = pView->GetStyle();
- BOOL bVerSBar = ( nWindowStyle & WB_VSCROLL ) != 0;
- BOOL bHorBar = FALSE;
+ sal_Bool bVerSBar = ( nWindowStyle & WB_VSCROLL ) != 0;
+ sal_Bool bHorBar = sal_False;
long nMaxRight = aOSize.Width(); //GetOutputSize().Width();
Point aOrigin( pView->GetMapMode().GetOrigin() );
aOrigin.X() *= -1;
@@ -1250,10 +1250,10 @@ USHORT SvImpLBox::AdjustScrollBars( Size& rSize )
if( pTabBar || (
(nWindowStyle & WB_HSCROLL) &&
(nVis < nMostRight || nMaxRight < nMostRight) ))
- bHorBar = TRUE;
+ bHorBar = sal_True;
// Anzahl aller nicht eingeklappten Eintraege
- ULONG nTotalCount = pView->GetVisibleCount();
+ sal_uLong nTotalCount = pView->GetVisibleCount();
// Anzahl in der View sichtbarer Eintraege
nVisibleCount = aOSize.Height() / nEntryHeight;
@@ -1268,7 +1268,7 @@ USHORT SvImpLBox::AdjustScrollBars( Size& rSize )
{
if( (nWindowStyle & WB_HSCROLL) &&
(nVis < nMostRight || nMaxRight < nMostRight) )
- bHorBar = TRUE;
+ bHorBar = sal_True;
}
}
@@ -1331,7 +1331,7 @@ USHORT SvImpLBox::AdjustScrollBars( Size& rSize )
nTemp = nNewThumbPos - nTemp;
if( pView->IsEditingActive() )
{
- pView->EndEditing( TRUE ); // Cancel
+ pView->EndEditing( sal_True ); // Cancel
pView->Update();
}
pView->nFocusWidth = -1;
@@ -1387,23 +1387,23 @@ void SvImpLBox::FillView()
{
if( !pStartEntry )
{
- USHORT nVisibleViewCount = (USHORT)(pView->GetVisibleCount());
- USHORT nTempThumb = (USHORT)aVerSBar.GetThumbPos();
+ sal_uInt16 nVisibleViewCount = (sal_uInt16)(pView->GetVisibleCount());
+ sal_uInt16 nTempThumb = (sal_uInt16)aVerSBar.GetThumbPos();
if( nTempThumb >= nVisibleViewCount )
nTempThumb = nVisibleViewCount - 1;
pStartEntry = (SvLBoxEntry*)(pView->GetEntryAtVisPos(nTempThumb));
}
if( pStartEntry )
{
- USHORT nLast = (USHORT)(pView->GetVisiblePos( (SvLBoxEntry*)(pView->LastVisible())));
- USHORT nThumb = (USHORT)(pView->GetVisiblePos( pStartEntry ));
- USHORT nCurDispEntries = nLast-nThumb+1;
+ sal_uInt16 nLast = (sal_uInt16)(pView->GetVisiblePos( (SvLBoxEntry*)(pView->LastVisible())));
+ sal_uInt16 nThumb = (sal_uInt16)(pView->GetVisiblePos( pStartEntry ));
+ sal_uInt16 nCurDispEntries = nLast-nThumb+1;
if( nCurDispEntries < nVisibleCount )
{
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
// Fenster fuellen, indem der Thumb schrittweise
// nach oben bewegt wird
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
SvLBoxEntry* pTemp = pStartEntry;
while( nCurDispEntries < nVisibleCount && pTemp )
{
@@ -1413,13 +1413,13 @@ void SvImpLBox::FillView()
nThumb--;
pStartEntry = pTemp;
nCurDispEntries++;
- bFound = TRUE;
+ bFound = sal_True;
}
}
if( bFound )
{
aVerSBar.SetThumbPos( nThumb );
- ShowCursor( TRUE ); // Focusrect neu berechnen
+ ShowCursor( sal_True ); // Focusrect neu berechnen
pView->Invalidate();
}
}
@@ -1431,11 +1431,11 @@ void SvImpLBox::FillView()
void SvImpLBox::ShowVerSBar()
{
- BOOL bVerBar = ( pView->GetStyle() & WB_VSCROLL ) != 0;
- ULONG nVis = 0;
+ sal_Bool bVerBar = ( pView->GetStyle() & WB_VSCROLL ) != 0;
+ sal_uLong nVis = 0;
if( !bVerBar )
nVis = pView->GetVisibleCount();
- if( bVerBar || (nVisibleCount && nVis > (ULONG)(nVisibleCount-1)) )
+ if( bVerBar || (nVisibleCount && nVis > (sal_uLong)(nVisibleCount-1)) )
{
if( !aVerSBar.IsVisible() )
{
@@ -1504,18 +1504,18 @@ void SvImpLBox::SyncVerThumb()
aVerSBar.SetThumbPos( 0 );
}
-BOOL SvImpLBox::IsEntryInView( SvLBoxEntry* pEntry ) const
+sal_Bool SvImpLBox::IsEntryInView( SvLBoxEntry* pEntry ) const
{
// Parent eingeklappt
if( !pView->IsEntryVisible(pEntry) )
- return FALSE;
+ return sal_False;
long nY = GetEntryLine( pEntry );
if( nY < 0 )
- return FALSE;
+ return sal_False;
long nMax = nVisibleCount * pView->GetEntryHeight();
if( nY >= nMax )
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
@@ -1558,10 +1558,10 @@ void SvImpLBox::IndentChanged( short /* nIndentPixel */ ) {}
void SvImpLBox::EntryExpanded( SvLBoxEntry* pEntry )
{
- // SelAllDestrAnch( FALSE, TRUE ); //DeselectAll();
+ // SelAllDestrAnch( sal_False, sal_True ); //DeselectAll();
if( GetUpdateMode() )
{
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
long nY = GetEntryLine( pEntry );
if( IsLineVisible(nY) )
{
@@ -1573,7 +1573,7 @@ void SvImpLBox::EntryExpanded( SvLBoxEntry* pEntry )
// die Thumb-Position korrigiert werden.
SyncVerThumb();
ShowVerSBar();
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
}
@@ -1582,7 +1582,7 @@ void SvImpLBox::EntryCollapsed( SvLBoxEntry* pEntry )
if( !pView->IsEntryVisible( pEntry ) )
return;
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
if( !pMostRightEntry || pTree->IsChild( pEntry,pMostRightEntry ) )
{
@@ -1592,13 +1592,13 @@ void SvImpLBox::EntryCollapsed( SvLBoxEntry* pEntry )
if( pStartEntry )
{
long nOldThumbPos = aVerSBar.GetThumbPos();
- ULONG nVisList = pView->GetVisibleCount();
+ sal_uLong nVisList = pView->GetVisibleCount();
aVerSBar.SetRange( Range(0, nVisList-1) );
long nNewThumbPos = aVerSBar.GetThumbPos();
if( nNewThumbPos != nOldThumbPos )
{
pStartEntry = pView->First();
- USHORT nDistance = (USHORT)nNewThumbPos;
+ sal_uInt16 nDistance = (sal_uInt16)nNewThumbPos;
if( nDistance )
pStartEntry = (SvLBoxEntry*)(pView->NextVisible( pStartEntry,
nDistance));
@@ -1614,9 +1614,9 @@ void SvImpLBox::EntryCollapsed( SvLBoxEntry* pEntry )
SetCursor( pEntry );
if( GetUpdateMode() )
ShowVerSBar();
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
if( GetUpdateMode() && pCursor )
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
}
void SvImpLBox::CollapsingEntry( SvLBoxEntry* pEntry )
@@ -1624,7 +1624,7 @@ void SvImpLBox::CollapsingEntry( SvLBoxEntry* pEntry )
if( !pView->IsEntryVisible( pEntry ) || !pStartEntry )
return;
- SelAllDestrAnch( FALSE, TRUE ); // deselectall
+ SelAllDestrAnch( sal_False, sal_True ); // deselectall
// ist der eingeklappte Parent sichtbar ?
long nY = GetEntryLine( pEntry );
@@ -1667,7 +1667,7 @@ void SvImpLBox::SetNodeBmpTabDistance()
//
// korrigiert bei SingleSelection den Cursor
//
-void SvImpLBox::EntrySelected( SvLBoxEntry* pEntry, BOOL bSelect )
+void SvImpLBox::EntrySelected( SvLBoxEntry* pEntry, sal_Bool bSelect )
{
if( nFlags & F_IGNORE_SELECT )
return;
@@ -1694,9 +1694,9 @@ void SvImpLBox::EntrySelected( SvLBoxEntry* pEntry, BOOL bSelect )
long nY = GetEntryLine( pEntry );
if( IsLineVisible( nY ) )
{
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
pView->PaintEntry1( pEntry, nY, 0xffff ); // wg. ItemsetBrowser SV_LBOXTAB_SHOW_SELECTION );
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
}
}
@@ -1740,14 +1740,14 @@ void SvImpLBox::RemovingEntry( SvLBoxEntry* pEntry )
if( pCursor && pCursor == pEntry )
{
if( bSimpleTravel )
- pView->Select( pCursor, FALSE );
- ShowCursor( FALSE ); // Focus-Rect weg
+ pView->Select( pCursor, sal_False );
+ ShowCursor( sal_False ); // Focus-Rect weg
// NextSibling, weil auch Childs des Cursors geloescht werden
pTemp = pView->NextSibling( pCursor );
if( !pTemp )
pTemp = (SvLBoxEntry*)(pView->PrevVisible( pCursor ));
- SetCursor( pTemp, TRUE );
+ SetCursor( pTemp, sal_True );
}
if( pStartEntry && pStartEntry == pEntry )
{
@@ -1780,10 +1780,10 @@ void SvImpLBox::EntryRemoved()
if( !pStartEntry )
pStartEntry = pTree->First();
if( !pCursor )
- SetCursor( pStartEntry, TRUE );
+ SetCursor( pStartEntry, sal_True );
if( pCursor && (bSimpleTravel || !pView->GetSelectionCount() ))
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
if( GetUpdateMode())
{
@@ -1811,9 +1811,9 @@ void SvImpLBox::EntryRemoved()
MakeVisible( pCursor );
}
else
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
}
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
nFlags &= (~F_REMOVED_RECALC_MOST_RIGHT);
}
@@ -1822,12 +1822,12 @@ void SvImpLBox::EntryRemoved()
void SvImpLBox::MovingEntry( SvLBoxEntry* pEntry )
{
int bDeselAll = nFlags & F_DESEL_ALL;
- SelAllDestrAnch( FALSE, TRUE ); // DeselectAll();
+ SelAllDestrAnch( sal_False, sal_True ); // DeselectAll();
if( !bDeselAll )
nFlags &= (~F_DESEL_ALL);
if( pEntry == pCursor )
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
if( IsEntryInView( pEntry ) )
pView->Invalidate();
if( pEntry == pStartEntry )
@@ -1860,8 +1860,8 @@ void SvImpLBox::EntryMoved( SvLBoxEntry* pEntry )
pStartEntry = pView->First();
aVerSBar.SetRange( Range(0, pView->GetVisibleCount()-1));
- USHORT nFirstPos = (USHORT)pTree->GetAbsPos( pStartEntry );
- USHORT nNewPos = (USHORT)pTree->GetAbsPos( pEntry );
+ sal_uInt16 nFirstPos = (sal_uInt16)pTree->GetAbsPos( pStartEntry );
+ sal_uInt16 nNewPos = (sal_uInt16)pTree->GetAbsPos( pEntry );
FindMostRight(0);
if( nNewPos < nFirstPos ) //!!!Notloesung
pStartEntry = pEntry;
@@ -1870,7 +1870,7 @@ void SvImpLBox::EntryMoved( SvLBoxEntry* pEntry )
if( pEntry == pCursor )
{
if( pView->IsEntryVisible( pCursor ) )
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
else
{
SvLBoxEntry* pParent = pEntry;
@@ -1900,16 +1900,16 @@ void SvImpLBox::EntryInserted( SvLBoxEntry* pEntry )
return;
int bDeselAll = nFlags & F_DESEL_ALL;
if( bDeselAll )
- SelAllDestrAnch( FALSE, TRUE );
+ SelAllDestrAnch( sal_False, sal_True );
else
DestroyAnchor();
// nFlags &= (~F_DESEL_ALL);
-// ShowCursor( FALSE ); // falls sich Cursor nach unten verschiebt
+// ShowCursor( sal_False ); // falls sich Cursor nach unten verschiebt
long nY = GetEntryLine( pEntry );
- BOOL bEntryVisible = IsLineVisible( nY );
+ sal_Bool bEntryVisible = IsLineVisible( nY );
if( bEntryVisible )
{
- ShowCursor( FALSE ); // falls sich Cursor nach unten verschiebt
+ ShowCursor( sal_False ); // falls sich Cursor nach unten verschiebt
nY -= pView->GetEntryHeight(); // wg. Linien
InvalidateEntriesFrom( nY );
}
@@ -1918,9 +1918,9 @@ void SvImpLBox::EntryInserted( SvLBoxEntry* pEntry )
// pruefen, ob die View komplett gefuellt ist. Wenn
// nicht, dann pStartEntry und den Cursor anpassen
// (automatisches scrollen)
- USHORT nLast = (USHORT)(pView->GetVisiblePos( (SvLBoxEntry*)(pView->LastVisible())));
- USHORT nThumb = (USHORT)(pView->GetVisiblePos( pStartEntry ));
- USHORT nCurDispEntries = nLast-nThumb+1;
+ sal_uInt16 nLast = (sal_uInt16)(pView->GetVisiblePos( (SvLBoxEntry*)(pView->LastVisible())));
+ sal_uInt16 nThumb = (sal_uInt16)(pView->GetVisiblePos( pStartEntry ));
+ sal_uInt16 nCurDispEntries = nLast-nThumb+1;
if( nCurDispEntries < nVisibleCount )
{
// beim naechsten Paint-Event setzen
@@ -1953,7 +1953,7 @@ void SvImpLBox::EntryInserted( SvLBoxEntry* pEntry )
aVerSBar.SetRange( Range(0, pView->GetVisibleCount()-1));
SyncVerThumb(); // falls vor Thumb eingefuegt wurde
ShowVerSBar();
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
if( pStartEntry != pView->First() && (nFlags & F_FILLING) )
pView->Update();
}
@@ -1968,7 +1968,7 @@ void SvImpLBox::EntryInserted( SvLBoxEntry* pEntry )
// ****** Steuerung der Controlanimation
-BOOL SvImpLBox::ButtonDownCheckCtrl(const MouseEvent& rMEvt, SvLBoxEntry* pEntry,
+sal_Bool SvImpLBox::ButtonDownCheckCtrl(const MouseEvent& rMEvt, SvLBoxEntry* pEntry,
long nY )
{
SvLBoxItem* pItem = pView->GetItem(pEntry,rMEvt.GetPosPixel().X(),&pActiveTab);
@@ -1979,18 +1979,18 @@ BOOL SvImpLBox::ButtonDownCheckCtrl(const MouseEvent& rMEvt, SvLBoxEntry* pEntry
if( pCursor == pActiveEntry )
pView->HideFocus();
pView->CaptureMouse();
- pActiveButton->SetStateHilighted( TRUE );
+ pActiveButton->SetStateHilighted( sal_True );
pView->PaintEntry1( pActiveEntry, nY,
SV_LBOXTAB_PUSHABLE | SV_LBOXTAB_ADJUST_CENTER |
SV_LBOXTAB_ADJUST_RIGHT );
- return TRUE;
+ return sal_True;
}
else
pActiveButton = 0;
- return FALSE;
+ return sal_False;
}
-BOOL SvImpLBox::MouseMoveCheckCtrl( const MouseEvent& rMEvt, SvLBoxEntry* pEntry)
+sal_Bool SvImpLBox::MouseMoveCheckCtrl( const MouseEvent& rMEvt, SvLBoxEntry* pEntry)
{
if( pActiveButton )
{
@@ -2001,7 +2001,7 @@ BOOL SvImpLBox::MouseMoveCheckCtrl( const MouseEvent& rMEvt, SvLBoxEntry* pEntry
{
if( !pActiveButton->IsStateHilighted() )
{
- pActiveButton->SetStateHilighted(TRUE );
+ pActiveButton->SetStateHilighted(sal_True );
nY = GetEntryLine( pActiveEntry );
pView->PaintEntry1( pActiveEntry, nY,
SV_LBOXTAB_PUSHABLE | SV_LBOXTAB_ADJUST_CENTER |
@@ -2012,24 +2012,24 @@ BOOL SvImpLBox::MouseMoveCheckCtrl( const MouseEvent& rMEvt, SvLBoxEntry* pEntry
{
if( pActiveButton->IsStateHilighted() )
{
- pActiveButton->SetStateHilighted(FALSE );
+ pActiveButton->SetStateHilighted(sal_False );
nY = GetEntryLine( pActiveEntry );
pView->PaintEntry1( pActiveEntry, nY, SV_LBOXTAB_PUSHABLE );
}
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SvImpLBox::ButtonUpCheckCtrl( const MouseEvent& rMEvt )
+sal_Bool SvImpLBox::ButtonUpCheckCtrl( const MouseEvent& rMEvt )
{
if( pActiveButton )
{
pView->ReleaseMouse();
SvLBoxEntry* pEntry = GetClickedEntry( rMEvt.GetPosPixel() );
long nY = GetEntryLine( pActiveEntry );
- pActiveButton->SetStateHilighted( FALSE );
+ pActiveButton->SetStateHilighted( sal_False );
long nMouseX = rMEvt.GetPosPixel().X();
if( pEntry == pActiveEntry &&
pView->GetItem( pActiveEntry, nMouseX ) == pActiveButton )
@@ -2038,26 +2038,26 @@ BOOL SvImpLBox::ButtonUpCheckCtrl( const MouseEvent& rMEvt )
SV_LBOXTAB_PUSHABLE | SV_LBOXTAB_ADJUST_CENTER |
SV_LBOXTAB_ADJUST_RIGHT );
if( pCursor == pActiveEntry )
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
pActiveButton = 0;
pActiveEntry = 0;
pActiveTab = 0;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// ******* Steuerung Plus/Minus-Button zum Expandieren/Kollabieren
-// FALSE == kein Expand/Collapse-Button getroffen
-BOOL SvImpLBox::IsNodeButton( const Point& rPosPixel, SvLBoxEntry* pEntry ) const
+// sal_False == kein Expand/Collapse-Button getroffen
+sal_Bool SvImpLBox::IsNodeButton( const Point& rPosPixel, SvLBoxEntry* pEntry ) const
{
if( !pEntry->HasChilds() && !pEntry->HasChildsOnDemand() )
- return FALSE;
+ return sal_False;
SvLBoxTab* pFirstDynamicTab = pView->GetFirstDynamicTab();
if( !pFirstDynamicTab )
- return FALSE;
+ return sal_False;
long nMouseX = rPosPixel.X();
// in Doc-Koords umrechnen
@@ -2067,26 +2067,26 @@ BOOL SvImpLBox::IsNodeButton( const Point& rPosPixel, SvLBoxEntry* pEntry ) cons
long nX = pView->GetTabPos( pEntry, pFirstDynamicTab);
nX += nNodeBmpTabDistance;
if( nMouseX < nX )
- return FALSE;
+ return sal_False;
nX += nNodeBmpWidth;
if( nMouseX > nX )
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
-// FALSE == hit no node button
-BOOL SvImpLBox::ButtonDownCheckExpand( const MouseEvent& rMEvt, SvLBoxEntry* pEntry, long /* nY */ )
+// sal_False == hit no node button
+sal_Bool SvImpLBox::ButtonDownCheckExpand( const MouseEvent& rMEvt, SvLBoxEntry* pEntry, long /* nY */ )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( pView->IsEditingActive() && pEntry == pView->pEdEntry )
// inplace editing -> nothing to do
- bRet = TRUE;
+ bRet = sal_True;
else if ( IsNodeButton( rMEvt.GetPosPixel(), pEntry ) )
{
if ( pView->IsExpanded( pEntry ) )
{
- pView->EndEditing( TRUE );
+ pView->EndEditing( sal_True );
pView->Collapse( pEntry );
}
else
@@ -2094,7 +2094,7 @@ BOOL SvImpLBox::ButtonDownCheckExpand( const MouseEvent& rMEvt, SvLBoxEntry* pEn
// you can expand an entry, which is in editing
pView->Expand( pEntry );
}
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -2161,7 +2161,7 @@ void SvImpLBox::MouseButtonDown( const MouseEvent& rMEvt )
{
// neu selektieren & tschuess
if( !bSimpleTravel && !aSelEng.IsAlwaysAdding())
- SelAllDestrAnch( FALSE, TRUE ); // DeselectAll();
+ SelAllDestrAnch( sal_False, sal_True ); // DeselectAll();
SetCursor( pEntry );
return;
@@ -2174,7 +2174,7 @@ void SvImpLBox::MouseButtonDown( const MouseEvent& rMEvt )
pView->Expand( pEntry );
if( pEntry == pCursor ) // nur wenn Entryitem angeklickt wurde
// (Nodebutton ist kein Entryitem!)
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
return;
}
}
@@ -2182,7 +2182,7 @@ void SvImpLBox::MouseButtonDown( const MouseEvent& rMEvt )
else
{
// CheckButton? (TreeListBox: Check + Info)
- if( ButtonDownCheckCtrl(rMEvt, pEntry, nY) == TRUE)
+ if( ButtonDownCheckCtrl(rMEvt, pEntry, nY) == sal_True)
return;
// Inplace-Editing?
#if 0
@@ -2232,28 +2232,28 @@ void SvImpLBox::MouseMove( const MouseEvent& rMEvt)
return;
}
-BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
+sal_Bool SvImpLBox::KeyInput( const KeyEvent& rKEvt)
{
aEditTimer.Stop();
const KeyCode& rKeyCode = rKEvt.GetKeyCode();
if( rKeyCode.IsMod2() )
- return FALSE; // Alt-Taste nicht auswerten
+ return sal_False; // Alt-Taste nicht auswerten
nFlags &= (~F_FILLING);
if( !pCursor )
pCursor = pStartEntry;
if( !pCursor )
- return FALSE;
+ return sal_False;
- BOOL bKeyUsed = TRUE;
+ sal_Bool bKeyUsed = sal_True;
- USHORT nDelta = (USHORT)aVerSBar.GetPageSize();
- USHORT aCode = rKeyCode.GetCode();
+ sal_uInt16 nDelta = (sal_uInt16)aVerSBar.GetPageSize();
+ sal_uInt16 aCode = rKeyCode.GetCode();
- BOOL bShift = rKeyCode.IsShift();
- BOOL bMod1 = rKeyCode.IsMod1();
+ sal_Bool bShift = rKeyCode.IsShift();
+ sal_Bool bMod1 = rKeyCode.IsMod1();
SvLBoxEntry* pNewCursor;
@@ -2285,7 +2285,7 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
aSelEng.CursorPosChanging( bShift, bMod1 );
SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
if( !IsEntryInView( pNewCursor ) )
- KeyUp( FALSE );
+ KeyUp( sal_False );
}
break;
@@ -2318,13 +2318,13 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
else
{
if( pCursor )
- pView->Select( pCursor, FALSE );
- KeyDown( FALSE );
+ pView->Select( pCursor, sal_False );
+ KeyDown( sal_False );
SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
}
}
else
- KeyDown( FALSE ); // weil ScrollBar-Range evtl. noch
+ KeyDown( sal_False ); // weil ScrollBar-Range evtl. noch
// scrollen erlaubt
break;
@@ -2337,7 +2337,7 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
if ( nCurTabPos < ( pView->TabCount() - 1 /*!2*/ ) )
{
++nCurTabPos;
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
CallEventListeners( VCLEVENT_LISTBOX_SELECT, pCursor );
}
}
@@ -2357,7 +2357,7 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
}
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
}
@@ -2368,7 +2368,7 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
if ( nCurTabPos > FIRST_ENTRY_TAB )
{
--nCurTabPos;
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
CallEventListeners( VCLEVENT_LISTBOX_SELECT, pCursor );
}
}
@@ -2400,7 +2400,7 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
else if( bSubLstOpLR && IsExpandable() )
pView->Collapse( pCursor );
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
}
@@ -2417,19 +2417,19 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
if( nDelta )
{
- DBG_ASSERT(pNewCursor&&(ULONG)pNewCursor!=(ULONG)pCursor,"Cursor?");
+ DBG_ASSERT(pNewCursor&&(sal_uLong)pNewCursor!=(sal_uLong)pCursor,"Cursor?");
aSelEng.CursorPosChanging( bShift, bMod1 );
if( IsEntryInView( pNewCursor ) )
SetCursor( pNewCursor );
else
{
SetCursor( pNewCursor );
- KeyUp( TRUE );
+ KeyUp( sal_True );
}
}
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_PAGEDOWN:
@@ -2445,21 +2445,21 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
if( nDelta )
{
- DBG_ASSERT(pNewCursor&&(ULONG)pNewCursor!=(ULONG)pCursor,"Cursor?");
+ DBG_ASSERT(pNewCursor&&(sal_uLong)pNewCursor!=(sal_uLong)pCursor,"Cursor?");
aSelEng.CursorPosChanging( bShift, bMod1 );
if( IsEntryInView( pNewCursor ) )
SetCursor( pNewCursor );
else
{
SetCursor( pNewCursor );
- KeyDown( TRUE );
+ KeyDown( sal_True );
}
}
else
- KeyDown( FALSE ); // siehe KEY_DOWN
+ KeyDown( sal_False ); // siehe KEY_DOWN
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_SPACE:
@@ -2480,17 +2480,17 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
}
else if ( !pView->IsSelected( pCursor ) )
{
- SelAllDestrAnch( FALSE );
- pView->Select( pCursor, TRUE );
+ SelAllDestrAnch( sal_False );
+ pView->Select( pCursor, sal_True );
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_RETURN:
@@ -2502,7 +2502,7 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
pView->Expand( pCursor );
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_F2:
@@ -2512,7 +2512,7 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
EditTimerCall( 0 );
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_F8:
@@ -2520,12 +2520,12 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
!(m_nStyle & WB_SIMPLEMODE))
{
if( aSelEng.IsAlwaysAdding() )
- aSelEng.AddAlways( FALSE );
+ aSelEng.AddAlways( sal_False );
else
- aSelEng.AddAlways( TRUE );
+ aSelEng.AddAlways( sal_True );
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
@@ -2548,7 +2548,7 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
pView->Expand( pCursor );
if( bMod1 )
{
- USHORT nRefDepth = pTree->GetDepth( pCursor );
+ sal_uInt16 nRefDepth = pTree->GetDepth( pCursor );
SvLBoxEntry* pCur = pTree->Next( pCursor );
while( pCur && pTree->GetDepth(pCur) > nRefDepth )
{
@@ -2559,14 +2559,14 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
}
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_A:
if( bMod1 )
- SelAllDestrAnch( TRUE );
+ SelAllDestrAnch( sal_True );
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_SUBTRACT:
@@ -2580,7 +2580,7 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
SvLBoxEntry* pParentToCollapse = (SvLBoxEntry*)pTree->GetRootLevelParent(pCursor);
if( pParentToCollapse )
{
- USHORT nRefDepth;
+ sal_uInt16 nRefDepth;
// Sonderbehandlung Explorer: Befindet sich auf der
// Root nur ein Eintrag,dann den Root-Entry nicht
// einklappen
@@ -2610,21 +2610,21 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
}
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_DIVIDE :
if( bMod1 )
- SelAllDestrAnch( TRUE );
+ SelAllDestrAnch( sal_True );
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_COMMA :
if( bMod1 )
- SelAllDestrAnch( FALSE );
+ SelAllDestrAnch( sal_False );
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_HOME :
@@ -2637,14 +2637,14 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
if( pNewCursor && pNewCursor != pCursor )
{
-// SelAllDestrAnch( FALSE );
+// SelAllDestrAnch( sal_False );
aSelEng.CursorPosChanging( bShift, bMod1 );
SetCursor( pNewCursor );
if( !IsEntryInView( pNewCursor ) )
MakeVisible( pNewCursor );
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_END :
@@ -2657,14 +2657,14 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
if( pNewCursor && pNewCursor != pCursor)
{
-// SelAllDestrAnch( FALSE );
+// SelAllDestrAnch( sal_False );
aSelEng.CursorPosChanging( bShift, bMod1 );
SetCursor( pNewCursor );
if( !IsEntryInView( pNewCursor ) )
MakeVisible( pNewCursor );
}
else
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
case KEY_ESCAPE:
@@ -2673,18 +2673,18 @@ BOOL SvImpLBox::KeyInput( const KeyEvent& rKEvt)
case KEY_BACKSPACE:
// #105907# must not be handled because this quits dialogs and does other magic things...
// if there are other single keys which should not be handled, they can be added here
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
default:
// is there any reason why we should eat the events here? The only place where this is called
- // is from SvTreeListBox::KeyInput. If we set bKeyUsed to TRUE here, then the key input
+ // is from SvTreeListBox::KeyInput. If we set bKeyUsed to sal_True here, then the key input
// is just silenced. However, we want SvLBox::KeyInput to get a chance, to do the QuickSelection
// handling.
// (The old code here which intentionally set bKeyUsed to TRUE said this was because of "quick search"
// handling, but actually there was no quick search handling anymore. We just re-implemented it.)
// #i31275# / 2009-06-16 / frank.schoenheit@sun.com
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
break;
}
return bKeyUsed;
@@ -2694,11 +2694,11 @@ void __EXPORT SvImpLBox::GetFocus()
{
if( pCursor )
{
- pView->SetEntryFocus( pCursor, TRUE );
- ShowCursor( TRUE );
+ pView->SetEntryFocus( pCursor, sal_True );
+ ShowCursor( sal_True );
// auskommentiert wg. deselectall
// if( bSimpleTravel && !pView->IsSelected(pCursor) )
-// pView->Select( pCursor, TRUE );
+// pView->Select( pCursor, sal_True );
}
if( m_nStyle & WB_HIDESELECTION )
{
@@ -2715,7 +2715,7 @@ void __EXPORT SvImpLBox::GetFocus()
SvViewData* pViewData = pView->GetViewData( pEntry );
if( pViewData->IsCursored() )
{
- pViewData->SetCursored( FALSE );
+ pViewData->SetCursored( sal_False );
InvalidateEntry( pEntry );
}
pEntry = pView->GetModel()->Next( pEntry );
@@ -2730,8 +2730,8 @@ void __EXPORT SvImpLBox::LoseFocus()
{
aEditTimer.Stop();
if( pCursor )
- pView->SetEntryFocus( pCursor,FALSE );
- ShowCursor( FALSE );
+ pView->SetEntryFocus( pCursor,sal_False );
+ ShowCursor( sal_False );
if( m_nStyle & WB_HIDESELECTION )
{
@@ -2739,7 +2739,7 @@ void __EXPORT SvImpLBox::LoseFocus()
while( pEntry )
{
//SvViewData* pViewData = pView->GetViewData( pEntry );
- //pViewData->SetCursored( TRUE );
+ //pViewData->SetCursored( sal_True );
InvalidateEntry( pEntry );
pEntry = pView->NextSelected( pEntry );
}
@@ -2751,7 +2751,7 @@ void __EXPORT SvImpLBox::LoseFocus()
// SelectionEngine
// ********************************************************************
-inline void SvImpLBox::SelectEntry( SvLBoxEntry* pEntry, BOOL bSelect )
+inline void SvImpLBox::SelectEntry( SvLBoxEntry* pEntry, sal_Bool bSelect )
{
pView->Select( pEntry, bSelect );
}
@@ -2797,7 +2797,7 @@ void __EXPORT ImpLBSelEng::CreateCursor()
*/
-BOOL __EXPORT ImpLBSelEng::SetCursorAtPoint(const Point& rPoint, BOOL bDontSelectAtCursor)
+sal_Bool __EXPORT ImpLBSelEng::SetCursorAtPoint(const Point& rPoint, sal_Bool bDontSelectAtCursor)
{
SvLBoxEntry* pNewCursor = pImp->MakePointVisible( rPoint );
if( pNewCursor != pImp->pCursor )
@@ -2808,19 +2808,19 @@ BOOL __EXPORT ImpLBSelEng::SetCursorAtPoint(const Point& rPoint, BOOL bDontSelec
// bei SimpleTravel wird in SetCursor selektiert und
// der Select-Handler gerufen
//if( !bDontSelectAtCursor && !pImp->bSimpleTravel )
- // pImp->SelectEntry( pNewCursor, TRUE );
+ // pImp->SelectEntry( pNewCursor, sal_True );
pImp->SetCursor( pNewCursor, bDontSelectAtCursor );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL __EXPORT ImpLBSelEng::IsSelectionAtPoint( const Point& rPoint )
+sal_Bool __EXPORT ImpLBSelEng::IsSelectionAtPoint( const Point& rPoint )
{
SvLBoxEntry* pEntry = pImp->MakePointVisible( rPoint );
if( pEntry )
return pView->IsSelected(pEntry);
- return FALSE;
+ return sal_False;
}
void __EXPORT ImpLBSelEng::DeselectAtPoint( const Point& rPoint )
@@ -2828,7 +2828,7 @@ void __EXPORT ImpLBSelEng::DeselectAtPoint( const Point& rPoint )
SvLBoxEntry* pEntry = pImp->MakePointVisible( rPoint );
if( !pEntry )
return;
- pImp->SelectEntry( pEntry, FALSE );
+ pImp->SelectEntry( pEntry, sal_False );
}
/*
@@ -2837,13 +2837,13 @@ void __EXPORT ImpLBSelEng::SelectAtPoint( const Point& rPoint )
SvLBoxEntry* pEntry = pImp->MakePointVisible( rPoint );
if( !pEntry )
return;
- pImp->SelectEntry( pEntry, TRUE );
+ pImp->SelectEntry( pEntry, sal_True );
}
*/
void __EXPORT ImpLBSelEng::DeselectAll()
{
- pImp->SelAllDestrAnch( FALSE, FALSE ); // SelectionEngine nicht resetten!
+ pImp->SelAllDestrAnch( sal_False, sal_False ); // SelectionEngine nicht resetten!
pImp->nFlags &= (~F_DESEL_ALL);
}
@@ -2854,9 +2854,9 @@ void __EXPORT ImpLBSelEng::DeselectAll()
void SvImpLBox::SetAnchorSelection(SvLBoxEntry* pOldCursor,SvLBoxEntry* pNewCursor)
{
SvLBoxEntry* pEntry;
- ULONG nAnchorVisPos = pView->GetVisiblePos( pAnchor );
- ULONG nOldVisPos = pView->GetVisiblePos( pOldCursor );
- ULONG nNewVisPos = pView->GetVisiblePos( pNewCursor );
+ sal_uLong nAnchorVisPos = pView->GetVisiblePos( pAnchor );
+ sal_uLong nOldVisPos = pView->GetVisiblePos( pOldCursor );
+ sal_uLong nNewVisPos = pView->GetVisiblePos( pNewCursor );
if( nOldVisPos > nAnchorVisPos ||
( nAnchorVisPos==nOldVisPos && nNewVisPos > nAnchorVisPos) )
@@ -2866,11 +2866,11 @@ void SvImpLBox::SetAnchorSelection(SvLBoxEntry* pOldCursor,SvLBoxEntry* pNewCurs
pEntry = pOldCursor;
while( pEntry && pEntry != pNewCursor )
{
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
}
if( pEntry )
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
return;
}
@@ -2879,20 +2879,20 @@ void SvImpLBox::SetAnchorSelection(SvLBoxEntry* pOldCursor,SvLBoxEntry* pNewCurs
pEntry = pAnchor;
while( pEntry && pEntry != pOldCursor )
{
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
}
if( pEntry )
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
pEntry = pNewCursor;
while( pEntry && pEntry != pAnchor )
{
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
}
if( pEntry )
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
return;
}
@@ -2902,11 +2902,11 @@ void SvImpLBox::SetAnchorSelection(SvLBoxEntry* pOldCursor,SvLBoxEntry* pNewCurs
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
while( pEntry && pEntry != pOldCursor )
{
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
}
if( pEntry )
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
return;
}
}
@@ -2917,11 +2917,11 @@ void SvImpLBox::SetAnchorSelection(SvLBoxEntry* pOldCursor,SvLBoxEntry* pNewCurs
pEntry = pNewCursor;
while( pEntry && pEntry != pOldCursor )
{
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
}
if( pEntry )
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
return;
}
@@ -2930,19 +2930,19 @@ void SvImpLBox::SetAnchorSelection(SvLBoxEntry* pOldCursor,SvLBoxEntry* pNewCurs
pEntry = pOldCursor;
while( pEntry && pEntry != pAnchor )
{
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
}
if( pEntry )
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
pEntry = pAnchor;
while( pEntry && pEntry != pNewCursor )
{
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
}
if( pEntry )
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
return;
}
@@ -2951,7 +2951,7 @@ void SvImpLBox::SetAnchorSelection(SvLBoxEntry* pOldCursor,SvLBoxEntry* pNewCurs
pEntry = pOldCursor;
while( pEntry && pEntry != pNewCursor )
{
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
pEntry = (SvLBoxEntry*)(pView->NextVisible( pEntry ));
}
return;
@@ -2959,8 +2959,8 @@ void SvImpLBox::SetAnchorSelection(SvLBoxEntry* pOldCursor,SvLBoxEntry* pNewCurs
}
}
-void SvImpLBox::SelAllDestrAnch( BOOL bSelect, BOOL bDestroyAnchor,
- BOOL bSingleSelToo )
+void SvImpLBox::SelAllDestrAnch( sal_Bool bSelect, sal_Bool bDestroyAnchor,
+ sal_Bool bSingleSelToo )
{
SvLBoxEntry* pEntry;
nFlags &= (~F_DESEL_ALL);
@@ -2968,7 +2968,7 @@ void SvImpLBox::SelAllDestrAnch( BOOL bSelect, BOOL bDestroyAnchor,
{
if( pCursor && !pView->IsSelected( pCursor ))
{
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
}
return;
}
@@ -2986,7 +2986,7 @@ void SvImpLBox::SelAllDestrAnch( BOOL bSelect, BOOL bDestroyAnchor,
if( !bSelect && pView->GetSelectionCount()==1 && pCursor &&
pView->IsSelected( pCursor ))
{
- pView->Select( pCursor, FALSE );
+ pView->Select( pCursor, sal_False );
if( bDestroyAnchor )
DestroyAnchor(); // Anker loeschen & SelectionEngine zuruecksetzen
else
@@ -2997,8 +2997,8 @@ void SvImpLBox::SelAllDestrAnch( BOOL bSelect, BOOL bDestroyAnchor,
if( bSimpleTravel && !pCursor && !GetUpdateMode() )
nFlags |= F_DESEL_ALL;
- ShowCursor( FALSE );
- BOOL bUpdate = GetUpdateMode();
+ ShowCursor( sal_False );
+ sal_Bool bUpdate = GetUpdateMode();
nFlags |= F_IGNORE_SELECT; // EntryInserted soll nix tun
pEntry = pTree->First();
@@ -3021,18 +3021,18 @@ void SvImpLBox::SelAllDestrAnch( BOOL bSelect, BOOL bDestroyAnchor,
DestroyAnchor(); // Anker loeschen & SelectionEngine zuruecksetzen
else
pAnchor = 0; // internen Anker immer loeschen
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
void SvImpLBox::SetSelectionMode( SelectionMode eSelMode )
{
aSelEng.SetSelectionMode( eSelMode);
if( eSelMode == SINGLE_SELECTION )
- bSimpleTravel = TRUE;
+ bSimpleTravel = sal_True;
else
- bSimpleTravel = FALSE;
+ bSimpleTravel = sal_False;
if( (m_nStyle & WB_SIMPLEMODE) && (eSelMode == MULTIPLE_SELECTION) )
- aSelEng.AddAlways( TRUE );
+ aSelEng.AddAlways( sal_True );
}
// ***********************************************************************
@@ -3043,13 +3043,13 @@ void SvImpLBox::SetDragDropMode( DragDropMode eDDMode )
{
if( eDDMode && eDDMode != SV_DRAGDROP_APP_DROP )
{
- aSelEng.ExpandSelectionOnMouseMove( FALSE );
- aSelEng.EnableDrag( TRUE );
+ aSelEng.ExpandSelectionOnMouseMove( sal_False );
+ aSelEng.EnableDrag( sal_True );
}
else
{
- aSelEng.ExpandSelectionOnMouseMove( TRUE );
- aSelEng.EnableDrag( FALSE );
+ aSelEng.ExpandSelectionOnMouseMove( sal_True );
+ aSelEng.EnableDrag( sal_False );
}
}
@@ -3098,7 +3098,7 @@ void SvImpLBox::PaintDDCursor( SvLBoxEntry* pInsertionPos )
--------------------------------------------------*/
void lcl_DeleteSubPopups(PopupMenu* pPopup)
{
- for(USHORT i = 0; i < pPopup->GetItemCount(); i++)
+ for(sal_uInt16 i = 0; i < pPopup->GetItemCount(); i++)
{
PopupMenu* pSubPopup = pPopup->GetPopupMenu( pPopup->GetItemId( i ));
if(pSubPopup)
@@ -3111,7 +3111,7 @@ void lcl_DeleteSubPopups(PopupMenu* pPopup)
void SvImpLBox::Command( const CommandEvent& rCEvt )
{
- USHORT nCommand = rCEvt.GetCommand();
+ sal_uInt16 nCommand = rCEvt.GetCommand();
if( nCommand == COMMAND_CONTEXTMENU )
aEditTimer.Stop();
@@ -3124,7 +3124,7 @@ void SvImpLBox::Command( const CommandEvent& rCEvt )
if( bContextMenuHandling && nCommand == COMMAND_CONTEXTMENU )
{
Point aPopupPos;
- BOOL bClickedIsFreePlace = FALSE;
+ sal_Bool bClickedIsFreePlace = sal_False;
std::stack<SvLBoxEntry*> aSelRestore;
if( rCEvt.IsMouseEvent() )
@@ -3135,7 +3135,7 @@ void SvImpLBox::Command( const CommandEvent& rCEvt )
SvLBoxEntry* pClickedEntry = GetEntry( aPopupPos );
if( pClickedEntry )
{ // mouse in non empty area
- BOOL bClickedIsSelected = FALSE;
+ sal_Bool bClickedIsSelected = sal_False;
// collect the currently selected entries
SvLBoxEntry* pSelected = pView->FirstSelected();
@@ -3148,32 +3148,32 @@ void SvImpLBox::Command( const CommandEvent& rCEvt )
// if the entry which the user clicked at is not selected
if( !bClickedIsSelected )
{ // deselect all other and select the clicked one
- pView->SelectAll( FALSE );
+ pView->SelectAll( sal_False );
pView->SetCursor( pClickedEntry );
}
}
else if( aSelEng.GetSelectionMode() == SINGLE_SELECTION )
{//modified by BerryJia for fixing Bug102739 2002-9-9 17:00(Beijing Time)
- bClickedIsFreePlace = TRUE;
- INT32 nSelectedEntries = pView->GetSelectionCount();
+ bClickedIsFreePlace = sal_True;
+ sal_Int32 nSelectedEntries = pView->GetSelectionCount();
SvLBoxEntry* pSelected = pView->FirstSelected();
- for(USHORT nSel = 0; nSel < nSelectedEntries; nSel++ )
+ for(sal_uInt16 nSel = 0; nSel < nSelectedEntries; nSel++ )
{
aSelRestore.push(pSelected);
pSelected = pView->NextSelected( pSelected );
}
- pView->SelectAll( FALSE );
+ pView->SelectAll( sal_False );
}
else
{ // deselect all
- pView->SelectAll( FALSE );
+ pView->SelectAll( sal_False );
}
}
else
{ // key event (or at least no mouse event)
- INT32 nSelectionCount = pView->GetSelectionCount();
+ sal_Int32 nSelectionCount = pView->GetSelectionCount();
if( nSelectionCount )
{ // now allways take first visible as base for positioning the menu
@@ -3204,7 +3204,7 @@ void SvImpLBox::Command( const CommandEvent& rCEvt )
if( pPopup )
{
// do action for selected entry in popup menu
- USHORT nMenuAction = pPopup->Execute( pView, aPopupPos );
+ sal_uInt16 nMenuAction = pPopup->Execute( pView, aPopupPos );
if ( nMenuAction )
pView->ExcecuteContextMenuAction( nMenuAction );
lcl_DeleteSubPopups(pPopup);
@@ -3218,7 +3218,7 @@ void SvImpLBox::Command( const CommandEvent& rCEvt )
SvLBoxEntry* pEntry = aSelRestore.top();
//#i19717# the entry is maybe already deleted
bool bFound = false;
- for(ULONG nEntry = 0; nEntry < pView->GetEntryCount(); nEntry++)
+ for(sal_uLong nEntry = 0; nEntry < pView->GetEntryCount(); nEntry++)
if(pEntry == pView->GetEntry(nEntry))
{
bFound = true;
@@ -3277,12 +3277,12 @@ void SvImpLBox::SetCurEntry( SvLBoxEntry* pEntry )
if ( ( aSelEng.GetSelectionMode() != SINGLE_SELECTION )
&& ( aSelEng.GetSelectionMode() != NO_SELECTION )
)
- SelAllDestrAnch( FALSE, TRUE, FALSE );
+ SelAllDestrAnch( sal_False, sal_True, sal_False );
if ( pEntry )
MakeVisible( pEntry );
SetCursor( pEntry );
if ( pEntry && ( aSelEng.GetSelectionMode() != NO_SELECTION ) )
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
}
IMPL_LINK( SvImpLBox, EditTimerCall, Timer *, EMPTYARG )
@@ -3304,21 +3304,21 @@ IMPL_LINK( SvImpLBox, EditTimerCall, Timer *, EMPTYARG )
SvLBoxEntry* pEntry = GetCurEntry();
if( pEntry )
{
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
pView->ImplEditEntry( pEntry );
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
}
return 0;
}
-BOOL SvImpLBox::RequestHelp( const HelpEvent& rHEvt )
+sal_Bool SvImpLBox::RequestHelp( const HelpEvent& rHEvt )
{
if( rHEvt.GetMode() & HELPMODE_QUICK )
{
Point aPos( pView->ScreenToOutputPixel( rHEvt.GetMousePosPixel() ));
if( !GetVisibleArea().IsInside( aPos ))
- return FALSE;
+ return sal_False;
SvLBoxEntry* pEntry = GetEntry( aPos );
if( pEntry )
@@ -3327,18 +3327,18 @@ BOOL SvImpLBox::RequestHelp( const HelpEvent& rHEvt )
SvLBoxTab* pTab;
SvLBoxString* pItem = (SvLBoxString*)(pView->GetItem( pEntry, aPos.X(), &pTab ));
if( !pItem || pItem->IsA() != SV_ITEM_ID_LBOXSTRING )
- return FALSE;
+ return sal_False;
aPos = GetEntryPosition( pEntry );
aPos.X() = pView->GetTabPos( pEntry, pTab ); //pTab->GetPos();
Size aSize( pItem->GetSize( pView, pEntry ) );
SvLBoxTab* pNextTab = NextTab( pTab );
- BOOL bItemClipped = FALSE;
+ sal_Bool bItemClipped = sal_False;
// wurde das Item von seinem rechten Nachbarn abgeschnitten?
if( pNextTab && pView->GetTabPos(pEntry,pNextTab) < aPos.X()+aSize.Width() )
{
aSize.Width() = pNextTab->GetPos() - pTab->GetPos();
- bItemClipped = TRUE;
+ bItemClipped = sal_True;
}
Rectangle aItemRect( aPos, aSize );
@@ -3359,19 +3359,19 @@ BOOL SvImpLBox::RequestHelp( const HelpEvent& rHEvt )
Help::ShowQuickHelp( pView, aItemRect,
pItem->GetText(), QUICKHELP_LEFT | QUICKHELP_VCENTER );
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return sal_False;
}
SvLBoxTab* SvImpLBox::NextTab( SvLBoxTab* pTab )
{
- USHORT nTabCount = pView->TabCount();
+ sal_uInt16 nTabCount = pView->TabCount();
if( nTabCount <= 1 )
return 0;
- for( USHORT nTab=0; nTab < (nTabCount-1); nTab++)
+ for( sal_uInt16 nTab=0; nTab < (nTabCount-1); nTab++)
{
if( pView->aTabs[nTab]==pTab )
return (SvLBoxTab*)(pView->aTabs[nTab+1]);
@@ -3389,28 +3389,28 @@ void SvImpLBox::RepaintScrollBars()
{
}
-void SvImpLBox::SetUpdateMode( BOOL bMode )
+void SvImpLBox::SetUpdateMode( sal_Bool bMode )
{
if( bUpdateMode != bMode )
{
bUpdateMode = bMode;
if( bUpdateMode )
- UpdateAll( FALSE );
+ UpdateAll( sal_False );
}
}
-void SvImpLBox::SetUpdateModeFast( BOOL bMode )
+void SvImpLBox::SetUpdateModeFast( sal_Bool bMode )
{
if( bUpdateMode != bMode )
{
bUpdateMode = bMode;
if( bUpdateMode )
- UpdateAll( FALSE, FALSE );
+ UpdateAll( sal_False, sal_False );
}
}
-BOOL SvImpLBox::SetMostRight( SvLBoxEntry* pEntry )
+sal_Bool SvImpLBox::SetMostRight( SvLBoxEntry* pEntry )
{
if( pView->nTreeFlags & TREEFLAG_RECALCTABS )
{
@@ -3419,8 +3419,8 @@ BOOL SvImpLBox::SetMostRight( SvLBoxEntry* pEntry )
nFlags &= ~F_IGNORE_CHANGED_TABS;
}
- USHORT nLastTab = pView->aTabs.Count() - 1;
- USHORT nLastItem = pEntry->ItemCount() - 1;
+ sal_uInt16 nLastTab = pView->aTabs.Count() - 1;
+ sal_uInt16 nLastItem = pEntry->ItemCount() - 1;
if( nLastTab != USHRT_MAX && nLastItem != USHRT_MAX )
{
if( nLastItem < nLastTab )
@@ -3446,10 +3446,10 @@ BOOL SvImpLBox::SetMostRight( SvLBoxEntry* pEntry )
{
nMostRight = nRight;
pMostRightEntry = pEntry;
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
void SvImpLBox::FindMostRight( SvLBoxEntry* pEntryToIgnore )
@@ -3483,8 +3483,8 @@ void SvImpLBox::FindMostRight_Impl( SvLBoxEntry* pParent, SvLBoxEntry* pEntryToI
if( !pList )
return;
- ULONG nCount = pList->Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ sal_uLong nCount = pList->Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvLBoxEntry* pChild = (SvLBoxEntry*)pList->GetObject( nCur );
if( pChild != pEntryToIgnore )
@@ -3591,7 +3591,7 @@ const Image& SvImpLBox::GetDefaultCollapsedNodeImage( BmpColorMode _eMode )
}
// -----------------------------------------------------------------------
-void SvImpLBox::CallEventListeners( ULONG nEvent, void* pData )
+void SvImpLBox::CallEventListeners( sal_uLong nEvent, void* pData )
{
if ( pView )
pView->CallImplEventListeners( nEvent, pData);
@@ -3599,14 +3599,14 @@ void SvImpLBox::CallEventListeners( ULONG nEvent, void* pData )
// -----------------------------------------------------------------------
-bool SvImpLBox::SetCurrentTabPos( USHORT _nNewPos )
+bool SvImpLBox::SetCurrentTabPos( sal_uInt16 _nNewPos )
{
bool bRet = false;
if ( pView && _nNewPos < ( pView->TabCount() - 2 ) )
{
nCurTabPos = _nNewPos;
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
bRet = true;
}
diff --git a/svtools/source/contnr/svimpicn.cxx b/svtools/source/contnr/svimpicn.cxx
index 0d335429d564..420c0fcd2162 100644
--- a/svtools/source/contnr/svimpicn.cxx
+++ b/svtools/source/contnr/svimpicn.cxx
@@ -100,30 +100,30 @@
#undef TEXT_DRAW_WORDBREAK
#endif
-// #define TEXT_DRAW_DISABLE ((USHORT)0x0001)
-// #define TEXT_DRAW_3DLOOK ((USHORT)0x0002)
-// #define TEXT_DRAW_MNEMONIC ((USHORT)0x0004)
-#define TEXT_DRAW_LEFT ((USHORT)0x0010)
-#define TEXT_DRAW_CENTER ((USHORT)0x0020)
-#define TEXT_DRAW_RIGHT ((USHORT)0x0040)
-#define TEXT_DRAW_TOP ((USHORT)0x0080)
-#define TEXT_DRAW_VCENTER ((USHORT)0x0100)
-#define TEXT_DRAW_BOTTOM ((USHORT)0x0200)
-#define TEXT_DRAW_ENDELLIPSIS ((USHORT)0x0400)
-#define TEXT_DRAW_PATHELLIPSIS ((USHORT)0x0800)
-#define TEXT_DRAW_CLIP ((USHORT)0x1000)
-#define TEXT_DRAW_MULTILINE ((USHORT)0x2000)
-#define TEXT_DRAW_WORDBREAK ((USHORT)0x4000)
+// #define TEXT_DRAW_DISABLE ((sal_uInt16)0x0001)
+// #define TEXT_DRAW_3DLOOK ((sal_uInt16)0x0002)
+// #define TEXT_DRAW_MNEMONIC ((sal_uInt16)0x0004)
+#define TEXT_DRAW_LEFT ((sal_uInt16)0x0010)
+#define TEXT_DRAW_CENTER ((sal_uInt16)0x0020)
+#define TEXT_DRAW_RIGHT ((sal_uInt16)0x0040)
+#define TEXT_DRAW_TOP ((sal_uInt16)0x0080)
+#define TEXT_DRAW_VCENTER ((sal_uInt16)0x0100)
+#define TEXT_DRAW_BOTTOM ((sal_uInt16)0x0200)
+#define TEXT_DRAW_ENDELLIPSIS ((sal_uInt16)0x0400)
+#define TEXT_DRAW_PATHELLIPSIS ((sal_uInt16)0x0800)
+#define TEXT_DRAW_CLIP ((sal_uInt16)0x1000)
+#define TEXT_DRAW_MULTILINE ((sal_uInt16)0x2000)
+#define TEXT_DRAW_WORDBREAK ((sal_uInt16)0x4000)
XubString GetEllipsisString( OutputDevice* pDev,
const XubString& rStr, long nMaxWidth,
- USHORT nStyle = TEXT_DRAW_ENDELLIPSIS )
+ sal_uInt16 nStyle = TEXT_DRAW_ENDELLIPSIS )
{
XubString aStr = rStr;
if ( nStyle & TEXT_DRAW_ENDELLIPSIS )
{
- USHORT nIndex = pDev->GetTextBreak( rStr, nMaxWidth );
+ sal_uInt16 nIndex = pDev->GetTextBreak( rStr, nMaxWidth );
if ( nIndex != STRING_LEN )
{
aStr.Erase( nIndex );
@@ -151,11 +151,11 @@ class TextLineInfo
{
private:
long mnWidth;
- USHORT mnIndex;
- USHORT mnLen;
+ sal_uInt16 mnIndex;
+ sal_uInt16 mnLen;
public:
- TextLineInfo( long nWidth, USHORT nIndex, USHORT nLen )
+ TextLineInfo( long nWidth, sal_uInt16 nIndex, sal_uInt16 nLen )
{
mnWidth = nWidth;
mnIndex = nIndex;
@@ -163,8 +163,8 @@ public:
}
long GetWidth() const { return mnWidth; }
- USHORT GetIndex() const { return mnIndex; }
- USHORT GetLen() const { return mnLen; }
+ sal_uInt16 GetIndex() const { return mnIndex; }
+ sal_uInt16 GetLen() const { return mnLen; }
};
#define MULTITEXTLINEINFO_RESIZE 16
@@ -174,8 +174,8 @@ class MultiTextLineInfo
{
private:
PTextLineInfo* mpLines;
- USHORT mnLines;
- USHORT mnSize;
+ sal_uInt16 mnLines;
+ sal_uInt16 mnSize;
public:
MultiTextLineInfo();
@@ -184,9 +184,9 @@ public:
void AddLine( TextLineInfo* pLine );
void Clear();
- TextLineInfo* GetLine( USHORT nLine ) const
+ TextLineInfo* GetLine( sal_uInt16 nLine ) const
{ return mpLines[nLine]; }
- USHORT Count() const { return mnLines; }
+ sal_uInt16 Count() const { return mnLines; }
private:
MultiTextLineInfo( const MultiTextLineInfo& );
@@ -202,7 +202,7 @@ MultiTextLineInfo::MultiTextLineInfo()
MultiTextLineInfo::~MultiTextLineInfo()
{
- for ( USHORT i = 0; i < mnLines; i++ )
+ for ( sal_uInt16 i = 0; i < mnLines; i++ )
delete mpLines[i];
delete [] mpLines;
}
@@ -223,7 +223,7 @@ void MultiTextLineInfo::AddLine( TextLineInfo* pLine )
void MultiTextLineInfo::Clear()
{
- for ( USHORT i = 0; i < mnLines; i++ )
+ for ( sal_uInt16 i = 0; i < mnLines; i++ )
delete mpLines[i];
mnLines = 0;
}
@@ -232,7 +232,7 @@ void MultiTextLineInfo::Clear()
long GetTextLines( OutputDevice* pDev, MultiTextLineInfo& rLineInfo,
long nWidth, const XubString& rStr,
- USHORT nStyle = TEXT_DRAW_WORDBREAK )
+ sal_uInt16 nStyle = TEXT_DRAW_WORDBREAK )
{
rLineInfo.Clear();
if ( !rStr.Len() )
@@ -240,20 +240,20 @@ long GetTextLines( OutputDevice* pDev, MultiTextLineInfo& rLineInfo,
if ( nWidth <= 0 )
nWidth = 1;
- USHORT nStartPos = 0; // Start-Position der Zeile
- USHORT nLastLineLen = 0; // Zeilenlaenge bis zum vorherigen Wort
- USHORT nLastWordPos = 0; // Position des letzten Wortanfangs
- USHORT i = 0;
- USHORT nPos; // StartPositon der Zeile (nur Temp)
- USHORT nLen; // Laenge der Zeile (nur Temp)
- USHORT nStrLen = rStr.Len();
+ sal_uInt16 nStartPos = 0; // Start-Position der Zeile
+ sal_uInt16 nLastLineLen = 0; // Zeilenlaenge bis zum vorherigen Wort
+ sal_uInt16 nLastWordPos = 0; // Position des letzten Wortanfangs
+ sal_uInt16 i = 0;
+ sal_uInt16 nPos; // StartPositon der Zeile (nur Temp)
+ sal_uInt16 nLen; // Laenge der Zeile (nur Temp)
+ sal_uInt16 nStrLen = rStr.Len();
long nMaxLineWidth = 0; // Maximale Zeilenlaenge
long nLineWidth; // Aktuelle Zeilenlaenge
long nLastLineWidth = 0; // Zeilenlaenge der letzten Zeile
xub_Unicode c;
xub_Unicode c2;
const xub_Unicode* pStr = rStr.GetBuffer();
- BOOL bHardBreak = FALSE;
+ sal_Bool bHardBreak = sal_False;
do
{
@@ -261,9 +261,9 @@ long GetTextLines( OutputDevice* pDev, MultiTextLineInfo& rLineInfo,
// Auf Zeilenende ermitteln
if ( (c == _CR) || (c == _LF) )
- bHardBreak = TRUE;
+ bHardBreak = sal_True;
else
- bHardBreak = FALSE;
+ bHardBreak = sal_False;
// Testen, ob ein Wortende erreicht ist
if ( bHardBreak || (i == nStrLen) ||
@@ -378,9 +378,9 @@ long GetTextLines( OutputDevice* pDev, MultiTextLineInfo& rLineInfo,
// -----------------------------------------------------------------------
-USHORT GetTextLines( OutputDevice* pDev, const Rectangle& rRect,
+sal_uInt16 GetTextLines( OutputDevice* pDev, const Rectangle& rRect,
const XubString& rStr,
- USHORT nStyle = TEXT_DRAW_WORDBREAK,
+ sal_uInt16 nStyle = TEXT_DRAW_WORDBREAK,
long* pMaxWidth = NULL )
{
MultiTextLineInfo aMultiLineInfo;
@@ -395,10 +395,10 @@ USHORT GetTextLines( OutputDevice* pDev, const Rectangle& rRect,
Rectangle GetTextRect( OutputDevice* pDev, const Rectangle& rRect,
const XubString& rStr,
- USHORT nStyle = TEXT_DRAW_WORDBREAK )
+ sal_uInt16 nStyle = TEXT_DRAW_WORDBREAK )
{
Rectangle aRect = rRect;
- USHORT nLines;
+ sal_uInt16 nLines;
long nWidth = rRect.GetWidth();
long nMaxWidth;
long nTextHeight;
@@ -407,13 +407,13 @@ Rectangle GetTextRect( OutputDevice* pDev, const Rectangle& rRect,
{
MultiTextLineInfo aMultiLineInfo;
TextLineInfo* pLineInfo;
- USHORT nFormatLines;
+ sal_uInt16 nFormatLines;
nMaxWidth = 0;
GetTextLines( pDev, aMultiLineInfo, nWidth, rStr, nStyle );
nFormatLines = aMultiLineInfo.Count();
nTextHeight = pDev->GetTextHeight();
- nLines = (USHORT)(aRect.GetHeight()/nTextHeight);
+ nLines = (sal_uInt16)(aRect.GetHeight()/nTextHeight);
if ( nFormatLines <= nLines )
nLines = nFormatLines;
else
@@ -423,7 +423,7 @@ Rectangle GetTextRect( OutputDevice* pDev, const Rectangle& rRect,
else
nMaxWidth = nWidth;
}
- for ( USHORT i = 0; i < nLines; i++ )
+ for ( sal_uInt16 i = 0; i < nLines; i++ )
{
pLineInfo = aMultiLineInfo.GetLine( i );
if ( pLineInfo->GetWidth() > nMaxWidth )
@@ -465,7 +465,7 @@ Rectangle GetTextRect( OutputDevice* pDev, const Rectangle& rRect,
// -----------------------------------------------------------------------
void DrawText( OutputDevice* pDev, const Rectangle& rRect,
- const XubString& rStr, USHORT nStyle = 0 )
+ const XubString& rStr, sal_uInt16 nStyle = 0 )
{
if ( !rStr.Len() || rRect.IsEmpty() )
return;
@@ -487,10 +487,10 @@ void DrawText( OutputDevice* pDev, const Rectangle& rRect,
TextLineInfo* pLineInfo;
long nTextHeight = pDev->GetTextHeight();
long nMaxTextWidth;
- USHORT i;
- USHORT nLines = (USHORT)(nHeight/nTextHeight);
- USHORT nFormatLines;
- BOOL bIsClipRegion = FALSE;
+ sal_uInt16 i;
+ sal_uInt16 nLines = (sal_uInt16)(nHeight/nTextHeight);
+ sal_uInt16 nFormatLines;
+ sal_Bool bIsClipRegion = sal_False;
nMaxTextWidth = GetTextLines( pDev, aMultiLineInfo, nWidth, rStr, nStyle );
nFormatLines = aMultiLineInfo.Count();
@@ -611,7 +611,7 @@ void DrawText( OutputDevice* pDev, const Rectangle& rRect,
if ( nStyle & TEXT_DRAW_CLIP )
{
- BOOL bIsClipRegion = pDev->IsClipRegion();
+ sal_Bool bIsClipRegion = pDev->IsClipRegion();
if ( bIsClipRegion )
{
Region aOldRegion = pDev->GetClipRegion();
@@ -649,7 +649,7 @@ class ImpIcnCursor
SvImpIconView* pView;
SvPtrarr* pColumns;
SvPtrarr* pRows;
- BOOL* pGridMap;
+ sal_Bool* pGridMap;
long nGridDX, nGridDY;
long nGridCols, nGridRows;
long nCols;
@@ -661,39 +661,39 @@ class ImpIcnCursor
void ImplCreate();
void Create() { if( !pColumns ) ImplCreate(); }
- USHORT GetSortListPos( SvPtrarr* pList, long nValue, int bVertical);
- SvLBoxEntry* SearchCol(USHORT nCol,USHORT nTop,USHORT nBottom,USHORT nPref,
- BOOL bDown, BOOL bSimple );
- SvLBoxEntry* SearchRow(USHORT nRow,USHORT nRight,USHORT nLeft,USHORT nPref,
- BOOL bRight, BOOL bSimple );
+ sal_uInt16 GetSortListPos( SvPtrarr* pList, long nValue, int bVertical);
+ SvLBoxEntry* SearchCol(sal_uInt16 nCol,sal_uInt16 nTop,sal_uInt16 nBottom,sal_uInt16 nPref,
+ sal_Bool bDown, sal_Bool bSimple );
+ SvLBoxEntry* SearchRow(sal_uInt16 nRow,sal_uInt16 nRight,sal_uInt16 nLeft,sal_uInt16 nPref,
+ sal_Bool bRight, sal_Bool bSimple );
void ExpandGrid();
void CreateGridMap();
- // Rueckgabe FALSE: Eintrag liegt nicht in der GridMap. rGridx,y werden
+ // Rueckgabe sal_False: Eintrag liegt nicht in der GridMap. rGridx,y werden
// dann an nGridCols, nGridRows geclippt
- BOOL GetGrid( const Point& rDocPos, USHORT& rGridX, USHORT& rGridY ) const;
- void SetGridUsed( USHORT nDX, USHORT nDY, BOOL bUsed )
+ sal_Bool GetGrid( const Point& rDocPos, sal_uInt16& rGridX, sal_uInt16& rGridY ) const;
+ void SetGridUsed( sal_uInt16 nDX, sal_uInt16 nDY, sal_Bool bUsed )
{
pGridMap[ (nDY * nGridCols) + nDX ] = bUsed;
}
- BOOL IsGridUsed( USHORT nDX, USHORT nDY )
+ sal_Bool IsGridUsed( sal_uInt16 nDX, sal_uInt16 nDY )
{
return pGridMap[ (nDY * nGridCols) + nDX ];
}
public:
ImpIcnCursor( SvImpIconView* pOwner );
~ImpIcnCursor();
- void Clear( BOOL bGridToo = TRUE );
+ void Clear( sal_Bool bGridToo = sal_True );
// fuer Cursortravelling usw.
- SvLBoxEntry* GoLeftRight( SvLBoxEntry*, BOOL bRight );
- SvLBoxEntry* GoUpDown( SvLBoxEntry*, BOOL bDown );
+ SvLBoxEntry* GoLeftRight( SvLBoxEntry*, sal_Bool bRight );
+ SvLBoxEntry* GoUpDown( SvLBoxEntry*, sal_Bool bDown );
- // Rueckgaebe: FALSE == Das leere Rect steht hinter dem letzten
+ // Rueckgaebe: sal_False == Das leere Rect steht hinter dem letzten
// Eintrag; d.h. beim naechsten Einfuegen ergibt sich das naechste
// leere Rechteck durch Addition. Hinweis: Das Rechteck kann dann
// ausserhalb des View-Space liegen
- BOOL FindEmptyGridRect( Rectangle& rRect );
+ sal_Bool FindEmptyGridRect( Rectangle& rRect );
// Erzeugt fuer jede Zeile (Hoehe=nGridDY) eine nach BoundRect.Left()
// sortierte Liste der Eintraege, die in ihr stehen. Eine Liste kann
@@ -701,7 +701,7 @@ public:
// muessen mit DestroyGridAdjustData geloescht werden
void CreateGridAjustData( SvPtrarr& pLists, SvLBoxEntry* pRow=0);
static void DestroyGridAdjustData( SvPtrarr& rLists );
- void SetGridUsed( const Rectangle&, BOOL bUsed = TRUE );
+ void SetGridUsed( const Rectangle&, sal_Bool bUsed = sal_True );
};
@@ -740,7 +740,7 @@ SvImpIconView::SvImpIconView( SvIconView* pCurView, SvLBoxTreeList* pTree,
aEditTimer.SetTimeout( 800 );
aEditTimer.SetTimeoutHdl(LINK(this,SvImpIconView,EditTimeoutHdl));
- Clear( TRUE );
+ Clear( sal_True );
}
SvImpIconView::~SvImpIconView()
@@ -755,14 +755,14 @@ SvImpIconView::~SvImpIconView()
ClearSelectedRectList();
}
-void SvImpIconView::Clear( BOOL bInCtor )
+void SvImpIconView::Clear( sal_Bool bInCtor )
{
StopEditTimer();
CancelUserEvent();
nMaxBmpWidth = 0;
nMaxBmpHeight = 0;
nMaxTextWidth = 0;
- bMustRecalcBoundingRects = FALSE;
+ bMustRecalcBoundingRects = sal_False;
nMaxBoundHeight = 0;
//XXX
@@ -797,17 +797,17 @@ void SvImpIconView::SetStyle( const WinBits i_nWinStyle )
IMPL_LINK( SvImpIconView, ScrollUpDownHdl, ScrollBar *, pScrollBar )
{
- pView->EndEditing( TRUE );
+ pView->EndEditing( sal_True );
// Pfeil hoch: delta=-1; Pfeil runter: delta=+1
- Scroll( 0, pScrollBar->GetDelta(), TRUE );
+ Scroll( 0, pScrollBar->GetDelta(), sal_True );
return 0;
}
IMPL_LINK( SvImpIconView, ScrollLeftRightHdl, ScrollBar *, pScrollBar )
{
- pView->EndEditing( TRUE );
+ pView->EndEditing( sal_True );
// Pfeil links: delta=-1; Pfeil rechts: delta=+1
- Scroll( pScrollBar->GetDelta(), 0, TRUE );
+ Scroll( pScrollBar->GetDelta(), 0, sal_True );
return 0;
}
@@ -847,7 +847,7 @@ void SvImpIconView::CheckSizes( SvLBoxEntry* pEntry,
{
nMaxTextWidth = aSize.Width();
if( !(nFlags & F_GRIDMODE ) )
- bMustRecalcBoundingRects = TRUE;
+ bMustRecalcBoundingRects = sal_True;
}
}
SvLBoxContextBmp* pBmpItem = (SvLBoxContextBmp*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXCONTEXTBMP));
@@ -859,14 +859,14 @@ void SvImpIconView::CheckSizes( SvLBoxEntry* pEntry,
nMaxBmpWidth = aSize.Width();
nMaxBmpWidth += (2*LROFFS_ICON);
if( !(nFlags & F_GRIDMODE ) )
- bMustRecalcBoundingRects = TRUE;
+ bMustRecalcBoundingRects = sal_True;
}
if( aSize.Height() > nMaxBmpHeight )
{
nMaxBmpHeight = aSize.Height();
nMaxBmpHeight += (2*TBOFFS_ICON);;
if( !(nFlags & F_GRIDMODE ) )
- bMustRecalcBoundingRects = TRUE;
+ bMustRecalcBoundingRects = sal_True;
}
}
}
@@ -879,9 +879,9 @@ void SvImpIconView::EntryInserted( SvLBoxEntry* pEntry )
DBG_ASSERT(pZOrderList->GetPos(pEntry)==0xffff,"EntryInserted:ZOrder?");
pZOrderList->Insert( pEntry, pZOrderList->Count() );
if( nFlags & F_GRIDMODE )
- pImpCursor->Clear( FALSE );
+ pImpCursor->Clear( sal_False );
else
- pImpCursor->Clear( TRUE );
+ pImpCursor->Clear( sal_True );
SvIcnVwDataEntry* pViewData = ICNVIEWDATA(pEntry);
CheckSizes( pEntry, pViewData );
if( pView->IsUpdateMode() )
@@ -911,11 +911,11 @@ void SvImpIconView::RemovingEntry( SvLBoxEntry* pEntry )
if( pEntry == pCursor )
{
SvLBoxEntry* pNewCursor = GetNewCursor();
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
pCursor = 0; // damit er nicht deselektiert wird
SetCursor( pNewCursor );
}
- USHORT nPos = pZOrderList->GetPos( (void*)pEntry );
+ sal_uInt16 nPos = pZOrderList->GetPos( (void*)pEntry );
pZOrderList->Remove( nPos, 1 );
pImpCursor->Clear();
}
@@ -958,7 +958,7 @@ void SvImpIconView::MovingEntry( SvLBoxEntry* pEntry )
void SvImpIconView::EntryMoved( SvLBoxEntry* pEntry )
{
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
SvIcnVwDataEntry* pViewData = ICNVIEWDATA(pEntry);
if( pModel->GetParent(pEntry)==pCurParent )
{
@@ -986,9 +986,9 @@ void SvImpIconView::EntryMoved( SvLBoxEntry* pEntry )
SetCursor( pNextCursor );
}
pImpCursor->Clear();
- USHORT nPos = pZOrderList->GetPos( (void*)pEntry );
+ sal_uInt16 nPos = pZOrderList->GetPos( (void*)pEntry );
pZOrderList->Remove( nPos, 1 );
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
// wenn er nochmal in dieser View auftaucht, muss sein
// Bounding-Rect neu berechnet werden
InvalidateBoundingRect( pViewData->aRect );
@@ -1013,7 +1013,7 @@ void SvImpIconView::CollapsingEntry( SvLBoxEntry* )
{
}
-void SvImpIconView::EntrySelected( SvLBoxEntry* pEntry, BOOL bSelect )
+void SvImpIconView::EntrySelected( SvLBoxEntry* pEntry, sal_Bool bSelect )
{
if( pModel->GetParent(pEntry) != pCurParent )
return;
@@ -1033,13 +1033,13 @@ void SvImpIconView::EntrySelected( SvLBoxEntry* pEntry, BOOL bSelect )
if( pView->IsUpdateMode() )
{
if( pEntry == pCursor )
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
if( nFlags & F_RUBBERING )
PaintEntry( pEntry );
else
pView->Invalidate( GetBoundingRect( pEntry ) );
if( pEntry == pCursor )
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
}
@@ -1131,7 +1131,7 @@ void SvImpIconView::ResetVirtSize()
StopEditTimer();
aVirtOutputSize.Width() = 0;
aVirtOutputSize.Height() = 0;
- BOOL bLockedEntryFound = FALSE;
+ sal_Bool bLockedEntryFound = sal_False;
nFlags &= (~F_GRID_INSERT);
SvLBoxEntry* pCur = pModel->FirstChild( pCurParent );
while( pCur )
@@ -1144,7 +1144,7 @@ void SvImpIconView::ResetVirtSize()
FindBoundingRect( pCur, pViewData );
else
AdjustVirtSize( pViewData->aRect );
- bLockedEntryFound = TRUE;
+ bLockedEntryFound = sal_True;
}
else
InvalidateBoundingRect( pViewData->aRect );
@@ -1198,16 +1198,16 @@ void SvImpIconView::Arrange()
void SvImpIconView::ImpArrange()
{
StopEditTimer();
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
ResetVirtSize();
- bMustRecalcBoundingRects = FALSE;
+ bMustRecalcBoundingRects = sal_False;
MapMode aMapMode( pView->GetMapMode());
aMapMode.SetOrigin( Point() );
pView->SetMapMode( aMapMode );
CheckAllSizes();
RecalcAllBoundingRectsSmart();
pView->Invalidate();
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
void SvImpIconView::Paint( const Rectangle& rRect )
@@ -1249,14 +1249,14 @@ void SvImpIconView::Paint( const Rectangle& rRect )
if( !pCursor )
pCursor = pModel->FirstChild( pCurParent );
- USHORT nCount = pZOrderList->Count();
+ sal_uInt16 nCount = pZOrderList->Count();
if( !nCount )
return;
SvPtrarr* pNewZOrderList = new SvPtrarr;
SvPtrarr* pPaintedEntries = new SvPtrarr;
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
while( nCount )
{
SvLBoxEntry* pEntry = (SvLBoxEntry*)(pZOrderList->GetObject(nPos ));
@@ -1279,7 +1279,7 @@ void SvImpIconView::Paint( const Rectangle& rRect )
nCount = pPaintedEntries->Count();
if( nCount )
{
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
pZOrderList->Insert( pPaintedEntries->GetObject( nCur ),pZOrderList->Count());
}
delete pPaintedEntries;
@@ -1289,7 +1289,7 @@ void SvImpIconView::Paint( const Rectangle& rRect )
PaintResizeRect( aRect );
}
-BOOL SvImpIconView::GetResizeRect( Rectangle& rRect )
+sal_Bool SvImpIconView::GetResizeRect( Rectangle& rRect )
{
if( aHorSBar.IsVisible() && aVerSBar.IsVisible() )
{
@@ -1300,9 +1300,9 @@ BOOL SvImpIconView::GetResizeRect( Rectangle& rRect )
aOrigin.Y() += aOutputSize.Height();
rRect.SetPos( aOrigin );
rRect.SetSize( Size( nVerSBarWidth, nHorSBarHeight));
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
void SvImpIconView::PaintResizeRect( const Rectangle& rRect )
@@ -1362,7 +1362,7 @@ void SvImpIconView::MouseButtonDown( const MouseEvent& rMEvt)
{
if( !rMEvt.IsMod1() ) // Ctrl
{
- pView->SelectAll( FALSE );
+ pView->SelectAll( sal_False );
ClearSelectedRectList();
}
else
@@ -1374,8 +1374,8 @@ void SvImpIconView::MouseButtonDown( const MouseEvent& rMEvt)
return;
}
- BOOL bSelected = pView->IsSelected( pEntry );
- BOOL bEditingEnabled = pView->IsInplaceEditingEnabled();
+ sal_Bool bSelected = pView->IsSelected( pEntry );
+ sal_Bool bEditingEnabled = pView->IsInplaceEditingEnabled();
if( rMEvt.GetClicks() == 2 )
{
@@ -1399,7 +1399,7 @@ void SvImpIconView::MouseButtonDown( const MouseEvent& rMEvt)
{
DeselectAllBut( pEntry );
SetCursor( pEntry );
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
if( bEditingEnabled && bSelected && !rMEvt.GetModifier() &&
rMEvt.IsLeft() && IsTextHit( pEntry, aDocPos ) )
{
@@ -1414,7 +1414,7 @@ void SvImpIconView::MouseButtonDown( const MouseEvent& rMEvt)
{
DeselectAllBut( pEntry );
SetCursor( pEntry );
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
}
else
{
@@ -1449,7 +1449,7 @@ void SvImpIconView::MouseButtonUp( const MouseEvent& rMEvt )
nFlags &= ~(F_RUBBERING | F_ADD_MODE);
}
- SvLBoxEntry* pEntry = pView->GetEntry( rMEvt.GetPosPixel(), TRUE );
+ SvLBoxEntry* pEntry = pView->GetEntry( rMEvt.GetPosPixel(), sal_True );
if( pEntry )
{
if( nFlags & F_DOWN_CTRL )
@@ -1462,7 +1462,7 @@ void SvImpIconView::MouseButtonUp( const MouseEvent& rMEvt )
{
DeselectAllBut( pEntry );
SetCursor( pEntry );
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
}
}
@@ -1498,12 +1498,12 @@ void SvImpIconView::MouseMove( const MouseEvent& rMEvt )
long nScrollDX, nScrollDY;
- CalcScrollOffsets(rMEvt.GetPosPixel(),nScrollDX,nScrollDY,FALSE );
- BOOL bSelRectHidden = FALSE;
+ CalcScrollOffsets(rMEvt.GetPosPixel(),nScrollDX,nScrollDY,sal_False );
+ sal_Bool bSelRectHidden = sal_False;
if( nScrollDX || nScrollDY )
{
HideSelectionRect();
- bSelRectHidden = TRUE;
+ bSelRectHidden = sal_True;
pView->Scroll( nScrollDX, nScrollDY );
}
Point aDocPos( rMEvt.GetPosPixel() );
@@ -1512,8 +1512,8 @@ void SvImpIconView::MouseMove( const MouseEvent& rMEvt )
if( aRect != aCurSelectionRect )
{
HideSelectionRect();
- bSelRectHidden = TRUE;
- BOOL bAdd = (nFlags & F_ADD_MODE) ? TRUE : FALSE;
+ bSelRectHidden = sal_True;
+ sal_Bool bAdd = (nFlags & F_ADD_MODE) ? sal_True : sal_False;
SelectRect( aRect, bAdd, &aSelectedRectList );
}
if( bSelRectHidden )
@@ -1521,32 +1521,32 @@ void SvImpIconView::MouseMove( const MouseEvent& rMEvt )
}
}
-BOOL SvImpIconView::KeyInput( const KeyEvent& rKEvt )
+sal_Bool SvImpIconView::KeyInput( const KeyEvent& rKEvt )
{
StopEditTimer();
- BOOL bKeyUsed = TRUE;
- BOOL bMod1 = rKEvt.GetKeyCode().IsMod1();
- BOOL bInAddMode = (BOOL)((nFlags & F_ADD_MODE) != 0);
+ sal_Bool bKeyUsed = sal_True;
+ sal_Bool bMod1 = rKEvt.GetKeyCode().IsMod1();
+ sal_Bool bInAddMode = (sal_Bool)((nFlags & F_ADD_MODE) != 0);
int bDeselAll = (pView->GetSelectionMode() != SINGLE_SELECTION) &&
!bInAddMode;
SvLBoxEntry* pNewCursor;
- USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
switch( nCode )
{
case KEY_UP:
if( pCursor )
{
MakeVisible( pCursor );
- pNewCursor = pImpCursor->GoUpDown(pCursor,FALSE);
+ pNewCursor = pImpCursor->GoUpDown(pCursor,sal_False);
if( pNewCursor )
{
if( bDeselAll )
- pView->SelectAll( FALSE );
- ShowCursor( FALSE );
+ pView->SelectAll( sal_False );
+ ShowCursor( sal_False );
MakeVisible( pNewCursor );
SetCursor( pNewCursor );
if( !bInAddMode )
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
}
else
{
@@ -1564,17 +1564,17 @@ BOOL SvImpIconView::KeyInput( const KeyEvent& rKEvt )
case KEY_DOWN:
if( pCursor )
{
- pNewCursor=pImpCursor->GoUpDown( pCursor,TRUE );
+ pNewCursor=pImpCursor->GoUpDown( pCursor,sal_True );
if( pNewCursor )
{
MakeVisible( pCursor );
if( bDeselAll )
- pView->SelectAll( FALSE );
- ShowCursor( FALSE );
+ pView->SelectAll( sal_False );
+ ShowCursor( sal_False );
MakeVisible( pNewCursor );
SetCursor( pNewCursor );
if( !bInAddMode )
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
}
}
break;
@@ -1582,17 +1582,17 @@ BOOL SvImpIconView::KeyInput( const KeyEvent& rKEvt )
case KEY_RIGHT:
if( pCursor )
{
- pNewCursor=pImpCursor->GoLeftRight(pCursor,TRUE );
+ pNewCursor=pImpCursor->GoLeftRight(pCursor,sal_True );
if( pNewCursor )
{
MakeVisible( pCursor );
if( bDeselAll )
- pView->SelectAll( FALSE );
- ShowCursor( FALSE );
+ pView->SelectAll( sal_False );
+ ShowCursor( sal_False );
MakeVisible( pNewCursor );
SetCursor( pNewCursor );
if( !bInAddMode )
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
}
}
break;
@@ -1601,16 +1601,16 @@ BOOL SvImpIconView::KeyInput( const KeyEvent& rKEvt )
if( pCursor )
{
MakeVisible( pCursor );
- pNewCursor = pImpCursor->GoLeftRight(pCursor,FALSE );
+ pNewCursor = pImpCursor->GoLeftRight(pCursor,sal_False );
if( pNewCursor )
{
if( bDeselAll )
- pView->SelectAll( FALSE );
- ShowCursor( FALSE );
+ pView->SelectAll( sal_False );
+ ShowCursor( sal_False );
MakeVisible( pNewCursor );
SetCursor( pNewCursor );
if( !bInAddMode )
- pView->Select( pCursor, TRUE );
+ pView->Select( pCursor, sal_True );
}
else
{
@@ -1629,7 +1629,7 @@ BOOL SvImpIconView::KeyInput( const KeyEvent& rKEvt )
if( nFlags & F_RUBBERING )
{
HideSelectionRect();
- pView->SelectAll( FALSE );
+ pView->SelectAll( sal_False );
nFlags &= ~F_RUBBERING;
}
break;
@@ -1670,13 +1670,13 @@ BOOL SvImpIconView::KeyInput( const KeyEvent& rKEvt )
case KEY_ADD:
case KEY_DIVIDE :
if( bMod1 )
- pView->SelectAll( TRUE );
+ pView->SelectAll( sal_True );
break;
case KEY_SUBTRACT:
case KEY_COMMA :
if( bMod1 )
- pView->SelectAll( FALSE );
+ pView->SelectAll( sal_False );
break;
case KEY_RETURN:
@@ -1688,7 +1688,7 @@ BOOL SvImpIconView::KeyInput( const KeyEvent& rKEvt )
break;
default:
- bKeyUsed = FALSE;
+ bKeyUsed = sal_False;
}
return bKeyUsed;
@@ -1756,7 +1756,7 @@ void SvImpIconView::AdjustScrollBars()
bool bVerSBar = (pView->GetStyle() & WB_VSCROLL) ? true : false;
bool bHorSBar = (pView->GetStyle() & WB_HSCROLL) ? true : false;
- USHORT nResult = 0;
+ sal_uInt16 nResult = 0;
if( nVirtHeight )
{
// activate ver scrollbar ?
@@ -1896,23 +1896,23 @@ void __EXPORT SvImpIconView::Resize()
#endif
}
-BOOL SvImpIconView::CheckHorScrollBar()
+sal_Bool SvImpIconView::CheckHorScrollBar()
{
if( !pZOrderList || !aHorSBar.IsVisible() )
- return FALSE;
+ return sal_False;
const MapMode& rMapMode = pView->GetMapMode();
Point aOrigin( rMapMode.GetOrigin() );
if(!(pView->GetStyle() & WB_HSCROLL) && !aOrigin.X() )
{
long nWidth = aOutputSize.Width();
- USHORT nCount = pZOrderList->Count();
+ sal_uInt16 nCount = pZOrderList->Count();
long nMostRight = 0;
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
SvLBoxEntry* pEntry = (SvLBoxEntry*)pZOrderList->operator[](nCur);
long nRight = GetBoundingRect(pEntry).Right();
if( nRight > nWidth )
- return FALSE;
+ return sal_False;
if( nRight > nMostRight )
nMostRight = nRight;
}
@@ -1929,28 +1929,28 @@ BOOL SvImpIconView::CheckHorScrollBar()
aSize.Height() += nHorSBarHeight;
aVerSBar.SetSizePixel( aSize );
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL SvImpIconView::CheckVerScrollBar()
+sal_Bool SvImpIconView::CheckVerScrollBar()
{
if( !pZOrderList || !aVerSBar.IsVisible() )
- return FALSE;
+ return sal_False;
const MapMode& rMapMode = pView->GetMapMode();
Point aOrigin( rMapMode.GetOrigin() );
if(!(pView->GetStyle() & WB_VSCROLL) && !aOrigin.Y() )
{
long nDeepest = 0;
long nHeight = aOutputSize.Height();
- USHORT nCount = pZOrderList->Count();
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ sal_uInt16 nCount = pZOrderList->Count();
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
SvLBoxEntry* pEntry = (SvLBoxEntry*)pZOrderList->operator[](nCur);
long nBottom = GetBoundingRect(pEntry).Bottom();
if( nBottom > nHeight )
- return FALSE;
+ return sal_False;
if( nBottom > nDeepest )
nDeepest = nBottom;
}
@@ -1967,9 +1967,9 @@ BOOL SvImpIconView::CheckVerScrollBar()
aSize.Width() += nVerSBarWidth;
aHorSBar.SetSizePixel( aSize );
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -1986,8 +1986,8 @@ void __EXPORT SvImpIconView::GetFocus()
{
if( pCursor )
{
- pView->SetEntryFocus( pCursor, TRUE );
- ShowCursor( TRUE );
+ pView->SetEntryFocus( pCursor, sal_True );
+ ShowCursor( sal_True );
}
}
@@ -1995,8 +1995,8 @@ void __EXPORT SvImpIconView::LoseFocus()
{
StopEditTimer();
if( pCursor )
- pView->SetEntryFocus( pCursor,FALSE );
- ShowCursor( FALSE );
+ pView->SetEntryFocus( pCursor,sal_False );
+ ShowCursor( sal_False );
}
void SvImpIconView::UpdateAll()
@@ -2012,8 +2012,8 @@ void SvImpIconView::PaintEntry( SvLBoxEntry* pEntry, SvIcnVwDataEntry* pViewData
PaintEntry( pEntry, aPos, pViewData );
}
-void SvImpIconView::PaintEmphasis( const Rectangle& rRect, BOOL bSelected,
- BOOL bCursored, OutputDevice* pOut )
+void SvImpIconView::PaintEmphasis( const Rectangle& rRect, sal_Bool bSelected,
+ sal_Bool bCursored, OutputDevice* pOut )
{
// HACK fuer D&D
if( nFlags & F_NO_EMPHASIS )
@@ -2051,7 +2051,7 @@ void SvImpIconView::PaintEmphasis( const Rectangle& rRect, BOOL bSelected,
}
void SvImpIconView::PaintItem( const Rectangle& rRect,
- SvLBoxItem* pItem, SvLBoxEntry* pEntry, USHORT nPaintFlags,
+ SvLBoxItem* pItem, SvLBoxEntry* pEntry, sal_uInt16 nPaintFlags,
OutputDevice* pOut )
{
if( nViewMode == VIEWMODE_ICON && pItem->IsA() == SV_ITEM_ID_LBOXSTRING )
@@ -2089,8 +2089,8 @@ void SvImpIconView::PaintEntry( SvLBoxEntry* pEntry, const Point& rPos,
SvLBoxString* pStringItem = (SvLBoxString*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXSTRING));
- BOOL bSelected = pViewData->IsSelected();
- BOOL bCursored = pViewData->IsCursored();
+ sal_Bool bSelected = pViewData->IsSelected();
+ sal_Bool bCursored = pViewData->IsCursored();
Font aTempFont( pOut->GetFont() );
// waehrend D&D nicht die Fontfarbe wechseln, da sonst auch die
@@ -2102,7 +2102,7 @@ void SvImpIconView::PaintEntry( SvLBoxEntry* pEntry, const Point& rPos,
aNewFont.SetColor( rStyleSettings.GetHighlightTextColor() );
pOut->SetFont( aNewFont );
}
- Rectangle aTextRect( CalcTextRect(pEntry,pStringItem,&rPos,FALSE,pViewData));
+ Rectangle aTextRect( CalcTextRect(pEntry,pStringItem,&rPos,sal_False,pViewData));
Rectangle aBmpRect( CalcBmpRect(pEntry, &rPos, pViewData ) );
switch( nViewMode )
@@ -2112,7 +2112,7 @@ void SvImpIconView::PaintEntry( SvLBoxEntry* pEntry, const Point& rPos,
PaintEmphasis( aBmpRect, bSelected, bCursored, pOut );
PaintItem( aBmpRect, pBmpItem, pEntry,
PAINTFLAG_HOR_CENTERED | PAINTFLAG_VER_CENTERED, pOut );
- PaintEmphasis( aTextRect, bSelected, FALSE, pOut );
+ PaintEmphasis( aTextRect, bSelected, sal_False, pOut );
PaintItem( aTextRect, pStringItem, pEntry, PAINTFLAG_HOR_CENTERED, pOut );
break;
@@ -2120,7 +2120,7 @@ void SvImpIconView::PaintEntry( SvLBoxEntry* pEntry, const Point& rPos,
pBmpItem = (SvLBoxContextBmp*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXCONTEXTBMP));
PaintEmphasis( aBmpRect, bSelected, bCursored, pOut );
PaintItem( aBmpRect, pBmpItem, pEntry, PAINTFLAG_VER_CENTERED, pOut );
- PaintEmphasis( aTextRect, bSelected, FALSE, pOut );
+ PaintEmphasis( aTextRect, bSelected, sal_False, pOut );
PaintItem( aTextRect, pStringItem, pEntry,PAINTFLAG_VER_CENTERED, pOut );
break;
@@ -2133,11 +2133,11 @@ void SvImpIconView::PaintEntry( SvLBoxEntry* pEntry, const Point& rPos,
}
void SvImpIconView::SetEntryPosition( SvLBoxEntry* pEntry, const Point& rPos,
- BOOL bAdjustAtGrid, BOOL bCheckScrollBars )
+ sal_Bool bAdjustAtGrid, sal_Bool bCheckScrollBars )
{
if( pModel->GetParent(pEntry) == pCurParent )
{
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
SvIcnVwDataEntry* pViewData = ICNVIEWDATA(pEntry);
Rectangle aBoundRect( GetBoundingRect( pEntry, pViewData ));
pView->Invalidate( aBoundRect );
@@ -2163,7 +2163,7 @@ void SvImpIconView::SetEntryPosition( SvLBoxEntry* pEntry, const Point& rPos,
CheckScrollBars();
PaintEntry( pEntry, pViewData );
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
}
@@ -2174,7 +2174,7 @@ void SvImpIconView::ViewDataInitialized( SvLBoxEntry*)
void SvImpIconView::ModelHasEntryInvalidated( SvListEntry* pEntry )
{
if( pEntry == pCursor )
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
SvIcnVwDataEntry* pViewData = ICNVIEWDATA(pEntry);
pView->Invalidate( pViewData->aRect );
@@ -2187,7 +2187,7 @@ void SvImpIconView::ModelHasEntryInvalidated( SvListEntry* pEntry )
ViewDataInitialized( (SvLBoxEntry*)pEntry );
pView->Invalidate( pViewData->aRect );
if( pEntry == pCursor )
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
}
@@ -2209,9 +2209,9 @@ void SvImpIconView::SetSelectionMode( SelectionMode )
{
}
-BOOL SvImpIconView::IsEntryInView( SvLBoxEntry* )
+sal_Bool SvImpIconView::IsEntryInView( SvLBoxEntry* )
{
- return FALSE;
+ return sal_False;
}
SvLBoxEntry* SvImpIconView::GetDropTarget( const Point& rPos )
@@ -2229,7 +2229,7 @@ SvLBoxEntry* SvImpIconView::GetEntry( const Point& rDocPos )
CheckBoundingRects();
SvLBoxEntry* pTarget = 0;
// Z-Order-Liste vom Ende her absuchen
- USHORT nCount = pZOrderList->Count();
+ sal_uInt16 nCount = pZOrderList->Count();
while( nCount )
{
nCount--;
@@ -2248,11 +2248,11 @@ SvLBoxEntry* SvImpIconView::GetNextEntry( const Point& rDocPos, SvLBoxEntry* pCu
{
CheckBoundingRects();
SvLBoxEntry* pTarget = 0;
- USHORT nStartPos = pZOrderList->GetPos( (void*)pCurEntry );
+ sal_uInt16 nStartPos = pZOrderList->GetPos( (void*)pCurEntry );
if( nStartPos != USHRT_MAX )
{
- USHORT nCount = pZOrderList->Count();
- for( USHORT nCur = nStartPos+1; nCur < nCount; nCur++ )
+ sal_uInt16 nCount = pZOrderList->Count();
+ for( sal_uInt16 nCur = nStartPos+1; nCur < nCount; nCur++ )
{
SvLBoxEntry* pEntry = (SvLBoxEntry*)(pZOrderList->GetObject(nCur));
SvIcnVwDataEntry* pViewData = ICNVIEWDATA(pEntry);
@@ -2270,7 +2270,7 @@ SvLBoxEntry* SvImpIconView::GetPrevEntry( const Point& rDocPos, SvLBoxEntry* pCu
{
CheckBoundingRects();
SvLBoxEntry* pTarget = 0;
- USHORT nStartPos = pZOrderList->GetPos( (void*)pCurEntry );
+ sal_uInt16 nStartPos = pZOrderList->GetPos( (void*)pCurEntry );
if( nStartPos != USHRT_MAX && nStartPos != 0 )
{
nStartPos--;
@@ -2350,7 +2350,7 @@ Rectangle SvImpIconView::CalcBmpRect( SvLBoxEntry* pEntry, const Point* pPos,
}
Rectangle SvImpIconView::CalcTextRect( SvLBoxEntry* pEntry,
- SvLBoxString* pItem, const Point* pPos, BOOL bForInplaceEdit,
+ SvLBoxString* pItem, const Point* pPos, sal_Bool bForInplaceEdit,
SvIcnVwDataEntry* pViewData )
{
long nBmpHeight, nBmpWidth;
@@ -2503,7 +2503,7 @@ void SvImpIconView::RecalcAllBoundingRects()
pZOrderList->Insert( pEntry, pZOrderList->Count() );
pEntry = pModel->NextSibling( pEntry );
}
- bMustRecalcBoundingRects = FALSE;
+ bMustRecalcBoundingRects = sal_False;
AdjustScrollBars();
}
@@ -2582,26 +2582,26 @@ void SvImpIconView::SetCursor( SvLBoxEntry* pEntry )
if( pEntry == pCursor )
return;
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
if( pCursor )
{
- pView->SetEntryFocus( pCursor, FALSE );
+ pView->SetEntryFocus( pCursor, sal_False );
if( pView->GetSelectionMode() == SINGLE_SELECTION )
- pView->Select( pCursor, FALSE );
+ pView->Select( pCursor, sal_False );
}
pCursor = pEntry;
ToTop( pCursor );
if( pCursor )
{
- pView->SetEntryFocus(pCursor, TRUE );
+ pView->SetEntryFocus(pCursor, sal_True );
if( pView->GetSelectionMode() == SINGLE_SELECTION )
- pView->Select( pCursor, TRUE );
- ShowCursor( TRUE );
+ pView->Select( pCursor, sal_True );
+ ShowCursor( sal_True );
}
}
-void SvImpIconView::ShowCursor( BOOL bShow )
+void SvImpIconView::ShowCursor( sal_Bool bShow )
{
if( !pCursor || !bShow || !pView->HasFocus() )
{
@@ -2640,7 +2640,7 @@ void SvImpIconView::ShowDDIcon( SvLBoxEntry* pRefEntry, const Point& rPosPix )
DELETEZ(pDDDev);
DELETEZ(pDDBufDev);
}
- BOOL bSelected = pView->SvListView::Select( pRefEntry, FALSE );
+ sal_Bool bSelected = pView->SvListView::Select( pRefEntry, sal_False );
if( !pDDDev )
{
if( pDDBufDev )
@@ -2678,7 +2678,7 @@ void SvImpIconView::ShowDDIcon( SvLBoxEntry* pRefEntry, const Point& rPosPix )
PaintEntry( pRefEntry, aPos );
nFlags &= ~F_NO_EMPHASIS;
if( bSelected )
- pView->SvListView::Select( pRefEntry, TRUE );
+ pView->SvListView::Select( pRefEntry, sal_True );
}
void SvImpIconView::HideShowDDIcon( SvLBoxEntry* pRefEntry, const Point& rPosPix )
@@ -2769,12 +2769,12 @@ void SvImpIconView::HideShowDDIcon( SvLBoxEntry* pRefEntry, const Point& rPosPix
pDDDev->GetOutputSizePixel(),
*pDDTempDev );
- BOOL bSelected = pView->SvListView::Select( pRefEntry, FALSE );
+ sal_Bool bSelected = pView->SvListView::Select( pRefEntry, sal_False );
if( bSelected )
- pView->SvListView::Select( pRefEntry, TRUE );
+ pView->SvListView::Select( pRefEntry, sal_True );
}
-void SvImpIconView::ShowTargetEmphasis( SvLBoxEntry* pEntry, BOOL )
+void SvImpIconView::ShowTargetEmphasis( SvLBoxEntry* pEntry, sal_Bool )
{
CheckBoundingRects();
Rectangle aRect;
@@ -2794,8 +2794,8 @@ void SvImpIconView::ShowTargetEmphasis( SvLBoxEntry* pEntry, BOOL )
ImpDrawXORRect( aRect );
}
-BOOL SvImpIconView::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewPar, ULONG& rNewChildPos )
+sal_Bool SvImpIconView::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewPar, sal_uLong& rNewChildPos )
{
if( pTarget == pCurParent && pModel->GetParent(pEntry) == pCurParent )
{
@@ -2805,14 +2805,14 @@ BOOL SvImpIconView::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
Size aSize( pViewData->aRect.GetSize() );
Point aNewPos = FindNextEntryPos( aSize );
AdjustVirtSize( Rectangle( aNewPos, aSize ) );
- SetEntryPosition( pEntry, aNewPos, FALSE, TRUE );
- return FALSE;
+ SetEntryPosition( pEntry, aNewPos, sal_False, sal_True );
+ return sal_False;
}
return pView->SvLBox::NotifyMoving(pTarget,pEntry,rpNewPar,rNewChildPos);
}
-BOOL SvImpIconView::NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos )
+sal_Bool SvImpIconView::NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos )
{
return pView->SvLBox::NotifyCopying(pTarget,pEntry,rpNewParent,rNewChildPos);
}
@@ -2849,9 +2849,9 @@ void SvImpIconView::PrepareCommandEvent( const Point& rPt )
aMouseMoveTimer.Stop();
StopEditTimer();
nFlags |= F_CMD_ARRIVED;
- SvLBoxEntry* pEntry = pView->GetEntry( rPt, TRUE );
+ SvLBoxEntry* pEntry = pView->GetEntry( rPt, sal_True );
if( (nFlags & F_DOWN_CTRL) && pEntry && !pView->IsSelected(pEntry) )
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
nFlags &= ~(F_DOWN_CTRL | F_DOWN_DESELECT);
}
@@ -2860,12 +2860,12 @@ void SvImpIconView::SttDrag( const Point& rPos )
PrepareCommandEvent( rPos );
nFlags |= F_DRAG_SOURCE;
- ShowCursor( FALSE );
+ ShowCursor( sal_False );
}
void SvImpIconView::EndDrag()
{
- ShowCursor( TRUE );
+ ShowCursor( sal_True );
nFlags &= (~F_DRAG_SOURCE);
}
@@ -2874,7 +2874,7 @@ void SvImpIconView::ToTop( SvLBoxEntry* pEntry )
DBG_ASSERT(pZOrderList->GetPos(pEntry)!=0xffff,"ToTop:ZOrder?");
if( pZOrderList->GetObject( pZOrderList->Count() -1 ) != pEntry )
{
- USHORT nPos = pZOrderList->GetPos( (void*)pEntry );
+ sal_uInt16 nPos = pZOrderList->GetPos( (void*)pEntry );
pZOrderList->Remove( nPos, 1 );
pZOrderList->Insert( pEntry, pZOrderList->Count() );
}
@@ -2901,9 +2901,9 @@ void SvImpIconView::ClipAtVirtOutRect( Rectangle& rRect ) const
// rRect: Bereich des Dokumentes (in Dokumentkoordinaten), der
// sichtbar gemacht werden soll.
-// bScrBar == TRUE: Das Rect wurde aufgrund eines ScrollBar-Events berechnet
+// bScrBar == sal_True: Das Rect wurde aufgrund eines ScrollBar-Events berechnet
-void SvImpIconView::MakeVisible( const Rectangle& rRect, BOOL bScrBar )
+void SvImpIconView::MakeVisible( const Rectangle& rRect, sal_Bool bScrBar )
{
Rectangle aRect( rRect );
ClipAtVirtOutRect( aRect );
@@ -2957,7 +2957,7 @@ void SvImpIconView::MakeVisible( const Rectangle& rRect, BOOL bScrBar )
pView->SetMapMode( aMapMode );
// in umgekehrte Richtung scrollen!
- pView->Control::Scroll( -nDx, -nDy, aOutputArea, TRUE );
+ pView->Control::Scroll( -nDx, -nDy, aOutputArea, sal_True );
if( aHorSBar.IsVisible() || aVerSBar.IsVisible() )
{
if( !bScrBar )
@@ -2981,15 +2981,15 @@ SvLBoxEntry* SvImpIconView::GetNewCursor()
SvLBoxEntry* pNewCursor;
if( pCursor )
{
- pNewCursor = pImpCursor->GoLeftRight( pCursor, FALSE );
+ pNewCursor = pImpCursor->GoLeftRight( pCursor, sal_False );
if( !pNewCursor )
{
- pNewCursor = pImpCursor->GoLeftRight( pCursor, TRUE );
+ pNewCursor = pImpCursor->GoLeftRight( pCursor, sal_True );
if( !pNewCursor )
{
- pNewCursor = pImpCursor->GoUpDown( pCursor, FALSE );
+ pNewCursor = pImpCursor->GoUpDown( pCursor, sal_False );
if( !pNewCursor )
- pNewCursor = pImpCursor->GoUpDown( pCursor, TRUE );
+ pNewCursor = pImpCursor->GoUpDown( pCursor, sal_True );
}
}
}
@@ -3000,9 +3000,9 @@ SvLBoxEntry* SvImpIconView::GetNewCursor()
}
-USHORT SvImpIconView:: GetSelectionCount() const
+sal_uInt16 SvImpIconView:: GetSelectionCount() const
{
- USHORT nSelected = 0;
+ sal_uInt16 nSelected = 0;
SvLBoxEntry* pEntry = pModel->FirstChild( pCurParent);
while( pEntry )
{
@@ -3016,11 +3016,11 @@ USHORT SvImpIconView:: GetSelectionCount() const
void SvImpIconView::ToggleSelection( SvLBoxEntry* pEntry )
{
- BOOL bSel;
+ sal_Bool bSel;
if( pView->IsSelected( pEntry ) )
- bSel = FALSE;
+ bSel = sal_False;
else
- bSel = TRUE;
+ bSel = sal_True;
pView->Select( pEntry, bSel );
}
@@ -3031,7 +3031,7 @@ void SvImpIconView::DeselectAllBut( SvLBoxEntry* pThisEntryNot )
while( pEntry )
{
if( pEntry != pThisEntryNot && pView->IsSelected( pEntry ))
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
pEntry = pModel->NextSibling( pEntry );
}
}
@@ -3061,14 +3061,14 @@ ImpIcnCursor::~ImpIcnCursor()
delete pGridMap;
}
-USHORT ImpIcnCursor::GetSortListPos( SvPtrarr* pList, long nValue,
+sal_uInt16 ImpIcnCursor::GetSortListPos( SvPtrarr* pList, long nValue,
int bVertical )
{
- USHORT nCount = (USHORT)pList->Count();
+ sal_uInt16 nCount = (sal_uInt16)pList->Count();
if( !nCount )
return 0;
- USHORT nCurPos = 0;
+ sal_uInt16 nCurPos = 0;
long nPrevValue = LONG_MIN;
while( nCount )
{
@@ -3080,7 +3080,7 @@ USHORT ImpIcnCursor::GetSortListPos( SvPtrarr* pList, long nValue,
else
nCurValue = rRect.Left();
if( nValue >= nPrevValue && nValue <= nCurValue )
- return (USHORT)nCurPos;
+ return (sal_uInt16)nCurPos;
nPrevValue = nCurValue;
nCount--;
nCurPos++;
@@ -3116,10 +3116,10 @@ void ImpIcnCursor::ImplCreate()
if( nX >= nCols )
nX = sal::static_int_cast< short >(nCols - 1);
- USHORT nIns = GetSortListPos( &pColumns[nX], rRect.Top(), TRUE );
+ sal_uInt16 nIns = GetSortListPos( &pColumns[nX], rRect.Top(), sal_True );
pColumns[ nX ].Insert( pEntry, nIns );
- nIns = GetSortListPos( &pRows[nY], rRect.Left(), FALSE );
+ nIns = GetSortListPos( &pRows[nY], rRect.Left(), sal_False );
pRows[ nY ].Insert( pEntry, nIns );
pViewData->nX = nX;
@@ -3163,7 +3163,7 @@ void ImpIcnCursor::CreateGridMap()
//XXX
//nGridRows += 50; // in fuenfziger-Schritten
- pGridMap = new BOOL[ nGridRows*nGridCols];
+ pGridMap = new sal_Bool[ nGridRows*nGridCols];
memset( (void*)pGridMap, 0, nGridRows*nGridCols );
SvLBoxTreeList* pModel = pView->pModel;
@@ -3182,49 +3182,49 @@ void ImpIcnCursor::CreateGridMap()
}
}
-BOOL ImpIcnCursor::GetGrid( const Point& rDocPos, USHORT& rGridX, USHORT& rGridY ) const
+sal_Bool ImpIcnCursor::GetGrid( const Point& rDocPos, sal_uInt16& rGridX, sal_uInt16& rGridY ) const
{
Point aPos( rDocPos );
aPos.X() -= LROFFS_WINBORDER;
aPos.Y() -= TBOFFS_WINBORDER;
- rGridX = (USHORT)(aPos.X() / nGridDX);
- rGridY = (USHORT)(aPos.Y() / nGridDY);
- BOOL bInGrid = TRUE;
+ rGridX = (sal_uInt16)(aPos.X() / nGridDX);
+ rGridY = (sal_uInt16)(aPos.Y() / nGridDY);
+ sal_Bool bInGrid = sal_True;
if( rGridX >= nGridCols )
{
- rGridX = sal::static_int_cast< USHORT >(nGridCols - 1);
- bInGrid = FALSE;
+ rGridX = sal::static_int_cast< sal_uInt16 >(nGridCols - 1);
+ bInGrid = sal_False;
}
if( rGridY >= nGridRows )
{
- rGridY = sal::static_int_cast< USHORT >(nGridRows - 1);
+ rGridY = sal::static_int_cast< sal_uInt16 >(nGridRows - 1);
if( !bInGrid )
- return FALSE; // beide Koordinaten nicht im Grid
+ return sal_False; // beide Koordinaten nicht im Grid
}
- return TRUE;
+ return sal_True;
}
-void ImpIcnCursor::SetGridUsed( const Rectangle& rRect, BOOL bUsed )
+void ImpIcnCursor::SetGridUsed( const Rectangle& rRect, sal_Bool bUsed )
{
CreateGridMap();
- USHORT nTLX, nTLY, nBRX, nBRY;
+ sal_uInt16 nTLX, nTLY, nBRX, nBRY;
- BOOL bTLInGrid = GetGrid( rRect.TopLeft(), nTLX, nTLY );
- BOOL bBRInGrid = GetGrid( rRect.BottomRight(), nBRX, nBRY );
+ sal_Bool bTLInGrid = GetGrid( rRect.TopLeft(), nTLX, nTLY );
+ sal_Bool bBRInGrid = GetGrid( rRect.BottomRight(), nBRX, nBRY );
if( !bTLInGrid && !bBRInGrid )
return;
- for( USHORT nCurY = nTLY; nCurY <= nBRY; nCurY++ )
+ for( sal_uInt16 nCurY = nTLY; nCurY <= nBRY; nCurY++ )
{
- for( USHORT nCurX = nTLX; nCurX <= nBRX; nCurX++ )
+ for( sal_uInt16 nCurX = nTLX; nCurX <= nBRX; nCurX++ )
{
SetGridUsed( nCurX, nCurY, bUsed );
}
}
}
-void ImpIcnCursor::Clear( BOOL bGridToo )
+void ImpIcnCursor::Clear( sal_Bool bGridToo )
{
if( pColumns )
{
@@ -3244,12 +3244,12 @@ void ImpIcnCursor::Clear( BOOL bGridToo )
}
}
-SvLBoxEntry* ImpIcnCursor::SearchCol(USHORT nCol,USHORT nTop,USHORT nBottom,
- USHORT, BOOL bDown, BOOL bSimple )
+SvLBoxEntry* ImpIcnCursor::SearchCol(sal_uInt16 nCol,sal_uInt16 nTop,sal_uInt16 nBottom,
+ sal_uInt16, sal_Bool bDown, sal_Bool bSimple )
{
DBG_ASSERT(pCurEntry,"SearchCol: No reference entry");
SvPtrarr* pList = &(pColumns[ nCol ]);
- USHORT nCount = pList->Count();
+ sal_uInt16 nCount = pList->Count();
if( !nCount )
return 0;
@@ -3257,7 +3257,7 @@ SvLBoxEntry* ImpIcnCursor::SearchCol(USHORT nCol,USHORT nTop,USHORT nBottom,
if( bSimple )
{
- USHORT nListPos = pList->GetPos( pCurEntry );
+ sal_uInt16 nListPos = pList->GetPos( pCurEntry );
DBG_ASSERT(nListPos!=0xffff,"Entry not in Col-List");
if( bDown )
{
@@ -3290,19 +3290,19 @@ SvLBoxEntry* ImpIcnCursor::SearchCol(USHORT nCol,USHORT nTop,USHORT nBottom,
if( nTop > nBottom )
{
- USHORT nTemp = nTop;
+ sal_uInt16 nTemp = nTop;
nTop = nBottom;
nBottom = nTemp;
}
long nMinDistance = LONG_MAX;
SvLBoxEntry* pResult = 0;
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
SvLBoxEntry* pEntry = (SvLBoxEntry*)(pList->GetObject( nCur ));
if( pEntry != pCurEntry )
{
SvIcnVwDataEntry* pViewData = ICNVIEWDATA2(pEntry);
- USHORT nY = pViewData->nY;
+ sal_uInt16 nY = pViewData->nY;
if( nY >= nTop && nY <= nBottom )
{
const Rectangle& rRect = pView->GetBoundingRect( pEntry );
@@ -3320,12 +3320,12 @@ SvLBoxEntry* ImpIcnCursor::SearchCol(USHORT nCol,USHORT nTop,USHORT nBottom,
return pResult;
}
-SvLBoxEntry* ImpIcnCursor::SearchRow(USHORT nRow,USHORT nLeft,USHORT nRight,
- USHORT, BOOL bRight, BOOL bSimple )
+SvLBoxEntry* ImpIcnCursor::SearchRow(sal_uInt16 nRow,sal_uInt16 nLeft,sal_uInt16 nRight,
+ sal_uInt16, sal_Bool bRight, sal_Bool bSimple )
{
DBG_ASSERT(pCurEntry,"SearchRow: No reference entry");
SvPtrarr* pList = &(pRows[ nRow ]);
- USHORT nCount = pList->Count();
+ sal_uInt16 nCount = pList->Count();
if( !nCount )
return 0;
@@ -3333,7 +3333,7 @@ SvLBoxEntry* ImpIcnCursor::SearchRow(USHORT nRow,USHORT nLeft,USHORT nRight,
if( bSimple )
{
- USHORT nListPos = pList->GetPos( pCurEntry );
+ sal_uInt16 nListPos = pList->GetPos( pCurEntry );
DBG_ASSERT(nListPos!=0xffff,"Entry not in Row-List");
if( bRight )
{
@@ -3366,19 +3366,19 @@ SvLBoxEntry* ImpIcnCursor::SearchRow(USHORT nRow,USHORT nLeft,USHORT nRight,
}
if( nRight < nLeft )
{
- USHORT nTemp = nRight;
+ sal_uInt16 nTemp = nRight;
nRight = nLeft;
nLeft = nTemp;
}
long nMinDistance = LONG_MAX;
SvLBoxEntry* pResult = 0;
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
SvLBoxEntry* pEntry = (SvLBoxEntry*)(pList->GetObject( nCur ));
if( pEntry != pCurEntry )
{
SvIcnVwDataEntry* pViewData = ICNVIEWDATA2(pEntry);
- USHORT nX = pViewData->nX;
+ sal_uInt16 nX = pViewData->nX;
if( nX >= nLeft && nX <= nRight )
{
const Rectangle& rRect = pView->GetBoundingRect( pEntry );
@@ -3400,7 +3400,7 @@ SvLBoxEntry* ImpIcnCursor::SearchRow(USHORT nRow,USHORT nLeft,USHORT nRight,
/*
Sucht ab dem uebergebenen Eintrag den naechsten rechts- bzw.
- linksstehenden. Suchverfahren am Beispiel bRight = TRUE:
+ linksstehenden. Suchverfahren am Beispiel bRight = sal_True:
c
b c
@@ -3415,22 +3415,22 @@ SvLBoxEntry* ImpIcnCursor::SearchRow(USHORT nRow,USHORT nLeft,USHORT nRight,
a,b,c : 2., 3., 4. Suchrechteck
*/
-SvLBoxEntry* ImpIcnCursor::GoLeftRight( SvLBoxEntry* pIcnEntry, BOOL bRight )
+SvLBoxEntry* ImpIcnCursor::GoLeftRight( SvLBoxEntry* pIcnEntry, sal_Bool bRight )
{
SvLBoxEntry* pResult;
pCurEntry = pIcnEntry;
Create();
SvIcnVwDataEntry* pViewData = ICNVIEWDATA2(pIcnEntry);
- USHORT nY = pViewData->nY;
- USHORT nX = pViewData->nX;
+ sal_uInt16 nY = pViewData->nY;
+ sal_uInt16 nX = pViewData->nX;
DBG_ASSERT(nY< nRows,"GoLeftRight:Bad column");
DBG_ASSERT(nX< nCols,"GoLeftRight:Bad row");
// Nachbar auf gleicher Zeile ?
if( bRight )
pResult = SearchRow(
- nY, nX, sal::static_int_cast< USHORT >(nCols-1), nX, TRUE, TRUE );
+ nY, nX, sal::static_int_cast< sal_uInt16 >(nCols-1), nX, sal_True, sal_True );
else
- pResult = SearchRow( nY, nX ,0, nX, FALSE, TRUE );
+ pResult = SearchRow( nY, nX ,0, nX, sal_False, sal_True );
if( pResult )
return pResult;
@@ -3448,11 +3448,11 @@ SvLBoxEntry* ImpIcnCursor::GoLeftRight( SvLBoxEntry* pIcnEntry, BOOL bRight )
nLastCol = -1; // 0-1
}
- USHORT nRowMin = nY;
- USHORT nRowMax = nY;
+ sal_uInt16 nRowMin = nY;
+ sal_uInt16 nRowMax = nY;
do
{
- SvLBoxEntry* pEntry = SearchCol((USHORT)nCurCol,nRowMin,nRowMax,nY,TRUE, FALSE);
+ SvLBoxEntry* pEntry = SearchCol((sal_uInt16)nCurCol,nRowMin,nRowMax,nY,sal_True, sal_False);
if( pEntry )
return pEntry;
if( nRowMin )
@@ -3464,23 +3464,23 @@ SvLBoxEntry* ImpIcnCursor::GoLeftRight( SvLBoxEntry* pIcnEntry, BOOL bRight )
return 0;
}
-SvLBoxEntry* ImpIcnCursor::GoUpDown( SvLBoxEntry* pIcnEntry, BOOL bDown)
+SvLBoxEntry* ImpIcnCursor::GoUpDown( SvLBoxEntry* pIcnEntry, sal_Bool bDown)
{
SvLBoxEntry* pResult;
pCurEntry = pIcnEntry;
Create();
SvIcnVwDataEntry* pViewData = ICNVIEWDATA2(pIcnEntry);
- USHORT nY = pViewData->nY;
- USHORT nX = pViewData->nX;
+ sal_uInt16 nY = pViewData->nY;
+ sal_uInt16 nX = pViewData->nX;
DBG_ASSERT(nY<nRows,"GoUpDown:Bad column");
DBG_ASSERT(nX<nCols,"GoUpDown:Bad row");
// Nachbar in gleicher Spalte ?
if( bDown )
pResult = SearchCol(
- nX, nY, sal::static_int_cast< USHORT >(nRows-1), nY, TRUE, TRUE );
+ nX, nY, sal::static_int_cast< sal_uInt16 >(nRows-1), nY, sal_True, sal_True );
else
- pResult = SearchCol( nX, nY ,0, nY, FALSE, TRUE );
+ pResult = SearchCol( nX, nY ,0, nY, sal_False, sal_True );
if( pResult )
return pResult;
@@ -3498,11 +3498,11 @@ SvLBoxEntry* ImpIcnCursor::GoUpDown( SvLBoxEntry* pIcnEntry, BOOL bDown)
nLastRow = -1; // 0-1
}
- USHORT nColMin = nX;
- USHORT nColMax = nX;
+ sal_uInt16 nColMin = nX;
+ sal_uInt16 nColMax = nX;
do
{
- SvLBoxEntry* pEntry = SearchRow((USHORT)nCurRow,nColMin,nColMax,nX,TRUE, FALSE);
+ SvLBoxEntry* pEntry = SearchRow((sal_uInt16)nCurRow,nColMin,nColMax,nX,sal_True, sal_False);
if( pEntry )
return pEntry;
if( nColMin )
@@ -3564,29 +3564,29 @@ void ImpIcnCursor::ExpandGrid()
}
}
-BOOL ImpIcnCursor::FindEmptyGridRect( Rectangle& rRect )
+sal_Bool ImpIcnCursor::FindEmptyGridRect( Rectangle& rRect )
{
CreateGridMap();
- USHORT nCount = (USHORT)(nGridCols * nGridRows);
+ sal_uInt16 nCount = (sal_uInt16)(nGridCols * nGridRows);
if( !nCount )
- return FALSE;
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ return sal_False;
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
if( !pGridMap[ nCur ] )
{
- USHORT nCol = (USHORT)(nCur % nGridCols);
- USHORT nRow = (USHORT)(nCur / nGridCols);
+ sal_uInt16 nCol = (sal_uInt16)(nCur % nGridCols);
+ sal_uInt16 nRow = (sal_uInt16)(nCur / nGridCols);
rRect.Top() = nRow * nGridDY + TBOFFS_WINBORDER;
rRect.Bottom() = rRect.Top() + nGridDY;
rRect.Left() = nCol * nGridDX+ LROFFS_WINBORDER;
rRect.Right() = rRect.Left() + nGridDX;
- SetGridUsed( nCol, nRow, TRUE );
+ SetGridUsed( nCol, nRow, sal_True );
//XXX
//if( nRow + 5 > nGridRows )
// ExpandGrid();
DBG_ASSERT(pGridMap[nCur],"SetGridUsed failed");
- return TRUE;
+ return sal_True;
}
}
// Gridmap ist voll: Um eine Zeile erweitern
@@ -3594,22 +3594,22 @@ BOOL ImpIcnCursor::FindEmptyGridRect( Rectangle& rRect )
rRect.Bottom() = rRect.Top() + nGridDY;
rRect.Left() = LROFFS_WINBORDER;
rRect.Right() = rRect.Left() + nGridDX;
- return FALSE;
+ return sal_False;
//XXX
//ExpandGrid();
- //return TRUE;
+ //return sal_True;
}
void ImpIcnCursor::CreateGridAjustData( SvPtrarr& rLists, SvLBoxEntry* pRefEntry)
{
if( !pRefEntry )
{
- USHORT nAdjustRows = (USHORT)(pView->aVirtOutputSize.Height() / pView->nGridDY);
+ sal_uInt16 nAdjustRows = (sal_uInt16)(pView->aVirtOutputSize.Height() / pView->nGridDY);
nAdjustRows++; // wg. Abrundung!
if( !nAdjustRows )
return;
- for( USHORT nCurList = 0; nCurList < nAdjustRows; nCurList++ )
+ for( sal_uInt16 nCurList = 0; nCurList < nAdjustRows; nCurList++ )
{
SvPtrarr* pRow = new SvPtrarr;
rLists.Insert( (void*)pRow, nCurList );
@@ -3619,7 +3619,7 @@ void ImpIcnCursor::CreateGridAjustData( SvPtrarr& rLists, SvLBoxEntry* pRefEntry
{
const Rectangle& rRect = pView->GetBoundingRect( pEntry );
short nY = (short)( ((rRect.Top()+rRect.Bottom())/2) / pView->nGridDY );
- USHORT nIns = GetSortListPos((SvPtrarr*)rLists[nY],rRect.Left(),FALSE);
+ sal_uInt16 nIns = GetSortListPos((SvPtrarr*)rLists[nY],rRect.Left(),sal_False);
((SvPtrarr*)rLists[ nY ])->Insert( pEntry, nIns );
pEntry = pView->pModel->NextSibling( pEntry );
}
@@ -3643,7 +3643,7 @@ void ImpIcnCursor::CreateGridAjustData( SvPtrarr& rLists, SvLBoxEntry* pRefEntry
short nY = (short)( ((rRect.Top()+rRect.Bottom())/2) / pView->nGridDY );
if( nY == nRefRow )
{
- USHORT nIns = GetSortListPos( pRow, rRect.Left(), FALSE );
+ sal_uInt16 nIns = GetSortListPos( pRow, rRect.Left(), sal_False );
pRow->Insert( pEntry, nIns );
}
pEntry = pView->pModel->NextSibling( pEntry );
@@ -3654,8 +3654,8 @@ void ImpIcnCursor::CreateGridAjustData( SvPtrarr& rLists, SvLBoxEntry* pRefEntry
//static
void ImpIcnCursor::DestroyGridAdjustData( SvPtrarr& rLists )
{
- USHORT nCount = rLists.Count();
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ sal_uInt16 nCount = rLists.Count();
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
SvPtrarr* pArr = (SvPtrarr*)rLists[ nCur ];
delete pArr;
@@ -3712,7 +3712,7 @@ void SvImpIconView::Center( SvLBoxEntry* pEntry,
// Die Deltas entsprechen Offsets, um die die View auf dem Doc verschoben wird
// links, hoch: Offsets < 0
// rechts, runter: Offsets > 0
-void SvImpIconView::Scroll( long nDeltaX, long nDeltaY, BOOL bScrollBar )
+void SvImpIconView::Scroll( long nDeltaX, long nDeltaY, sal_Bool bScrollBar )
{
const MapMode& rMapMode = pView->GetMapMode();
Point aOrigin( rMapMode.GetOrigin() );
@@ -3750,7 +3750,7 @@ Rectangle SvImpIconView::CalcFocusRect( SvLBoxEntry* pEntry )
}
-void SvImpIconView::SelectRect( const Rectangle& rRect, BOOL bAdd,
+void SvImpIconView::SelectRect( const Rectangle& rRect, sal_Bool bAdd,
SvPtrarr* pOtherRects, short nBorderOffs )
{
if( !pZOrderList || !pZOrderList->Count() )
@@ -3758,7 +3758,7 @@ void SvImpIconView::SelectRect( const Rectangle& rRect, BOOL bAdd,
CheckBoundingRects();
pView->Update();
- USHORT nCount = pZOrderList->Count();
+ sal_uInt16 nCount = pZOrderList->Count();
Rectangle aRect( rRect );
aRect.Justify();
@@ -3769,9 +3769,9 @@ void SvImpIconView::SelectRect( const Rectangle& rRect, BOOL bAdd,
aRect.Top() -= nBorderOffs;
aRect.Bottom() += nBorderOffs;
}
- BOOL bCalcOverlap = (bAdd && pOtherRects && pOtherRects->Count()) ? TRUE : FALSE;
+ sal_Bool bCalcOverlap = (bAdd && pOtherRects && pOtherRects->Count()) ? sal_True : sal_False;
- for( USHORT nPos = 0; nPos < nCount; nPos++ )
+ for( sal_uInt16 nPos = 0; nPos < nCount; nPos++ )
{
SvLBoxEntry* pEntry = (SvLBoxEntry*)(pZOrderList->GetObject(nPos ));
@@ -3780,28 +3780,28 @@ void SvImpIconView::SelectRect( const Rectangle& rRect, BOOL bAdd,
if( !IsBoundingRectValid( pViewData->aRect ))
FindBoundingRect( pEntry, pViewData );
const Rectangle& rBoundRect = pViewData->aRect;
- BOOL bSelected = pViewData->IsSelected();
+ sal_Bool bSelected = pViewData->IsSelected();
- BOOL bOverlaps;
+ sal_Bool bOverlaps;
if( bCalcOverlap )
bOverlaps = IsOver( pOtherRects, rBoundRect );
else
- bOverlaps = FALSE;
- BOOL bOver = aRect.IsOver( rBoundRect );
+ bOverlaps = sal_False;
+ sal_Bool bOver = aRect.IsOver( rBoundRect );
if( bOver && !bOverlaps )
{
// Ist im neuen Selektionsrechteck und in keinem alten
// => selektieren
if( !bSelected )
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
}
else if( !bAdd )
{
// ist ausserhalb des Selektionsrechtecks
// => Selektion entfernen
if( bSelected )
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
}
else if( bAdd && bOverlaps )
{
@@ -3821,34 +3821,34 @@ void SvImpIconView::SelectRect( const Rectangle& rRect, BOOL bAdd,
{
// Schnittmenge zwischen alten Rects & aktuellem Rect desel.
if( bSelected )
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
}
else
{
// Eintrag eines alten Rects selektieren
if( !bSelected )
- pView->Select( pEntry, TRUE );
+ pView->Select( pEntry, sal_True );
}
}
else if( !bOver && bSelected )
{
// Der Eintrag liegt voellig ausserhalb und wird deshalb desel.
- pView->Select( pEntry, FALSE );
+ pView->Select( pEntry, sal_False );
}
}
pView->Update();
}
-BOOL SvImpIconView::IsOver( SvPtrarr* pRectList, const Rectangle& rBoundRect ) const
+sal_Bool SvImpIconView::IsOver( SvPtrarr* pRectList, const Rectangle& rBoundRect ) const
{
- USHORT nCount = pRectList->Count();
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ sal_uInt16 nCount = pRectList->Count();
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
Rectangle* pRect = (Rectangle*)pRectList->GetObject( nCur );
if( rBoundRect.IsOver( *pRect ))
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
void SvImpIconView::AddSelectedRect( const Rectangle& rRect, short nBorderOffs )
@@ -3867,8 +3867,8 @@ void SvImpIconView::AddSelectedRect( const Rectangle& rRect, short nBorderOffs )
void SvImpIconView::ClearSelectedRectList()
{
- USHORT nCount = aSelectedRectList.Count();
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ sal_uInt16 nCount = aSelectedRectList.Count();
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
Rectangle* pRect = (Rectangle*)aSelectedRectList.GetObject( nCur );
delete pRect;
@@ -3906,7 +3906,7 @@ void SvImpIconView::ImpDrawXORRect( const Rectangle& rRect )
}
void SvImpIconView::CalcScrollOffsets( const Point& rPosPixel,
- long& rX, long& rY, BOOL bInDragDrop, USHORT nBorderWidth)
+ long& rX, long& rY, sal_Bool bInDragDrop, sal_uInt16 nBorderWidth)
{
// Scrolling der View, falls sich der Mauszeiger im Grenzbereich des
// Fensters befindet
@@ -3914,8 +3914,8 @@ void SvImpIconView::CalcScrollOffsets( const Point& rPosPixel,
long nPixelToScrollY = 0;
Size aWndSize = aOutputSize;
- nBorderWidth = (USHORT)(Min( (long)(aWndSize.Height()-1), (long)nBorderWidth ));
- nBorderWidth = (USHORT)(Min( (long)(aWndSize.Width()-1), (long)nBorderWidth ));
+ nBorderWidth = (sal_uInt16)(Min( (long)(aWndSize.Height()-1), (long)nBorderWidth ));
+ nBorderWidth = (sal_uInt16)(Min( (long)(aWndSize.Width()-1), (long)nBorderWidth ));
if ( rPosPixel.X() < nBorderWidth )
{
@@ -3967,16 +3967,16 @@ void SvImpIconView::EndTracking()
}
}
-BOOL SvImpIconView::IsTextHit( SvLBoxEntry* pEntry, const Point& rDocPos )
+sal_Bool SvImpIconView::IsTextHit( SvLBoxEntry* pEntry, const Point& rDocPos )
{
SvLBoxString* pItem = (SvLBoxString*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXSTRING));
if( pItem )
{
Rectangle aRect( CalcTextRect( pEntry, pItem ));
if( aRect.IsInside( rDocPos ) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
IMPL_LINK(SvImpIconView, EditTimeoutHdl, Timer*, EMPTYARG )
@@ -4001,8 +4001,8 @@ void SvImpIconView::AdjustAtGrid( SvLBoxEntry* pStart )
{
SvPtrarr aLists;
pImpCursor->CreateGridAjustData( aLists, pStart );
- USHORT nCount = aLists.Count();
- for( USHORT nCur = 0; nCur < nCount; nCur++ )
+ sal_uInt16 nCount = aLists.Count();
+ for( sal_uInt16 nCur = 0; nCur < nCount; nCur++ )
{
AdjustAtGrid( *(SvPtrarr*)aLists[ nCur ], pStart );
}
@@ -4016,18 +4016,18 @@ void SvImpIconView::AdjustAtGrid( const SvPtrarr& rRow, SvLBoxEntry* pStart )
if( !rRow.Count() )
return;
- BOOL bGo;
+ sal_Bool bGo;
if( !pStart )
- bGo = TRUE;
+ bGo = sal_True;
else
- bGo = FALSE;
+ bGo = sal_False;
long nCurRight = 0;
- for( USHORT nCur = 0; nCur < rRow.Count(); nCur++ )
+ for( sal_uInt16 nCur = 0; nCur < rRow.Count(); nCur++ )
{
SvLBoxEntry* pCur = (SvLBoxEntry*)rRow[ nCur ];
if( !bGo && pCur == pStart )
- bGo = TRUE;
+ bGo = sal_True;
SvIcnVwDataEntry* pViewData = ICNVIEWDATA(pCur);
// Massgebend (fuer das menschliche Auge) ist die Bitmap, da sonst
diff --git a/svtools/source/contnr/svlbitm.cxx b/svtools/source/contnr/svlbitm.cxx
index d260f984c2b0..89e888de0318 100644
--- a/svtools/source/contnr/svlbitm.cxx
+++ b/svtools/source/contnr/svlbitm.cxx
@@ -44,20 +44,20 @@
struct SvLBoxButtonData_Impl
{
SvLBoxEntry* pEntry;
- BOOL bDefaultImages;
- BOOL bShowRadioButton;
+ sal_Bool bDefaultImages;
+ sal_Bool bShowRadioButton;
- SvLBoxButtonData_Impl() : pEntry( NULL ), bDefaultImages( FALSE ), bShowRadioButton( FALSE ) {}
+ SvLBoxButtonData_Impl() : pEntry( NULL ), bDefaultImages( sal_False ), bShowRadioButton( sal_False ) {}
};
DBG_NAME(SvLBoxButtonData)
-void SvLBoxButtonData::InitData( BOOL bImagesFromDefault, bool _bRadioBtn, const Control* pCtrl )
+void SvLBoxButtonData::InitData( sal_Bool bImagesFromDefault, bool _bRadioBtn, const Control* pCtrl )
{
pImpl = new SvLBoxButtonData_Impl;
- bDataOk = FALSE;
+ bDataOk = sal_False;
eState = SV_BUTTON_UNCHECKED;
pImpl->bDefaultImages = bImagesFromDefault;
pImpl->bShowRadioButton = ( _bRadioBtn != false );
@@ -70,21 +70,21 @@ SvLBoxButtonData::SvLBoxButtonData( const Control* pControlForSettings )
{
DBG_CTOR(SvLBoxButtonData,0);
- InitData( TRUE, false, pControlForSettings );
+ InitData( sal_True, false, pControlForSettings );
}
SvLBoxButtonData::SvLBoxButtonData( const Control* pControlForSettings, bool _bRadioBtn )
{
DBG_CTOR(SvLBoxButtonData,0);
- InitData( TRUE, _bRadioBtn, pControlForSettings );
+ InitData( sal_True, _bRadioBtn, pControlForSettings );
}
SvLBoxButtonData::SvLBoxButtonData()
{
DBG_CTOR(SvLBoxButtonData,0);
- InitData( FALSE, false );
+ InitData( sal_False, false );
}
SvLBoxButtonData::~SvLBoxButtonData()
@@ -103,11 +103,11 @@ void SvLBoxButtonData::CallLink()
aLink.Call( this );
}
-USHORT SvLBoxButtonData::GetIndex( USHORT nItemState )
+sal_uInt16 SvLBoxButtonData::GetIndex( sal_uInt16 nItemState )
{
DBG_CHKTHIS(SvLBoxButtonData,0);
nItemState &= 0x000F;
- USHORT nIdx;
+ sal_uInt16 nIdx;
switch( nItemState )
{
case SV_ITEMSTATE_UNCHECKED:
@@ -134,18 +134,18 @@ void SvLBoxButtonData::SetWidthAndHeight()
Size aSize = aBmps[0].GetSizePixel();
nWidth = aSize.Width();
nHeight = aSize.Height();
- bDataOk = TRUE;
+ bDataOk = sal_True;
}
-void SvLBoxButtonData::StoreButtonState( SvLBoxEntry* pActEntry, USHORT nItemFlags )
+void SvLBoxButtonData::StoreButtonState( SvLBoxEntry* pActEntry, sal_uInt16 nItemFlags )
{
DBG_CHKTHIS(SvLBoxButtonData,0);
pImpl->pEntry = pActEntry;
eState = ConvertToButtonState( nItemFlags );
}
-SvButtonState SvLBoxButtonData::ConvertToButtonState( USHORT nItemFlags ) const
+SvButtonState SvLBoxButtonData::ConvertToButtonState( sal_uInt16 nItemFlags ) const
{
DBG_CHKTHIS(SvLBoxButtonData,0);
nItemFlags &= (SV_ITEMSTATE_UNCHECKED |
@@ -196,12 +196,12 @@ void SvLBoxButtonData::SetDefaultImages( const Control* pCtrl )
}
}
-BOOL SvLBoxButtonData::HasDefaultImages( void ) const
+sal_Bool SvLBoxButtonData::HasDefaultImages( void ) const
{
return pImpl->bDefaultImages;
}
-BOOL SvLBoxButtonData::IsRadio() {
+sal_Bool SvLBoxButtonData::IsRadio() {
return pImpl->bShowRadioButton;
}
@@ -211,7 +211,7 @@ BOOL SvLBoxButtonData::IsRadio() {
DBG_NAME(SvLBoxString);
-SvLBoxString::SvLBoxString( SvLBoxEntry* pEntry,USHORT nFlags,const XubString& rStr) :
+SvLBoxString::SvLBoxString( SvLBoxEntry* pEntry,sal_uInt16 nFlags,const XubString& rStr) :
SvLBoxItem( pEntry, nFlags )
{
DBG_CTOR(SvLBoxString,0);
@@ -228,19 +228,19 @@ SvLBoxString::~SvLBoxString()
DBG_DTOR(SvLBoxString,0);
}
-USHORT SvLBoxString::IsA()
+sal_uInt16 SvLBoxString::IsA()
{
DBG_CHKTHIS(SvLBoxString,0);
return SV_ITEM_ID_LBOXSTRING;
}
-void SvLBoxString::Paint( const Point& rPos, SvLBox& rDev, USHORT /* nFlags */,
+void SvLBoxString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 /* nFlags */,
SvLBoxEntry* _pEntry)
{
DBG_CHKTHIS(SvLBoxString,0);
if ( _pEntry )
{
- USHORT nStyle = rDev.IsEnabled() ? 0 : TEXT_DRAW_DISABLE;
+ sal_uInt16 nStyle = rDev.IsEnabled() ? 0 : TEXT_DRAW_DISABLE;
if ( rDev.IsEntryMnemonicsEnabled() )
nStyle |= TEXT_DRAW_MNEMONIC;
rDev.DrawText( Rectangle(rPos,GetSize(&rDev,_pEntry)),aStr,nStyle);
@@ -283,7 +283,7 @@ void SvLBoxString::InitViewData( SvLBox* pView,SvLBoxEntry* pEntry,
DBG_NAME(SvLBoxBmp);
-SvLBoxBmp::SvLBoxBmp( SvLBoxEntry* pEntry, USHORT nFlags, Image aBitmap ) :
+SvLBoxBmp::SvLBoxBmp( SvLBoxEntry* pEntry, sal_uInt16 nFlags, Image aBitmap ) :
SvLBoxItem( pEntry, nFlags )
{
DBG_CTOR(SvLBoxBmp,0);
@@ -300,7 +300,7 @@ SvLBoxBmp::~SvLBoxBmp()
DBG_DTOR(SvLBoxBmp,0);
}
-USHORT SvLBoxBmp::IsA()
+sal_uInt16 SvLBoxBmp::IsA()
{
DBG_CHKTHIS(SvLBoxBmp,0);
return SV_ITEM_ID_LBOXBMP;
@@ -321,11 +321,11 @@ void SvLBoxBmp::InitViewData( SvLBox* pView,SvLBoxEntry* pEntry,
pViewData->aSize = aBmp.GetSizePixel();
}
-void SvLBoxBmp::Paint( const Point& rPos, SvLBox& rDev, USHORT /* nFlags */,
+void SvLBoxBmp::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 /* nFlags */,
SvLBoxEntry* )
{
DBG_CHKTHIS(SvLBoxBmp,0);
- USHORT nStyle = rDev.IsEnabled() ? 0 : IMAGE_DRAW_DISABLE;
+ sal_uInt16 nStyle = rDev.IsEnabled() ? 0 : IMAGE_DRAW_DISABLE;
rDev.DrawImage( rPos, aBmp ,nStyle);
}
@@ -348,7 +348,7 @@ void SvLBoxBmp::Clone( SvLBoxItem* pSource )
DBG_NAME(SvLBoxButton);
SvLBoxButton::SvLBoxButton( SvLBoxEntry* pEntry, SvLBoxButtonKind eTheKind,
- USHORT nFlags, SvLBoxButtonData* pBData )
+ sal_uInt16 nFlags, SvLBoxButtonData* pBData )
: SvLBoxItem( pEntry, nFlags )
{
DBG_CTOR(SvLBoxButton,0);
@@ -372,13 +372,13 @@ SvLBoxButton::~SvLBoxButton()
DBG_DTOR(SvLBoxButton,0);
}
-USHORT SvLBoxButton::IsA()
+sal_uInt16 SvLBoxButton::IsA()
{
DBG_CHKTHIS(SvLBoxButton,0);
return SV_ITEM_ID_LBOXBUTTON;
}
-void SvLBoxButton::Check(SvLBox*, SvLBoxEntry*, BOOL bOn)
+void SvLBoxButton::Check(SvLBox*, SvLBoxEntry*, sal_Bool bOn)
{
DBG_CHKTHIS(SvLBoxButton,0);
if ( bOn != IsStateChecked() )
@@ -390,7 +390,7 @@ void SvLBoxButton::Check(SvLBox*, SvLBoxEntry*, BOOL bOn)
}
}
-BOOL SvLBoxButton::ClickHdl( SvLBox*, SvLBoxEntry* pEntry )
+sal_Bool SvLBoxButton::ClickHdl( SvLBox*, SvLBoxEntry* pEntry )
{
DBG_CHKTHIS(SvLBoxButton,0);
if ( CheckModification() )
@@ -402,22 +402,22 @@ BOOL SvLBoxButton::ClickHdl( SvLBox*, SvLBoxEntry* pEntry )
pData->StoreButtonState( pEntry, nItemFlags );
pData->CallLink();
}
- return FALSE;
+ return sal_False;
}
-void SvLBoxButton::Paint( const Point& rPos, SvLBox& rDev, USHORT /* nFlags */,
+void SvLBoxButton::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 /* nFlags */,
SvLBoxEntry* /*pEntry*/ )
{
DBG_CHKTHIS(SvLBoxButton,0);
- USHORT nIndex = eKind == SvLBoxButtonKind_staticImage
+ sal_uInt16 nIndex = eKind == SvLBoxButtonKind_staticImage
? SV_BMP_STATICIMAGE : pData->GetIndex( nItemFlags );
- USHORT nStyle = eKind != SvLBoxButtonKind_disabledCheckbox &&
+ sal_uInt16 nStyle = eKind != SvLBoxButtonKind_disabledCheckbox &&
rDev.IsEnabled() ? 0 : IMAGE_DRAW_DISABLE;
///
//Native drawing
///
- BOOL bNativeOK = FALSE;
+ sal_Bool bNativeOK = sal_False;
ControlType eCtrlType = (pData->IsRadio())? CTRL_RADIOBUTTON : CTRL_CHECKBOX;
if ( nIndex != SV_BMP_STATICIMAGE && rDev.IsNativeControlSupported( eCtrlType, PART_ENTIRE_CONTROL) )
{
@@ -520,14 +520,14 @@ struct SvLBoxContextBmp_Impl
Image m_aImage1_hc;
Image m_aImage2_hc;
- USHORT m_nB2IndicatorFlags;
+ sal_uInt16 m_nB2IndicatorFlags;
};
// ***************************************************************
DBG_NAME(SvLBoxContextBmp)
-SvLBoxContextBmp::SvLBoxContextBmp( SvLBoxEntry* pEntry, USHORT nItemFlags,
- Image aBmp1, Image aBmp2, USHORT nEntryFlags )
+SvLBoxContextBmp::SvLBoxContextBmp( SvLBoxEntry* pEntry, sal_uInt16 nItemFlags,
+ Image aBmp1, Image aBmp2, sal_uInt16 nEntryFlags )
:SvLBoxItem( pEntry, nItemFlags )
,m_pImpl( new SvLBoxContextBmp_Impl )
{
@@ -551,13 +551,13 @@ SvLBoxContextBmp::~SvLBoxContextBmp()
DBG_DTOR(SvLBoxContextBmp,0);
}
-USHORT SvLBoxContextBmp::IsA()
+sal_uInt16 SvLBoxContextBmp::IsA()
{
DBG_CHKTHIS(SvLBoxContextBmp,0);
return SV_ITEM_ID_LBOXCONTEXTBMP;
}
-BOOL SvLBoxContextBmp::SetModeImages( const Image& _rBitmap1, const Image& _rBitmap2, BmpColorMode _eMode )
+sal_Bool SvLBoxContextBmp::SetModeImages( const Image& _rBitmap1, const Image& _rBitmap2, BmpColorMode _eMode )
{
DBG_CHKTHIS(SvLBoxContextBmp,0);
@@ -612,7 +612,7 @@ void SvLBoxContextBmp::InitViewData( SvLBox* pView,SvLBoxEntry* pEntry,
}
void SvLBoxContextBmp::Paint( const Point& _rPos, SvLBox& _rDev,
- USHORT _nViewDataEntryFlags, SvLBoxEntry* _pEntry )
+ sal_uInt16 _nViewDataEntryFlags, SvLBoxEntry* _pEntry )
{
DBG_CHKTHIS(SvLBoxContextBmp,0);
@@ -629,7 +629,7 @@ void SvLBoxContextBmp::Paint( const Point& _rPos, SvLBox& _rDev,
sal_Bool _bSemiTransparent = _pEntry && ( 0 != ( SV_ENTRYFLAG_SEMITRANSPARENT & _pEntry->GetFlags( ) ) );
// draw
- USHORT nStyle = _rDev.IsEnabled() ? 0 : IMAGE_DRAW_DISABLE;
+ sal_uInt16 nStyle = _rDev.IsEnabled() ? 0 : IMAGE_DRAW_DISABLE;
if ( _bSemiTransparent )
nStyle |= IMAGE_DRAW_SEMITRANSPARENT;
_rDev.DrawImage( _rPos, rImage, nStyle);
diff --git a/svtools/source/contnr/svlbox.cxx b/svtools/source/contnr/svlbox.cxx
index 11e19c6bab3c..e34ed061cd69 100644
--- a/svtools/source/contnr/svlbox.cxx
+++ b/svtools/source/contnr/svlbox.cxx
@@ -31,7 +31,7 @@
/*
Todo:
- Anker loeschen in SelectionEngine bei manuellem Selektieren
- - SelectAll( FALSE ), nur die deselektierten Entries repainten
+ - SelectAll( sal_False ), nur die deselektierten Entries repainten
*/
#include <string.h>
@@ -77,14 +77,14 @@ SvInplaceEdit::SvInplaceEdit
Edit( pParent, WB_LEFT ),
aCallBackHdl ( rNotifyEditEnd ),
- bCanceled ( FALSE ),
- bAlreadyInCallBack ( FALSE )
+ bCanceled ( sal_False ),
+ bAlreadyInCallBack ( sal_False )
{
DBG_CTOR(SvInplaceEdit,0);
Font aFont( pParent->GetFont() );
- aFont.SetTransparent( FALSE );
+ aFont.SetTransparent( sal_False );
Color aColor( pParent->GetBackground().GetColor() );
aFont.SetFillColor(aColor );
SetFont( aFont );
@@ -120,7 +120,7 @@ SvInplaceEdit::~SvInplaceEdit()
IMPL_LINK_INLINE_START( SvInplaceEdit, ReturnHdl_Impl, Accelerator *, EMPTYARG )
{
DBG_CHKTHIS(SvInplaceEdit,0);
- bCanceled = FALSE;
+ bCanceled = sal_False;
CallCallBackHdl_Impl();
return 1;
}
@@ -129,7 +129,7 @@ IMPL_LINK_INLINE_END( SvInplaceEdit, ReturnHdl_Impl, Accelerator *, EMPTYARG )
IMPL_LINK_INLINE_START( SvInplaceEdit, EscapeHdl_Impl, Accelerator *, EMPTYARG )
{
DBG_CHKTHIS(SvInplaceEdit,0);
- bCanceled = TRUE;
+ bCanceled = sal_True;
CallCallBackHdl_Impl();
return 1;
}
@@ -138,16 +138,16 @@ IMPL_LINK_INLINE_END( SvInplaceEdit, EscapeHdl_Impl, Accelerator *, EMPTYARG )
void SvInplaceEdit::KeyInput( const KeyEvent& rKEvt )
{
DBG_CHKTHIS(SvInplaceEdit,0);
- USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
switch ( nCode )
{
case KEY_ESCAPE:
- bCanceled = TRUE;
+ bCanceled = sal_True;
CallCallBackHdl_Impl();
break;
case KEY_RETURN:
- bCanceled = FALSE;
+ bCanceled = sal_False;
CallCallBackHdl_Impl();
break;
@@ -156,7 +156,7 @@ void SvInplaceEdit::KeyInput( const KeyEvent& rKEvt )
}
}
-void SvInplaceEdit::StopEditing( BOOL bCancel )
+void SvInplaceEdit::StopEditing( sal_Bool bCancel )
{
DBG_CHKTHIS(SvInplaceEdit,0);
if ( !bAlreadyInCallBack )
@@ -171,7 +171,7 @@ void SvInplaceEdit::LoseFocus()
DBG_CHKTHIS(SvInplaceEdit,0);
if ( !bAlreadyInCallBack )
{
- bCanceled = FALSE;
+ bCanceled = sal_False;
aTimer.SetTimeout(10);
aTimer.SetTimeoutHdl(LINK(this,SvInplaceEdit,Timeout_Impl));
aTimer.Start();
@@ -192,12 +192,12 @@ void SvInplaceEdit::CallCallBackHdl_Impl()
aTimer.Stop();
if ( !bAlreadyInCallBack )
{
- bAlreadyInCallBack = TRUE;
+ bAlreadyInCallBack = sal_True;
GetpApp()->RemoveAccel( &aAccReturn );
GetpApp()->RemoveAccel( &aAccEscape );
Hide();
aCallBackHdl.Call( this );
- // bAlreadyInCallBack = FALSE;
+ // bAlreadyInCallBack = sal_False;
}
}
@@ -268,12 +268,12 @@ SvInplaceEdit2::SvInplaceEdit2
const String& rData,
const Link& rNotifyEditEnd,
const Selection& rSelection,
- BOOL bMulti
+ sal_Bool bMulti
) :
aCallBackHdl ( rNotifyEditEnd ),
- bCanceled ( FALSE ),
- bAlreadyInCallBack ( FALSE ),
+ bCanceled ( sal_False ),
+ bAlreadyInCallBack ( sal_False ),
bMultiLine ( bMulti )
{
@@ -285,7 +285,7 @@ SvInplaceEdit2::SvInplaceEdit2
pEdit = new MyEdit_Impl( pParent, this );
Font aFont( pParent->GetFont() );
- aFont.SetTransparent( FALSE );
+ aFont.SetTransparent( sal_False );
Color aColor( pParent->GetBackground().GetColor() );
aFont.SetFillColor(aColor );
pEdit->SetFont( aFont );
@@ -333,7 +333,7 @@ void SvInplaceEdit2::Hide()
IMPL_LINK_INLINE_START( SvInplaceEdit2, ReturnHdl_Impl, Accelerator *, EMPTYARG )
{
DBG_CHKTHIS(SvInplaceEdit2,0);
- bCanceled = FALSE;
+ bCanceled = sal_False;
CallCallBackHdl_Impl();
return 1;
}
@@ -342,35 +342,35 @@ IMPL_LINK_INLINE_END( SvInplaceEdit2, ReturnHdl_Impl, Accelerator *, EMPTYARG )
IMPL_LINK_INLINE_START( SvInplaceEdit2, EscapeHdl_Impl, Accelerator *, EMPTYARG )
{
DBG_CHKTHIS(SvInplaceEdit2,0);
- bCanceled = TRUE;
+ bCanceled = sal_True;
CallCallBackHdl_Impl();
return 1;
}
IMPL_LINK_INLINE_END( SvInplaceEdit2, EscapeHdl_Impl, Accelerator *, EMPTYARG )
-BOOL SvInplaceEdit2::KeyInput( const KeyEvent& rKEvt )
+sal_Bool SvInplaceEdit2::KeyInput( const KeyEvent& rKEvt )
{
DBG_CHKTHIS(SvInplaceEdit2,0);
KeyCode aCode = rKEvt.GetKeyCode();
- USHORT nCode = aCode.GetCode();
+ sal_uInt16 nCode = aCode.GetCode();
switch ( nCode )
{
case KEY_ESCAPE:
- bCanceled = TRUE;
+ bCanceled = sal_True;
CallCallBackHdl_Impl();
- return TRUE;
+ return sal_True;
case KEY_RETURN:
- bCanceled = FALSE;
+ bCanceled = sal_False;
CallCallBackHdl_Impl();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-void SvInplaceEdit2::StopEditing( BOOL bCancel )
+void SvInplaceEdit2::StopEditing( sal_Bool bCancel )
{
DBG_CHKTHIS(SvInplaceEdit2,0);
if ( !bAlreadyInCallBack )
@@ -387,7 +387,7 @@ void SvInplaceEdit2::LoseFocus()
&& ((!Application::GetFocusWindow()) || !pEdit->IsChild( Application::GetFocusWindow()) )
)
{
- bCanceled = FALSE;
+ bCanceled = sal_False;
aTimer.SetTimeout(10);
aTimer.SetTimeoutHdl(LINK(this,SvInplaceEdit2,Timeout_Impl));
aTimer.Start();
@@ -408,7 +408,7 @@ void SvInplaceEdit2::CallCallBackHdl_Impl()
aTimer.Stop();
if ( !bAlreadyInCallBack )
{
- bAlreadyInCallBack = TRUE;
+ bAlreadyInCallBack = sal_True;
GetpApp()->RemoveAccel( &aAccReturn );
GetpApp()->RemoveAccel( &aAccEscape );
pEdit->Hide();
@@ -435,7 +435,7 @@ SvLBoxTab::SvLBoxTab()
nFlags = 0;
}
-SvLBoxTab::SvLBoxTab( long nPosition, USHORT nTabFlags )
+SvLBoxTab::SvLBoxTab( long nPosition, sal_uInt16 nTabFlags )
{
DBG_CTOR(SvLBoxTab,0);
nPos = nPosition;
@@ -494,7 +494,7 @@ long SvLBoxTab::CalcOffset( const String& rStr, const OutputDevice& rOutDev )
long nWidth;
if ( nFlags & SV_LBOXTAB_ADJUST_NUMERIC )
{
- USHORT nPos = rStr.Search( '.' );
+ sal_uInt16 nPos = rStr.Search( '.' );
if ( nPos == STRING_NOTFOUND )
nPos = rStr.Search( ',' );
if ( nPos == STRING_NOTFOUND )
@@ -518,7 +518,7 @@ long SvLBoxTab::CalcOffset( const String& rStr, const OutputDevice& rOutDev )
DBG_NAME(SvLBoxItem);
-SvLBoxItem::SvLBoxItem( SvLBoxEntry*, USHORT )
+SvLBoxItem::SvLBoxItem( SvLBoxEntry*, sal_uInt16 )
{
DBG_CTOR(SvLBoxItem,0);
}
@@ -543,7 +543,7 @@ const Size& SvLBoxItem::GetSize( SvLBox* pView,SvLBoxEntry* pEntry )
const Size& SvLBoxItem::GetSize( SvLBoxEntry* pEntry, SvViewDataEntry* pViewData)
{
DBG_CHKTHIS(SvLBoxItem,0);
- USHORT nItemPos = pEntry->GetPos( this );
+ sal_uInt16 nItemPos = pEntry->GetPos( this );
SvViewDataItem* pItemData = pViewData->pItemData+nItemPos;
return pItemData->aSize;
}
@@ -584,7 +584,7 @@ SvLBoxEntry::~SvLBoxEntry()
void SvLBoxEntry::DeleteItems_Impl()
{
DBG_CHKTHIS(SvLBoxEntry,0);
- USHORT nCount = aItems.Count();
+ sal_uInt16 nCount = aItems.Count();
while( nCount )
{
nCount--;
@@ -607,8 +607,8 @@ void SvLBoxEntry::Clone( SvListEntry* pSource )
SvListEntry::Clone( pSource );
SvLBoxItem* pNewItem;
DeleteItems_Impl();
- USHORT nCount = ((SvLBoxEntry*)pSource)->ItemCount();
- USHORT nCurPos = 0;
+ sal_uInt16 nCount = ((SvLBoxEntry*)pSource)->ItemCount();
+ sal_uInt16 nCurPos = 0;
while( nCurPos < nCount )
{
SvLBoxItem* pItem = ((SvLBoxEntry*)pSource)->GetItem( nCurPos );
@@ -621,7 +621,7 @@ void SvLBoxEntry::Clone( SvListEntry* pSource )
nEntryFlags = ((SvLBoxEntry*)pSource)->nEntryFlags;
}
-void SvLBoxEntry::EnableChildsOnDemand( BOOL bEnable )
+void SvLBoxEntry::EnableChildsOnDemand( sal_Bool bEnable )
{
DBG_CHKTHIS(SvLBoxEntry,0);
if ( bEnable )
@@ -630,7 +630,7 @@ void SvLBoxEntry::EnableChildsOnDemand( BOOL bEnable )
nEntryFlags &= (~SV_ENTRYFLAG_CHILDS_ON_DEMAND);
}
-void SvLBoxEntry::ReplaceItem( SvLBoxItem* pNewItem, USHORT nPos )
+void SvLBoxEntry::ReplaceItem( SvLBoxItem* pNewItem, sal_uInt16 nPos )
{
DBG_CHKTHIS(SvLBoxEntry,0);
DBG_ASSERT(pNewItem,"ReplaceItem:No Item");
@@ -643,10 +643,10 @@ void SvLBoxEntry::ReplaceItem( SvLBoxItem* pNewItem, USHORT nPos )
}
}
-SvLBoxItem* SvLBoxEntry::GetFirstItem( USHORT nId )
+SvLBoxItem* SvLBoxEntry::GetFirstItem( sal_uInt16 nId )
{
- USHORT nCount = aItems.Count();
- USHORT nCur = 0;
+ sal_uInt16 nCount = aItems.Count();
+ sal_uInt16 nCur = 0;
SvLBoxItem* pItem;
while( nCur < nCount )
{
@@ -801,7 +801,7 @@ bool SvLBox::IsEntryMnemonicsEnabled() const
return pLBoxImpl->m_bEntryMnemonicsEnabled;
}
-USHORT SvLBox::IsA()
+sal_uInt16 SvLBox::IsA()
{
DBG_CHKTHIS(SvLBox,0);
return SVLISTBOX_ID_LBOX;
@@ -814,17 +814,17 @@ IMPL_LINK_INLINE_START( SvLBox, CloneHdl_Impl, SvListEntry*, pEntry )
}
IMPL_LINK_INLINE_END( SvLBox, CloneHdl_Impl, SvListEntry*, pEntry )
-ULONG SvLBox::Insert( SvLBoxEntry* pEntry, SvLBoxEntry* pParent, ULONG nPos )
+sal_uLong SvLBox::Insert( SvLBoxEntry* pEntry, SvLBoxEntry* pParent, sal_uLong nPos )
{
DBG_CHKTHIS(SvLBox,0);
- ULONG nInsPos = pModel->Insert( pEntry, pParent, nPos );
+ sal_uLong nInsPos = pModel->Insert( pEntry, pParent, nPos );
return nInsPos;
}
-ULONG SvLBox::Insert( SvLBoxEntry* pEntry,ULONG nRootPos )
+sal_uLong SvLBox::Insert( SvLBoxEntry* pEntry,sal_uLong nRootPos )
{
DBG_CHKTHIS(SvLBox,0);
- ULONG nInsPos = pModel->Insert( pEntry, nRootPos );
+ sal_uLong nInsPos = pModel->Insert( pEntry, nRootPos );
return nInsPos;
}
@@ -852,48 +852,48 @@ void SvLBox::DeselectHdl()
aDeselectHdl.Call( this );
}
-BOOL SvLBox::DoubleClickHdl()
+sal_Bool SvLBox::DoubleClickHdl()
{
DBG_CHKTHIS(SvLBox,0);
aDoubleClickHdl.Call( this );
- return TRUE;
+ return sal_True;
}
-BOOL SvLBox::CheckDragAndDropMode( SvLBox* pSource, sal_Int8 nAction )
+sal_Bool SvLBox::CheckDragAndDropMode( SvLBox* pSource, sal_Int8 nAction )
{
DBG_CHKTHIS(SvLBox,0);
if ( pSource == this )
{
if ( !(nDragDropMode & (SV_DRAGDROP_CTRL_MOVE | SV_DRAGDROP_CTRL_COPY) ) )
- return FALSE; // D&D innerhalb der Liste gesperrt
+ return sal_False; // D&D innerhalb der Liste gesperrt
if( DND_ACTION_MOVE == nAction )
{
if ( !(nDragDropMode & SV_DRAGDROP_CTRL_MOVE) )
- return FALSE; // kein lokales Move
+ return sal_False; // kein lokales Move
}
else
{
if ( !(nDragDropMode & SV_DRAGDROP_CTRL_COPY))
- return FALSE; // kein lokales Copy
+ return sal_False; // kein lokales Copy
}
}
else
{
if ( !(nDragDropMode & SV_DRAGDROP_APP_DROP ) )
- return FALSE; // kein Drop
+ return sal_False; // kein Drop
if ( DND_ACTION_MOVE == nAction )
{
if ( !(nDragDropMode & SV_DRAGDROP_APP_MOVE) )
- return FALSE; // kein globales Move
+ return sal_False; // kein globales Move
}
else
{
if ( !(nDragDropMode & SV_DRAGDROP_APP_COPY))
- return FALSE; // kein globales Copy
+ return sal_False; // kein globales Copy
}
}
- return TRUE;
+ return sal_True;
}
@@ -919,19 +919,19 @@ void SvLBox::NotifyRemoving( SvLBoxEntry* )
- Entry wird an das Ende der Target-Childlist gehaengt
*/
#ifdef DBG_UTIL
-BOOL SvLBox::NotifyMoving(
+sal_Bool SvLBox::NotifyMoving(
SvLBoxEntry* pTarget, // D&D-Drop-Position in this->GetModel()
SvLBoxEntry* pEntry, // Zu verschiebender Entry aus
// GetSourceListBox()->GetModel()
SvLBoxEntry*& rpNewParent, // Neuer Target-Parent
- ULONG& rNewChildPos) // Position in Childlist des Target-Parents
+ sal_uLong& rNewChildPos) // Position in Childlist des Target-Parents
#else
-BOOL SvLBox::NotifyMoving(
+sal_Bool SvLBox::NotifyMoving(
SvLBoxEntry* pTarget, // D&D-Drop-Position in this->GetModel()
SvLBoxEntry*, // Zu verschiebender Entry aus
// GetSourceListBox()->GetModel()
SvLBoxEntry*& rpNewParent, // Neuer Target-Parent
- ULONG& rNewChildPos) // Position in Childlist des Target-Parents
+ sal_uLong& rNewChildPos) // Position in Childlist des Target-Parents
#endif
{
DBG_CHKTHIS(SvLBox,0);
@@ -940,7 +940,7 @@ BOOL SvLBox::NotifyMoving(
{
rpNewParent = 0;
rNewChildPos = 0;
- return TRUE;
+ return sal_True;
}
if ( !pTarget->HasChilds() && !pTarget->HasChildsOnDemand() )
{
@@ -959,15 +959,15 @@ BOOL SvLBox::NotifyMoving(
else
rNewChildPos = LIST_APPEND;
}
- return TRUE;
+ return sal_True;
}
-BOOL SvLBox::NotifyCopying(
+sal_Bool SvLBox::NotifyCopying(
SvLBoxEntry* pTarget, // D&D-Drop-Position in this->GetModel()
SvLBoxEntry* pEntry, // Zu kopierender Entry aus
// GetSourceListBox()->GetModel()
SvLBoxEntry*& rpNewParent, // Neuer Target-Parent
- ULONG& rNewChildPos) // Position in Childlist des Target-Parents
+ sal_uLong& rNewChildPos) // Position in Childlist des Target-Parents
{
DBG_CHKTHIS(SvLBox,0);
return NotifyMoving(pTarget,pEntry,rpNewParent,rNewChildPos);
@@ -977,7 +977,7 @@ BOOL SvLBox::NotifyCopying(
{
rpNewParent = 0;
rNewChildPos = 0;
- return TRUE;
+ return sal_True;
}
if ( !pTarget->HasChilds() && !pTarget->HasChildsOnDemand() )
{
@@ -994,7 +994,7 @@ BOOL SvLBox::NotifyCopying(
else
rNewChildPos = LIST_APPEND;
}
- return TRUE;
+ return sal_True;
*/
}
@@ -1008,13 +1008,13 @@ SvLBoxEntry* SvLBox::CloneEntry( SvLBoxEntry* pSource )
// Rueckgabe: Alle Entries wurden kopiert
-BOOL SvLBox::CopySelection( SvLBox* pSource, SvLBoxEntry* pTarget )
+sal_Bool SvLBox::CopySelection( SvLBox* pSource, SvLBoxEntry* pTarget )
{
DBG_CHKTHIS(SvLBox,0);
nCurEntrySelPos = 0; // Selektionszaehler fuer NotifyMoving/Copying
- BOOL bSuccess = TRUE;
+ sal_Bool bSuccess = sal_True;
SvTreeEntryList aList;
- BOOL bClone = (BOOL)( (ULONG)(pSource->GetModel()) != (ULONG)GetModel() );
+ sal_Bool bClone = (sal_Bool)( (sal_uLong)(pSource->GetModel()) != (sal_uLong)GetModel() );
Link aCloneLink( pModel->GetCloneLink() );
pModel->SetCloneLink( LINK(this, SvLBox, CloneHdl_Impl ));
@@ -1025,7 +1025,7 @@ BOOL SvLBox::CopySelection( SvLBox* pSource, SvLBoxEntry* pTarget )
while ( pSourceEntry )
{
// Childs werden automatisch mitkopiert
- pSource->SelectChilds( pSourceEntry, FALSE );
+ pSource->SelectChilds( pSourceEntry, sal_False );
aList.Insert( pSourceEntry, LIST_APPEND );
pSourceEntry = pSource->NextSelected( pSourceEntry );
}
@@ -1034,13 +1034,13 @@ BOOL SvLBox::CopySelection( SvLBox* pSource, SvLBoxEntry* pTarget )
while ( pSourceEntry )
{
SvLBoxEntry* pNewParent = 0;
- ULONG nInsertionPos = LIST_APPEND;
- BOOL bOk=NotifyCopying(pTarget,pSourceEntry,pNewParent,nInsertionPos);
+ sal_uLong nInsertionPos = LIST_APPEND;
+ sal_Bool bOk=NotifyCopying(pTarget,pSourceEntry,pNewParent,nInsertionPos);
if ( bOk )
{
if ( bClone )
{
- ULONG nCloneCount = 0;
+ sal_uLong nCloneCount = 0;
pSourceEntry = (SvLBoxEntry*)
pModel->Clone( (SvListEntry*)pSourceEntry, nCloneCount );
pModel->InsertTree( (SvListEntry*)pSourceEntry,
@@ -1048,15 +1048,15 @@ BOOL SvLBox::CopySelection( SvLBox* pSource, SvLBoxEntry* pTarget )
}
else
{
- ULONG nListPos = pModel->Copy( (SvListEntry*)pSourceEntry,
+ sal_uLong nListPos = pModel->Copy( (SvListEntry*)pSourceEntry,
(SvListEntry*)pNewParent, nInsertionPos );
pSourceEntry = GetEntry( pNewParent, nListPos );
}
}
else
- bSuccess = FALSE;
+ bSuccess = sal_False;
- if( bOk == (BOOL)2 ) // !!!HACK verschobenen Entry sichtbar machen?
+ if( bOk == (sal_Bool)2 ) // !!!HACK verschobenen Entry sichtbar machen?
MakeVisible( pSourceEntry );
pSourceEntry = (SvLBoxEntry*)aList.Next();
@@ -1066,18 +1066,18 @@ BOOL SvLBox::CopySelection( SvLBox* pSource, SvLBoxEntry* pTarget )
}
// Rueckgabe: Alle Entries wurden verschoben
-BOOL SvLBox::MoveSelection( SvLBox* pSource, SvLBoxEntry* pTarget )
+sal_Bool SvLBox::MoveSelection( SvLBox* pSource, SvLBoxEntry* pTarget )
{
return MoveSelectionCopyFallbackPossible( pSource, pTarget, sal_False );
}
-BOOL SvLBox::MoveSelectionCopyFallbackPossible( SvLBox* pSource, SvLBoxEntry* pTarget, sal_Bool bAllowCopyFallback )
+sal_Bool SvLBox::MoveSelectionCopyFallbackPossible( SvLBox* pSource, SvLBoxEntry* pTarget, sal_Bool bAllowCopyFallback )
{
DBG_CHKTHIS(SvLBox,0);
nCurEntrySelPos = 0; // Selektionszaehler fuer NotifyMoving/Copying
- BOOL bSuccess = TRUE;
+ sal_Bool bSuccess = sal_True;
SvTreeEntryList aList;
- BOOL bClone = (BOOL)( (ULONG)(pSource->GetModel()) != (ULONG)GetModel() );
+ sal_Bool bClone = (sal_Bool)( (sal_uLong)(pSource->GetModel()) != (sal_uLong)GetModel() );
Link aCloneLink( pModel->GetCloneLink() );
if ( bClone )
pModel->SetCloneLink( LINK(this, SvLBox, CloneHdl_Impl ));
@@ -1086,7 +1086,7 @@ BOOL SvLBox::MoveSelectionCopyFallbackPossible( SvLBox* pSource, SvLBoxEntry* pT
while ( pSourceEntry )
{
// Childs werden automatisch mitbewegt
- pSource->SelectChilds( pSourceEntry, FALSE );
+ pSource->SelectChilds( pSourceEntry, sal_False );
aList.Insert( pSourceEntry, LIST_APPEND );
pSourceEntry = pSource->NextSelected( pSourceEntry );
}
@@ -1095,7 +1095,7 @@ BOOL SvLBox::MoveSelectionCopyFallbackPossible( SvLBox* pSource, SvLBoxEntry* pT
while ( pSourceEntry )
{
SvLBoxEntry* pNewParent = 0;
- ULONG nInsertionPos = LIST_APPEND;
+ sal_uLong nInsertionPos = LIST_APPEND;
sal_Bool bOk = NotifyMoving(pTarget,pSourceEntry,pNewParent,nInsertionPos);
sal_Bool bCopyOk = bOk;
if ( !bOk && bAllowCopyFallback )
@@ -1108,7 +1108,7 @@ BOOL SvLBox::MoveSelectionCopyFallbackPossible( SvLBox* pSource, SvLBoxEntry* pT
{
if ( bClone )
{
- ULONG nCloneCount = 0;
+ sal_uLong nCloneCount = 0;
pSourceEntry = (SvLBoxEntry*)
pModel->Clone( (SvListEntry*)pSourceEntry, nCloneCount );
pModel->InsertTree( (SvListEntry*)pSourceEntry,
@@ -1125,9 +1125,9 @@ BOOL SvLBox::MoveSelectionCopyFallbackPossible( SvLBox* pSource, SvLBoxEntry* pT
}
}
else
- bSuccess = FALSE;
+ bSuccess = sal_False;
- if( bOk == (BOOL)2 ) // !!!HACK verschobenen Entry sichtbar machen?
+ if( bOk == (sal_Bool)2 ) // !!!HACK verschobenen Entry sichtbar machen?
MakeVisible( pSourceEntry );
pSourceEntry = (SvLBoxEntry*)aList.Next();
@@ -1148,7 +1148,7 @@ void SvLBox::RemoveSelection()
aList.Insert( pEntry );
if ( pEntry->HasChilds() )
// Remove loescht Childs automatisch
- SelectChilds( pEntry, FALSE );
+ SelectChilds( pEntry, sal_False );
pEntry = NextSelected( pEntry );
}
pEntry = (SvLBoxEntry*)aList.First();
@@ -1181,8 +1181,8 @@ void SvLBox::RecalcViewData()
SvLBoxEntry* pEntry = First();
while( pEntry )
{
- USHORT nCount = pEntry->ItemCount();
- USHORT nCurPos = 0;
+ sal_uInt16 nCount = pEntry->ItemCount();
+ sal_uInt16 nCurPos = 0;
while ( nCurPos < nCount )
{
SvLBoxItem* pItem = pEntry->GetItem( nCurPos );
@@ -1206,7 +1206,7 @@ void SvLBox::StateChanged( StateChangedType eType )
Control::StateChanged( eType );
}
-void SvLBox::ImplShowTargetEmphasis( SvLBoxEntry* pEntry, BOOL bShow)
+void SvLBox::ImplShowTargetEmphasis( SvLBoxEntry* pEntry, sal_Bool bShow)
{
DBG_CHKTHIS(SvLBox,0);
if ( bShow && (nImpFlags & SVLBOX_TARGEMPH_VIS) )
@@ -1220,31 +1220,31 @@ void SvLBox::ImplShowTargetEmphasis( SvLBoxEntry* pEntry, BOOL bShow)
nImpFlags &= ~SVLBOX_TARGEMPH_VIS;
}
-void SvLBox::ShowTargetEmphasis( SvLBoxEntry*, BOOL /* bShow */ )
+void SvLBox::ShowTargetEmphasis( SvLBoxEntry*, sal_Bool /* bShow */ )
{
DBG_CHKTHIS(SvLBox,0);
}
-BOOL SvLBox::Expand( SvLBoxEntry* )
+sal_Bool SvLBox::Expand( SvLBoxEntry* )
{
DBG_CHKTHIS(SvLBox,0);
- return TRUE;
+ return sal_True;
}
-BOOL SvLBox::Collapse( SvLBoxEntry* )
+sal_Bool SvLBox::Collapse( SvLBoxEntry* )
{
DBG_CHKTHIS(SvLBox,0);
- return TRUE;
+ return sal_True;
}
-BOOL SvLBox::Select( SvLBoxEntry*, BOOL )
+sal_Bool SvLBox::Select( SvLBoxEntry*, sal_Bool )
{
DBG_CHKTHIS(SvLBox,0);
- return FALSE;
+ return sal_False;
}
-ULONG SvLBox::SelectChilds( SvLBoxEntry* , BOOL )
+sal_uLong SvLBox::SelectChilds( SvLBoxEntry* , sal_Bool )
{
DBG_CHKTHIS(SvLBox,0);
return 0;
@@ -1256,7 +1256,7 @@ void SvLBox::OnCurrentEntryChanged()
pLBoxImpl->m_aQuickSelectionEngine.Reset();
}
-void SvLBox::SelectAll( BOOL /* bSelect */ , BOOL /* bPaint */ )
+void SvLBox::SelectAll( sal_Bool /* bSelect */ , sal_Bool /* bPaint */ )
{
DBG_CHKTHIS(SvLBox,0);
}
@@ -1285,9 +1285,9 @@ void SvLBox::FillEntryPath( SvLBoxEntry* pEntry, ::std::deque< sal_Int32 >& _rPa
if ( pEntry )
{
SvLBoxEntry* pParentEntry = GetParent( pEntry );
- while ( TRUE )
+ while ( sal_True )
{
- ULONG i, nCount = GetLevelChildCount( pParentEntry );
+ sal_uLong i, nCount = GetLevelChildCount( pParentEntry );
for ( i = 0; i < nCount; ++i )
{
SvLBoxEntry* pTemp = GetEntry( pParentEntry, i );
@@ -1317,11 +1317,11 @@ String SvLBox::GetEntryText( SvLBoxEntry* ) const
return String();
}
-ULONG SvLBox::GetLevelChildCount( SvLBoxEntry* _pParent ) const
+sal_uLong SvLBox::GetLevelChildCount( SvLBoxEntry* _pParent ) const
{
DBG_CHKTHIS(SvLBox,0);
- ULONG nCount = 0;
+ sal_uLong nCount = 0;
SvLBoxEntry* pEntry = FirstChild( _pParent );
while ( pEntry )
{
@@ -1360,8 +1360,8 @@ void SvLBox::InitViewData( SvViewData* pData, SvListEntry* pEntry )
pEntryData->pItemData = new SvViewDataItem[ pInhEntry->ItemCount() ];
SvViewDataItem* pItemData = pEntryData->pItemData;
pEntryData->nItmCnt = pInhEntry->ItemCount(); // Anzahl Items fuer delete
- USHORT nCount = pInhEntry->ItemCount();
- USHORT nCurPos = 0;
+ sal_uInt16 nCount = pInhEntry->ItemCount();
+ sal_uInt16 nCurPos = 0;
while( nCurPos < nCount )
{
SvLBoxItem* pItem = pInhEntry->GetItem( nCurPos );
@@ -1373,10 +1373,10 @@ void SvLBox::InitViewData( SvViewData* pData, SvListEntry* pEntry )
-void SvLBox::EnableSelectionAsDropTarget( BOOL bEnable, BOOL bWithChilds )
+void SvLBox::EnableSelectionAsDropTarget( sal_Bool bEnable, sal_Bool bWithChilds )
{
DBG_CHKTHIS(SvLBox,0);
- USHORT nRefDepth;
+ sal_uInt16 nRefDepth;
SvLBoxEntry* pTemp;
SvLBoxEntry* pSelEntry = FirstSelected();
@@ -1427,11 +1427,11 @@ SvLBoxEntry* SvLBox::GetDropTarget( const Point& )
void SvLBox::EditText( const String& rStr, const Rectangle& rRect,
const Selection& rSel )
{
- EditText( rStr, rRect, rSel, FALSE );
+ EditText( rStr, rRect, rSel, sal_False );
}
void SvLBox::EditText( const String& rStr, const Rectangle& rRect,
- const Selection& rSel, BOOL bMulti )
+ const Selection& rSel, sal_Bool bMulti )
{
DBG_CHKTHIS(SvLBox,0);
if( pEdCtrl )
@@ -1473,11 +1473,11 @@ void SvLBox::CancelTextEditing()
{
DBG_CHKTHIS(SvLBox,0);
if ( pEdCtrl )
- pEdCtrl->StopEditing( TRUE );
+ pEdCtrl->StopEditing( sal_True );
nImpFlags &= (~SVLBOX_IN_EDT);
}
-void SvLBox::EndEditing( BOOL bCancel )
+void SvLBox::EndEditing( sal_Bool bCancel )
{
DBG_CHKTHIS(SvLBox,0);
if( pEdCtrl )
@@ -1591,7 +1591,7 @@ void SvLBox::SelectSearchEntry( const void* _pEntry )
if ( !pEntry )
return;
- SelectAll( FALSE );
+ SelectAll( sal_False );
SetCurEntry( pEntry );
Select( pEntry );
}
@@ -1642,7 +1642,7 @@ bool SvLBox::HandleKeyInput( const KeyEvent& _rKEvt )
return false;
}
-SvLBoxEntry* SvLBox::GetEntry( const Point&, BOOL ) const
+SvLBoxEntry* SvLBox::GetEntry( const Point&, sal_Bool ) const
{
DBG_CHKTHIS(SvLBox,0);
return 0;
@@ -1651,15 +1651,15 @@ SvLBoxEntry* SvLBox::GetEntry( const Point&, BOOL ) const
void SvLBox::ModelHasEntryInvalidated( SvListEntry* pEntry )
{
DBG_CHKTHIS(SvLBox,0);
- USHORT nCount = ((SvLBoxEntry*)pEntry)->ItemCount();
- for( USHORT nIdx = 0; nIdx < nCount; nIdx++ )
+ sal_uInt16 nCount = ((SvLBoxEntry*)pEntry)->ItemCount();
+ for( sal_uInt16 nIdx = 0; nIdx < nCount; nIdx++ )
{
SvLBoxItem* pItem = ((SvLBoxEntry*)pEntry)->GetItem( nIdx );
pItem->InitViewData( this, (SvLBoxEntry*)pEntry, 0 );
}
}
-void SvLBox::SetInUseEmphasis( SvLBoxEntry* pEntry, BOOL bInUse )
+void SvLBox::SetInUseEmphasis( SvLBoxEntry* pEntry, sal_Bool bInUse )
{
DBG_CHKTHIS(SvLBox,0);
DBG_ASSERT(pEntry,"SetInUseEmphasis:No Entry");
@@ -1681,7 +1681,7 @@ void SvLBox::SetInUseEmphasis( SvLBoxEntry* pEntry, BOOL bInUse )
}
}
-void SvLBox::SetCursorEmphasis( SvLBoxEntry* pEntry, BOOL bCursored )
+void SvLBox::SetCursorEmphasis( SvLBoxEntry* pEntry, sal_Bool bCursored )
{
DBG_CHKTHIS(SvLBox,0);
DBG_ASSERT(pEntry,"SetInUseEmphasis:No Entry");
@@ -1696,7 +1696,7 @@ void SvLBox::SetCursorEmphasis( SvLBoxEntry* pEntry, BOOL bCursored )
}
}
-BOOL SvLBox::HasCursorEmphasis( SvLBoxEntry* pEntry ) const
+sal_Bool SvLBox::HasCursorEmphasis( SvLBoxEntry* pEntry ) const
{
DBG_CHKTHIS(SvLBox,0);
DBG_ASSERT(pEntry,"SetInUseEmphasis:No Entry");
@@ -1715,11 +1715,11 @@ void SvLBox::ReadDragServerInfo(const Point&, SvLBoxDDInfo* )
DBG_CHKTHIS(SvLBox,0);
}
-BOOL SvLBox::EditingCanceled() const
+sal_Bool SvLBox::EditingCanceled() const
{
if( pEdCtrl && pEdCtrl->EditingCanceled() )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
@@ -1731,7 +1731,7 @@ sal_Int8 SvLBox::AcceptDrop( const AcceptDropEvent& rEvt )
if( rEvt.mbLeaving || !CheckDragAndDropMode( pDDSource, rEvt.mnAction ) )
{
- ImplShowTargetEmphasis( pTargetEntry, FALSE );
+ ImplShowTargetEmphasis( pTargetEntry, sal_False );
}
else if( !nDragDropMode )
{
@@ -1758,12 +1758,12 @@ sal_Int8 SvLBox::AcceptDrop( const AcceptDropEvent& rEvt )
// **** Emphasis zeichnen ****
if( DND_ACTION_NONE == nRet )
- ImplShowTargetEmphasis( pTargetEntry, FALSE );
+ ImplShowTargetEmphasis( pTargetEntry, sal_False );
else if( pEntry != pTargetEntry || !(nImpFlags & SVLBOX_TARGEMPH_VIS) )
{
- ImplShowTargetEmphasis( pTargetEntry, FALSE );
+ ImplShowTargetEmphasis( pTargetEntry, sal_False );
pTargetEntry = pEntry;
- ImplShowTargetEmphasis( pTargetEntry, TRUE );
+ ImplShowTargetEmphasis( pTargetEntry, sal_True );
}
}
return nRet;
@@ -1775,9 +1775,9 @@ sal_Int8 SvLBox::ExecuteDrop( const ExecuteDropEvent& rEvt, SvLBox* pSourceView
sal_Int8 nRet = DND_ACTION_NONE;
DBG_ASSERT( pSourceView, "SvLBox::ExecuteDrop(): no source view" );
- pSourceView->EnableSelectionAsDropTarget( TRUE, TRUE );
+ pSourceView->EnableSelectionAsDropTarget( sal_True, sal_True );
- ImplShowTargetEmphasis( pTargetEntry, FALSE );
+ ImplShowTargetEmphasis( pTargetEntry, sal_False );
pDDTarget = this;
SvLBoxDDInfo aDDInfo;
@@ -1873,8 +1873,8 @@ void SvLBox::StartDrag( sal_Int8, const Point& rPosPixel )
pDDSource = this;
pDDTarget = 0;
- BOOL bOldUpdateMode = Control::IsUpdateMode();
- Control::SetUpdateMode( TRUE );
+ sal_Bool bOldUpdateMode = Control::IsUpdateMode();
+ Control::SetUpdateMode( sal_True );
Update();
Control::SetUpdateMode( bOldUpdateMode );
@@ -1882,8 +1882,8 @@ void SvLBox::StartDrag( sal_Int8, const Point& rPosPixel )
// Wichtig: Wenn im DropHandler die Selektion der
// SourceListBox veraendert wird, muessen vorher die Eintraege
// als DropTargets wieder freigeschaltet werden:
- // (GetSourceListBox()->EnableSelectionAsDropTarget( TRUE, TRUE );)
- EnableSelectionAsDropTarget( FALSE, TRUE /* with Childs */ );
+ // (GetSourceListBox()->EnableSelectionAsDropTarget( sal_True, sal_True );)
+ EnableSelectionAsDropTarget( sal_False, sal_True /* with Childs */ );
pContainer->StartDrag( this, nDragOptions, GetDragFinishedHdl() );
}
@@ -1894,18 +1894,18 @@ nAction
#endif
)
{
- EnableSelectionAsDropTarget( TRUE, TRUE );
+ EnableSelectionAsDropTarget( sal_True, sal_True );
#ifndef UNX
if( (nAction == DND_ACTION_MOVE) && ( (pDDTarget &&
- ((ULONG)(pDDTarget->GetModel())!=(ULONG)(this->GetModel()))) ||
+ ((sal_uLong)(pDDTarget->GetModel())!=(sal_uLong)(this->GetModel()))) ||
!pDDTarget ))
{
RemoveSelection();
}
#endif
- ImplShowTargetEmphasis( pTargetEntry, FALSE );
+ ImplShowTargetEmphasis( pTargetEntry, sal_False );
pDDSource = 0;
pDDTarget = 0;
pTargetEntry = 0;
@@ -1918,10 +1918,10 @@ DragDropMode SvLBox::NotifyStartDrag( TransferDataContainer&, SvLBoxEntry* )
return (DragDropMode)0xffff;
}
-BOOL SvLBox::NotifyAcceptDrop( SvLBoxEntry* )
+sal_Bool SvLBox::NotifyAcceptDrop( SvLBoxEntry* )
{
DBG_CHKTHIS(SvLBox,0);
- return TRUE;
+ return sal_True;
}
// handler and methods for Drag - finished handler.
@@ -1938,20 +1938,20 @@ namespace
void SvLBox::AddBoxToDDList_Impl( const SvLBox& rB )
{
- ULONG nVal = (ULONG)&rB;
+ sal_uLong nVal = (sal_uLong)&rB;
SortLBoxes::get().Insert( nVal );
}
void SvLBox::RemoveBoxFromDDList_Impl( const SvLBox& rB )
{
- ULONG nVal = (ULONG)&rB;
+ sal_uLong nVal = (sal_uLong)&rB;
SortLBoxes::get().Remove( nVal );
}
IMPL_STATIC_LINK( SvLBox, DragFinishHdl_Impl, sal_Int8*, pAction )
{
- ULONG nVal = (ULONG)pThis;
- USHORT nFnd;
+ sal_uLong nVal = (sal_uLong)pThis;
+ sal_uInt16 nFnd;
SvULongsSort &rSortLBoxes = SortLBoxes::get();
if( rSortLBoxes.Seek_Entry( nVal, &nFnd ) )
{
diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx
index 53fbded59f11..ed48f9fc6352 100644
--- a/svtools/source/contnr/svtabbx.cxx
+++ b/svtools/source/contnr/svtabbx.cxx
@@ -75,7 +75,7 @@ void SvTabListBox::SetTabs()
*/
// alle anderen Tabs an Liste haengen
- for( USHORT nCurTab = 1; nCurTab < nTabCount; nCurTab++ )
+ for( sal_uInt16 nCurTab = 1; nCurTab < nTabCount; nCurTab++ )
{
SvLBoxTab* pTab = pTabList+nCurTab;
AddTab( pTab->GetPos(), pTab->nFlags );
@@ -90,10 +90,10 @@ void SvTabListBox::InitEntry( SvLBoxEntry* pEntry, const XubString& rStr,
XubString aToken;
const xub_Unicode* pCurToken = aCurEntry.GetBuffer();
- USHORT nCurTokenLen;
+ sal_uInt16 nCurTokenLen;
const xub_Unicode* pNextToken = GetToken( pCurToken, nCurTokenLen );
- USHORT nCount = nTabCount; nCount--;
- for( USHORT nToken = 0; nToken < nCount; nToken++ )
+ sal_uInt16 nCount = nTabCount; nCount--;
+ for( sal_uInt16 nToken = 0; nToken < nCount; nToken++ )
{
if( pCurToken && nCurTokenLen )
// aToken.Assign( pCurToken, nCurTokenLen );
@@ -147,7 +147,7 @@ void SvTabListBox::SetTabs( long* pTabs, MapUnit eMapUnit )
return;
delete [] pTabList;
- USHORT nCount = (USHORT)(*pTabs);
+ sal_uInt16 nCount = (sal_uInt16)(*pTabs);
pTabList = new SvLBoxTab[ nCount ];
nTabCount = nCount;
@@ -155,7 +155,7 @@ void SvTabListBox::SetTabs( long* pTabs, MapUnit eMapUnit )
MapMode aMMDest( MAP_PIXEL );
pTabs++;
- for( USHORT nIdx = 0; nIdx < nCount; nIdx++, pTabs++ )
+ for( sal_uInt16 nIdx = 0; nIdx < nCount; nIdx++, pTabs++ )
{
Size aSize( *pTabs, 0 );
aSize = LogicToLogic( aSize, &aMMSource, &aMMDest );
@@ -168,7 +168,7 @@ void SvTabListBox::SetTabs( long* pTabs, MapUnit eMapUnit )
Invalidate();
}
-void SvTabListBox::SetTab( USHORT nTab,long nValue,MapUnit eMapUnit )
+void SvTabListBox::SetTab( sal_uInt16 nTab,long nValue,MapUnit eMapUnit )
{
DBG_ASSERT(nTab<nTabCount,"Invalid Tab-Pos");
if( nTab < nTabCount )
@@ -187,8 +187,8 @@ void SvTabListBox::SetTab( USHORT nTab,long nValue,MapUnit eMapUnit )
}
SvLBoxEntry* SvTabListBox::InsertEntry( const XubString& rText, SvLBoxEntry* pParent,
- BOOL /*bChildsOnDemand*/,
- ULONG nPos, void* pUserData,
+ sal_Bool /*bChildsOnDemand*/,
+ sal_uLong nPos, void* pUserData,
SvLBoxButtonKind )
{
return InsertEntryToColumn( rText, pParent, nPos, 0xffff, pUserData );
@@ -198,15 +198,15 @@ SvLBoxEntry* SvTabListBox::InsertEntry( const XubString& rText,
const Image& rExpandedEntryBmp,
const Image& rCollapsedEntryBmp,
SvLBoxEntry* pParent,
- BOOL /*bChildsOnDemand*/,
- ULONG nPos, void* pUserData,
+ sal_Bool /*bChildsOnDemand*/,
+ sal_uLong nPos, void* pUserData,
SvLBoxButtonKind )
{
return InsertEntryToColumn( rText, rExpandedEntryBmp, rCollapsedEntryBmp,
pParent, nPos, 0xffff, pUserData );
}
-SvLBoxEntry* SvTabListBox::InsertEntryToColumn(const XubString& rStr,SvLBoxEntry* pParent,ULONG nPos,USHORT nCol,
+SvLBoxEntry* SvTabListBox::InsertEntryToColumn(const XubString& rStr,SvLBoxEntry* pParent,sal_uLong nPos,sal_uInt16 nCol,
void* pUser )
{
XubString aStr;
@@ -220,7 +220,7 @@ SvLBoxEntry* SvTabListBox::InsertEntryToColumn(const XubString& rStr,SvLBoxEntry
}
aStr += rStr;
XubString aFirstStr( aStr );
- USHORT nEnd = aFirstStr.Search( '\t' );
+ sal_uInt16 nEnd = aFirstStr.Search( '\t' );
if( nEnd != STRING_NOTFOUND )
{
aFirstStr.Erase( nEnd );
@@ -229,12 +229,12 @@ SvLBoxEntry* SvTabListBox::InsertEntryToColumn(const XubString& rStr,SvLBoxEntry
}
else
aCurEntry.Erase();
- return SvTreeListBox::InsertEntry( aFirstStr, pParent, FALSE, nPos, pUser );
+ return SvTreeListBox::InsertEntry( aFirstStr, pParent, sal_False, nPos, pUser );
}
SvLBoxEntry* SvTabListBox::InsertEntryToColumn( const XubString& rStr,
const Image& rExpandedEntryBmp, const Image& rCollapsedEntryBmp,
- SvLBoxEntry* pParent,ULONG nPos,USHORT nCol, void* pUser )
+ SvLBoxEntry* pParent,sal_uLong nPos,sal_uInt16 nCol, void* pUser )
{
XubString aStr;
if( nCol != 0xffff )
@@ -247,7 +247,7 @@ SvLBoxEntry* SvTabListBox::InsertEntryToColumn( const XubString& rStr,
}
aStr += rStr;
XubString aFirstStr( aStr );
- USHORT nEnd = aFirstStr.Search( '\t' );
+ sal_uInt16 nEnd = aFirstStr.Search( '\t' );
if( nEnd != STRING_NOTFOUND )
{
aFirstStr.Erase( nEnd );
@@ -260,11 +260,11 @@ SvLBoxEntry* SvTabListBox::InsertEntryToColumn( const XubString& rStr,
return SvTreeListBox::InsertEntry(
aFirstStr,
rExpandedEntryBmp, rCollapsedEntryBmp,
- pParent, FALSE, nPos, pUser );
+ pParent, sal_False, nPos, pUser );
}
-SvLBoxEntry* SvTabListBox::InsertEntryToColumn( const XubString& rStr, ULONG nPos,
- USHORT nCol, void* pUser )
+SvLBoxEntry* SvTabListBox::InsertEntryToColumn( const XubString& rStr, sal_uLong nPos,
+ sal_uInt16 nCol, void* pUser )
{
return InsertEntryToColumn( rStr,0,nPos, nCol, pUser );
}
@@ -274,14 +274,14 @@ String SvTabListBox::GetEntryText( SvLBoxEntry* pEntry ) const
return GetEntryText( pEntry, 0xffff );
}
-String SvTabListBox::GetEntryText( SvLBoxEntry* pEntry, USHORT nCol ) const
+String SvTabListBox::GetEntryText( SvLBoxEntry* pEntry, sal_uInt16 nCol ) const
{
DBG_ASSERT(pEntry,"GetEntryText:Invalid Entry");
XubString aResult;
if( pEntry )
{
- USHORT nCount = pEntry->ItemCount();
- USHORT nCur = 0;
+ sal_uInt16 nCount = pEntry->ItemCount();
+ sal_uInt16 nCur = 0;
while( nCur < nCount )
{
SvLBoxItem* pStr = pEntry->GetItem( nCur );
@@ -306,19 +306,19 @@ String SvTabListBox::GetEntryText( SvLBoxEntry* pEntry, USHORT nCol ) const
return aResult;
}
-String SvTabListBox::GetEntryText( ULONG nPos, USHORT nCol ) const
+String SvTabListBox::GetEntryText( sal_uLong nPos, sal_uInt16 nCol ) const
{
SvLBoxEntry* pEntry = GetEntryOnPos( nPos );
return GetEntryText( pEntry, nCol );
}
-void SvTabListBox::SetEntryText( const XubString& rStr, ULONG nPos, USHORT nCol )
+void SvTabListBox::SetEntryText( const XubString& rStr, sal_uLong nPos, sal_uInt16 nCol )
{
SvLBoxEntry* pEntry = SvTreeListBox::GetEntry( nPos );
SetEntryText( rStr, pEntry, nCol );
}
-void SvTabListBox::SetEntryText( const XubString& rStr, SvLBoxEntry* pEntry, USHORT nCol )
+void SvTabListBox::SetEntryText( const XubString& rStr, SvLBoxEntry* pEntry, sal_uInt16 nCol )
{
DBG_ASSERT(pEntry,"SetEntryText:Invalid Entry");
if( !pEntry )
@@ -328,14 +328,14 @@ void SvTabListBox::SetEntryText( const XubString& rStr, SvLBoxEntry* pEntry, USH
if ( sOldText == rStr )
return;
- USHORT nTextColumn = nCol;
+ sal_uInt16 nTextColumn = nCol;
const xub_Unicode* pCurToken = rStr.GetBuffer();
- USHORT nCurTokenLen;
+ sal_uInt16 nCurTokenLen;
const xub_Unicode* pNextToken = GetToken( pCurToken, nCurTokenLen );
XubString aTemp;
- USHORT nCount = pEntry->ItemCount();
- USHORT nCur = 0;
+ sal_uInt16 nCount = pEntry->ItemCount();
+ sal_uInt16 nCur = 0;
while( nCur < nCount )
{
SvLBoxItem* pStr = pEntry->GetItem( nCur );
@@ -375,7 +375,7 @@ void SvTabListBox::SetEntryText( const XubString& rStr, SvLBoxEntry* pEntry, USH
delete pData;
}
-String SvTabListBox::GetCellText( ULONG nPos, USHORT nCol ) const
+String SvTabListBox::GetCellText( sal_uLong nPos, sal_uInt16 nCol ) const
{
SvLBoxEntry* pEntry = GetEntryOnPos( nPos );
DBG_ASSERT( pEntry, "SvTabListBox::GetCellText(): Invalid Entry" );
@@ -389,9 +389,9 @@ String SvTabListBox::GetCellText( ULONG nPos, USHORT nCol ) const
return aResult;
}
-ULONG SvTabListBox::GetEntryPos( const XubString& rStr, USHORT nCol )
+sal_uLong SvTabListBox::GetEntryPos( const XubString& rStr, sal_uInt16 nCol )
{
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
SvLBoxEntry* pEntry = First();
while( pEntry )
{
@@ -404,9 +404,9 @@ ULONG SvTabListBox::GetEntryPos( const XubString& rStr, USHORT nCol )
return 0xffffffff;
}
-ULONG SvTabListBox::GetEntryPos( const SvLBoxEntry* pEntry ) const
+sal_uLong SvTabListBox::GetEntryPos( const SvLBoxEntry* pEntry ) const
{
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
SvLBoxEntry* pTmpEntry = First();
while( pTmpEntry )
{
@@ -424,7 +424,7 @@ void __EXPORT SvTabListBox::Resize()
}
// static
-const xub_Unicode* SvTabListBox::GetToken( const xub_Unicode* pPtr, USHORT& rLen )
+const xub_Unicode* SvTabListBox::GetToken( const xub_Unicode* pPtr, sal_uInt16& rLen )
{
if( !pPtr || *pPtr == 0 )
{
@@ -432,7 +432,7 @@ const xub_Unicode* SvTabListBox::GetToken( const xub_Unicode* pPtr, USHORT& rLen
return 0;
}
xub_Unicode c = *pPtr;
- USHORT nLen = 0;
+ sal_uInt16 nLen = 0;
while( c != '\t' && c != 0 )
{
pPtr++;
@@ -447,15 +447,15 @@ const xub_Unicode* SvTabListBox::GetToken( const xub_Unicode* pPtr, USHORT& rLen
return pPtr;
}
-String SvTabListBox::GetTabEntryText( ULONG nPos, USHORT nCol ) const
+String SvTabListBox::GetTabEntryText( sal_uLong nPos, sal_uInt16 nCol ) const
{
SvLBoxEntry* pEntry = SvTreeListBox::GetEntry( nPos );
DBG_ASSERT( pEntry, "GetTabEntryText(): Invalid entry " );
XubString aResult;
if ( pEntry )
{
- USHORT nCount = pEntry->ItemCount();
- USHORT nCur = ( 0 == nCol && IsCellFocusEnabled() ) ? GetCurrentTabPos() : 0;
+ sal_uInt16 nCount = pEntry->ItemCount();
+ sal_uInt16 nCur = ( 0 == nCol && IsCellFocusEnabled() ) ? GetCurrentTabPos() : 0;
while( nCur < nCount )
{
SvLBoxItem* pStr = pEntry->GetItem( nCur );
@@ -485,10 +485,10 @@ String SvTabListBox::GetTabEntryText( ULONG nPos, USHORT nCol ) const
return aResult;
}
-SvLBoxEntry* SvTabListBox::GetEntryOnPos( ULONG _nEntryPos ) const
+SvLBoxEntry* SvTabListBox::GetEntryOnPos( sal_uLong _nEntryPos ) const
{
SvLBoxEntry* pEntry = NULL;
- ULONG i, nPos = 0, nCount = GetLevelChildCount( NULL );
+ sal_uLong i, nPos = 0, nCount = GetLevelChildCount( NULL );
for ( i = 0; i < nCount; ++i )
{
SvLBoxEntry* pParent = GetEntry(i);
@@ -509,9 +509,9 @@ SvLBoxEntry* SvTabListBox::GetEntryOnPos( ULONG _nEntryPos ) const
return pEntry;
}
-SvLBoxEntry* SvTabListBox::GetChildOnPos( SvLBoxEntry* _pParent, ULONG _nEntryPos, ULONG& _rPos ) const
+SvLBoxEntry* SvTabListBox::GetChildOnPos( SvLBoxEntry* _pParent, sal_uLong _nEntryPos, sal_uLong& _rPos ) const
{
- ULONG i, nCount = GetLevelChildCount( _pParent );
+ sal_uLong i, nCount = GetLevelChildCount( _pParent );
for ( i = 0; i < nCount; ++i )
{
SvLBoxEntry* pParent = GetEntry( _pParent, i );
@@ -529,33 +529,33 @@ SvLBoxEntry* SvTabListBox::GetChildOnPos( SvLBoxEntry* _pParent, ULONG _nEntryPo
return NULL;
}
-void SvTabListBox::SetTabJustify( USHORT nTab, SvTabJustify eJustify)
+void SvTabListBox::SetTabJustify( sal_uInt16 nTab, SvTabJustify eJustify)
{
if( nTab >= nTabCount )
return;
SvLBoxTab* pTab = &(pTabList[ nTab ]);
- USHORT nFlags = pTab->nFlags;
+ sal_uInt16 nFlags = pTab->nFlags;
nFlags &= (~MYTABMASK);
- nFlags |= (USHORT)eJustify;
+ nFlags |= (sal_uInt16)eJustify;
pTab->nFlags = nFlags;
SvTreeListBox::nTreeFlags |= TREEFLAG_RECALCTABS;
if( IsUpdateMode() )
Invalidate();
}
-SvTabJustify SvTabListBox::GetTabJustify( USHORT nTab ) const
+SvTabJustify SvTabListBox::GetTabJustify( sal_uInt16 nTab ) const
{
SvTabJustify eResult = AdjustLeft;
if( nTab >= nTabCount )
return eResult;
SvLBoxTab* pTab = &(pTabList[ nTab ]);
- USHORT nFlags = pTab->nFlags;
+ sal_uInt16 nFlags = pTab->nFlags;
nFlags &= MYTABMASK;
eResult = (SvTabJustify)nFlags;
return eResult;
}
-long SvTabListBox::GetLogicTab( USHORT nTab )
+long SvTabListBox::GetLogicTab( sal_uInt16 nTab )
{
if( SvTreeListBox::nTreeFlags & TREEFLAG_RECALCTABS )
((SvTabListBox*)this)->SetTabs();
@@ -583,7 +583,7 @@ SvHeaderTabListBox::SvHeaderTabListBox( Window* pParent, WinBits nWinStyle ) :
SvTabListBox( pParent, nWinStyle ),
- m_bFirstPaint ( TRUE ),
+ m_bFirstPaint ( sal_True ),
m_pImpl ( new ::svt::SvHeaderTabListBoxImpl ),
m_pAccessible ( NULL )
{
@@ -595,7 +595,7 @@ SvHeaderTabListBox::SvHeaderTabListBox( Window* pParent, const ResId& rResId ) :
SvTabListBox( pParent, rResId ),
- m_bFirstPaint ( TRUE ),
+ m_bFirstPaint ( sal_True ),
m_pImpl ( new ::svt::SvHeaderTabListBoxImpl ),
m_pAccessible ( NULL )
{
@@ -614,7 +614,7 @@ void SvHeaderTabListBox::Paint( const Rectangle& rRect )
{
if ( m_bFirstPaint )
{
- m_bFirstPaint = FALSE;
+ m_bFirstPaint = sal_False;
RepaintScrollBars();
}
SvTabListBox::Paint( rRect );
@@ -633,14 +633,14 @@ void SvHeaderTabListBox::InitHeaderBar( HeaderBar* pHeaderBar )
// -----------------------------------------------------------------------
-sal_Bool SvHeaderTabListBox::IsItemChecked( SvLBoxEntry* pEntry, USHORT nCol ) const
+sal_Bool SvHeaderTabListBox::IsItemChecked( SvLBoxEntry* pEntry, sal_uInt16 nCol ) const
{
SvButtonState eState = SV_BUTTON_UNCHECKED;
SvLBoxButton* pItem = (SvLBoxButton*)( pEntry->GetItem( nCol + 1 ) );
if ( pItem && ( (SvLBoxItem*)pItem )->IsA() == SV_ITEM_ID_LBOXBUTTON )
{
- USHORT nButtonFlags = pItem->GetButtonFlags();
+ sal_uInt16 nButtonFlags = pItem->GetButtonFlags();
eState = pCheckButtonData->ConvertToButtonState( nButtonFlags );
}
@@ -650,7 +650,7 @@ sal_Bool SvHeaderTabListBox::IsItemChecked( SvLBoxEntry* pEntry, USHORT nCol ) c
// -----------------------------------------------------------------------
SvLBoxEntry* SvHeaderTabListBox::InsertEntryToColumn(
- const XubString& rStr, ULONG nPos, USHORT nCol, void* pUserData )
+ const XubString& rStr, sal_uLong nPos, sal_uInt16 nCol, void* pUserData )
{
SvLBoxEntry* pEntry = SvTabListBox::InsertEntryToColumn( rStr, nPos, nCol, pUserData );
RecalculateAccessibleChildren();
@@ -660,7 +660,7 @@ SvLBoxEntry* SvHeaderTabListBox::InsertEntryToColumn(
// -----------------------------------------------------------------------
SvLBoxEntry* SvHeaderTabListBox::InsertEntryToColumn(
- const XubString& rStr, SvLBoxEntry* pParent, ULONG nPos, USHORT nCol, void* pUserData )
+ const XubString& rStr, SvLBoxEntry* pParent, sal_uLong nPos, sal_uInt16 nCol, void* pUserData )
{
SvLBoxEntry* pEntry = SvTabListBox::InsertEntryToColumn( rStr, pParent, nPos, nCol, pUserData );
RecalculateAccessibleChildren();
@@ -671,7 +671,7 @@ SvLBoxEntry* SvHeaderTabListBox::InsertEntryToColumn(
SvLBoxEntry* SvHeaderTabListBox::InsertEntryToColumn(
const XubString& rStr, const Image& rExpandedEntryBmp, const Image& rCollapsedEntryBmp,
- SvLBoxEntry* pParent, ULONG nPos, USHORT nCol, void* pUserData )
+ SvLBoxEntry* pParent, sal_uLong nPos, sal_uInt16 nCol, void* pUserData )
{
SvLBoxEntry* pEntry = SvTabListBox::InsertEntryToColumn(
rStr, rExpandedEntryBmp, rCollapsedEntryBmp, pParent, nPos, nCol, pUserData );
@@ -681,19 +681,19 @@ SvLBoxEntry* SvHeaderTabListBox::InsertEntryToColumn(
// -----------------------------------------------------------------------
-ULONG SvHeaderTabListBox::Insert(
- SvLBoxEntry* pEnt, SvLBoxEntry* pPar, ULONG nPos )
+sal_uLong SvHeaderTabListBox::Insert(
+ SvLBoxEntry* pEnt, SvLBoxEntry* pPar, sal_uLong nPos )
{
- ULONG n = SvTabListBox::Insert( pEnt, pPar, nPos );
+ sal_uLong n = SvTabListBox::Insert( pEnt, pPar, nPos );
RecalculateAccessibleChildren();
return n;
}
// -----------------------------------------------------------------------
-ULONG SvHeaderTabListBox::Insert( SvLBoxEntry* pEntry, ULONG nRootPos )
+sal_uLong SvHeaderTabListBox::Insert( SvLBoxEntry* pEntry, sal_uLong nRootPos )
{
- ULONG nPos = SvTabListBox::Insert( pEntry, nRootPos );
+ sal_uLong nPos = SvTabListBox::Insert( pEntry, nRootPos );
RecalculateAccessibleChildren();
return nPos;
}
@@ -765,7 +765,7 @@ sal_Bool SvHeaderTabListBox::IsCellCheckBox( long _nRow, sal_uInt16 _nColumn, Tr
SvLBoxEntry* pEntry = GetEntry( _nRow );
if ( pEntry )
{
- USHORT nItemCount = pEntry->ItemCount();
+ sal_uInt16 nItemCount = pEntry->ItemCount();
if ( nItemCount > ( _nColumn + 1 ) )
{
SvLBoxButton* pItem = (SvLBoxButton*)( pEntry->GetItem( _nColumn + 1 ) );
@@ -801,8 +801,8 @@ sal_Int32 SvHeaderTabListBox::GetCurrRow() const
SvLBoxEntry* pEntry = GetCurEntry();
if ( pEntry )
{
- ULONG nCount = GetEntryCount();
- for ( ULONG i = 0; i < nCount; ++i )
+ sal_uLong nCount = GetEntryCount();
+ for ( sal_uLong i = 0; i < nCount; ++i )
{
if ( pEntry == GetEntry(i) )
{
@@ -843,11 +843,11 @@ sal_Bool SvHeaderTabListBox::IsCellFocusable() const
// -----------------------------------------------------------------------
sal_Bool SvHeaderTabListBox::GoToCell( sal_Int32 _nRow, sal_uInt16 _nColumn )
{
- sal_Bool bRet = ( IsCellFocusEnabled() == TRUE );
+ sal_Bool bRet = ( IsCellFocusEnabled() == sal_True );
if ( bRet )
{
// first set cursor to _nRow
- SetCursor( GetEntry( _nRow ), TRUE );
+ SetCursor( GetEntry( _nRow ), sal_True );
// then set the focus into _nColumn
bRet = ( SetCurrentTabPos( _nColumn ) == true );
}
@@ -856,22 +856,22 @@ sal_Bool SvHeaderTabListBox::GoToCell( sal_Int32 _nRow, sal_uInt16 _nColumn )
// -----------------------------------------------------------------------
void SvHeaderTabListBox::SetNoSelection()
{
- SvLBox::SelectAll( FALSE );
+ SvLBox::SelectAll( sal_False );
}
// -----------------------------------------------------------------------
void SvHeaderTabListBox::SelectAll()
{
- SvLBox::SelectAll( TRUE );
+ SvLBox::SelectAll( sal_True );
}
// -----------------------------------------------------------------------
-void SvHeaderTabListBox::SelectAll( BOOL bSelect, BOOL bPaint )
+void SvHeaderTabListBox::SelectAll( sal_Bool bSelect, sal_Bool bPaint )
{
- // overwritten just to disambiguate the SelectAll() from the base' class SelectAll( BOOl, BOOL )
+ // overwritten just to disambiguate the SelectAll() from the base' class SelectAll( BOOl, sal_Bool )
SvTabListBox::SelectAll( bSelect, bPaint );
}
// -----------------------------------------------------------------------
-void SvHeaderTabListBox::SelectRow( long _nRow, BOOL _bSelect, BOOL )
+void SvHeaderTabListBox::SelectRow( long _nRow, sal_Bool _bSelect, sal_Bool )
{
Select( GetEntry( _nRow ), _bSelect );
}
@@ -898,7 +898,7 @@ bool SvHeaderTabListBox::IsRowSelected( long _nRow ) const
// -----------------------------------------------------------------------
sal_Bool SvHeaderTabListBox::IsColumnSelected( long ) const
{
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
void SvHeaderTabListBox::GetAllSelectedRows( ::com::sun::star::uno::Sequence< sal_Int32 >& ) const
@@ -914,12 +914,12 @@ sal_Bool SvHeaderTabListBox::IsCellVisible( sal_Int32, sal_uInt16 ) const
return sal_True;
}
// -----------------------------------------------------------------------
-String SvHeaderTabListBox::GetAccessibleCellText( long _nRow, USHORT _nColumnPos ) const
+String SvHeaderTabListBox::GetAccessibleCellText( long _nRow, sal_uInt16 _nColumnPos ) const
{
return ::rtl::OUString( GetTabEntryText( _nRow, _nColumnPos ) );
}
// -----------------------------------------------------------------------
-Rectangle SvHeaderTabListBox::calcHeaderRect( sal_Bool _bIsColumnBar, BOOL _bOnScreen )
+Rectangle SvHeaderTabListBox::calcHeaderRect( sal_Bool _bIsColumnBar, sal_Bool _bOnScreen )
{
Rectangle aRect;
if ( _bIsColumnBar )
@@ -933,7 +933,7 @@ Rectangle SvHeaderTabListBox::calcHeaderRect( sal_Bool _bIsColumnBar, BOOL _bOnS
return aRect;
}
// -----------------------------------------------------------------------
-Rectangle SvHeaderTabListBox::calcTableRect( BOOL _bOnScreen )
+Rectangle SvHeaderTabListBox::calcTableRect( sal_Bool _bOnScreen )
{
Window* pParent = NULL;
if ( !_bOnScreen )
@@ -943,14 +943,14 @@ Rectangle SvHeaderTabListBox::calcTableRect( BOOL _bOnScreen )
return aRect;
}
// -----------------------------------------------------------------------
-Rectangle SvHeaderTabListBox::GetFieldRectPixelAbs( sal_Int32 _nRow, sal_uInt16 _nColumn, BOOL _bIsHeader, BOOL _bOnScreen )
+Rectangle SvHeaderTabListBox::GetFieldRectPixelAbs( sal_Int32 _nRow, sal_uInt16 _nColumn, sal_Bool _bIsHeader, sal_Bool _bOnScreen )
{
DBG_ASSERT( !_bIsHeader || 0 == _nRow, "invalid parameters" );
Rectangle aRect;
SvLBoxEntry* pEntry = GetEntry( _nRow );
if ( pEntry )
{
- aRect = _bIsHeader ? calcHeaderRect( sal_True, FALSE ) : GetBoundingRect( pEntry );
+ aRect = _bIsHeader ? calcHeaderRect( sal_True, sal_False ) : GetBoundingRect( pEntry );
Point aTopLeft = aRect.TopLeft();
DBG_ASSERT( m_pImpl->m_pHeaderBar->GetItemCount() > _nColumn, "invalid column" );
Rectangle aItemRect = m_pImpl->m_pHeaderBar->GetItemRect( m_pImpl->m_pHeaderBar->GetItemId( _nColumn ) );
@@ -1108,7 +1108,7 @@ sal_Bool SvHeaderTabListBox::ConvertPointToColumnHeader( sal_uInt16&, const Poin
}
case ::svt::BBTYPE_COLUMNHEADERCELL:
{
- aRetText = m_pImpl->m_pHeaderBar->GetItemText( m_pImpl->m_pHeaderBar->GetItemId( (USHORT)_nPos ) );
+ aRetText = m_pImpl->m_pHeaderBar->GetItemText( m_pImpl->m_pHeaderBar->GetItemId( (sal_uInt16)_nPos ) );
break;
}
@@ -1227,7 +1227,7 @@ void SvHeaderTabListBox::GrabTableFocus()
GrabFocus();
}
// -----------------------------------------------------------------------
-BOOL SvHeaderTabListBox::GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector )
+sal_Bool SvHeaderTabListBox::GetGlyphBoundRects( const Point& rOrigin, const String& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector )
{
return Control::GetGlyphBoundRects( rOrigin, rStr, nIndex, nLen, nBase, rVector );
}
@@ -1242,7 +1242,7 @@ void SvHeaderTabListBox::GrabFocus()
Control::GrabFocus();
}
// -----------------------------------------------------------------------
-Reference< XAccessible > SvHeaderTabListBox::GetAccessible( BOOL bCreate )
+Reference< XAccessible > SvHeaderTabListBox::GetAccessible( sal_Bool bCreate )
{
return Control::GetAccessible( bCreate );
}
@@ -1286,7 +1286,7 @@ Rectangle SvHeaderTabListBox::GetFieldCharacterBounds(sal_Int32,sal_Int32,sal_In
// -----------------------------------------------------------------------------
sal_Int32 SvHeaderTabListBox::GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint)
{
- String sText = GetAccessibleCellText( _nRow, static_cast< USHORT >( _nColumnPos ) );
+ String sText = GetAccessibleCellText( _nRow, static_cast< sal_uInt16 >( _nColumnPos ) );
MetricVector aRects;
if ( GetGlyphBoundRects(Point(0,0),sText,0,STRING_LEN,0,aRects) )
{
diff --git a/svtools/source/contnr/svtreebx.cxx b/svtools/source/contnr/svtreebx.cxx
index 9d6bc78caff9..b48bcb0910ee 100644
--- a/svtools/source/contnr/svtreebx.cxx
+++ b/svtools/source/contnr/svtreebx.cxx
@@ -109,7 +109,7 @@ void SvTreeListBox::InitTreeView()
SetFont( GetFont() );
SetSpaceBetweenEntries( 0 );
SetLineColor();
- InitSettings( TRUE, TRUE, TRUE );
+ InitSettings( sal_True, sal_True, sal_True );
ImplInitStyle();
SetTabs();
}
@@ -149,28 +149,28 @@ void SvTreeListBox::DisconnectFromModel()
}
-USHORT SvTreeListBox::IsA()
+sal_uInt16 SvTreeListBox::IsA()
{
DBG_CHKTHIS(SvTreeListBox,0);
return SV_LISTBOX_ID_TREEBOX;
}
-void SvTreeListBox::SetSublistOpenWithReturn( BOOL b )
+void SvTreeListBox::SetSublistOpenWithReturn( sal_Bool b )
{
pImp->bSubLstOpRet = b;
}
-BOOL SvTreeListBox::IsSublistOpenWithReturn() const
+sal_Bool SvTreeListBox::IsSublistOpenWithReturn() const
{
return pImp->bSubLstOpRet;
}
-void SvTreeListBox::SetSublistOpenWithLeftRight( BOOL b )
+void SvTreeListBox::SetSublistOpenWithLeftRight( sal_Bool b )
{
pImp->bSubLstOpLR = b;
}
-BOOL SvTreeListBox::IsSublistOpenWithLeftRight() const
+sal_Bool SvTreeListBox::IsSublistOpenWithLeftRight() const
{
return pImp->bSubLstOpLR;
}
@@ -179,12 +179,12 @@ void SvTreeListBox::Resize()
{
DBG_CHKTHIS(SvTreeListBox,0);
if( IsEditingActive() )
- EndEditing( TRUE );
+ EndEditing( sal_True );
SvLBox::Resize();
pImp->Resize();
nFocusWidth = -1;
- pImp->ShowCursor( FALSE );
- pImp->ShowCursor( TRUE );
+ pImp->ShowCursor( sal_False );
+ pImp->ShowCursor( sal_True );
}
/* Faelle:
@@ -224,12 +224,12 @@ void SvTreeListBox::SetTabs()
{
DBG_CHKTHIS(SvTreeListBox,0);
if( IsEditingActive() )
- EndEditing( TRUE );
+ EndEditing( sal_True );
nTreeFlags &= (~TREEFLAG_RECALCTABS);
nFocusWidth = -1;
const WinBits nStyle( GetStyle() );
- BOOL bHasButtons = (nStyle & WB_HASBUTTONS)!=0;
- BOOL bHasButtonsAtRoot = (nStyle & (WB_HASLINESATROOT |
+ sal_Bool bHasButtons = (nStyle & WB_HASBUTTONS)!=0;
+ sal_Bool bHasButtonsAtRoot = (nStyle & (WB_HASLINESATROOT |
WB_HASBUTTONSATROOT))!=0;
long nStartPos = TAB_STARTPOS;
long nNodeWidthPixel = GetExpandedNodeBmp().GetSizePixel().Width();
@@ -354,8 +354,8 @@ String SvTreeListBox::SearchEntryText( SvLBoxEntry* pEntry ) const
DBG_CHKTHIS(SvTreeListBox,0);
DBG_ASSERT( pEntry, "SvTreeListBox::SearchEntryText(): no entry" );
String sRet;
- USHORT nCount = pEntry->ItemCount();
- USHORT nCur = 0;
+ sal_uInt16 nCount = pEntry->ItemCount();
+ sal_uInt16 nCur = 0;
SvLBoxItem* pItem;
while( nCur < nCount )
{
@@ -399,7 +399,7 @@ IMPL_LINK_INLINE_START( SvTreeListBox, CheckButtonClick, SvLBoxButtonData *, pDa
IMPL_LINK_INLINE_END( SvTreeListBox, CheckButtonClick, SvLBoxButtonData *, pData )
SvLBoxEntry* SvTreeListBox::InsertEntry( const XubString& aText,SvLBoxEntry* pParent,
- BOOL bChildsOnDemand, ULONG nPos, void* pUser,
+ sal_Bool bChildsOnDemand, sal_uLong nPos, void* pUser,
SvLBoxButtonKind eButtonKind )
{
DBG_CHKTHIS(SvTreeListBox,0);
@@ -439,7 +439,7 @@ SvLBoxEntry* SvTreeListBox::InsertEntry( const XubString& aText,SvLBoxEntry* pPa
SvLBoxEntry* SvTreeListBox::InsertEntry( const XubString& aText,
const Image& aExpEntryBmp, const Image& aCollEntryBmp,
- SvLBoxEntry* pParent, BOOL bChildsOnDemand, ULONG nPos, void* pUser,
+ SvLBoxEntry* pParent, sal_Bool bChildsOnDemand, sal_uLong nPos, void* pUser,
SvLBoxButtonKind eButtonKind )
{
DBG_CHKTHIS(SvTreeListBox,0);
@@ -524,7 +524,7 @@ void SvTreeListBox::ImpEntryInserted( SvLBoxEntry* pEntry )
SvLBoxEntry* pParent = (SvLBoxEntry*)pModel->GetParent( pEntry );
if( pParent )
{
- USHORT nFlags = pParent->GetFlags();
+ sal_uInt16 nFlags = pParent->GetFlags();
nFlags &= ~SV_ENTRYFLAG_NO_NODEBMP;
pParent->SetFlags( nFlags );
}
@@ -586,7 +586,7 @@ SvButtonState SvTreeListBox::GetCheckButtonState( SvLBoxEntry* pEntry ) const
SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXBUTTON));
if(!pItem)
return SV_BUTTON_TRISTATE;
- USHORT nButtonFlags = pItem->GetButtonFlags();
+ sal_uInt16 nButtonFlags = pItem->GetButtonFlags();
eState = pCheckButtonData->ConvertToButtonState( nButtonFlags );
}
return eState;
@@ -654,7 +654,7 @@ SvLBoxEntry* SvTreeListBox::CloneEntry( SvLBoxEntry* pSource )
// *********************************************************************
-void SvTreeListBox::ShowExpandBitmapOnCursor( BOOL bYes )
+void SvTreeListBox::ShowExpandBitmapOnCursor( sal_Bool bYes )
{
DBG_CHKTHIS(SvTreeListBox,0);
if( bYes )
@@ -752,19 +752,19 @@ void SvTreeListBox::SetDontKnowNodeBitmap( const Image& rDontKnowBmp, BmpColorMo
pImp->SetDontKnowNodeBmp( rDontKnowBmp, _eMode );
}
-BOOL SvTreeListBox::EditingEntry( SvLBoxEntry*, Selection& )
+sal_Bool SvTreeListBox::EditingEntry( SvLBoxEntry*, Selection& )
{
DBG_CHKTHIS(SvTreeListBox,0);
- return TRUE;
+ return sal_True;
}
-BOOL SvTreeListBox::EditedEntry( SvLBoxEntry* /*pEntry*/,const XubString& /*rNewText*/)
+sal_Bool SvTreeListBox::EditedEntry( SvLBoxEntry* /*pEntry*/,const XubString& /*rNewText*/)
{
DBG_CHKTHIS(SvTreeListBox,0);
- return TRUE;
+ return sal_True;
}
-void SvTreeListBox::EnableInplaceEditing( BOOL bOn )
+void SvTreeListBox::EnableInplaceEditing( sal_Bool bOn )
{
DBG_CHKTHIS(SvTreeListBox,0);
SvLBox::EnableInplaceEditing( bOn );
@@ -780,7 +780,7 @@ void SvTreeListBox::KeyInput( const KeyEvent& rKEvt )
nImpFlags |= SVLBOX_IS_TRAVELSELECT;
#ifdef OVDEBUG
- USHORT nCode = rKEvt.GetKeyCode().GetCode();
+ sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
switch ( nCode )
{
case KEY_F1:
@@ -804,7 +804,7 @@ void SvTreeListBox::RequestingChilds( SvLBoxEntry* pParent )
{
DBG_CHKTHIS(SvTreeListBox,0);
if( !pParent->HasChilds() )
- InsertEntry( String::CreateFromAscii("<dummy>"), pParent, FALSE, LIST_APPEND );
+ InsertEntry( String::CreateFromAscii("<dummy>"), pParent, sal_False, LIST_APPEND );
}
void SvTreeListBox::GetFocus()
@@ -850,7 +850,7 @@ void SvTreeListBox::ModelHasCleared()
// Invalidate();
}
-void SvTreeListBox::ShowTargetEmphasis( SvLBoxEntry* pEntry, BOOL /* bShow */ )
+void SvTreeListBox::ShowTargetEmphasis( SvLBoxEntry* pEntry, sal_Bool /* bShow */ )
{
DBG_CHKTHIS(SvTreeListBox,0);
pImp->PaintDDCursor( pEntry );
@@ -874,13 +874,13 @@ void SvTreeListBox::ScrollOutputArea( short nDeltaEntries )
long nTemp = nThumb + nVis;
if( nDeltaEntries > (nMax - nTemp) )
nDeltaEntries = (short)(nMax - nTemp);
- pImp->PageDown( (USHORT)nDeltaEntries );
+ pImp->PageDown( (sal_uInt16)nDeltaEntries );
}
else
{
if( nDeltaEntries > nThumb )
nDeltaEntries = (short)nThumb;
- pImp->PageUp( (USHORT)nDeltaEntries );
+ pImp->PageUp( (sal_uInt16)nDeltaEntries );
}
pImp->SyncVerThumb();
NotifyEndScroll();
@@ -924,8 +924,8 @@ void SvTreeListBox::SetEntryHeight( SvLBoxEntry* pEntry )
{
DBG_CHKTHIS(SvTreeListBox,0);
short nHeight, nHeightMax=0;
- USHORT nCount = pEntry->ItemCount();
- USHORT nCur = 0;
+ sal_uInt16 nCount = pEntry->ItemCount();
+ sal_uInt16 nCur = 0;
SvViewDataEntry* pViewData = GetViewDataEntry( pEntry );
while( nCur < nCount )
{
@@ -944,7 +944,7 @@ void SvTreeListBox::SetEntryHeight( SvLBoxEntry* pEntry )
}
}
-void SvTreeListBox::SetEntryHeight( short nHeight, BOOL bAlways )
+void SvTreeListBox::SetEntryHeight( short nHeight, sal_Bool bAlways )
{
DBG_CHKTHIS(SvTreeListBox,0);
@@ -985,12 +985,12 @@ void SvTreeListBox::AdjustEntryHeight( const Font& rFont )
}
}
-BOOL SvTreeListBox::Expand( SvLBoxEntry* pParent )
+sal_Bool SvTreeListBox::Expand( SvLBoxEntry* pParent )
{
DBG_CHKTHIS(SvTreeListBox,0);
pHdlEntry = pParent;
- BOOL bExpanded = FALSE;
- USHORT nFlags;
+ sal_Bool bExpanded = sal_False;
+ sal_uInt16 nFlags;
if( pParent->HasChildsOnDemand() )
RequestingChilds( pParent );
@@ -999,7 +999,7 @@ BOOL SvTreeListBox::Expand( SvLBoxEntry* pParent )
nImpFlags |= SVLBOX_IS_EXPANDING;
if( ExpandingHdl() )
{
- bExpanded = TRUE;
+ bExpanded = sal_True;
SvListView::Expand( pParent );
pImp->EntryExpanded( pParent );
pHdlEntry = pParent;
@@ -1028,16 +1028,16 @@ BOOL SvTreeListBox::Expand( SvLBoxEntry* pParent )
return bExpanded;
}
-BOOL SvTreeListBox::Collapse( SvLBoxEntry* pParent )
+sal_Bool SvTreeListBox::Collapse( SvLBoxEntry* pParent )
{
DBG_CHKTHIS(SvTreeListBox,0);
nImpFlags &= ~SVLBOX_IS_EXPANDING;
pHdlEntry = pParent;
- BOOL bCollapsed = FALSE;
+ sal_Bool bCollapsed = sal_False;
if( ExpandingHdl() )
{
- bCollapsed = TRUE;
+ bCollapsed = sal_True;
pImp->CollapsingEntry( pParent );
SvListView::Collapse( pParent );
pImp->EntryCollapsed( pParent );
@@ -1055,11 +1055,11 @@ BOOL SvTreeListBox::Collapse( SvLBoxEntry* pParent )
return bCollapsed;
}
-BOOL SvTreeListBox::Select( SvLBoxEntry* pEntry, BOOL bSelect )
+sal_Bool SvTreeListBox::Select( SvLBoxEntry* pEntry, sal_Bool bSelect )
{
DBG_CHKTHIS(SvTreeListBox,0);
DBG_ASSERT(pEntry,"Select: Null-Ptr");
- BOOL bRetVal = SvListView::Select( pEntry, bSelect );
+ sal_Bool bRetVal = SvListView::Select( pEntry, bSelect );
DBG_ASSERT(IsSelected(pEntry)==bSelect,"Select failed");
if( bRetVal )
{
@@ -1076,14 +1076,14 @@ BOOL SvTreeListBox::Select( SvLBoxEntry* pEntry, BOOL bSelect )
return bRetVal;
}
-ULONG SvTreeListBox::SelectChilds( SvLBoxEntry* pParent, BOOL bSelect )
+sal_uLong SvTreeListBox::SelectChilds( SvLBoxEntry* pParent, sal_Bool bSelect )
{
DBG_CHKTHIS(SvTreeListBox,0);
pImp->DestroyAnchor();
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
if( !pParent->HasChilds() )
return 0;
- USHORT nRefDepth = pModel->GetDepth( pParent );
+ sal_uInt16 nRefDepth = pModel->GetDepth( pParent );
SvLBoxEntry* pChild = FirstChild( pParent );
do {
nRet++;
@@ -1093,19 +1093,19 @@ ULONG SvTreeListBox::SelectChilds( SvLBoxEntry* pParent, BOOL bSelect )
return nRet;
}
-void SvTreeListBox::SelectAll( BOOL bSelect, BOOL )
+void SvTreeListBox::SelectAll( sal_Bool bSelect, sal_Bool )
{
DBG_CHKTHIS(SvTreeListBox,0);
pImp->SelAllDestrAnch(
bSelect,
- TRUE, // Anker loeschen,
- TRUE ); // auch bei SINGLE_SELECTION den Cursor deselektieren
+ sal_True, // Anker loeschen,
+ sal_True ); // auch bei SINGLE_SELECTION den Cursor deselektieren
}
void SvTreeListBox::ModelHasInsertedTree( SvListEntry* pEntry )
{
DBG_CHKTHIS(SvTreeListBox,0);
- USHORT nRefDepth = pModel->GetDepth( (SvLBoxEntry*)pEntry );
+ sal_uInt16 nRefDepth = pModel->GetDepth( (SvLBoxEntry*)pEntry );
SvLBoxEntry* pTmp = (SvLBoxEntry*)pEntry;
do
{
@@ -1124,7 +1124,7 @@ void SvTreeListBox::ModelHasInserted( SvListEntry* pEntry )
void SvTreeListBox::ModelIsMoving(SvListEntry* pSource,
SvListEntry* /* pTargetParent */,
- ULONG /* nChildPos */ )
+ sal_uLong /* nChildPos */ )
{
DBG_CHKTHIS(SvTreeListBox,0);
pImp->MovingEntry( (SvLBoxEntry*)pSource );
@@ -1146,9 +1146,11 @@ void SvTreeListBox::ModelIsRemoving( SvListEntry* pEntry )
NotifyRemoving( (SvLBoxEntry*)pEntry );
}
-void SvTreeListBox::ModelHasRemoved( SvListEntry* /* pEntry */ )
+void SvTreeListBox::ModelHasRemoved( SvListEntry* pEntry )
{
DBG_CHKTHIS(SvTreeListBox,0);
+ if ( pEntry == pHdlEntry)
+ pHdlEntry = NULL;
pImp->EntryRemoved();
}
@@ -1171,7 +1173,7 @@ void SvTreeListBox::SetFont( const Font& rFont )
{
DBG_CHKTHIS(SvTreeListBox,0);
Font aTempFont( rFont );
- aTempFont.SetTransparent( TRUE );
+ aTempFont.SetTransparent( sal_True );
Control::SetFont( aTempFont );
AdjustEntryHeight( aTempFont );
// immer Invalidieren, sonst fallen wir
@@ -1208,13 +1210,13 @@ void SvTreeListBox::MouseMove( const MouseEvent& rMEvt )
}
-void SvTreeListBox::SetUpdateMode( BOOL bUpdate )
+void SvTreeListBox::SetUpdateMode( sal_Bool bUpdate )
{
DBG_CHKTHIS(SvTreeListBox,0);
pImp->SetUpdateMode( bUpdate );
}
-void SvTreeListBox::SetUpdateModeFast( BOOL bUpdate )
+void SvTreeListBox::SetUpdateModeFast( sal_Bool bUpdate )
{
DBG_CHKTHIS(SvTreeListBox,0);
pImp->SetUpdateModeFast( bUpdate );
@@ -1234,7 +1236,7 @@ void SvTreeListBox::SetSpaceBetweenEntries( short nOffsLogic )
}
}
-void SvTreeListBox::SetCursor( SvLBoxEntry* pEntry, BOOL bForceNoSelect )
+void SvTreeListBox::SetCursor( SvLBoxEntry* pEntry, sal_Bool bForceNoSelect )
{
DBG_CHKTHIS(SvTreeListBox,0);
pImp->SetCursor(pEntry, bForceNoSelect);
@@ -1271,7 +1273,7 @@ void SvTreeListBox::MakeVisible( SvLBoxEntry* pEntry )
pImp->MakeVisible(pEntry);
}
-void SvTreeListBox::MakeVisible( SvLBoxEntry* pEntry, BOOL bMoveToTop )
+void SvTreeListBox::MakeVisible( SvLBoxEntry* pEntry, sal_Bool bMoveToTop )
{
pImp->MakeVisible( pEntry, bMoveToTop );
}
@@ -1292,11 +1294,11 @@ void SvTreeListBox::EditItemText( SvLBoxEntry* pEntry, SvLBoxString* pItem,
DBG_ASSERT(pEntry&&pItem,"EditItemText: Bad params");
if( IsSelected( pEntry ))
{
- pImp->ShowCursor( FALSE );
- SvListView::Select( pEntry, FALSE );
+ pImp->ShowCursor( sal_False );
+ SvListView::Select( pEntry, sal_False );
PaintEntry( pEntry );
- SvListView::Select( pEntry, TRUE );
- pImp->ShowCursor( TRUE );
+ SvListView::Select( pEntry, sal_True );
+ pImp->ShowCursor( sal_True );
}
pEdEntry = pEntry;
pEdItem = pItem;
@@ -1309,7 +1311,7 @@ void SvTreeListBox::EditItemText( SvLBoxEntry* pEntry, SvLBoxString* pItem,
aPos.X() = GetTabPos( pEntry, pTab );
long nOutputWidth = pImp->GetOutputSize().Width();
Size aSize( nOutputWidth - aPos.X(), aItemSize.Height() );
- USHORT nPos = aTabs.GetPos( pTab );
+ sal_uInt16 nPos = aTabs.GetPos( pTab );
if( nPos+1 < aTabs.Count() )
{
SvLBoxTab* pRightTab = (SvLBoxTab*)aTabs.GetObject( nPos + 1 );
@@ -1355,8 +1357,8 @@ void SvTreeListBox::ImplEditEntry( SvLBoxEntry* pEntry )
bool bIsMouseTriggered = nClickX >= 0;
SvLBoxString* pItem = NULL;
- USHORT nCount = pEntry->ItemCount();
- for( USHORT i = 0 ; i < nCount ; i++ )
+ sal_uInt16 nCount = pEntry->ItemCount();
+ for( sal_uInt16 i = 0 ; i < nCount ; i++ )
{
SvLBoxItem* pTmpItem = pEntry->GetItem( i );
if( pTmpItem->IsA() != SV_ITEM_ID_LBOXSTRING )
@@ -1385,7 +1387,7 @@ void SvTreeListBox::ImplEditEntry( SvLBoxEntry* pEntry )
Selection aSel( SELECTION_MIN, SELECTION_MAX );
if( pItem && EditingEntry( pEntry, aSel ) )
{
- SelectAll( FALSE );
+ SelectAll( sal_False );
MakeVisible( pEntry );
EditItemText( pEntry, pItem, aSel );
}
@@ -1435,7 +1437,7 @@ void SvTreeListBox::EditingRequest( SvLBoxEntry* pEntry, SvLBoxItem* pItem,
Selection aSel( SELECTION_MIN, SELECTION_MAX );
if( EditingEntry( pEntry, aSel ) )
{
- SelectAll( FALSE );
+ SelectAll( sal_False );
EditItemText( pEntry, (SvLBoxString*)pItem, aSel );
}
}
@@ -1449,7 +1451,7 @@ SvLBoxEntry* SvTreeListBox::GetDropTarget( const Point& rPos )
// Scrollen
if( rPos.Y() < 12 )
{
- SvLBox::ImplShowTargetEmphasis( SvLBox::pTargetEntry, FALSE );
+ SvLBox::ImplShowTargetEmphasis( SvLBox::pTargetEntry, sal_False );
ScrollOutputArea( +1 );
}
else
@@ -1457,7 +1459,7 @@ SvLBoxEntry* SvTreeListBox::GetDropTarget( const Point& rPos )
Size aSize( pImp->GetOutputSize() );
if( rPos.Y() > aSize.Height() - 12 )
{
- SvLBox::ImplShowTargetEmphasis( SvLBox::pTargetEntry, FALSE );
+ SvLBox::ImplShowTargetEmphasis( SvLBox::pTargetEntry, sal_False );
ScrollOutputArea( -1 );
}
}
@@ -1474,7 +1476,7 @@ SvLBoxEntry* SvTreeListBox::GetDropTarget( const Point& rPos )
}
-SvLBoxEntry* SvTreeListBox::GetEntry( const Point& rPos, BOOL bHit ) const
+SvLBoxEntry* SvTreeListBox::GetEntry( const Point& rPos, sal_Bool bHit ) const
{
DBG_CHKTHIS(SvTreeListBox,0);
SvLBoxEntry* pEntry = pImp->GetEntry( rPos );
@@ -1538,21 +1540,21 @@ void SvTreeListBox::InvalidateEntry( SvLBoxEntry* pEntry )
}
-long SvTreeListBox::PaintEntry(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags)
+long SvTreeListBox::PaintEntry(SvLBoxEntry* pEntry,long nLine,sal_uInt16 nTabFlags)
{
return PaintEntry1(pEntry,nLine,nTabFlags);
}
#define SV_TAB_BORDER 8
-long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags,
- BOOL bHasClipRegion )
+long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,sal_uInt16 nTabFlags,
+ sal_Bool bHasClipRegion )
{
DBG_CHKTHIS(SvTreeListBox,0);
Rectangle aRect; // multi purpose
- BOOL bHorSBar = pImp->HasHorScrollBar();
+ sal_Bool bHorSBar = pImp->HasHorScrollBar();
PreparePaint( pEntry );
// #97680# ------------------
@@ -1578,12 +1580,12 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags,
Color aBackupColor = GetFillColor();
bool bCurFontIsSel = false;
- BOOL bInUse = pEntry->HasInUseEmphasis();
+ sal_Bool bInUse = pEntry->HasInUseEmphasis();
// wenn eine ClipRegion von aussen gesetzt wird, dann
// diese nicht zuruecksetzen
const WinBits nWindowStyle = GetStyle();
- const BOOL bResetClipRegion = !bHasClipRegion;
- const BOOL bHideSelection = ((nWindowStyle & WB_HIDESELECTION) && !HasFocus())!=0;
+ const sal_Bool bResetClipRegion = !bHasClipRegion;
+ const sal_Bool bHideSelection = ((nWindowStyle & WB_HIDESELECTION) && !HasFocus())!=0;
const StyleSettings& rSettings = GetSettings().GetStyleSettings();
Font aHighlightFont( GetFont() );
@@ -1595,24 +1597,24 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags,
if( !bHasClipRegion && nWindowStyle & WB_HSCROLL )
{
SetClipRegion( Region(pImp->GetClipRegionRect()) );
- bHasClipRegion = TRUE;
+ bHasClipRegion = sal_True;
}
SvViewDataEntry* pViewDataEntry = GetViewDataEntry( pEntry );
- USHORT nTabCount = aTabs.Count();
- USHORT nItemCount = pEntry->ItemCount();
- USHORT nCurTab = 0;
- USHORT nCurItem = 0;
+ sal_uInt16 nTabCount = aTabs.Count();
+ sal_uInt16 nItemCount = pEntry->ItemCount();
+ sal_uInt16 nCurTab = 0;
+ sal_uInt16 nCurItem = 0;
while( nCurTab < nTabCount && nCurItem < nItemCount )
{
SvLBoxTab* pTab = (SvLBoxTab*)aTabs.GetObject( nCurTab );
- USHORT nNextTab = nCurTab + 1;
+ sal_uInt16 nNextTab = nCurTab + 1;
SvLBoxTab* pNextTab = nNextTab < nTabCount ? (SvLBoxTab*)aTabs.GetObject(nNextTab) : 0;
SvLBoxItem* pItem = nCurItem < nItemCount ? pEntry->GetItem(nCurItem) : 0;
- USHORT nFlags = pTab->nFlags;
+ sal_uInt16 nFlags = pTab->nFlags;
Size aSize( pItem->GetSize( pViewDataEntry, nCurItem ));
long nTabPos = GetTabPos( pEntry, pTab );
@@ -1638,7 +1640,7 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags,
if( !bHasClipRegion && nX + aSize.Width() >= nMaxRight )
{
SetClipRegion( Region(pImp->GetClipRegionRect()) );
- bHasClipRegion = TRUE;
+ bHasClipRegion = sal_True;
}
aEntryPos.X() = nX;
aEntryPos.Y() = nLine;
@@ -1648,7 +1650,7 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags,
Wallpaper aWallpaper = GetBackground();
int bSelTab = nFlags & SV_LBOXTAB_SHOW_SELECTION;
- USHORT nItemType = pItem->IsA();
+ sal_uInt16 nItemType = pItem->IsA();
if ( pViewDataEntry->IsSelected() && bSelTab && !pViewDataEntry->IsCursored() )
{
@@ -1762,7 +1764,7 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags,
SetFont( aBackupFont );
}
- USHORT nFirstDynTabPos;
+ sal_uInt16 nFirstDynTabPos;
SvLBoxTab* pFirstDynamicTab = GetFirstDynamicTab( nFirstDynTabPos );
long nDynTabPos = GetTabPos( pEntry, pFirstDynamicTab );
nDynTabPos += pImp->nNodeBmpTabDistance;
@@ -1776,7 +1778,7 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags,
{
// ersten festen Tab suchen, und pruefen ob die Node-Bitmap
// in ihn hineinragt
- USHORT nNextTab = nFirstDynTabPos;
+ sal_uInt16 nNextTab = nFirstDynTabPos;
SvLBoxTab* pNextTab;
do
{
@@ -1809,12 +1811,12 @@ long SvTreeListBox::PaintEntry1(SvLBoxEntry* pEntry,long nLine,USHORT nTabFlags,
}
aPos.Y() += (nTempEntryHeight - pImg->GetSizePixel().Height()) / 2;
- USHORT nStyle = 0;
+ sal_uInt16 nStyle = 0;
if ( !IsEnabled() )
nStyle |= IMAGE_DRAW_DISABLE;
//native
- BOOL bNativeOK = FALSE;
+ sal_Bool bNativeOK = sal_False;
if ( IsNativeControlSupported( CTRL_LISTNODE, PART_ENTIRE_CONTROL) )
{
ImplControlValue aControlValue;
@@ -1868,7 +1870,7 @@ Rectangle SvTreeListBox::GetFocusRect( SvLBoxEntry* pEntry, long nLine )
long nRealWidth = pImp->GetOutputSize().Width();
nRealWidth -= GetMapMode().GetOrigin().X();
- USHORT nCurTab;
+ sal_uInt16 nCurTab;
SvLBoxTab* pTab = GetFirstTab( SV_LBOXTAB_SHOW_SELECTION, nCurTab );
long nTabPos = 0;
if( pTab )
@@ -1886,7 +1888,7 @@ Rectangle SvTreeListBox::GetFocusRect( SvLBoxEntry* pEntry, long nLine )
nNextTabPos += 50;
}
- BOOL bUserSelection = (BOOL)( nTreeFlags & TREEFLAG_USESEL ) != 0;
+ sal_Bool bUserSelection = (sal_Bool)( nTreeFlags & TREEFLAG_USESEL ) != 0;
if( !bUserSelection )
{
if( pTab && nCurTab < pEntry->ItemCount() )
@@ -1911,7 +1913,7 @@ Rectangle SvTreeListBox::GetFocusRect( SvLBoxEntry* pEntry, long nLine )
// wenn erster SelTab != 0, dann muessen wir auch rechnen
if( nFocusWidth == -1 || nFirstSelTab )
{
- USHORT nLastTab;
+ sal_uInt16 nLastTab;
SvLBoxTab* pLastTab = GetLastTab(SV_LBOXTAB_SHOW_SELECTION,nLastTab);
nLastTab++;
if( nLastTab < aTabs.Count() ) // gibts noch einen ?
@@ -1959,23 +1961,23 @@ long SvTreeListBox::GetTabPos( SvLBoxEntry* pEntry, SvLBoxTab* pTab)
long nPos = pTab->GetPos();
if( pTab->IsDynamic() )
{
- USHORT nDepth = pModel->GetDepth( pEntry );
- nDepth = nDepth * (USHORT)nIndent;
+ sal_uInt16 nDepth = pModel->GetDepth( pEntry );
+ nDepth = nDepth * (sal_uInt16)nIndent;
nPos += (long)nDepth;
}
return nPos;
}
SvLBoxItem* SvTreeListBox::GetItem_Impl( SvLBoxEntry* pEntry, long nX,
- SvLBoxTab** ppTab, USHORT nEmptyWidth )
+ SvLBoxTab** ppTab, sal_uInt16 nEmptyWidth )
{
DBG_CHKTHIS(SvTreeListBox,0);
SvLBoxItem* pItemClicked = 0;
- USHORT nTabCount = aTabs.Count();
- USHORT nItemCount = pEntry->ItemCount();
+ sal_uInt16 nTabCount = aTabs.Count();
+ sal_uInt16 nItemCount = pEntry->ItemCount();
SvLBoxTab* pTab = (SvLBoxTab*)aTabs.GetObject(0);
SvLBoxItem* pItem = pEntry->GetItem(0);
- USHORT nNextItem = 1;
+ sal_uInt16 nNextItem = 1;
nX -= GetMapMode().GetOrigin().X();
long nRealWidth = pImp->GetOutputSize().Width();
nRealWidth -= GetMapMode().GetOrigin().X();
@@ -2044,9 +2046,9 @@ SvLBoxItem* SvTreeListBox::GetFirstDynamicItem( SvLBoxEntry* pEntry )
SvLBoxTab* pTab = (SvLBoxTab*)aTabs.GetObject(0);
SvLBoxItem* pItem = pEntry->GetItem(0);
- USHORT nTabCount = aTabs.Count();
+ sal_uInt16 nTabCount = aTabs.Count();
- USHORT nNext = 1;
+ sal_uInt16 nNext = 1;
while ( !pTab->IsDynamic() && nNext < nTabCount )
{
pItem = pEntry->GetItem( nNext );
@@ -2056,7 +2058,7 @@ SvLBoxItem* SvTreeListBox::GetFirstDynamicItem( SvLBoxEntry* pEntry )
return pItem;
}
-void SvTreeListBox::AddTab(long nTabPos,USHORT nFlags,void* pUserData )
+void SvTreeListBox::AddTab(long nTabPos,sal_uInt16 nFlags,void* pUserData )
{
DBG_CHKTHIS(SvTreeListBox,0);
nFocusWidth = -1;
@@ -2065,7 +2067,7 @@ void SvTreeListBox::AddTab(long nTabPos,USHORT nFlags,void* pUserData )
aTabs.Insert( pTab, aTabs.Count() );
if( nTreeFlags & TREEFLAG_USESEL )
{
- USHORT nPos = aTabs.Count() - 1;
+ sal_uInt16 nPos = aTabs.Count() - 1;
if( nPos >= nFirstSelTab && nPos <= nLastSelTab )
pTab->nFlags |= SV_LBOXTAB_SHOW_SELECTION;
else
@@ -2077,11 +2079,11 @@ void SvTreeListBox::AddTab(long nTabPos,USHORT nFlags,void* pUserData )
-SvLBoxTab* SvTreeListBox::GetFirstDynamicTab( USHORT& rPos ) const
+SvLBoxTab* SvTreeListBox::GetFirstDynamicTab( sal_uInt16& rPos ) const
{
DBG_CHKTHIS(SvTreeListBox,0);
- USHORT nCurTab = 0;
- USHORT nTabCount = aTabs.Count();
+ sal_uInt16 nCurTab = 0;
+ sal_uInt16 nTabCount = aTabs.Count();
while( nCurTab < nTabCount )
{
SvLBoxTab* pTab = (SvLBoxTab*)aTabs.GetObject(nCurTab);
@@ -2097,21 +2099,21 @@ SvLBoxTab* SvTreeListBox::GetFirstDynamicTab( USHORT& rPos ) const
SvLBoxTab* SvTreeListBox::GetFirstDynamicTab() const
{
- USHORT nDummy;
+ sal_uInt16 nDummy;
return GetFirstDynamicTab( nDummy );
}
SvLBoxTab* SvTreeListBox::GetTab( SvLBoxEntry* pEntry, SvLBoxItem* pItem) const
{
DBG_CHKTHIS(SvTreeListBox,0);
- USHORT nPos = pEntry->GetPos( pItem );
+ sal_uInt16 nPos = pEntry->GetPos( pItem );
return (SvLBoxTab*)aTabs.GetObject( nPos );
}
void SvTreeListBox::ClearTabList()
{
DBG_CHKTHIS(SvTreeListBox,0);
- USHORT nTabCount = aTabs.Count();
+ sal_uInt16 nTabCount = aTabs.Count();
while( nTabCount )
{
nTabCount--;
@@ -2155,7 +2157,7 @@ void SvTreeListBox::NotifyInvalidating()
DBG_CHKTHIS(SvTreeListBox,0);
}
-void SvTreeListBox::Invalidate( USHORT nInvalidateFlags )
+void SvTreeListBox::Invalidate( sal_uInt16 nInvalidateFlags )
{
DBG_CHKTHIS(SvTreeListBox,0);
if( nFocusWidth == -1 )
@@ -2166,7 +2168,7 @@ void SvTreeListBox::Invalidate( USHORT nInvalidateFlags )
pImp->Invalidate();
}
-void SvTreeListBox::Invalidate( const Rectangle& rRect, USHORT nInvalidateFlags )
+void SvTreeListBox::Invalidate( const Rectangle& rRect, sal_uInt16 nInvalidateFlags )
{
DBG_CHKTHIS(SvTreeListBox,0);
if( nFocusWidth == -1 )
@@ -2177,11 +2179,11 @@ void SvTreeListBox::Invalidate( const Rectangle& rRect, USHORT nInvalidateFlags
}
-void SvTreeListBox::SetHighlightRange( USHORT nStart, USHORT nEnd)
+void SvTreeListBox::SetHighlightRange( sal_uInt16 nStart, sal_uInt16 nEnd)
{
DBG_CHKTHIS(SvTreeListBox,0);
- USHORT nTemp;
+ sal_uInt16 nTemp;
nTreeFlags |= TREEFLAG_USESEL;
if( nStart > nEnd )
{
@@ -2204,12 +2206,12 @@ void SvTreeListBox::RemoveHighlightRange()
Invalidate();
}
-ULONG SvTreeListBox::GetAscInsertionPos(SvLBoxEntry*,SvLBoxEntry*)
+sal_uLong SvTreeListBox::GetAscInsertionPos(SvLBoxEntry*,SvLBoxEntry*)
{
return LIST_APPEND;
}
-ULONG SvTreeListBox::GetDescInsertionPos(SvLBoxEntry*,SvLBoxEntry*)
+sal_uLong SvTreeListBox::GetDescInsertionPos(SvLBoxEntry*,SvLBoxEntry*)
{
DBG_CHKTHIS(SvTreeListBox,0);
return LIST_APPEND;
@@ -2255,10 +2257,10 @@ void SvTreeListBox::RemoveParentKeepChilds( SvLBoxEntry* pParent )
pModel->Remove( pParent );
}
-SvLBoxTab* SvTreeListBox::GetFirstTab( USHORT nFlagMask, USHORT& rPos )
+SvLBoxTab* SvTreeListBox::GetFirstTab( sal_uInt16 nFlagMask, sal_uInt16& rPos )
{
- USHORT nTabCount = aTabs.Count();
- for( USHORT nPos = 0; nPos < nTabCount; nPos++ )
+ sal_uInt16 nTabCount = aTabs.Count();
+ for( sal_uInt16 nPos = 0; nPos < nTabCount; nPos++ )
{
SvLBoxTab* pTab = (SvLBoxTab*)aTabs.GetObject( nPos );
if( (pTab->nFlags & nFlagMask) )
@@ -2271,17 +2273,17 @@ SvLBoxTab* SvTreeListBox::GetFirstTab( USHORT nFlagMask, USHORT& rPos )
return 0;
}
-SvLBoxTab* SvTreeListBox::GetLastTab( USHORT nFlagMask, USHORT& rTabPos )
+SvLBoxTab* SvTreeListBox::GetLastTab( sal_uInt16 nFlagMask, sal_uInt16& rTabPos )
{
short nTabCount = (short)aTabs.Count();
if( nTabCount )
{
for( short nPos = nTabCount-1; nPos >= 0; nPos-- )
{
- SvLBoxTab* pTab = (SvLBoxTab*)aTabs.GetObject( (USHORT)nPos );
+ SvLBoxTab* pTab = (SvLBoxTab*)aTabs.GetObject( (sal_uInt16)nPos );
if( (pTab->nFlags & nFlagMask) )
{
- rTabPos = (USHORT)nPos;
+ rTabPos = (sal_uInt16)nPos;
return pTab;
}
}
@@ -2290,12 +2292,12 @@ SvLBoxTab* SvTreeListBox::GetLastTab( USHORT nFlagMask, USHORT& rTabPos )
return 0;
}
-void SvTreeListBox::SetAddMode( BOOL bAdd )
+void SvTreeListBox::SetAddMode( sal_Bool bAdd )
{
pImp->SetAddMode( bAdd );
}
-BOOL SvTreeListBox::IsAddMode() const
+sal_Bool SvTreeListBox::IsAddMode() const
{
return pImp->IsAddMode();
}
@@ -2321,8 +2323,8 @@ IMPL_LINK( SvTreeListBox, DefaultCompare, SvSortData*, pData )
return pImp->pIntlWrapper->getCaseCollator()->compareString( aLeft, aRight );
}
-void SvTreeListBox::ModelNotification( USHORT nActionId, SvListEntry* pEntry1,
- SvListEntry* pEntry2, ULONG nPos )
+void SvTreeListBox::ModelNotification( sal_uInt16 nActionId, SvListEntry* pEntry1,
+ SvListEntry* pEntry2, sal_uLong nPos )
{
if( nActionId == LISTACTION_CLEARING )
CancelTextEditing();
@@ -2350,14 +2352,14 @@ void SvTreeListBox::ModelNotification( USHORT nActionId, SvListEntry* pEntry1,
break;
case LISTACTION_RESORTING:
- SetUpdateMode( FALSE );
+ SetUpdateMode( sal_False );
break;
case LISTACTION_RESORTED:
// nach Sortierung den ersten Eintrag anzeigen, dabei die
// Selektion erhalten.
- MakeVisible( (SvLBoxEntry*)pModel->First(), TRUE );
- SetUpdateMode( TRUE );
+ MakeVisible( (SvLBoxEntry*)pModel->First(), sal_True );
+ SetUpdateMode( sal_True );
break;
case LISTACTION_CLEARED:
@@ -2372,8 +2374,8 @@ long SvTreeListBox::GetTextOffset() const
{
DBG_CHKTHIS(SvTreeListBox,0);
const WinBits nWindowStyle = GetStyle();
- BOOL bHasButtons = (nWindowStyle & WB_HASBUTTONS)!=0;
- BOOL bHasButtonsAtRoot = (nWindowStyle & (WB_HASLINESATROOT |
+ sal_Bool bHasButtons = (nWindowStyle & WB_HASBUTTONS)!=0;
+ sal_Bool bHasButtonsAtRoot = (nWindowStyle & (WB_HASLINESATROOT |
WB_HASBUTTONSATROOT))!=0;
long nStartPos = TAB_STARTPOS;
long nNodeWidthPixel = GetExpandedNodeBmp().GetSizePixel().Width();
@@ -2451,12 +2453,12 @@ void SvTreeListBox::EndSelection()
pImp->EndSelection();
}
-BOOL SvTreeListBox::IsNodeButton( const Point& rPos ) const
+sal_Bool SvTreeListBox::IsNodeButton( const Point& rPos ) const
{
SvLBoxEntry* pEntry = GetEntry( rPos );
if( pEntry )
return pImp->IsNodeButton( rPos, pEntry );
- return FALSE;
+ return sal_False;
}
void SvTreeListBox::RepaintScrollBars() const
@@ -2474,7 +2476,7 @@ ScrollBar *SvTreeListBox::GetHScroll()
return &((SvTreeListBox*)this)->pImp->aHorSBar;
}
-void SvTreeListBox::EnableAsyncDrag( BOOL b )
+void SvTreeListBox::EnableAsyncDrag( sal_Bool b )
{
pImp->EnableAsyncDrag( b );
}
@@ -2512,9 +2514,9 @@ void SvTreeListBox::DataChanged( const DataChangedEvent& rDCEvt )
{
if( (rDCEvt.GetType()==DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
- nEntryHeight = 0; // _together_ with TRUE of 1. par (bFont) of InitSettings() a zero-height
+ nEntryHeight = 0; // _together_ with sal_True of 1. par (bFont) of InitSettings() a zero-height
// forces complete recalc of heights!
- InitSettings( TRUE, TRUE, TRUE );
+ InitSettings( sal_True, sal_True, sal_True );
Invalidate();
}
else
@@ -2528,7 +2530,7 @@ void SvTreeListBox::StateChanged( StateChangedType i_nStateChange )
ImplInitStyle();
}
-void SvTreeListBox::InitSettings(BOOL bFont,BOOL bForeground,BOOL bBackground)
+void SvTreeListBox::InitSettings(sal_Bool bFont,sal_Bool bForeground,sal_Bool bBackground)
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
if( bFont )
@@ -2555,17 +2557,17 @@ void SvTreeListBox::InitSettings(BOOL bFont,BOOL bForeground,BOOL bBackground)
pCheckButtonData->SetDefaultImages( this );
}
-BOOL SvTreeListBox::IsCellFocusEnabled() const
+sal_Bool SvTreeListBox::IsCellFocusEnabled() const
{
return pImp->IsCellFocusEnabled();
}
-bool SvTreeListBox::SetCurrentTabPos( USHORT _nNewPos )
+bool SvTreeListBox::SetCurrentTabPos( sal_uInt16 _nNewPos )
{
return pImp->SetCurrentTabPos( _nNewPos );
}
-USHORT SvTreeListBox::GetCurrentTabPos() const
+sal_uInt16 SvTreeListBox::GetCurrentTabPos() const
{
return pImp->GetCurrentTabPos();
}
@@ -2587,7 +2589,7 @@ PopupMenu* SvTreeListBox::CreateContextMenu( void )
return NULL;
}
-void SvTreeListBox::ExcecuteContextMenuAction( USHORT )
+void SvTreeListBox::ExcecuteContextMenuAction( sal_uInt16 )
{
DBG_WARNING( "SvTreeListBox::ExcecuteContextMenuAction(): now there's happening nothing!" );
}
@@ -2596,17 +2598,17 @@ void SvTreeListBox::EnableContextMenuHandling( void )
{
DBG_ASSERT( pImp, "-SvTreeListBox::EnableContextMenuHandling(): No implementation!" );
- pImp->bContextMenuHandling = TRUE;
+ pImp->bContextMenuHandling = sal_True;
}
-void SvTreeListBox::EnableContextMenuHandling( BOOL b )
+void SvTreeListBox::EnableContextMenuHandling( sal_Bool b )
{
DBG_ASSERT( pImp, "-SvTreeListBox::EnableContextMenuHandling(): No implementation!" );
pImp->bContextMenuHandling = b;
}
-BOOL SvTreeListBox::IsContextMenuHandlingEnabled( void ) const
+sal_Bool SvTreeListBox::IsContextMenuHandlingEnabled( void ) const
{
DBG_ASSERT( pImp, "-SvTreeListBox::IsContextMenuHandlingEnabled(): No implementation!" );
@@ -2671,7 +2673,7 @@ void SvTreeListBox::EnableCellFocus()
pImp->EnableCellFocus();
}
-void SvTreeListBox::CallImplEventListeners(ULONG nEvent, void* pData)
+void SvTreeListBox::CallImplEventListeners(sal_uLong nEvent, void* pData)
{
CallEventListeners(nEvent, pData);
}
diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx
index 86bab5b8e42a..2959d8e0460f 100644
--- a/svtools/source/contnr/templwin.cxx
+++ b/svtools/source/contnr/templwin.cxx
@@ -121,7 +121,7 @@ extern ::rtl::OUString CreateExactSizeText_Impl( sal_Int64 nSize ); // fileview.
struct FolderHistory
{
String m_sURL;
- ULONG m_nGroup;
+ sal_uLong m_nGroup;
FolderHistory( const String& _rURL, sal_Int32 _nGroup ) :
m_sURL( _rURL ), m_nGroup( _nGroup ) {}
@@ -134,7 +134,7 @@ ODocumentInfoPreview::ODocumentInfoPreview( Window* pParent ,WinBits _nBits) : W
{
m_pEditWin = new SvtExtendedMultiLineEdit_Impl(this,_nBits);
m_pEditWin->Show();
- m_pEditWin->EnableCursor( FALSE );
+ m_pEditWin->EnableCursor( sal_False );
m_pInfoTable = new SvtDocInfoTable_Impl();
// detect application language
m_aLocale = SvtPathOptions().GetLocale();
@@ -183,7 +183,7 @@ void ODocumentInfoPreview::fill(
if (!i_xDocProps.is()) throw RuntimeException();
::rtl::OUString aStr;
- m_pEditWin->SetAutoScroll( FALSE );
+ m_pEditWin->SetAutoScroll( sal_False );
aStr = i_xDocProps->getTitle();
if (aStr.getLength()) {
@@ -237,7 +237,7 @@ void ODocumentInfoPreview::fill(
// size
if ( i_rURL.Len() > 0 )
{
- ULONG nDocSize = ::utl::UCBContentHelper::GetSize( i_rURL );
+ sal_uLong nDocSize = ::utl::UCBContentHelper::GetSize( i_rURL );
m_pEditWin->InsertEntry(
m_pInfoTable->GetString( DI_SIZE ),
CreateExactSizeText_Impl( nDocSize ) );
@@ -285,7 +285,7 @@ void ODocumentInfoPreview::fill(
}
m_pEditWin->SetSelection( Selection( 0, 0 ) );
- m_pEditWin->SetAutoScroll( TRUE );
+ m_pEditWin->SetAutoScroll( sal_True );
}
// -----------------------------------------------------------------------------
@@ -340,7 +340,7 @@ SvtIconWindow_Impl::SvtIconWindow_Impl( Window* pParent ) :
aIconCtrl.SetAccessibleName( String( RTL_CONSTASCII_USTRINGPARAM("Groups") ) );
aIconCtrl.SetHelpId( HID_TEMPLATEDLG_ICONCTRL );
- aIconCtrl.SetChoiceWithCursor( TRUE );
+ aIconCtrl.SetChoiceWithCursor( sal_True );
aIconCtrl.SetSelectionMode( SINGLE_SELECTION );
aIconCtrl.Show();
@@ -413,7 +413,7 @@ SvtIconWindow_Impl::SvtIconWindow_Impl( Window* pParent ) :
SvtIconWindow_Impl::~SvtIconWindow_Impl()
{
- for ( ULONG i = 0; i < aIconCtrl.GetEntryCount(); ++i )
+ for ( sal_uLong i = 0; i < aIconCtrl.GetEntryCount(); ++i )
{
SvxIconChoiceCtrlEntry* pEntry = aIconCtrl.GetEntry( i );
delete (String*)pEntry->GetUserData();
@@ -423,7 +423,7 @@ SvtIconWindow_Impl::~SvtIconWindow_Impl()
SvxIconChoiceCtrlEntry* SvtIconWindow_Impl::GetEntry( const String& rURL ) const
{
SvxIconChoiceCtrlEntry* pEntry = NULL;
- for ( ULONG i = 0; i < aIconCtrl.GetEntryCount(); ++i )
+ for ( sal_uLong i = 0; i < aIconCtrl.GetEntryCount(); ++i )
{
SvxIconChoiceCtrlEntry* pTemp = aIconCtrl.GetEntry( i );
String aURL( *( (String*)pTemp->GetUserData() ) );
@@ -461,7 +461,7 @@ String SvtIconWindow_Impl::GetCursorPosIconURL() const
String SvtIconWindow_Impl::GetSelectedIconURL() const
{
- ULONG nPos;
+ sal_uLong nPos;
SvxIconChoiceCtrlEntry* pEntry = aIconCtrl.GetSelectedEntry( nPos );
String aURL;
if ( pEntry )
@@ -471,7 +471,7 @@ String SvtIconWindow_Impl::GetSelectedIconURL() const
String SvtIconWindow_Impl::GetSelectedIconText() const
{
- ULONG nPos;
+ sal_uLong nPos;
return MnemonicGenerator::EraseAllMnemonicChars( aIconCtrl.GetSelectedEntry( nPos )->GetText() );
}
@@ -489,9 +489,9 @@ void SvtIconWindow_Impl::InvalidateIconControl()
aIconCtrl.Invalidate();
}
-ULONG SvtIconWindow_Impl::GetCursorPos() const
+sal_uLong SvtIconWindow_Impl::GetCursorPos() const
{
- ULONG nPos = ~ULONG(0);
+ sal_uLong nPos = ~sal_uLong(0);
SvxIconChoiceCtrlEntry* pCursorEntry = aIconCtrl.GetCursor( );
if ( pCursorEntry )
@@ -500,15 +500,15 @@ ULONG SvtIconWindow_Impl::GetCursorPos() const
return nPos;
}
-ULONG SvtIconWindow_Impl::GetSelectEntryPos() const
+sal_uLong SvtIconWindow_Impl::GetSelectEntryPos() const
{
- ULONG nPos;
+ sal_uLong nPos;
if ( !aIconCtrl.GetSelectedEntry( nPos ) )
- nPos = ~ULONG(0);
+ nPos = ~sal_uLong(0);
return nPos;
}
-void SvtIconWindow_Impl::SetCursorPos( ULONG nPos )
+void SvtIconWindow_Impl::SetCursorPos( sal_uLong nPos )
{
SvxIconChoiceCtrlEntry* pEntry = aIconCtrl.GetEntry( nPos );
aIconCtrl.SetCursor( pEntry );
@@ -525,7 +525,7 @@ long SvtIconWindow_Impl::CalcHeight() const
{
// calculate the required height of the IconControl
long nHeight = 0;
- ULONG nCount = aIconCtrl.GetEntryCount();
+ sal_uLong nCount = aIconCtrl.GetEntryCount();
if ( nCount > 0 )
// bottom of the last icon
nHeight = aIconCtrl.GetEntry(nCount-1)->GetBoundRect().Bottom();
@@ -544,9 +544,9 @@ sal_Bool SvtIconWindow_Impl::IsRootURL( const String& rURL ) const
rURL == aSamplesFolderRootURL;
}
-ULONG SvtIconWindow_Impl::GetRootPos( const String& rURL ) const
+sal_uLong SvtIconWindow_Impl::GetRootPos( const String& rURL ) const
{
- ULONG nPos = ~ULONG(0);
+ sal_uLong nPos = ~sal_uLong(0);
if ( aNewDocumentRootURL.Match( rURL ) == STRING_MATCH )
nPos = 0;
else if ( aTemplateRootURL.Match( rURL ) == STRING_MATCH )
@@ -646,7 +646,7 @@ Sequence< ::rtl::OUString > SvtFileViewWindow_Impl::GetNewDocContents() const
::rtl::OUString aImageURL;
::rtl::OUString aTargetFrame;
- UINT32 i, nCount = aDynamicMenuEntries.getLength();
+ sal_uInt32 i, nCount = aDynamicMenuEntries.getLength();
::rtl::OUString sSeparator( ASCII_STR("private:separator") );
::rtl::OUString sSlotURL( ASCII_STR("slot:5500") );
@@ -788,7 +788,7 @@ void SvtExtendedMultiLineEdit_Impl::InsertEntry( const String& rTitle, const Str
aText += rTitle;
aText += ':';
InsertText( aText );
- ULONG nPara = GetParagraphCount() - 1;
+ sal_uLong nPara = GetParagraphCount() - 1;
SetAttrib( TextAttribFontWeight( WEIGHT_BOLD ), nPara, 0, aText.Len() );
aText = '\n';
@@ -968,7 +968,7 @@ void SvtFrameWindow_Impl::OpenFile( const String& rURL, sal_Bool bPreview, sal_B
// disabling must be done here, does not work in ctor because
// execute of the dialog will overwrite it
// ( own execute method would help )
- pTextWin->EnableInput( FALSE, TRUE );
+ pTextWin->EnableInput( sal_False, sal_True );
if ( pTextWin->IsReallyVisible() )
{
sal_Bool b = sal_True;
@@ -1106,7 +1106,7 @@ SvtTemplateWindow::~SvtTemplateWindow()
delete pFrameWin;
if ( pHistoryList )
{
- for ( UINT32 i = 0; i < pHistoryList->Count(); ++i )
+ for ( sal_uInt32 i = 0; i < pHistoryList->Count(); ++i )
delete pHistoryList->GetObject(i);
delete pHistoryList;
}
@@ -1123,7 +1123,7 @@ IMPL_LINK ( SvtTemplateWindow , IconClickHdl_Impl, SvtIconChoiceCtrl *, EMPTYARG
{
pFileWin->OpenRoot( aURL );
pIconWin->InvalidateIconControl();
- aFileViewTB.EnableItem( TI_DOCTEMPLATE_PRINT, FALSE );
+ aFileViewTB.EnableItem( TI_DOCTEMPLATE_PRINT, sal_False );
}
return 0;
}
@@ -1160,10 +1160,10 @@ IMPL_LINK ( SvtTemplateWindow , FileDblClickHdl_Impl, SvtFileView *, EMPTYARG )
IMPL_LINK ( SvtTemplateWindow , NewFolderHdl_Impl, SvtFileView *, EMPTYARG )
{
pFrameWin->OpenFile( String(), sal_True, sal_False, sal_False );
- aFileViewTB.EnableItem( TI_DOCTEMPLATE_PRINT, FALSE );
+ aFileViewTB.EnableItem( TI_DOCTEMPLATE_PRINT, sal_False );
String sURL = pFileWin->GetFolderURL();
- ULONG nPos = pIconWin->GetRootPos( sURL );
+ sal_uLong nPos = pIconWin->GetRootPos( sURL );
AppendHistoryURL( sURL, nPos );
aNewFolderHdl.Call( this );
@@ -1234,7 +1234,7 @@ void SvtTemplateWindow::PrintFile( const String& rURL )
// ------------------------------------------------------------------------
-void SvtTemplateWindow::AppendHistoryURL( const String& rURL, ULONG nGroup )
+void SvtTemplateWindow::AppendHistoryURL( const String& rURL, sal_uLong nGroup )
{
sal_Bool bInsert = sal_True;
if ( !pHistoryList )
@@ -1267,7 +1267,7 @@ void SvtTemplateWindow::OpenHistory()
// ------------------------------------------------------------------------
-void SvtTemplateWindow::DoAction( USHORT nAction )
+void SvtTemplateWindow::DoAction( sal_uInt16 nAction )
{
switch( nAction )
{
@@ -1316,16 +1316,16 @@ void SvtTemplateWindow::InitToolBoxes()
aSize.Height() += 4;
aFrameWinTB.SetPosSizePixel( Point( pFrameWin->GetPosPixel().X() + 2, 2 ), aSize );
- BOOL bFlat = ( SvtMiscOptions().GetToolboxStyle() == TOOLBOX_STYLE_FLAT );
+ sal_Bool bFlat = ( SvtMiscOptions().GetToolboxStyle() == TOOLBOX_STYLE_FLAT );
if ( bFlat )
{
aFileViewTB.SetOutStyle( TOOLBOX_STYLE_FLAT );
aFrameWinTB.SetOutStyle( TOOLBOX_STYLE_FLAT );
}
- aFileViewTB.EnableItem( TI_DOCTEMPLATE_BACK, FALSE );
- aFileViewTB.EnableItem( TI_DOCTEMPLATE_PREV, FALSE );
- aFileViewTB.EnableItem( TI_DOCTEMPLATE_PRINT, FALSE );
+ aFileViewTB.EnableItem( TI_DOCTEMPLATE_BACK, sal_False );
+ aFileViewTB.EnableItem( TI_DOCTEMPLATE_PREV, sal_False );
+ aFileViewTB.EnableItem( TI_DOCTEMPLATE_PRINT, sal_False );
Link aLink = LINK( this, SvtTemplateWindow, ClickHdl_Impl );
aFileViewTB.SetClickHdl( aLink );
@@ -1337,7 +1337,7 @@ void SvtTemplateWindow::InitToolBoxes()
void SvtTemplateWindow::InitToolBoxImages()
{
SvtMiscOptions aMiscOpt;
- BOOL bLarge = aMiscOpt.AreCurrentSymbolsLarge();
+ sal_Bool bLarge = aMiscOpt.AreCurrentSymbolsLarge();
sal_Bool bHiContrast = aFileViewTB.GetSettings().GetStyleSettings().GetHighContrastMode();
aFileViewTB.SetItemImage( TI_DOCTEMPLATE_BACK, Image( SvtResId(
@@ -1369,13 +1369,13 @@ void SvtTemplateWindow::UpdateIcons()
long SvtTemplateWindow::PreNotify( NotifyEvent& rNEvt )
{
- USHORT nType = rNEvt.GetType();
+ sal_uInt16 nType = rNEvt.GetType();
long nRet = 0;
if ( EVENT_KEYINPUT == nType && rNEvt.GetKeyEvent() )
{
const KeyCode& rKeyCode = rNEvt.GetKeyEvent()->GetKeyCode();
- USHORT nCode = rKeyCode.GetCode();
+ sal_uInt16 nCode = rKeyCode.GetCode();
if ( KEY_BACKSPACE == nCode && !rKeyCode.GetModifier() && pFileWin->HasChildPathFocus() )
{
@@ -1574,7 +1574,7 @@ void SvtTemplateWindow::ReadViewSettings()
// the selected view (details or preview)
pFrameWin->ToggleView( TI_DOCTEMPLATE_DOCINFO == nSelectedView );
- aFrameWinTB.CheckItem( (sal_uInt16)nSelectedView, TRUE );
+ aFrameWinTB.CheckItem( (sal_uInt16)nSelectedView, sal_True );
// the split ratio
sal_Int32 nSplitFileAndFrameSize = aSplitWin.GetItemSize( FILEWIN_ID ) + aSplitWin.GetItemSize( FRAMEWIN_ID );
diff --git a/svtools/source/contnr/templwin.hxx b/svtools/source/contnr/templwin.hxx
index d8ec12224f60..c6100ba5bc20 100644
--- a/svtools/source/contnr/templwin.hxx
+++ b/svtools/source/contnr/templwin.hxx
@@ -94,13 +94,13 @@ public:
String GetCursorPosIconURL() const;
String GetIconText( const String& rURL ) const;
void InvalidateIconControl();
- void SetCursorPos( ULONG nPos );
- ULONG GetCursorPos() const;
- ULONG GetSelectEntryPos() const;
+ void SetCursorPos( sal_uLong nPos );
+ sal_uLong GetCursorPos() const;
+ sal_uLong GetSelectEntryPos() const;
void SetFocus();
long CalcHeight() const;
sal_Bool IsRootURL( const String& rURL ) const;
- ULONG GetRootPos( const String& rURL ) const;
+ sal_uLong GetRootPos( const String& rURL ) const;
void UpdateIcons( sal_Bool _bHiContrast );
inline sal_Bool ProcessKeyEvent( const KeyEvent& rKEvt );
@@ -267,9 +267,9 @@ private:
DECL_LINK( ResizeHdl_Impl, SplitWindow* ); // used for split and initial setting of toolbar pos
void PrintFile( const String& rURL );
- void AppendHistoryURL( const String& rURL, ULONG nGroup );
+ void AppendHistoryURL( const String& rURL, sal_uLong nGroup );
void OpenHistory();
- void DoAction( USHORT nAction );
+ void DoAction( sal_uInt16 nAction );
void InitToolBoxes();
void InitToolBoxImages();
void UpdateIcons();
diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx
index 1b96f1ac89e4..c4ec516a735b 100644
--- a/svtools/source/contnr/treelist.cxx
+++ b/svtools/source/contnr/treelist.cxx
@@ -89,7 +89,7 @@ void SvListEntry::SetListPositions()
if( pChilds )
{
SvListEntry *pEntry = (SvListEntry*)pChilds->First();
- ULONG nCur = 0;
+ sal_uLong nCur = 0;
while ( pEntry )
{
pEntry->nListPos &= 0x80000000;
@@ -152,7 +152,7 @@ void SvTreeEntryList::DestroyAll()
SvTreeList::SvTreeList()
{
nEntryCount = 0;
- bAbsPositionsValid = FALSE;
+ bAbsPositionsValid = sal_False;
nRefCount = 1;
pRootItem = new SvListEntry;
eSortMode = SortNone;
@@ -188,11 +188,11 @@ SvTreeList::~SvTreeList()
|*
*************************************************************************/
-void SvTreeList::Broadcast( USHORT nActionId, SvListEntry* pEntry1,
- SvListEntry* pEntry2, ULONG nPos )
+void SvTreeList::Broadcast( sal_uInt16 nActionId, SvListEntry* pEntry1,
+ SvListEntry* pEntry2, sal_uLong nPos )
{
- ULONG nViewCount = aViewList.Count();
- for( ULONG nCurView = 0; nCurView < nViewCount; nCurView++ )
+ sal_uLong nViewCount = aViewList.Count();
+ for( sal_uLong nCurView = 0; nCurView < nViewCount; nCurView++ )
{
SvListView* pView = (SvListView*)aViewList.GetObject( nCurView );
if( pView )
@@ -202,7 +202,7 @@ void SvTreeList::Broadcast( USHORT nActionId, SvListEntry* pEntry1,
void SvTreeList::InsertView( SvListView* pView)
{
- ULONG nPos = aViewList.GetPos( pView );
+ sal_uLong nPos = aViewList.GetPos( pView );
if ( nPos == LIST_ENTRY_NOTFOUND )
{
aViewList.Insert( pView, LIST_APPEND );
@@ -212,7 +212,7 @@ void SvTreeList::InsertView( SvListView* pView)
void SvTreeList::RemoveView( SvListView* pView )
{
- ULONG nPos = aViewList.GetPos( pView );
+ sal_uLong nPos = aViewList.GetPos( pView );
if ( nPos != LIST_ENTRY_NOTFOUND )
{
aViewList.Remove( pView );
@@ -222,15 +222,15 @@ void SvTreeList::RemoveView( SvListView* pView )
// Ein Entry ist sichtbar, wenn alle Parents expandiert sind
-BOOL SvTreeList::IsEntryVisible( const SvListView* pView, SvListEntry* pEntry ) const
+sal_Bool SvTreeList::IsEntryVisible( const SvListView* pView, SvListEntry* pEntry ) const
{
DBG_ASSERT(pView&&pEntry,"IsVisible:Invalid Params");
- BOOL bRetVal=FALSE;
+ sal_Bool bRetVal=sal_False;
do
{
if ( pEntry == pRootItem )
{
- bRetVal=TRUE;
+ bRetVal=sal_True;
break;
}
pEntry = pEntry->pParent;
@@ -238,10 +238,10 @@ BOOL SvTreeList::IsEntryVisible( const SvListView* pView, SvListEntry* pEntry )
return bRetVal;
}
-USHORT SvTreeList::GetDepth( SvListEntry* pEntry ) const
+sal_uInt16 SvTreeList::GetDepth( SvListEntry* pEntry ) const
{
DBG_ASSERT(pEntry&&pEntry!=pRootItem,"GetDepth:Bad Entry");
- USHORT nDepth = 0;
+ sal_uInt16 nDepth = 0;
while( pEntry->pParent != pRootItem )
{
nDepth++;
@@ -290,20 +290,20 @@ void SvTreeList::Clear()
|*
*************************************************************************/
-BOOL SvTreeList::IsChild( SvListEntry* pParent, SvListEntry* pChild ) const
+sal_Bool SvTreeList::IsChild( SvListEntry* pParent, SvListEntry* pChild ) const
{
if ( !pParent )
pParent = pRootItem;
- BOOL bIsChild = FALSE;
+ sal_Bool bIsChild = sal_False;
SvTreeEntryList* pList = pParent->pChilds;
if ( !pList )
- return FALSE;
+ return sal_False;
SvListEntry* pActualChild = (SvListEntry*)(pList->First());
while( !bIsChild && pActualChild )
{
if ( pActualChild == pChild )
- bIsChild = TRUE;
+ bIsChild = sal_True;
else
{
if ( pActualChild->pChilds )
@@ -314,7 +314,7 @@ BOOL SvTreeList::IsChild( SvListEntry* pParent, SvListEntry* pChild ) const
return bIsChild;
}
-ULONG SvTreeList::Move(SvListEntry* pSrcEntry,SvListEntry* pTargetParent,ULONG nListPos)
+sal_uLong SvTreeList::Move(SvListEntry* pSrcEntry,SvListEntry* pTargetParent,sal_uLong nListPos)
{
// pDest darf Null sein!
DBG_ASSERT(pSrcEntry,"Entry?");
@@ -329,7 +329,7 @@ ULONG SvTreeList::Move(SvListEntry* pSrcEntry,SvListEntry* pTargetParent,ULONG n
if ( pSrcEntry == pTargetParent )
return pSrcEntry->GetChildListPos();
- bAbsPositionsValid = FALSE;
+ bAbsPositionsValid = sal_False;
SvTreeEntryList* pDstList = pTargetParent->pChilds;
SvTreeEntryList* pSrcList = pSrcEntry->pParent->pChilds;
@@ -358,20 +358,20 @@ ULONG SvTreeList::Move(SvListEntry* pSrcEntry,SvListEntry* pTargetParent,ULONG n
// Listenpositionen in Zielliste korrigieren
SetListPositions( pDstList );
- if ( pSrcList && (ULONG)pSrcList != (ULONG)pDstList )
+ if ( pSrcList && (sal_uLong)pSrcList != (sal_uLong)pDstList )
SetListPositions( pSrcList );
#ifdef CHECK_INTEGRITY
CheckIntegrity();
#endif
- ULONG nRetVal = pDstList->GetPos( pSrcEntry );
+ sal_uLong nRetVal = pDstList->GetPos( pSrcEntry );
DBG_ASSERT(nRetVal==pSrcEntry->GetChildListPos(),"ListPos not valid");
Broadcast( LISTACTION_MOVED,pSrcEntry,pTargetParent,nRetVal);
return nRetVal;
}
-ULONG SvTreeList::Copy(SvListEntry* pSrcEntry,SvListEntry* pTargetParent,ULONG nListPos)
+sal_uLong SvTreeList::Copy(SvListEntry* pSrcEntry,SvListEntry* pTargetParent,sal_uLong nListPos)
{
// pDest darf Null sein!
DBG_ASSERT(pSrcEntry,"Entry?");
@@ -380,9 +380,9 @@ ULONG SvTreeList::Copy(SvListEntry* pSrcEntry,SvListEntry* pTargetParent,ULONG n
if ( !pTargetParent->pChilds )
pTargetParent->pChilds = new SvTreeEntryList;
- bAbsPositionsValid = FALSE;
+ bAbsPositionsValid = sal_False;
- ULONG nCloneCount = 0;
+ sal_uLong nCloneCount = 0;
SvListEntry* pClonedEntry = Clone( pSrcEntry, nCloneCount );
nEntryCount += nCloneCount;
@@ -395,7 +395,7 @@ ULONG SvTreeList::Copy(SvListEntry* pSrcEntry,SvListEntry* pTargetParent,ULONG n
CheckIntegrity();
#endif
Broadcast( LISTACTION_INSERTED_TREE, pClonedEntry );
- ULONG nRetVal = pDstList->GetPos( pClonedEntry );
+ sal_uLong nRetVal = pDstList->GetPos( pClonedEntry );
return nRetVal;
}
@@ -414,7 +414,7 @@ CheckIntegrity();
void SvTreeList::Move( SvListEntry* pSrcEntry, SvListEntry* pDstEntry )
{
SvListEntry* pParent;
- ULONG nPos;
+ sal_uLong nPos;
if ( !pDstEntry )
{
@@ -443,7 +443,7 @@ void SvTreeList::Move( SvListEntry* pSrcEntry, SvListEntry* pDstEntry )
void SvTreeList::Copy( SvListEntry* pSrcEntry, SvListEntry* pDstEntry )
{
SvListEntry* pParent;
- ULONG nPos;
+ sal_uLong nPos;
if ( !pDstEntry )
{
@@ -470,7 +470,7 @@ void SvTreeList::Copy( SvListEntry* pSrcEntry, SvListEntry* pDstEntry )
void SvTreeList::InsertTree( SvListEntry* pSrcEntry, SvListEntry* pDstEntry)
{
SvListEntry* pParent;
- ULONG nPos;
+ sal_uLong nPos;
if ( !pDstEntry )
{
@@ -487,7 +487,7 @@ void SvTreeList::InsertTree( SvListEntry* pSrcEntry, SvListEntry* pDstEntry)
void SvTreeList::InsertTree(SvListEntry* pSrcEntry,
- SvListEntry* pTargetParent,ULONG nListPos)
+ SvListEntry* pTargetParent,sal_uLong nListPos)
{
DBG_ASSERT(pSrcEntry,"InsertTree:Entry?");
if ( !pSrcEntry )
@@ -501,7 +501,7 @@ void SvTreeList::InsertTree(SvListEntry* pSrcEntry,
// Sortierung beruecksichtigen
GetInsertionPos( pSrcEntry, pTargetParent, nListPos );
- bAbsPositionsValid = FALSE;
+ bAbsPositionsValid = sal_False;
pSrcEntry->pParent = pTargetParent; // Parent umsetzen
SvTreeEntryList* pDstList = pTargetParent->pChilds;
@@ -540,7 +540,7 @@ SvListEntry* SvTreeList::CreateEntry() const
|*
*************************************************************************/
-SvListEntry* SvTreeList::Clone( SvListEntry* pEntry, ULONG& nCloneCount ) const
+SvListEntry* SvTreeList::Clone( SvListEntry* pEntry, sal_uLong& nCloneCount ) const
{
SvListEntry* pClonedEntry = CloneEntry( pEntry );
nCloneCount = 1;
@@ -562,7 +562,7 @@ SvListEntry* SvTreeList::Clone( SvListEntry* pEntry, ULONG& nCloneCount ) const
SvTreeEntryList* SvTreeList::CloneChilds( SvTreeEntryList* pChilds,
SvListEntry* pNewParent,
- ULONG& nCloneCount ) const
+ sal_uLong& nCloneCount ) const
{
DBG_ASSERT(pChilds->Count(),"Childs?");
SvTreeEntryList* pClonedChilds = new SvTreeEntryList;
@@ -596,16 +596,16 @@ SvTreeEntryList* SvTreeList::CloneChilds( SvTreeEntryList* pChilds,
|*
*************************************************************************/
-ULONG SvTreeList::GetChildCount( SvListEntry* pParent ) const
+sal_uLong SvTreeList::GetChildCount( SvListEntry* pParent ) const
{
if ( !pParent )
return GetEntryCount();
if ( !pParent || !pParent->pChilds)
return 0;
- ULONG nCount = 0;
- USHORT nRefDepth = GetDepth( pParent );
- USHORT nActDepth = nRefDepth;
+ sal_uLong nCount = 0;
+ sal_uInt16 nRefDepth = GetDepth( pParent );
+ sal_uInt16 nActDepth = nRefDepth;
do
{
pParent = Next( pParent, &nActDepth );
@@ -625,16 +625,16 @@ ULONG SvTreeList::GetChildCount( SvListEntry* pParent ) const
|*
*************************************************************************/
-ULONG SvTreeList::GetVisibleChildCount(const SvListView* pView, SvListEntry* pParent) const
+sal_uLong SvTreeList::GetVisibleChildCount(const SvListView* pView, SvListEntry* pParent) const
{
DBG_ASSERT(pView,"GetVisChildCount:No View");
if ( !pParent )
pParent = pRootItem;
if ( !pParent || !pView->IsExpanded(pParent) || !pParent->pChilds )
return 0;
- ULONG nCount = 0;
- USHORT nRefDepth = GetDepth( pParent );
- USHORT nActDepth = nRefDepth;
+ sal_uLong nCount = 0;
+ sal_uInt16 nRefDepth = GetDepth( pParent );
+ sal_uInt16 nActDepth = nRefDepth;
do
{
pParent = NextVisible( pView, pParent, &nActDepth );
@@ -644,16 +644,16 @@ ULONG SvTreeList::GetVisibleChildCount(const SvListView* pView, SvListEntry* pPa
return nCount;
}
-ULONG SvTreeList::GetChildSelectionCount(const SvListView* pView,SvListEntry* pParent) const
+sal_uLong SvTreeList::GetChildSelectionCount(const SvListView* pView,SvListEntry* pParent) const
{
DBG_ASSERT(pView,"GetChildSelCount:No View");
if ( !pParent )
pParent = pRootItem;
if ( !pParent || !pParent->pChilds)
return 0;
- ULONG nCount = 0;
- USHORT nRefDepth = GetDepth( pParent );
- USHORT nActDepth = nRefDepth;
+ sal_uLong nCount = 0;
+ sal_uInt16 nRefDepth = GetDepth( pParent );
+ sal_uInt16 nActDepth = nRefDepth;
do
{
pParent = Next( pParent, &nActDepth );
@@ -692,22 +692,22 @@ SvListEntry* SvTreeList::First() const
|* Letzte Aenderung 17.08.94
|*
*************************************************************************/
-SvListEntry* SvTreeList::Next( SvListEntry* pActEntry, USHORT* pDepth ) const
+SvListEntry* SvTreeList::Next( SvListEntry* pActEntry, sal_uInt16* pDepth ) const
{
DBG_ASSERT( pActEntry && pActEntry->pParent, "SvTreeList::Next: invalid entry/parent!" );
if ( !pActEntry || !pActEntry->pParent )
return NULL;
- USHORT nDepth = 0;
- int bWithDepth = FALSE;
+ sal_uInt16 nDepth = 0;
+ int bWithDepth = sal_False;
if ( pDepth )
{
nDepth = *pDepth;
- bWithDepth = TRUE;
+ bWithDepth = sal_True;
}
SvTreeEntryList* pActualList = pActEntry->pParent->pChilds;
- ULONG nActualPos = pActEntry->GetChildListPos();
+ sal_uLong nActualPos = pActEntry->GetChildListPos();
if ( pActEntry->pChilds /* && pActEntry->pChilds->Count() */ )
{
@@ -756,20 +756,20 @@ SvListEntry* SvTreeList::Next( SvListEntry* pActEntry, USHORT* pDepth ) const
|* Letzte Aenderung 17.08.94
|*
*************************************************************************/
-SvListEntry* SvTreeList::Prev( SvListEntry* pActEntry, USHORT* pDepth ) const
+SvListEntry* SvTreeList::Prev( SvListEntry* pActEntry, sal_uInt16* pDepth ) const
{
DBG_ASSERT(pActEntry!=0,"Entry?");
- USHORT nDepth = 0;
- int bWithDepth = FALSE;
+ sal_uInt16 nDepth = 0;
+ int bWithDepth = sal_False;
if ( pDepth )
{
nDepth = *pDepth;
- bWithDepth = TRUE;
+ bWithDepth = sal_True;
}
SvTreeEntryList* pActualList = pActEntry->pParent->pChilds;
- ULONG nActualPos = pActEntry->GetChildListPos();
+ sal_uLong nActualPos = pActEntry->GetChildListPos();
if ( nActualPos > 0 )
{
@@ -809,7 +809,7 @@ SvListEntry* SvTreeList::Prev( SvListEntry* pActEntry, USHORT* pDepth ) const
|*
*************************************************************************/
-SvListEntry* SvTreeList::Last( USHORT* /* nDepth */ ) const
+SvListEntry* SvTreeList::Last( sal_uInt16* /* nDepth */ ) const
{
SvTreeEntryList* pActList = pRootItem->pChilds;
// if ( pActList->Count() == 0 )
@@ -835,7 +835,7 @@ SvListEntry* SvTreeList::Last( USHORT* /* nDepth */ ) const
|*
*************************************************************************/
-ULONG SvTreeList::GetVisiblePos( const SvListView* pView, SvListEntry* pEntry ) const
+sal_uLong SvTreeList::GetVisiblePos( const SvListView* pView, SvListEntry* pEntry ) const
{
DBG_ASSERT(pView&&pEntry,"View/Entry?");
@@ -859,7 +859,7 @@ ULONG SvTreeList::GetVisiblePos( const SvListView* pView, SvListEntry* pEntry )
|*
*************************************************************************/
-ULONG SvTreeList::GetVisibleCount( const SvListView* pView ) const
+sal_uLong SvTreeList::GetVisibleCount( const SvListView* pView ) const
{
DBG_ASSERT(pView,"GetVisCount:No View");
if( !pView->HasViewData() )
@@ -867,7 +867,7 @@ ULONG SvTreeList::GetVisibleCount( const SvListView* pView ) const
if ( pView->nVisibleCount )
return pView->nVisibleCount;
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
SvListEntry* pEntry = First(); // erster Eintrag immer sichtbar
while ( pEntry )
{
@@ -883,7 +883,7 @@ ULONG SvTreeList::GetVisibleCount( const SvListView* pView ) const
}
#endif
((SvListView*)pView)->nVisibleCount = nPos;
- ((SvListView*)pView)->bVisPositionsValid = TRUE;
+ ((SvListView*)pView)->bVisPositionsValid = sal_True;
return nPos;
}
@@ -901,22 +901,22 @@ ULONG SvTreeList::GetVisibleCount( const SvListView* pView ) const
// Funktion geht aus Geschwindigkeitsgruenden davon aus,
// das der uebergebene Eintrag bereits sichtbar ist
-SvListEntry* SvTreeList::NextVisible(const SvListView* pView,SvListEntry* pActEntry,USHORT* pActDepth) const
+SvListEntry* SvTreeList::NextVisible(const SvListView* pView,SvListEntry* pActEntry,sal_uInt16* pActDepth) const
{
DBG_ASSERT(pView,"NextVisible:No View");
if ( !pActEntry )
return 0;
- USHORT nDepth = 0;
- int bWithDepth = FALSE;
+ sal_uInt16 nDepth = 0;
+ int bWithDepth = sal_False;
if ( pActDepth )
{
nDepth = *pActDepth;
- bWithDepth = TRUE;
+ bWithDepth = sal_True;
}
SvTreeEntryList* pActualList = pActEntry->pParent->pChilds;
- ULONG nActualPos = pActEntry->GetChildListPos();
+ sal_uLong nActualPos = pActEntry->GetChildListPos();
if ( pView->IsExpanded(pActEntry) )
{
@@ -971,20 +971,20 @@ SvListEntry* SvTreeList::NextVisible(const SvListView* pView,SvListEntry* pActEn
// Funktion geht aus Geschwindigkeitsgruenden davon aus,
// das der uebergebene Eintrag bereits sichtbar ist
-SvListEntry* SvTreeList::PrevVisible(const SvListView* pView, SvListEntry* pActEntry, USHORT* pActDepth) const
+SvListEntry* SvTreeList::PrevVisible(const SvListView* pView, SvListEntry* pActEntry, sal_uInt16* pActDepth) const
{
DBG_ASSERT(pView&&pActEntry,"PrevVis:View/Entry?");
- USHORT nDepth = 0;
- int bWithDepth = FALSE;
+ sal_uInt16 nDepth = 0;
+ int bWithDepth = sal_False;
if ( pActDepth )
{
nDepth = *pActDepth;
- bWithDepth = TRUE;
+ bWithDepth = sal_True;
}
SvTreeEntryList* pActualList = pActEntry->pParent->pChilds;
- ULONG nActualPos = pActEntry->GetChildListPos();
+ sal_uLong nActualPos = pActEntry->GetChildListPos();
if ( nActualPos > 0 )
{
@@ -1024,7 +1024,7 @@ SvListEntry* SvTreeList::PrevVisible(const SvListView* pView, SvListEntry* pActE
|*
*************************************************************************/
-SvListEntry* SvTreeList::LastVisible( const SvListView* pView, USHORT* pDepth) const
+SvListEntry* SvTreeList::LastVisible( const SvListView* pView, sal_uInt16* pDepth) const
{
DBG_ASSERT(pView,"LastVis:No View");
SvListEntry* pEntry = Last();
@@ -1045,20 +1045,20 @@ SvListEntry* SvTreeList::LastVisible( const SvListView* pView, USHORT* pDepth) c
|*
*************************************************************************/
-SvListEntry* SvTreeList::NextVisible(const SvListView* pView,SvListEntry* pEntry,USHORT& nDelta) const
+SvListEntry* SvTreeList::NextVisible(const SvListView* pView,SvListEntry* pEntry,sal_uInt16& nDelta) const
{
DBG_ASSERT(pView&&pEntry&&IsEntryVisible(pView,pEntry),"NextVis:Wrong Prms/!Vis");
- ULONG nVisPos = GetVisiblePos( pView, pEntry );
+ sal_uLong nVisPos = GetVisiblePos( pView, pEntry );
// nDelta Eintraege vorhanden ?
// Beispiel: 0,1,2,3,4,5,6,7,8,9 nVisPos=5 nDelta=7
// nNewDelta = 10-nVisPos-1 == 4
if ( nVisPos+nDelta >= pView->nVisibleCount )
{
- nDelta = (USHORT)(pView->nVisibleCount-nVisPos);
+ nDelta = (sal_uInt16)(pView->nVisibleCount-nVisPos);
nDelta--;
}
- USHORT nDeltaTmp = nDelta;
+ sal_uInt16 nDeltaTmp = nDelta;
while( nDeltaTmp )
{
pEntry = NextVisible( pView, pEntry );
@@ -1078,17 +1078,17 @@ SvListEntry* SvTreeList::NextVisible(const SvListView* pView,SvListEntry* pEntry
|*
*************************************************************************/
-SvListEntry* SvTreeList::PrevVisible( const SvListView* pView, SvListEntry* pEntry, USHORT& nDelta ) const
+SvListEntry* SvTreeList::PrevVisible( const SvListView* pView, SvListEntry* pEntry, sal_uInt16& nDelta ) const
{
DBG_ASSERT(pView&&pEntry&&IsEntryVisible(pView,pEntry),"PrevVis:Parms/!Vis");
- ULONG nVisPos = GetVisiblePos( pView, pEntry );
+ sal_uLong nVisPos = GetVisiblePos( pView, pEntry );
// nDelta Eintraege vorhanden ?
// Beispiel: 0,1,2,3,4,5,6,7,8,9 nVisPos=8 nDelta=20
// nNewDelta = nNewVisPos
if ( nDelta > nVisPos )
- nDelta = (USHORT)nVisPos;
- USHORT nDeltaTmp = nDelta;
+ nDelta = (sal_uInt16)nVisPos;
+ sal_uInt16 nDeltaTmp = nDelta;
while( nDeltaTmp )
{
pEntry = PrevVisible( pView, pEntry );
@@ -1138,8 +1138,8 @@ SvListEntry* SvTreeList::NextSibling( SvListEntry* pEntry ) const
if( !pEntry )
return 0;
SvTreeEntryList* pList = pEntry->pParent->pChilds;
-// ULONG nPos = pList->GetPos( pEntry );
- ULONG nPos = pEntry->GetChildListPos();
+// sal_uLong nPos = pList->GetPos( pEntry );
+ sal_uLong nPos = pEntry->GetChildListPos();
nPos++;
pEntry = (SvListEntry*)(pList->GetObject( nPos ));
return pEntry;
@@ -1152,8 +1152,8 @@ SvListEntry* SvTreeList::PrevSibling( SvListEntry* pEntry ) const
return 0;
SvTreeEntryList* pList = pEntry->pParent->pChilds;
- // ULONG nPos = pList->GetPos( pEntry );
- ULONG nPos = pEntry->GetChildListPos();
+ // sal_uLong nPos = pList->GetPos( pEntry );
+ sal_uLong nPos = pEntry->GetChildListPos();
if ( nPos == 0 )
return 0;
nPos--;
@@ -1243,7 +1243,7 @@ SvListEntry* SvTreeList::LastSelected( const SvListView* pView ) const
|* Letzte Aenderung 17.08.94
|*
*************************************************************************/
-ULONG SvTreeList::Insert( SvListEntry* pEntry,SvListEntry* pParent,ULONG nPos )
+sal_uLong SvTreeList::Insert( SvListEntry* pEntry,SvListEntry* pParent,sal_uLong nPos )
{
DBG_ASSERT( pEntry,"Entry?");
@@ -1262,7 +1262,7 @@ ULONG SvTreeList::Insert( SvListEntry* pEntry,SvListEntry* pParent,ULONG nPos )
// Sortierung beruecksichtigen
GetInsertionPos( pEntry, pParent, nPos );
- bAbsPositionsValid = FALSE;
+ bAbsPositionsValid = sal_False;
pEntry->pParent = pParent;
pList->Insert( pEntry, nPos );
@@ -1289,7 +1289,7 @@ CheckIntegrity();
|*
*************************************************************************/
-ULONG SvTreeList::GetAbsPos( SvListEntry* pEntry) const
+sal_uLong SvTreeList::GetAbsPos( SvListEntry* pEntry) const
{
if ( !bAbsPositionsValid )
((SvTreeList*)this)->SetAbsolutePositions();
@@ -1308,7 +1308,7 @@ ULONG SvTreeList::GetAbsPos( SvListEntry* pEntry) const
void SvTreeList::SetAbsolutePositions()
{
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
SvListEntry* pEntry = First();
while ( pEntry )
{
@@ -1316,7 +1316,7 @@ void SvTreeList::SetAbsolutePositions()
nPos++;
pEntry = Next( pEntry );
}
- bAbsPositionsValid = TRUE;
+ bAbsPositionsValid = sal_True;
#ifdef CHECK_INTEGRITY
CheckIntegrity();
#endif
@@ -1347,7 +1347,7 @@ void SvTreeList::Expand( SvListView* pView, SvListEntry* pEntry )
// wenn Parent sichtbar dann Statusdaten invalidieren
if ( pView->IsExpanded( pParent ) )
{
- pView->bVisPositionsValid = FALSE;
+ pView->bVisPositionsValid = sal_False;
pView->nVisibleCount = 0;
}
#ifdef CHECK_INTEGRITY
@@ -1380,7 +1380,7 @@ void SvTreeList::Collapse( SvListView* pView, SvListEntry* pEntry )
if ( pView->IsExpanded(pParent) )
{
pView->nVisibleCount = 0;
- pView->bVisPositionsValid = FALSE;
+ pView->bVisPositionsValid = sal_False;
}
#ifdef CHECK_INTEGRITY
CheckIntegrity();
@@ -1398,14 +1398,14 @@ CheckIntegrity();
|*
*************************************************************************/
-BOOL SvTreeList::Select( SvListView* pView, SvListEntry* pEntry, BOOL bSelect )
+sal_Bool SvTreeList::Select( SvListView* pView, SvListEntry* pEntry, sal_Bool bSelect )
{
DBG_ASSERT(pView&&pEntry,"Select:View/Entry?");
SvViewData* pViewData = pView->GetViewData( pEntry );
if ( bSelect )
{
if ( pViewData->IsSelected() || !pViewData->IsSelectable() )
- return FALSE;
+ return sal_False;
else
{
pViewData->nFlags |= SVLISTENTRYFLAG_SELECTED;
@@ -1415,7 +1415,7 @@ BOOL SvTreeList::Select( SvListView* pView, SvListEntry* pEntry, BOOL bSelect )
else
{
if ( !pViewData->IsSelected() )
- return FALSE;
+ return sal_False;
else
{
pViewData->nFlags &= ~( SVLISTENTRYFLAG_SELECTED );
@@ -1425,7 +1425,7 @@ BOOL SvTreeList::Select( SvListView* pView, SvListEntry* pEntry, BOOL bSelect )
#ifdef CHECK_INTEGRITY
CheckIntegrity();
#endif
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -1437,7 +1437,7 @@ CheckIntegrity();
|* Letzte Aenderung 05.04.01
|*
*************************************************************************/
-BOOL SvTreeList::Remove( SvListEntry* pEntry )
+sal_Bool SvTreeList::Remove( SvListEntry* pEntry )
{
DBG_ASSERT(pEntry,"Cannot remove root, use clear");
@@ -1448,22 +1448,22 @@ BOOL SvTreeList::Remove( SvListEntry* pEntry )
// Explorer aus der View Eintraege, die er nicht in die View
// eingefuegt hat. Da sich der Kunde fuer ein platzendes
// Office nichts kaufen kann, fange ich diesen Fall ab.
- return FALSE;
+ return sal_False;
}
Broadcast( LISTACTION_REMOVING, pEntry );
- ULONG nRemoved = 1 + GetChildCount(pEntry);
- bAbsPositionsValid = FALSE;
+ sal_uLong nRemoved = 1 + GetChildCount(pEntry);
+ bAbsPositionsValid = sal_False;
SvListEntry* pParent = pEntry->pParent;
SvTreeEntryList* pList = pParent->pChilds;
DBG_ASSERT(pList,"Remove:No Childlist");
- BOOL bLastEntry = FALSE;
+ sal_Bool bLastEntry = sal_False;
if ( pEntry->HasChildListPos() )
{
- ULONG nListPos = pEntry->GetChildListPos();
- bLastEntry = (nListPos == (pList->Count()-1) ) ? TRUE : FALSE;
+ sal_uLong nListPos = pEntry->GetChildListPos();
+ bLastEntry = (nListPos == (pList->Count()-1) ) ? sal_True : sal_False;
pList->Remove( nListPos );
}
else
@@ -1493,7 +1493,7 @@ CheckIntegrity();
Broadcast( LISTACTION_REMOVED, pEntry );
delete pEntry; // loescht auch alle Childs
- return TRUE;
+ return sal_True;
}
/*************************************************************************
@@ -1506,7 +1506,7 @@ CheckIntegrity();
|*
*************************************************************************/
-ULONG SvTreeList::SelectChilds(SvListView* pView, SvListEntry* pParent,BOOL bSelect )
+sal_uLong SvTreeList::SelectChilds(SvListView* pView, SvListEntry* pParent,sal_Bool bSelect )
{
DBG_ASSERT(pView&&pParent,"SelChilds:View/Parent?");
if ( !pParent->pChilds )
@@ -1514,9 +1514,9 @@ ULONG SvTreeList::SelectChilds(SvListView* pView, SvListEntry* pParent,BOOL bSel
if ( pParent->pChilds->Count() == 0 )
return 0;
- USHORT nRefDepth = GetDepth( pParent );
- USHORT nDepth = nRefDepth;
- ULONG nCount = 0;
+ sal_uInt16 nRefDepth = GetDepth( pParent );
+ sal_uInt16 nDepth = nRefDepth;
+ sal_uLong nCount = 0;
pParent = Next( pParent );
do
{
@@ -1531,7 +1531,7 @@ CheckIntegrity();
return nCount;
}
-void SvTreeList::SelectAll( SvListView* pView, BOOL bSelect )
+void SvTreeList::SelectAll( SvListView* pView, sal_Bool bSelect )
{
DBG_ASSERT(pView,"SelectAll:NoView");
SvListEntry* pEntry = First();
@@ -1555,7 +1555,7 @@ CheckIntegrity();
}
-SvListEntry* SvTreeList::GetEntryAtAbsPos( ULONG nAbsPos ) const
+SvListEntry* SvTreeList::GetEntryAtAbsPos( sal_uLong nAbsPos ) const
{
SvListEntry* pEntry = First();
while ( nAbsPos && pEntry )
@@ -1566,7 +1566,7 @@ SvListEntry* SvTreeList::GetEntryAtAbsPos( ULONG nAbsPos ) const
return pEntry;
}
-SvListEntry* SvTreeList::GetEntryAtVisPos( const SvListView* pView, ULONG nVisPos ) const
+SvListEntry* SvTreeList::GetEntryAtVisPos( const SvListView* pView, sal_uLong nVisPos ) const
{
DBG_ASSERT(pView,"GetEntryAtVisPos:No View");
SvListEntry* pEntry = First();
@@ -1587,7 +1587,7 @@ void SvTreeList::SetListPositions( SvTreeEntryList* pList )
pEntry->pParent->InvalidateChildrensListPositions();
}
/*
- ULONG nListPos = 0;
+ sal_uLong nListPos = 0;
SvListEntry* pEntry = (SvListEntry*)(pList->First());
while( pEntry )
{
@@ -1604,13 +1604,13 @@ void SvTreeList::InvalidateEntry( SvListEntry* pEntry )
Broadcast( LISTACTION_INVALIDATE_ENTRY, pEntry );
}
-BOOL SvTreeList::IsInChildList( SvListEntry* pParent, SvListEntry* pChild) const
+sal_Bool SvTreeList::IsInChildList( SvListEntry* pParent, SvListEntry* pChild) const
{
if ( !pParent )
pParent = pRootItem;
- BOOL bIsChild = FALSE;
+ sal_Bool bIsChild = sal_False;
if ( pParent->pChilds )
- bIsChild = (BOOL)(pParent->pChilds->GetPos(pChild) != LIST_ENTRY_NOTFOUND);
+ bIsChild = (sal_Bool)(pParent->pChilds->GetPos(pChild) != LIST_ENTRY_NOTFOUND);
return bIsChild;
}
@@ -1618,7 +1618,7 @@ BOOL SvTreeList::IsInChildList( SvListEntry* pParent, SvListEntry* pChild) const
void lcl_CheckList( SvTreeEntryList* pList )
{
SvListEntry* pEntry = (SvListEntry*)(pList->First());
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
while ( pEntry )
{
DBG_ASSERT(pEntry->GetChildListPos()==nPos,"Wrong ListPos");
@@ -1629,7 +1629,7 @@ void lcl_CheckList( SvTreeEntryList* pList )
void SvTreeList::CheckIntegrity() const
{
- ULONG nMyEntryCount = 0;
+ sal_uLong nMyEntryCount = 0;
if ( pRootItem->pChilds )
{
lcl_CheckList( pRootItem->pChilds );
@@ -1680,7 +1680,7 @@ SvListView::SvListView( SvTreeList* pModell )
pModel = 0;
nSelectionCount = 0;
nVisibleCount = 0;
- bVisPositionsValid = FALSE;
+ bVisPositionsValid = sal_False;
SetModel( pModell );
}
@@ -1690,7 +1690,7 @@ SvListView::SvListView()
pModel = 0;
nSelectionCount = 0;
nVisibleCount = 0;
- bVisPositionsValid = FALSE;
+ bVisPositionsValid = sal_False;
}
@@ -1724,7 +1724,7 @@ void SvListView::InitTable()
pEntry = pModel->pRootItem;
pViewData = new SvViewData;
pViewData->nFlags = SVLISTENTRYFLAG_EXPANDED;
- aDataTable.Insert( (ULONG)pEntry, pViewData );
+ aDataTable.Insert( (sal_uLong)pEntry, pViewData );
// Jetzt alle anderen Entries
pEntry = pModel->First();
while( pEntry )
@@ -1732,7 +1732,7 @@ void SvListView::InitTable()
pViewData = CreateViewData( pEntry );
DBG_ASSERT(pViewData,"InitTable:No ViewData");
InitViewData( pViewData, pEntry );
- aDataTable.Insert( (ULONG)pEntry, pViewData );
+ aDataTable.Insert( (sal_uLong)pEntry, pViewData );
pEntry = pModel->Next( pEntry );
}
}
@@ -1760,25 +1760,25 @@ void SvListView::Clear()
ClearTable();
nSelectionCount = 0;
nVisibleCount = 0;
- bVisPositionsValid = FALSE;
+ bVisPositionsValid = sal_False;
if( pModel )
{
// RootEntry einfuegen
SvListEntry* pEntry = pModel->pRootItem;
SvViewData* pViewData = new SvViewData;
pViewData->nFlags = SVLISTENTRYFLAG_EXPANDED;
- aDataTable.Insert( (ULONG)pEntry, pViewData );
+ aDataTable.Insert( (sal_uLong)pEntry, pViewData );
}
}
void SvListView::SetModel( SvTreeList* pNewModel )
{
DBG_CHKTHIS(SvListView,0);
- BOOL bBroadcastCleared = FALSE;
+ sal_Bool bBroadcastCleared = sal_False;
if ( pModel )
{
pModel->RemoveView( this );
- bBroadcastCleared = TRUE;
+ bBroadcastCleared = sal_True;
ModelNotification( LISTACTION_CLEARING,0,0,0 );
if ( pModel->GetRefCount() == 0 )
delete pModel;
@@ -1807,7 +1807,7 @@ void SvListView::ModelHasInsertedTree( SvListEntry* )
}
void SvListView::ModelIsMoving( SvListEntry* /* pSource */ ,
- SvListEntry* /* pTargetParent */ , ULONG /* nPos */ )
+ SvListEntry* /* pTargetParent */ , sal_uLong /* nPos */ )
{
DBG_CHKTHIS(SvListView,0);
}
@@ -1833,28 +1833,28 @@ void SvListView::ModelHasEntryInvalidated( SvListEntry*)
DBG_CHKTHIS(SvListView,0);
}
-void SvListView::ActionMoving( SvListEntry* pEntry,SvListEntry*,ULONG)
+void SvListView::ActionMoving( SvListEntry* pEntry,SvListEntry*,sal_uLong)
{
DBG_CHKTHIS(SvListView,0);
SvListEntry* pParent = pEntry->pParent;
DBG_ASSERT(pParent,"Model not consistent");
if( pParent != pModel->pRootItem && pParent->pChilds->Count() == 1 )
{
- SvViewData* pViewData = (SvViewData*)aDataTable.Get( (ULONG)pParent );
+ SvViewData* pViewData = (SvViewData*)aDataTable.Get( (sal_uLong)pParent );
pViewData->nFlags &= (~SVLISTENTRYFLAG_EXPANDED);
}
// vorlaeufig
nVisibleCount = 0;
- bVisPositionsValid = FALSE;
+ bVisPositionsValid = sal_False;
}
void SvListView::ActionMoved( SvListEntry* /* pEntry */ ,
SvListEntry* /* pTargetPrnt */ ,
- ULONG /* nChildPos */ )
+ sal_uLong /* nChildPos */ )
{
DBG_CHKTHIS(SvListView,0);
nVisibleCount = 0;
- bVisPositionsValid = FALSE;
+ bVisPositionsValid = sal_False;
}
void SvListView::ActionInserted( SvListEntry* pEntry )
@@ -1864,14 +1864,14 @@ void SvListView::ActionInserted( SvListEntry* pEntry )
SvViewData* pData = CreateViewData( pEntry );
InitViewData( pData, pEntry );
#ifdef DBG_UTIL
- BOOL bSuccess =
+ sal_Bool bSuccess =
#endif
- aDataTable.Insert( (ULONG)pEntry, pData );
+ aDataTable.Insert( (sal_uLong)pEntry, pData );
DBG_ASSERT(bSuccess,"Entry already in View");
if ( nVisibleCount && pModel->IsEntryVisible( this, pEntry ))
{
nVisibleCount = 0;
- bVisPositionsValid = FALSE;
+ bVisPositionsValid = sal_False;
}
}
@@ -1881,18 +1881,18 @@ void SvListView::ActionInsertedTree( SvListEntry* pEntry )
if ( pModel->IsEntryVisible( this, pEntry ))
{
nVisibleCount = 0;
- bVisPositionsValid = FALSE;
+ bVisPositionsValid = sal_False;
}
// ueber Entry und seine Childs iterieren
SvListEntry* pCurEntry = pEntry;
- USHORT nRefDepth = pModel->GetDepth( pCurEntry );
+ sal_uInt16 nRefDepth = pModel->GetDepth( pCurEntry );
while( pCurEntry )
{
- DBG_ASSERT(aDataTable.Get((ULONG)pCurEntry)==0,"Entry already in Table");
+ DBG_ASSERT(aDataTable.Get((sal_uLong)pCurEntry)==0,"Entry already in Table");
SvViewData* pViewData = CreateViewData( pCurEntry );
DBG_ASSERT(pViewData,"No ViewData");
InitViewData( pViewData, pEntry );
- aDataTable.Insert( (ULONG)pCurEntry, pViewData );
+ aDataTable.Insert( (sal_uLong)pCurEntry, pViewData );
pCurEntry = pModel->Next( pCurEntry );
if ( pCurEntry && pModel->GetDepth(pCurEntry) <= nRefDepth)
pCurEntry = 0;
@@ -1907,9 +1907,9 @@ void SvListView::RemoveViewData( SvListEntry* pParent )
SvListEntry* pCur = (SvListEntry*)pChilds->First();
while( pCur )
{
- SvViewData* pViewData = (SvViewData*)aDataTable.Get((ULONG)pCur);
+ SvViewData* pViewData = (SvViewData*)aDataTable.Get((sal_uLong)pCur);
delete pViewData;
- aDataTable.Remove( (ULONG)pCur );
+ aDataTable.Remove( (sal_uLong)pCur );
if( pCur->HasChilds())
RemoveViewData( pCur );
pCur = (SvListEntry*)pChilds->Next();
@@ -1924,12 +1924,12 @@ void SvListView::ActionRemoving( SvListEntry* pEntry )
DBG_CHKTHIS(SvListView,0);
DBG_ASSERT(pEntry,"Remove:No Entry");
- SvViewData* pViewData = (SvViewData*)aDataTable.Get( (ULONG)pEntry );
- ULONG nSelRemoved = 0;
+ SvViewData* pViewData = (SvViewData*)aDataTable.Get( (sal_uLong)pEntry );
+ sal_uLong nSelRemoved = 0;
if ( pViewData->IsSelected() )
nSelRemoved = 1 + pModel->GetChildSelectionCount( this, pEntry );
nSelectionCount -= nSelRemoved;
- ULONG nVisibleRemoved = 0;
+ sal_uLong nVisibleRemoved = 0;
if ( pModel->IsEntryVisible( this, pEntry ) )
nVisibleRemoved = 1 + pModel->GetVisibleChildCount( this, pEntry );
if( nVisibleCount )
@@ -1942,18 +1942,18 @@ void SvListView::ActionRemoving( SvListEntry* pEntry )
#endif
nVisibleCount -= nVisibleRemoved;
}
- bVisPositionsValid = FALSE;
+ bVisPositionsValid = sal_False;
- pViewData = (SvViewData*)aDataTable.Get((ULONG)pEntry);
+ pViewData = (SvViewData*)aDataTable.Get((sal_uLong)pEntry);
delete pViewData;
- aDataTable.Remove( (ULONG)pEntry );
+ aDataTable.Remove( (sal_uLong)pEntry );
RemoveViewData( pEntry );
SvListEntry* pCurEntry = pEntry->pParent;
if ( pCurEntry && pCurEntry != pModel->pRootItem &&
pCurEntry->pChilds->Count() == 1 )
{
- pViewData = (SvViewData*)aDataTable.Get((ULONG)pCurEntry);
+ pViewData = (SvViewData*)aDataTable.Get((sal_uLong)pCurEntry);
pViewData->nFlags &= (~SVLISTENTRYFLAG_EXPANDED);
}
}
@@ -1969,8 +1969,8 @@ void SvListView::ActionClear()
Clear();
}
-void SvListView::ModelNotification( USHORT nActionId, SvListEntry* pEntry1,
- SvListEntry* pEntry2, ULONG nPos )
+void SvListView::ModelNotification( sal_uInt16 nActionId, SvListEntry* pEntry1,
+ SvListEntry* pEntry2, sal_uLong nPos )
{
DBG_CHKTHIS(SvListView,0);
switch( nActionId )
@@ -2010,7 +2010,7 @@ void SvListView::ModelNotification( USHORT nActionId, SvListEntry* pEntry1,
ModelHasEntryInvalidated( pEntry1 );
break;
case LISTACTION_RESORTED:
- bVisPositionsValid = FALSE;
+ bVisPositionsValid = sal_False;
break;
case LISTACTION_RESORTING:
break;
@@ -2038,7 +2038,7 @@ StringCompare SvTreeList::Compare( SvListEntry* pLeft, SvListEntry* pRight) cons
void SvTreeList::Resort()
{
Broadcast( LISTACTION_RESORTING );
- bAbsPositionsValid = FALSE;
+ bAbsPositionsValid = sal_False;
ResortChilds( pRootItem );
Broadcast( LISTACTION_RESORTED );
}
@@ -2052,11 +2052,11 @@ void SvTreeList::ResortChilds( SvListEntry* pParent )
List aList( *pChildList );
pChildList->Clear();
- ULONG nCount = aList.Count();
- for( ULONG nCur = 0; nCur < nCount; nCur++ )
+ sal_uLong nCount = aList.Count();
+ for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
{
SvListEntry* pCurEntry = (SvListEntry*)aList.GetObject( nCur );
- ULONG nListPos = LIST_APPEND;
+ sal_uLong nListPos = LIST_APPEND;
GetInsertionPos( pCurEntry, pParent, nListPos );
pChildList->Insert( pCurEntry, nListPos );
if( pCurEntry->pChilds )
@@ -2066,7 +2066,7 @@ void SvTreeList::ResortChilds( SvListEntry* pParent )
}
void SvTreeList::GetInsertionPos( SvListEntry* pEntry, SvListEntry* pParent,
- ULONG& rPos )
+ sal_uLong& rPos )
{
DBG_ASSERT(pEntry,"No Entry");
diff --git a/svtools/source/control/asynclink.cxx b/svtools/source/control/asynclink.cxx
index d3ef0c349f08..7231470528d5 100755
--- a/svtools/source/control/asynclink.cxx
+++ b/svtools/source/control/asynclink.cxx
@@ -42,11 +42,11 @@ void AsynchronLink::CreateMutex()
if( !_pMutex ) _pMutex = new vos::OMutex;
}
-void AsynchronLink::Call( void* pObj, BOOL
+void AsynchronLink::Call( void* pObj, sal_Bool
#ifdef DBG_UTIL
bAllowDoubles
#endif
-, BOOL bUseTimer )
+, sal_Bool bUseTimer )
{
#ifdef DBG_UTIL
if ( bUseTimer || !_bInCall )
@@ -92,7 +92,7 @@ AsynchronLink::~AsynchronLink()
Application::RemoveUserEvent( _nEventId );
}
delete _pTimer;
- if( _pDeleted ) *_pDeleted = TRUE;
+ if( _pDeleted ) *_pDeleted = sal_True;
delete _pMutex;
}
@@ -125,13 +125,13 @@ void AsynchronLink::ClearPendingCall()
void AsynchronLink::Call_Impl( void* pArg )
{
- _bInCall = TRUE;
- BOOL bDeleted = FALSE;
+ _bInCall = sal_True;
+ sal_Bool bDeleted = sal_False;
_pDeleted = &bDeleted;
_aLink.Call( pArg );
if( !bDeleted )
{
- _bInCall = FALSE;
+ _bInCall = sal_False;
_pDeleted = 0;
}
}
diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx
index 043d7023508b..17790d1ad4c8 100755
--- a/svtools/source/control/calendar.cxx
+++ b/svtools/source/control/calendar.cxx
@@ -62,12 +62,12 @@
#define WEEKNUMBER_HEIGHT 85
-#define CALENDAR_HITTEST_DAY ((USHORT)0x0001)
-#define CALENDAR_HITTEST_WEEK ((USHORT)0x0002)
-#define CALENDAR_HITTEST_MONTHTITLE ((USHORT)0x0004)
-#define CALENDAR_HITTEST_PREV ((USHORT)0x0008)
-#define CALENDAR_HITTEST_NEXT ((USHORT)0x0010)
-#define CALENDAR_HITTEST_OUTSIDE ((USHORT)0x1000)
+#define CALENDAR_HITTEST_DAY ((sal_uInt16)0x0001)
+#define CALENDAR_HITTEST_WEEK ((sal_uInt16)0x0002)
+#define CALENDAR_HITTEST_MONTHTITLE ((sal_uInt16)0x0004)
+#define CALENDAR_HITTEST_PREV ((sal_uInt16)0x0008)
+#define CALENDAR_HITTEST_NEXT ((sal_uInt16)0x0010)
+#define CALENDAR_HITTEST_OUTSIDE ((sal_uInt16)0x1000)
#define MENU_YEAR_COUNT 3
@@ -82,7 +82,7 @@ struct ImplDateInfo
XubString maText;
Color* mpTextColor;
Color* mpFrameColor;
- USHORT mnFlags;
+ sal_uInt16 mnFlags;
ImplDateInfo( const XubString& rText ) :
maText( rText )
@@ -94,7 +94,7 @@ DECLARE_TABLE( ImplDateTable, ImplDateInfo* )
// =======================================================================
-static void ImplCalendarSelectDate( Table* pTable, const Date& rDate, BOOL bSelect )
+static void ImplCalendarSelectDate( Table* pTable, const Date& rDate, sal_Bool bSelect )
{
if ( bSelect )
pTable->Insert( rDate.GetDate(), TABLE_DATE_SELECTED );
@@ -107,7 +107,7 @@ static void ImplCalendarSelectDate( Table* pTable, const Date& rDate, BOOL bSele
static void ImplCalendarSelectDateRange( Table* pTable,
const Date& rStartDate,
const Date& rEndDate,
- BOOL bSelect )
+ sal_Bool bSelect )
{
Date aStartDate = rStartDate;
Date aEndDate = rEndDate;
@@ -208,24 +208,24 @@ void Calendar::ImplInit( WinBits nWinStyle )
mnFirstYear = 0;
mnLastYear = 0;
mnRequestYear = 0;
- mbCalc = TRUE;
- mbFormat = TRUE;
- mbDrag = FALSE;
- mbSelection = FALSE;
- mbMultiSelection = FALSE;
- mbWeekSel = FALSE;
- mbUnSel = FALSE;
- mbMenuDown = FALSE;
- mbSpinDown = FALSE;
- mbPrevIn = FALSE;
- mbNextIn = FALSE;
- mbDirect = FALSE;
- mbInSelChange = FALSE;
- mbTravelSelect = FALSE;
- mbScrollDateRange = FALSE;
- mbSelLeft = FALSE;
- mbAllSel = FALSE;
- mbDropPos = FALSE;
+ mbCalc = sal_True;
+ mbFormat = sal_True;
+ mbDrag = sal_False;
+ mbSelection = sal_False;
+ mbMultiSelection = sal_False;
+ mbWeekSel = sal_False;
+ mbUnSel = sal_False;
+ mbMenuDown = sal_False;
+ mbSpinDown = sal_False;
+ mbPrevIn = sal_False;
+ mbNextIn = sal_False;
+ mbDirect = sal_False;
+ mbInSelChange = sal_False;
+ mbTravelSelect = sal_False;
+ mbScrollDateRange = sal_False;
+ mbSelLeft = sal_False;
+ mbAllSel = sal_False;
+ mbDropPos = sal_False;
::rtl::OUString aGregorian( RTL_CONSTASCII_USTRINGPARAM( "gregorian"));
maCalendarWrapper.loadCalendar( aGregorian,
@@ -252,14 +252,14 @@ void Calendar::ImplInit( WinBits nWinStyle )
}
SetFirstDate( maCurDate );
- ImplCalendarSelectDate( mpSelectTable, maCurDate, TRUE );
+ ImplCalendarSelectDate( mpSelectTable, maCurDate, sal_True );
// Sonstige Strings erzeugen
maDayText = XubString( SvtResId( STR_SVT_CALENDAR_DAY ) );
maWeekText = XubString( SvtResId( STR_SVT_CALENDAR_WEEK ) );
// Tagestexte anlegen
- for ( USHORT i = 0; i < 31; i++ )
+ for ( sal_uInt16 i = 0; i < 31; i++ )
mpDayText[i] = new UniString( UniString::CreateFromInt32( i+1 ) );
maDragScrollTimer.SetTimeoutHdl( STATIC_LINK( this, Calendar, ScrollHdl ) );
@@ -338,7 +338,7 @@ Calendar::~Calendar()
if ( mpRestoreSelectTable )
delete mpRestoreSelectTable;
- for ( USHORT i = 0; i < 31; i++ )
+ for ( sal_uInt16 i = 0; i < 31; i++ )
delete mpDayText[i];
}
@@ -346,7 +346,7 @@ Calendar::~Calendar()
void Calendar::SetMinimumNumberOfDaysInWeek( sal_Int16 nDays )
{
- ImplUpdate( TRUE );
+ ImplUpdate( sal_True );
maCalendarWrapper.setMinimumNumberOfDaysForFirstWeek( nDays);
}
@@ -354,7 +354,7 @@ void Calendar::SetMinimumNumberOfDaysInWeek( sal_Int16 nDays )
void Calendar::SetWeekStart( sal_Int16 nDay )
{
- ImplUpdate( TRUE );
+ ImplUpdate( sal_True );
switch (nDay)
{
case i18n::Weekdays::SUNDAY :
@@ -529,23 +529,23 @@ void Calendar::ImplFormat()
nDay %= 7;
}
- mbCalc = FALSE;
+ mbCalc = sal_False;
}
// Anzahl Tage berechnen
DayOfWeek eStartDay = ImplGetWeekStart();
- USHORT nWeekDay;
+ sal_uInt16 nWeekDay;
Date aTempDate = GetFirstMonth();
maFirstDate = aTempDate;
- nWeekDay = (USHORT)aTempDate.GetDayOfWeek();
- nWeekDay = (nWeekDay+(7-(USHORT)eStartDay)) % 7;
- maFirstDate -= (ULONG)nWeekDay;
+ nWeekDay = (sal_uInt16)aTempDate.GetDayOfWeek();
+ nWeekDay = (nWeekDay+(7-(sal_uInt16)eStartDay)) % 7;
+ maFirstDate -= (sal_uLong)nWeekDay;
mnDayCount = nWeekDay;
- USHORT nDaysInMonth;
- USHORT nMonthCount = (USHORT)(mnMonthPerLine*mnLines);
- for ( USHORT i = 0; i < nMonthCount; i++ )
+ sal_uInt16 nDaysInMonth;
+ sal_uInt16 nMonthCount = (sal_uInt16)(mnMonthPerLine*mnLines);
+ for ( sal_uInt16 i = 0; i < nMonthCount; i++ )
{
nDaysInMonth = aTempDate.GetDaysInMonth();
mnDayCount += nDaysInMonth;
@@ -555,8 +555,8 @@ void Calendar::ImplFormat()
aTempDate2--;
nDaysInMonth = aTempDate2.GetDaysInMonth();
aTempDate2 -= nDaysInMonth-1;
- nWeekDay = (USHORT)aTempDate2.GetDayOfWeek();
- nWeekDay = (nWeekDay+(7-(USHORT)eStartDay)) % 7;
+ nWeekDay = (sal_uInt16)aTempDate2.GetDayOfWeek();
+ nWeekDay = (nWeekDay+(7-(sal_uInt16)eStartDay)) % 7;
mnDayCount += 42-nDaysInMonth-nWeekDay;
// Farben festlegen
@@ -574,8 +574,8 @@ void Calendar::ImplFormat()
}
// DateInfo besorgen
- USHORT nNewFirstYear = maFirstDate.GetYear();
- USHORT nNewLastYear = GetLastDate().GetYear();
+ sal_uInt16 nNewFirstYear = maFirstDate.GetYear();
+ sal_uInt16 nNewLastYear = GetLastDate().GetYear();
if ( mnFirstYear )
{
if ( nNewFirstYear < mnFirstYear )
@@ -600,12 +600,12 @@ void Calendar::ImplFormat()
}
mnRequestYear = 0;
- mbFormat = FALSE;
+ mbFormat = sal_False;
}
// -----------------------------------------------------------------------
-USHORT Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const
+sal_uInt16 Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const
{
if ( mbFormat )
return 0;
@@ -619,7 +619,7 @@ USHORT Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const
long nY;
long nOffX;
long nYMonth;
- USHORT nDay;
+ sal_uInt16 nDay;
DayOfWeek eStartDay = ImplGetWeekStart();
rDate = GetFirstMonth();
@@ -636,7 +636,7 @@ USHORT Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const
if ( (rPos.X() < nX) && (rPos.Y() < nYMonth) )
return 0;
- USHORT nDaysInMonth = rDate.GetDaysInMonth();
+ sal_uInt16 nDaysInMonth = rDate.GetDaysInMonth();
// Entsprechender Monat gefunden
if ( (rPos.X() > nX) && (rPos.Y() < nYMonth) &&
@@ -650,8 +650,8 @@ USHORT Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const
long nDayY = nY+mnDaysOffY;
if ( rPos.Y() < nDayY )
return 0;
- USHORT nDayIndex = (USHORT)rDate.GetDayOfWeek();
- nDayIndex = (nDayIndex+(7-(USHORT)eStartDay)) % 7;
+ sal_uInt16 nDayIndex = (sal_uInt16)rDate.GetDayOfWeek();
+ nDayIndex = (nDayIndex+(7-(sal_uInt16)eStartDay)) % 7;
if ( (i == 0) && (j == 0) )
{
Date aTempDate = rDate;
@@ -692,9 +692,9 @@ USHORT Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const
}
if ( (i == mnLines-1) && (j == mnMonthPerLine-1) )
{
- USHORT nWeekDay = (USHORT)rDate.GetDayOfWeek();
- nWeekDay = (nWeekDay+(7-(USHORT)eStartDay)) % 7;
- USHORT nDayCount = 42-nDaysInMonth-nWeekDay;
+ sal_uInt16 nWeekDay = (sal_uInt16)rDate.GetDayOfWeek();
+ nWeekDay = (nWeekDay+(7-(sal_uInt16)eStartDay)) % 7;
+ sal_uInt16 nDayCount = 42-nDaysInMonth-nWeekDay;
Date aTempDate = rDate;
aTempDate += nDaysInMonth;
for ( nDay = 1; nDay <= nDayCount; nDay++ )
@@ -737,7 +737,7 @@ USHORT Calendar::ImplHitTest( const Point& rPos, Date& rDate ) const
// -----------------------------------------------------------------------
static void ImplDrawSpinArrow( OutputDevice* pDev, const Rectangle& rRect,
- BOOL bPrev )
+ sal_Bool bPrev )
{
long i;
long n;
@@ -782,7 +782,7 @@ static void ImplDrawSpinArrow( OutputDevice* pDev, const Rectangle& rRect,
// -----------------------------------------------------------------------
-void Calendar::ImplDrawSpin( BOOL bDrawPrev, BOOL bDrawNext )
+void Calendar::ImplDrawSpin( sal_Bool bDrawPrev, sal_Bool bDrawNext )
{
if ( !bDrawPrev && !bDrawNext )
return;
@@ -796,7 +796,7 @@ void Calendar::ImplDrawSpin( BOOL bDrawPrev, BOOL bDrawNext )
aOutRect.Top() += 3;
aOutRect.Right() -= 3;
aOutRect.Bottom() -= 3;
- ImplDrawSpinArrow( this, aOutRect, TRUE );
+ ImplDrawSpinArrow( this, aOutRect, sal_True );
}
if ( bDrawNext )
{
@@ -805,33 +805,33 @@ void Calendar::ImplDrawSpin( BOOL bDrawPrev, BOOL bDrawNext )
aOutRect.Top() += 3;
aOutRect.Right() -= 3;
aOutRect.Bottom() -= 3;
- ImplDrawSpinArrow( this, aOutRect, FALSE );
+ ImplDrawSpinArrow( this, aOutRect, sal_False );
}
}
// -----------------------------------------------------------------------
void Calendar::ImplDrawDate( long nX, long nY,
- USHORT nDay, USHORT nMonth, USHORT nYear,
+ sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear,
DayOfWeek eDayOfWeek,
- BOOL bBack, BOOL bOther, ULONG nToday )
+ sal_Bool bBack, sal_Bool bOther, sal_uLong nToday )
{
ImplDateInfo* pDateInfo;
Color* pTextColor = NULL;
const String& rDay = *(mpDayText[nDay-1]);
Rectangle aDateRect( nX, nY, nX+mnDayWidth-1, nY+mnDayHeight-1 );
- BOOL bSel = FALSE;
- BOOL bFocus = FALSE;
+ sal_Bool bSel = sal_False;
+ sal_Bool bFocus = sal_False;
// Aktueller Tag
if ( (nDay == maCurDate.GetDay()) &&
(nMonth == maCurDate.GetMonth()) &&
(nYear == maCurDate.GetYear()) )
- bFocus = TRUE;
+ bFocus = sal_True;
if ( mpSelectTable )
{
if ( mpSelectTable->IsKeyValid( Date( nDay, nMonth, nYear ).GetDate() ) )
- bSel = TRUE;
+ bSel = sal_True;
}
// Dateinfo ermitteln
@@ -869,11 +869,11 @@ void Calendar::ImplDrawDate( long nX, long nY,
// Font ermitteln
Font aOldFont = GetFont();
- BOOL bBoldFont = FALSE;
+ sal_Bool bBoldFont = sal_False;
if ( (mnWinStyle & WB_BOLDTEXT) &&
pDateInfo && (pDateInfo->mnFlags & DIB_BOLD) )
{
- bBoldFont = TRUE;
+ bBoldFont = sal_True;
Font aFont = aOldFont;
if ( aFont.GetWeight() < WEIGHT_BOLD )
aFont.SetWeight( WEIGHT_BOLD );
@@ -965,7 +965,7 @@ void Calendar::ImplDrawDate( long nX, long nY,
// -----------------------------------------------------------------------
-void Calendar::ImplDraw( BOOL bPaint )
+void Calendar::ImplDraw( sal_Bool bPaint )
{
ImplFormat();
@@ -979,10 +979,10 @@ void Calendar::ImplDraw( BOOL bPaint )
long nDeltaY;
long nDayX;
long nDayY;
- ULONG nToday = Date().GetDate();
- USHORT nDay;
- USHORT nMonth;
- USHORT nYear;
+ sal_uLong nToday = Date().GetDate();
+ sal_uInt16 nDay;
+ sal_uInt16 nMonth;
+ sal_uInt16 nYear;
Date aDate = GetFirstMonth();
DayOfWeek eStartDay = ImplGetWeekStart();
@@ -1119,7 +1119,7 @@ void Calendar::ImplDraw( BOOL bPaint )
nDayX -= mnWeekWidth;
nDayY = nY+mnDaysOffY;
maCalendarWrapper.setGregorianDateTime( aDate);
- for ( USHORT nWeekCount = 0; nWeekCount < 6; nWeekCount++ )
+ for ( sal_uInt16 nWeekCount = 0; nWeekCount < 6; nWeekCount++ )
{
sal_Int16 nWeek = maCalendarWrapper.getValue( i18n::CalendarFieldIndex::WEEK_OF_YEAR);
String aWeekText( String::CreateFromInt32( nWeek));
@@ -1133,7 +1133,7 @@ void Calendar::ImplDraw( BOOL bPaint )
}
// Tage ausgeben
- USHORT nDaysInMonth = aDate.GetDaysInMonth();
+ sal_uInt16 nDaysInMonth = aDate.GetDaysInMonth();
nDayX = nX+mnDaysOffX;
nDayY = nY+mnDaysOffY;
if ( !bPaint )
@@ -1142,8 +1142,8 @@ void Calendar::ImplDraw( BOOL bPaint )
nDayX+(7*mnDayWidth)-1, nDayY+(6*mnDayHeight)-1 );
Erase( aClearRect );
}
- USHORT nDayIndex = (USHORT)aDate.GetDayOfWeek();
- nDayIndex = (nDayIndex+(7-(USHORT)eStartDay)) % 7;
+ sal_uInt16 nDayIndex = (sal_uInt16)aDate.GetDayOfWeek();
+ nDayIndex = (nDayIndex+(7-(sal_uInt16)eStartDay)) % 7;
if ( (i == 0) && (j == 0) )
{
Date aTempDate = aDate;
@@ -1153,15 +1153,15 @@ void Calendar::ImplDraw( BOOL bPaint )
nDeltaX = nDayX + (nDay*mnDayWidth);
ImplDrawDate( nDeltaX, nDayY, nDay+aTempDate.GetDay(),
aTempDate.GetMonth(), aTempDate.GetYear(),
- (DayOfWeek)((nDay+(USHORT)eStartDay)%7), FALSE, TRUE, nToday );
+ (DayOfWeek)((nDay+(sal_uInt16)eStartDay)%7), sal_False, sal_True, nToday );
}
}
for ( nDay = 1; nDay <= nDaysInMonth; nDay++ )
{
nDeltaX = nDayX + (nDayIndex*mnDayWidth);
ImplDrawDate( nDeltaX, nDayY, nDay, nMonth, nYear,
- (DayOfWeek)((nDayIndex+(USHORT)eStartDay)%7),
- FALSE, FALSE, nToday );
+ (DayOfWeek)((nDayIndex+(sal_uInt16)eStartDay)%7),
+ sal_False, sal_False, nToday );
if ( nDayIndex == 6 )
{
nDayIndex = 0;
@@ -1172,9 +1172,9 @@ void Calendar::ImplDraw( BOOL bPaint )
}
if ( (i == mnLines-1) && (j == mnMonthPerLine-1) )
{
- USHORT nWeekDay = (USHORT)aDate.GetDayOfWeek();
- nWeekDay = (nWeekDay+(7-(USHORT)eStartDay)) % 7;
- USHORT nDayCount = 42-nDaysInMonth-nWeekDay;
+ sal_uInt16 nWeekDay = (sal_uInt16)aDate.GetDayOfWeek();
+ nWeekDay = (nWeekDay+(7-(sal_uInt16)eStartDay)) % 7;
+ sal_uInt16 nDayCount = 42-nDaysInMonth-nWeekDay;
Date aTempDate = aDate;
aTempDate += nDaysInMonth;
for ( nDay = 1; nDay <= nDayCount; nDay++ )
@@ -1182,8 +1182,8 @@ void Calendar::ImplDraw( BOOL bPaint )
nDeltaX = nDayX + (nDayIndex*mnDayWidth);
ImplDrawDate( nDeltaX, nDayY, nDay,
aTempDate.GetMonth(), aTempDate.GetYear(),
- (DayOfWeek)((nDayIndex+(USHORT)eStartDay)%7),
- FALSE, TRUE, nToday );
+ (DayOfWeek)((nDayIndex+(sal_uInt16)eStartDay)%7),
+ sal_False, sal_True, nToday );
if ( nDayIndex == 6 )
{
nDayIndex = 0;
@@ -1215,10 +1215,10 @@ void Calendar::ImplUpdateDate( const Date& rDate )
Rectangle aDateRect( GetDateRect( rDate ) );
if ( !aDateRect.IsEmpty() )
{
- BOOL bOther = (rDate < GetFirstMonth()) || (rDate > GetLastMonth());
+ sal_Bool bOther = (rDate < GetFirstMonth()) || (rDate > GetLastMonth());
ImplDrawDate( aDateRect.Left(), aDateRect.Top(),
rDate.GetDay(), rDate.GetMonth(), rDate.GetYear(),
- rDate.GetDayOfWeek(), TRUE, bOther );
+ rDate.GetDayOfWeek(), sal_True, bOther );
}
}
}
@@ -1229,7 +1229,7 @@ void Calendar::ImplUpdateSelection( Table* pOld )
{
Table* pNew = mpSelectTable;
void* p;
- ULONG nKey;
+ sal_uLong nKey;
p = pOld->First();
while ( p )
@@ -1260,8 +1260,8 @@ void Calendar::ImplUpdateSelection( Table* pOld )
// -----------------------------------------------------------------------
-void Calendar::ImplMouseSelect( const Date& rDate, USHORT nHitTest,
- BOOL bMove, BOOL bExpand, BOOL bExtended )
+void Calendar::ImplMouseSelect( const Date& rDate, sal_uInt16 nHitTest,
+ sal_Bool bMove, sal_Bool bExpand, sal_Bool bExtended )
{
Table* pOldSel = new Table( *mpSelectTable );
Date aOldDate = maCurDate;
@@ -1297,35 +1297,35 @@ void Calendar::ImplMouseSelect( const Date& rDate, USHORT nHitTest,
{
if ( mbSelLeft )
{
- ImplCalendarSelectDateRange( mpSelectTable, Date( 1, 1, 0 ), aTempDate, FALSE );
- ImplCalendarSelectDateRange( mpSelectTable, maAnchorDate, Date( 31, 12, 9999 ), FALSE );
+ ImplCalendarSelectDateRange( mpSelectTable, Date( 1, 1, 0 ), aTempDate, sal_False );
+ ImplCalendarSelectDateRange( mpSelectTable, maAnchorDate, Date( 31, 12, 9999 ), sal_False );
}
else
{
- ImplCalendarSelectDateRange( mpSelectTable, Date( 1, 1, 0 ), maAnchorDate, FALSE );
- ImplCalendarSelectDateRange( mpSelectTable, aTempDate, Date( 31, 12, 9999 ), FALSE );
+ ImplCalendarSelectDateRange( mpSelectTable, Date( 1, 1, 0 ), maAnchorDate, sal_False );
+ ImplCalendarSelectDateRange( mpSelectTable, aTempDate, Date( 31, 12, 9999 ), sal_False );
}
}
- ImplCalendarSelectDateRange( mpSelectTable, aTempDate, maAnchorDate, TRUE );
+ ImplCalendarSelectDateRange( mpSelectTable, aTempDate, maAnchorDate, sal_True );
}
else if ( bExtended && !(mnWinStyle & WB_RANGESELECT) )
{
maAnchorDate = aTempDate;
if ( IsDateSelected( aTempDate ) )
{
- mbUnSel = TRUE;
- ImplCalendarSelectDate( mpSelectTable, aTempDate, FALSE );
+ mbUnSel = sal_True;
+ ImplCalendarSelectDate( mpSelectTable, aTempDate, sal_False );
}
else
{
- ImplCalendarSelectDate( mpSelectTable, aTempDate, TRUE );
+ ImplCalendarSelectDate( mpSelectTable, aTempDate, sal_True );
}
}
else
{
maAnchorDate = aTempDate;
ImplCalendarClearSelectDate( mpSelectTable );
- ImplCalendarSelectDate( mpSelectTable, aTempDate, TRUE );
+ ImplCalendarSelectDate( mpSelectTable, aTempDate, sal_True );
}
mpRestoreSelectTable = new Table( *mpSelectTable );
@@ -1334,9 +1334,9 @@ void Calendar::ImplMouseSelect( const Date& rDate, USHORT nHitTest,
else
{
if ( aTempDate < maCurDate )
- mbSelLeft = TRUE;
+ mbSelLeft = sal_True;
else
- mbSelLeft = FALSE;
+ mbSelLeft = sal_False;
if ( !(nHitTest & CALENDAR_HITTEST_DAY) )
aTempDate = maOldCurDate;
if ( !bMove )
@@ -1344,19 +1344,19 @@ void Calendar::ImplMouseSelect( const Date& rDate, USHORT nHitTest,
if ( aTempDate != maCurDate )
{
maCurDate = aTempDate;
- ImplCalendarSelectDate( mpSelectTable, aOldDate, FALSE );
- ImplCalendarSelectDate( mpSelectTable, maCurDate, TRUE );
+ ImplCalendarSelectDate( mpSelectTable, aOldDate, sal_False );
+ ImplCalendarSelectDate( mpSelectTable, maCurDate, sal_True );
}
}
- BOOL bNewSel = *pOldSel != *mpSelectTable;
+ sal_Bool bNewSel = *pOldSel != *mpSelectTable;
if ( (maCurDate != aOldDate) || bNewSel )
{
if ( bNewSel )
{
- mbInSelChange = TRUE;
+ mbInSelChange = sal_True;
SelectionChanging();
- mbInSelChange = FALSE;
+ mbInSelChange = sal_False;
}
HideFocus();
if ( bNewSel )
@@ -1372,7 +1372,7 @@ void Calendar::ImplMouseSelect( const Date& rDate, USHORT nHitTest,
// -----------------------------------------------------------------------
-void Calendar::ImplUpdate( BOOL bCalcNew )
+void Calendar::ImplUpdate( sal_Bool bCalcNew )
{
if ( IsReallyVisible() && IsUpdateMode() )
{
@@ -1382,8 +1382,8 @@ void Calendar::ImplUpdate( BOOL bCalcNew )
{
if ( mbDirect )
{
- mbFormat = TRUE;
- ImplDraw( FALSE );
+ mbFormat = sal_True;
+ ImplDraw( sal_False );
return;
}
else
@@ -1392,8 +1392,8 @@ void Calendar::ImplUpdate( BOOL bCalcNew )
}
if ( bCalcNew )
- mbCalc = TRUE;
- mbFormat = TRUE;
+ mbCalc = sal_True;
+ mbFormat = sal_True;
}
// -----------------------------------------------------------------------
@@ -1408,7 +1408,7 @@ void Calendar::ImplInvertDropPos()
// -----------------------------------------------------------------------
-void Calendar::ImplScroll( BOOL bPrev )
+void Calendar::ImplScroll( sal_Bool bPrev )
{
Date aNewFirstMonth = GetFirstMonth();
if ( bPrev )
@@ -1418,9 +1418,9 @@ void Calendar::ImplScroll( BOOL bPrev )
}
else
aNewFirstMonth += aNewFirstMonth.GetDaysInMonth();
- mbDirect = TRUE;
+ mbDirect = sal_True;
SetFirstDate( aNewFirstMonth );
- mbDirect = FALSE;
+ mbDirect = sal_False;
}
// -----------------------------------------------------------------------
@@ -1432,12 +1432,12 @@ void Calendar::ImplShowMenu( const Point& rPos, const Date& rDate )
Date aOldFirstDate = GetFirstMonth();
PopupMenu aPopupMenu;
PopupMenu* pYearPopupMenus[MENU_YEAR_COUNT];
- USHORT nMonthOff;
- USHORT nCurItemId;
- USHORT nYear = rDate.GetYear()-1;
- USHORT i;
- USHORT j;
- USHORT nYearIdCount = 1000;
+ sal_uInt16 nMonthOff;
+ sal_uInt16 nCurItemId;
+ sal_uInt16 nYear = rDate.GetYear()-1;
+ sal_uInt16 i;
+ sal_uInt16 j;
+ sal_uInt16 nYearIdCount = 1000;
nMonthOff = (rDate.GetYear()-aOldFirstDate.GetYear())*12;
if ( aOldFirstDate.GetMonth() < rDate.GetMonth() )
@@ -1458,9 +1458,9 @@ void Calendar::ImplShowMenu( const Point& rPos, const Date& rDate )
nYearIdCount += 1000;
}
- mbMenuDown = TRUE;
+ mbMenuDown = sal_True;
nCurItemId = aPopupMenu.Execute( this, rPos );
- mbMenuDown = FALSE;
+ mbMenuDown = sal_False;
// Menu zerstoeren
aPopupMenu.SetPopupMenu( 2, NULL );
@@ -1472,10 +1472,10 @@ void Calendar::ImplShowMenu( const Point& rPos, const Date& rDate )
if ( nCurItemId )
{
- USHORT nTempMonthOff = nMonthOff % 12;
- USHORT nTempYearOff = nMonthOff / 12;
- USHORT nNewMonth = nCurItemId % 1000;
- USHORT nNewYear = nYear+((nCurItemId-1000)/1000);
+ sal_uInt16 nTempMonthOff = nMonthOff % 12;
+ sal_uInt16 nTempYearOff = nMonthOff / 12;
+ sal_uInt16 nNewMonth = nCurItemId % 1000;
+ sal_uInt16 nNewYear = nYear+((nCurItemId-1000)/1000);
if ( nTempMonthOff < nNewMonth )
nNewMonth = nNewMonth - nTempMonthOff;
else
@@ -1490,10 +1490,10 @@ void Calendar::ImplShowMenu( const Point& rPos, const Date& rDate )
// -----------------------------------------------------------------------
-void Calendar::ImplTracking( const Point& rPos, BOOL bRepeat )
+void Calendar::ImplTracking( const Point& rPos, sal_Bool bRepeat )
{
Date aTempDate = maCurDate;
- USHORT nHitTest = ImplHitTest( rPos, aTempDate );
+ sal_uInt16 nHitTest = ImplHitTest( rPos, aTempDate );
if ( mbSpinDown )
{
@@ -1502,29 +1502,29 @@ void Calendar::ImplTracking( const Point& rPos, BOOL bRepeat )
if ( bRepeat && (mbPrevIn || mbNextIn) )
{
- mbScrollDateRange = TRUE;
+ mbScrollDateRange = sal_True;
ImplScroll( mbPrevIn );
- mbScrollDateRange = FALSE;
+ mbScrollDateRange = sal_False;
}
}
else
- ImplMouseSelect( aTempDate, nHitTest, TRUE, FALSE, FALSE );
+ ImplMouseSelect( aTempDate, nHitTest, sal_True, sal_False, sal_False );
}
// -----------------------------------------------------------------------
-void Calendar::ImplEndTracking( BOOL bCancel )
+void Calendar::ImplEndTracking( sal_Bool bCancel )
{
- BOOL bSelection = mbSelection;
- BOOL bSpinDown = mbSpinDown;
+ sal_Bool bSelection = mbSelection;
+ sal_Bool bSpinDown = mbSpinDown;
- mbDrag = FALSE;
- mbSelection = FALSE;
- mbMultiSelection = FALSE;
- mbUnSel = FALSE;
- mbSpinDown = FALSE;
- mbPrevIn = FALSE;
- mbNextIn = FALSE;
+ mbDrag = sal_False;
+ mbSelection = sal_False;
+ mbMultiSelection = sal_False;
+ mbUnSel = sal_False;
+ mbSpinDown = sal_False;
+ mbPrevIn = sal_False;
+ mbNextIn = sal_False;
if ( bCancel )
{
@@ -1553,15 +1553,15 @@ void Calendar::ImplEndTracking( BOOL bCancel )
if ( !bCancel )
{
// Feststellen, ob wir sichtbaren Bereich scrollen sollen
- ULONG nSelCount = mpSelectTable->Count();
+ sal_uLong nSelCount = mpSelectTable->Count();
if ( nSelCount )
{
Date aFirstSelDate( mpSelectTable->GetObjectKey( 0 ) );
Date aLastSelDate( mpSelectTable->GetObjectKey( nSelCount-1 ) );
if ( aLastSelDate < GetFirstMonth() )
- ImplScroll( TRUE );
+ ImplScroll( sal_True );
else if ( GetLastMonth() < aFirstSelDate )
- ImplScroll( FALSE );
+ ImplScroll( sal_False );
}
}
@@ -1583,13 +1583,13 @@ void Calendar::ImplEndTracking( BOOL bCancel )
IMPL_STATIC_LINK( Calendar, ScrollHdl, Timer*, EMPTYARG )
{
- BOOL bPrevIn = (pThis->mnDragScrollHitTest & CALENDAR_HITTEST_PREV) != 0;
- BOOL bNextIn = (pThis->mnDragScrollHitTest & CALENDAR_HITTEST_NEXT) != 0;
+ sal_Bool bPrevIn = (pThis->mnDragScrollHitTest & CALENDAR_HITTEST_PREV) != 0;
+ sal_Bool bNextIn = (pThis->mnDragScrollHitTest & CALENDAR_HITTEST_NEXT) != 0;
if( bNextIn || bPrevIn )
{
- pThis->mbScrollDateRange = TRUE;
+ pThis->mbScrollDateRange = sal_True;
pThis->ImplScroll( bPrevIn );
- pThis->mbScrollDateRange = FALSE;
+ pThis->mbScrollDateRange = sal_False;
}
return 0;
}
@@ -1601,7 +1601,7 @@ void Calendar::MouseButtonDown( const MouseEvent& rMEvt )
if ( rMEvt.IsLeft() && !mbMenuDown )
{
Date aTempDate = maCurDate;
- USHORT nHitTest = ImplHitTest( rMEvt.GetPosPixel(), aTempDate );
+ sal_uInt16 nHitTest = ImplHitTest( rMEvt.GetPosPixel(), aTempDate );
if ( nHitTest )
{
if ( nHitTest & CALENDAR_HITTEST_MONTHTITLE )
@@ -1614,10 +1614,10 @@ void Calendar::MouseButtonDown( const MouseEvent& rMEvt )
mbNextIn = (nHitTest & CALENDAR_HITTEST_NEXT) != 0;
if ( mbPrevIn || mbNextIn )
{
- mbSpinDown = TRUE;
- mbScrollDateRange = TRUE;
+ mbSpinDown = sal_True;
+ mbScrollDateRange = sal_True;
ImplScroll( mbPrevIn );
- mbScrollDateRange = FALSE;
+ mbScrollDateRange = sal_False;
// Hier muss BUTTONREPEAT stehen, also nicht wieder
// auf SCROLLREPEAT aendern, sondern mit TH abklaeren,
// warum es evtl. anders sein sollte (71775)
@@ -1636,16 +1636,16 @@ void Calendar::MouseButtonDown( const MouseEvent& rMEvt )
if ( !mbSelection )
{
- mbDrag = TRUE;
+ mbDrag = sal_True;
StartTracking();
}
mbMultiSelection = (mnWinStyle & (WB_MULTISELECT | WB_RANGESELECT)) != 0;
if ( (nHitTest & CALENDAR_HITTEST_DAY) && mbMultiSelection )
- mbWeekSel = TRUE;
+ mbWeekSel = sal_True;
else
- mbWeekSel = FALSE;
- ImplMouseSelect( aTempDate, nHitTest, FALSE, rMEvt.IsShift(), rMEvt.IsMod1() );
+ mbWeekSel = sal_False;
+ ImplMouseSelect( aTempDate, nHitTest, sal_False, rMEvt.IsShift(), rMEvt.IsMod1() );
}
}
}
@@ -1662,7 +1662,7 @@ void Calendar::MouseButtonDown( const MouseEvent& rMEvt )
void Calendar::MouseButtonUp( const MouseEvent& rMEvt )
{
if ( rMEvt.IsLeft() && mbSelection )
- ImplEndTracking( FALSE );
+ ImplEndTracking( sal_False );
else
Control::MouseButtonUp( rMEvt );
}
@@ -1672,7 +1672,7 @@ void Calendar::MouseButtonUp( const MouseEvent& rMEvt )
void Calendar::MouseMove( const MouseEvent& rMEvt )
{
if ( mbSelection && rMEvt.GetButtons() )
- ImplTracking( rMEvt.GetPosPixel(), FALSE );
+ ImplTracking( rMEvt.GetPosPixel(), sal_False );
else
Control::MouseMove( rMEvt );
}
@@ -1694,9 +1694,9 @@ void Calendar::Tracking( const TrackingEvent& rTEvt )
void Calendar::KeyInput( const KeyEvent& rKEvt )
{
Date aNewDate = maCurDate;
- BOOL bMultiSel = (mnWinStyle & (WB_RANGESELECT | WB_MULTISELECT)) != 0;
- BOOL bExpand = rKEvt.GetKeyCode().IsShift();
- BOOL bExtended = rKEvt.GetKeyCode().IsMod1();
+ sal_Bool bMultiSel = (mnWinStyle & (WB_RANGESELECT | WB_MULTISELECT)) != 0;
+ sal_Bool bExpand = rKEvt.GetKeyCode().IsShift();
+ sal_Bool bExtended = rKEvt.GetKeyCode().IsMod1();
switch ( rKEvt.GetKeyCode().GetCode() )
{
@@ -1741,13 +1741,13 @@ void Calendar::KeyInput( const KeyEvent& rKEvt )
{
if ( !bExpand )
{
- BOOL bDateSel = IsDateSelected( maCurDate );
+ sal_Bool bDateSel = IsDateSelected( maCurDate );
SelectDate( maCurDate, !bDateSel );
- mbSelLeft = FALSE;
+ mbSelLeft = sal_False;
SelectionChanging();
- mbTravelSelect = TRUE;
+ mbTravelSelect = sal_True;
Select();
- mbTravelSelect = FALSE;
+ mbTravelSelect = sal_False;
}
}
else
@@ -1770,23 +1770,23 @@ void Calendar::KeyInput( const KeyEvent& rKEvt )
{
if ( mbSelLeft )
{
- ImplCalendarSelectDateRange( mpSelectTable, Date( 1, 1, 0 ), aNewDate, FALSE );
- ImplCalendarSelectDateRange( mpSelectTable, maAnchorDate, Date( 31, 12, 9999 ), FALSE );
+ ImplCalendarSelectDateRange( mpSelectTable, Date( 1, 1, 0 ), aNewDate, sal_False );
+ ImplCalendarSelectDateRange( mpSelectTable, maAnchorDate, Date( 31, 12, 9999 ), sal_False );
}
else
{
- ImplCalendarSelectDateRange( mpSelectTable, Date( 1, 1, 0 ), maAnchorDate, FALSE );
- ImplCalendarSelectDateRange( mpSelectTable, aNewDate, Date( 31, 12, 9999 ), FALSE );
+ ImplCalendarSelectDateRange( mpSelectTable, Date( 1, 1, 0 ), maAnchorDate, sal_False );
+ ImplCalendarSelectDateRange( mpSelectTable, aNewDate, Date( 31, 12, 9999 ), sal_False );
}
}
- ImplCalendarSelectDateRange( mpSelectTable, aNewDate, maAnchorDate, TRUE );
- mbDirect = TRUE;
+ ImplCalendarSelectDateRange( mpSelectTable, aNewDate, maAnchorDate, sal_True );
+ mbDirect = sal_True;
SetCurDate( aNewDate );
- mbDirect = FALSE;
+ mbDirect = sal_False;
maAnchorDate = aOldAnchorDate;
- mbInSelChange = TRUE;
+ mbInSelChange = sal_True;
SelectionChanging();
- mbInSelChange = FALSE;
+ mbInSelChange = sal_False;
ImplUpdateSelection( pOldSel );
delete pOldSel;
}
@@ -1795,15 +1795,15 @@ void Calendar::KeyInput( const KeyEvent& rKEvt )
if ( mnWinStyle & WB_RANGESELECT )
{
SetNoSelection();
- SelectDate( aNewDate, TRUE );
+ SelectDate( aNewDate, sal_True );
}
- mbDirect = TRUE;
+ mbDirect = sal_True;
SetCurDate( aNewDate );
- mbDirect = FALSE;
+ mbDirect = sal_False;
}
- mbTravelSelect = TRUE;
+ mbTravelSelect = sal_True;
Select();
- mbTravelSelect = FALSE;
+ mbTravelSelect = sal_False;
}
}
@@ -1811,7 +1811,7 @@ void Calendar::KeyInput( const KeyEvent& rKEvt )
void Calendar::Paint( const Rectangle& )
{
- ImplDraw( TRUE );
+ ImplDraw( sal_True );
}
// -----------------------------------------------------------------------
@@ -1834,7 +1834,7 @@ void Calendar::LoseFocus()
void Calendar::Resize()
{
- ImplUpdate( TRUE );
+ ImplUpdate( sal_True );
Control::Resize();
}
@@ -1880,8 +1880,8 @@ void Calendar::RequestHelp( const HelpEvent& rHEvt )
if ( rHEvt.GetMode() & HELPMODE_QUICK )
{
maCalendarWrapper.setGregorianDateTime( aDate);
- USHORT nWeek = (USHORT) maCalendarWrapper.getValue( i18n::CalendarFieldIndex::WEEK_OF_YEAR);
- USHORT nMonth = aDate.GetMonth();
+ sal_uInt16 nWeek = (sal_uInt16) maCalendarWrapper.getValue( i18n::CalendarFieldIndex::WEEK_OF_YEAR);
+ sal_uInt16 nMonth = aDate.GetMonth();
XubString aStr( maDayText );
aStr.AppendAscii( ": " );
aStr.Append( XubString::CreateFromInt32( aDate.GetDayOfYear() ) );
@@ -1918,7 +1918,7 @@ void Calendar::Command( const CommandEvent& rCEvt )
if ( !mbSelection && rCEvt.IsMouseEvent() )
{
Date aTempDate = maCurDate;
- USHORT nHitTest = ImplHitTest( rCEvt.GetMousePosPixel(), aTempDate );
+ sal_uInt16 nHitTest = ImplHitTest( rCEvt.GetMousePosPixel(), aTempDate );
if ( nHitTest & CALENDAR_HITTEST_MONTHTITLE )
{
ImplShowMenu( rCEvt.GetMousePosPixel(), aTempDate );
@@ -1936,7 +1936,7 @@ void Calendar::Command( const CommandEvent& rCEvt )
{
while ( nNotchDelta < 0 )
{
- ImplScroll( TRUE );
+ ImplScroll( sal_True );
nNotchDelta++;
}
}
@@ -1944,7 +1944,7 @@ void Calendar::Command( const CommandEvent& rCEvt )
{
while ( nNotchDelta > 0 )
{
- ImplScroll( FALSE );
+ ImplScroll( sal_False );
nNotchDelta--;
}
}
@@ -2019,7 +2019,7 @@ void Calendar::Select()
// -----------------------------------------------------------------------
-void Calendar::SelectDate( const Date& rDate, BOOL bSelect )
+void Calendar::SelectDate( const Date& rDate, sal_Bool bSelect )
{
if ( !rDate.IsValid() )
return;
@@ -2043,7 +2043,7 @@ void Calendar::SelectDate( const Date& rDate, BOOL bSelect )
// -----------------------------------------------------------------------
void Calendar::SelectDateRange( const Date& rStartDate, const Date& rEndDate,
- BOOL bSelect )
+ sal_Bool bSelect )
{
if ( !rStartDate.IsValid() || !rEndDate.IsValid() )
return;
@@ -2086,21 +2086,21 @@ void Calendar::SetNoSelection()
// -----------------------------------------------------------------------
-BOOL Calendar::IsDateSelected( const Date& rDate ) const
+sal_Bool Calendar::IsDateSelected( const Date& rDate ) const
{
return mpSelectTable->IsKeyValid( rDate.GetDate() );
}
// -----------------------------------------------------------------------
-ULONG Calendar::GetSelectDateCount() const
+sal_uLong Calendar::GetSelectDateCount() const
{
return mpSelectTable->Count();
}
// -----------------------------------------------------------------------
-Date Calendar::GetSelectDate( ULONG nIndex ) const
+Date Calendar::GetSelectDate( sal_uLong nIndex ) const
{
if ( nIndex < mpSelectTable->Count() )
return Date( mpSelectTable->GetObjectKey( nIndex ) );
@@ -2120,18 +2120,18 @@ void Calendar::SetCurDate( const Date& rNewDate )
if ( maCurDate != rNewDate )
{
- BOOL bUpdate = IsVisible() && IsUpdateMode();
+ sal_Bool bUpdate = IsVisible() && IsUpdateMode();
Date aOldDate = maCurDate;
maCurDate = rNewDate;
maAnchorDate = maCurDate;
if ( !(mnWinStyle & (WB_RANGESELECT | WB_MULTISELECT)) )
{
- ImplCalendarSelectDate( mpSelectTable, aOldDate, FALSE );
- ImplCalendarSelectDate( mpSelectTable, maCurDate, TRUE );
+ ImplCalendarSelectDate( mpSelectTable, aOldDate, sal_False );
+ ImplCalendarSelectDate( mpSelectTable, maCurDate, sal_True );
}
else if ( !HasFocus() )
- bUpdate = FALSE;
+ bUpdate = sal_False;
// Aktuelles Datum noch in den sichtbaren Bereich verschieben
if ( mbFormat || (maCurDate < GetFirstMonth()) )
@@ -2176,7 +2176,7 @@ void Calendar::SetFirstDate( const Date& rNewFirstDate )
if ( maFirstDate != rNewFirstDate )
{
maFirstDate = Date( 1, rNewFirstDate.GetMonth(), rNewFirstDate.GetYear() );
- mbDropPos = FALSE;
+ mbDropPos = sal_False;
ImplUpdate();
}
}
@@ -2201,8 +2201,8 @@ Date Calendar::GetFirstMonth() const
Date Calendar::GetLastMonth() const
{
Date aDate = GetFirstMonth();
- USHORT nMonthCount = GetMonthCount();
- for ( USHORT i = 0; i < nMonthCount; i++ )
+ sal_uInt16 nMonthCount = GetMonthCount();
+ for ( sal_uInt16 i = 0; i < nMonthCount; i++ )
aDate += aDate.GetDaysInMonth();
aDate--;
return aDate;
@@ -2210,39 +2210,39 @@ Date Calendar::GetLastMonth() const
// -----------------------------------------------------------------------
-USHORT Calendar::GetMonthCount() const
+sal_uInt16 Calendar::GetMonthCount() const
{
if ( mbFormat )
return 1;
else
- return (USHORT)(mnMonthPerLine*mnLines);
+ return (sal_uInt16)(mnMonthPerLine*mnLines);
}
// -----------------------------------------------------------------------
-BOOL Calendar::GetDropDate( Date& rDate ) const
+sal_Bool Calendar::GetDropDate( Date& rDate ) const
{
if( mbDropPos )
{
rDate = maDropDate;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL Calendar::GetDate( const Point& rPos, Date& rDate ) const
+sal_Bool Calendar::GetDate( const Point& rPos, Date& rDate ) const
{
Date aDate = maCurDate;
- USHORT nHitTest = ImplHitTest( rPos, aDate );
+ sal_uInt16 nHitTest = ImplHitTest( rPos, aDate );
if ( nHitTest & CALENDAR_HITTEST_DAY )
{
rDate = aDate;
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -2256,8 +2256,8 @@ Rectangle Calendar::GetDateRect( const Date& rDate ) const
long nX;
long nY;
- ULONG nDaysOff;
- USHORT nDayIndex;
+ sal_uLong nDaysOff;
+ sal_uInt16 nDayIndex;
Date aDate = GetFirstMonth();
if ( rDate < aDate )
@@ -2274,13 +2274,13 @@ Rectangle Calendar::GetDateRect( const Date& rDate ) const
Date aLastDate = GetLastMonth();
if ( rDate > aLastDate )
{
- USHORT nWeekDay = (USHORT)aLastDate.GetDayOfWeek();
- nWeekDay = (nWeekDay+(7-(USHORT)ImplGetWeekStart())) % 7;
+ sal_uInt16 nWeekDay = (sal_uInt16)aLastDate.GetDayOfWeek();
+ nWeekDay = (nWeekDay+(7-(sal_uInt16)ImplGetWeekStart())) % 7;
aLastDate -= nWeekDay;
aRect = GetDateRect( aLastDate );
nDaysOff = rDate-aLastDate;
nDayIndex = 0;
- for ( USHORT i = 0; i <= nDaysOff; i++ )
+ for ( sal_uInt16 i = 0; i <= nDaysOff; i++ )
{
if ( aLastDate == rDate )
{
@@ -2307,7 +2307,7 @@ Rectangle Calendar::GetDateRect( const Date& rDate ) const
nX = 0;
for ( long j = 0; j < mnMonthPerLine; j++ )
{
- USHORT nDaysInMonth = aDate.GetDaysInMonth();
+ sal_uInt16 nDaysInMonth = aDate.GetDaysInMonth();
// Monat gerufen
if ( (aDate.GetMonth() == rDate.GetMonth()) &&
@@ -2315,9 +2315,9 @@ Rectangle Calendar::GetDateRect( const Date& rDate ) const
{
long nDayX = nX+mnDaysOffX;
long nDayY = nY+mnDaysOffY;
- nDayIndex = (USHORT)aDate.GetDayOfWeek();
- nDayIndex = (nDayIndex+(7-(USHORT)ImplGetWeekStart())) % 7;
- for ( USHORT nDay = 1; nDay <= nDaysInMonth; nDay++ )
+ nDayIndex = (sal_uInt16)aDate.GetDayOfWeek();
+ nDayIndex = (nDayIndex+(7-(sal_uInt16)ImplGetWeekStart())) % 7;
+ for ( sal_uInt16 nDay = 1; nDay <= nDaysInMonth; nDay++ )
{
if ( nDay == rDate.GetDay() )
{
@@ -2384,13 +2384,13 @@ void Calendar::SetSundayColor( const Color& rColor )
void Calendar::AddDateInfo( const Date& rDate, const String& rText,
const Color* pTextColor, const Color* pFrameColor,
- USHORT nFlags )
+ sal_uInt16 nFlags )
{
if ( !mpDateTable )
mpDateTable = new ImplDateTable( 256, 256 );
- BOOL bChanged = FALSE;
- ULONG nKey = rDate.GetDate();
+ sal_Bool bChanged = sal_False;
+ sal_uLong nKey = rDate.GetDate();
ImplDateInfo* pDateInfo = mpDateTable->Get( nKey );
if ( pDateInfo )
pDateInfo->maText = rText;
@@ -2406,13 +2406,13 @@ void Calendar::AddDateInfo( const Date& rDate, const String& rText,
if ( *(pDateInfo->mpTextColor) != *pTextColor )
{
*(pDateInfo->mpTextColor) = *pTextColor;
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
else
{
pDateInfo->mpTextColor = new Color( *pTextColor );
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
else
@@ -2421,7 +2421,7 @@ void Calendar::AddDateInfo( const Date& rDate, const String& rText,
{
delete pDateInfo->mpTextColor;
pDateInfo->mpTextColor = NULL;
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
if ( pFrameColor )
@@ -2431,13 +2431,13 @@ void Calendar::AddDateInfo( const Date& rDate, const String& rText,
if ( *(pDateInfo->mpFrameColor) != *pFrameColor )
{
*(pDateInfo->mpFrameColor) = *pFrameColor;
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
else
{
pDateInfo->mpFrameColor = new Color( *pFrameColor );
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
else
@@ -2446,13 +2446,13 @@ void Calendar::AddDateInfo( const Date& rDate, const String& rText,
{
delete pDateInfo->mpFrameColor;
pDateInfo->mpFrameColor = NULL;
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
if ( pDateInfo->mnFlags != nFlags )
{
pDateInfo->mnFlags = nFlags;
- bChanged = TRUE;
+ bChanged = sal_True;
}
if ( bChanged )
@@ -2483,7 +2483,7 @@ void Calendar::ClearDateInfo()
ImplDateInfo* pDateInfo = mpDateTable->First();
while ( pDateInfo )
{
- ULONG nKey = mpDateTable->GetCurKey();
+ sal_uLong nKey = mpDateTable->GetCurKey();
mpDateTable->Remove( nKey );
Date aDate( nKey );
ImplUpdateDate( aDate );
@@ -2502,7 +2502,7 @@ XubString Calendar::GetDateInfoText( const Date& rDate )
XubString aRet;
if ( mpDateTable )
{
- ULONG nKey = rDate.GetDate();
+ sal_uLong nKey = rDate.GetDate();
ImplDateInfo* pDateInfo = mpDateTable->Get( nKey );
if ( pDateInfo )
aRet = pDateInfo->maText;
@@ -2512,7 +2512,7 @@ XubString Calendar::GetDateInfoText( const Date& rDate )
// -----------------------------------------------------------------------
-BOOL Calendar::ShowDropPos( const Point& rPos, Date& rDate )
+sal_Bool Calendar::ShowDropPos( const Point& rPos, Date& rDate )
{
Date aTempDate = maCurDate;
mnDragScrollHitTest = ImplHitTest( rPos, aTempDate );
@@ -2534,12 +2534,12 @@ BOOL Calendar::ShowDropPos( const Point& rPos, Date& rDate )
if( mbDropPos )
ImplInvertDropPos();
maDropDate = aTempDate;
- mbDropPos = TRUE;
+ mbDropPos = sal_True;
ImplInvertDropPos();
}
rDate = maDropDate;
- return TRUE;
+ return sal_True;
}
}
}
@@ -2547,7 +2547,7 @@ BOOL Calendar::ShowDropPos( const Point& rPos, Date& rDate )
maDragScrollTimer.Stop();
HideDropPos();
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -2557,7 +2557,7 @@ void Calendar::HideDropPos()
if ( mbDropPos )
{
ImplInvertDropPos();
- mbDropPos = FALSE;
+ mbDropPos = sal_False;
}
}
@@ -2570,7 +2570,7 @@ void Calendar::StartSelection()
maOldCurDate = maCurDate;
mpOldSelectTable = new Table( *mpSelectTable );
- mbSelection = TRUE;
+ mbSelection = sal_True;
}
// -----------------------------------------------------------------------
@@ -2582,12 +2582,12 @@ void Calendar::EndSelection()
if ( !mbSelection )
ReleaseMouse();
- mbDrag = FALSE;
- mbSelection = FALSE;
- mbMultiSelection = FALSE;
- mbSpinDown = FALSE;
- mbPrevIn = FALSE;
- mbNextIn = FALSE;
+ mbDrag = sal_False;
+ mbSelection = sal_False;
+ mbMultiSelection = sal_False;
+ mbSpinDown = sal_False;
+ mbPrevIn = sal_False;
+ mbNextIn = sal_False;
}
}
@@ -2668,8 +2668,8 @@ public:
void SetCalendar( Calendar* pCalendar )
{ mpCalendar = pCalendar; }
- PushButton* EnableTodayBtn( BOOL bEnable );
- PushButton* EnableNoneBtn( BOOL bEnable );
+ PushButton* EnableTodayBtn( sal_Bool bEnable );
+ PushButton* EnableNoneBtn( sal_Bool bEnable );
void ArrangeButtons();
long Notify( NotifyEvent& rNEvt );
@@ -2697,7 +2697,7 @@ ImplCFieldFloatWin::~ImplCFieldFloatWin()
// -----------------------------------------------------------------------
-PushButton* ImplCFieldFloatWin::EnableTodayBtn( BOOL bEnable )
+PushButton* ImplCFieldFloatWin::EnableTodayBtn( sal_Bool bEnable )
{
if ( bEnable )
{
@@ -2729,7 +2729,7 @@ PushButton* ImplCFieldFloatWin::EnableTodayBtn( BOOL bEnable )
// -----------------------------------------------------------------------
-PushButton* ImplCFieldFloatWin::EnableNoneBtn( BOOL bEnable )
+PushButton* ImplCFieldFloatWin::EnableNoneBtn( sal_Bool bEnable )
{
if ( bEnable )
{
@@ -2848,8 +2848,8 @@ CalendarField::CalendarField( Window* pParent, WinBits nWinStyle ) :
mpFloatWin = NULL;
mpCalendar = NULL;
mnCalendarStyle = 0;
- mbToday = FALSE;
- mbNone = FALSE;
+ mbToday = sal_False;
+ mbNone = sal_False;
}
// -----------------------------------------------------------------------
@@ -2861,8 +2861,8 @@ CalendarField::CalendarField( Window* pParent, const ResId& rResId ) :
mpFloatWin = NULL;
mpCalendar = NULL;
mnCalendarStyle = 0;
- mbToday = FALSE;
- mbNone = FALSE;
+ mbToday = sal_False;
+ mbNone = sal_False;
}
// -----------------------------------------------------------------------
@@ -2948,7 +2948,7 @@ void CalendarField::Select()
// -----------------------------------------------------------------------
-BOOL CalendarField::ShowDropDown( BOOL bShow )
+sal_Bool CalendarField::ShowDropDown( sal_Bool bShow )
{
if ( bShow )
{
@@ -2993,7 +2993,7 @@ BOOL CalendarField::ShowDropDown( BOOL bShow )
mpCalendar->EndSelection();
EndDropDown();
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 91c446a880a9..219b5428edeb 100755
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -59,10 +59,10 @@ static sal_Unicode aImplStarSymbolText[] = {0x2706,0x2704,0x270D,0xE033,0x2211,0
struct ImplColorListData
{
Color aColor;
- BOOL bColor;
+ sal_Bool bColor;
- ImplColorListData() : aColor( COL_BLACK ) { bColor = FALSE; }
- ImplColorListData( const Color& rColor ) : aColor( rColor ) { bColor = TRUE; }
+ ImplColorListData() : aColor( COL_BLACK ) { bColor = sal_False; }
+ ImplColorListData( const Color& rColor ) : aColor( rColor ) { bColor = sal_True; }
};
DECLARE_LIST( ImpColorList, ImplColorListData* )
@@ -76,7 +76,7 @@ void ColorListBox::ImplInit()
aImageSize.Height() = GetTextHeight();
aImageSize.Height() -= 2;
- EnableUserDraw( TRUE );
+ EnableUserDraw( sal_True );
SetUserItemSize( aImageSize );
}
@@ -84,7 +84,7 @@ void ColorListBox::ImplInit()
void ColorListBox::ImplDestroyColorEntries()
{
- for ( USHORT n = (USHORT) pColorList->Count(); n; )
+ for ( sal_uInt16 n = (sal_uInt16) pColorList->Count(); n; )
{
ImplColorListData* pData = pColorList->GetObject( --n );
delete pData;
@@ -118,7 +118,7 @@ ColorListBox::~ColorListBox()
// -----------------------------------------------------------------------
-USHORT ColorListBox::InsertEntry( const XubString& rStr, USHORT nPos )
+sal_uInt16 ColorListBox::InsertEntry( const XubString& rStr, sal_uInt16 nPos )
{
nPos = ListBox::InsertEntry( rStr, nPos );
if ( nPos != LISTBOX_ERROR )
@@ -131,8 +131,8 @@ USHORT ColorListBox::InsertEntry( const XubString& rStr, USHORT nPos )
// -----------------------------------------------------------------------
-USHORT ColorListBox::InsertEntry( const Color& rColor, const XubString& rStr,
- USHORT nPos )
+sal_uInt16 ColorListBox::InsertEntry( const Color& rColor, const XubString& rStr,
+ sal_uInt16 nPos )
{
nPos = ListBox::InsertEntry( rStr, nPos );
if ( nPos != LISTBOX_ERROR )
@@ -153,7 +153,7 @@ void ColorListBox::InsertAutomaticEntry()
// -----------------------------------------------------------------------
-void ColorListBox::RemoveEntry( USHORT nPos )
+void ColorListBox::RemoveEntry( sal_uInt16 nPos )
{
ListBox::RemoveEntry( nPos );
delete pColorList->Remove( nPos );
@@ -175,11 +175,11 @@ void ColorListBox::CopyEntries( const ColorListBox& rBox )
ImplDestroyColorEntries();
// Daten kopieren
- USHORT nCount = (USHORT) rBox.pColorList->Count();
- for ( USHORT n = 0; n < nCount; n++ )
+ sal_uInt16 nCount = (sal_uInt16) rBox.pColorList->Count();
+ for ( sal_uInt16 n = 0; n < nCount; n++ )
{
ImplColorListData* pData = rBox.pColorList->GetObject( n );
- USHORT nPos = InsertEntry( rBox.GetEntry( n ), LISTBOX_APPEND );
+ sal_uInt16 nPos = InsertEntry( rBox.GetEntry( n ), LISTBOX_APPEND );
if ( nPos != LISTBOX_ERROR )
pColorList->Insert( new ImplColorListData( *pData ), nPos );
}
@@ -187,9 +187,9 @@ void ColorListBox::CopyEntries( const ColorListBox& rBox )
// -----------------------------------------------------------------------
-USHORT ColorListBox::GetEntryPos( const Color& rColor ) const
+sal_uInt16 ColorListBox::GetEntryPos( const Color& rColor ) const
{
- for( USHORT n = (USHORT) pColorList->Count(); n; )
+ for( sal_uInt16 n = (sal_uInt16) pColorList->Count(); n; )
{
ImplColorListData* pData = pColorList->GetObject( --n );
if ( pData->bColor && ( pData->aColor == rColor ) )
@@ -200,7 +200,7 @@ USHORT ColorListBox::GetEntryPos( const Color& rColor ) const
// -----------------------------------------------------------------------
-Color ColorListBox::GetEntryColor( USHORT nPos ) const
+Color ColorListBox::GetEntryColor( sal_uInt16 nPos ) const
{
Color aColor;
ImplColorListData* pData = pColorList->GetObject( nPos );
@@ -226,13 +226,13 @@ void ColorListBox::UserDraw( const UserDrawEvent& rUDEvt )
rUDEvt.GetDevice()->SetLineColor( rUDEvt.GetDevice()->GetTextColor() );
rUDEvt.GetDevice()->DrawRect( Rectangle( aPos, aImageSize ) );
rUDEvt.GetDevice()->Pop();
- ListBox::DrawEntry( rUDEvt, FALSE, TRUE, FALSE );
+ ListBox::DrawEntry( rUDEvt, sal_False, sal_True, sal_False );
}
else
- ListBox::DrawEntry( rUDEvt, FALSE, TRUE, TRUE );
+ ListBox::DrawEntry( rUDEvt, sal_False, sal_True, sal_True );
}
else
- ListBox::DrawEntry( rUDEvt, TRUE, TRUE, FALSE );
+ ListBox::DrawEntry( rUDEvt, sal_True, sal_True, sal_False );
}
// =======================================================================
@@ -385,8 +385,8 @@ LineListBox::LineListBox( Window* pParent, const ResId& rResId ) :
LineListBox::~LineListBox()
{
- ULONG n = 0;
- ULONG nCount = pLineList->Count();
+ sal_uLong n = 0;
+ sal_uLong nCount = pLineList->Count();
while ( n < nCount )
{
ImpLineListData* pData = pLineList->GetObject( n );
@@ -399,7 +399,7 @@ LineListBox::~LineListBox()
// -----------------------------------------------------------------------
-USHORT LineListBox::InsertEntry( const XubString& rStr, USHORT nPos )
+sal_uInt16 LineListBox::InsertEntry( const XubString& rStr, sal_uInt16 nPos )
{
nPos = ListBox::InsertEntry( rStr, nPos );
if ( nPos != LISTBOX_ERROR )
@@ -409,8 +409,8 @@ USHORT LineListBox::InsertEntry( const XubString& rStr, USHORT nPos )
// -----------------------------------------------------------------------
-USHORT LineListBox::InsertEntry( long nLine1, long nLine2, long nDistance,
- USHORT nPos )
+sal_uInt16 LineListBox::InsertEntry( long nLine1, long nLine2, long nDistance,
+ sal_uInt16 nPos )
{
XubString aStr;
Bitmap aBmp;
@@ -430,7 +430,7 @@ USHORT LineListBox::InsertEntry( long nLine1, long nLine2, long nDistance,
// -----------------------------------------------------------------------
-void LineListBox::RemoveEntry( USHORT nPos )
+void LineListBox::RemoveEntry( sal_uInt16 nPos )
{
ListBox::RemoveEntry( nPos );
ImpLineListData* pData = pLineList->Remove( nPos );
@@ -442,8 +442,8 @@ void LineListBox::RemoveEntry( USHORT nPos )
void LineListBox::Clear()
{
- ULONG n = 0;
- ULONG nCount = pLineList->Count();
+ sal_uLong n = 0;
+ sal_uLong nCount = pLineList->Count();
while ( n < nCount )
{
ImpLineListData* pData = pLineList->GetObject( n );
@@ -458,11 +458,11 @@ void LineListBox::Clear()
// -----------------------------------------------------------------------
-USHORT LineListBox::GetEntryPos( long nLine1, long nLine2,
+sal_uInt16 LineListBox::GetEntryPos( long nLine1, long nLine2,
long nDistance ) const
{
- ULONG n = 0;
- ULONG nCount = pLineList->Count();
+ sal_uLong n = 0;
+ sal_uLong nCount = pLineList->Count();
while ( n < nCount )
{
ImpLineListData* pData = pLineList->GetObject( n );
@@ -471,7 +471,7 @@ USHORT LineListBox::GetEntryPos( long nLine1, long nLine2,
if ( (pData->nLine1 == nLine1) &&
(pData->nLine2 == nLine2) &&
(pData->nDistance == nDistance) )
- return (USHORT)n;
+ return (sal_uInt16)n;
}
n++;
@@ -482,7 +482,7 @@ USHORT LineListBox::GetEntryPos( long nLine1, long nLine2,
// -----------------------------------------------------------------------
-long LineListBox::GetEntryLine1( USHORT nPos ) const
+long LineListBox::GetEntryLine1( sal_uInt16 nPos ) const
{
ImpLineListData* pData = pLineList->GetObject( nPos );
if ( pData )
@@ -493,7 +493,7 @@ long LineListBox::GetEntryLine1( USHORT nPos ) const
// -----------------------------------------------------------------------
-long LineListBox::GetEntryLine2( USHORT nPos ) const
+long LineListBox::GetEntryLine2( sal_uInt16 nPos ) const
{
ImpLineListData* pData = pLineList->GetObject( nPos );
if ( pData )
@@ -504,7 +504,7 @@ long LineListBox::GetEntryLine2( USHORT nPos ) const
// -----------------------------------------------------------------------
-long LineListBox::GetEntryDistance( USHORT nPos ) const
+long LineListBox::GetEntryDistance( sal_uInt16 nPos ) const
{
ImpLineListData* pData = pLineList->GetObject( nPos );
if ( pData )
@@ -519,7 +519,7 @@ void LineListBox::UpdateLineColors( void )
{
if( UpdatePaintLineColor() )
{
- ULONG nCount = pLineList->Count();
+ sal_uLong nCount = pLineList->Count();
if( !nCount )
return;
@@ -527,34 +527,34 @@ void LineListBox::UpdateLineColors( void )
Bitmap aBmp;
// exchange entries which containing lines
- SetUpdateMode( FALSE );
+ SetUpdateMode( sal_False );
- USHORT nSelEntry = GetSelectEntryPos();
- for( ULONG n = 0 ; n < nCount ; ++n )
+ sal_uInt16 nSelEntry = GetSelectEntryPos();
+ for( sal_uLong n = 0 ; n < nCount ; ++n )
{
ImpLineListData* pData = pLineList->GetObject( n );
if( pData )
{
// exchange listbox data
- ListBox::RemoveEntry( USHORT( n ) );
+ ListBox::RemoveEntry( sal_uInt16( n ) );
ImpGetLine( pData->nLine1, pData->nLine2, pData->nDistance, aBmp, aStr );
- ListBox::InsertEntry( aStr, aBmp, USHORT( n ) );
+ ListBox::InsertEntry( aStr, aBmp, sal_uInt16( n ) );
}
}
if( nSelEntry != LISTBOX_ENTRY_NOTFOUND )
SelectEntryPos( nSelEntry );
- SetUpdateMode( TRUE );
+ SetUpdateMode( sal_True );
Invalidate();
}
}
// -----------------------------------------------------------------------
-BOOL LineListBox::UpdatePaintLineColor( void )
+sal_Bool LineListBox::UpdatePaintLineColor( void )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
const StyleSettings& rSettings = GetSettings().GetStyleSettings();
Color aNewCol( rSettings.GetWindowColor().IsDark()? rSettings.GetLabelTextColor() : aColor );
@@ -583,10 +583,10 @@ void LineListBox::DataChanged( const DataChangedEvent& rDCEvt )
struct ImplFontNameListData
{
FontInfo maInfo;
- USHORT mnType;
+ sal_uInt16 mnType;
ImplFontNameListData( const FontInfo& rInfo,
- USHORT nType ) :
+ sal_uInt16 nType ) :
maInfo( rInfo ),
mnType( nType )
{}
@@ -601,8 +601,8 @@ FontNameBox::FontNameBox( Window* pParent, WinBits nWinStyle ) :
{
InitBitmaps();
mpFontList = NULL;
- mbWYSIWYG = FALSE;
- mbSymbols = FALSE;
+ mbWYSIWYG = sal_False;
+ mbSymbols = sal_False;
}
// -------------------------------------------------------------------
@@ -612,8 +612,8 @@ FontNameBox::FontNameBox( Window* pParent, const ResId& rResId ) :
{
InitBitmaps();
mpFontList = NULL;
- mbWYSIWYG = FALSE;
- mbSymbols = FALSE;
+ mbWYSIWYG = sal_False;
+ mbSymbols = sal_False;
}
// -------------------------------------------------------------------
@@ -637,7 +637,7 @@ void FontNameBox::DataChanged( const DataChangedEvent& rDCEvt )
void FontNameBox::InitBitmaps( void )
{
- BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
+ sal_Bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
maImagePrinterFont = Image( SvtResId( bHC? RID_IMG_PRINTERFONT_HC : RID_IMG_PRINTERFONT ) );
maImageBitmapFont = Image( SvtResId( bHC? RID_IMG_BITMAPFONT_HC : RID_IMG_BITMAPFONT ) );
@@ -672,14 +672,14 @@ void FontNameBox::Fill( const FontList* pList )
mpFontList = new ImplFontList;
// insert fonts
- USHORT nFontCount = pList->GetFontNameCount();
- for ( USHORT i = 0; i < nFontCount; i++ )
+ sal_uInt16 nFontCount = pList->GetFontNameCount();
+ for ( sal_uInt16 i = 0; i < nFontCount; i++ )
{
const FontInfo& rFontInfo = pList->GetFontName( i );
- ULONG nIndex = InsertEntry( rFontInfo.GetName() );
+ sal_uLong nIndex = InsertEntry( rFontInfo.GetName() );
if ( nIndex != LISTBOX_ERROR )
{
- USHORT nType = pList->GetFontNameType( i );
+ sal_uInt16 nType = pList->GetFontNameType( i );
ImplFontNameListData* pData = new ImplFontNameListData( rFontInfo, nType );
mpFontList->Insert( pData, nIndex );
}
@@ -694,7 +694,7 @@ void FontNameBox::Fill( const FontList* pList )
// -------------------------------------------------------------------
-void FontNameBox::EnableWYSIWYG( BOOL bEnable )
+void FontNameBox::EnableWYSIWYG( sal_Bool bEnable )
{
if ( bEnable != mbWYSIWYG )
{
@@ -706,7 +706,7 @@ void FontNameBox::EnableWYSIWYG( BOOL bEnable )
// -------------------------------------------------------------------
-void FontNameBox::EnableSymbols( BOOL bEnable )
+void FontNameBox::EnableSymbols( sal_Bool bEnable )
{
if ( bEnable != mbSymbols )
{
@@ -723,21 +723,21 @@ void FontNameBox::ImplCalcUserItemSize()
Size aUserItemSz;
if ( mbWYSIWYG && mpFontList )
{
- USHORT nMaxLen = 0;
- BOOL bSymbolFont = FALSE;
- BOOL bStarSymbol = FALSE;
- for ( USHORT n = GetEntryCount(); n; )
+ sal_uInt16 nMaxLen = 0;
+ sal_Bool bSymbolFont = sal_False;
+ sal_Bool bStarSymbol = sal_False;
+ for ( sal_uInt16 n = GetEntryCount(); n; )
{
ImplFontNameListData* pData = mpFontList->GetObject( --n );
XubString aFontName = pData->maInfo.GetName();
if ( aFontName.Len() > nMaxLen )
nMaxLen = aFontName.Len();
if ( pData->maInfo.GetCharSet() == RTL_TEXTENCODING_SYMBOL )
- bSymbolFont = TRUE;
+ bSymbolFont = sal_True;
// starsymbol is a unicode font, but gets WYSIWIG symbols
if( aFontName.EqualsIgnoreCaseAscii( "starsymbol" )
|| aFontName.EqualsIgnoreCaseAscii( "opensymbol" ) )
- bSymbolFont = bStarSymbol = TRUE;
+ bSymbolFont = bStarSymbol = sal_True;
}
// guess maximimum width
@@ -775,7 +775,7 @@ void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt )
{
ImplFontNameListData* pData = mpFontList->GetObject( rUDEvt.GetItemId() );
const FontInfo& rInfo = pData->maInfo;
- USHORT nType = pData->mnType;
+ sal_uInt16 nType = pData->mnType;
Point aTopLeft = rUDEvt.GetRect().TopLeft();
long nX = aTopLeft.X();
long nH = rUDEvt.GetRect().GetHeight();
@@ -887,11 +887,11 @@ void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt )
rUDEvt.GetDevice()->DrawText( aPos, aString );
rUDEvt.GetDevice()->SetFont( aOldFont );
- DrawEntry( rUDEvt, FALSE, FALSE); // draw seperator
+ DrawEntry( rUDEvt, sal_False, sal_False); // draw seperator
}
else
{
- DrawEntry( rUDEvt, TRUE, TRUE );
+ DrawEntry( rUDEvt, sal_True, sal_True );
}
}
@@ -943,12 +943,12 @@ void FontStyleBox::Modify()
CharClass aChrCls( ::comphelper::getProcessServiceFactory(),
GetSettings().GetLocale() );
XubString aStr = GetText();
- USHORT nEntryCount = GetEntryCount();
+ sal_uInt16 nEntryCount = GetEntryCount();
if ( GetEntryPos( aStr ) == COMBOBOX_ENTRY_NOTFOUND )
{
aChrCls.toUpper( aStr );
- for ( USHORT i = 0; i < nEntryCount; i++ )
+ for ( sal_uInt16 i = 0; i < nEntryCount; i++ )
{
XubString aEntryText = GetEntry( i );
aChrCls.toUpper( aEntryText );
@@ -972,7 +972,7 @@ void FontStyleBox::Fill( const XubString& rName, const FontList* pList )
// else aLastStyle will overwritten
// store prior selection position and clear box
XubString aOldText = GetText();
- USHORT nPos = GetEntryPos( aOldText );
+ sal_uInt16 nPos = GetEntryPos( aOldText );
Clear();
// does a font with this name already exist?
@@ -983,11 +983,11 @@ void FontStyleBox::Fill( const XubString& rName, const FontList* pList )
FontWeight eLastWeight = WEIGHT_DONTKNOW;
FontItalic eLastItalic = ITALIC_NONE;
FontWidth eLastWidth = WIDTH_DONTKNOW;
- BOOL bNormal = FALSE;
- BOOL bItalic = FALSE;
- BOOL bBold = FALSE;
- BOOL bBoldItalic = FALSE;
- BOOL bInsert = FALSE;
+ sal_Bool bNormal = sal_False;
+ sal_Bool bItalic = sal_False;
+ sal_Bool bBold = sal_False;
+ sal_Bool bBoldItalic = sal_False;
+ sal_Bool bInsert = sal_False;
FontInfo aInfo;
while ( hFontInfo )
{
@@ -1007,16 +1007,16 @@ void FontStyleBox::Fill( const XubString& rName, const FontList* pList )
if ( eWeight <= WEIGHT_NORMAL )
{
if ( eItalic != ITALIC_NONE )
- bItalic = TRUE;
+ bItalic = sal_True;
else
- bNormal = TRUE;
+ bNormal = sal_True;
}
else
{
if ( eItalic != ITALIC_NONE )
- bBoldItalic = TRUE;
+ bBoldItalic = sal_True;
else
- bBold = TRUE;
+ bBold = sal_True;
}
// For wrong StyleNames we replace this with the correct once
@@ -1050,11 +1050,11 @@ void FontStyleBox::Fill( const XubString& rName, const FontList* pList )
}
if ( !bItalic && (aStyleText == pList->GetItalicStr()) )
- bItalic = TRUE;
+ bItalic = sal_True;
else if ( !bBold && (aStyleText == pList->GetBoldStr()) )
- bBold = TRUE;
+ bBold = sal_True;
else if ( !bBoldItalic && (aStyleText == pList->GetBoldItalicStr()) )
- bBoldItalic = TRUE;
+ bBoldItalic = sal_True;
hFontInfo = pList->GetNextFontInfo( hFontInfo );
}
@@ -1133,15 +1133,15 @@ FontSizeBox::~FontSizeBox()
void FontSizeBox::ImplInit()
{
- EnableAutocomplete( FALSE );
+ EnableAutocomplete( sal_False );
- bRelativeMode = FALSE;
- bPtRelative = FALSE;
- bRelative = FALSE;
- bStdSize = FALSE;
+ bRelativeMode = sal_False;
+ bPtRelative = sal_False;
+ bRelative = sal_False;
+ bStdSize = sal_False;
pFontList = NULL;
- SetShowTrailingZeros( FALSE );
+ SetShowTrailingZeros( sal_False );
SetDecimalDigits( 1 );
SetMin( 20 );
SetMax( 9999 );
@@ -1177,24 +1177,24 @@ void FontSizeBox::Modify()
XubString aStr = GetText();
aStr.EraseLeadingChars();
- BOOL bNewMode = bRelative;
- BOOL bOldPtRelMode = bPtRelative;
+ sal_Bool bNewMode = bRelative;
+ sal_Bool bOldPtRelMode = bPtRelative;
if ( bRelative )
{
- bPtRelative = FALSE;
+ bPtRelative = sal_False;
const xub_Unicode* pStr = aStr.GetBuffer();
while ( *pStr )
{
if ( ((*pStr < '0') || (*pStr > '9')) && (*pStr != '%') )
{
if ( ('-' == *pStr || '+' == *pStr) && !bPtRelative )
- bPtRelative = TRUE;
+ bPtRelative = sal_True;
else if ( bPtRelative && 'p' == *pStr && 't' == *++pStr )
;
else
{
- bNewMode = FALSE;
+ bNewMode = sal_False;
break;
}
}
@@ -1205,14 +1205,14 @@ void FontSizeBox::Modify()
{
if ( STRING_NOTFOUND != aStr.Search( '%' ) )
{
- bNewMode = TRUE;
- bPtRelative = FALSE;
+ bNewMode = sal_True;
+ bPtRelative = sal_False;
}
if ( '-' == aStr.GetChar( 0 ) || '+' == aStr.GetChar( 0 ) )
{
- bNewMode = TRUE;
- bPtRelative = TRUE;
+ bNewMode = sal_True;
+ bPtRelative = sal_True;
}
}
@@ -1253,24 +1253,24 @@ void FontSizeBox::Fill( const FontInfo* pInfo, const FontList* pList )
// for standard sizes we don't need to bother
if ( bStdSize && GetEntryCount() && aFontSizeNames.IsEmpty() )
return;
- bStdSize = TRUE;
+ bStdSize = sal_True;
}
else
- bStdSize = FALSE;
+ bStdSize = sal_False;
Selection aSelection = GetSelection();
XubString aStr = GetText();
Clear();
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
if ( !aFontSizeNames.IsEmpty() )
{
if ( pAry == pList->GetStdSizeAry() )
{
// for scalable fonts all font size names
- ULONG nCount = aFontSizeNames.Count();
- for( ULONG i = 0; i < nCount; i++ )
+ sal_uLong nCount = aFontSizeNames.Count();
+ for( sal_uLong i = 0; i < nCount; i++ )
{
String aSizeName = aFontSizeNames.GetIndexName( i );
long nSize = aFontSizeNames.GetIndexSize( i );
@@ -1313,9 +1313,9 @@ void FontSizeBox::Fill( const FontInfo* pInfo, const FontList* pList )
// -----------------------------------------------------------------------
-void FontSizeBox::EnableRelativeMode( USHORT nMin, USHORT nMax, USHORT nStep )
+void FontSizeBox::EnableRelativeMode( sal_uInt16 nMin, sal_uInt16 nMax, sal_uInt16 nStep )
{
- bRelativeMode = TRUE;
+ bRelativeMode = sal_True;
nRelMin = nMin;
nRelMax = nMax;
nRelStep = nStep;
@@ -1326,7 +1326,7 @@ void FontSizeBox::EnableRelativeMode( USHORT nMin, USHORT nMax, USHORT nStep )
void FontSizeBox::EnablePtRelativeMode( short nMin, short nMax, short nStep )
{
- bRelativeMode = TRUE;
+ bRelativeMode = sal_True;
nPtRelMin = nMin;
nPtRelMax = nMax;
nPtRelStep = nStep;
@@ -1335,7 +1335,7 @@ void FontSizeBox::EnablePtRelativeMode( short nMin, short nMax, short nStep )
// -----------------------------------------------------------------------
-void FontSizeBox::SetRelative( BOOL bNewRelative )
+void FontSizeBox::SetRelative( sal_Bool bNewRelative )
{
if ( bRelativeMode )
{
@@ -1345,8 +1345,8 @@ void FontSizeBox::SetRelative( BOOL bNewRelative )
if ( bNewRelative )
{
- bRelative = TRUE;
- bStdSize = FALSE;
+ bRelative = sal_True;
+ bStdSize = sal_False;
if ( bPtRelative )
{
@@ -1374,7 +1374,7 @@ void FontSizeBox::SetRelative( BOOL bNewRelative )
SetUnit( FUNIT_CUSTOM );
Clear();
- USHORT i = nRelMin;
+ sal_uInt16 i = nRelMin;
while ( i <= nRelMax )
{
InsertValue( i );
@@ -1384,7 +1384,7 @@ void FontSizeBox::SetRelative( BOOL bNewRelative )
}
else
{
- bRelative = bPtRelative = FALSE;
+ bRelative = bPtRelative = sal_False;
SetDecimalDigits( 1 );
SetMin( 20 );
SetMax( 9999 );
@@ -1424,7 +1424,7 @@ void FontSizeBox::SetValue( sal_Int64 nNewValue, FieldUnit eInUnit )
mnLastValue = nTempValue;
SetText( aName );
mnFieldValue = mnLastValue;
- SetEmptyFieldValueData( FALSE );
+ SetEmptyFieldValueData( sal_False );
return;
}
}
@@ -1441,7 +1441,7 @@ void FontSizeBox::SetValue( sal_Int64 nNewValue )
// -----------------------------------------------------------------------
-sal_Int64 FontSizeBox::GetValue( USHORT nPos, FieldUnit eOutUnit ) const
+sal_Int64 FontSizeBox::GetValue( sal_uInt16 nPos, FieldUnit eOutUnit ) const
{
if ( !bRelative )
{
diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx
index 979a8a3a3d32..1314f416eec6 100755
--- a/svtools/source/control/ctrltool.cxx
+++ b/svtools/source/control/ctrltool.cxx
@@ -115,7 +115,7 @@ class ImplFontListNameInfo
private:
XubString maSearchName;
ImplFontListFontInfo* mpFirst;
- USHORT mnType;
+ sal_uInt16 mnType;
ImplFontListNameInfo( const XubString& rSearchName ) :
maSearchName( rSearchName )
@@ -163,7 +163,7 @@ static void ImplMakeSearchStringFromName( XubString& rStr )
// -----------------------------------------------------------------------
-ImplFontListNameInfo* FontList::ImplFind( const XubString& rSearchName, ULONG* pIndex ) const
+ImplFontListNameInfo* FontList::ImplFind( const XubString& rSearchName, sal_uLong* pIndex ) const
{
// Wenn kein Eintrag in der Liste oder der Eintrag groesser ist als
// der Letzte, dann hinten dranhaengen. Wir vergleichen erst mit dem
@@ -171,7 +171,7 @@ ImplFontListNameInfo* FontList::ImplFind( const XubString& rSearchName, ULONG* p
// und somit die Wahrscheinlichkeit das hinten angehaengt werden muss
// sehr gross ist.
StringCompare eComp;
- ULONG nCnt = Count();
+ sal_uLong nCnt = Count();
if ( !nCnt )
{
if ( pIndex )
@@ -195,9 +195,9 @@ ImplFontListNameInfo* FontList::ImplFind( const XubString& rSearchName, ULONG* p
// Fonts in der Liste suchen
ImplFontListNameInfo* pCompareData;
ImplFontListNameInfo* pFoundData = NULL;
- ULONG nLow = 0;
- ULONG nHigh = nCnt-1;
- ULONG nMid;
+ sal_uLong nLow = 0;
+ sal_uLong nHigh = nCnt-1;
+ sal_uLong nMid;
do
{
@@ -246,12 +246,12 @@ ImplFontListNameInfo* FontList::ImplFindByName( const XubString& rStr ) const
// -----------------------------------------------------------------------
-void FontList::ImplInsertFonts( OutputDevice* pDevice, BOOL bAll,
- BOOL bInsertData )
+void FontList::ImplInsertFonts( OutputDevice* pDevice, sal_Bool bAll,
+ sal_Bool bInsertData )
{
rtl_TextEncoding eSystemEncoding = gsl_getSystemTextEncoding();
- USHORT nType;
+ sal_uInt16 nType;
if ( pDevice->GetOutDevType() != OUTDEV_PRINTER )
nType = FONTLIST_FONTNAMETYPE_SCREEN;
else
@@ -259,7 +259,7 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, BOOL bAll,
// Alle Fonts vom Device abfragen
int n = pDevice->GetDevFontCount();
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < n; i++ )
{
FontInfo aFontInfo = pDevice->GetDevFont( i );
@@ -271,7 +271,7 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, BOOL bAll,
XubString aSearchName = aFontInfo.GetName();
ImplFontListNameInfo* pData;
- ULONG nIndex;
+ sal_uLong nIndex;
ImplMakeSearchString( aSearchName );
pData = ImplFind( aSearchName, &nIndex );
@@ -291,7 +291,7 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, BOOL bAll,
{
if ( bInsertData )
{
- BOOL bInsert = TRUE;
+ sal_Bool bInsert = sal_True;
ImplFontListFontInfo* pPrev = NULL;
ImplFontListFontInfo* pTemp = pData->mpFirst;
ImplFontListFontInfo* pNewInfo = new ImplFontListFontInfo( aFontInfo, pDevice );
@@ -312,7 +312,7 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, BOOL bAll,
pTemp->mpNext = pTemp2;
}
delete pNewInfo;
- bInsert = FALSE;
+ bInsert = sal_False;
}
break;
@@ -344,8 +344,8 @@ void FontList::ImplInsertFonts( OutputDevice* pDevice, BOOL bAll,
// =======================================================================
-FontList::FontList( OutputDevice* pDevice, OutputDevice* pDevice2, BOOL bAll ) :
- List( 4096, sal::static_int_cast< USHORT >(pDevice->GetDevFontCount()), 32 )
+FontList::FontList( OutputDevice* pDevice, OutputDevice* pDevice2, sal_Bool bAll ) :
+ List( 4096, sal::static_int_cast< sal_uInt16 >(pDevice->GetDevFontCount()), 32 )
{
// Variablen initialisieren
mpDev = pDevice;
@@ -362,14 +362,14 @@ FontList::FontList( OutputDevice* pDevice, OutputDevice* pDevice2, BOOL bAll ) :
maBlack = XubString( SvtResId( STR_SVT_STYLE_BLACK ) );
maBlackItalic = XubString( SvtResId( STR_SVT_STYLE_BLACK_ITALIC ) );
- ImplInsertFonts( pDevice, bAll, TRUE );
+ ImplInsertFonts( pDevice, bAll, sal_True );
// Gegebenenfalls muessen wir mit den Bildschirmfonts vergleichen,
// damit dort die eigentlich doppelten auf Equal mappen koennen
- BOOL bCompareWindow = FALSE;
+ sal_Bool bCompareWindow = sal_False;
if ( !pDevice2 && (pDevice->GetOutDevType() == OUTDEV_PRINTER) )
{
- bCompareWindow = TRUE;
+ bCompareWindow = sal_True;
pDevice2 = Application::GetDefaultDevice();
}
@@ -527,12 +527,12 @@ XubString FontList::GetFontMapText( const FontInfo& rInfo ) const
}
// search for synthetic style
- USHORT nType = pData->mnType;
+ sal_uInt16 nType = pData->mnType;
const XubString& rStyleName = rInfo.GetStyleName();
if ( rStyleName.Len() )
{
- BOOL bNotSynthetic = FALSE;
- BOOL bNoneAvailable = FALSE;
+ sal_Bool bNotSynthetic = sal_False;
+ sal_Bool bNoneAvailable = sal_False;
FontWeight eWeight = rInfo.GetWeight();
FontItalic eItalic = rInfo.GetItalic();
ImplFontListFontInfo* pFontInfo = pData->mpFirst;
@@ -541,7 +541,7 @@ XubString FontList::GetFontMapText( const FontInfo& rInfo ) const
if ( (eWeight == pFontInfo->GetWeight()) &&
(eItalic == pFontInfo->GetItalic()) )
{
- bNotSynthetic = TRUE;
+ bNotSynthetic = sal_True;
break;
}
@@ -598,7 +598,7 @@ XubString FontList::GetFontMapText( const FontInfo& rInfo ) const
// -----------------------------------------------------------------------
-USHORT FontList::GetFontNameType( const XubString& rFontName ) const
+sal_uInt16 FontList::GetFontNameType( const XubString& rFontName ) const
{
ImplFontListNameInfo* pData = ImplFindByName( rFontName );
if ( pData )
@@ -746,14 +746,14 @@ FontInfo FontList::Get( const XubString& rName,
// -----------------------------------------------------------------------
-BOOL FontList::IsAvailable( const XubString& rName ) const
+sal_Bool FontList::IsAvailable( const XubString& rName ) const
{
return (ImplFindByName( rName ) != 0);
}
// -----------------------------------------------------------------------
-const FontInfo& FontList::GetFontName( USHORT nFont ) const
+const FontInfo& FontList::GetFontName( sal_uInt16 nFont ) const
{
DBG_ASSERT( nFont < GetFontNameCount(), "FontList::GetFontName(): nFont >= Count" );
@@ -763,7 +763,7 @@ const FontInfo& FontList::GetFontName( USHORT nFont ) const
// -----------------------------------------------------------------------
-USHORT FontList::GetFontNameType( USHORT nFont ) const
+sal_uInt16 FontList::GetFontNameType( sal_uInt16 nFont ) const
{
DBG_ASSERT( nFont < GetFontNameCount(), "FontList::GetFontNameType(): nFont >= Count" );
@@ -829,8 +829,8 @@ const long* FontList::GetSizeAry( const FontInfo& rInfo ) const
MapMode aMap( MAP_10TH_INCH, Point(), Fraction( 1, 72 ), Fraction( 1, 72 ) );
pDevice->SetMapMode( aMap );
- USHORT i;
- USHORT nRealCount = 0;
+ sal_uInt16 i;
+ sal_uInt16 nRealCount = 0;
long nOldHeight = 0;
((FontList*)this)->mpSizeAry = new long[nDevSizeCount+1];
for ( i = 0; i < nDevSizeCount; i++ )
@@ -991,7 +991,7 @@ String FontSizeNames::Size2Name( long nValue ) const
//------------------------------------------------------------------------
-String FontSizeNames::GetIndexName( ULONG nIndex ) const
+String FontSizeNames::GetIndexName( sal_uLong nIndex ) const
{
String aStr;
@@ -1003,7 +1003,7 @@ String FontSizeNames::GetIndexName( ULONG nIndex ) const
//------------------------------------------------------------------------
-long FontSizeNames::GetIndexSize( ULONG nIndex ) const
+long FontSizeNames::GetIndexSize( sal_uLong nIndex ) const
{
if ( nIndex >= mnElem )
return 0;
diff --git a/svtools/source/control/filectrl.cxx b/svtools/source/control/filectrl.cxx
index 3541a43effc1..eff46b78b2a2 100755
--- a/svtools/source/control/filectrl.cxx
+++ b/svtools/source/control/filectrl.cxx
@@ -45,12 +45,12 @@ FileControl::FileControl( Window* pParent, WinBits nStyle, FileControlMode nFlag
mnInternalFlags( FILECTRL_ORIGINALBUTTONTEXT )
{
maButton.SetClickHdl( LINK( this, FileControl, ButtonHdl ) );
- mbOpenDlg = TRUE;
+ mbOpenDlg = sal_True;
maButton.Show();
maEdit.Show();
- SetCompoundControl( TRUE );
+ SetCompoundControl( sal_True );
SetStyle( ImplInitStyle( GetStyle() ) );
}
@@ -154,7 +154,7 @@ void FileControl::Resize()
if( mnInternalFlags & FILECTRL_INRESIZE )
return;
- mnInternalFlags |= FILECTRL_INRESIZE;//InResize = TRUE
+ mnInternalFlags |= FILECTRL_INRESIZE;//InResize = sal_True
Size aOutSz = GetOutputSizePixel();
long nButtonTextWidth = maButton.GetTextWidth( maButtonText );
@@ -163,7 +163,7 @@ void FileControl::Resize()
( mnFlags & FILECTRL_RESIZEBUTTONBYPATHLEN
? ( maEdit.GetTextWidth( maEdit.GetText() )
<= aOutSz.Width() - nButtonTextWidth - ButtonBorder )
- : TRUE ) )
+ : sal_True ) )
)
{
maButton.SetText( maButtonText );
@@ -179,7 +179,7 @@ void FileControl::Resize()
maEdit.SetPosSizePixel( 0, 0, aOutSz.Width()-nButtonWidth, aOutSz.Height() );
maButton.SetPosSizePixel( aOutSz.Width()-nButtonWidth, 0, nButtonWidth, aOutSz.Height() );
- mnInternalFlags &= ~FILECTRL_INRESIZE; //InResize = FALSE
+ mnInternalFlags &= ~FILECTRL_INRESIZE; //InResize = sal_False
}
// -----------------------------------------------------------------------
@@ -200,7 +200,7 @@ void FileControl::GetFocus()
// -----------------------------------------------------------------------
-void FileControl::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags )
+void FileControl::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags )
{
WinBits nOldEditStyle = GetEdit().GetStyle();
if ( GetStyle() & WB_BORDER )
diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx
index 5b986dc10f9d..f123af14d510 100644..100755
--- a/svtools/source/control/fmtfield.cxx
+++ b/svtools/source/control/fmtfield.cxx
@@ -305,7 +305,7 @@ namespace validation
//==============================================================================
SvNumberFormatter* FormattedField::StaticFormatter::s_cFormatter = NULL;
-ULONG FormattedField::StaticFormatter::s_nReferences = 0;
+sal_uLong FormattedField::StaticFormatter::s_nReferences = 0;
//------------------------------------------------------------------------------
SvNumberFormatter* FormattedField::StaticFormatter::GetFormatter()
@@ -345,13 +345,13 @@ DBG_NAME(FormattedField);
m_aLastSelection(0,0) \
,m_dMinValue(0) \
,m_dMaxValue(0) \
- ,m_bHasMin(FALSE) \
- ,m_bHasMax(FALSE) \
- ,m_bStrictFormat(TRUE) \
- ,m_bValueDirty(TRUE) \
- ,m_bEnableEmptyField(TRUE) \
- ,m_bAutoColor(FALSE) \
- ,m_bEnableNaN(FALSE) \
+ ,m_bHasMin(sal_False) \
+ ,m_bHasMax(sal_False) \
+ ,m_bStrictFormat(sal_True) \
+ ,m_bValueDirty(sal_True) \
+ ,m_bEnableEmptyField(sal_True) \
+ ,m_bAutoColor(sal_False) \
+ ,m_bEnableNaN(sal_False) \
,m_dCurrentValue(0) \
,m_dDefaultValue(0) \
,m_nFormatKey(0) \
@@ -359,12 +359,12 @@ DBG_NAME(FormattedField);
,m_dSpinSize(1) \
,m_dSpinFirst(-1000000) \
,m_dSpinLast(1000000) \
- ,m_bTreatAsNumber(TRUE) \
+ ,m_bTreatAsNumber(sal_True) \
,m_pLastOutputColor(NULL) \
,m_bUseInputStringForFormatting(false)
//------------------------------------------------------------------------------
-FormattedField::FormattedField(Window* pParent, WinBits nStyle, SvNumberFormatter* pInitialFormatter, INT32 nFormatKey)
+FormattedField::FormattedField(Window* pParent, WinBits nStyle, SvNumberFormatter* pInitialFormatter, sal_Int32 nFormatKey)
:SpinField(pParent, nStyle)
,INIT_MEMBERS()
{
@@ -378,7 +378,7 @@ FormattedField::FormattedField(Window* pParent, WinBits nStyle, SvNumberFormatte
}
//------------------------------------------------------------------------------
-FormattedField::FormattedField(Window* pParent, const ResId& rResId, SvNumberFormatter* pInitialFormatter, INT32 nFormatKey)
+FormattedField::FormattedField(Window* pParent, const ResId& rResId, SvNumberFormatter* pInitialFormatter, sal_Int32 nFormatKey)
:SpinField(pParent, rResId)
,INIT_MEMBERS()
{
@@ -408,7 +408,7 @@ void FormattedField::SetValidateText(const XubString& rText, const String* pErro
if (pErrorText)
ImplSetTextImpl(*pErrorText, NULL);
else
- ImplSetValue(m_dDefaultValue, TRUE);
+ ImplSetValue(m_dDefaultValue, sal_True);
}
//------------------------------------------------------------------------------
@@ -417,7 +417,7 @@ void FormattedField::SetText(const XubString& rStr)
DBG_CHKTHIS(FormattedField, NULL);
SpinField::SetText(rStr);
- m_bValueDirty = TRUE;
+ m_bValueDirty = sal_True;
}
//------------------------------------------------------------------------------
@@ -426,7 +426,7 @@ void FormattedField::SetText( const XubString& rStr, const Selection& rNewSelect
DBG_CHKTHIS(FormattedField, NULL);
SpinField::SetText( rStr, rNewSelection );
- m_bValueDirty = TRUE;
+ m_bValueDirty = sal_True;
}
//------------------------------------------------------------------------------
@@ -455,8 +455,8 @@ void FormattedField::SetTextFormatted(const XubString& rStr)
Selection aSel(GetSelection());
Selection aNewSel(aSel);
aNewSel.Justify();
- USHORT nNewLen = sFormatted.Len();
- USHORT nCurrentLen = GetText().Len();
+ sal_uInt16 nNewLen = sFormatted.Len();
+ sal_uInt16 nCurrentLen = GetText().Len();
if ((nNewLen > nCurrentLen) && (aNewSel.Max() == nCurrentLen))
{ // the new text is longer and the cursor was behind the last char (of the old text)
if (aNewSel.Min() == 0)
@@ -464,7 +464,7 @@ void FormattedField::SetTextFormatted(const XubString& rStr)
aNewSel.Max() = nNewLen;
if (!nCurrentLen)
{ // there wasn't really a previous selection (as there was no previous text), we're setting a new one -> check the selection options
- ULONG nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions();
+ sal_uLong nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions();
if (nSelOptions & SELECTION_OPTION_SHOWFIRST)
{ // selection should be from right to left -> swap min and max
aNewSel.Min() = aNewSel.Max();
@@ -483,7 +483,7 @@ void FormattedField::SetTextFormatted(const XubString& rStr)
else
aNewSel = aSel; // don't use the justified version
SpinField::SetText(sFormatted, aNewSel);
- m_bValueDirty = FALSE;
+ m_bValueDirty = sal_False;
}
//------------------------------------------------------------------------------
@@ -492,13 +492,13 @@ String FormattedField::GetTextValue() const
if (m_bValueDirty)
{
((FormattedField*)this)->m_sCurrentTextValue = GetText();
- ((FormattedField*)this)->m_bValueDirty = FALSE;
+ ((FormattedField*)this)->m_bValueDirty = sal_False;
}
return m_sCurrentTextValue;
}
//------------------------------------------------------------------------------
-void FormattedField::EnableNotANumber( BOOL _bEnable )
+void FormattedField::EnableNotANumber( sal_Bool _bEnable )
{
if ( m_bEnableNaN == _bEnable )
return;
@@ -507,7 +507,7 @@ void FormattedField::EnableNotANumber( BOOL _bEnable )
}
//------------------------------------------------------------------------------
-void FormattedField::SetAutoColor(BOOL _bAutomatic)
+void FormattedField::SetAutoColor(sal_Bool _bAutomatic)
{
if (_bAutomatic == m_bAutoColor)
return;
@@ -529,7 +529,7 @@ void FormattedField::Modify()
if (!IsStrictFormat())
{
- m_bValueDirty = TRUE;
+ m_bValueDirty = sal_True;
SpinField::Modify();
return;
}
@@ -539,7 +539,7 @@ void FormattedField::Modify()
{
m_sLastValidText = sCheck;
m_aLastSelection = GetSelection();
- m_bValueDirty = TRUE;
+ m_bValueDirty = sal_True;
}
else
{
@@ -569,8 +569,8 @@ void FormattedField::ImplSetTextImpl(const XubString& rNew, Selection* pNewSel)
Selection aSel(GetSelection());
aSel.Justify();
- USHORT nNewLen = rNew.Len();
- USHORT nCurrentLen = GetText().Len();
+ sal_uInt16 nNewLen = rNew.Len();
+ sal_uInt16 nCurrentLen = GetText().Len();
if ((nNewLen > nCurrentLen) && (aSel.Max() == nCurrentLen))
{ // new new text is longer and the cursor is behind the last char
@@ -579,7 +579,7 @@ void FormattedField::ImplSetTextImpl(const XubString& rNew, Selection* pNewSel)
aSel.Max() = nNewLen;
if (!nCurrentLen)
{ // there wasn't really a previous selection (as there was no previous text), we're setting a new one -> check the selection options
- ULONG nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions();
+ sal_uLong nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions();
if (nSelOptions & SELECTION_OPTION_SHOWFIRST)
{ // selection should be from right to left -> swap min and max
aSel.Min() = aSel.Max();
@@ -598,7 +598,7 @@ void FormattedField::ImplSetTextImpl(const XubString& rNew, Selection* pNewSel)
SpinField::SetText(rNew, aSel);
}
- m_bValueDirty = TRUE;
+ m_bValueDirty = sal_True;
// muss nicht stimmen, aber sicherheitshalber ...
}
@@ -612,12 +612,12 @@ long FormattedField::PreNotify(NotifyEvent& rNEvt)
}
//------------------------------------------------------------------------------
-void FormattedField::ImplSetFormatKey(ULONG nFormatKey)
+void FormattedField::ImplSetFormatKey(sal_uLong nFormatKey)
{
DBG_CHKTHIS(FormattedField, NULL);
m_nFormatKey = nFormatKey;
- BOOL bNeedFormatter = (m_pFormatter == NULL) && (nFormatKey != 0);
+ sal_Bool bNeedFormatter = (m_pFormatter == NULL) && (nFormatKey != 0);
if (bNeedFormatter)
{
ImplGetFormatter(); // damit wird ein Standard-Formatter angelegt
@@ -632,16 +632,16 @@ void FormattedField::ImplSetFormatKey(ULONG nFormatKey)
}
//------------------------------------------------------------------------------
-void FormattedField::SetFormatKey(ULONG nFormatKey)
+void FormattedField::SetFormatKey(sal_uLong nFormatKey)
{
DBG_CHKTHIS(FormattedField, NULL);
- BOOL bNoFormatter = (m_pFormatter == NULL);
+ sal_Bool bNoFormatter = (m_pFormatter == NULL);
ImplSetFormatKey(nFormatKey);
FormatChanged((bNoFormatter && (m_pFormatter != NULL)) ? FCT_FORMATTER : FCT_KEYONLY);
}
//------------------------------------------------------------------------------
-void FormattedField::SetFormatter(SvNumberFormatter* pFormatter, BOOL bResetFormat)
+void FormattedField::SetFormatter(SvNumberFormatter* pFormatter, sal_Bool bResetFormat)
{
DBG_CHKTHIS(FormattedField, NULL);
@@ -675,7 +675,7 @@ void FormattedField::SetFormatter(SvNumberFormatter* pFormatter, BOOL bResetForm
LanguageType aNewLang = pDefaultEntry ? pDefaultEntry->GetLanguage() : LANGUAGE_DONTKNOW;
// den alten Format-String in die neue Sprache konvertieren
- USHORT nCheckPos;
+ sal_uInt16 nCheckPos;
short nType;
pFormatter->PutandConvertEntry(sOldFormat, nCheckPos, nType, nDestKey, aOldLang, aNewLang);
m_nFormatKey = nDestKey;
@@ -697,47 +697,47 @@ void FormattedField::GetFormat(XubString& rFormatString, LanguageType& eLang) co
}
//------------------------------------------------------------------------------
-BOOL FormattedField::SetFormat(const XubString& rFormatString, LanguageType eLang)
+sal_Bool FormattedField::SetFormat(const XubString& rFormatString, LanguageType eLang)
{
DBG_CHKTHIS(FormattedField, NULL);
sal_uInt32 nNewKey = ImplGetFormatter()->TestNewString(rFormatString, eLang);
if (nNewKey == NUMBERFORMAT_ENTRY_NOT_FOUND)
{
- USHORT nCheckPos;
+ sal_uInt16 nCheckPos;
short nType;
XubString rFormat(rFormatString);
if (!ImplGetFormatter()->PutEntry(rFormat, nCheckPos, nType, nNewKey, eLang))
- return FALSE;
+ return sal_False;
DBG_ASSERT(nNewKey != NUMBERFORMAT_ENTRY_NOT_FOUND, "FormattedField::SetFormatString : PutEntry returned an invalid key !");
}
if (nNewKey != m_nFormatKey)
SetFormatKey(nNewKey);
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------------
-BOOL FormattedField::GetThousandsSep() const
+sal_Bool FormattedField::GetThousandsSep() const
{
DBG_ASSERT(!ImplGetFormatter()->IsTextFormat(m_nFormatKey),
"FormattedField::GetThousandsSep : your'e sure what your'e doing when setting the precision of a text format ?");
- BOOL bThousand, IsRed;
- USHORT nPrecision, nAnzLeading;
+ sal_Bool bThousand, IsRed;
+ sal_uInt16 nPrecision, nAnzLeading;
ImplGetFormatter()->GetFormatSpecialInfo(m_nFormatKey, bThousand, IsRed, nPrecision, nAnzLeading);
return bThousand;
}
//------------------------------------------------------------------------------
-void FormattedField::SetThousandsSep(BOOL _bUseSeparator)
+void FormattedField::SetThousandsSep(sal_Bool _bUseSeparator)
{
DBG_ASSERT(!ImplGetFormatter()->IsTextFormat(m_nFormatKey),
"FormattedField::SetThousandsSep : your'e sure what your'e doing when setting the precision of a text format ?");
// get the current settings
- BOOL bThousand, IsRed;
- USHORT nPrecision, nAnzLeading;
+ sal_Bool bThousand, IsRed;
+ sal_uInt16 nPrecision, nAnzLeading;
ImplGetFormatter()->GetFormatSpecialInfo(m_nFormatKey, bThousand, IsRed, nPrecision, nAnzLeading);
if (bThousand == _bUseSeparator)
return;
@@ -750,7 +750,7 @@ void FormattedField::SetThousandsSep(BOOL _bUseSeparator)
// generate a new format ...
ImplGetFormatter()->GenerateFormat(sFmtDescription, m_nFormatKey, eLang, _bUseSeparator, IsRed, nPrecision, nAnzLeading);
// ... and introduce it to the formatter
- USHORT nCheckPos;
+ sal_uInt16 nCheckPos;
sal_uInt32 nNewKey;
short nType;
ImplGetFormatter()->PutEntry(sFmtDescription, nCheckPos, nType, nNewKey, eLang);
@@ -761,27 +761,27 @@ void FormattedField::SetThousandsSep(BOOL _bUseSeparator)
}
//------------------------------------------------------------------------------
-USHORT FormattedField::GetDecimalDigits() const
+sal_uInt16 FormattedField::GetDecimalDigits() const
{
DBG_ASSERT(!ImplGetFormatter()->IsTextFormat(m_nFormatKey),
"FormattedField::GetDecimalDigits : your'e sure what your'e doing when setting the precision of a text format ?");
- BOOL bThousand, IsRed;
- USHORT nPrecision, nAnzLeading;
+ sal_Bool bThousand, IsRed;
+ sal_uInt16 nPrecision, nAnzLeading;
ImplGetFormatter()->GetFormatSpecialInfo(m_nFormatKey, bThousand, IsRed, nPrecision, nAnzLeading);
return nPrecision;
}
//------------------------------------------------------------------------------
-void FormattedField::SetDecimalDigits(USHORT _nPrecision)
+void FormattedField::SetDecimalDigits(sal_uInt16 _nPrecision)
{
DBG_ASSERT(!ImplGetFormatter()->IsTextFormat(m_nFormatKey),
"FormattedField::SetDecimalDigits : your'e sure what your'e doing when setting the precision of a text format ?");
// get the current settings
- BOOL bThousand, IsRed;
- USHORT nPrecision, nAnzLeading;
+ sal_Bool bThousand, IsRed;
+ sal_uInt16 nPrecision, nAnzLeading;
ImplGetFormatter()->GetFormatSpecialInfo(m_nFormatKey, bThousand, IsRed, nPrecision, nAnzLeading);
if (nPrecision == _nPrecision)
return;
@@ -794,7 +794,7 @@ void FormattedField::SetDecimalDigits(USHORT _nPrecision)
// generate a new format ...
ImplGetFormatter()->GenerateFormat(sFmtDescription, m_nFormatKey, eLang, bThousand, IsRed, _nPrecision, nAnzLeading);
// ... and introduce it to the formatter
- USHORT nCheckPos;
+ sal_uInt16 nCheckPos;
sal_uInt32 nNewKey;
short nType;
ImplGetFormatter()->PutEntry(sFmtDescription, nCheckPos, nType, nNewKey, eLang);
@@ -831,7 +831,7 @@ void FormattedField::Commit()
{ // consider the field as modified
Modify();
// but we have the most recent value now
- m_bValueDirty = FALSE;
+ m_bValueDirty = sal_False;
}
}
@@ -845,7 +845,7 @@ void FormattedField::ReFormat()
double dValue = GetValue();
if ( m_bEnableNaN && ::rtl::math::isNan( dValue ) )
return;
- ImplSetValue( dValue, TRUE );
+ ImplSetValue( dValue, sal_True );
}
else
SetTextFormatted(GetTextValue());
@@ -860,7 +860,7 @@ long FormattedField::Notify(NotifyEvent& rNEvt)
if ((rNEvt.GetType() == EVENT_KEYINPUT) && !IsReadOnly())
{
const KeyEvent& rKEvt = *rNEvt.GetKeyEvent();
- USHORT nMod = rKEvt.GetKeyCode().GetModifier();
+ sal_uInt16 nMod = rKEvt.GetKeyCode().GetModifier();
switch ( rKEvt.GetKeyCode().GetCode() )
{
case KEY_UP:
@@ -901,7 +901,7 @@ long FormattedField::Notify(NotifyEvent& rNEvt)
{
if (TreatingAsNumber())
{
- ImplSetValue(m_dCurrentValue, TRUE);
+ ImplSetValue(m_dCurrentValue, sal_True);
Modify();
}
else
@@ -912,7 +912,7 @@ long FormattedField::Notify(NotifyEvent& rNEvt)
else
SetTextFormatted(m_sDefaultText);
}
- m_bValueDirty = FALSE;
+ m_bValueDirty = sal_False;
}
}
else
@@ -931,7 +931,7 @@ void FormattedField::SetMinValue(double dMin)
DBG_ASSERT(m_bTreatAsNumber, "FormattedField::SetMinValue : only to be used in numeric mode !");
m_dMinValue = dMin;
- m_bHasMin = TRUE;
+ m_bHasMin = sal_True;
// fuer die Ueberpruefung des aktuellen Wertes an der neuen Grenze -> ImplSetValue
ReFormat();
}
@@ -943,7 +943,7 @@ void FormattedField::SetMaxValue(double dMax)
DBG_ASSERT(m_bTreatAsNumber, "FormattedField::SetMaxValue : only to be used in numeric mode !");
m_dMaxValue = dMax;
- m_bHasMax = TRUE;
+ m_bHasMax = sal_True;
// fuer die Ueberpruefung des aktuellen Wertes an der neuen Grenze -> ImplSetValue
ReFormat();
}
@@ -957,7 +957,7 @@ void FormattedField::SetTextValue(const XubString& rText)
}
//------------------------------------------------------------------------------
-void FormattedField::EnableEmptyField(BOOL bEnable)
+void FormattedField::EnableEmptyField(sal_Bool bEnable)
{
DBG_CHKTHIS(FormattedField, NULL);
if (bEnable == m_bEnableEmptyField)
@@ -965,11 +965,11 @@ void FormattedField::EnableEmptyField(BOOL bEnable)
m_bEnableEmptyField = bEnable;
if (!m_bEnableEmptyField && GetText().Len()==0)
- ImplSetValue(m_dCurrentValue, TRUE);
+ ImplSetValue(m_dCurrentValue, sal_True);
}
//------------------------------------------------------------------------------
-void FormattedField::ImplSetValue(double dVal, BOOL bForce)
+void FormattedField::ImplSetValue(double dVal, sal_Bool bForce)
{
DBG_CHKTHIS(FormattedField, NULL);
@@ -982,7 +982,7 @@ void FormattedField::ImplSetValue(double dVal, BOOL bForce)
DBG_ASSERT(ImplGetFormatter() != NULL, "FormattedField::ImplSetValue : can't set a value without a formatter !");
- m_bValueDirty = FALSE;
+ m_bValueDirty = sal_False;
m_dCurrentValue = dVal;
String sNewText;
@@ -1003,23 +1003,23 @@ void FormattedField::ImplSetValue(double dVal, BOOL bForce)
}
ImplSetTextImpl(sNewText, NULL);
- m_bValueDirty = FALSE;
+ m_bValueDirty = sal_False;
DBG_ASSERT(CheckText(sNewText), "FormattedField::ImplSetValue : formatted string doesn't match the criteria !");
}
//------------------------------------------------------------------------------
-BOOL FormattedField::ImplGetValue(double& dNewVal)
+sal_Bool FormattedField::ImplGetValue(double& dNewVal)
{
DBG_CHKTHIS(FormattedField, NULL);
dNewVal = m_dCurrentValue;
if (!m_bValueDirty)
- return TRUE;
+ return sal_True;
dNewVal = m_dDefaultValue;
String sText(GetText());
if (!sText.Len())
- return TRUE;
+ return sal_True;
DBG_ASSERT(ImplGetFormatter() != NULL, "FormattedField::ImplGetValue : can't give you a current value without a formatter !");
@@ -1035,7 +1035,7 @@ BOOL FormattedField::ImplGetValue(double& dNewVal)
// the language of our format
LanguageType eLanguage = m_pFormatter->GetEntry(m_nFormatKey)->GetLanguage();
// the default number format for this language
- ULONG nStandardNumericFormat = m_pFormatter->GetStandardFormat(NUMBERFORMAT_NUMBER, eLanguage);
+ sal_uLong nStandardNumericFormat = m_pFormatter->GetStandardFormat(NUMBERFORMAT_NUMBER, eLanguage);
sal_uInt32 nTempFormat = nStandardNumericFormat;
double dTemp;
@@ -1049,14 +1049,14 @@ BOOL FormattedField::ImplGetValue(double& dNewVal)
// which equals 300 percent.
}
if (!ImplGetFormatter()->IsNumberFormat(sText, nFormatKey, dNewVal))
- return FALSE;
+ return sal_False;
if (m_bHasMin && (dNewVal<m_dMinValue))
dNewVal = m_dMinValue;
if (m_bHasMax && (dNewVal>m_dMaxValue))
dNewVal = m_dMaxValue;
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------------------
@@ -1079,7 +1079,7 @@ double FormattedField::GetValue()
m_dCurrentValue = m_dDefaultValue;
}
- m_bValueDirty = FALSE;
+ m_bValueDirty = sal_False;
return m_dCurrentValue;
}
@@ -1166,7 +1166,7 @@ void DoubleNumericField::FormatChanged(FORMAT_CHANGE_TYPE nWhat)
}
//------------------------------------------------------------------------------
-BOOL DoubleNumericField::CheckText(const XubString& sText) const
+sal_Bool DoubleNumericField::CheckText(const XubString& sText) const
{
// We'd like to implement this using the NumberFormatter::IsNumberFormat, but unfortunately, this doesn't
// recognize fragments of numbers (like, for instance "1e", which happens during entering e.g. "1e10")
@@ -1174,19 +1174,19 @@ BOOL DoubleNumericField::CheckText(const XubString& sText) const
#ifdef REGEXP_SUPPORT
if (!sText.Len())
- return TRUE;
+ return sal_True;
String sForceComplete = '_';
sForceComplete += sText;
sForceComplete += '_';
- USHORT nStart = 0, nEnd = sForceComplete.Len();
- BOOL bFound = m_pConformanceTester->SearchFrwrd(sForceComplete, &nStart, &nEnd);
+ sal_uInt16 nStart = 0, nEnd = sForceComplete.Len();
+ sal_Bool bFound = m_pConformanceTester->SearchFrwrd(sForceComplete, &nStart, &nEnd);
if (bFound && (nStart == 0) && (nEnd == sForceComplete.Len()))
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
#else
return m_pNumberValidator->isValidNumericFragment( sText );
#endif
@@ -1252,9 +1252,9 @@ void DoubleNumericField::ResetConformanceTester()
//------------------------------------------------------------------------------
DoubleCurrencyField::DoubleCurrencyField(Window* pParent, WinBits nStyle)
:FormattedField(pParent, nStyle)
- ,m_bChangingFormat(FALSE)
+ ,m_bChangingFormat(sal_False)
{
- m_bPrependCurrSym = FALSE;
+ m_bPrependCurrSym = sal_False;
// initialize with a system currency format
m_sCurrencySymbol = SvtSysLocale().GetLocaleData().getCurrSymbol();
@@ -1264,9 +1264,9 @@ DoubleCurrencyField::DoubleCurrencyField(Window* pParent, WinBits nStyle)
//------------------------------------------------------------------------------
DoubleCurrencyField::DoubleCurrencyField(Window* pParent, const ResId& rResId)
:FormattedField(pParent, rResId)
- ,m_bChangingFormat(FALSE)
+ ,m_bChangingFormat(sal_False)
{
- m_bPrependCurrSym = FALSE;
+ m_bPrependCurrSym = sal_False;
// initialize with a system currency format
m_sCurrencySymbol = SvtSysLocale().GetLocaleData().getCurrSymbol();
@@ -1313,7 +1313,7 @@ void DoubleCurrencyField::setCurrencySymbol(const String& _sSymbol)
}
//------------------------------------------------------------------------------
-void DoubleCurrencyField::setPrependCurrSym(BOOL _bPrepend)
+void DoubleCurrencyField::setPrependCurrSym(sal_Bool _bPrepend)
{
if (m_bPrependCurrSym == _bPrepend)
return;
@@ -1330,8 +1330,8 @@ void DoubleCurrencyField::UpdateCurrencyFormat()
XubString sOldFormat;
LanguageType eLanguage;
GetFormat(sOldFormat, eLanguage);
- BOOL bThSep = GetThousandsSep();
- USHORT nDigits = GetDecimalDigits();
+ sal_Bool bThSep = GetThousandsSep();
+ sal_uInt16 nDigits = GetDecimalDigits();
// build a new format string with the base class' and my own settings
Locale aLocale;
@@ -1391,8 +1391,8 @@ void DoubleCurrencyField::UpdateCurrencyFormat()
}
// set this new basic format
- m_bChangingFormat = TRUE;
+ m_bChangingFormat = sal_True;
SetFormat(sNewFormat, eLanguage);
- m_bChangingFormat = FALSE;
+ m_bChangingFormat = sal_False;
}
diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx
index 7b1f2ad87108..06886339fda5 100755
--- a/svtools/source/control/headbar.cxx
+++ b/svtools/source/control/headbar.cxx
@@ -50,7 +50,7 @@
struct ImplHeadItem
{
- USHORT mnId;
+ sal_uInt16 mnId;
HeaderBarItemBits mnBits;
long mnSize;
rtl::OString maHelpId;
@@ -75,8 +75,8 @@ DECLARE_LIST( ImplHeadItemList, ImplHeadItem* )
#define HEADERBAR_DRAGOFF 4
#define HEADERBAR_DRAGOUTOFF 15
-#define HEAD_HITTEST_ITEM ((USHORT)0x0001)
-#define HEAD_HITTEST_DIVIDER ((USHORT)0x0002)
+#define HEAD_HITTEST_ITEM ((sal_uInt16)0x0001)
+#define HEAD_HITTEST_DIVIDER ((sal_uInt16)0x0002)
// =======================================================================
@@ -94,20 +94,20 @@ void HeaderBar::ImplInit( WinBits nWinStyle )
mnMouseOff = 0;
mnCurItemId = 0;
mnItemDragPos = HEADERBAR_ITEM_NOTFOUND;
- mbDrag = FALSE;
- mbItemDrag = FALSE;
- mbOutDrag = FALSE;
- mbItemMode = FALSE;
+ mbDrag = sal_False;
+ mbItemDrag = sal_False;
+ mbOutDrag = sal_False;
+ mbItemMode = sal_False;
// StyleBits auswerten
if ( nWinStyle & WB_DRAG )
- mbDragable = TRUE;
+ mbDragable = sal_True;
else
- mbDragable = FALSE;
+ mbDragable = sal_False;
if ( nWinStyle & WB_BUTTONSTYLE )
- mbButtonStyle = TRUE;
+ mbButtonStyle = sal_True;
else
- mbButtonStyle = FALSE;
+ mbButtonStyle = sal_False;
if ( nWinStyle & WB_BORDER )
{
mnBorderOff1 = 1;
@@ -119,7 +119,7 @@ void HeaderBar::ImplInit( WinBits nWinStyle )
mnBorderOff2 = 1;
}
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
}
// -----------------------------------------------------------------------
@@ -156,8 +156,8 @@ HeaderBar::~HeaderBar()
// -----------------------------------------------------------------------
-void HeaderBar::ImplInitSettings( BOOL bFont,
- BOOL bForeground, BOOL bBackground )
+void HeaderBar::ImplInitSettings( sal_Bool bFont,
+ sal_Bool bForeground, sal_Bool bBackground )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -194,17 +194,17 @@ void HeaderBar::ImplInitSettings( BOOL bFont,
// -----------------------------------------------------------------------
-long HeaderBar::ImplGetItemPos( USHORT nPos ) const
+long HeaderBar::ImplGetItemPos( sal_uInt16 nPos ) const
{
long nX = -mnOffset;
- for ( USHORT i = 0; i < nPos; i++ )
+ for ( sal_uInt16 i = 0; i < nPos; i++ )
nX += mpItemList->GetObject( i )->mnSize;
return nX;
}
// -----------------------------------------------------------------------
-Rectangle HeaderBar::ImplGetItemRect( USHORT nPos ) const
+Rectangle HeaderBar::ImplGetItemRect( sal_uInt16 nPos ) const
{
Rectangle aRect( ImplGetItemPos( nPos ), 0, 0, mnDY-1 );
aRect.Right() = aRect.Left() + mpItemList->GetObject( nPos )->mnSize - 1;
@@ -216,21 +216,21 @@ Rectangle HeaderBar::ImplGetItemRect( USHORT nPos ) const
// -----------------------------------------------------------------------
-USHORT HeaderBar::ImplHitTest( const Point& rPos,
- long& nMouseOff, USHORT& nPos ) const
+sal_uInt16 HeaderBar::ImplHitTest( const Point& rPos,
+ long& nMouseOff, sal_uInt16& nPos ) const
{
ImplHeadItem* pItem;
- USHORT nCount = (USHORT)mpItemList->Count();
- BOOL bLastFixed = TRUE;
+ sal_uInt16 nCount = (sal_uInt16)mpItemList->Count();
+ sal_Bool bLastFixed = sal_True;
long nX = -mnOffset;
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
pItem = mpItemList->GetObject( i );
if ( rPos.X() < (nX+pItem->mnSize) )
{
- USHORT nMode;
+ sal_uInt16 nMode;
if ( !bLastFixed && (rPos.X() < (nX+HEADERBAR_SPLITOFF)) )
{
@@ -258,9 +258,9 @@ USHORT HeaderBar::ImplHitTest( const Point& rPos,
}
if ( pItem->mnBits & HIB_FIXED )
- bLastFixed = TRUE;
+ bLastFixed = sal_True;
else
- bLastFixed = FALSE;
+ bLastFixed = sal_False;
nX += pItem->mnSize;
}
@@ -281,7 +281,7 @@ USHORT HeaderBar::ImplHitTest( const Point& rPos,
// -----------------------------------------------------------------------
-void HeaderBar::ImplInvertDrag( USHORT nStartPos, USHORT nEndPos )
+void HeaderBar::ImplInvertDrag( sal_uInt16 nStartPos, sal_uInt16 nEndPos )
{
Rectangle aRect1 = ImplGetItemRect( nStartPos );
Rectangle aRect2 = ImplGetItemRect( nEndPos );
@@ -330,10 +330,10 @@ void HeaderBar::ImplInvertDrag( USHORT nStartPos, USHORT nEndPos )
// -----------------------------------------------------------------------
void HeaderBar::ImplDrawItem( OutputDevice* pDev,
- USHORT nPos, BOOL bHigh, BOOL bDrag,
+ sal_uInt16 nPos, sal_Bool bHigh, sal_Bool bDrag,
const Rectangle& rItemRect,
const Rectangle* pRect,
- ULONG )
+ sal_uLong )
{
Rectangle aRect = rItemRect;
@@ -387,9 +387,9 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
// avoid 3D borders
Color aSelectionTextColor( COL_TRANSPARENT );
if( bHigh )
- DrawSelectionBackground( aRect, 1, TRUE, FALSE, FALSE, &aSelectionTextColor );
+ DrawSelectionBackground( aRect, 1, sal_True, sal_False, sal_False, &aSelectionTextColor );
else if ( !mbButtonStyle || (nBits & HIB_FLAT) )
- DrawSelectionBackground( aRect, 0, TRUE, FALSE, FALSE, &aSelectionTextColor );
+ DrawSelectionBackground( aRect, 0, sal_True, sal_False, sal_False, &aSelectionTextColor );
// Wenn kein Platz, dann brauchen wir auch nichts ausgeben
if ( aRect.GetWidth() < 1 )
@@ -416,14 +416,14 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
}
// Text auf entsprechende Laenge kuerzen
- BOOL bLeftText = FALSE;
+ sal_Bool bLeftText = sal_False;
long nMaxTxtWidth = aRect.GetWidth()-(HEADERBAR_TEXTOFF*2)-nArrowWidth;
if ( nBits & (HIB_LEFTIMAGE | HIB_RIGHTIMAGE) )
nMaxTxtWidth -= aImageSize.Width();
long nTxtWidth = aTxtSize.Width();
if ( nTxtWidth > nMaxTxtWidth )
{
- bLeftText = TRUE;
+ bLeftText = sal_True;
// 3 == Len of "..."
pItem->maOutText.AppendAscii( "..." );
do
@@ -557,7 +557,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
}
if ( nImagePos+aImageSize.Width() <= aRect.Right() )
{
- USHORT nStyle = 0;
+ sal_uInt16 nStyle = 0;
if ( !IsEnabled() )
nStyle |= IMAGE_DRAW_DISABLE;
pDev->DrawImage( Point( nImagePos, nImagePosY ), pItem->maImage, nStyle );
@@ -580,11 +580,11 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
}
// Feststellen, ob Platz genug ist, das Item zu malen
- BOOL bDraw = TRUE;
+ sal_Bool bDraw = sal_True;
if ( nArrowX < aRect.Left()+HEADERBAR_TEXTOFF )
- bDraw = FALSE;
+ bDraw = sal_False;
else if ( nArrowX+HEAD_ARROWSIZE2 > aRect.Right() )
- bDraw = FALSE;
+ bDraw = sal_False;
if ( bDraw )
{
@@ -643,7 +643,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
// -----------------------------------------------------------------------
-void HeaderBar::ImplDrawItem( USHORT nPos, BOOL bHigh, BOOL bDrag,
+void HeaderBar::ImplDrawItem( sal_uInt16 nPos, sal_Bool bHigh, sal_Bool bDrag,
const Rectangle* pRect )
{
Rectangle aRect = ImplGetItemRect( nPos );
@@ -652,14 +652,14 @@ void HeaderBar::ImplDrawItem( USHORT nPos, BOOL bHigh, BOOL bDrag,
// -----------------------------------------------------------------------
-void HeaderBar::ImplUpdate( USHORT nPos, BOOL bEnd, BOOL bDirect )
+void HeaderBar::ImplUpdate( sal_uInt16 nPos, sal_Bool bEnd, sal_Bool bDirect )
{
if ( IsVisible() && IsUpdateMode() )
{
if ( !bDirect )
{
Rectangle aRect;
- USHORT nItemCount = (USHORT)(mpItemList->Count());
+ sal_uInt16 nItemCount = (sal_uInt16)(mpItemList->Count());
if ( nPos < nItemCount )
aRect = ImplGetItemRect( nPos );
else
@@ -676,11 +676,11 @@ void HeaderBar::ImplUpdate( USHORT nPos, BOOL bEnd, BOOL bDirect )
}
else
{
- for ( USHORT i = nPos; i < mpItemList->Count(); i++ )
+ for ( sal_uInt16 i = nPos; i < mpItemList->Count(); i++ )
ImplDrawItem( i );
if ( bEnd )
{
- Rectangle aRect = ImplGetItemRect( (USHORT)mpItemList->Count() );
+ Rectangle aRect = ImplGetItemRect( (sal_uInt16)mpItemList->Count() );
aRect.Left() = aRect.Right();
aRect.Right() = mnDX-1;
if ( aRect.Left() < aRect.Right() )
@@ -696,31 +696,31 @@ void HeaderBar::ImplUpdate( USHORT nPos, BOOL bEnd, BOOL bDirect )
// -----------------------------------------------------------------------
-void HeaderBar::ImplStartDrag( const Point& rMousePos, BOOL bCommand )
+void HeaderBar::ImplStartDrag( const Point& rMousePos, sal_Bool bCommand )
{
- USHORT nPos;
- USHORT nHitTest = ImplHitTest( rMousePos, mnMouseOff, nPos );
+ sal_uInt16 nPos;
+ sal_uInt16 nHitTest = ImplHitTest( rMousePos, mnMouseOff, nPos );
if ( nHitTest )
{
- mbDrag = FALSE;
+ mbDrag = sal_False;
ImplHeadItem* pItem = mpItemList->GetObject( nPos );
if ( nHitTest & HEAD_HITTEST_DIVIDER )
- mbDrag = TRUE;
+ mbDrag = sal_True;
else
{
if ( ((pItem->mnBits & HIB_CLICKABLE) && !(pItem->mnBits & HIB_FLAT)) ||
(mbDragable && !(pItem->mnBits & HIB_FIXEDPOS)) )
{
- mbItemMode = TRUE;
- mbDrag = TRUE;
+ mbItemMode = sal_True;
+ mbDrag = sal_True;
if ( bCommand )
{
if ( mbDragable )
- mbItemDrag = TRUE;
+ mbItemDrag = sal_True;
else
{
- mbItemMode = FALSE;
- mbDrag = FALSE;
+ mbItemMode = sal_False;
+ mbDrag = sal_False;
}
}
}
@@ -737,7 +737,7 @@ void HeaderBar::ImplStartDrag( const Point& rMousePos, BOOL bCommand )
if ( mbDrag )
{
- mbOutDrag = FALSE;
+ mbOutDrag = sal_False;
mnCurItemId = pItem->mnId;
mnItemDragPos = nPos;
StartTracking();
@@ -745,7 +745,7 @@ void HeaderBar::ImplStartDrag( const Point& rMousePos, BOOL bCommand )
mnDragPos = mnStartPos;
StartDrag();
if ( mbItemMode )
- ImplDrawItem( nPos, TRUE, mbItemDrag );
+ ImplDrawItem( nPos, sal_True, mbItemDrag );
else
{
Rectangle aSizeRect( mnDragPos, 0, mnDragPos, mnDragSize+mnDY );
@@ -761,17 +761,17 @@ void HeaderBar::ImplStartDrag( const Point& rMousePos, BOOL bCommand )
void HeaderBar::ImplDrag( const Point& rMousePos )
{
- BOOL bNewOutDrag;
- USHORT nPos = GetItemPos( mnCurItemId );
+ sal_Bool bNewOutDrag;
+ sal_uInt16 nPos = GetItemPos( mnCurItemId );
mnDragPos = rMousePos.X()-mnMouseOff;
if ( mbItemMode )
{
Rectangle aItemRect = ImplGetItemRect( nPos );
if ( aItemRect.IsInside( rMousePos ) )
- bNewOutDrag = FALSE;
+ bNewOutDrag = sal_False;
else
- bNewOutDrag = TRUE;
+ bNewOutDrag = sal_True;
// Evt. ItemDrag anschalten
if ( bNewOutDrag && mbDragable && !mbItemDrag &&
@@ -779,24 +779,24 @@ void HeaderBar::ImplDrag( const Point& rMousePos )
{
if ( (rMousePos.Y() >= aItemRect.Top()) && (rMousePos.Y() <= aItemRect.Bottom()) )
{
- mbItemDrag = TRUE;
- ImplDrawItem( nPos, TRUE, mbItemDrag );
+ mbItemDrag = sal_True;
+ ImplDrawItem( nPos, sal_True, mbItemDrag );
}
}
- USHORT nOldItemDragPos = mnItemDragPos;
+ sal_uInt16 nOldItemDragPos = mnItemDragPos;
if ( mbItemDrag )
{
if ( (rMousePos.Y() < -HEADERBAR_DRAGOUTOFF) || (rMousePos.Y() > mnDY+HEADERBAR_DRAGOUTOFF) )
- bNewOutDrag = TRUE;
+ bNewOutDrag = sal_True;
else
- bNewOutDrag = FALSE;
+ bNewOutDrag = sal_False;
if ( bNewOutDrag )
mnItemDragPos = HEADERBAR_ITEM_NOTFOUND;
else
{
- USHORT nTempId = GetItemId( Point( rMousePos.X(), 2 ) );
+ sal_uInt16 nTempId = GetItemId( Point( rMousePos.X(), 2 ) );
if ( nTempId )
mnItemDragPos = GetItemPos( nTempId );
else
@@ -840,7 +840,7 @@ void HeaderBar::ImplDrag( const Point& rMousePos )
(mnItemDragPos != nPos) &&
(mnItemDragPos != HEADERBAR_ITEM_NOTFOUND) )
{
- ImplDrawItem( mnItemDragPos, FALSE, TRUE );
+ ImplDrawItem( mnItemDragPos, sal_False, sal_True );
ImplInvertDrag( nPos, mnItemDragPos );
}
}
@@ -866,7 +866,7 @@ void HeaderBar::ImplDrag( const Point& rMousePos )
// -----------------------------------------------------------------------
-void HeaderBar::ImplEndDrag( BOOL bCancel )
+void HeaderBar::ImplEndDrag( sal_Bool bCancel )
{
HideTracking();
@@ -874,7 +874,7 @@ void HeaderBar::ImplEndDrag( BOOL bCancel )
{
if ( mbItemMode && (!mbOutDrag || mbItemDrag) )
{
- USHORT nPos = GetItemPos( mnCurItemId );
+ sal_uInt16 nPos = GetItemPos( mnCurItemId );
ImplDrawItem( nPos );
}
@@ -882,7 +882,7 @@ void HeaderBar::ImplEndDrag( BOOL bCancel )
}
else
{
- USHORT nPos = GetItemPos( mnCurItemId );
+ sal_uInt16 nPos = GetItemPos( mnCurItemId );
if ( mbItemMode )
{
if ( mbItemDrag )
@@ -911,18 +911,18 @@ void HeaderBar::ImplEndDrag( BOOL bCancel )
{
ImplHeadItem* pItem = mpItemList->GetObject( nPos );
pItem->mnSize += nDelta;
- ImplUpdate( nPos, TRUE );
+ ImplUpdate( nPos, sal_True );
}
}
}
- mbDrag = FALSE;
+ mbDrag = sal_False;
EndDrag();
mnCurItemId = 0;
mnItemDragPos = HEADERBAR_ITEM_NOTFOUND;
- mbOutDrag = FALSE;
- mbItemMode = FALSE;
- mbItemDrag = FALSE;
+ mbOutDrag = sal_False;
+ mbItemMode = sal_False;
+ mbItemDrag = sal_False;
}
// -----------------------------------------------------------------------
@@ -934,23 +934,23 @@ void HeaderBar::MouseButtonDown( const MouseEvent& rMEvt )
if ( rMEvt.GetClicks() == 2 )
{
long nTemp;
- USHORT nPos;
- USHORT nHitTest = ImplHitTest( rMEvt.GetPosPixel(), nTemp, nPos );
+ sal_uInt16 nPos;
+ sal_uInt16 nHitTest = ImplHitTest( rMEvt.GetPosPixel(), nTemp, nPos );
if ( nHitTest )
{
ImplHeadItem* pItem = mpItemList->GetObject( nPos );
if ( nHitTest & HEAD_HITTEST_DIVIDER )
- mbItemMode = FALSE;
+ mbItemMode = sal_False;
else
- mbItemMode = TRUE;
+ mbItemMode = sal_True;
mnCurItemId = pItem->mnId;
DoubleClick();
- mbItemMode = FALSE;
+ mbItemMode = sal_False;
mnCurItemId = 0;
}
}
else
- ImplStartDrag( rMEvt.GetPosPixel(), FALSE );
+ ImplStartDrag( rMEvt.GetPosPixel(), sal_False );
}
}
@@ -959,9 +959,9 @@ void HeaderBar::MouseButtonDown( const MouseEvent& rMEvt )
void HeaderBar::MouseMove( const MouseEvent& rMEvt )
{
long nTemp1;
- USHORT nTemp2;
+ sal_uInt16 nTemp2;
PointerStyle eStyle = POINTER_ARROW;
- USHORT nHitTest = ImplHitTest( rMEvt.GetPosPixel(), nTemp1, nTemp2 );
+ sal_uInt16 nHitTest = ImplHitTest( rMEvt.GetPosPixel(), nTemp1, nTemp2 );
if ( nHitTest & HEAD_HITTEST_DIVIDER )
eStyle = POINTER_HSIZEBAR;
@@ -1000,20 +1000,20 @@ void HeaderBar::Paint( const Rectangle& rRect )
}
}
- USHORT nCurItemPos;
+ sal_uInt16 nCurItemPos;
if ( mbDrag )
nCurItemPos = GetItemPos( mnCurItemId );
else
nCurItemPos = HEADERBAR_ITEM_NOTFOUND;
- USHORT nItemCount = (USHORT)mpItemList->Count();
- for ( USHORT i = 0; i < nItemCount; i++ )
- ImplDrawItem( i, (i == nCurItemPos) ? TRUE : FALSE, FALSE, &rRect );
+ sal_uInt16 nItemCount = (sal_uInt16)mpItemList->Count();
+ for ( sal_uInt16 i = 0; i < nItemCount; i++ )
+ ImplDrawItem( i, (i == nCurItemPos) ? sal_True : sal_False, sal_False, &rRect );
}
// -----------------------------------------------------------------------
void HeaderBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
- ULONG nFlags )
+ sal_uLong nFlags )
{
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
@@ -1050,8 +1050,8 @@ void HeaderBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
Rectangle aItemRect( aRect );
// aItemRect.Bottom()--;
- USHORT nItemCount = (USHORT)mpItemList->Count();
- for ( USHORT i = 0; i < nItemCount; i++ )
+ sal_uInt16 nItemCount = (sal_uInt16)mpItemList->Count();
+ for ( sal_uInt16 i = 0; i < nItemCount; i++ )
{
aItemRect.Left() = aRect.Left()+ImplGetItemPos( i );
aItemRect.Right() = aItemRect.Left() + mpItemList->GetObject( i )->mnSize - 1;
@@ -1060,7 +1060,7 @@ void HeaderBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
aItemRect.Right() = 16000;
Region aRegion( aRect );
pDev->SetClipRegion( aRegion );
- ImplDrawItem( pDev, i, FALSE, FALSE, aItemRect, &aRect, nFlags );
+ ImplDrawItem( pDev, i, sal_False, sal_False, aItemRect, &aRect, nFlags );
pDev->SetClipRegion();
}
@@ -1084,7 +1084,7 @@ void HeaderBar::Command( const CommandEvent& rCEvt )
{
if ( rCEvt.IsMouseEvent() && (rCEvt.GetCommand() == COMMAND_STARTDRAG) && !mbDrag )
{
- ImplStartDrag( rCEvt.GetMousePosPixel(), TRUE );
+ ImplStartDrag( rCEvt.GetMousePosPixel(), sal_True );
return;
}
@@ -1095,7 +1095,7 @@ void HeaderBar::Command( const CommandEvent& rCEvt )
void HeaderBar::RequestHelp( const HelpEvent& rHEvt )
{
- USHORT nItemId = GetItemId( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) );
+ sal_uInt16 nItemId = GetItemId( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) );
if ( nItemId )
{
if ( rHEvt.GetMode() & (HELPMODE_QUICK | HELPMODE_BALLOON) )
@@ -1158,17 +1158,17 @@ void HeaderBar::StateChanged( StateChangedType nType )
else if ( (nType == STATE_CHANGE_ZOOM) ||
(nType == STATE_CHANGE_CONTROLFONT) )
{
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
{
- ImplInitSettings( FALSE, TRUE, FALSE );
+ ImplInitSettings( sal_False, sal_True, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
{
- ImplInitSettings( FALSE, FALSE, TRUE );
+ ImplInitSettings( sal_False, sal_False, sal_True );
Invalidate();
}
}
@@ -1184,7 +1184,7 @@ void HeaderBar::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
{
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
Invalidate();
}
}
@@ -1232,8 +1232,8 @@ void HeaderBar::DoubleClick()
// -----------------------------------------------------------------------
-void HeaderBar::InsertItem( USHORT nItemId, const Image& rImage,
- long nSize, HeaderBarItemBits nBits, USHORT nPos )
+void HeaderBar::InsertItem( sal_uInt16 nItemId, const Image& rImage,
+ long nSize, HeaderBarItemBits nBits, sal_uInt16 nPos )
{
DBG_ASSERT( nItemId, "HeaderBar::InsertItem(): ItemId == 0" );
DBG_ASSERT( GetItemPos( nItemId ) == HEADERBAR_ITEM_NOTFOUND,
@@ -1249,13 +1249,13 @@ void HeaderBar::InsertItem( USHORT nItemId, const Image& rImage,
mpItemList->Insert( pItem, nPos );
// Ausgabe updaten
- ImplUpdate( nPos, TRUE );
+ ImplUpdate( nPos, sal_True );
}
// -----------------------------------------------------------------------
-void HeaderBar::InsertItem( USHORT nItemId, const XubString& rText,
- long nSize, HeaderBarItemBits nBits, USHORT nPos )
+void HeaderBar::InsertItem( sal_uInt16 nItemId, const XubString& rText,
+ long nSize, HeaderBarItemBits nBits, sal_uInt16 nPos )
{
DBG_ASSERT( nItemId, "HeaderBar::InsertItem(): ItemId == 0" );
DBG_ASSERT( GetItemPos( nItemId ) == HEADERBAR_ITEM_NOTFOUND,
@@ -1271,15 +1271,15 @@ void HeaderBar::InsertItem( USHORT nItemId, const XubString& rText,
mpItemList->Insert( pItem, nPos );
// Ausgabe updaten
- ImplUpdate( nPos, TRUE );
+ ImplUpdate( nPos, sal_True );
}
// -----------------------------------------------------------------------
-void HeaderBar::InsertItem( USHORT nItemId,
+void HeaderBar::InsertItem( sal_uInt16 nItemId,
const Image& rImage, const XubString& rText,
long nSize, HeaderBarItemBits nBits,
- USHORT nPos )
+ sal_uInt16 nPos )
{
DBG_ASSERT( nItemId, "HeaderBar::InsertItem(): ItemId == 0" );
DBG_ASSERT( GetItemPos( nItemId ) == HEADERBAR_ITEM_NOTFOUND,
@@ -1296,27 +1296,27 @@ void HeaderBar::InsertItem( USHORT nItemId,
mpItemList->Insert( pItem, nPos );
// Ausgabe updaten
- ImplUpdate( nPos, TRUE );
+ ImplUpdate( nPos, sal_True );
}
// -----------------------------------------------------------------------
-void HeaderBar::RemoveItem( USHORT nItemId )
+void HeaderBar::RemoveItem( sal_uInt16 nItemId )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
{
ImplHeadItem* pItem = mpItemList->Remove( nPos );
delete pItem;
- ImplUpdate( nPos, TRUE );
+ ImplUpdate( nPos, sal_True );
}
}
// -----------------------------------------------------------------------
-void HeaderBar::MoveItem( USHORT nItemId, USHORT nNewPos )
+void HeaderBar::MoveItem( sal_uInt16 nItemId, sal_uInt16 nNewPos )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
{
if ( nPos != nNewPos )
@@ -1325,7 +1325,7 @@ void HeaderBar::MoveItem( USHORT nItemId, USHORT nNewPos )
if ( nNewPos < nPos )
nPos = nNewPos;
mpItemList->Insert( pItem, nNewPos );
- ImplUpdate( nPos, TRUE );
+ ImplUpdate( nPos, sal_True );
}
}
}
@@ -1343,7 +1343,7 @@ void HeaderBar::Clear()
}
mpItemList->Clear();
- ImplUpdate( 0, TRUE );
+ ImplUpdate( 0, sal_True );
}
// -----------------------------------------------------------------------
@@ -1363,20 +1363,20 @@ void HeaderBar::SetOffset( long nNewOffset )
// -----------------------------------------------------------------------
-USHORT HeaderBar::GetItemCount() const
+sal_uInt16 HeaderBar::GetItemCount() const
{
- return (USHORT)mpItemList->Count();
+ return (sal_uInt16)mpItemList->Count();
}
// -----------------------------------------------------------------------
-USHORT HeaderBar::GetItemPos( USHORT nItemId ) const
+sal_uInt16 HeaderBar::GetItemPos( sal_uInt16 nItemId ) const
{
ImplHeadItem* pItem = mpItemList->First();
while ( pItem )
{
if ( pItem->mnId == nItemId )
- return (USHORT)mpItemList->GetCurPos();
+ return (sal_uInt16)mpItemList->GetCurPos();
pItem = mpItemList->Next();
}
@@ -1385,7 +1385,7 @@ USHORT HeaderBar::GetItemPos( USHORT nItemId ) const
// -----------------------------------------------------------------------
-USHORT HeaderBar::GetItemId( USHORT nPos ) const
+sal_uInt16 HeaderBar::GetItemId( sal_uInt16 nPos ) const
{
ImplHeadItem* pItem = mpItemList->GetObject( nPos );
if ( pItem )
@@ -1396,9 +1396,9 @@ USHORT HeaderBar::GetItemId( USHORT nPos ) const
// -----------------------------------------------------------------------
-USHORT HeaderBar::GetItemId( const Point& rPos ) const
+sal_uInt16 HeaderBar::GetItemId( const Point& rPos ) const
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
while ( nPos < mpItemList->Count() )
{
if ( ImplGetItemRect( nPos ).IsInside( rPos ) )
@@ -1412,10 +1412,10 @@ USHORT HeaderBar::GetItemId( const Point& rPos ) const
// -----------------------------------------------------------------------
-Rectangle HeaderBar::GetItemRect( USHORT nItemId ) const
+Rectangle HeaderBar::GetItemRect( sal_uInt16 nItemId ) const
{
Rectangle aRect;
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
aRect = ImplGetItemRect( nPos );
return aRect;
@@ -1423,25 +1423,25 @@ Rectangle HeaderBar::GetItemRect( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void HeaderBar::SetItemSize( USHORT nItemId, long nNewSize )
+void HeaderBar::SetItemSize( sal_uInt16 nItemId, long nNewSize )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
{
ImplHeadItem* pItem = mpItemList->GetObject( nPos );
if ( pItem->mnSize != nNewSize )
{
pItem->mnSize = nNewSize;
- ImplUpdate( nPos, TRUE );
+ ImplUpdate( nPos, sal_True );
}
}
}
// -----------------------------------------------------------------------
-long HeaderBar::GetItemSize( USHORT nItemId ) const
+long HeaderBar::GetItemSize( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
return mpItemList->GetObject( nPos )->mnSize;
else
@@ -1450,9 +1450,9 @@ long HeaderBar::GetItemSize( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void HeaderBar::SetItemBits( USHORT nItemId, HeaderBarItemBits nNewBits )
+void HeaderBar::SetItemBits( sal_uInt16 nItemId, HeaderBarItemBits nNewBits )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
{
ImplHeadItem* pItem = mpItemList->GetObject( nPos );
@@ -1466,9 +1466,9 @@ void HeaderBar::SetItemBits( USHORT nItemId, HeaderBarItemBits nNewBits )
// -----------------------------------------------------------------------
-HeaderBarItemBits HeaderBar::GetItemBits( USHORT nItemId ) const
+HeaderBarItemBits HeaderBar::GetItemBits( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
return mpItemList->GetObject( nPos )->mnBits;
else
@@ -1477,9 +1477,9 @@ HeaderBarItemBits HeaderBar::GetItemBits( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void HeaderBar::SetItemData( USHORT nItemId, void* pNewData )
+void HeaderBar::SetItemData( sal_uInt16 nItemId, void* pNewData )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
{
mpItemList->GetObject( nPos )->mpUserData = pNewData;
@@ -1489,9 +1489,9 @@ void HeaderBar::SetItemData( USHORT nItemId, void* pNewData )
// -----------------------------------------------------------------------
-void* HeaderBar::GetItemData( USHORT nItemId ) const
+void* HeaderBar::GetItemData( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
return mpItemList->GetObject( nPos )->mpUserData;
else
@@ -1500,9 +1500,9 @@ void* HeaderBar::GetItemData( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void HeaderBar::SetItemImage( USHORT nItemId, const Image& rImage )
+void HeaderBar::SetItemImage( sal_uInt16 nItemId, const Image& rImage )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
{
mpItemList->GetObject( nPos )->maImage = rImage;
@@ -1512,9 +1512,9 @@ void HeaderBar::SetItemImage( USHORT nItemId, const Image& rImage )
// -----------------------------------------------------------------------
-Image HeaderBar::GetItemImage( USHORT nItemId ) const
+Image HeaderBar::GetItemImage( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
return mpItemList->GetObject( nPos )->maImage;
else
@@ -1523,9 +1523,9 @@ Image HeaderBar::GetItemImage( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void HeaderBar::SetItemText( USHORT nItemId, const XubString& rText )
+void HeaderBar::SetItemText( sal_uInt16 nItemId, const XubString& rText )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
{
mpItemList->GetObject( nPos )->maText = rText;
@@ -1535,9 +1535,9 @@ void HeaderBar::SetItemText( USHORT nItemId, const XubString& rText )
// -----------------------------------------------------------------------
-XubString HeaderBar::GetItemText( USHORT nItemId ) const
+XubString HeaderBar::GetItemText( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
return mpItemList->GetObject( nPos )->maText;
else
@@ -1546,18 +1546,18 @@ XubString HeaderBar::GetItemText( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void HeaderBar::SetHelpText( USHORT nItemId, const XubString& rText )
+void HeaderBar::SetHelpText( sal_uInt16 nItemId, const XubString& rText )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
mpItemList->GetObject( nPos )->maHelpText = rText;
}
// -----------------------------------------------------------------------
-XubString HeaderBar::GetHelpText( USHORT nItemId ) const
+XubString HeaderBar::GetHelpText( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
{
ImplHeadItem* pItem = mpItemList->GetObject( nPos );
@@ -1576,18 +1576,18 @@ XubString HeaderBar::GetHelpText( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void HeaderBar::SetHelpId( USHORT nItemId, const rtl::OString& rHelpId )
+void HeaderBar::SetHelpId( sal_uInt16 nItemId, const rtl::OString& rHelpId )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
mpItemList->GetObject( nPos )->maHelpId = rHelpId;
}
// -----------------------------------------------------------------------
-rtl::OString HeaderBar::GetHelpId( USHORT nItemId ) const
+rtl::OString HeaderBar::GetHelpId( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
rtl::OString aRet;
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
aRet = mpItemList->GetObject( nPos )->maHelpId;
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index 574f2bde4e1e..94db99a66194 100755
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -116,17 +116,17 @@ class SvtMatchContext_Impl : public ::vos::OThread
String aBaseURL;
String aText;
SvtURLBox* pBox;
- BOOL bStop;
- BOOL bOnlyDirectories;
- BOOL bNoSelection;
+ sal_Bool bStop;
+ sal_Bool bOnlyDirectories;
+ sal_Bool bNoSelection;
DECL_STATIC_LINK( SvtMatchContext_Impl, Select_Impl, void* );
virtual void SAL_CALL onTerminated( );
virtual void SAL_CALL run();
virtual void SAL_CALL Cancel();
- void Insert( const String& rCompletion, const String& rURL, BOOL bForce = FALSE);
- void ReadFolder( const String& rURL, const String& rMatch, BOOL bSmart );
+ void Insert( const String& rCompletion, const String& rURL, sal_Bool bForce = sal_False);
+ void ReadFolder( const String& rURL, const String& rMatch, sal_Bool bSmart );
void FillPicklist( SvStringsDtor& rPickList );
public:
@@ -154,7 +154,7 @@ SvtMatchContext_Impl::SvtMatchContext_Impl(
, aBaseURL( pBoxP->aBaseURL )
, aText( rText )
, pBox( pBoxP )
- , bStop( FALSE )
+ , bStop( sal_False )
, bOnlyDirectories( pBoxP->bOnlyDirectories )
, bNoSelection( pBoxP->bNoSelection )
{
@@ -199,7 +199,7 @@ void SvtMatchContext_Impl::FillPicklist( SvStringsDtor& rPickList )
seqPropertySet[nProperty].Value >>= sTitle;
aURL.SetURL( sTitle );
const StringPtr pStr = new String( aURL.GetMainURL( INetURLObject::DECODE_WITH_CHARSET ) );
- rPickList.Insert( pStr, (USHORT) nItem );
+ rPickList.Insert( pStr, (sal_uInt16) nItem );
break;
}
}
@@ -216,7 +216,7 @@ void SAL_CALL SvtMatchContext_Impl::Cancel()
//-------------------------------------------------------------------------
void SvtMatchContext_Impl::Stop()
{
- bStop = TRUE;
+ bStop = sal_True;
if( isRunning() )
terminate();
@@ -246,7 +246,7 @@ IMPL_STATIC_LINK( SvtMatchContext_Impl, Select_Impl, void*, )
}
SvtURLBox* pBox = pThis->pBox;
- pBox->bAutoCompleteMode = TRUE;
+ pBox->bAutoCompleteMode = sal_True;
// did we filter completions which otherwise would have been valid?
// (to be filled below)
@@ -255,7 +255,7 @@ IMPL_STATIC_LINK( SvtMatchContext_Impl, Select_Impl, void*, )
// insert all completed strings into the listbox
pBox->Clear();
- for( USHORT nPos = 0; nPos<pThis->pCompletions->Count(); nPos++ )
+ for( sal_uInt16 nPos = 0; nPos<pThis->pCompletions->Count(); nPos++ )
{
String sCompletion( *(*pThis->pCompletions)[nPos] );
@@ -325,12 +325,12 @@ IMPL_STATIC_LINK( SvtMatchContext_Impl, Select_Impl, void*, )
//-------------------------------------------------------------------------
void SvtMatchContext_Impl::Insert( const String& rCompletion,
const String& rURL,
- BOOL bForce )
+ sal_Bool bForce )
{
if( !bForce )
{
// avoid doubles
- for( USHORT nPos = pCompletions->Count(); nPos--; )
+ for( sal_uInt16 nPos = pCompletions->Count(); nPos--; )
if( *(*pCompletions)[ nPos ] == rCompletion )
return;
}
@@ -344,7 +344,7 @@ void SvtMatchContext_Impl::Insert( const String& rCompletion,
//-------------------------------------------------------------------------
void SvtMatchContext_Impl::ReadFolder( const String& rURL,
const String& rMatch,
- BOOL bSmart )
+ sal_Bool bSmart )
{
// check folder to scan
if( !UCBContentHelper::IsFolder( rURL ) )
@@ -369,7 +369,7 @@ void SvtMatchContext_Impl::ReadFolder( const String& rURL,
String aNewText( aText );
aNewText += '/';
- Insert( aNewText, rURL, TRUE );
+ Insert( aNewText, rURL, sal_True );
return;
}
@@ -495,7 +495,7 @@ void SvtMatchContext_Impl::ReadFolder( const String& rURL,
if ( bIsFolder )
aInput += aDelimiter;
- Insert( aInput, aObj.GetMainURL( INetURLObject::NO_DECODE ), TRUE );
+ Insert( aInput, aObj.GetMainURL( INetURLObject::NO_DECODE ), sal_True );
}
}
}
@@ -564,7 +564,7 @@ String SvtURLBox::ParseSmart( String aText, String aBaseURL, String aWorkDir )
aObj.setFinalSlash();
// take base URL and append current input
- bool bWasAbsolute = FALSE;
+ bool bWasAbsolute = sal_False;
#ifdef UNX
// don't support FSYS_MAC under Unix, because here ':' is a valid character for a filename
INetURLObject::FSysStyle eStyle = static_cast< INetURLObject::FSysStyle >( INetURLObject::FSYS_VOS | INetURLObject::FSYS_UNX | INetURLObject::FSYS_DOS );
@@ -605,7 +605,7 @@ void SvtMatchContext_Impl::run()
pURLs->Remove( 0, pURLs->Count() );
// check for input
- USHORT nTextLen = aText.Len();
+ sal_uInt16 nTextLen = aText.Len();
if ( !nTextLen )
return;
@@ -657,7 +657,7 @@ void SvtMatchContext_Impl::run()
// don't scan history picklist if only directories are allowed, picklist contains only files
return;
- BOOL bFull = FALSE;
+ sal_Bool bFull = sal_False;
int nCount = aPickList.Count();
INetURLObject aCurObj;
@@ -666,7 +666,7 @@ void SvtMatchContext_Impl::run()
aObj.SetSmartProtocol( eSmartProt == INET_PROT_NOT_VALID ? INET_PROT_HTTP : eSmartProt );
for( ;; )
{
- for( USHORT nPos = 0; schedule() && nPos < nCount; nPos++ )
+ for( sal_uInt16 nPos = 0; schedule() && nPos < nCount; nPos++ )
{
aCurObj.SetURL( *aPickList.GetObject( nPos ) );
aCurObj.SetSmartURL( aCurObj.GetURLNoPass());
@@ -756,7 +756,7 @@ void SvtMatchContext_Impl::run()
}
if( !bFull )
- bFull = TRUE;
+ bFull = sal_True;
else
break;
}
@@ -767,7 +767,7 @@ void SvtMatchContext_Impl::run()
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
-void SvtURLBox::TryAutoComplete( BOOL bForce )
+void SvtURLBox::TryAutoComplete( sal_Bool bForce )
{
if( Application::AnyInput( INPUT_KEYBOARD ) ) return;
@@ -776,7 +776,7 @@ void SvtURLBox::TryAutoComplete( BOOL bForce )
Selection aSelection( GetSelection() );
if( aSelection.Max() != aCurText.Len() && !bForce )
return;
- USHORT nLen = (USHORT)aSelection.Min();
+ sal_uInt16 nLen = (sal_uInt16)aSelection.Min();
aCurText.Erase( nLen );
if( aCurText.Len() && bIsAutoCompleteEnabled )
{
@@ -794,13 +794,13 @@ SvtURLBox::SvtURLBox( Window* pParent, INetProtocol eSmart )
: ComboBox( pParent , WB_DROPDOWN | WB_AUTOSIZE | WB_AUTOHSCROLL ),
pCtx( 0 ),
eSmartProtocol( eSmart ),
- bAutoCompleteMode( FALSE ),
- bOnlyDirectories( FALSE ),
- bTryAutoComplete( FALSE ),
- bCtrlClick( FALSE ),
- bHistoryDisabled( FALSE ),
- bNoSelection( FALSE ),
- bIsAutoCompleteEnabled( TRUE )
+ bAutoCompleteMode( sal_False ),
+ bOnlyDirectories( sal_False ),
+ bTryAutoComplete( sal_False ),
+ bCtrlClick( sal_False ),
+ bHistoryDisabled( sal_False ),
+ bNoSelection( sal_False ),
+ bIsAutoCompleteEnabled( sal_True )
{
ImplInit();
@@ -815,13 +815,13 @@ SvtURLBox::SvtURLBox( Window* pParent, WinBits _nStyle, INetProtocol eSmart )
: ComboBox( pParent, _nStyle ),
pCtx( 0 ),
eSmartProtocol( eSmart ),
- bAutoCompleteMode( FALSE ),
- bOnlyDirectories( FALSE ),
- bTryAutoComplete( FALSE ),
- bCtrlClick( FALSE ),
- bHistoryDisabled( FALSE ),
- bNoSelection( FALSE ),
- bIsAutoCompleteEnabled( TRUE )
+ bAutoCompleteMode( sal_False ),
+ bOnlyDirectories( sal_False ),
+ bTryAutoComplete( sal_False ),
+ bCtrlClick( sal_False ),
+ bHistoryDisabled( sal_False ),
+ bNoSelection( sal_False ),
+ bIsAutoCompleteEnabled( sal_True )
{
ImplInit();
}
@@ -831,13 +831,13 @@ SvtURLBox::SvtURLBox( Window* pParent, const ResId& _rResId, INetProtocol eSmart
: ComboBox( pParent , _rResId ),
pCtx( 0 ),
eSmartProtocol( eSmart ),
- bAutoCompleteMode( FALSE ),
- bOnlyDirectories( FALSE ),
- bTryAutoComplete( FALSE ),
- bCtrlClick( FALSE ),
- bHistoryDisabled( FALSE ),
- bNoSelection( FALSE ),
- bIsAutoCompleteEnabled( TRUE )
+ bAutoCompleteMode( sal_False ),
+ bOnlyDirectories( sal_False ),
+ bTryAutoComplete( sal_False ),
+ bCtrlClick( sal_False ),
+ bHistoryDisabled( sal_False ),
+ bNoSelection( sal_False ),
+ bIsAutoCompleteEnabled( sal_True )
{
ImplInit();
}
@@ -847,8 +847,9 @@ void SvtURLBox::ImplInit()
{
pImp = new SvtURLBox_Impl();
- SetHelpId( ".uno:OpenURL" );
- EnableAutocomplete( FALSE );
+ if ( GetHelpId().getLength() == 0 )
+ SetHelpId( ".uno:OpenURL" );
+ EnableAutocomplete( sal_False );
SetText( String() );
@@ -930,7 +931,7 @@ void SvtURLBox::UpdatePicklistForSmartProtocol_Impl()
if ( aURL.Len() && ( !pImp->pUrlFilter || pImp->pUrlFilter->isUrlAllowed( aURL ) ) )
{
- BOOL bFound = (aURL.GetChar(aURL.Len()-1) == '/' );
+ sal_Bool bFound = (aURL.GetChar(aURL.Len()-1) == '/' );
if ( !bFound )
{
String aUpperURL( aURL );
@@ -960,7 +961,7 @@ void SvtURLBox::UpdatePicklistForSmartProtocol_Impl()
}
//-------------------------------------------------------------------------
-BOOL SvtURLBox::ProcessKey( const KeyCode& rKey )
+sal_Bool SvtURLBox::ProcessKey( const KeyCode& rKey )
{
// every key input stops the current matching thread
if( pCtx )
@@ -978,7 +979,7 @@ BOOL SvtURLBox::ProcessKey( const KeyCode& rKey )
if ( bAutoCompleteMode )
{
// reset picklist
- bAutoCompleteMode = FALSE;
+ bAutoCompleteMode = sal_False;
Selection aSelection( GetSelection() );
SetSelection( Selection( aSelection.Min(), aSelection.Min() ) );
if ( bOnlyDirectories )
@@ -989,19 +990,19 @@ BOOL SvtURLBox::ProcessKey( const KeyCode& rKey )
}
bCtrlClick = rKey.IsMod1();
- BOOL bHandled = FALSE;
+ sal_Bool bHandled = sal_False;
if ( GetOpenHdl().IsSet() )
{
- bHandled = TRUE;
+ bHandled = sal_True;
GetOpenHdl().Call(this);
}
else if ( GetSelectHdl().IsSet() )
{
- bHandled = TRUE;
+ bHandled = sal_True;
GetSelectHdl().Call(this);
}
- bCtrlClick = FALSE;
+ bCtrlClick = sal_False;
ClearModifyFlag();
return bHandled;
@@ -1009,9 +1010,9 @@ BOOL SvtURLBox::ProcessKey( const KeyCode& rKey )
else if ( aCode == KEY_RETURN && !GetText().Len() && GetOpenHdl().IsSet() )
{
// for file dialog
- bAutoCompleteMode = FALSE;
+ bAutoCompleteMode = sal_False;
GetOpenHdl().Call(this);
- return TRUE;
+ return sal_True;
}
else if( aCode == KEY_ESCAPE )
{
@@ -1027,15 +1028,15 @@ BOOL SvtURLBox::ProcessKey( const KeyCode& rKey )
}
else
{
- return FALSE;
+ return sal_False;
}
- bAutoCompleteMode = FALSE;
- return TRUE;
+ bAutoCompleteMode = sal_False;
+ return sal_True;
}
else
{
- return FALSE;
+ return sal_False;
}
}
@@ -1056,15 +1057,15 @@ long SvtURLBox::PreNotify( NotifyEvent& rNEvt )
KeyCode aCode( rKey.GetCode() );
if( ProcessKey( rKey ) )
{
- return TRUE;
+ return sal_True;
}
else if( ( aCode == KEY_UP || aCode == KEY_DOWN ) && !rKey.IsMod2() )
{
Selection aSelection( GetSelection() );
- USHORT nLen = (USHORT)aSelection.Min();
+ sal_uInt16 nLen = (sal_uInt16)aSelection.Min();
GetSubEdit()->KeyInput( rEvent );
SetSelection( Selection( nLen, GetText().Len() ) );
- return TRUE;
+ return sal_True;
}
if ( MatchesPlaceHolder( GetText() ) )
@@ -1083,7 +1084,7 @@ IMPL_LINK( SvtURLBox, AutoCompleteHdl_Impl, void*, EMPTYARG )
{
if ( GetSubEdit()->GetAutocompleteAction() == AUTOCOMPLETE_KEYINPUT )
{
- TryAutoComplete( FALSE );
+ TryAutoComplete( sal_False );
return 1L;
}
@@ -1122,7 +1123,7 @@ void SvtURLBox::Select()
}
//-------------------------------------------------------------------------
-void SvtURLBox::SetOnlyDirectories( BOOL bDir )
+void SvtURLBox::SetOnlyDirectories( sal_Bool bDir )
{
bOnlyDirectories = bDir;
if ( bOnlyDirectories )
@@ -1130,7 +1131,7 @@ void SvtURLBox::SetOnlyDirectories( BOOL bDir )
}
//-------------------------------------------------------------------------
-void SvtURLBox::SetNoURLSelection( BOOL bSet )
+void SvtURLBox::SetNoURLSelection( sal_Bool bSet )
{
bNoSelection = bSet;
}
@@ -1147,7 +1148,7 @@ String SvtURLBox::GetURL()
// try to get the right case preserving URL from the list of URLs
if ( pImp->pCompletions && pImp->pURLs )
{
- for( USHORT nPos=0; nPos<pImp->pCompletions->Count(); nPos++ )
+ for( sal_uInt16 nPos=0; nPos<pImp->pCompletions->Count(); nPos++ )
{
#ifdef DBG_UTIL
String aTmp( *(*pImp->pCompletions)[ nPos ] );
@@ -1228,7 +1229,7 @@ String SvtURLBox::GetURL()
//-------------------------------------------------------------------------
void SvtURLBox::DisableHistory()
{
- bHistoryDisabled = TRUE;
+ bHistoryDisabled = sal_True;
UpdatePicklistForSmartProtocol_Impl();
}
diff --git a/svtools/source/control/prgsbar.cxx b/svtools/source/control/prgsbar.cxx
index bb57d043b11d..86b49c782398 100755
--- a/svtools/source/control/prgsbar.cxx
+++ b/svtools/source/control/prgsbar.cxx
@@ -44,9 +44,9 @@
void ProgressBar::ImplInit()
{
mnPercent = 0;
- mbCalcNew = TRUE;
+ mbCalcNew = sal_True;
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
}
static WinBits clearProgressBarBorder( Window* pParent, WinBits nOrgStyle )
@@ -85,8 +85,8 @@ ProgressBar::~ProgressBar()
// -----------------------------------------------------------------------
-void ProgressBar::ImplInitSettings( BOOL bFont,
- BOOL bForeground, BOOL bBackground )
+void ProgressBar::ImplInitSettings( sal_Bool bFont,
+ sal_Bool bForeground, sal_Bool bBackground )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -108,8 +108,8 @@ void ProgressBar::ImplInitSettings( BOOL bFont,
{
if( (GetStyle() & WB_BORDER) )
SetBorderStyle( WINDOW_BORDER_REMOVEBORDER );
- EnableChildTransparentMode( TRUE );
- SetPaintTransparent( TRUE );
+ EnableChildTransparentMode( sal_True );
+ SetPaintTransparent( sal_True );
SetBackground();
SetParentClipMode( PARENTCLIPMODE_NOCLIP );
}
@@ -147,18 +147,18 @@ void ProgressBar::ImplInitSettings( BOOL bFont,
// -----------------------------------------------------------------------
-void ProgressBar::ImplDrawProgress( USHORT nOldPerc, USHORT nNewPerc )
+void ProgressBar::ImplDrawProgress( sal_uInt16 nOldPerc, sal_uInt16 nNewPerc )
{
if ( mbCalcNew )
{
- mbCalcNew = FALSE;
+ mbCalcNew = sal_False;
Size aSize = GetOutputSizePixel();
mnPrgsHeight = aSize.Height()-(PROGRESSBAR_WIN_OFFSET*2);
mnPrgsWidth = (mnPrgsHeight*2)/3;
maPos.Y() = PROGRESSBAR_WIN_OFFSET;
long nMaxWidth = (aSize.Width()-(PROGRESSBAR_WIN_OFFSET*2)+PROGRESSBAR_OFFSET);
- USHORT nMaxCount = (USHORT)(nMaxWidth / (mnPrgsWidth+PROGRESSBAR_OFFSET));
+ sal_uInt16 nMaxCount = (sal_uInt16)(nMaxWidth / (mnPrgsWidth+PROGRESSBAR_OFFSET));
if ( nMaxCount <= 1 )
nMaxCount = 1;
else
@@ -187,20 +187,20 @@ void ProgressBar::Paint( const Rectangle& )
void ProgressBar::Resize()
{
- mbCalcNew = TRUE;
+ mbCalcNew = sal_True;
if ( IsReallyVisible() )
Invalidate();
}
// -----------------------------------------------------------------------
-void ProgressBar::SetValue( USHORT nNewPercent )
+void ProgressBar::SetValue( sal_uInt16 nNewPercent )
{
DBG_ASSERTWARNING( nNewPercent <= 100, "StatusBar::SetProgressValue(): nPercent > 100" );
if ( nNewPercent < mnPercent )
{
- mbCalcNew = TRUE;
+ mbCalcNew = sal_True;
mnPercent = nNewPercent;
if ( IsReallyVisible() )
{
@@ -223,19 +223,19 @@ void ProgressBar::StateChanged( StateChangedType nType )
if ( (nType == STATE_CHANGE_ZOOM) ||
(nType == STATE_CHANGE_CONTROLFONT) )
{
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
Invalidate();
}
else
*/
if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
{
- ImplInitSettings( FALSE, TRUE, FALSE );
+ ImplInitSettings( sal_False, sal_True, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
{
- ImplInitSettings( FALSE, FALSE, TRUE );
+ ImplInitSettings( sal_False, sal_False, sal_True );
Invalidate();
}
@@ -249,7 +249,7 @@ void ProgressBar::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
Invalidate();
}
diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx
index f4c04a7000af..118c16c3a4dc 100755
--- a/svtools/source/control/roadmap.cxx
+++ b/svtools/source/control/roadmap.cxx
@@ -120,9 +120,9 @@ namespace svt
void SetClickHdl( const Link& rLink );
const Link& GetClickHdl() const;
- void SetZOrder( RoadmapItem* pRefRoadmapHyperLabel, USHORT nFlags );
- void Enable( BOOL bEnable = TRUE);
- BOOL IsEnabled() const;
+ void SetZOrder( RoadmapItem* pRefRoadmapHyperLabel, sal_uInt16 nFlags );
+ void Enable( sal_Bool bEnable = sal_True);
+ sal_Bool IsEnabled() const;
void GrabFocus();
bool Contains( const Window* _pWindow ) const;
@@ -884,7 +884,7 @@ namespace svt
}
//---------------------------------------------------------------------
- void RoadmapItem::SetZOrder( RoadmapItem* pRefRoadmapHyperLabel, USHORT nFlags )
+ void RoadmapItem::SetZOrder( RoadmapItem* pRefRoadmapHyperLabel, sal_uInt16 nFlags )
{
if (pRefRoadmapHyperLabel == NULL)
mpDescription->SetZOrder( NULL, nFlags); //WINDOW_ZORDER_FIRST );
@@ -893,14 +893,14 @@ namespace svt
}
//---------------------------------------------------------------------
- void RoadmapItem::Enable( BOOL _bEnable)
+ void RoadmapItem::Enable( sal_Bool _bEnable)
{
mpID->Enable(_bEnable);
mpDescription->Enable(_bEnable);
}
//---------------------------------------------------------------------
- BOOL RoadmapItem::IsEnabled() const
+ sal_Bool RoadmapItem::IsEnabled() const
{
return mpID->IsEnabled();
}
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index bdbcd253c198..164118d12ef9 100755
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -103,15 +103,15 @@ private:
long nNullOff;
long nMargin1;
long nMargin2;
- USHORT nLines;
- USHORT nArrows;
- USHORT nBorders;
- USHORT nIndents;
- USHORT nTabs;
- USHORT nMargin1Style;
- USHORT nMargin2Style;
- BOOL bAutoPageWidth;
- BOOL bTextRTL;
+ sal_uInt16 nLines;
+ sal_uInt16 nArrows;
+ sal_uInt16 nBorders;
+ sal_uInt16 nIndents;
+ sal_uInt16 nTabs;
+ sal_uInt16 nMargin1Style;
+ sal_uInt16 nMargin2Style;
+ sal_Bool bAutoPageWidth;
+ sal_Bool bTextRTL;
#ifdef _SV_RULER_CXX
public:
@@ -130,7 +130,7 @@ struct ImplRulerUnitData
long nTick2; // Tick fuer halbe Werte
long nTick3; // Tick fuer Zahlenausgabe
long n100THMM; // Teiler fuer Einheit
- USHORT nUnitDigits; // Anzahl Nachkommastellen
+ sal_uInt16 nUnitDigits; // Anzahl Nachkommastellen
sal_Char aUnitStr[8]; // Einheiten-String
};
@@ -153,13 +153,13 @@ struct ImplRulerHitTest
{
long nPos;
RulerType eType;
- USHORT nAryPos;
- USHORT mnDragSize;
- BOOL bSize;
- BOOL bSizeBar;
- BOOL bExpandTest;
+ sal_uInt16 nAryPos;
+ sal_uInt16 mnDragSize;
+ sal_Bool bSize;
+ sal_Bool bSizeBar;
+ sal_Bool bExpandTest;
ImplRulerHitTest() :
- bExpandTest( FALSE ) {}
+ bExpandTest( sal_False ) {}
};
// =======================================================================
@@ -169,7 +169,7 @@ ImplRulerData::ImplRulerData()
memset( this, 0, sizeof( ImplRulerData ) );
// PageBreite == EditWinBreite
- bAutoPageWidth = TRUE;
+ bAutoPageWidth = sal_True;
}
// -----------------------------------------------------------------------
@@ -241,7 +241,7 @@ void Ruler::ImplInit( WinBits nWinBits )
// --- RTL --- no UI mirroring for horizontal rulers, because
// the document is also not mirrored
- EnableRTL( FALSE );
+ EnableRTL( sal_False );
}
// Variablen initialisieren
@@ -263,13 +263,13 @@ void Ruler::ImplInit( WinBits nWinBits )
mnExtraStyle = 0; // Style des Extra-Feldes
mnExtraClicks = 0; // Click-Anzahl fuer Extra-Feld
mnExtraModifier = 0; // Modifier-Tasten beim Click im Extrafeld
- mbCalc = TRUE; // Muessen Pagebreiten neu berechnet werden
- mbFormat = TRUE; // Muss neu ausgegeben werden
- mbDrag = FALSE; // Sind wir im Drag-Modus
- mbDragDelete = FALSE; // Wird Maus beim Draggen unten rausgezogen
- mbDragCanceled = FALSE; // Wurde Dragging abgebrochen
- mbAutoWinWidth = TRUE; // EditWinBreite == RulerBreite
- mbActive = TRUE; // Ist Lineal aktiv
+ mbCalc = sal_True; // Muessen Pagebreiten neu berechnet werden
+ mbFormat = sal_True; // Muss neu ausgegeben werden
+ mbDrag = sal_False; // Sind wir im Drag-Modus
+ mbDragDelete = sal_False; // Wird Maus beim Draggen unten rausgezogen
+ mbDragCanceled = sal_False; // Wurde Dragging abgebrochen
+ mbAutoWinWidth = sal_True; // EditWinBreite == RulerBreite
+ mbActive = sal_True; // Ist Lineal aktiv
mnUpdateFlags = 0; // Was soll im Update-Handler upgedatet werden
mpData = mpSaveData; // Wir zeigen auf die normalen Daten
meExtraType = RULER_EXTRA_DONTKNOW; // Was im ExtraFeld dargestellt wird
@@ -293,7 +293,7 @@ void Ruler::ImplInit( WinBits nWinBits )
mnBorderWidth = 0;
// Einstellungen setzen
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
// Default-Groesse setzen
long nDefHeight = GetTextHeight() + RULER_OFF*2 + RULER_TEXTOFF*2 + mnBorderWidth;
@@ -391,7 +391,7 @@ void Ruler::ImplVDrawText( long nX, long nY, const String& rText )
// -----------------------------------------------------------------------
-void Ruler::ImplInvertLines( BOOL bErase )
+void Ruler::ImplInvertLines( sal_Bool bErase )
{
// Positionslinien
if ( mpData->nLines && mbActive && !mbDrag && !mbFormat &&
@@ -411,7 +411,7 @@ void Ruler::ImplInvertLines( BOOL bErase )
aRect.Right() = nY;
// Linien ausgeben
- for ( USHORT i = 0; i < mpData->nLines; i++ )
+ for ( sal_uInt16 i = 0; i < mpData->nLines; i++ )
{
n = mpData->pLines[i].nPos+nNullWinOff;
if ( (n >= nRulX1) && (n < nRulX2) )
@@ -464,11 +464,11 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter )
long nTickWidth;
long nX;
long nY;
- BOOL bNoTicks = FALSE;
+ sal_Bool bNoTicks = sal_False;
// Groessenvorberechnung
// Sizes calculation
- BOOL bVertRight = FALSE;
+ sal_Bool bVertRight = sal_False;
if ( mnWinStyle & WB_HORZ )
nTickWidth = aPixSize.Width();
else
@@ -477,7 +477,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter )
if ( mnWinStyle & WB_RIGHT_ALIGNED )
{
aFont.SetOrientation( 2700 );
- bVertRight = TRUE;
+ bVertRight = sal_True;
}
else
aFont.SetOrientation( 900 );
@@ -515,7 +515,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter )
// koennen
if ( nMulti < nOldMulti )
{
- bNoTicks = TRUE;
+ bNoTicks = sal_True;
break;
}
@@ -614,7 +614,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter )
}
}
// #i49017# with some zoom factors the value nTick can overflow
- if( ((ULONG)nTick + (ULONG)nTickCount) > (ULONG)LONG_MAX)
+ if( ((sal_uLong)nTick + (sal_uLong)nTickCount) > (sal_uLong)LONG_MAX)
break;
nTick += nTickCount;
}
@@ -625,7 +625,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter )
void Ruler::ImplDrawArrows( long nCenter )
{
- USHORT i;
+ sal_uInt16 i;
long n1;
long n2;
long n3;
@@ -633,7 +633,7 @@ void Ruler::ImplDrawArrows( long nCenter )
long nLogWidth;
String aStr;
String aStr2;
- BOOL bDrawUnit;
+ sal_Bool bDrawUnit;
long nTxtWidth;
long nTxtHeight2 = GetTextHeight()/2;
@@ -658,14 +658,14 @@ void Ruler::ImplDrawArrows( long nCenter )
nLogWidth = (nLogWidth / aImplRulerUnitTab[mnUnitIndex].n100THMM) * 1000;
else
nLogWidth = (nLogWidth*1000) / aImplRulerUnitTab[mnUnitIndex].n100THMM;
- aStr = rI18nHelper.GetNum( nLogWidth, aImplRulerUnitTab[mnUnitIndex].nUnitDigits, TRUE, FALSE );
+ aStr = rI18nHelper.GetNum( nLogWidth, aImplRulerUnitTab[mnUnitIndex].nUnitDigits, sal_True, sal_False );
// Einheit an den String haengen
aStr2 = aStr;
aStr2.AppendAscii( aImplRulerUnitTab[mnUnitIndex].aUnitStr );
// Textbreite ermitteln
- bDrawUnit = TRUE;
+ bDrawUnit = sal_True;
nTxtWidth = GetTextWidth( aStr2 );
if ( nTxtWidth < mpData->pArrows[i].nWidth-10 )
aStr = aStr2;
@@ -673,7 +673,7 @@ void Ruler::ImplDrawArrows( long nCenter )
{
nTxtWidth = GetTextWidth( aStr );
if ( nTxtWidth > mpData->pArrows[i].nWidth-10 )
- bDrawUnit = FALSE;
+ bDrawUnit = sal_False;
}
// Ist genuegen Platz fuer Einheiten-String vorhanden
@@ -717,7 +717,7 @@ void Ruler::ImplDrawBorders( long nMin, long nMax, long nVirTop, long nVirBottom
long n2;
long nTemp1;
long nTemp2;
- USHORT i;
+ sal_uInt16 i;
for ( i = 0; i < mpData->nBorders; i++ )
{
@@ -835,12 +835,12 @@ void Ruler::ImplDrawBorders( long nMin, long nMax, long nVirTop, long nVirBottom
// -----------------------------------------------------------------------
-void Ruler::ImplDrawIndent( const Polygon& rPoly, USHORT nStyle )
+void Ruler::ImplDrawIndent( const Polygon& rPoly, sal_uInt16 nStyle )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
Point aPos1;
Point aPos2;
- USHORT nIndentStyle = nStyle & RULER_INDENT_STYLE;
+ sal_uInt16 nIndentStyle = nStyle & RULER_INDENT_STYLE;
if ( nStyle & RULER_STYLE_INVISIBLE )
return;
@@ -924,7 +924,7 @@ void Ruler::ImplDrawIndent( const Polygon& rPoly, USHORT nStyle )
void Ruler::ImplDrawIndents( long nMin, long nMax, long nVirTop, long nVirBottom )
{
- USHORT j;
+ sal_uInt16 j;
long n;
long nIndentHeight = (mnVirHeight/2) - 1;
long nIndentWidth2 = nIndentHeight-3;
@@ -935,8 +935,8 @@ void Ruler::ImplDrawIndents( long nMin, long nMax, long nVirTop, long nVirBottom
if ( mpData->pIndents[j].nStyle & RULER_STYLE_INVISIBLE )
continue;
- USHORT nStyle = mpData->pIndents[j].nStyle;
- USHORT nIndentStyle = nStyle & RULER_INDENT_STYLE;
+ sal_uInt16 nStyle = mpData->pIndents[j].nStyle;
+ sal_uInt16 nIndentStyle = nStyle & RULER_INDENT_STYLE;
n = mpData->pIndents[j].nPos+mpData->nNullVirOff;
@@ -968,7 +968,7 @@ void Ruler::ImplDrawIndents( long nMin, long nMax, long nVirTop, long nVirBottom
if(0 == (mnWinStyle & WB_HORZ))
{
Point aTmp;
- for(USHORT i = 0; i < 5; i++)
+ for(sal_uInt16 i = 0; i < 5; i++)
{
aTmp = aPoly[i];
Point aSet(nVirBottom - aTmp.Y(), aTmp.X());
@@ -983,9 +983,9 @@ void Ruler::ImplDrawIndents( long nMin, long nMax, long nVirTop, long nVirBottom
// -----------------------------------------------------------------------
-static void ImplCenterTabPos( Point& rPos, USHORT nTabStyle )
+static void ImplCenterTabPos( Point& rPos, sal_uInt16 nTabStyle )
{
- BOOL bRTL = 0 != (nTabStyle & RULER_TAB_RTL);
+ sal_Bool bRTL = 0 != (nTabStyle & RULER_TAB_RTL);
nTabStyle &= RULER_TAB_STYLE;
rPos.Y() += RULER_TAB_HEIGHT/2;
if ( (!bRTL && nTabStyle == RULER_TAB_LEFT) ||( bRTL && nTabStyle == RULER_TAB_RIGHT))
@@ -995,7 +995,7 @@ static void ImplCenterTabPos( Point& rPos, USHORT nTabStyle )
}
// -----------------------------------------------------------------------
-void lcl_RotateRect_Impl(Rectangle& rRect, const long nReference, BOOL bRightAligned)
+void lcl_RotateRect_Impl(Rectangle& rRect, const long nReference, sal_Bool bRightAligned)
{
if(!rRect.IsEmpty())
{
@@ -1015,13 +1015,13 @@ void lcl_RotateRect_Impl(Rectangle& rRect, const long nReference, BOOL bRightAli
// -----------------------------------------------------------------------
static void ImplDrawRulerTab( OutputDevice* pDevice,
- const Point& rPos, USHORT nStyle, WinBits nWinBits )
+ const Point& rPos, sal_uInt16 nStyle, WinBits nWinBits )
{
if ( nStyle & RULER_STYLE_INVISIBLE )
return;
- USHORT nTabStyle = nStyle & RULER_TAB_STYLE;
- BOOL bRTL = 0 != (nStyle & RULER_TAB_RTL);
+ sal_uInt16 nTabStyle = nStyle & RULER_TAB_STYLE;
+ sal_Bool bRTL = 0 != (nStyle & RULER_TAB_RTL);
Rectangle aRect1, aRect2, aRect3;
aRect3.SetEmpty();
if ( nTabStyle == RULER_TAB_DEFAULT )
@@ -1079,7 +1079,7 @@ static void ImplDrawRulerTab( OutputDevice* pDevice,
}
if( 0 == (nWinBits&WB_HORZ) )
{
- BOOL bRightAligned = 0 != (nWinBits&WB_RIGHT_ALIGNED);
+ sal_Bool bRightAligned = 0 != (nWinBits&WB_RIGHT_ALIGNED);
lcl_RotateRect_Impl(aRect1, rPos.Y(), bRightAligned);
lcl_RotateRect_Impl(aRect2, rPos.Y(), bRightAligned);
lcl_RotateRect_Impl(aRect3, rPos.Y(), bRightAligned);
@@ -1093,7 +1093,7 @@ static void ImplDrawRulerTab( OutputDevice* pDevice,
// -----------------------------------------------------------------------
-void Ruler::ImplDrawTab( OutputDevice* pDevice, const Point& rPos, USHORT nStyle )
+void Ruler::ImplDrawTab( OutputDevice* pDevice, const Point& rPos, sal_uInt16 nStyle )
{
if ( nStyle & RULER_STYLE_INVISIBLE )
return;
@@ -1113,7 +1113,7 @@ void Ruler::ImplDrawTab( OutputDevice* pDevice, const Point& rPos, USHORT nStyle
void Ruler::ImplDrawTabs( long nMin, long nMax, long nVirTop, long nVirBottom )
{
- for ( USHORT i = 0; i < mpData->nTabs; i++ )
+ for ( sal_uInt16 i = 0; i < mpData->nTabs; i++ )
{
if ( mpData->pTabs[i].nStyle & RULER_STYLE_INVISIBLE )
continue;
@@ -1129,8 +1129,8 @@ void Ruler::ImplDrawTabs( long nMin, long nMax, long nVirTop, long nVirBottom )
// -----------------------------------------------------------------------
-void Ruler::ImplInitSettings( BOOL bFont,
- BOOL bForeground, BOOL bBackground )
+void Ruler::ImplInitSettings( sal_Bool bFont,
+ sal_Bool bForeground, sal_Bool bBackground )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -1219,7 +1219,7 @@ void Ruler::ImplCalc()
mpData->nRulWidth = mnHeight-nRulWinOff;
}
- mbCalc = FALSE;
+ mbCalc = sal_False;
}
// -----------------------------------------------------------------------
@@ -1259,7 +1259,7 @@ void Ruler::ImplFormat()
return;
Size aVirDevSize;
- BOOL b3DLook = !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO);
+ sal_Bool b3DLook = !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO);
// VirtualDevice initialize
if ( mnWinStyle & WB_HORZ )
@@ -1273,7 +1273,7 @@ void Ruler::ImplFormat()
aVirDevSize.Width() = mnVirHeight;
}
if ( aVirDevSize != maVirDev.GetOutputSizePixel() )
- maVirDev.SetOutputSizePixel( aVirDevSize, TRUE );
+ maVirDev.SetOutputSizePixel( aVirDevSize, sal_True );
else
maVirDev.Erase();
@@ -1413,12 +1413,12 @@ void Ruler::ImplFormat()
ImplDrawArrows( nVirTop+((nVirBottom-nVirTop)/2) );
// Wir haben formatiert
- mbFormat = FALSE;
+ mbFormat = sal_False;
}
// -----------------------------------------------------------------------
-void Ruler::ImplInitExtraField( BOOL bUpdate )
+void Ruler::ImplInitExtraField( sal_Bool bUpdate )
{
// Extra-Field beruecksichtigen
if ( mnWinStyle & WB_EXTRAFIELD )
@@ -1448,8 +1448,8 @@ void Ruler::ImplInitExtraField( BOOL bUpdate )
if ( bUpdate )
{
- mbCalc = TRUE;
- mbFormat = TRUE;
+ mbCalc = sal_True;
+ mbFormat = sal_True;
Invalidate();
}
}
@@ -1487,17 +1487,17 @@ void Ruler::ImplDraw()
DrawOutDev( aOffPos, aVirDevSize, Point(), aVirDevSize, maVirDev );
// Positionslinien neu malen
- ImplInvertLines( TRUE );
+ ImplInvertLines( sal_True );
}
}
// -----------------------------------------------------------------------
-void Ruler::ImplDrawExtra( BOOL bPaint )
+void Ruler::ImplDrawExtra( sal_Bool bPaint )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
Rectangle aRect = maExtraRect;
- BOOL bEraseRect = FALSE;
+ sal_Bool bEraseRect = sal_False;
if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
{
@@ -1520,14 +1520,14 @@ void Ruler::ImplDrawExtra( BOOL bPaint )
SetFillColor( rStyleSettings.GetFaceColor() );
else
SetFillColor( rStyleSettings.GetWindowColor() );
- bEraseRect = TRUE;
+ bEraseRect = sal_True;
}
else
{
if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) && (mnExtraStyle & RULER_STYLE_HIGHLIGHT) )
{
SetFillColor( rStyleSettings.GetCheckedColor() );
- bEraseRect = TRUE;
+ bEraseRect = sal_True;
}
}
@@ -1551,7 +1551,7 @@ void Ruler::ImplDrawExtra( BOOL bPaint )
}
else if ( meExtraType == RULER_EXTRA_TAB )
{
- USHORT nTabStyle = mnExtraStyle & RULER_TAB_STYLE;
+ sal_uInt16 nTabStyle = mnExtraStyle & RULER_TAB_STYLE;
if(mpData->bTextRTL)
nTabStyle |= RULER_TAB_RTL;
Point aCenter = aRect.Center();
@@ -1578,7 +1578,7 @@ void Ruler::ImplDrawExtra( BOOL bPaint )
// -----------------------------------------------------------------------
-void Ruler::ImplUpdate( BOOL bMustCalc )
+void Ruler::ImplUpdate( sal_Bool bMustCalc )
{
// Hier schon Linien loeschen, damit Sie vor dem Neuberechnen schon
// geloscht sind, da danach die alten Positionen nicht mehr bestimmt
@@ -1588,8 +1588,8 @@ void Ruler::ImplUpdate( BOOL bMustCalc )
// Flags setzen
if ( bMustCalc )
- mbCalc = TRUE;
- mbFormat = TRUE;
+ mbCalc = sal_True;
+ mbFormat = sal_True;
// Wenn wir am Draggen sind, wird nach dem Drag-Handler automatisch
// das Lineal neu upgedatet
@@ -1607,11 +1607,11 @@ void Ruler::ImplUpdate( BOOL bMustCalc )
// -----------------------------------------------------------------------
-BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
- BOOL bRequireStyle, USHORT nRequiredStyle ) const
+sal_Bool Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
+ sal_Bool bRequireStyle, sal_uInt16 nRequiredStyle ) const
{
- USHORT i;
- USHORT nStyle;
+ sal_uInt16 i;
+ sal_uInt16 nStyle;
long nHitBottom;
long nX;
long nY;
@@ -1619,10 +1619,10 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
long n2;
if ( !mbActive )
- return FALSE;
+ return sal_False;
// Position ermitteln
- BOOL bIsHori = 0 != (mnWinStyle & WB_HORZ);
+ sal_Bool bIsHori = 0 != (mnWinStyle & WB_HORZ);
if ( bIsHori )
{
nX = rPos.X();
@@ -1638,8 +1638,8 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
// --> FME 2004-08-05 #i32608#
pHitTest->nAryPos = 0;
pHitTest->mnDragSize = 0;
- pHitTest->bSize = FALSE;
- pHitTest->bSizeBar = FALSE;
+ pHitTest->bSize = sal_False;
+ pHitTest->bSizeBar = sal_False;
// <--
// Damit ueberstehende Tabs und Einzuege mit beruecksichtigt werden
@@ -1657,7 +1657,7 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
{
pHitTest->nPos = 0;
pHitTest->eType = RULER_TYPE_OUTSIDE;
- return FALSE;
+ return sal_False;
}
nX -= mpData->nNullVirOff;
@@ -1703,7 +1703,7 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
{
pHitTest->eType = RULER_TYPE_TAB;
pHitTest->nAryPos = i-1;
- return TRUE;
+ return sal_True;
}
}
}
@@ -1744,7 +1744,7 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
{
pHitTest->eType = RULER_TYPE_INDENT;
pHitTest->nAryPos = i-1;
- return TRUE;
+ return sal_True;
}
}
}
@@ -1755,7 +1755,7 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
{
pHitTest->nPos = 0;
pHitTest->eType = RULER_TYPE_OUTSIDE;
- return FALSE;
+ return sal_False;
}
// Danach die Spalten testen
@@ -1790,7 +1790,7 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
{
if ( nStyle & RULER_BORDER_MOVEABLE )
{
- pHitTest->bSizeBar = TRUE;
+ pHitTest->bSizeBar = sal_True;
pHitTest->mnDragSize = RULER_DRAGSIZE_MOVE;
}
}
@@ -1810,25 +1810,25 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
if ( nX <= n1+nMOff )
{
- pHitTest->bSize = TRUE;
+ pHitTest->bSize = sal_True;
pHitTest->mnDragSize = RULER_DRAGSIZE_1;
}
else if ( nX >= n2-nMOff )
{
- pHitTest->bSize = TRUE;
+ pHitTest->bSize = sal_True;
pHitTest->mnDragSize = RULER_DRAGSIZE_2;
}
else
{
if ( nStyle & RULER_BORDER_MOVEABLE )
{
- pHitTest->bSizeBar = TRUE;
+ pHitTest->bSizeBar = sal_True;
pHitTest->mnDragSize = RULER_DRAGSIZE_MOVE;
}
}
}
- return TRUE;
+ return sal_True;
}
}
}
@@ -1842,8 +1842,8 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
if ( (nX >= n1 - nMarginTolerance) && (nX <= n1 + nMarginTolerance) )
{
pHitTest->eType = RULER_TYPE_MARGIN1;
- pHitTest->bSize = TRUE;
- return TRUE;
+ pHitTest->bSize = sal_True;
+ return sal_True;
}
}
if ( (mpData->nMargin2Style & (RULER_MARGIN_SIZEABLE | RULER_STYLE_INVISIBLE)) == RULER_MARGIN_SIZEABLE )
@@ -1852,8 +1852,8 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
if ( (nX >= n1 - nMarginTolerance) && (nX <= n1 + nMarginTolerance) )
{
pHitTest->eType = RULER_TYPE_MARGIN2;
- pHitTest->bSize = TRUE;
- return TRUE;
+ pHitTest->bSize = sal_True;
+ return sal_True;
}
}
@@ -1898,28 +1898,28 @@ BOOL Ruler::ImplHitTest( const Point& rPos, ImplRulerHitTest* pHitTest,
{
pHitTest->eType = RULER_TYPE_TAB;
pHitTest->nAryPos = i-1;
- return TRUE;
+ return sal_True;
}
}
}
}
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL Ruler::ImplDocHitTest( const Point& rPos, RulerType eDragType,
+sal_Bool Ruler::ImplDocHitTest( const Point& rPos, RulerType eDragType,
ImplRulerHitTest* pHitTest ) const
{
Point aPos = rPos;
- BOOL bRequiredStyle = FALSE;
- USHORT nRequiredStyle = 0;
+ sal_Bool bRequiredStyle = sal_False;
+ sal_uInt16 nRequiredStyle = 0;
if (eDragType == RULER_TYPE_INDENT)
{
- bRequiredStyle = TRUE;
+ bRequiredStyle = sal_True;
nRequiredStyle = RULER_INDENT_BOTTOM;
}
@@ -1939,7 +1939,7 @@ BOOL Ruler::ImplDocHitTest( const Point& rPos, RulerType eDragType,
if ( ImplHitTest( aPos, pHitTest, bRequiredStyle, nRequiredStyle ) )
{
if ( (pHitTest->eType == eDragType) || (eDragType == RULER_TYPE_DONTKNOW) )
- return TRUE;
+ return sal_True;
}
}
@@ -1955,7 +1955,7 @@ BOOL Ruler::ImplDocHitTest( const Point& rPos, RulerType eDragType,
if ( ImplHitTest( aPos, pHitTest, bRequiredStyle, nRequiredStyle ) )
{
if ( (pHitTest->eType == eDragType) || (eDragType == RULER_TYPE_DONTKNOW) )
- return TRUE;
+ return sal_True;
}
}
@@ -1971,25 +1971,25 @@ BOOL Ruler::ImplDocHitTest( const Point& rPos, RulerType eDragType,
if ( ImplHitTest( aPos, pHitTest ) )
{
if ( (pHitTest->eType == eDragType) || (eDragType == RULER_TYPE_DONTKNOW) )
- return TRUE;
+ return sal_True;
}
}
// Auf DontKnow setzen
pHitTest->eType = RULER_TYPE_DONTKNOW;
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL Ruler::ImplStartDrag( ImplRulerHitTest* pHitTest, USHORT nModifier )
+sal_Bool Ruler::ImplStartDrag( ImplRulerHitTest* pHitTest, sal_uInt16 nModifier )
{
// Wenn eine Spalte angeklick wurde, die weder verschiebar noch
// in der Groesse aenderbar ist, brauchen wir auch kein Drag ausloesen
if ( (pHitTest->eType == RULER_TYPE_BORDER) &&
!pHitTest->bSize && !pHitTest->bSizeBar )
- return FALSE;
+ return sal_False;
// Dragdaten setzen
meDragType = pHitTest->eType;
@@ -2006,10 +2006,10 @@ BOOL Ruler::ImplStartDrag( ImplRulerHitTest* pHitTest, USHORT nModifier )
// Wenn der Handler das Draggen erlaubt, dann das Draggen
// initialisieren
ImplInvertLines();
- mbDrag = TRUE;
+ mbDrag = sal_True;
mnStartDragPos = mnDragPos;
StartTracking();
- return TRUE;
+ return sal_True;
}
else
{
@@ -2022,7 +2022,7 @@ BOOL Ruler::ImplStartDrag( ImplRulerHitTest* pHitTest, USHORT nModifier )
mpData = mpSaveData;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -2061,18 +2061,18 @@ void Ruler::ImplDrag( const Point& rPos )
nX -= mpData->nNullVirOff;
// Wenn oberhalb oder links vom Lineal, dann alte Werte
- mbDragDelete = FALSE;
+ mbDragDelete = sal_False;
if ( nY < 0 )
{
if ( !mbDragCanceled )
{
// Daten wiederherstellen
- mbDragCanceled = TRUE;
+ mbDragCanceled = sal_True;
ImplRulerData aTempData;
aTempData = *mpDragData;
*mpDragData = *mpSaveData;
- mbCalc = TRUE;
- mbFormat = TRUE;
+ mbCalc = sal_True;
+ mbFormat = sal_True;
// Handler rufen
mnDragPos = mnStartDragPos;
@@ -2093,11 +2093,11 @@ void Ruler::ImplDrag( const Point& rPos )
}
else
{
- mbDragCanceled = FALSE;
+ mbDragCanceled = sal_False;
// +2, damit nicht so schnell die Tabs geloescht werden
if ( nY > nOutHeight+2 )
- mbDragDelete = TRUE;
+ mbDragDelete = sal_True;
mnDragPos = nX;
@@ -2122,7 +2122,7 @@ void Ruler::ImplEndDrag()
else
*mpSaveData = *mpDragData;
mpData = mpSaveData;
- mbDrag = FALSE;
+ mbDrag = sal_False;
// Handler rufen
EndDrag();
@@ -2132,8 +2132,8 @@ void Ruler::ImplEndDrag()
mnDragPos = 0;
mnDragAryPos = 0;
mnDragSize = 0;
- mbDragCanceled = FALSE;
- mbDragDelete = FALSE;
+ mbDragCanceled = sal_False;
+ mbDragDelete = sal_False;
mnDragModifier = 0;
mnDragScroll = 0;
mnStartDragPos = 0;
@@ -2170,8 +2170,8 @@ void Ruler::MouseButtonDown( const MouseEvent& rMEvt )
if ( rMEvt.IsLeft() && !IsTracking() )
{
Point aMousePos = rMEvt.GetPosPixel();
- USHORT nMouseClicks = rMEvt.GetClicks();
- USHORT nMouseModifier = rMEvt.GetModifier();
+ sal_uInt16 nMouseClicks = rMEvt.GetClicks();
+ sal_uInt16 nMouseModifier = rMEvt.GetModifier();
// Gegebenenfalls Lineal updaten (damit mit den richtigen Daten
// gearbeitet wird und die Anzeige auch zur Bearbeitung passt)
@@ -2277,8 +2277,8 @@ void Ruler::Tracking( const TrackingEvent& rTEvt )
// Bei Abbruch, den alten Status wieder herstellen
if ( rTEvt.IsTrackingCanceled() )
{
- mbDragCanceled = TRUE;
- mbFormat = TRUE;
+ mbDragCanceled = sal_True;
+ mbFormat = sal_True;
}
ImplEndDrag();
@@ -2327,7 +2327,7 @@ void Ruler::Paint( const Rectangle& )
}
// Imhalt vom Extrafeld ausgeben
- ImplDrawExtra( TRUE );
+ ImplDrawExtra( sal_True );
}
if ( mnWinStyle & WB_BORDER )
@@ -2392,7 +2392,7 @@ void Ruler::Resize()
}
// Hier schon Linien loeschen
- BOOL bVisible = IsReallyVisible();
+ sal_Bool bVisible = IsReallyVisible();
if ( bVisible && mpData->nLines )
{
ImplInvertLines();
@@ -2400,7 +2400,7 @@ void Ruler::Resize()
if ( !mnUpdateEvtId )
mnUpdateEvtId = Application::PostUserEvent( LINK( this, Ruler, ImplUpdateHdl ), NULL );
}
- mbFormat = TRUE;
+ mbFormat = sal_True;
// Wenn sich die Hoehe bzw. Breite aendert, dann muessen besimmte Werte
// neu berechnet werden
@@ -2408,15 +2408,15 @@ void Ruler::Resize()
ImplInitExtraField( mpData->bTextRTL );
if ( nNewHeight )
{
- mbCalc = TRUE;
+ mbCalc = sal_True;
mnVirHeight = nNewHeight - mnBorderWidth - (RULER_OFF*2);
}
else
{
if ( mpData->bAutoPageWidth )
- ImplUpdate( TRUE );
+ ImplUpdate( sal_True );
else if ( mbAutoWinWidth )
- mbCalc = TRUE;
+ mbCalc = sal_True;
}
// Wenn Ruler eine Groesse hat, dann Groesse vom VirtualDevice setzen
@@ -2490,17 +2490,17 @@ void Ruler::StateChanged( StateChangedType nType )
else if ( (nType == STATE_CHANGE_ZOOM) ||
(nType == STATE_CHANGE_CONTROLFONT) )
{
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
{
- ImplInitSettings( FALSE, TRUE, FALSE );
+ ImplInitSettings( sal_False, sal_True, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
{
- ImplInitSettings( FALSE, FALSE, TRUE );
+ ImplInitSettings( sal_False, sal_False, sal_True );
Invalidate();
}
}
@@ -2517,8 +2517,8 @@ void Ruler::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
{
- mbFormat = TRUE;
- ImplInitSettings( TRUE, TRUE, TRUE );
+ mbFormat = sal_True;
+ ImplInitSettings( sal_True, sal_True, sal_True );
Invalidate();
}
}
@@ -2530,7 +2530,7 @@ long Ruler::StartDrag()
if ( maStartDragHdl.IsSet() )
return maStartDragHdl.Call( this );
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -2572,9 +2572,9 @@ void Ruler::ExtraDown()
void Ruler::Activate()
{
- mbActive = TRUE;
+ mbActive = sal_True;
- // Positionslinien wieder anzeigen (erst hinter mbActive=TRUE rufen, da
+ // Positionslinien wieder anzeigen (erst hinter mbActive=sal_True rufen, da
// von ImplInvertLines() ausgewertet wird). Das Zeichnen der Linien
// wird verzoegert, damit im vermutlich noch nicht gepainteten Zustand
// Linien gezeichnet werden.
@@ -2587,25 +2587,25 @@ void Ruler::Activate()
void Ruler::Deactivate()
{
- // Positionslinien loeschen (schon vor mbActive=FALSE rufen, da
+ // Positionslinien loeschen (schon vor mbActive=sal_False rufen, da
// von ImplInvertLines() ausgewertet wird)
ImplInvertLines();
- mbActive = FALSE;
+ mbActive = sal_False;
}
// -----------------------------------------------------------------------
-BOOL Ruler::StartDocDrag( const MouseEvent& rMEvt, RulerType eDragType )
+sal_Bool Ruler::StartDocDrag( const MouseEvent& rMEvt, RulerType eDragType )
{
if ( !mbDrag )
{
Point aMousePos = rMEvt.GetPosPixel();
- USHORT nMouseClicks = rMEvt.GetClicks();
- USHORT nMouseModifier = rMEvt.GetModifier();
+ sal_uInt16 nMouseClicks = rMEvt.GetClicks();
+ sal_uInt16 nMouseModifier = rMEvt.GetModifier();
ImplRulerHitTest aHitTest;
if(eDragType != RULER_TYPE_DONTKNOW)
- aHitTest.bExpandTest = TRUE;
+ aHitTest.bExpandTest = sal_True;
// Gegebenenfalls Lineal updaten (damit mit den richtigen Daten
// gearbeitet wird und die Anzeige auch zur Bearbeitung passt)
@@ -2654,17 +2654,17 @@ BOOL Ruler::StartDocDrag( const MouseEvent& rMEvt, RulerType eDragType )
mnDragPos = 0;
mnDragAryPos = 0;
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
RulerType Ruler::GetDocType( const Point& rPos, RulerType eDragType,
- USHORT* pAryPos ) const
+ sal_uInt16* pAryPos ) const
{
ImplRulerHitTest aHitTest;
@@ -2698,7 +2698,7 @@ void Ruler::CancelDrag()
// -----------------------------------------------------------------------
-RulerType Ruler::GetType( const Point& rPos, USHORT* pAryPos ) const
+RulerType Ruler::GetType( const Point& rPos, sal_uInt16* pAryPos ) const
{
ImplRulerHitTest aHitTest;
@@ -2725,14 +2725,14 @@ void Ruler::SetWinPos( long nNewOff, long nNewWidth )
{
// Gegebenenfalls werden die Breiten automatisch berechnet
if ( !nNewWidth )
- mbAutoWinWidth = TRUE;
+ mbAutoWinWidth = sal_True;
else
- mbAutoWinWidth = FALSE;
+ mbAutoWinWidth = sal_False;
// Werte setzen (werden in ImplFormat gegebenenfalls mitberechnet)
mnWinOff = nNewOff;
mnWinWidth = nNewWidth;
- ImplUpdate( TRUE );
+ ImplUpdate( sal_True );
}
// -----------------------------------------------------------------------
@@ -2745,14 +2745,14 @@ void Ruler::SetPagePos( long nNewOff, long nNewWidth )
// Gegebenenfalls werden die Breiten automatisch berechnet
if ( !nNewWidth )
- mpData->bAutoPageWidth = TRUE;
+ mpData->bAutoPageWidth = sal_True;
else
- mpData->bAutoPageWidth = FALSE;
+ mpData->bAutoPageWidth = sal_False;
// Werte setzen (werden in ImplFormat gegebenenfalls mitberechnet)
mpData->nPageOff = nNewOff;
mpData->nPageWidth = nNewWidth;
- ImplUpdate( TRUE );
+ ImplUpdate( sal_True );
}
// -----------------------------------------------------------------------
@@ -2836,14 +2836,14 @@ void Ruler::SetZoom( const Fraction& rNewZoom )
// -----------------------------------------------------------------------
-void Ruler::SetExtraType( RulerExtra eNewExtraType, USHORT nStyle )
+void Ruler::SetExtraType( RulerExtra eNewExtraType, sal_uInt16 nStyle )
{
if ( mnWinStyle & WB_EXTRAFIELD )
{
meExtraType = eNewExtraType;
mnExtraStyle = nStyle;
if ( IsReallyVisible() && IsUpdateMode() )
- ImplDrawExtra( FALSE );
+ ImplDrawExtra( sal_False );
}
}
@@ -2860,7 +2860,7 @@ void Ruler::SetNullOffset( long nPos )
// -----------------------------------------------------------------------
-void Ruler::SetMargin1( long nPos, USHORT nMarginStyle )
+void Ruler::SetMargin1( long nPos, sal_uInt16 nMarginStyle )
{
if ( (mpData->nMargin1 != nPos) || (mpData->nMargin1Style != nMarginStyle) )
{
@@ -2872,7 +2872,7 @@ void Ruler::SetMargin1( long nPos, USHORT nMarginStyle )
// -----------------------------------------------------------------------
-void Ruler::SetMargin2( long nPos, USHORT nMarginStyle )
+void Ruler::SetMargin2( long nPos, sal_uInt16 nMarginStyle )
{
DBG_ASSERT( (nPos >= mpData->nMargin1) ||
(mpData->nMargin1Style & RULER_STYLE_INVISIBLE) ||
@@ -2889,12 +2889,12 @@ void Ruler::SetMargin2( long nPos, USHORT nMarginStyle )
// -----------------------------------------------------------------------
-void Ruler::SetLines( USHORT n, const RulerLine* pLineAry )
+void Ruler::SetLines( sal_uInt16 n, const RulerLine* pLineAry )
{
// To determine if what has changed
if ( mpData->nLines == n )
{
- USHORT i = n;
+ sal_uInt16 i = n;
const RulerLine* pAry1 = mpData->pLines;
const RulerLine* pAry2 = pLineAry;
while ( i )
@@ -2911,11 +2911,11 @@ void Ruler::SetLines( USHORT n, const RulerLine* pLineAry )
}
// New values and new share issue
- BOOL bMustUpdate;
+ sal_Bool bMustUpdate;
if ( IsReallyVisible() && IsUpdateMode() )
- bMustUpdate = TRUE;
+ bMustUpdate = sal_True;
else
- bMustUpdate = FALSE;
+ bMustUpdate = sal_False;
// Delete old lines
if ( bMustUpdate )
@@ -2949,7 +2949,7 @@ void Ruler::SetLines( USHORT n, const RulerLine* pLineAry )
// -----------------------------------------------------------------------
-void Ruler::SetArrows( USHORT n, const RulerArrow* pArrowAry )
+void Ruler::SetArrows( sal_uInt16 n, const RulerArrow* pArrowAry )
{
if ( !n || !pArrowAry )
{
@@ -2969,7 +2969,7 @@ void Ruler::SetArrows( USHORT n, const RulerArrow* pArrowAry )
}
else
{
- USHORT i = n;
+ sal_uInt16 i = n;
const RulerArrow* pAry1 = mpData->pArrows;
const RulerArrow* pAry2 = pArrowAry;
while ( i )
@@ -2995,7 +2995,7 @@ void Ruler::SetArrows( USHORT n, const RulerArrow* pArrowAry )
// -----------------------------------------------------------------------
-void Ruler::SetBorders( USHORT n, const RulerBorder* pBrdAry )
+void Ruler::SetBorders( sal_uInt16 n, const RulerBorder* pBrdAry )
{
if ( !n || !pBrdAry )
{
@@ -3015,7 +3015,7 @@ void Ruler::SetBorders( USHORT n, const RulerBorder* pBrdAry )
}
else
{
- USHORT i = n;
+ sal_uInt16 i = n;
const RulerBorder* pAry1 = mpData->pBorders;
const RulerBorder* pAry2 = pBrdAry;
while ( i )
@@ -3040,7 +3040,7 @@ void Ruler::SetBorders( USHORT n, const RulerBorder* pBrdAry )
// -----------------------------------------------------------------------
-void Ruler::SetIndents( USHORT n, const RulerIndent* pIndentAry )
+void Ruler::SetIndents( sal_uInt16 n, const RulerIndent* pIndentAry )
{
if ( !n || !pIndentAry )
@@ -3061,7 +3061,7 @@ void Ruler::SetIndents( USHORT n, const RulerIndent* pIndentAry )
}
else
{
- USHORT i = n;
+ sal_uInt16 i = n;
const RulerIndent* pAry1 = mpData->pIndents;
const RulerIndent* pAry2 = pIndentAry;
while ( i )
@@ -3085,7 +3085,7 @@ void Ruler::SetIndents( USHORT n, const RulerIndent* pIndentAry )
// -----------------------------------------------------------------------
-void Ruler::SetTabs( USHORT n, const RulerTab* pTabAry )
+void Ruler::SetTabs( sal_uInt16 n, const RulerTab* pTabAry )
{
if ( !n || !pTabAry )
{
@@ -3105,7 +3105,7 @@ void Ruler::SetTabs( USHORT n, const RulerTab* pTabAry )
}
else
{
- USHORT i = n;
+ sal_uInt16 i = n;
const RulerTab* pAry1 = mpData->pTabs;
const RulerTab* pAry2 = pTabAry;
while ( i )
@@ -3134,17 +3134,17 @@ void Ruler::SetStyle( WinBits nStyle )
if ( mnWinStyle != nStyle )
{
mnWinStyle = nStyle;
- ImplInitExtraField( TRUE );
+ ImplInitExtraField( sal_True );
}
}
// -----------------------------------------------------------------------
-void Ruler::DrawTab( OutputDevice* pDevice, const Point& rPos, USHORT nStyle )
+void Ruler::DrawTab( OutputDevice* pDevice, const Point& rPos, sal_uInt16 nStyle )
{
/*const StyleSettings& rStyleSettings =*/ pDevice->GetSettings().GetStyleSettings();
Point aPos( rPos );
- USHORT nTabStyle = nStyle & (RULER_TAB_STYLE | RULER_TAB_RTL);
+ sal_uInt16 nTabStyle = nStyle & (RULER_TAB_STYLE | RULER_TAB_RTL);
pDevice->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
pDevice->SetLineColor();
@@ -3156,13 +3156,13 @@ void Ruler::DrawTab( OutputDevice* pDevice, const Point& rPos, USHORT nStyle )
/* -----------------16.10.2002 15:17-----------------
*
* --------------------------------------------------*/
-void Ruler::SetTextRTL(BOOL bRTL)
+void Ruler::SetTextRTL(sal_Bool bRTL)
{
if(mpData->bTextRTL != bRTL)
{
mpData->bTextRTL = bRTL;
if ( IsReallyVisible() && IsUpdateMode() )
- ImplInitExtraField( TRUE );
+ ImplInitExtraField( sal_True );
}
}
@@ -3170,15 +3170,15 @@ long Ruler::GetPageOffset() const { return mpData->nPageOff; }
long Ruler::GetPageWidth() const { return mpData->nPageWidth; }
long Ruler::GetNullOffset() const { return mpData->nNullOff; }
long Ruler::GetMargin1() const { return mpData->nMargin1; }
-USHORT Ruler::GetMargin1Style() const { return mpData->nMargin1Style; }
+sal_uInt16 Ruler::GetMargin1Style() const { return mpData->nMargin1Style; }
long Ruler::GetMargin2() const { return mpData->nMargin2; }
-USHORT Ruler::GetMargin2Style() const { return mpData->nMargin2Style; }
-USHORT Ruler::GetLineCount() const { return mpData->nLines; }
+sal_uInt16 Ruler::GetMargin2Style() const { return mpData->nMargin2Style; }
+sal_uInt16 Ruler::GetLineCount() const { return mpData->nLines; }
const RulerLine* Ruler::GetLines() const { return mpData->pLines; }
-USHORT Ruler::GetArrowCount() const { return mpData->nArrows; }
+sal_uInt16 Ruler::GetArrowCount() const { return mpData->nArrows; }
const RulerArrow* Ruler::GetArrows() const { return mpData->pArrows; }
-USHORT Ruler::GetBorderCount() const { return mpData->nBorders; }
+sal_uInt16 Ruler::GetBorderCount() const { return mpData->nBorders; }
const RulerBorder* Ruler::GetBorders() const { return mpData->pBorders; }
-USHORT Ruler::GetIndentCount() const { return mpData->nIndents; }
+sal_uInt16 Ruler::GetIndentCount() const { return mpData->nIndents; }
const RulerIndent* Ruler::GetIndents() const { return mpData->pIndents; }
diff --git a/svtools/source/control/scriptedtext.cxx b/svtools/source/control/scriptedtext.cxx
index 191dedfabe98..7e657ba56ce8 100755
--- a/svtools/source/control/scriptedtext.cxx
+++ b/svtools/source/control/scriptedtext.cxx
@@ -233,7 +233,7 @@ void SvtScriptedTextHelper_Impl::CalculateBreaks( const uno::Reference< i18n::XB
nScript = i18n::ScriptType::LATIN;
while( (nScript != i18n::ScriptType::WEAK) && (nCharIx == nNextCharIx) )
{
- nNextCharIx = mrOutDevice.HasGlyphs( GetFont( nScript ), maText, sal::static_int_cast< USHORT >(nCharIx), sal::static_int_cast< USHORT >(nNextPos - nCharIx) );
+ nNextCharIx = mrOutDevice.HasGlyphs( GetFont( nScript ), maText, sal::static_int_cast< sal_uInt16 >(nCharIx), sal::static_int_cast< sal_uInt16 >(nNextPos - nCharIx) );
if( nCharIx == nNextCharIx )
++nScript;
}
diff --git a/svtools/source/control/scrwin.cxx b/svtools/source/control/scrwin.cxx
index 364c938f3f65..ab4946a8400b 100755
--- a/svtools/source/control/scrwin.cxx
+++ b/svtools/source/control/scrwin.cxx
@@ -35,10 +35,10 @@
void ScrollableWindow::ImpInitialize( ScrollableWindowFlags nFlags )
{
- bHandleDragging = (BOOL) ( nFlags & SCRWIN_THUMBDRAGGING );
+ bHandleDragging = (sal_Bool) ( nFlags & SCRWIN_THUMBDRAGGING );
bVCenter = (nFlags & SCRWIN_VCENTER) == SCRWIN_VCENTER;
bHCenter = (nFlags & SCRWIN_HCENTER) == SCRWIN_HCENTER;
- bScrolling = FALSE;
+ bScrolling = sal_False;
// set the handlers for the scrollbars
aVScroll.SetScrollHdl( LINK(this, ScrollableWindow, ScrollHdl) );
@@ -139,7 +139,7 @@ IMPL_LINK( ScrollableWindow, EndScrollHdl, ScrollBar *, pScroll )
{
// notify the start of scrolling, if not already scrolling
if ( !bScrolling )
- StartScroll(), bScrolling = TRUE;
+ StartScroll(), bScrolling = sal_True;
// get the delta in logic coordinates
Size aDelta( PixelToLogic( Size( aHScroll.GetDelta(), aVScroll.GetDelta() ) ) );
@@ -154,7 +154,7 @@ IMPL_LINK( ScrollableWindow, EndScrollHdl, ScrollBar *, pScroll )
}
// notify the end of scrolling
- bScrolling = FALSE;
+ bScrolling = sal_False;
EndScroll( aDelta.Width(), aDelta.Height() );
return 0;
}
@@ -165,7 +165,7 @@ IMPL_LINK( ScrollableWindow, ScrollHdl, ScrollBar *, pScroll )
{
// notify the start of scrolling, if not already scrolling
if ( !bScrolling )
- StartScroll(), bScrolling = TRUE;
+ StartScroll(), bScrolling = sal_True;
if ( bHandleDragging )
{
@@ -189,25 +189,25 @@ void __EXPORT ScrollableWindow::Resize()
// determine the size of the output-area and if we need scrollbars
const long nScrSize = GetSettings().GetStyleSettings().GetScrollBarSize();
- BOOL bVVisible = FALSE; // by default no vertical-ScrollBar
- BOOL bHVisible = FALSE; // by default no horizontal-ScrollBar
- BOOL bChanged; // determines if a visiblility was changed
+ sal_Bool bVVisible = sal_False; // by default no vertical-ScrollBar
+ sal_Bool bHVisible = sal_False; // by default no horizontal-ScrollBar
+ sal_Bool bChanged; // determines if a visiblility was changed
do
{
- bChanged = FALSE;
+ bChanged = sal_False;
// does we need a vertical ScrollBar
if ( aOutPixSz.Width() < aTotPixSz.Width() && !bHVisible )
- { bHVisible = TRUE;
+ { bHVisible = sal_True;
aOutPixSz.Height() -= nScrSize;
- bChanged = TRUE;
+ bChanged = sal_True;
}
// does we need a horizontal ScrollBar
if ( aOutPixSz.Height() < aTotPixSz.Height() && !bVVisible )
- { bVVisible = TRUE;
+ { bVVisible = sal_True;
aOutPixSz.Width() -= nScrSize;
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
@@ -355,10 +355,10 @@ void ScrollableWindow::SetVisibleSize( const Size& rNewSize )
Window::GetOutputSizePixel().Height());
Size aWill( aWish.GetIntersection(aMax).GetSize() );
- BOOL bHScroll = FALSE;
+ sal_Bool bHScroll = sal_False;
const long nScrSize = GetSettings().GetStyleSettings().GetScrollBarSize();
if ( aWill.Width() < aWish.GetSize().Width() )
- { bHScroll = TRUE;
+ { bHScroll = sal_True;
aWill.Height() =
Min( aWill.Height()+nScrSize, aMax.GetSize().Height() );
}
@@ -373,7 +373,7 @@ void ScrollableWindow::SetVisibleSize( const Size& rNewSize )
//-------------------------------------------------------------------
-BOOL ScrollableWindow::MakeVisible( const Rectangle& rTarget, BOOL bSloppy )
+sal_Bool ScrollableWindow::MakeVisible( const Rectangle& rTarget, sal_Bool bSloppy )
{
Rectangle aTarget;
Rectangle aTotRect( Point(0, 0), PixelToLogic( aTotPixSz ) );
@@ -436,7 +436,7 @@ BOOL ScrollableWindow::MakeVisible( const Rectangle& rTarget, BOOL bSloppy )
// is the area already visible?
Rectangle aVisArea( GetVisibleArea() );
if ( aVisArea.IsInside(rTarget) )
- return TRUE;
+ return sal_True;
// is there somewhat to scroll?
if ( aVisArea.TopLeft() != aTarget.TopLeft() )
@@ -465,7 +465,7 @@ Rectangle ScrollableWindow::GetVisibleArea() const
//-------------------------------------------------------------------
-void ScrollableWindow::SetLineSize( ULONG nHorz, ULONG nVert )
+void ScrollableWindow::SetLineSize( sal_uLong nHorz, sal_uLong nVert )
{
Size aPixSz( LogicToPixel( Size(nHorz, nVert) ) );
nColumnPixW = aPixSz.Width();
@@ -476,7 +476,7 @@ void ScrollableWindow::SetLineSize( ULONG nHorz, ULONG nVert )
//-------------------------------------------------------------------
-void ScrollableWindow::Scroll( long nDeltaX, long nDeltaY, USHORT )
+void ScrollableWindow::Scroll( long nDeltaX, long nDeltaY, sal_uInt16 )
{
if ( !bScrolling )
StartScroll();
@@ -561,8 +561,8 @@ void ScrollableWindow::ScrollLines( long nLinesX, long nLinesY )
//-------------------------------------------------------------------
-void ScrollableWindow::ScrollPages( long nPagesX, ULONG nOverlapX,
- long nPagesY, ULONG nOverlapY )
+void ScrollableWindow::ScrollPages( long nPagesX, sal_uLong nOverlapX,
+ long nPagesY, sal_uLong nOverlapY )
{
Size aOutSz( GetVisibleArea().GetSize() );
Scroll( nPagesX * aOutSz.Width() + (nPagesX>0 ? 1 : -1) * nOverlapX,
diff --git a/svtools/source/control/stdctrl.cxx b/svtools/source/control/stdctrl.cxx
index 14c8cade3092..fb42b42dc7f3 100644..100755
--- a/svtools/source/control/stdctrl.cxx
+++ b/svtools/source/control/stdctrl.cxx
@@ -80,7 +80,7 @@ namespace svt
// make it transparent
SetControlBackground();
SetBackground();
- SetPaintTransparent( TRUE );
+ SetPaintTransparent( sal_True );
}
// -----------------------------------------------------------------------
diff --git a/svtools/source/control/stdmenu.cxx b/svtools/source/control/stdmenu.cxx
index 9df32d74fc59..94c15a8604d2 100755
--- a/svtools/source/control/stdmenu.cxx
+++ b/svtools/source/control/stdmenu.cxx
@@ -76,13 +76,13 @@ void FontNameMenu::Fill( const FontList* pList )
const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper();
// more than 100 fonts reduces the speed of opening the menu.
// So only the first 100 fonts will be displayed.
- USHORT nFontCount = ::std::min( pList->GetFontNameCount(), static_cast< USHORT >(100) );
- for ( USHORT i = 0; i < nFontCount; i++ )
+ sal_uInt16 nFontCount = ::std::min( pList->GetFontNameCount(), static_cast< sal_uInt16 >(100) );
+ for ( sal_uInt16 i = 0; i < nFontCount; i++ )
{
const XubString& rName = pList->GetFontName( i ).GetName();
// sort with the I18nHelper
- USHORT j = GetItemCount();
+ sal_uInt16 j = GetItemCount();
while ( j )
{
XubString aText = GetItemText( GetItemId( j-1 ) );
@@ -103,11 +103,11 @@ void FontNameMenu::SetCurName( const XubString& rName )
maCurName = rName;
// Menueintrag checken
- USHORT nChecked = 0;
- USHORT nItemCount = GetItemCount();
- for( USHORT i = 0; i < nItemCount; i++ )
+ sal_uInt16 nChecked = 0;
+ sal_uInt16 nItemCount = GetItemCount();
+ for( sal_uInt16 i = 0; i < nItemCount; i++ )
{
- USHORT nItemId = GetItemId( i );
+ sal_uInt16 nItemId = GetItemId( i );
if ( IsItemChecked( nItemId ) )
nChecked = nItemId;
@@ -115,13 +115,13 @@ void FontNameMenu::SetCurName( const XubString& rName )
XubString aText = GetItemText( nItemId );
if ( aText == maCurName )
{
- CheckItem( nItemId, TRUE );
+ CheckItem( nItemId, sal_True );
return;
}
}
if ( nChecked )
- CheckItem( nChecked, FALSE );
+ CheckItem( nChecked, sal_False );
}
// ========================================================================
@@ -141,7 +141,7 @@ FontStyleMenu::~FontStyleMenu()
void FontStyleMenu::Select()
{
- USHORT nCurId = GetCurItemId();
+ sal_uInt16 nCurId = GetCurItemId();
if ( (nCurId >= FONTSTYLEMENU_FIRSTID) && (nCurId <= FONTSTYLEMENU_LASTID) )
{
@@ -156,7 +156,7 @@ void FontStyleMenu::Select()
void FontStyleMenu::Highlight()
{
- USHORT nCurId = GetCurItemId();
+ sal_uInt16 nCurId = GetCurItemId();
if ( (nCurId >= FONTSTYLEMENU_FIRSTID) && (nCurId <= FONTSTYLEMENU_LASTID) )
{
@@ -171,22 +171,22 @@ void FontStyleMenu::Highlight()
// -----------------------------------------------------------------------
-BOOL FontStyleMenu::ImplIsAlreadyInserted( const XubString& rStyleName, USHORT nCount )
+sal_Bool FontStyleMenu::ImplIsAlreadyInserted( const XubString& rStyleName, sal_uInt16 nCount )
{
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
if ( GetItemText( i+FONTSTYLEMENU_FIRSTID ) == rStyleName )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
void FontStyleMenu::Fill( const XubString& rName, const FontList* pList )
{
- USHORT nItemId = GetItemId( 0 );
+ sal_uInt16 nItemId = GetItemId( 0 );
while ( (nItemId >= FONTSTYLEMENU_FIRSTID) &&
(nItemId <= FONTSTYLEMENU_LASTID) )
{
@@ -199,16 +199,16 @@ void FontStyleMenu::Fill( const XubString& rName, const FontList* pList )
if ( hFontInfo )
{
XubString aStyleText;
- USHORT nPos = 0;
- USHORT nId = FONTSTYLEMENU_FIRSTID;
+ sal_uInt16 nPos = 0;
+ sal_uInt16 nId = FONTSTYLEMENU_FIRSTID;
FontWeight eLastWeight = WEIGHT_DONTKNOW;
FontItalic eLastItalic = ITALIC_NONE;
FontWidth eLastWidth = WIDTH_DONTKNOW;
- BOOL bNormal = FALSE;
- BOOL bItalic = FALSE;
- BOOL bBold = FALSE;
- BOOL bBoldItalic = FALSE;
- BOOL bInsert = FALSE;
+ sal_Bool bNormal = sal_False;
+ sal_Bool bItalic = sal_False;
+ sal_Bool bBold = sal_False;
+ sal_Bool bBoldItalic = sal_False;
+ sal_Bool bInsert = sal_False;
FontInfo aInfo;
while ( hFontInfo )
{
@@ -233,16 +233,16 @@ void FontStyleMenu::Fill( const XubString& rName, const FontList* pList )
if ( eWeight <= WEIGHT_NORMAL )
{
if ( eItalic != ITALIC_NONE )
- bItalic = TRUE;
+ bItalic = sal_True;
else
- bNormal = TRUE;
+ bNormal = sal_True;
}
else
{
if ( eItalic != ITALIC_NONE )
- bBoldItalic = TRUE;
+ bBoldItalic = sal_True;
else
- bBold = TRUE;
+ bBold = sal_True;
}
// For wrong StyleNames we replace this with the correct once
@@ -276,11 +276,11 @@ void FontStyleMenu::Fill( const XubString& rName, const FontList* pList )
}
if ( !bItalic && (aStyleText == pList->GetItalicStr()) )
- bItalic = TRUE;
+ bItalic = sal_True;
else if ( !bBold && (aStyleText == pList->GetBoldStr()) )
- bBold = TRUE;
+ bBold = sal_True;
else if ( !bBoldItalic && (aStyleText == pList->GetBoldItalicStr()) )
- bBoldItalic = TRUE;
+ bBoldItalic = sal_True;
hFontInfo = pList->GetNextFontInfo( hFontInfo );
}
@@ -345,11 +345,11 @@ void FontStyleMenu::SetCurStyle( const XubString& rStyle )
maCurStyle = rStyle;
// Menueintrag checken
- USHORT nChecked = 0;
- USHORT nItemCount = GetItemCount();
- for( USHORT i = 0; i < nItemCount; i++ )
+ sal_uInt16 nChecked = 0;
+ sal_uInt16 nItemCount = GetItemCount();
+ for( sal_uInt16 i = 0; i < nItemCount; i++ )
{
- USHORT nItemId = GetItemId( i );
+ sal_uInt16 nItemId = GetItemId( i );
if ( (nItemId < FONTSTYLEMENU_FIRSTID) ||
(nItemId > FONTSTYLEMENU_LASTID) )
@@ -361,13 +361,13 @@ void FontStyleMenu::SetCurStyle( const XubString& rStyle )
XubString aText = GetItemText( nItemId );
if ( aText == maCurStyle )
{
- CheckItem( nItemId, TRUE );
+ CheckItem( nItemId, sal_True );
return;
}
}
if ( nChecked )
- CheckItem( nChecked, FALSE );
+ CheckItem( nChecked, sal_False );
}
// ========================================================================
@@ -391,7 +391,7 @@ FontSizeMenu::~FontSizeMenu()
void FontSizeMenu::Select()
{
- const USHORT nCurItemId = GetCurItemId();
+ const sal_uInt16 nCurItemId = GetCurItemId();
mnCurHeight = mpHeightAry[ nCurItemId - 1 ];
maSelectHdl.Call( this );
}
@@ -401,7 +401,7 @@ void FontSizeMenu::Select()
void FontSizeMenu::Highlight()
{
const long nTempHeight = mnCurHeight;
- const USHORT nCurItemId = GetCurItemId();
+ const sal_uInt16 nCurItemId = GetCurItemId();
if ( !nCurItemId )
mnCurHeight = 0;
else
@@ -425,11 +425,11 @@ void FontSizeMenu::Fill( const FontInfo& rInfo, const FontList* pList )
const long* pTempAry;
const long* pAry = pList->GetSizeAry( rInfo );
- USHORT nSizeCount = 0;
+ sal_uInt16 nSizeCount = 0;
while ( pAry[nSizeCount] )
nSizeCount++;
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
// first insert font size names (for simplified/traditional chinese)
FontSizeNames aFontSizeNames( Application::GetSettings().GetUILanguage() );
@@ -439,8 +439,8 @@ void FontSizeMenu::Fill( const FontInfo& rInfo, const FontList* pList )
if ( pAry == pList->GetStdSizeAry() )
{
// for scalable fonts all font size names
- ULONG nCount = aFontSizeNames.Count();
- for( ULONG i = 0; i < nCount; i++ )
+ sal_uLong nCount = aFontSizeNames.Count();
+ for( sal_uLong i = 0; i < nCount; i++ )
{
String aSizeName = aFontSizeNames.GetIndexName( i );
long nSize = aFontSizeNames.GetIndexSize( i );
@@ -474,7 +474,7 @@ void FontSizeMenu::Fill( const FontInfo& rInfo, const FontList* pList )
{
mpHeightAry[nPos] = *pTempAry;
nPos++; // Id is nPos+1
- InsertItem( nPos, rI18nHelper.GetNum( *pTempAry, 1, TRUE, FALSE ), MIB_RADIOCHECK | MIB_AUTOCHECK );
+ InsertItem( nPos, rI18nHelper.GetNum( *pTempAry, 1, sal_True, sal_False ), MIB_RADIOCHECK | MIB_AUTOCHECK );
pTempAry++;
}
@@ -488,16 +488,16 @@ void FontSizeMenu::SetCurHeight( long nHeight )
mnCurHeight = nHeight;
// check menue item
- XubString aHeight = Application::GetSettings().GetUILocaleI18nHelper().GetNum( nHeight, 1, TRUE, FALSE );
- USHORT nChecked = 0;
- USHORT nItemCount = GetItemCount();
- for( USHORT i = 0; i < nItemCount; i++ )
+ XubString aHeight = Application::GetSettings().GetUILocaleI18nHelper().GetNum( nHeight, 1, sal_True, sal_False );
+ sal_uInt16 nChecked = 0;
+ sal_uInt16 nItemCount = GetItemCount();
+ for( sal_uInt16 i = 0; i < nItemCount; i++ )
{
- USHORT nItemId = GetItemId( i );
+ sal_uInt16 nItemId = GetItemId( i );
if ( mpHeightAry[i] == nHeight )
{
- CheckItem( nItemId, TRUE );
+ CheckItem( nItemId, sal_True );
return;
}
@@ -506,5 +506,5 @@ void FontSizeMenu::SetCurHeight( long nHeight )
}
if ( nChecked )
- CheckItem( nChecked, FALSE );
+ CheckItem( nChecked, sal_False );
}
diff --git a/svtools/source/control/svxbox.cxx b/svtools/source/control/svxbox.cxx
index d1ea47d110cd..451837026dbe 100644..100755
--- a/svtools/source/control/svxbox.cxx
+++ b/svtools/source/control/svxbox.cxx
@@ -42,17 +42,17 @@ SV_IMPL_PTRARR(SvxEntryLst, SvxBoxEntry*)
SvxBoxEntry::SvxBoxEntry() :
nId(LISTBOX_ENTRY_NOTFOUND),
- bModified(FALSE),
- bNew(FALSE)
+ bModified(sal_False),
+ bNew(sal_False)
{
}
-SvxBoxEntry::SvxBoxEntry(const String& aNam, USHORT nIdx) :
+SvxBoxEntry::SvxBoxEntry(const String& aNam, sal_uInt16 nIdx) :
aName(aNam),
nId(nIdx),
- bModified(FALSE),
- bNew(FALSE)
+ bModified(sal_False),
+ bNew(sal_False)
{
}
@@ -99,8 +99,8 @@ __EXPORT SvxListBox::~SvxListBox()
void SvxListBox::InitListBox()
{
// Verwaltung fuer die Stringlist aus der Resource aufbauen
- USHORT nSize = GetEntryCount();
- for(USHORT i=0; i < nSize; ++i)
+ sal_uInt16 nSize = GetEntryCount();
+ for(sal_uInt16 i=0; i < nSize; ++i)
{ const SvxBoxEntry* pTmp = new SvxBoxEntry(ListBox::GetEntry(i), i);
const SvxBoxEntry* &rpTmp = pTmp;
aEntryLst.Insert(rpTmp, aEntryLst.Count());
@@ -114,7 +114,7 @@ void SvxListBox::InitListBox()
void SvxListBox::InsertNewEntry(const SvxBoxEntry& rEntry)
{
SvxBoxEntry* pNew = new SvxBoxEntry(rEntry);
- pNew->bNew = TRUE;
+ pNew->bNew = sal_True;
InsertSorted(pNew);
}
@@ -122,7 +122,7 @@ void SvxListBox::InsertNewEntry(const SvxBoxEntry& rEntry)
Beschreibung: Eintrag in die ListBox aufnehmen
--------------------------------------------------------------------*/
-void SvxListBox::InsertEntry(const SvxBoxEntry& rEntry, USHORT nPos)
+void SvxListBox::InsertEntry(const SvxBoxEntry& rEntry, sal_uInt16 nPos)
{
if(nPos != LISTBOX_ENTRY_NOTFOUND)
{
@@ -139,7 +139,7 @@ void SvxListBox::InsertEntry(const SvxBoxEntry& rEntry, USHORT nPos)
Beschreibung: Eintrag aus der Liste loeschen
--------------------------------------------------------------------*/
-void SvxListBox::RemoveEntry(USHORT nPos)
+void SvxListBox::RemoveEntry(sal_uInt16 nPos)
{
if(nPos >= aEntryLst.Count())
return;
@@ -163,7 +163,7 @@ void SvxListBox::RemoveEntry(USHORT nPos)
void SvxListBox::RemoveEntry(const SvxBoxEntry& rEntry)
{
- USHORT nPos = ListBox::GetEntryPos(rEntry.aName);
+ sal_uInt16 nPos = ListBox::GetEntryPos(rEntry.aName);
RemoveEntry(nPos);
}
@@ -182,7 +182,7 @@ void SvxListBox::Clear()
Beschreibung: Position by Name
--------------------------------------------------------------------*/
-USHORT SvxListBox::GetEntryPos(const SvxBoxEntry& rEntry) const
+sal_uInt16 SvxListBox::GetEntryPos(const SvxBoxEntry& rEntry) const
{
return ListBox::GetEntryPos(rEntry.aName);
}
@@ -191,7 +191,7 @@ USHORT SvxListBox::GetEntryPos(const SvxBoxEntry& rEntry) const
Beschreibung: Rund um die Entries
--------------------------------------------------------------------*/
-const SvxBoxEntry& SvxListBox::GetSvxBoxEntry(USHORT nPos) const
+const SvxBoxEntry& SvxListBox::GetSvxBoxEntry(sal_uInt16 nPos) const
{
if(nPos < aEntryLst.Count())
return *aEntryLst[nPos];
@@ -203,13 +203,13 @@ const SvxBoxEntry& SvxListBox::GetSvxBoxEntry(USHORT nPos) const
Beschreibung: aktullen Eintrag zurueckgeben
--------------------------------------------------------------------*/
-const SvxBoxEntry& SvxListBox::GetSelectSvxBoxEntry(USHORT nSelId) const
+const SvxBoxEntry& SvxListBox::GetSelectSvxBoxEntry(sal_uInt16 nSelId) const
{
String aName(ListBox::GetSelectEntry(nSelId));
if(aName.Len() > 0)
{
- for (USHORT i=0; i < aEntryLst.Count(); i++)
+ for (sal_uInt16 i=0; i < aEntryLst.Count(); i++)
{
if(aEntryLst[i]->aName == aName )
return *aEntryLst[i];
@@ -222,11 +222,11 @@ const SvxBoxEntry& SvxListBox::GetSelectSvxBoxEntry(USHORT nSelId) const
Beschreibung: modifizierte Eintraege
--------------------------------------------------------------------*/
-USHORT SvxListBox::GetModifiedCount() const
+sal_uInt16 SvxListBox::GetModifiedCount() const
{
- USHORT nMod = 0;
- USHORT nSize = aEntryLst.Count();
- for(USHORT i=0; i < nSize; ++i)
+ sal_uInt16 nMod = 0;
+ sal_uInt16 nSize = aEntryLst.Count();
+ for(sal_uInt16 i=0; i < nSize; ++i)
{ if(aEntryLst[i]->bModified)
nMod++;
}
@@ -237,7 +237,7 @@ USHORT SvxListBox::GetModifiedCount() const
Beschreibung: Modifizierte Eintraege behandeln
--------------------------------------------------------------------*/
-void SvxListBox::ModifyEntry(USHORT nPos, const String& rName)
+void SvxListBox::ModifyEntry(sal_uInt16 nPos, const String& rName)
{
if(nPos >= aEntryLst.Count())
return;
@@ -245,7 +245,7 @@ void SvxListBox::ModifyEntry(USHORT nPos, const String& rName)
SvxBoxEntry* pEntry = aEntryLst[nPos];
aEntryLst.Remove(nPos, 1);
aEntryLst[nPos]->aName = rName;
- aEntryLst[nPos]->bModified = TRUE;
+ aEntryLst[nPos]->bModified = sal_True;
ListBox::RemoveEntry(nPos);
InsertSorted(pEntry);
@@ -255,11 +255,11 @@ void SvxListBox::ModifyEntry(USHORT nPos, const String& rName)
Beschreibung: alle modifizierten Eintraege bahandeln
--------------------------------------------------------------------*/
-const SvxBoxEntry& SvxListBox::GetModifiedEntry(USHORT nPos) const
+const SvxBoxEntry& SvxListBox::GetModifiedEntry(sal_uInt16 nPos) const
{
- USHORT nSize = aEntryLst.Count();
- USHORT nMod = 0;
- for(USHORT i=0; i < nSize; ++i)
+ sal_uInt16 nSize = aEntryLst.Count();
+ sal_uInt16 nMod = 0;
+ for(sal_uInt16 i=0; i < nSize; ++i)
{ if(aEntryLst[i]->bModified)
{ if(nMod == nPos)
return *aEntryLst[i];
@@ -273,13 +273,13 @@ const SvxBoxEntry& SvxListBox::GetModifiedEntry(USHORT nPos) const
Beschreibung: geloeschte Eintraege
--------------------------------------------------------------------*/
-USHORT SvxListBox::GetRemovedCount() const
+sal_uInt16 SvxListBox::GetRemovedCount() const
{
return aDelEntryLst.Count();
}
-const SvxBoxEntry& SvxListBox::GetRemovedEntry(USHORT nPos) const
+const SvxBoxEntry& SvxListBox::GetRemovedEntry(sal_uInt16 nPos) const
{
if(nPos < aDelEntryLst.Count())
return *aDelEntryLst[nPos];
@@ -291,11 +291,11 @@ const SvxBoxEntry& SvxListBox::GetRemovedEntry(USHORT nPos) const
Beschreibung: Neue Entries begutachten
--------------------------------------------------------------------*/
-USHORT SvxListBox::GetNewCount() const
+sal_uInt16 SvxListBox::GetNewCount() const
{
- USHORT nNew = 0;
- USHORT nSize = aEntryLst.Count();
- for(USHORT i=0; i < nSize; ++i)
+ sal_uInt16 nNew = 0;
+ sal_uInt16 nSize = aEntryLst.Count();
+ for(sal_uInt16 i=0; i < nSize; ++i)
{ if(aEntryLst[i]->bNew)
nNew++;
}
@@ -306,11 +306,11 @@ USHORT SvxListBox::GetNewCount() const
Beschreibung: Alle neuen Eintraege ueberpruefen
--------------------------------------------------------------------*/
-const SvxBoxEntry& SvxListBox::GetNewEntry(USHORT nPos) const
+const SvxBoxEntry& SvxListBox::GetNewEntry(sal_uInt16 nPos) const
{
- USHORT nSize = aEntryLst.Count();
- USHORT nNew = 0;
- for(USHORT i=0; i < nSize; ++i)
+ sal_uInt16 nSize = aEntryLst.Count();
+ sal_uInt16 nNew = 0;
+ for(sal_uInt16 i=0; i < nSize; ++i)
{ if(aEntryLst[i]->bNew)
{ if(nNew == nPos)
return *aEntryLst[i];
@@ -327,7 +327,7 @@ const SvxBoxEntry& SvxListBox::GetNewEntry(USHORT nPos) const
void SvxListBox::InsertSorted(SvxBoxEntry* pEntry)
{
ListBox::InsertEntry(pEntry->aName);
- USHORT nPos = ListBox::GetEntryPos(pEntry->aName);
+ sal_uInt16 nPos = ListBox::GetEntryPos(pEntry->aName);
aEntryLst.C40_INSERT(SvxBoxEntry, pEntry, nPos);
}
@@ -335,7 +335,7 @@ void SvxListBox::InsertSorted(SvxBoxEntry* pEntry)
Beschreibung: ComboBoxen mit Verwaltungseinheit
--------------------------------------------------------------------*/
-SvxComboBox::SvxComboBox(Window* pParent, WinBits nBits, USHORT nStyleBits) :
+SvxComboBox::SvxComboBox(Window* pParent, WinBits nBits, sal_uInt16 nStyleBits) :
ComboBox(pParent, nBits),
nStyle(nStyleBits)
{
@@ -343,7 +343,7 @@ SvxComboBox::SvxComboBox(Window* pParent, WinBits nBits, USHORT nStyleBits) :
}
-SvxComboBox::SvxComboBox(Window* pParent, const ResId& rId, USHORT nStyleBits ):
+SvxComboBox::SvxComboBox(Window* pParent, const ResId& rId, sal_uInt16 nStyleBits ):
ComboBox(pParent, rId),
nStyle(nStyleBits)
{
@@ -367,8 +367,8 @@ __EXPORT SvxComboBox::~SvxComboBox()
void SvxComboBox::InitComboBox()
{
// Verwaltung fuer die Stringlist aus der Resource aufbauen
- USHORT nSize = GetEntryCount();
- for(USHORT i=0; i < nSize; ++i)
+ sal_uInt16 nSize = GetEntryCount();
+ for(sal_uInt16 i=0; i < nSize; ++i)
{ const SvxBoxEntry* pTmp = new SvxBoxEntry(ComboBox::GetEntry(i), i);
const SvxBoxEntry* &rpTmp = pTmp;
aEntryLst.Insert(rpTmp, aEntryLst.Count());
@@ -382,7 +382,7 @@ void SvxComboBox::InitComboBox()
void SvxComboBox::InsertNewEntry(const SvxBoxEntry& rEntry)
{
SvxBoxEntry* pNew = new SvxBoxEntry(rEntry);
- pNew->bNew = TRUE;
+ pNew->bNew = sal_True;
InsertSorted(pNew);
}
@@ -399,7 +399,7 @@ void SvxComboBox::InsertEntry(const SvxBoxEntry& rEntry)
Beschreibung: Eintrag aus der Liste loeschen
--------------------------------------------------------------------*/
-void SvxComboBox::RemoveEntry(USHORT nPos)
+void SvxComboBox::RemoveEntry(sal_uInt16 nPos)
{
if(nPos >= aEntryLst.Count())
return;
@@ -423,7 +423,7 @@ void SvxComboBox::RemoveEntry(USHORT nPos)
void SvxComboBox::RemoveEntry(const SvxBoxEntry& rEntry)
{
- USHORT nPos = ComboBox::GetEntryPos(rEntry.aName);
+ sal_uInt16 nPos = ComboBox::GetEntryPos(rEntry.aName);
RemoveEntry(nPos);
}
@@ -443,7 +443,7 @@ void SvxComboBox::Clear()
Beschreibung: Position by Name
--------------------------------------------------------------------*/
-USHORT SvxComboBox::GetEntryPos(const SvxBoxEntry& rEntry) const
+sal_uInt16 SvxComboBox::GetEntryPos(const SvxBoxEntry& rEntry) const
{
return ComboBox::GetEntryPos(rEntry.aName);
}
@@ -452,7 +452,7 @@ USHORT SvxComboBox::GetEntryPos(const SvxBoxEntry& rEntry) const
Beschreibung: Rund um die Entries
--------------------------------------------------------------------*/
-const SvxBoxEntry& SvxComboBox::GetEntry(USHORT nPos) const
+const SvxBoxEntry& SvxComboBox::GetEntry(sal_uInt16 nPos) const
{
if(nPos < aEntryLst.Count())
return *aEntryLst[nPos];
@@ -464,11 +464,11 @@ const SvxBoxEntry& SvxComboBox::GetEntry(USHORT nPos) const
Beschreibung: modifizierte Eintraege
--------------------------------------------------------------------*/
-USHORT SvxComboBox::GetModifiedCount() const
+sal_uInt16 SvxComboBox::GetModifiedCount() const
{
- USHORT nMod = 0;
- USHORT nSize = aEntryLst.Count();
- for(USHORT i=0; i < nSize; ++i)
+ sal_uInt16 nMod = 0;
+ sal_uInt16 nSize = aEntryLst.Count();
+ for(sal_uInt16 i=0; i < nSize; ++i)
{ if(aEntryLst[i]->bModified)
nMod++;
}
@@ -479,7 +479,7 @@ USHORT SvxComboBox::GetModifiedCount() const
Beschreibung: Modifizierte Eintraege behandeln
--------------------------------------------------------------------*/
-void SvxComboBox::ModifyEntry(USHORT nPos, const String& rName)
+void SvxComboBox::ModifyEntry(sal_uInt16 nPos, const String& rName)
{
if(nPos >= aEntryLst.Count())
return;
@@ -487,7 +487,7 @@ void SvxComboBox::ModifyEntry(USHORT nPos, const String& rName)
SvxBoxEntry* pEntry = aEntryLst[nPos];
aEntryLst.Remove(nPos, 1);
aEntryLst[nPos]->aName = rName;
- aEntryLst[nPos]->bModified = TRUE;
+ aEntryLst[nPos]->bModified = sal_True;
ComboBox::RemoveEntry(nPos);
InsertSorted(pEntry);
@@ -497,11 +497,11 @@ void SvxComboBox::ModifyEntry(USHORT nPos, const String& rName)
Beschreibung: alle modifizierten Eintraege bahandeln
--------------------------------------------------------------------*/
-const SvxBoxEntry& SvxComboBox::GetModifiedEntry(USHORT nPos) const
+const SvxBoxEntry& SvxComboBox::GetModifiedEntry(sal_uInt16 nPos) const
{
- USHORT nSize = aEntryLst.Count();
- USHORT nMod = 0;
- for(USHORT i=0; i < nSize; ++i)
+ sal_uInt16 nSize = aEntryLst.Count();
+ sal_uInt16 nMod = 0;
+ for(sal_uInt16 i=0; i < nSize; ++i)
{ if(aEntryLst[i]->bModified)
{ if(nMod == nPos)
return *aEntryLst[i];
@@ -515,13 +515,13 @@ const SvxBoxEntry& SvxComboBox::GetModifiedEntry(USHORT nPos) const
Beschreibung: geloeschte Eintraege
--------------------------------------------------------------------*/
-USHORT SvxComboBox::GetRemovedCount() const
+sal_uInt16 SvxComboBox::GetRemovedCount() const
{
return aDelEntryLst.Count();
}
-const SvxBoxEntry& SvxComboBox::GetRemovedEntry(USHORT nPos) const
+const SvxBoxEntry& SvxComboBox::GetRemovedEntry(sal_uInt16 nPos) const
{
if(nPos < aDelEntryLst.Count())
return *aDelEntryLst[nPos];
@@ -533,11 +533,11 @@ const SvxBoxEntry& SvxComboBox::GetRemovedEntry(USHORT nPos) const
Beschreibung: Neue Entries begutachten
--------------------------------------------------------------------*/
-USHORT SvxComboBox::GetNewCount() const
+sal_uInt16 SvxComboBox::GetNewCount() const
{
- USHORT nNew = 0;
- USHORT nSize = aEntryLst.Count();
- for(USHORT i=0; i < nSize; ++i)
+ sal_uInt16 nNew = 0;
+ sal_uInt16 nSize = aEntryLst.Count();
+ for(sal_uInt16 i=0; i < nSize; ++i)
{ if(aEntryLst[i]->bNew)
nNew++;
}
@@ -548,11 +548,11 @@ USHORT SvxComboBox::GetNewCount() const
Beschreibung: Alle neuen Eintraege ueberpruefen
--------------------------------------------------------------------*/
-const SvxBoxEntry& SvxComboBox::GetNewEntry(USHORT nPos) const
+const SvxBoxEntry& SvxComboBox::GetNewEntry(sal_uInt16 nPos) const
{
- USHORT nSize = aEntryLst.Count();
- USHORT nNew = 0;
- for(USHORT i=0; i < nSize; ++i)
+ sal_uInt16 nSize = aEntryLst.Count();
+ sal_uInt16 nNew = 0;
+ for(sal_uInt16 i=0; i < nSize; ++i)
{ if(aEntryLst[i]->bNew)
{ if(nNew == nPos)
return *aEntryLst[i];
@@ -569,7 +569,7 @@ const SvxBoxEntry& SvxComboBox::GetNewEntry(USHORT nPos) const
void SvxComboBox::InsertSorted(SvxBoxEntry* pEntry)
{
ComboBox::InsertEntry(pEntry->aName);
- USHORT nPos = ComboBox::GetEntryPos(pEntry->aName);
+ sal_uInt16 nPos = ComboBox::GetEntryPos(pEntry->aName);
aEntryLst.C40_INSERT(SvxBoxEntry, pEntry, nPos);
}
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 0c2800246061..033ae63e8a0a 100755
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -48,37 +48,37 @@
#define TABBAR_DRAG_SCROLLOFF 5
#define TABBAR_MINSIZE 5
-const USHORT ADDNEWPAGE_AREAWIDTH = 10;
+const sal_uInt16 ADDNEWPAGE_AREAWIDTH = 10;
// =======================================================================
struct ImplTabBarItem
{
- USHORT mnId;
+ sal_uInt16 mnId;
TabBarPageBits mnBits;
XubString maText;
XubString maHelpText;
Rectangle maRect;
long mnWidth;
rtl::OString maHelpId;
- BOOL mbShort;
- BOOL mbSelect;
- BOOL mbEnable;
+ sal_Bool mbShort;
+ sal_Bool mbSelect;
+ sal_Bool mbEnable;
Color maTabBgColor;
- bool IsDefaultTabBgColor() const { return maTabBgColor == Color(COL_AUTO) ? TRUE : FALSE; };
+ bool IsDefaultTabBgColor() const { return maTabBgColor == Color(COL_AUTO) ? sal_True : sal_False; };
Color maTabTextColor;
- bool IsDefaultTabTextColor() const { return maTabTextColor == Color(COL_AUTO) ? TRUE : FALSE; };
+ bool IsDefaultTabTextColor() const { return maTabTextColor == Color(COL_AUTO) ? sal_True : sal_False; };
- ImplTabBarItem( USHORT nItemId, const XubString& rText,
+ ImplTabBarItem( sal_uInt16 nItemId, const XubString& rText,
TabBarPageBits nPageBits ) :
maText( rText )
{
mnId = nItemId;
mnBits = nPageBits;
mnWidth = 0;
- mbShort = FALSE;
- mbSelect = FALSE;
- mbEnable = TRUE;
+ mbShort = sal_False;
+ mbSelect = sal_False;
+ mbEnable = sal_True;
maTabBgColor = Color( COL_AUTO );
maTabTextColor = Color( COL_AUTO );
}
@@ -112,7 +112,7 @@ long ImplTabButton::PreNotify( NotifyEvent& rNEvt )
if ( GetParent()->IsInEditMode() )
{
GetParent()->EndEditMode();
- return TRUE;
+ return sal_True;
}
}
@@ -228,7 +228,7 @@ class TabBarEdit : public Edit
{
private:
Timer maLoseFocusTimer;
- BOOL mbPostEvt;
+ sal_Bool mbPostEvt;
DECL_LINK( ImplEndEditHdl, void* );
DECL_LINK( ImplEndTimerHdl, void* );
@@ -238,8 +238,8 @@ public:
TabBar* GetParent() const { return (TabBar*)Window::GetParent(); }
- void SetPostEvent() { mbPostEvt = TRUE; }
- void ResetPostEvent() { mbPostEvt = FALSE; }
+ void SetPostEvent() { mbPostEvt = sal_True; }
+ void ResetPostEvent() { mbPostEvt = sal_False; }
virtual long PreNotify( NotifyEvent& rNEvt );
virtual void LoseFocus();
@@ -250,7 +250,7 @@ public:
TabBarEdit::TabBarEdit( TabBar* pParent, WinBits nWinStyle ) :
Edit( pParent, nWinStyle )
{
- mbPostEvt = FALSE;
+ mbPostEvt = sal_False;
}
// -----------------------------------------------------------------------
@@ -266,19 +266,19 @@ long TabBarEdit::PreNotify( NotifyEvent& rNEvt )
{
if ( !mbPostEvt )
{
- if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), (void*)FALSE ) )
- mbPostEvt = TRUE;
+ if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), (void*)sal_False ) )
+ mbPostEvt = sal_True;
}
- return TRUE;
+ return sal_True;
}
else if ( pKEvt->GetKeyCode().GetCode() == KEY_ESCAPE )
{
if ( !mbPostEvt )
{
- if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), (void*)TRUE ) )
- mbPostEvt = TRUE;
+ if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), (void*)sal_True ) )
+ mbPostEvt = sal_True;
}
- return TRUE;
+ return sal_True;
}
}
}
@@ -292,8 +292,8 @@ void TabBarEdit::LoseFocus()
{
if ( !mbPostEvt )
{
- if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), (void*)FALSE ) )
- mbPostEvt = TRUE;
+ if ( PostUserEvent( LINK( this, TabBarEdit, ImplEndEditHdl ), (void*)sal_False ) )
+ mbPostEvt = sal_True;
}
Edit::LoseFocus();
@@ -308,7 +308,7 @@ IMPL_LINK( TabBarEdit, ImplEndEditHdl, void*, pCancel )
// We need this query, because the edit get a losefous event,
// when it shows the context menu or the insert symbol dialog
- if ( !HasFocus() && HasChildPathFocus( TRUE ) )
+ if ( !HasFocus() && HasChildPathFocus( sal_True ) )
{
maLoseFocusTimer.SetTimeout( 30 );
maLoseFocusTimer.SetTimeoutHdl( LINK( this, TabBarEdit, ImplEndTimerHdl ) );
@@ -329,10 +329,10 @@ IMPL_LINK( TabBarEdit, ImplEndTimerHdl, void*, EMPTYARG )
// We need this query, because the edit get a losefous event,
// when it shows the context menu or the insert symbol dialog
- if ( HasChildPathFocus( TRUE ) )
+ if ( HasChildPathFocus( sal_True ) )
maLoseFocusTimer.Start();
else
- GetParent()->EndEditMode( TRUE );
+ GetParent()->EndEditMode( sal_True );
return 0;
}
@@ -380,25 +380,25 @@ void TabBar::ImplInit( WinBits nWinStyle )
mnDropPos = 0;
mnSwitchId = 0;
mnEditId = 0;
- mbFormat = TRUE;
- mbFirstFormat = TRUE;
- mbSizeFormat = TRUE;
- mbAutoMaxWidth = TRUE;
- mbInSwitching = FALSE;
- mbAutoEditMode = FALSE;
- mbEditCanceled = FALSE;
- mbDropPos = FALSE;
- mbInSelect = FALSE;
- mbSelColor = FALSE;
- mbSelTextColor = FALSE;
- mbMirrored = FALSE;
+ mbFormat = sal_True;
+ mbFirstFormat = sal_True;
+ mbSizeFormat = sal_True;
+ mbAutoMaxWidth = sal_True;
+ mbInSwitching = sal_False;
+ mbAutoEditMode = sal_False;
+ mbEditCanceled = sal_False;
+ mbDropPos = sal_False;
+ mbInSelect = sal_False;
+ mbSelColor = sal_False;
+ mbSelTextColor = sal_False;
+ mbMirrored = sal_False;
if ( nWinStyle & WB_3DTAB )
mnOffY++;
ImplInitControls();
SetSizePixel( Size( 100, CalcWindowSizePixel().Height() ) );
- ImplInitSettings( TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True );
}
// -----------------------------------------------------------------------
@@ -413,7 +413,7 @@ TabBar::TabBar( Window* pParent, WinBits nWinStyle ) :
TabBar::~TabBar()
{
- EndEditMode( TRUE );
+ EndEditMode( sal_True );
// Controls loeschen
if ( mpPrevBtn )
@@ -440,7 +440,7 @@ TabBar::~TabBar()
// -----------------------------------------------------------------------
-void TabBar::ImplInitSettings( BOOL bFont, BOOL bBackground )
+void TabBar::ImplInitSettings( sal_Bool bFont, sal_Bool bBackground )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -514,12 +514,12 @@ void TabBar::ImplGetColors( Color& rFaceColor, Color& rFaceTextColor,
// -----------------------------------------------------------------------
-BOOL TabBar::ImplCalcWidth()
+sal_Bool TabBar::ImplCalcWidth()
{
// Groessen muessen nur ermittelt werden, wenn sich Text aendert oder
// wenn der Font geaendert wurde
if ( !mbSizeFormat )
- return FALSE;
+ return sal_False;
// Breiten der Tabs mit dem fetten Font ermitteln
Font aFont = GetFont();
@@ -542,29 +542,29 @@ BOOL TabBar::ImplCalcWidth()
else
mnCurMaxWidth = 0;
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
ImplTabBarItem* pItem = mpItemList->First();
while ( pItem )
{
long nNewWidth = GetTextWidth( pItem->maText );
if ( mnCurMaxWidth && (nNewWidth > mnCurMaxWidth) )
{
- pItem->mbShort = TRUE;
+ pItem->mbShort = sal_True;
nNewWidth = mnCurMaxWidth;
}
else
- pItem->mbShort = FALSE;
+ pItem->mbShort = sal_False;
nNewWidth += TABBAR_OFFSET_X+TABBAR_OFFSET_X2;
if ( pItem->mnWidth != nNewWidth )
{
pItem->mnWidth = nNewWidth;
if ( !pItem->maRect.IsEmpty() )
- bChanged = TRUE;
+ bChanged = sal_True;
}
pItem = mpItemList->Next();
}
- mbSizeFormat = FALSE;
- mbFormat = TRUE;
+ mbSizeFormat = sal_False;
+ mbFormat = sal_True;
return bChanged;
}
@@ -577,7 +577,7 @@ void TabBar::ImplFormat()
if ( !mbFormat )
return;
- USHORT n = 0;
+ sal_uInt16 n = 0;
long x = mnOffX;
ImplTabBarItem* pItem = mpItemList->First();
while ( pItem )
@@ -612,7 +612,7 @@ void TabBar::ImplFormat()
pItem = mpItemList->Next();
}
- mbFormat = FALSE;
+ mbFormat = sal_False;
// Button enablen/disablen
ImplEnableControls();
@@ -620,13 +620,13 @@ void TabBar::ImplFormat()
// -----------------------------------------------------------------------
-USHORT TabBar::ImplGetLastFirstPos()
+sal_uInt16 TabBar::ImplGetLastFirstPos()
{
- USHORT nCount = (USHORT)(mpItemList->Count());
+ sal_uInt16 nCount = (sal_uInt16)(mpItemList->Count());
if ( !nCount || mbSizeFormat || mbFormat )
return 0;
- USHORT nLastFirstPos = nCount-1;
+ sal_uInt16 nLastFirstPos = nCount-1;
long nWinWidth = mnLastOffX-mnOffX-TABBAR_OFFSET_X-ADDNEWPAGE_AREAWIDTH;
long nWidth = mpItemList->GetObject( nLastFirstPos )->mnWidth;
while ( nLastFirstPos && (nWidth < nWinWidth) )
@@ -634,7 +634,7 @@ USHORT TabBar::ImplGetLastFirstPos()
nLastFirstPos--;
nWidth += mpItemList->GetObject( nLastFirstPos )->mnWidth;
}
- if ( (nLastFirstPos != (USHORT)(mpItemList->Count()-1)) &&
+ if ( (nLastFirstPos != (sal_uInt16)(mpItemList->Count()-1)) &&
(nWidth > nWinWidth) )
nLastFirstPos++;
return nLastFirstPos;
@@ -714,7 +714,7 @@ void TabBar::ImplEnableControls()
return;
// Buttons enablen/disblen
- BOOL bEnableBtn = mnFirstPos > 0;
+ sal_Bool bEnableBtn = mnFirstPos > 0;
if ( mpFirstBtn )
mpFirstBtn->Enable( bEnableBtn );
if ( mpPrevBtn )
@@ -729,7 +729,7 @@ void TabBar::ImplEnableControls()
// -----------------------------------------------------------------------
-void TabBar::ImplShowPage( USHORT nPos )
+void TabBar::ImplShowPage( sal_uInt16 nPos )
{
// Breite berechnen
long nWidth = GetOutputSizePixel().Width();
@@ -742,7 +742,7 @@ void TabBar::ImplShowPage( USHORT nPos )
{
while ( pItem->maRect.Right() > nWidth )
{
- USHORT nNewPos = mnFirstPos+1;
+ sal_uInt16 nNewPos = mnFirstPos+1;
SetFirstPageId( GetPageId( nNewPos ) );
ImplFormat();
if ( nNewPos != mnFirstPos )
@@ -757,7 +757,7 @@ IMPL_LINK( TabBar, ImplClickHdl, ImplTabButton*, pBtn )
{
EndEditMode();
- USHORT nNewPos = mnFirstPos;
+ sal_uInt16 nNewPos = mnFirstPos;
if ( pBtn == mpFirstBtn )
nNewPos = 0;
@@ -768,13 +768,13 @@ IMPL_LINK( TabBar, ImplClickHdl, ImplTabButton*, pBtn )
}
else if ( pBtn == mpNextBtn )
{
- USHORT nCount = GetPageCount();
+ sal_uInt16 nCount = GetPageCount();
if ( mnFirstPos < nCount )
nNewPos = mnFirstPos+1;
}
else
{
- USHORT nCount = GetPageCount();
+ sal_uInt16 nCount = GetPageCount();
if ( nCount )
nNewPos = nCount-1;
}
@@ -789,7 +789,7 @@ IMPL_LINK( TabBar, ImplClickHdl, ImplTabButton*, pBtn )
void TabBar::MouseMove( const MouseEvent& rMEvt )
{
if ( rMEvt.IsLeaveWindow() )
- mbInSelect = FALSE;
+ mbInSelect = sal_False;
Window::MouseMove( rMEvt );
}
@@ -807,14 +807,14 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt )
}
ImplTabBarItem* pItem;
- USHORT nSelId = GetPageId( rMEvt.GetPosPixel() );
+ sal_uInt16 nSelId = GetPageId( rMEvt.GetPosPixel() );
if ( !rMEvt.IsLeft() )
{
Window::MouseButtonDown( rMEvt );
if ( (nSelId > 0) && (nSelId != mnCurPageId) )
{
- USHORT nPos = GetPagePos( nSelId );
+ sal_uInt16 nPos = GetPagePos( nSelId );
pItem = mpItemList->GetObject( nPos );
if ( pItem->mbEnable )
@@ -826,7 +826,7 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt )
ImplActivatePage();
ImplSelect();
}
- mbInSelect = TRUE;
+ mbInSelect = sal_True;
}
}
return;
@@ -842,8 +842,8 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt )
{
if ( nSelId )
{
- USHORT nPos = GetPagePos( nSelId );
- BOOL bSelectTab = FALSE;
+ sal_uInt16 nPos = GetPagePos( nSelId );
+ sal_Bool bSelectTab = sal_False;
pItem = mpItemList->GetObject( nPos );
if ( pItem->mbEnable )
@@ -853,15 +853,15 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt )
if ( nSelId != mnCurPageId )
{
SelectPage( nSelId, !IsPageSelected( nSelId ) );
- bSelectTab = TRUE;
+ bSelectTab = sal_True;
}
}
else if ( mnWinStyle & (WB_MULTISELECT | WB_RANGESELECT) )
{
- bSelectTab = TRUE;
- USHORT n;
- BOOL bSelect;
- USHORT nCurPos = GetPagePos( mnCurPageId );
+ bSelectTab = sal_True;
+ sal_uInt16 n;
+ sal_Bool bSelect;
+ sal_uInt16 nCurPos = GetPagePos( mnCurPageId );
if ( nPos <= nCurPos )
{
// Alle Tabs bis zur angeklickten Tab deselektieren
@@ -872,9 +872,9 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt )
{
pItem = mpItemList->GetObject( n );
if ( n < nPos )
- bSelect = FALSE;
+ bSelect = sal_False;
else
- bSelect = TRUE;
+ bSelect = sal_True;
if ( pItem->mbSelect != bSelect )
{
@@ -892,16 +892,16 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt )
// Alle Tabs von der aktuellen bis zur angeklickten
// Tab selektieren und alle Tabs von der angeklickten
// Tab bis zur letzten Tab deselektieren
- USHORT nCount = (USHORT)mpItemList->Count();
+ sal_uInt16 nCount = (sal_uInt16)mpItemList->Count();
n = nCurPos;
while ( n < nCount )
{
pItem = mpItemList->GetObject( n );
if ( n <= nPos )
- bSelect = TRUE;
+ bSelect = sal_True;
else
- bSelect = FALSE;
+ bSelect = sal_False;
if ( pItem->mbSelect != bSelect )
{
@@ -925,7 +925,7 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt )
}
else
ImplShowPage( nPos );
- mbInSelect = TRUE;
+ mbInSelect = sal_True;
return;
}
@@ -935,7 +935,7 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt )
// Gegebenenfalls den Double-Click-Handler rufen
if ( !rMEvt.GetModifier() && (!nSelId || (nSelId == mnCurPageId)) )
{
- USHORT nOldCurId = mnCurPageId;
+ sal_uInt16 nOldCurId = mnCurPageId;
mnCurPageId = nSelId;
DoubleClick();
// Abfrage, da im DoubleClick-Handler die aktuelle Seite
@@ -953,7 +953,7 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt )
// Nur Select ausfuehren, wenn noch nicht aktuelle Page
if ( nSelId != mnCurPageId )
{
- USHORT nPos = GetPagePos( nSelId );
+ sal_uInt16 nPos = GetPagePos( nSelId );
pItem = mpItemList->GetObject( nPos );
if ( pItem->mbEnable )
@@ -961,9 +961,9 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt )
if ( !pItem->mbSelect )
{
// Muss invalidiert werden
- BOOL bUpdate = FALSE;
+ sal_Bool bUpdate = sal_False;
if ( IsReallyVisible() && IsUpdateMode() )
- bUpdate = TRUE;
+ bUpdate = sal_True;
// Alle selektierten Items deselektieren
pItem = mpItemList->First();
@@ -971,7 +971,7 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt )
{
if ( pItem->mbSelect || (pItem->mnId == mnCurPageId) )
{
- pItem->mbSelect = FALSE;
+ pItem->mbSelect = sal_False;
if ( bUpdate )
Invalidate( pItem->maRect );
}
@@ -990,7 +990,7 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt )
}
else
ImplShowPage( nPos );
- mbInSelect = TRUE;
+ mbInSelect = sal_True;
}
return;
@@ -1004,7 +1004,7 @@ void TabBar::MouseButtonDown( const MouseEvent& rMEvt )
void TabBar::MouseButtonUp( const MouseEvent& rMEvt )
{
- mbInSelect = FALSE;
+ mbInSelect = sal_False;
Window::MouseButtonUp( rMEvt );
}
@@ -1013,7 +1013,7 @@ void TabBar::MouseButtonUp( const MouseEvent& rMEvt )
void TabBar::Paint( const Rectangle& )
{
// Items berechnen und ausgeben
- USHORT nItemCount = (USHORT)mpItemList->Count();
+ sal_uInt16 nItemCount = (sal_uInt16)mpItemList->Count();
ImplTabBarItem* pItem;
// kein Item, dann auch nichts zu tun
@@ -1026,7 +1026,7 @@ void TabBar::Paint( const Rectangle& )
// sichtbar wird
if ( mbFirstFormat )
{
- mbFirstFormat = FALSE;
+ mbFirstFormat = sal_False;
if ( mnCurPageId && (mnFirstPos == 0) && !mbDropPos )
{
@@ -1035,9 +1035,9 @@ void TabBar::Paint( const Rectangle& )
{
// mbDropPos setzen (bzw. misbrauchen) um Invalidate()
// zu unterbinden
- mbDropPos = TRUE;
+ mbDropPos = sal_True;
SetFirstPageId( mnCurPageId );
- mbDropPos = FALSE;
+ mbDropPos = sal_False;
if ( mnFirstPos != 0 )
ImplFormat();
}
@@ -1086,7 +1086,7 @@ void TabBar::Paint( const Rectangle& )
if ( nItemCount )
{
// letzten sichtbaren Eintrag suchen
- USHORT n = mnFirstPos+1;
+ sal_uInt16 n = mnFirstPos+1;
if ( n >= nItemCount )
n = nItemCount-1;
pItem = mpItemList->Seek( n );
@@ -1310,7 +1310,7 @@ void TabBar::Resize()
// Scroll-Buttons anordnen
long nHeight = aNewSize.Height();
// Font in der groesse Anpassen?
- ImplInitSettings( TRUE, FALSE );
+ ImplInitSettings( sal_True, sal_False );
long nX = mbMirrored ? (aNewSize.Width()-nHeight) : 0;
long nXDiff = mbMirrored ? -nHeight : nHeight;
@@ -1356,7 +1356,7 @@ void TabBar::Resize()
}
// Neu formatieren
- mbSizeFormat = TRUE;
+ mbSizeFormat = sal_True;
if ( IsReallyVisible() )
{
if ( ImplCalcWidth() )
@@ -1372,7 +1372,7 @@ void TabBar::Resize()
void TabBar::RequestHelp( const HelpEvent& rHEvt )
{
- USHORT nItemId = GetPageId( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) );
+ sal_uInt16 nItemId = GetPageId( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) );
if ( nItemId )
{
if ( rHEvt.GetMode() & HELPMODE_BALLOON )
@@ -1408,7 +1408,7 @@ void TabBar::RequestHelp( const HelpEvent& rHEvt )
// wenn dieser abgeschnitten oder nicht voll sichtbar ist
if ( rHEvt.GetMode() & (HELPMODE_QUICK | HELPMODE_BALLOON) )
{
- USHORT nPos = GetPagePos( nItemId );
+ sal_uInt16 nPos = GetPagePos( nItemId );
ImplTabBarItem* pItem = mpItemList->GetObject( nPos );
if ( pItem->mbShort ||
(pItem->maRect.Right()-TABBAR_OFFSET_X-5 > mnLastOffX) )
@@ -1450,14 +1450,14 @@ void TabBar::StateChanged( StateChangedType nType )
else if ( (nType == STATE_CHANGE_ZOOM) ||
(nType == STATE_CHANGE_CONTROLFONT) )
{
- ImplInitSettings( TRUE, FALSE );
+ ImplInitSettings( sal_True, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
Invalidate();
else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
{
- ImplInitSettings( FALSE, TRUE );
+ ImplInitSettings( sal_False, sal_True );
Invalidate();
}
else if ( nType == STATE_CHANGE_MIRRORING )
@@ -1483,7 +1483,7 @@ void TabBar::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
{
- ImplInitSettings( TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True );
Invalidate();
}
}
@@ -1552,7 +1552,7 @@ long TabBar::DeactivatePage()
if ( maDeactivatePageHdl.IsSet() )
return maDeactivatePageHdl.Call( this );
else
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -1562,7 +1562,7 @@ long TabBar::StartRenaming()
if ( maStartRenamingHdl.IsSet() )
return maStartRenamingHdl.Call( this );
else
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -1572,7 +1572,7 @@ long TabBar::AllowRenaming()
if ( maAllowRenamingHdl.IsSet() )
return maAllowRenamingHdl.Call( this );
else
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -1591,8 +1591,8 @@ void TabBar::Mirror()
// -----------------------------------------------------------------------
-void TabBar::InsertPage( USHORT nPageId, const XubString& rText,
- TabBarPageBits nBits, USHORT nPos )
+void TabBar::InsertPage( sal_uInt16 nPageId, const XubString& rText,
+ TabBarPageBits nBits, sal_uInt16 nPos )
{
DBG_ASSERT( nPageId, "TabBar::InsertPage(): PageId == 0" );
DBG_ASSERT( GetPagePos( nPageId ) == PAGE_NOT_FOUND,
@@ -1602,7 +1602,7 @@ void TabBar::InsertPage( USHORT nPageId, const XubString& rText,
// PageItem anlegen und in die Item-Liste eintragen
ImplTabBarItem* pItem = new ImplTabBarItem( nPageId, rText, nBits );
mpItemList->Insert( pItem, nPos );
- mbSizeFormat = TRUE;
+ mbSizeFormat = sal_True;
// CurPageId gegebenenfalls setzen
if ( !mnCurPageId )
@@ -1617,9 +1617,9 @@ void TabBar::InsertPage( USHORT nPageId, const XubString& rText,
// -----------------------------------------------------------------------
-Color TabBar::GetTabBgColor( USHORT nPageId ) const
+Color TabBar::GetTabBgColor( sal_uInt16 nPageId ) const
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
if ( nPos != PAGE_NOT_FOUND )
return mpItemList->GetObject( nPos )->maTabBgColor;
@@ -1627,9 +1627,9 @@ Color TabBar::GetTabBgColor( USHORT nPageId ) const
return Color( COL_AUTO );
}
-void TabBar::SetTabBgColor( USHORT nPageId, const Color& aTabBgColor )
+void TabBar::SetTabBgColor( sal_uInt16 nPageId, const Color& aTabBgColor )
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
ImplTabBarItem* pItem;
if ( nPos != PAGE_NOT_FOUND )
{
@@ -1652,9 +1652,9 @@ void TabBar::SetTabBgColor( USHORT nPageId, const Color& aTabBgColor )
// -----------------------------------------------------------------------
-void TabBar::RemovePage( USHORT nPageId )
+void TabBar::RemovePage( sal_uInt16 nPageId )
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
// Existiert Item
if ( nPos != PAGE_NOT_FOUND )
@@ -1668,7 +1668,7 @@ void TabBar::RemovePage( USHORT nPageId )
// Item-Daten loeschen
delete mpItemList->Remove( nPos );
- mbFormat = TRUE;
+ mbFormat = sal_True;
// Leiste neu ausgeben
if ( IsReallyVisible() && IsUpdateMode() )
@@ -1680,9 +1680,9 @@ void TabBar::RemovePage( USHORT nPageId )
// -----------------------------------------------------------------------
-void TabBar::MovePage( USHORT nPageId, USHORT nNewPos )
+void TabBar::MovePage( sal_uInt16 nPageId, sal_uInt16 nNewPos )
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
Pair aPair( nPos, nNewPos );
if ( nPos < nNewPos )
@@ -1697,7 +1697,7 @@ void TabBar::MovePage( USHORT nPageId, USHORT nNewPos )
// TabBar-Item in der Liste verschieben
ImplTabBarItem* pItem = mpItemList->Remove( nPos );
mpItemList->Insert( pItem, nNewPos );
- mbFormat = TRUE;
+ mbFormat = sal_True;
// Leiste neu ausgeben
if ( IsReallyVisible() && IsUpdateMode() )
@@ -1722,7 +1722,7 @@ void TabBar::Clear()
// Items aus der Liste loeschen
mpItemList->Clear();
- mbSizeFormat = TRUE;
+ mbSizeFormat = sal_True;
mnCurPageId = 0;
mnFirstPos = 0;
@@ -1735,9 +1735,9 @@ void TabBar::Clear()
// -----------------------------------------------------------------------
-void TabBar::EnablePage( USHORT nPageId, BOOL bEnable )
+void TabBar::EnablePage( sal_uInt16 nPageId, sal_Bool bEnable )
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
if ( nPos != PAGE_NOT_FOUND )
{
@@ -1758,21 +1758,21 @@ void TabBar::EnablePage( USHORT nPageId, BOOL bEnable )
// -----------------------------------------------------------------------
-BOOL TabBar::IsPageEnabled( USHORT nPageId ) const
+sal_Bool TabBar::IsPageEnabled( sal_uInt16 nPageId ) const
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
if ( nPos != PAGE_NOT_FOUND )
return mpItemList->GetObject( nPos )->mbEnable;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-void TabBar::SetPageBits( USHORT nPageId, TabBarPageBits nBits )
+void TabBar::SetPageBits( sal_uInt16 nPageId, TabBarPageBits nBits )
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
if ( nPos != PAGE_NOT_FOUND )
{
@@ -1791,26 +1791,26 @@ void TabBar::SetPageBits( USHORT nPageId, TabBarPageBits nBits )
// -----------------------------------------------------------------------
-TabBarPageBits TabBar::GetPageBits( USHORT nPageId ) const
+TabBarPageBits TabBar::GetPageBits( sal_uInt16 nPageId ) const
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
if ( nPos != PAGE_NOT_FOUND )
return mpItemList->GetObject( nPos )->mnBits;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-USHORT TabBar::GetPageCount() const
+sal_uInt16 TabBar::GetPageCount() const
{
- return (USHORT)mpItemList->Count();
+ return (sal_uInt16)mpItemList->Count();
}
// -----------------------------------------------------------------------
-USHORT TabBar::GetPageId( USHORT nPos ) const
+sal_uInt16 TabBar::GetPageId( sal_uInt16 nPos ) const
{
ImplTabBarItem* pItem = mpItemList->GetObject( nPos );
if ( pItem )
@@ -1821,13 +1821,13 @@ USHORT TabBar::GetPageId( USHORT nPos ) const
// -----------------------------------------------------------------------
-USHORT TabBar::GetPagePos( USHORT nPageId ) const
+sal_uInt16 TabBar::GetPagePos( sal_uInt16 nPageId ) const
{
ImplTabBarItem* pItem = mpItemList->First();
while ( pItem )
{
if ( pItem->mnId == nPageId )
- return (USHORT)mpItemList->GetCurPos();
+ return (sal_uInt16)mpItemList->GetCurPos();
pItem = mpItemList->Next();
}
@@ -1837,7 +1837,7 @@ USHORT TabBar::GetPagePos( USHORT nPageId ) const
// -----------------------------------------------------------------------
-USHORT TabBar::GetPageId( const Point& rPos ) const
+sal_uInt16 TabBar::GetPageId( const Point& rPos ) const
{
ImplTabBarItem* pItem = mpItemList->First();
while ( pItem )
@@ -1853,9 +1853,9 @@ USHORT TabBar::GetPageId( const Point& rPos ) const
// -----------------------------------------------------------------------
-Rectangle TabBar::GetPageRect( USHORT nPageId ) const
+Rectangle TabBar::GetPageRect( sal_uInt16 nPageId ) const
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
if ( nPos != PAGE_NOT_FOUND )
return mpItemList->GetObject( nPos )->maRect;
@@ -1865,9 +1865,9 @@ Rectangle TabBar::GetPageRect( USHORT nPageId ) const
// -----------------------------------------------------------------------
-void TabBar::SetCurPageId( USHORT nPageId )
+void TabBar::SetCurPageId( sal_uInt16 nPageId )
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
// Wenn Item nicht existiert, dann nichts machen
if ( nPos != PAGE_NOT_FOUND )
@@ -1878,9 +1878,9 @@ void TabBar::SetCurPageId( USHORT nPageId )
return;
// Muss invalidiert werden
- BOOL bUpdate = FALSE;
+ sal_Bool bUpdate = sal_False;
if ( IsReallyVisible() && IsUpdateMode() )
- bUpdate = TRUE;
+ bUpdate = sal_True;
ImplTabBarItem* pItem = mpItemList->GetObject( nPos );
ImplTabBarItem* pOldItem;
@@ -1894,14 +1894,14 @@ void TabBar::SetCurPageId( USHORT nPageId )
// deselktieren, wenn dies die einzige selektierte Seite ist
if ( !pItem->mbSelect && pOldItem )
{
- USHORT nSelPageCount = GetSelectPageCount();
+ sal_uInt16 nSelPageCount = GetSelectPageCount();
if ( nSelPageCount == 1 )
- pOldItem->mbSelect = FALSE;
- pItem->mbSelect = TRUE;
+ pOldItem->mbSelect = sal_False;
+ pItem->mbSelect = sal_True;
}
mnCurPageId = nPageId;
- mbFormat = TRUE;
+ mbFormat = sal_True;
// Dafuer sorgen, das aktuelle Page sichtbar wird
if ( IsReallyVisible() )
@@ -1923,7 +1923,7 @@ void TabBar::SetCurPageId( USHORT nPageId )
while ( (mbMirrored ? (pItem->maRect.Left() < mnOffX) : (pItem->maRect.Right() > nWidth)) ||
pItem->maRect.IsEmpty() )
{
- USHORT nNewPos = mnFirstPos+1;
+ sal_uInt16 nNewPos = mnFirstPos+1;
// Dafuer sorgen, das min. die aktuelle TabPages als
// erste TabPage sichtbar ist
if ( nNewPos >= nPos )
@@ -1954,12 +1954,12 @@ void TabBar::SetCurPageId( USHORT nPageId )
// -----------------------------------------------------------------------
-void TabBar::MakeVisible( USHORT nPageId )
+void TabBar::MakeVisible( sal_uInt16 nPageId )
{
if ( !IsReallyVisible() )
return;
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
// Wenn Item nicht existiert, dann nichts machen
if ( nPos != PAGE_NOT_FOUND )
@@ -1977,14 +1977,14 @@ void TabBar::MakeVisible( USHORT nPageId )
if ( mbFormat || pItem->maRect.IsEmpty() )
{
- mbFormat = TRUE;
+ mbFormat = sal_True;
ImplFormat();
}
while ( (pItem->maRect.Right() > nWidth) ||
pItem->maRect.IsEmpty() )
{
- USHORT nNewPos = mnFirstPos+1;
+ sal_uInt16 nNewPos = mnFirstPos+1;
// Dafuer sorgen, das min. die aktuelle TabPages als
// erste TabPage sichtbar ist
if ( nNewPos >= nPos )
@@ -2006,11 +2006,11 @@ void TabBar::MakeVisible( USHORT nPageId )
// -----------------------------------------------------------------------
-void TabBar::SetFirstPageId( USHORT nPageId )
+void TabBar::SetFirstPageId( sal_uInt16 nPageId )
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
- // Wenn Item nicht existiert, dann FALSE zurueckgeben
+ // Wenn Item nicht existiert, dann sal_False zurueckgeben
if ( nPos != PAGE_NOT_FOUND )
{
if ( nPos != mnFirstPos )
@@ -2018,8 +2018,8 @@ void TabBar::SetFirstPageId( USHORT nPageId )
// Dafuer sorgen, das nach Moeglichkteit soviele Pages wie
// moeglich sichtbar sind
ImplFormat();
- USHORT nLastFirstPos = ImplGetLastFirstPos();
- USHORT nNewPos;
+ sal_uInt16 nLastFirstPos = ImplGetLastFirstPos();
+ sal_uInt16 nNewPos;
if ( nPos > nLastFirstPos )
nNewPos = nLastFirstPos;
else
@@ -2028,7 +2028,7 @@ void TabBar::SetFirstPageId( USHORT nPageId )
if ( nNewPos != mnFirstPos )
{
mnFirstPos = nNewPos;
- mbFormat = TRUE;
+ mbFormat = sal_True;
// Leiste neu ausgeben (Achtung: mbDropPos beachten, da wenn
// dieses Flag gesetzt ist, wird direkt gepaintet)
@@ -2041,9 +2041,9 @@ void TabBar::SetFirstPageId( USHORT nPageId )
// -----------------------------------------------------------------------
-void TabBar::SelectPage( USHORT nPageId, BOOL bSelect )
+void TabBar::SelectPage( sal_uInt16 nPageId, sal_Bool bSelect )
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
if ( nPos != PAGE_NOT_FOUND )
{
@@ -2062,10 +2062,10 @@ void TabBar::SelectPage( USHORT nPageId, BOOL bSelect )
// -----------------------------------------------------------------------
-void TabBar::SelectPageRange( BOOL bSelect, USHORT nStartPos, USHORT nEndPos )
+void TabBar::SelectPageRange( sal_Bool bSelect, sal_uInt16 nStartPos, sal_uInt16 nEndPos )
{
Rectangle aPaintRect;
- USHORT nPos = nStartPos;
+ sal_uInt16 nPos = nStartPos;
ImplTabBarItem* pItem = mpItemList->Seek( nPos );
while ( pItem && (nPos <= nEndPos) )
{
@@ -2086,9 +2086,9 @@ void TabBar::SelectPageRange( BOOL bSelect, USHORT nStartPos, USHORT nEndPos )
// -----------------------------------------------------------------------
-USHORT TabBar::GetSelectPage( USHORT nSelIndex ) const
+sal_uInt16 TabBar::GetSelectPage( sal_uInt16 nSelIndex ) const
{
- USHORT nSelected = 0;
+ sal_uInt16 nSelected = 0;
ImplTabBarItem* pItem = mpItemList->First();
while ( pItem )
{
@@ -2106,9 +2106,9 @@ USHORT TabBar::GetSelectPage( USHORT nSelIndex ) const
// -----------------------------------------------------------------------
-USHORT TabBar::GetSelectPageCount() const
+sal_uInt16 TabBar::GetSelectPageCount() const
{
- USHORT nSelected = 0;
+ sal_uInt16 nSelected = 0;
ImplTabBarItem* pItem = mpItemList->First();
while ( pItem )
{
@@ -2123,22 +2123,22 @@ USHORT TabBar::GetSelectPageCount() const
// -----------------------------------------------------------------------
-BOOL TabBar::IsPageSelected( USHORT nPageId ) const
+sal_Bool TabBar::IsPageSelected( sal_uInt16 nPageId ) const
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
if ( nPos != PAGE_NOT_FOUND )
return mpItemList->GetObject( nPos )->mbSelect;
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL TabBar::StartEditMode( USHORT nPageId )
+sal_Bool TabBar::StartEditMode( sal_uInt16 nPageId )
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
if ( mpEdit || (nPos == PAGE_NOT_FOUND) || (mnLastOffX < 8) )
- return FALSE;
+ return sal_False;
mnEditId = nPageId;
if ( StartRenaming() )
@@ -2190,23 +2190,23 @@ BOOL TabBar::StartEditMode( USHORT nPageId )
mpEdit->GrabFocus();
mpEdit->SetSelection( Selection( 0, mpEdit->GetText().Len() ) );
mpEdit->Show();
- return TRUE;
+ return sal_True;
}
else
{
mnEditId = 0;
- return FALSE;
+ return sal_False;
}
}
// -----------------------------------------------------------------------
-void TabBar::EndEditMode( BOOL bCancel )
+void TabBar::EndEditMode( sal_Bool bCancel )
{
if ( mpEdit )
{
// call hdl
- BOOL bEnd = TRUE;
+ sal_Bool bEnd = sal_True;
mbEditCanceled = bCancel;
maEditText = mpEdit->GetText();
mpEdit->SetPostEvent();
@@ -2216,9 +2216,9 @@ void TabBar::EndEditMode( BOOL bCancel )
if ( nAllowRenaming == TABBAR_RENAMING_YES )
SetPageText( mnEditId, maEditText );
else if ( nAllowRenaming == TABBAR_RENAMING_NO )
- bEnd = FALSE;
+ bEnd = sal_False;
else // nAllowRenaming == TABBAR_RENAMING_CANCEL
- mbEditCanceled = TRUE;
+ mbEditCanceled = sal_True;
}
// renaming not allowed, than reset edit data
@@ -2238,30 +2238,30 @@ void TabBar::EndEditMode( BOOL bCancel )
// reset
maEditText.Erase();
- mbEditCanceled = FALSE;
+ mbEditCanceled = sal_False;
}
}
// -----------------------------------------------------------------------
-void TabBar::SetMirrored( BOOL bMirrored )
+void TabBar::SetMirrored( sal_Bool bMirrored )
{
if( mbMirrored != bMirrored )
{
mbMirrored = bMirrored;
- mbSizeFormat = TRUE;
+ mbSizeFormat = sal_True;
ImplInitControls(); // for button images
Resize(); // recalculates control positions
Mirror();
}
}
-void TabBar::SetEffectiveRTL( BOOL bRTL )
+void TabBar::SetEffectiveRTL( sal_Bool bRTL )
{
SetMirrored( bRTL != Application::GetSettings().GetLayoutRTL() );
}
-BOOL TabBar::IsEffectiveRTL() const
+sal_Bool TabBar::IsEffectiveRTL() const
{
return IsMirrored() != Application::GetSettings().GetLayoutRTL();
}
@@ -2273,7 +2273,7 @@ void TabBar::SetMaxPageWidth( long nMaxWidth )
if ( mnMaxPageWidth != nMaxWidth )
{
mnMaxPageWidth = nMaxWidth;
- mbSizeFormat = TRUE;
+ mbSizeFormat = sal_True;
// Leiste neu ausgeben
if ( IsReallyVisible() && IsUpdateMode() )
@@ -2288,7 +2288,7 @@ void TabBar::SetSelectColor()
if ( mbSelColor )
{
maSelColor = Color( COL_TRANSPARENT );
- mbSelColor = FALSE;
+ mbSelColor = sal_False;
Invalidate();
}
}
@@ -2302,7 +2302,7 @@ void TabBar::SetSelectColor( const Color& rColor )
if ( mbSelColor )
{
maSelColor = Color( COL_TRANSPARENT );
- mbSelColor = FALSE;
+ mbSelColor = sal_False;
Invalidate();
}
}
@@ -2311,7 +2311,7 @@ void TabBar::SetSelectColor( const Color& rColor )
if ( maSelColor != rColor )
{
maSelColor = rColor;
- mbSelColor = TRUE;
+ mbSelColor = sal_True;
Invalidate();
}
}
@@ -2324,7 +2324,7 @@ void TabBar::SetSelectTextColor()
if ( mbSelTextColor )
{
maSelTextColor = Color( COL_TRANSPARENT );
- mbSelTextColor = FALSE;
+ mbSelTextColor = sal_False;
Invalidate();
}
}
@@ -2338,7 +2338,7 @@ void TabBar::SetSelectTextColor( const Color& rColor )
if ( mbSelTextColor )
{
maSelTextColor = Color( COL_TRANSPARENT );
- mbSelTextColor = FALSE;
+ mbSelTextColor = sal_False;
Invalidate();
}
}
@@ -2347,7 +2347,7 @@ void TabBar::SetSelectTextColor( const Color& rColor )
if ( maSelTextColor != rColor )
{
maSelTextColor = rColor;
- mbSelTextColor = TRUE;
+ mbSelTextColor = sal_True;
Invalidate();
}
}
@@ -2355,13 +2355,13 @@ void TabBar::SetSelectTextColor( const Color& rColor )
// -----------------------------------------------------------------------
-void TabBar::SetPageText( USHORT nPageId, const XubString& rText )
+void TabBar::SetPageText( sal_uInt16 nPageId, const XubString& rText )
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
if ( nPos != PAGE_NOT_FOUND )
{
mpItemList->GetObject( nPos )->maText = rText;
- mbSizeFormat = TRUE;
+ mbSizeFormat = sal_True;
// Leiste neu ausgeben
if ( IsReallyVisible() && IsUpdateMode() )
@@ -2373,9 +2373,9 @@ void TabBar::SetPageText( USHORT nPageId, const XubString& rText )
// -----------------------------------------------------------------------
-XubString TabBar::GetPageText( USHORT nPageId ) const
+XubString TabBar::GetPageText( sal_uInt16 nPageId ) const
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
if ( nPos != PAGE_NOT_FOUND )
return mpItemList->GetObject( nPos )->maText;
else
@@ -2384,18 +2384,18 @@ XubString TabBar::GetPageText( USHORT nPageId ) const
// -----------------------------------------------------------------------
-void TabBar::SetHelpText( USHORT nPageId, const XubString& rText )
+void TabBar::SetHelpText( sal_uInt16 nPageId, const XubString& rText )
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
if ( nPos != PAGE_NOT_FOUND )
mpItemList->GetObject( nPos )->maHelpText = rText;
}
// -----------------------------------------------------------------------
-XubString TabBar::GetHelpText( USHORT nPageId ) const
+XubString TabBar::GetHelpText( sal_uInt16 nPageId ) const
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
if ( nPos != PAGE_NOT_FOUND )
{
ImplTabBarItem* pItem = mpItemList->GetObject( nPos );
@@ -2414,18 +2414,18 @@ XubString TabBar::GetHelpText( USHORT nPageId ) const
// -----------------------------------------------------------------------
-void TabBar::SetHelpId( USHORT nPageId, const rtl::OString& rHelpId )
+void TabBar::SetHelpId( sal_uInt16 nPageId, const rtl::OString& rHelpId )
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
if ( nPos != PAGE_NOT_FOUND )
mpItemList->GetObject( nPos )->maHelpId = rHelpId;
}
// -----------------------------------------------------------------------
-rtl::OString TabBar::GetHelpId( USHORT nPageId ) const
+rtl::OString TabBar::GetHelpId( sal_uInt16 nPageId ) const
{
- USHORT nPos = GetPagePos( nPageId );
+ sal_uInt16 nPos = GetPagePos( nPageId );
rtl::OString aRet;
if ( nPos != PAGE_NOT_FOUND )
aRet = mpItemList->GetObject( nPos )->maHelpId;
@@ -2446,10 +2446,10 @@ long TabBar::GetMinSize() const
// -----------------------------------------------------------------------
-BOOL TabBar::StartDrag( const CommandEvent& rCEvt, Region& rRegion )
+sal_Bool TabBar::StartDrag( const CommandEvent& rCEvt, Region& rRegion )
{
if ( !(mnWinStyle & WB_DRAG) || (rCEvt.GetCommand() != COMMAND_STARTDRAG) )
- return FALSE;
+ return sal_False;
// Testen, ob angeklickte Seite selektiert ist. Falls dies nicht
// der Fall ist, setzen wir ihn als aktuellen Eintrag. Falls Drag and
@@ -2459,11 +2459,11 @@ BOOL TabBar::StartDrag( const CommandEvent& rCEvt, Region& rRegion )
// da der Select schon den Bereich gescrollt haben kann
if ( rCEvt.IsMouseEvent() && !mbInSelect )
{
- USHORT nSelId = GetPageId( rCEvt.GetMousePosPixel() );
+ sal_uInt16 nSelId = GetPageId( rCEvt.GetMousePosPixel() );
// Falls kein Eintrag angeklickt wurde, starten wir kein Dragging
if ( !nSelId )
- return FALSE;
+ return sal_False;
// Testen, ob Seite selektiertiert ist. Falls nicht, als aktuelle
// Seite setzen und Select rufen.
@@ -2477,34 +2477,34 @@ BOOL TabBar::StartDrag( const CommandEvent& rCEvt, Region& rRegion )
ImplSelect();
}
else
- return FALSE;
+ return sal_False;
}
}
- mbInSelect = FALSE;
+ mbInSelect = sal_False;
Region aRegion;
// Region zuweisen
rRegion = aRegion;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-USHORT TabBar::ShowDropPos( const Point& rPos )
+sal_uInt16 TabBar::ShowDropPos( const Point& rPos )
{
ImplTabBarItem* pItem;
- USHORT nDropId;
- USHORT nNewDropPos;
- USHORT nItemCount = (USHORT)mpItemList->Count();
+ sal_uInt16 nDropId;
+ sal_uInt16 nNewDropPos;
+ sal_uInt16 nItemCount = (sal_uInt16)mpItemList->Count();
short nScroll = 0;
if ( rPos.X() > mnLastOffX-TABBAR_DRAG_SCROLLOFF )
{
pItem = mpItemList->GetObject( mpItemList->Count()-1 );
if ( !pItem->maRect.IsEmpty() && (rPos.X() > pItem->maRect.Right()) )
- nNewDropPos = (USHORT)mpItemList->Count();
+ nNewDropPos = (sal_uInt16)mpItemList->Count();
else
{
nNewDropPos = mnFirstPos+1;
@@ -2540,12 +2540,12 @@ USHORT TabBar::ShowDropPos( const Point& rPos )
if ( mbDropPos )
HideDropPos();
- mbDropPos = TRUE;
+ mbDropPos = sal_True;
mnDropPos = nNewDropPos;
if ( nScroll )
{
- USHORT nOldFirstPos = mnFirstPos;
+ sal_uInt16 nOldFirstPos = mnFirstPos;
SetFirstPageId( GetPageId( mnFirstPos+nScroll ) );
// Direkt ausgeben, da kein Paint bei Drag and Drop moeglich
@@ -2562,7 +2562,7 @@ USHORT TabBar::ShowDropPos( const Point& rPos )
Color aBlackColor( COL_BLACK );
long nX;
long nY = (maWinSize.Height()/2)-1;
- USHORT nCurPos = GetPagePos( mnCurPageId );
+ sal_uInt16 nCurPos = GetPagePos( mnCurPageId );
SetLineColor( aBlackColor );
if ( mnDropPos < nItemCount )
@@ -2606,7 +2606,7 @@ void TabBar::HideDropPos()
long nX;
long nY1 = (maWinSize.Height()/2)-3;
long nY2 = nY1 + 5;
- USHORT nItemCount = (USHORT)mpItemList->Count();
+ sal_uInt16 nItemCount = (sal_uInt16)mpItemList->Count();
if ( mnDropPos < nItemCount )
{
@@ -2633,17 +2633,17 @@ void TabBar::HideDropPos()
SetClipRegion();
}
- mbDropPos = FALSE;
+ mbDropPos = sal_False;
mnDropPos = 0;
}
}
// -----------------------------------------------------------------------
-BOOL TabBar::SwitchPage( const Point& rPos )
+sal_Bool TabBar::SwitchPage( const Point& rPos )
{
- BOOL bSwitch = FALSE;
- USHORT nSwitchId = GetPageId( rPos );
+ sal_Bool bSwitch = sal_False;
+ sal_uInt16 nSwitchId = GetPageId( rPos );
if ( !nSwitchId )
EndSwitchPage();
else
@@ -2660,16 +2660,16 @@ BOOL TabBar::SwitchPage( const Point& rPos )
{
if ( Time::GetSystemTicks() > mnSwitchTime+500 )
{
- mbInSwitching = TRUE;
+ mbInSwitching = sal_True;
if ( ImplDeactivatePage() )
{
SetCurPageId( mnSwitchId );
Update();
ImplActivatePage();
ImplSelect();
- bSwitch = TRUE;
+ bSwitch = sal_True;
}
- mbInSwitching = FALSE;
+ mbInSwitching = sal_False;
}
}
}
diff --git a/svtools/source/control/taskbar.cxx b/svtools/source/control/taskbar.cxx
index 232727951281..06c90818b13e 100755
--- a/svtools/source/control/taskbar.cxx
+++ b/svtools/source/control/taskbar.cxx
@@ -76,9 +76,9 @@ TaskBar::TaskBar( Window* pParent, WinBits nWinStyle ) :
mnOldStatusWidth = 0;
mnLines = 1;
mnWinBits = nWinStyle;
- mbStatusText = FALSE;
- mbShowItems = FALSE;
- mbAutoHide = FALSE;
+ mbStatusText = sal_False;
+ mbShowItems = sal_False;
+ mbAutoHide = sal_False;
ImplInitSettings();
}
@@ -309,13 +309,13 @@ void TaskBar::Resize()
if ( pTempButtonBar )
{
- USHORT i = 0;
- BOOL bVisibleItems = FALSE;
+ sal_uInt16 i = 0;
+ sal_Bool bVisibleItems = sal_False;
while ( i < pTempButtonBar->GetItemCount() )
{
if ( pTempButtonBar->IsItemVisible( pTempButtonBar->GetItemId( i ) ) )
{
- bVisibleItems = TRUE;
+ bVisibleItems = sal_True;
break;
}
i++;
@@ -464,14 +464,14 @@ void TaskBar::Format()
// -----------------------------------------------------------------------
-void TaskBar::SetLines( USHORT nLines )
+void TaskBar::SetLines( sal_uInt16 nLines )
{
mnLines = nLines;
}
// -----------------------------------------------------------------------
-void TaskBar::EnableAutoHide( BOOL bAutoHide )
+void TaskBar::EnableAutoHide( sal_Bool bAutoHide )
{
mbAutoHide = bAutoHide;
@@ -493,14 +493,14 @@ void TaskBar::ShowStatusText( const String& rText )
{
if ( !mbStatusText )
{
- mbStatusText = TRUE;
+ mbStatusText = sal_True;
if ( mpStatusBar->AreItemsVisible() )
{
- mbShowItems = TRUE;
+ mbShowItems = sal_True;
mpStatusBar->HideItems();
}
else
- mbShowItems = TRUE;
+ mbShowItems = sal_True;
maOldText = mpStatusBar->GetText();
Resize();
mpStatusBar->SetText( rText );
@@ -518,7 +518,7 @@ void TaskBar::HideStatusText()
{
if ( mbStatusText && mpStatusBar )
{
- mbStatusText = FALSE;
+ mbStatusText = sal_False;
mpStatusBar->SetText( maOldText );
Resize();
if ( mbShowItems )
diff --git a/svtools/source/control/taskbox.cxx b/svtools/source/control/taskbox.cxx
index 3f05d077b7c5..798126ae37af 100755
--- a/svtools/source/control/taskbox.cxx
+++ b/svtools/source/control/taskbox.cxx
@@ -60,7 +60,7 @@ TaskToolBox::TaskToolBox( Window* pParent, WinBits nWinStyle ) :
mnActiveItemId = 0;
mnTaskItem = 0;
mnSmallItem = TOOLBOX_ITEM_NOTFOUND;
- mbMinActivate = FALSE;
+ mbMinActivate = sal_False;
SetAlign( WINDOWALIGN_BOTTOM );
SetButtonType( BUTTON_SYMBOLTEXT );
@@ -82,14 +82,14 @@ TaskToolBox::~TaskToolBox()
// -----------------------------------------------------------------------
-void TaskToolBox::ActivateTaskItem( USHORT nItemId, BOOL bMinActivate )
+void TaskToolBox::ActivateTaskItem( sal_uInt16 nItemId, sal_Bool bMinActivate )
{
if ( nItemId )
{
if ( nItemId != mnActiveItemId )
{
if ( mnActiveItemId )
- CheckItem( mnActiveItemId, FALSE );
+ CheckItem( mnActiveItemId, sal_False );
CheckItem( nItemId );
mnActiveItemId = nItemId;
}
@@ -98,13 +98,13 @@ void TaskToolBox::ActivateTaskItem( USHORT nItemId, BOOL bMinActivate )
if ( !bMinActivate )
return;
- mbMinActivate = TRUE;
+ mbMinActivate = sal_True;
}
mnTaskItem = nItemId-1;
ActivateTask();
mnTaskItem = 0;
- mbMinActivate = FALSE;
+ mbMinActivate = sal_False;
}
}
@@ -135,7 +135,7 @@ void TaskToolBox::MouseButtonDown( const MouseEvent& rMEvt )
void TaskToolBox::Resize()
{
mnOldItemCount = mpItemList->Count();
- mnUpdatePos = (USHORT)mnOldItemCount;
+ mnUpdatePos = (sal_uInt16)mnOldItemCount;
mnUpdateNewPos = TOOLBOX_ITEM_NOTFOUND;
ImplFormatTaskToolBox();
ToolBox::Resize();
@@ -147,7 +147,7 @@ void TaskToolBox::Command( const CommandEvent& rCEvt )
{
if ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )
{
- USHORT nItemId = GetItemId( rCEvt.GetMousePosPixel() );
+ sal_uInt16 nItemId = GetItemId( rCEvt.GetMousePosPixel() );
// Dies machen wir nicht mehr, da es von zu vielen als stoerend empfunden wurde
// ActivateTaskItem( nItemId );
mnTaskItem = nItemId-1;
@@ -167,7 +167,7 @@ void TaskToolBox::RequestHelp( const HelpEvent& rHEvt )
{
if ( rHEvt.GetMode() & (HELPMODE_BALLOON | HELPMODE_QUICK) )
{
- USHORT nItemId = GetItemId( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) );
+ sal_uInt16 nItemId = GetItemId( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ) );
if ( nItemId )
{
@@ -196,8 +196,8 @@ void TaskToolBox::RequestHelp( const HelpEvent& rHEvt )
void TaskToolBox::Select()
{
- USHORT nItemId = GetCurItemId();
- ActivateTaskItem( nItemId, TRUE );
+ sal_uInt16 nItemId = GetCurItemId();
+ ActivateTaskItem( nItemId, sal_True );
}
// -----------------------------------------------------------------------
@@ -208,7 +208,7 @@ void TaskToolBox::ImplFormatTaskToolBox()
{
// Eintraege aus der Liste entfernen
while ( mpItemList->Count() > mnUpdatePos )
- delete mpItemList->Remove( (ULONG)mnUpdatePos );
+ delete mpItemList->Remove( (sal_uLong)mnUpdatePos );
mnUpdateNewPos = mnUpdatePos;
}
@@ -236,14 +236,14 @@ void TaskToolBox::ImplFormatTaskToolBox()
}
// Eintraege aus der ToolBox entfernen, die ersetzt werden
- USHORT nBtnPos = (mnUpdateNewPos*2);
+ sal_uInt16 nBtnPos = (mnUpdateNewPos*2);
while ( nBtnPos < GetItemCount() )
RemoveItem( nBtnPos );
if ( mnUpdateNewPos <= (mnActiveItemId-1) )
mnActiveItemId = 0;
// Neue Eintrage einfuegen
- USHORT i = mnUpdateNewPos;
+ sal_uInt16 i = mnUpdateNewPos;
while ( i < mpItemList->Count() )
{
ImplTaskItem* pItem = mpItemList->GetObject( i );
@@ -267,7 +267,7 @@ void TaskToolBox::ImplFormatTaskToolBox()
while ( (nTxtWidth > mnMaxTextWidth) && (aText.Len() > 3) );
}
- USHORT nItemId = i+1;
+ sal_uInt16 nItemId = i+1;
if ( aText.EqualsAscii( "..." ) )
InsertItem( nItemId, pItem->maImage, TIB_LEFT );
else
@@ -282,7 +282,7 @@ void TaskToolBox::ImplFormatTaskToolBox()
if ( mnNewActivePos+1 != mnActiveItemId )
{
if ( mnActiveItemId )
- CheckItem( mnActiveItemId, FALSE );
+ CheckItem( mnActiveItemId, sal_False );
mnActiveItemId = mnNewActivePos+1;
CheckItem( mnActiveItemId );
}
@@ -301,7 +301,7 @@ void TaskToolBox::StartUpdateTask()
// -----------------------------------------------------------------------
void TaskToolBox::UpdateTask( const Image& rImage, const String& rText,
- BOOL bActive )
+ sal_Bool bActive )
{
ImplTaskItem* pItem = mpItemList->GetObject( mnUpdatePos );
if ( pItem )
@@ -310,7 +310,7 @@ void TaskToolBox::UpdateTask( const Image& rImage, const String& rText,
{
// Eintraege aus der Liste entfernen
while ( mpItemList->Count() > mnUpdatePos )
- delete mpItemList->Remove( (ULONG)mnUpdatePos );
+ delete mpItemList->Remove( (sal_uLong)mnUpdatePos );
pItem = NULL;
}
}
@@ -340,7 +340,7 @@ void TaskToolBox::EndUpdateTask()
{
// Eintraege aus der Liste entfernen
while ( mpItemList->Count() > mnUpdatePos )
- delete mpItemList->Remove( (ULONG)mnUpdatePos );
+ delete mpItemList->Remove( (sal_uLong)mnUpdatePos );
mnUpdateNewPos = mnUpdatePos;
}
diff --git a/svtools/source/control/taskmisc.cxx b/svtools/source/control/taskmisc.cxx
index 62eaf020c8f0..35d5d8997624 100755
--- a/svtools/source/control/taskmisc.cxx
+++ b/svtools/source/control/taskmisc.cxx
@@ -73,9 +73,9 @@ WindowArrange::~WindowArrange()
// -----------------------------------------------------------------------
-static USHORT ImplCeilSqareRoot( USHORT nVal )
+static sal_uInt16 ImplCeilSqareRoot( sal_uInt16 nVal )
{
- USHORT i;
+ sal_uInt16 i;
// Ueberlauf verhindern
if ( nVal > 0xFE * 0xFE )
@@ -103,19 +103,19 @@ static void ImplPosSizeWindow( Window* pWindow,
void WindowArrange::ImplTile( const Rectangle& rRect )
{
- USHORT nCount = (USHORT)mpWinList->Count();
+ sal_uInt16 nCount = (sal_uInt16)mpWinList->Count();
if ( nCount < 3 )
{
ImplVert( rRect );
return;
}
- USHORT i;
- USHORT j;
- USHORT nCols;
- USHORT nRows;
- USHORT nActRows;
- USHORT nOffset;
+ sal_uInt16 i;
+ sal_uInt16 j;
+ sal_uInt16 nCols;
+ sal_uInt16 nRows;
+ sal_uInt16 nActRows;
+ sal_uInt16 nOffset;
long nOverWidth;
long nOverHeight;
Window* pWindow;
@@ -353,7 +353,7 @@ void WindowArrange::ImplCascade( const Rectangle& rRect )
// -----------------------------------------------------------------------
-void WindowArrange::Arrange( USHORT nType, const Rectangle& rRect )
+void WindowArrange::Arrange( sal_uInt16 nType, const Rectangle& rRect )
{
if ( !mpWinList->Count() )
return;
diff --git a/svtools/source/control/taskstat.cxx b/svtools/source/control/taskstat.cxx
index 2e1cffcaac10..7792fe32bff8 100755
--- a/svtools/source/control/taskstat.cxx
+++ b/svtools/source/control/taskstat.cxx
@@ -50,7 +50,7 @@
struct ImplTaskSBFldItem
{
TaskStatusFieldItem maItem;
- USHORT mnId;
+ sal_uInt16 mnId;
long mnOffX;
};
@@ -58,37 +58,37 @@ DECLARE_LIST( ImplTaskSBItemList, ImplTaskSBFldItem* )
// =======================================================================
-BOOL ITaskStatusNotify::MouseButtonDown( USHORT, const MouseEvent& )
+sal_Bool ITaskStatusNotify::MouseButtonDown( sal_uInt16, const MouseEvent& )
{
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL ITaskStatusNotify::MouseButtonUp( USHORT, const MouseEvent& )
+sal_Bool ITaskStatusNotify::MouseButtonUp( sal_uInt16, const MouseEvent& )
{
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL ITaskStatusNotify::MouseMove( USHORT, const MouseEvent& )
+sal_Bool ITaskStatusNotify::MouseMove( sal_uInt16, const MouseEvent& )
{
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL ITaskStatusNotify::Command( USHORT, const CommandEvent& )
+sal_Bool ITaskStatusNotify::Command( sal_uInt16, const CommandEvent& )
{
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL ITaskStatusNotify::UpdateHelp( USHORT )
+sal_Bool ITaskStatusNotify::UpdateHelp( sal_uInt16 )
{
- return FALSE;
+ return sal_False;
}
// =======================================================================
@@ -116,7 +116,7 @@ TaskStatusFieldItem::TaskStatusFieldItem( ITaskStatusNotify* pNotify,
const Image& rImage,
const XubString& rQuickHelpText,
const XubString& rHelpText,
- USHORT nFlags ) :
+ sal_uInt16 nFlags ) :
mpNotify( pNotify ),
maImage( rImage ),
maQuickHelpText( rQuickHelpText ),
@@ -156,8 +156,8 @@ TaskStatusBar::TaskStatusBar( Window* pParent, WinBits nWinStyle ) :
mnItemWidth = 0;
mnFieldWidth = 0;
mnFieldFlags = 0;
- mbFlashItems = FALSE;
- mbOutInterval = FALSE;
+ mbFlashItems = sal_False;
+ mbOutInterval = sal_False;
maTimer.SetTimeoutHdl( LINK( this, TaskStatusBar, ImplTimerHdl ) );
}
@@ -183,9 +183,9 @@ TaskStatusBar::~TaskStatusBar()
IMPL_LINK( TaskStatusBar, ImplTimerHdl, Timer*, EMPTYARG )
{
- BOOL bUpdate = ImplUpdateClock();
+ sal_Bool bUpdate = ImplUpdateClock();
if ( ImplUpdateFlashItems() )
- bUpdate = TRUE;
+ bUpdate = sal_True;
if ( bUpdate )
SetItemData( TASKSTATUSBAR_STATUSFIELDID, NULL );
@@ -194,7 +194,7 @@ IMPL_LINK( TaskStatusBar, ImplTimerHdl, Timer*, EMPTYARG )
// -----------------------------------------------------------------------
-ImplTaskSBFldItem* TaskStatusBar::ImplGetFieldItem( USHORT nItemId ) const
+ImplTaskSBFldItem* TaskStatusBar::ImplGetFieldItem( sal_uInt16 nItemId ) const
{
if ( !mpFieldItemList )
return NULL;
@@ -213,11 +213,11 @@ ImplTaskSBFldItem* TaskStatusBar::ImplGetFieldItem( USHORT nItemId ) const
// -----------------------------------------------------------------------
-ImplTaskSBFldItem* TaskStatusBar::ImplGetFieldItem( const Point& rPos, BOOL& rFieldRect ) const
+ImplTaskSBFldItem* TaskStatusBar::ImplGetFieldItem( const Point& rPos, sal_Bool& rFieldRect ) const
{
if ( GetItemId( rPos ) == TASKSTATUSBAR_STATUSFIELDID )
{
- rFieldRect = TRUE;
+ rFieldRect = sal_True;
if ( mpFieldItemList )
{
@@ -233,14 +233,14 @@ ImplTaskSBFldItem* TaskStatusBar::ImplGetFieldItem( const Point& rPos, BOOL& rFi
}
}
else
- rFieldRect = FALSE;
+ rFieldRect = sal_False;
return NULL;
}
// -----------------------------------------------------------------------
-BOOL TaskStatusBar::ImplUpdateClock()
+sal_Bool TaskStatusBar::ImplUpdateClock()
{
if ( mnFieldFlags & TASKSTATUSFIELD_CLOCK )
{
@@ -250,40 +250,40 @@ BOOL TaskStatusBar::ImplUpdateClock()
(aTime.GetHour() != maTime.GetHour()) )
{
maTime = aTime;
- maTimeText = SvtSysLocale().GetLocaleData().getTime( aTime, FALSE, FALSE );
- return TRUE;
+ maTimeText = SvtSysLocale().GetLocaleData().getTime( aTime, sal_False, sal_False );
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL TaskStatusBar::ImplUpdateFlashItems()
+sal_Bool TaskStatusBar::ImplUpdateFlashItems()
{
if ( mbFlashItems )
{
if ( mbOutInterval )
{
maTimer.SetTimeout( 900 );
- mbOutInterval = FALSE;
+ mbOutInterval = sal_False;
}
else
{
maTimer.SetTimeout( 700 );
- mbOutInterval = TRUE;
+ mbOutInterval = sal_True;
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-void TaskStatusBar::ImplUpdateField( BOOL bItems )
+void TaskStatusBar::ImplUpdateField( sal_Bool bItems )
{
maTimer.Stop();
@@ -291,15 +291,15 @@ void TaskStatusBar::ImplUpdateField( BOOL bItems )
{
ImplTaskSBFldItem* pItem = mpFieldItemList->First();
mnItemWidth = 0;
- mbFlashItems = FALSE;
- mbOutInterval = FALSE;
+ mbFlashItems = sal_False;
+ mbOutInterval = sal_False;
while ( pItem )
{
mnItemWidth += TASKSTATUSBAR_IMAGEOFFX;
pItem->mnOffX = mnItemWidth;
mnItemWidth += pItem->maItem.GetImage().GetSizePixel().Width();
if ( pItem->maItem.GetFlags() & TASKSTATUSFIELDITEM_FLASH )
- mbFlashItems = TRUE;
+ mbFlashItems = sal_True;
pItem = mpFieldItemList->Next();
}
@@ -308,7 +308,7 @@ void TaskStatusBar::ImplUpdateField( BOOL bItems )
{
if ( mnFieldFlags & TASKSTATUSFIELD_CLOCK )
{
- XubString aStr = SvtSysLocale().GetLocaleData().getTime( Time( 23, 59, 59 ), FALSE, FALSE );
+ XubString aStr = SvtSysLocale().GetLocaleData().getTime( Time( 23, 59, 59 ), sal_False, sal_False );
mnClockWidth = GetTextWidth( aStr )+(TASKSTATUSBAR_CLOCXOFFX*2);
}
else
@@ -326,7 +326,7 @@ void TaskStatusBar::ImplUpdateField( BOOL bItems )
{
mnFieldWidth = nNewWidth;
long nOffset = GetItemOffset( TASKSTATUSBAR_STATUSFIELDID );
- USHORT nItemPos = GetItemPos( TASKSTATUSBAR_STATUSFIELDID );
+ sal_uInt16 nItemPos = GetItemPos( TASKSTATUSBAR_STATUSFIELDID );
InsertItem( TASKSTATUSBAR_STATUSFIELDID, nNewWidth, SIB_RIGHT | SIB_IN | SIB_USERDRAW, nOffset, nItemPos );
}
else
@@ -341,7 +341,7 @@ void TaskStatusBar::ImplUpdateField( BOOL bItems )
if ( mbFlashItems || (mnFieldFlags & TASKSTATUSFIELD_CLOCK) )
{
ImplUpdateClock();
- mbOutInterval = TRUE;
+ mbOutInterval = sal_True;
ImplUpdateFlashItems();
maTimer.Start();
}
@@ -351,12 +351,12 @@ void TaskStatusBar::ImplUpdateField( BOOL bItems )
void TaskStatusBar::MouseButtonDown( const MouseEvent& rMEvt )
{
- BOOL bFieldRect;
- BOOL bBaseClass = FALSE;
+ sal_Bool bFieldRect;
+ sal_Bool bBaseClass = sal_False;
ImplTaskSBFldItem* pItem = ImplGetFieldItem( rMEvt.GetPosPixel(), bFieldRect );
ITaskStatusNotify* pNotify = mpNotify;
- USHORT nItemId = 0;
+ sal_uInt16 nItemId = 0;
if ( bFieldRect )
nItemId = TASKSTATUSBAR_CLOCKID;
@@ -378,12 +378,12 @@ void TaskStatusBar::MouseButtonDown( const MouseEvent& rMEvt )
void TaskStatusBar::MouseButtonUp( const MouseEvent& rMEvt )
{
- BOOL bFieldRect;
- BOOL bBaseClass = FALSE;
+ sal_Bool bFieldRect;
+ sal_Bool bBaseClass = sal_False;
ImplTaskSBFldItem* pItem = ImplGetFieldItem( rMEvt.GetPosPixel(), bFieldRect );
ITaskStatusNotify* pNotify = mpNotify;
- USHORT nItemId = 0;
+ sal_uInt16 nItemId = 0;
if ( bFieldRect )
nItemId = TASKSTATUSBAR_CLOCKID;
@@ -405,12 +405,12 @@ void TaskStatusBar::MouseButtonUp( const MouseEvent& rMEvt )
void TaskStatusBar::MouseMove( const MouseEvent& rMEvt )
{
- BOOL bFieldRect;
- BOOL bBaseClass = FALSE;
+ sal_Bool bFieldRect;
+ sal_Bool bBaseClass = sal_False;
ImplTaskSBFldItem* pItem = ImplGetFieldItem( rMEvt.GetPosPixel(), bFieldRect );
ITaskStatusNotify* pNotify = mpNotify;
- USHORT nItemId = 0;
+ sal_uInt16 nItemId = 0;
if ( bFieldRect )
nItemId = TASKSTATUSBAR_CLOCKID;
@@ -432,12 +432,12 @@ void TaskStatusBar::MouseMove( const MouseEvent& rMEvt )
void TaskStatusBar::Command( const CommandEvent& rCEvt )
{
- BOOL bFieldRect;
- BOOL bBaseClass = FALSE;
+ sal_Bool bFieldRect;
+ sal_Bool bBaseClass = sal_False;
ImplTaskSBFldItem* pItem = ImplGetFieldItem( rCEvt.GetMousePosPixel(), bFieldRect );
ITaskStatusNotify* pNotify = mpNotify;
- USHORT nItemId = 0;
+ sal_uInt16 nItemId = 0;
if ( bFieldRect )
nItemId = TASKSTATUSBAR_CLOCKID;
@@ -459,12 +459,12 @@ void TaskStatusBar::Command( const CommandEvent& rCEvt )
void TaskStatusBar::RequestHelp( const HelpEvent& rHEvt )
{
- BOOL bFieldRect;
+ sal_Bool bFieldRect;
ImplTaskSBFldItem* pItem = ImplGetFieldItem( ScreenToOutputPixel( rHEvt.GetMousePosPixel() ), bFieldRect );
if ( bFieldRect )
{
ITaskStatusNotify* pNotify = mpNotify;
- USHORT nItemId = 0;
+ sal_uInt16 nItemId = 0;
if ( pItem )
{
@@ -571,28 +571,28 @@ void TaskStatusBar::UserDraw( const UserDrawEvent& rUDEvt )
// -----------------------------------------------------------------------
-void TaskStatusBar::InsertStatusField( long, USHORT,
- USHORT nFlags )
+void TaskStatusBar::InsertStatusField( long, sal_uInt16,
+ sal_uInt16 nFlags )
{
mnFieldFlags = nFlags;
- ImplUpdateField( FALSE );
+ ImplUpdateField( sal_False );
}
// -----------------------------------------------------------------------
-void TaskStatusBar::SetFieldFlags( USHORT nFlags )
+void TaskStatusBar::SetFieldFlags( sal_uInt16 nFlags )
{
if ( mnFieldFlags != nFlags )
{
mnFieldFlags = nFlags;
- ImplUpdateField( FALSE );
+ ImplUpdateField( sal_False );
}
}
// -----------------------------------------------------------------------
-void TaskStatusBar::AddStatusFieldItem( USHORT nItemId, const TaskStatusFieldItem& rItem,
- USHORT nPos )
+void TaskStatusBar::AddStatusFieldItem( sal_uInt16 nItemId, const TaskStatusFieldItem& rItem,
+ sal_uInt16 nPos )
{
DBG_ASSERT( nItemId, "TaskStatusBar::AddStatusFieldItem() - Item is 0" );
DBG_ASSERT( !ImplGetFieldItem( nItemId ), "TaskStatusBar::AddStatusFieldItem() - Item-Id already exist" );
@@ -604,50 +604,50 @@ void TaskStatusBar::AddStatusFieldItem( USHORT nItemId, const TaskStatusFieldIte
pItem->maItem = rItem;
pItem->mnId = nItemId;
pItem->mnOffX = 0;
- mpFieldItemList->Insert( pItem, (ULONG)nPos );
+ mpFieldItemList->Insert( pItem, (sal_uLong)nPos );
- ImplUpdateField( TRUE );
+ ImplUpdateField( sal_True );
}
// -----------------------------------------------------------------------
-void TaskStatusBar::ModifyStatusFieldItem( USHORT nItemId, const TaskStatusFieldItem& rItem )
+void TaskStatusBar::ModifyStatusFieldItem( sal_uInt16 nItemId, const TaskStatusFieldItem& rItem )
{
ImplTaskSBFldItem* pItem = ImplGetFieldItem( nItemId );
if ( pItem )
{
- BOOL bUpdate = (pItem->maItem.GetImage() != rItem.GetImage()) ||
+ sal_Bool bUpdate = (pItem->maItem.GetImage() != rItem.GetImage()) ||
(pItem->maItem.GetFlags() != rItem.GetFlags());
pItem->maItem = rItem;
if ( bUpdate )
- ImplUpdateField( TRUE );
+ ImplUpdateField( sal_True );
}
}
// -----------------------------------------------------------------------
-void TaskStatusBar::RemoveStatusFieldItem( USHORT nItemId )
+void TaskStatusBar::RemoveStatusFieldItem( sal_uInt16 nItemId )
{
ImplTaskSBFldItem* pItem = ImplGetFieldItem( nItemId );
if ( pItem )
{
mpFieldItemList->Remove( pItem );
delete pItem;
- ImplUpdateField( TRUE );
+ ImplUpdateField( sal_True );
}
}
// -----------------------------------------------------------------------
-BOOL TaskStatusBar::GetStatusFieldItem( USHORT nItemId, TaskStatusFieldItem& rItem ) const
+sal_Bool TaskStatusBar::GetStatusFieldItem( sal_uInt16 nItemId, TaskStatusFieldItem& rItem ) const
{
ImplTaskSBFldItem* pItem = ImplGetFieldItem( nItemId );
if ( pItem )
{
rItem = pItem->maItem;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index f0bd192fc02c..c84eb17afecc 100644
--- a/svtools/source/control/toolbarmenu.cxx
+++ b/svtools/source/control/toolbarmenu.cxx
@@ -163,7 +163,7 @@ const Reference< XAccessibleContext >& ToolbarMenuEntry::GetAccessible( bool bCr
{
if( mpControl )
{
- mxAccContext = Reference< XAccessibleContext >( mpControl->GetAccessible( TRUE ), UNO_QUERY );
+ mxAccContext = Reference< XAccessibleContext >( mpControl->GetAccessible( sal_True ), UNO_QUERY );
}
else
{
@@ -843,7 +843,7 @@ void ToolbarMenu::appendSeparator()
ValueSet* ToolbarMenu::createEmptyValueSetControl()
{
ValueSet* pSet = new ValueSet( this, WB_TABSTOP | WB_MENUSTYLEVALUESET | WB_FLATVALUESET | WB_NOBORDER | WB_NO_DIRECTSELECT );
- pSet->EnableFullItemMode( FALSE );
+ pSet->EnableFullItemMode( sal_False );
pSet->SetColor( GetControlBackground() );
pSet->SetHighlightHdl( LINK( this, ToolbarMenu, HighlightHdl ) );
return pSet;
@@ -927,7 +927,7 @@ void ToolbarMenu::implHighlightEntry( int nHighlightEntry, bool bHighlight )
if( bHighlight && IsNativeControlSupported( CTRL_MENU_POPUP, PART_MENU_ITEM ) )
{
bDrawItemRect = false;
- if( FALSE == DrawNativeControl( CTRL_MENU_POPUP, PART_MENU_ITEM,
+ if( sal_False == DrawNativeControl( CTRL_MENU_POPUP, PART_MENU_ITEM,
aItemRect,
CTRL_STATE_SELECTED | ( pEntry->mbEnabled? CTRL_STATE_ENABLED: 0 ),
ImplControlValue(),
@@ -1017,7 +1017,7 @@ void ToolbarMenu::implHighlightEntry( const MouseEvent& rMEvt, bool bMBDown )
Size aOutSz = GetOutputSizePixel();
if ( ( nMouseY >= 0 ) && ( nMouseY < aOutSz.Height() ) )
{
- bool bHighlighted = FALSE;
+ bool bHighlighted = sal_False;
const int nEntryCount = mpImpl->maEntryVector.size();
int nEntry;
@@ -1092,11 +1092,11 @@ static bool implCheckSubControlCursorMove( Control* pControl, bool bUp, int& nLa
ValueSet* pValueSet = dynamic_cast< ValueSet* >( pControl );
if( pValueSet )
{
- USHORT nItemPos = pValueSet->GetItemPos( pValueSet->GetSelectItemId() );
+ sal_uInt16 nItemPos = pValueSet->GetItemPos( pValueSet->GetSelectItemId() );
if( nItemPos != VALUESET_ITEM_NOTFOUND )
{
- const USHORT nColCount = pValueSet->GetColCount();
- const USHORT nLine = nItemPos / nColCount;
+ const sal_uInt16 nColCount = pValueSet->GetColCount();
+ const sal_uInt16 nLine = nItemPos / nColCount;
nLastColumn = nItemPos - (nLine * nColCount);
@@ -1106,7 +1106,7 @@ static bool implCheckSubControlCursorMove( Control* pControl, bool bUp, int& nLa
}
else
{
- const USHORT nLineCount = (pValueSet->GetItemCount() + nColCount - 1) / nColCount;
+ const sal_uInt16 nLineCount = (pValueSet->GetItemCount() + nColCount - 1) / nColCount;
return (nLine+1) < nLineCount;
}
}
@@ -1195,19 +1195,19 @@ ToolbarMenuEntry* ToolbarMenu::implCursorUpDown( bool bUp, bool bHomeEnd )
// --------------------------------------------------------------------
-void ToolbarMenu_Impl::implHighlightControl( USHORT nCode, Control* pControl )
+void ToolbarMenu_Impl::implHighlightControl( sal_uInt16 nCode, Control* pControl )
{
ValueSet* pValueSet = dynamic_cast< ValueSet* >( pControl );
if( pValueSet )
{
- const USHORT nItemCount = pValueSet->GetItemCount();
- USHORT nItemPos = VALUESET_ITEM_NOTFOUND;
+ const sal_uInt16 nItemCount = pValueSet->GetItemCount();
+ sal_uInt16 nItemPos = VALUESET_ITEM_NOTFOUND;
switch( nCode )
{
case KEY_UP:
{
- const USHORT nColCount = pValueSet->GetColCount();
- const USHORT nLastLine = nItemCount / nColCount;
+ const sal_uInt16 nColCount = pValueSet->GetColCount();
+ const sal_uInt16 nLastLine = nItemCount / nColCount;
nItemPos = std::min( ((nLastLine-1) * nColCount) + mnLastColumn, nItemCount-1 );
break;
}
@@ -1231,7 +1231,7 @@ void ToolbarMenu_Impl::implHighlightControl( USHORT nCode, Control* pControl )
void ToolbarMenu::KeyInput( const KeyEvent& rKEvent )
{
Control* pForwardControl = 0;
- USHORT nCode = rKEvent.GetKeyCode().GetCode();
+ sal_uInt16 nCode = rKEvent.GetKeyCode().GetCode();
switch ( nCode )
{
case KEY_UP:
@@ -1308,7 +1308,7 @@ void ToolbarMenu::KeyInput( const KeyEvent& rKEvent )
// --------------------------------------------------------------------
static void ImplPaintCheckBackground( Window* i_pWindow, const Rectangle& i_rRect, bool i_bHighlight )
{
- BOOL bNativeOk = FALSE;
+ sal_Bool bNativeOk = sal_False;
if( i_pWindow->IsNativeControlSupported( CTRL_TOOLBAR, PART_BUTTON ) )
{
ImplControlValue aControlValue;
@@ -1325,7 +1325,7 @@ static void ImplPaintCheckBackground( Window* i_pWindow, const Rectangle& i_rRec
{
const StyleSettings& rSettings = i_pWindow->GetSettings().GetStyleSettings();
Color aColor( i_bHighlight ? rSettings.GetMenuHighlightTextColor() : rSettings.GetHighlightColor() );
- i_pWindow->DrawSelectionBackground( i_rRect, 0, i_bHighlight, TRUE, FALSE, 2, NULL, &aColor );
+ i_pWindow->DrawSelectionBackground( i_rRect, 0, i_bHighlight, sal_True, sal_False, 2, NULL, &aColor );
}
}
@@ -1375,7 +1375,7 @@ static long ImplGetNativeCheckAndRadioSize( Window* pWin, long& rCheckHeight, lo
void ToolbarMenu::implPaint( ToolbarMenuEntry* pThisOnly, bool bHighlighted )
{
- USHORT nBorder = 0; long nStartY = 0; // from Menu implementations, needed when we support native menu background & scrollable menu
+ sal_uInt16 nBorder = 0; long nStartY = 0; // from Menu implementations, needed when we support native menu background & scrollable menu
long nFontHeight = GetTextHeight();
// long nExtra = nFontHeight/4;
@@ -1425,9 +1425,9 @@ void ToolbarMenu::implPaint( ToolbarMenuEntry* pThisOnly, bool bHighlighted )
{
long nTextOffsetY = ((pEntry->maSize.Height()-nFontHeight)/2);
- USHORT nTextStyle = 0;
- USHORT nSymbolStyle = 0;
- USHORT nImageStyle = 0;
+ sal_uInt16 nTextStyle = 0;
+ sal_uInt16 nSymbolStyle = 0;
+ sal_uInt16 nImageStyle = 0;
if( !pEntry->mbEnabled )
{
@@ -1538,7 +1538,7 @@ void ToolbarMenu::implPaint( ToolbarMenuEntry* pThisOnly, bool bHighlighted )
aTmpPos.X() = aPos.X() + (bTitle ? 4 : mpImpl->mnTextPos);
aTmpPos.Y() = aPos.Y();
aTmpPos.Y() += nTextOffsetY;
- USHORT nStyle = nTextStyle|TEXT_DRAW_MNEMONIC;
+ sal_uInt16 nStyle = nTextStyle|TEXT_DRAW_MNEMONIC;
DrawCtrlText( aTmpPos, pEntry->maText, 0, pEntry->maText.Len(), nStyle, NULL, NULL ); // pVector, pDisplayText );
}
diff --git a/svtools/source/control/toolbarmenuacc.cxx b/svtools/source/control/toolbarmenuacc.cxx
index 020467084748..9ffc4fc55f04 100644
--- a/svtools/source/control/toolbarmenuacc.cxx
+++ b/svtools/source/control/toolbarmenuacc.cxx
@@ -213,7 +213,7 @@ sal_Int32 SAL_CALL ToolbarMenuAcc::getAccessibleIndexInParent() throw (RuntimeEx
Window* pParent = mpParent->mrMenu.GetParent();
if( pParent )
{
- for( USHORT i = 0, nCount = pParent->GetChildCount(); i < nCount ; i++ )
+ for( sal_uInt16 i = 0, nCount = pParent->GetChildCount(); i < nCount ; i++ )
{
if( pParent->GetChild( i ) == &mpParent->mrMenu )
return i;
@@ -473,7 +473,7 @@ Any SAL_CALL ToolbarMenuAcc::getAccessibleKeyBinding() throw (RuntimeException)
sal_Int32 SAL_CALL ToolbarMenuAcc::getForeground() throw (RuntimeException)
{
ThrowIfDisposed();
- UINT32 nColor = Application::GetSettings().GetStyleSettings().GetMenuTextColor().GetColor();
+ sal_uInt32 nColor = Application::GetSettings().GetStyleSettings().GetMenuTextColor().GetColor();
return static_cast<sal_Int32>(nColor);
}
@@ -482,7 +482,7 @@ sal_Int32 SAL_CALL ToolbarMenuAcc::getForeground() throw (RuntimeException)
sal_Int32 SAL_CALL ToolbarMenuAcc::getBackground() throw (RuntimeException)
{
ThrowIfDisposed();
- UINT32 nColor = Application::GetSettings().GetStyleSettings().GetMenuColor().GetColor();
+ sal_uInt32 nColor = Application::GetSettings().GetStyleSettings().GetMenuColor().GetColor();
return static_cast<sal_Int32>(nColor);
}
diff --git a/svtools/source/control/toolbarmenuimp.hxx b/svtools/source/control/toolbarmenuimp.hxx
index d1de4f704b76..a190fd9f205d 100644
--- a/svtools/source/control/toolbarmenuimp.hxx
+++ b/svtools/source/control/toolbarmenuimp.hxx
@@ -308,7 +308,7 @@ struct ToolbarMenu_Impl
ToolbarMenuEntry* implGetEntry( int nEntry ) const;
void notifyHighlightedEntry();
- void implHighlightControl( USHORT nCode, Control* pControl );
+ void implHighlightControl( sal_uInt16 nCode, Control* pControl );
};
}
diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx
index 66da5636d89c..848ef4c3e10e 100644
--- a/svtools/source/control/valueacc.cxx
+++ b/svtools/source/control/valueacc.cxx
@@ -225,7 +225,7 @@ uno::Reference< accessibility::XAccessible > SAL_CALL ValueSetAcc::getAccessible
ThrowIfDisposed();
const vos::OGuard aSolarGuard( Application::GetSolarMutex() );
uno::Reference< accessibility::XAccessible > xRet;
- ValueSetItem* pItem = getItem (sal::static_int_cast< USHORT >(i));
+ ValueSetItem* pItem = getItem (sal::static_int_cast< sal_uInt16 >(i));
if( pItem )
xRet = pItem->GetAccessible( mbIsTransientChildrenDisabled );
@@ -265,7 +265,7 @@ sal_Int32 SAL_CALL ValueSetAcc::getAccessibleIndexInParent()
{
sal_Bool bFound = sal_False;
- for( USHORT i = 0, nCount = pParent->GetChildCount(); ( i < nCount ) && !bFound; i++ )
+ for( sal_uInt16 i = 0, nCount = pParent->GetChildCount(); ( i < nCount ) && !bFound; i++ )
{
if( pParent->GetChild( i ) == mpParent )
{
@@ -450,12 +450,12 @@ uno::Reference< accessibility::XAccessible > SAL_CALL ValueSetAcc::getAccessible
{
ThrowIfDisposed();
const vos::OGuard aSolarGuard( Application::GetSolarMutex() );
- const USHORT nItemId = mpParent->GetItemId( Point( aPoint.X, aPoint.Y ) );
+ const sal_uInt16 nItemId = mpParent->GetItemId( Point( aPoint.X, aPoint.Y ) );
uno::Reference< accessibility::XAccessible > xRet;
if( VALUESET_ITEM_NOTFOUND != nItemId )
{
- const USHORT nItemPos = mpParent->GetItemPos( nItemId );
+ const sal_uInt16 nItemPos = mpParent->GetItemPos( nItemId );
if( VALUESET_ITEM_NONEITEM != nItemPos )
{
@@ -559,7 +559,7 @@ sal_Int32 SAL_CALL ValueSetAcc::getForeground( )
throw (uno::RuntimeException)
{
ThrowIfDisposed();
- UINT32 nColor = Application::GetSettings().GetStyleSettings().GetWindowTextColor().GetColor();
+ sal_uInt32 nColor = Application::GetSettings().GetStyleSettings().GetWindowTextColor().GetColor();
return static_cast<sal_Int32>(nColor);
}
@@ -569,7 +569,7 @@ sal_Int32 SAL_CALL ValueSetAcc::getBackground( )
throw (uno::RuntimeException)
{
ThrowIfDisposed();
- UINT32 nColor = Application::GetSettings().GetStyleSettings().GetWindowColor().GetColor();
+ sal_uInt32 nColor = Application::GetSettings().GetStyleSettings().GetWindowColor().GetColor();
return static_cast<sal_Int32>(nColor);
}
@@ -580,7 +580,7 @@ void SAL_CALL ValueSetAcc::selectAccessibleChild( sal_Int32 nChildIndex )
{
ThrowIfDisposed();
const vos::OGuard aSolarGuard( Application::GetSolarMutex() );
- ValueSetItem* pItem = getItem (sal::static_int_cast< USHORT >(nChildIndex));
+ ValueSetItem* pItem = getItem (sal::static_int_cast< sal_uInt16 >(nChildIndex));
if(pItem != NULL)
{
@@ -598,7 +598,7 @@ sal_Bool SAL_CALL ValueSetAcc::isAccessibleChildSelected( sal_Int32 nChildIndex
{
ThrowIfDisposed();
const vos::OGuard aSolarGuard( Application::GetSolarMutex() );
- ValueSetItem* pItem = getItem (sal::static_int_cast< USHORT >(nChildIndex));
+ ValueSetItem* pItem = getItem (sal::static_int_cast< sal_uInt16 >(nChildIndex));
sal_Bool bRet = sal_False;
if (pItem != NULL)
@@ -637,7 +637,7 @@ sal_Int32 SAL_CALL ValueSetAcc::getSelectedAccessibleChildCount()
const vos::OGuard aSolarGuard( Application::GetSolarMutex() );
sal_Int32 nRet = 0;
- for( USHORT i = 0, nCount = getItemCount(); i < nCount; i++ )
+ for( sal_uInt16 i = 0, nCount = getItemCount(); i < nCount; i++ )
{
ValueSetItem* pItem = getItem (i);
@@ -657,7 +657,7 @@ uno::Reference< accessibility::XAccessible > SAL_CALL ValueSetAcc::getSelectedAc
const vos::OGuard aSolarGuard( Application::GetSolarMutex() );
uno::Reference< accessibility::XAccessible > xRet;
- for( USHORT i = 0, nCount = getItemCount(), nSel = 0; ( i < nCount ) && !xRet.is(); i++ )
+ for( sal_uInt16 i = 0, nCount = getItemCount(), nSel = 0; ( i < nCount ) && !xRet.is(); i++ )
{
ValueSetItem* pItem = getItem(i);
@@ -734,9 +734,9 @@ void SAL_CALL ValueSetAcc::disposing (void)
}
-USHORT ValueSetAcc::getItemCount (void) const
+sal_uInt16 ValueSetAcc::getItemCount (void) const
{
- USHORT nCount = mpParent->ImplGetVisibleItemCount();
+ sal_uInt16 nCount = mpParent->ImplGetVisibleItemCount();
// When the None-Item is visible then increase the number of items by
// one.
if (HasNoneField())
@@ -745,7 +745,7 @@ USHORT ValueSetAcc::getItemCount (void) const
}
-ValueSetItem* ValueSetAcc::getItem (USHORT nIndex) const
+ValueSetItem* ValueSetAcc::getItem (sal_uInt16 nIndex) const
{
ValueSetItem* pItem = NULL;
@@ -759,7 +759,7 @@ ValueSetItem* ValueSetAcc::getItem (USHORT nIndex) const
nIndex -= 1;
}
if (pItem == NULL)
- pItem = mpParent->ImplGetVisibleItem (static_cast<USHORT>(nIndex));
+ pItem = mpParent->ImplGetVisibleItem (static_cast<sal_uInt16>(nIndex));
return pItem;
}
@@ -935,9 +935,9 @@ sal_Int32 SAL_CALL ValueItemAcc::getAccessibleIndexInParent()
{
bool bDone = false;
- USHORT nCount = mpParent->mrParent.ImplGetVisibleItemCount();
+ sal_uInt16 nCount = mpParent->mrParent.ImplGetVisibleItemCount();
ValueSetItem* pItem;
- for (USHORT i=0; i<nCount && !bDone; i++)
+ for (sal_uInt16 i=0; i<nCount && !bDone; i++)
{
// Guard the retrieval of the i-th child with a try/catch block
// just in case the number of children changes in the mean time.
@@ -1226,7 +1226,7 @@ uno::Any SAL_CALL ValueItemAcc::getAccessibleKeyBinding()
sal_Int32 SAL_CALL ValueItemAcc::getForeground( )
throw (uno::RuntimeException)
{
- UINT32 nColor = Application::GetSettings().GetStyleSettings().GetWindowTextColor().GetColor();
+ sal_uInt32 nColor = Application::GetSettings().GetStyleSettings().GetWindowTextColor().GetColor();
return static_cast<sal_Int32>(nColor);
}
@@ -1235,7 +1235,7 @@ sal_Int32 SAL_CALL ValueItemAcc::getForeground( )
sal_Int32 SAL_CALL ValueItemAcc::getBackground( )
throw (uno::RuntimeException)
{
- UINT32 nColor;
+ sal_uInt32 nColor;
if (mpParent && mpParent->meType == VALUESETITEM_COLOR)
nColor = mpParent->maColor.GetColor();
else
diff --git a/svtools/source/control/valueimp.hxx b/svtools/source/control/valueimp.hxx
index abde4a015ab8..bc5252372be9 100755
--- a/svtools/source/control/valueimp.hxx
+++ b/svtools/source/control/valueimp.hxx
@@ -83,8 +83,8 @@ class ValueSet;
struct ValueSetItem
{
ValueSet& mrParent;
- USHORT mnId;
- USHORT mnBits;
+ sal_uInt16 mnId;
+ sal_uInt16 mnBits;
ValueSetItemType meType;
Image maImage;
Color maColor;
@@ -142,7 +142,7 @@ public:
~ValueSetAcc();
void FireAccessibleEvent( short nEventId, const ::com::sun::star::uno::Any& rOldValue, const ::com::sun::star::uno::Any& rNewValue );
- BOOL HasAccessibleListeners() const { return( mxEventListeners.size() > 0 ); }
+ sal_Bool HasAccessibleListeners() const { return( mxEventListeners.size() > 0 ); }
static ValueSetAcc* getImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rxData ) throw();
@@ -222,7 +222,7 @@ private:
/** Return the number of items. This takes the None-Item into account.
*/
- USHORT getItemCount (void) const;
+ sal_uInt16 getItemCount (void) const;
/** Return the item associated with the given index. The None-Item is
taken into account which, when present, is taken to be the first
@@ -233,7 +233,7 @@ private:
@return
Returns NULL when the given index is out of range.
*/
- ValueSetItem* getItem (USHORT nIndex) const;
+ ValueSetItem* getItem (sal_uInt16 nIndex) const;
/** Check whether or not the object has been disposed (or is in the
state of beeing disposed). If that is the case then
@@ -288,7 +288,7 @@ public:
void ParentDestroyed();
void FireAccessibleEvent( short nEventId, const ::com::sun::star::uno::Any& rOldValue, const ::com::sun::star::uno::Any& rNewValue );
- BOOL HasAccessibleListeners() const { return( mxEventListeners.size() > 0 ); }
+ sal_Bool HasAccessibleListeners() const { return( mxEventListeners.size() > 0 ); }
static ValueItemAcc* getImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rxData ) throw();
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index 62193eadf735..8875ce66354c 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -74,21 +74,21 @@ void ValueSet::ImplInit()
mnUserVisLines = 0;
mnSpacing = 0;
mnFrameStyle = 0;
- mbFormat = TRUE;
- mbHighlight = FALSE ;
- mbSelection = FALSE;
- mbNoSelection = TRUE;
- mbDrawSelection = TRUE;
- mbBlackSel = FALSE;
- mbDoubleSel = FALSE;
- mbScroll = FALSE;
- mbDropPos = FALSE;
- mbFullMode = TRUE;
+ mbFormat = sal_True;
+ mbHighlight = sal_False ;
+ mbSelection = sal_False;
+ mbNoSelection = sal_True;
+ mbDrawSelection = sal_True;
+ mbBlackSel = sal_False;
+ mbDoubleSel = sal_False;
+ mbScroll = sal_False;
+ mbDropPos = sal_False;
+ mbFullMode = sal_True;
// #106446#, #106601# force mirroring of virtual device
maVirDev.EnableRTL( GetParent()->IsRTLEnabled() );
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
}
// -----------------------------------------------------------------------
@@ -120,7 +120,7 @@ ValueSet::ValueSet( Window* pParent, const ResId& rResId, bool bDisableTransient
ValueSet::~ValueSet()
{
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent>
- xComponent (GetAccessible(FALSE), ::com::sun::star::uno::UNO_QUERY);
+ xComponent (GetAccessible(sal_False), ::com::sun::star::uno::UNO_QUERY);
if (xComponent.is())
xComponent->dispose ();
@@ -156,8 +156,8 @@ void ValueSet::ImplDeleteItems()
// -----------------------------------------------------------------------
-void ValueSet::ImplInitSettings( BOOL bFont,
- BOOL bForeground, BOOL bBackground )
+void ValueSet::ImplInitSettings( sal_Bool bFont,
+ sal_Bool bForeground, sal_Bool bBackground )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -315,7 +315,7 @@ void ValueSet::ImplFormatItem( ValueSetItem* pItem )
aPos.X() += (aRectSize.Width()-aImageSize.Width())/2;
aPos.Y() += (aRectSize.Height()-aImageSize.Height())/2;
- USHORT nImageStyle = 0;
+ sal_uInt16 nImageStyle = 0;
if( !IsEnabled() )
nImageStyle |= IMAGE_DRAW_DISABLE;
@@ -345,7 +345,7 @@ void ValueSet::ImplFormatItem( ValueSetItem* pItem )
void ValueSet::Format()
{
Size aWinSize = GetOutputSizePixel();
- ULONG nItemCount = mpImpl->mpItemList->Count();
+ sal_uLong nItemCount = mpImpl->mpItemList->Count();
WinBits nStyle = GetStyle();
long nTxtHeight = GetTextHeight();
long nOff;
@@ -425,7 +425,7 @@ void ValueSet::Format()
{
if ( mnUserItemWidth )
{
- mnCols = (USHORT)((aWinSize.Width()-nScrBarWidth+nSpace) / (mnUserItemWidth+nSpace));
+ mnCols = (sal_uInt16)((aWinSize.Width()-nScrBarWidth+nSpace) / (mnUserItemWidth+nSpace));
if ( !mnCols )
mnCols = 1;
}
@@ -436,7 +436,7 @@ void ValueSet::Format()
mnCols = mnUserCols;
// Zeilenanzahl berechnen
- mbScroll = FALSE;
+ mbScroll = sal_False;
mnLines = (long)mpImpl->mpItemList->Count() / mnCols;
if ( mpImpl->mpItemList->Count() % mnCols )
mnLines++;
@@ -455,13 +455,13 @@ void ValueSet::Format()
else
mnVisLines = mnLines;
if ( mnLines > mnVisLines )
- mbScroll = TRUE;
+ mbScroll = sal_True;
if ( mnLines <= mnVisLines )
mnFirstLine = 0;
else
{
- if ( mnFirstLine > (USHORT)(mnLines-mnVisLines) )
- mnFirstLine = (USHORT)(mnLines-mnVisLines);
+ if ( mnFirstLine > (sal_uInt16)(mnLines-mnVisLines) )
+ mnFirstLine = (sal_uInt16)(mnLines-mnVisLines);
}
// Itemgroessen berechnen
@@ -492,7 +492,7 @@ void ValueSet::Format()
// Init VirDev
maVirDev.SetSettings( GetSettings() );
maVirDev.SetBackground( GetBackground() );
- maVirDev.SetOutputSizePixel( aWinSize, TRUE );
+ maVirDev.SetOutputSizePixel( aWinSize, sal_True );
// Bei zu kleinen Items machen wir nichts
long nMinHeight = 2;
@@ -509,7 +509,7 @@ void ValueSet::Format()
}
}
- for ( ULONG i = 0; i < nItemCount; i++ )
+ for ( sal_uLong i = 0; i < nItemCount; i++ )
{
ValueSetItem* pItem = mpImpl->mpItemList->GetObject( i );
pItem->maRect.SetEmpty();
@@ -535,17 +535,17 @@ void ValueSet::Format()
(aHighColor.GetBlue() > 0x80)) ||
((aHighColor.GetRed() == 0x80) && (aHighColor.GetGreen() == 0x80) &&
(aHighColor.GetBlue() == 0x80)) )
- mbBlackSel = TRUE;
+ mbBlackSel = sal_True;
else
- mbBlackSel = FALSE;
+ mbBlackSel = sal_False;
// Wenn die Items groesser sind, dann die Selektion doppelt so breit
// zeichnen
if ( (nStyle & WB_DOUBLEBORDER) &&
((nItemWidth >= 25) && (nItemHeight >= 20)) )
- mbDoubleSel = TRUE;
+ mbDoubleSel = sal_True;
else
- mbDoubleSel = FALSE;
+ mbDoubleSel = sal_False;
// Calculate offsets
long nStartX;
@@ -587,8 +587,8 @@ void ValueSet::Format()
}
// draw items
- ULONG nFirstItem = mnFirstLine * mnCols;
- ULONG nLastItem = nFirstItem + (mnVisLines * mnCols);
+ sal_uLong nFirstItem = mnFirstLine * mnCols;
+ sal_uLong nLastItem = nFirstItem + (mnVisLines * mnCols);
if ( !mbFullMode )
{
@@ -598,13 +598,13 @@ void ValueSet::Format()
if ( y+(mnVisLines*(nItemHeight+nSpace)) < aWinSize.Height() )
nLastItem += mnCols;
}
- for ( ULONG i = 0; i < nItemCount; i++ )
+ for ( sal_uLong i = 0; i < nItemCount; i++ )
{
ValueSetItem* pItem = mpImpl->mpItemList->GetObject( i );
if ( (i >= nFirstItem) && (i < nLastItem) )
{
- const BOOL bWasEmpty = pItem->maRect.IsEmpty();
+ const sal_Bool bWasEmpty = pItem->maRect.IsEmpty();
pItem->maRect.Left() = x;
pItem->maRect.Top() = y;
@@ -667,7 +667,7 @@ void ValueSet::Format()
}
// Jetzt haben wir formatiert und warten auf das naechste
- mbFormat = FALSE;
+ mbFormat = sal_False;
// ScrollBar loeschen
if ( pDelScrBar )
@@ -709,13 +709,13 @@ void ValueSet::ImplDrawSelect()
if ( !IsReallyVisible() )
return;
- BOOL bFocus = HasFocus();
- BOOL bDrawSel;
+ sal_Bool bFocus = HasFocus();
+ sal_Bool bDrawSel;
if ( (mbNoSelection && !mbHighlight) || (!mbDrawSelection && mbHighlight) )
- bDrawSel = FALSE;
+ bDrawSel = sal_False;
else
- bDrawSel = TRUE;
+ bDrawSel = sal_True;
if ( !bFocus &&
((mbNoSelection && !mbHighlight) || (!mbDrawSelection && mbHighlight)) )
@@ -725,7 +725,7 @@ void ValueSet::ImplDrawSelect()
return;
}
- USHORT nItemId = mnSelItemId;
+ sal_uInt16 nItemId = mnSelItemId;
for( int stage = 0; stage < 2; stage++ )
{
@@ -898,12 +898,12 @@ void ValueSet::ImplDrawSelect()
// -----------------------------------------------------------------------
-void ValueSet::ImplHideSelect( USHORT nItemId )
+void ValueSet::ImplHideSelect( sal_uInt16 nItemId )
{
Rectangle aRect;
- USHORT nItemPos = GetItemPos( nItemId );
- if ( nItemPos != sal::static_int_cast<USHORT>(LIST_ENTRY_NOTFOUND) )
+ sal_uInt16 nItemPos = GetItemPos( nItemId );
+ if ( nItemPos != sal::static_int_cast<sal_uInt16>(LIST_ENTRY_NOTFOUND) )
aRect = mpImpl->mpItemList->GetObject( nItemPos )->maRect;
else
{
@@ -922,42 +922,42 @@ void ValueSet::ImplHideSelect( USHORT nItemId )
// -----------------------------------------------------------------------
-void ValueSet::ImplHighlightItem( USHORT nItemId, BOOL bIsSelection )
+void ValueSet::ImplHighlightItem( sal_uInt16 nItemId, sal_Bool bIsSelection )
{
if ( mnHighItemId != nItemId )
{
// Alten merken, um vorherige Selektion zu entfernen
- USHORT nOldItem = mnHighItemId;
+ sal_uInt16 nOldItem = mnHighItemId;
mnHighItemId = nItemId;
// Wenn keiner selektiert ist, dann Selektion nicht malen
if ( !bIsSelection && mbNoSelection )
- mbDrawSelection = FALSE;
+ mbDrawSelection = sal_False;
// Neu ausgeben und alte Selection wegnehmen
ImplHideSelect( nOldItem );
ImplDrawSelect();
- mbDrawSelection = TRUE;
+ mbDrawSelection = sal_True;
}
}
// -----------------------------------------------------------------------
-void ValueSet::ImplDrawDropPos( BOOL bShow )
+void ValueSet::ImplDrawDropPos( sal_Bool bShow )
{
if ( (mnDropPos != VALUESET_ITEM_NOTFOUND) && mpImpl->mpItemList->Count() )
{
- USHORT nItemPos = mnDropPos;
- USHORT nItemId1;
- USHORT nItemId2 = 0;
- BOOL bRight;
+ sal_uInt16 nItemPos = mnDropPos;
+ sal_uInt16 nItemId1;
+ sal_uInt16 nItemId2 = 0;
+ sal_Bool bRight;
if ( nItemPos >= mpImpl->mpItemList->Count() )
{
- nItemPos = (USHORT)(mpImpl->mpItemList->Count()-1);
- bRight = TRUE;
+ nItemPos = (sal_uInt16)(mpImpl->mpItemList->Count()-1);
+ bRight = sal_True;
}
else
- bRight = FALSE;
+ bRight = sal_False;
nItemId1 = GetItemId( nItemPos );
if ( (nItemId1 != mnSelItemId) && (nItemId1 != mnHighItemId) )
@@ -996,7 +996,7 @@ void ValueSet::ImplDrawDropPos( BOOL bShow )
Point aPos = aRect1.RightCenter();
nX = aPos.X()-2;
nY = aPos.Y();
- for ( USHORT i = 0; i < 4; i++ )
+ for ( sal_uInt16 i = 0; i < 4; i++ )
DrawLine( Point( nX-i, nY-i ), Point( nX-i, nY+i ) );
}
if ( !aRect2.IsEmpty() )
@@ -1004,7 +1004,7 @@ void ValueSet::ImplDrawDropPos( BOOL bShow )
Point aPos = aRect2.LeftCenter();
nX = aPos.X()+2;
nY = aPos.Y();
- for ( USHORT i = 0; i < 4; i++ )
+ for ( sal_uInt16 i = 0; i < 4; i++ )
DrawLine( Point( nX+i, nY-i ), Point( nX+i, nY+i ) );
}
}
@@ -1089,7 +1089,7 @@ void ValueSet::ImplDraw()
// -----------------------------------------------------------------------
-BOOL ValueSet::ImplScroll( const Point& rPos )
+sal_Bool ValueSet::ImplScroll( const Point& rPos )
{
Size aOutSize = GetOutputSizePixel();
long nScrBarWidth;
@@ -1100,10 +1100,10 @@ BOOL ValueSet::ImplScroll( const Point& rPos )
nScrBarWidth = 0;
if ( !mbScroll || (rPos.X() < 0) || (rPos.X() > aOutSize.Width()-nScrBarWidth) )
- return FALSE;
+ return sal_False;
long nScrollOffset;
- USHORT nOldLine = mnFirstLine;
+ sal_uInt16 nOldLine = mnFirstLine;
const Rectangle& rTopRect = mpImpl->mpItemList->GetObject( mnFirstLine*mnCols )->maRect;
if ( rTopRect.GetHeight() <= 16 )
nScrollOffset = VALUESET_SCROLL_OFFSET/2;
@@ -1116,7 +1116,7 @@ BOOL ValueSet::ImplScroll( const Point& rPos )
mnFirstLine--;
}
if ( (mnFirstLine == nOldLine) &&
- (mnFirstLine < (USHORT)(mnLines-mnVisLines)) && (rPos.Y() < aOutSize.Height()) )
+ (mnFirstLine < (sal_uInt16)(mnLines-mnVisLines)) && (rPos.Y() < aOutSize.Height()) )
{
long nBottomPos = mpImpl->mpItemList->GetObject( (mnFirstLine+mnVisLines-1)*mnCols )->maRect.Bottom();
if ( (rPos.Y() >= nBottomPos-nScrollOffset) && (rPos.Y() <= nBottomPos) )
@@ -1125,17 +1125,17 @@ BOOL ValueSet::ImplScroll( const Point& rPos )
if ( mnFirstLine != nOldLine )
{
- mbFormat = TRUE;
+ mbFormat = sal_True;
ImplDraw();
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-USHORT ValueSet::ImplGetItem( const Point& rPos, BOOL bMove ) const
+sal_uInt16 ValueSet::ImplGetItem( const Point& rPos, sal_Bool bMove ) const
{
if ( mpNoneItem )
{
@@ -1146,14 +1146,14 @@ USHORT ValueSet::ImplGetItem( const Point& rPos, BOOL bMove ) const
Point aDefPos;
Rectangle aWinRect( aDefPos, maVirDev.GetOutputSizePixel() );
- ULONG nItemCount = mpImpl->mpItemList->Count();
- for ( ULONG i = 0; i < nItemCount; i++ )
+ sal_uLong nItemCount = mpImpl->mpItemList->Count();
+ for ( sal_uLong i = 0; i < nItemCount; i++ )
{
ValueSetItem* pItem = mpImpl->mpItemList->GetObject( i );
if ( pItem->maRect.IsInside( rPos ) )
{
if ( aWinRect.IsInside( rPos ) )
- return (USHORT)i;
+ return (sal_uInt16)i;
else
return VALUESET_ITEM_NOTFOUND;
}
@@ -1173,7 +1173,7 @@ USHORT ValueSet::ImplGetItem( const Point& rPos, BOOL bMove ) const
// -----------------------------------------------------------------------
-ValueSetItem* ValueSet::ImplGetItem( USHORT nPos )
+ValueSetItem* ValueSet::ImplGetItem( sal_uInt16 nPos )
{
if ( nPos == VALUESET_ITEM_NONEITEM )
return mpNoneItem;
@@ -1185,8 +1185,8 @@ ValueSetItem* ValueSet::ImplGetItem( USHORT nPos )
ValueSetItem* ValueSet::ImplGetFirstItem()
{
- USHORT nItemCount = (USHORT)mpImpl->mpItemList->Count();
- USHORT i = 0;
+ sal_uInt16 nItemCount = (sal_uInt16)mpImpl->mpItemList->Count();
+ sal_uInt16 i = 0;
while ( i < nItemCount )
{
@@ -1201,9 +1201,9 @@ ValueSetItem* ValueSet::ImplGetFirstItem()
// -----------------------------------------------------------------------
-USHORT ValueSet::ImplGetVisibleItemCount() const
+sal_uInt16 ValueSet::ImplGetVisibleItemCount() const
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
for( sal_Int32 n = 0, nItemCount = mpImpl->mpItemList->Count(); n < nItemCount; n++ )
{
@@ -1218,10 +1218,10 @@ USHORT ValueSet::ImplGetVisibleItemCount() const
// -----------------------------------------------------------------------
-ValueSetItem* ValueSet::ImplGetVisibleItem( USHORT nVisiblePos )
+ValueSetItem* ValueSet::ImplGetVisibleItem( sal_uInt16 nVisiblePos )
{
ValueSetItem* pRet = NULL;
- USHORT nFoundPos = 0;
+ sal_uInt16 nFoundPos = 0;
for( sal_Int32 n = 0, nItemCount = mpImpl->mpItemList->Count(); ( n < nItemCount ) && !pRet; n++ )
{
@@ -1238,7 +1238,7 @@ ValueSetItem* ValueSet::ImplGetVisibleItem( USHORT nVisiblePos )
void ValueSet::ImplFireAccessibleEvent( short nEventId, const ::com::sun::star::uno::Any& rOldValue, const ::com::sun::star::uno::Any& rNewValue )
{
- ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( FALSE ) );
+ ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( sal_False ) );
if( pAcc )
pAcc->FireAccessibleEvent( nEventId, rOldValue, rNewValue );
@@ -1246,9 +1246,9 @@ void ValueSet::ImplFireAccessibleEvent( short nEventId, const ::com::sun::star::
// -----------------------------------------------------------------------
-BOOL ValueSet::ImplHasAccessibleListeners()
+sal_Bool ValueSet::ImplHasAccessibleListeners()
{
- ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( FALSE ) );
+ ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( sal_False ) );
return( pAcc && pAcc->HasAccessibleListeners() );
}
@@ -1256,11 +1256,11 @@ BOOL ValueSet::ImplHasAccessibleListeners()
IMPL_LINK( ValueSet,ImplScrollHdl, ScrollBar*, pScrollBar )
{
- USHORT nNewFirstLine = (USHORT)pScrollBar->GetThumbPos();
+ sal_uInt16 nNewFirstLine = (sal_uInt16)pScrollBar->GetThumbPos();
if ( nNewFirstLine != mnFirstLine )
{
mnFirstLine = nNewFirstLine;
- mbFormat = TRUE;
+ mbFormat = sal_True;
ImplDraw();
}
return 0;
@@ -1270,13 +1270,13 @@ IMPL_LINK( ValueSet,ImplScrollHdl, ScrollBar*, pScrollBar )
IMPL_LINK( ValueSet,ImplTimerHdl, Timer*, EMPTYARG )
{
- ImplTracking( GetPointerPosPixel(), TRUE );
+ ImplTracking( GetPointerPosPixel(), sal_True );
return 0;
}
// -----------------------------------------------------------------------
-void ValueSet::ImplTracking( const Point& rPos, BOOL bRepeat )
+void ValueSet::ImplTracking( const Point& rPos, sal_Bool bRepeat )
{
if ( bRepeat || mbSelection )
{
@@ -1295,22 +1295,22 @@ void ValueSet::ImplTracking( const Point& rPos, BOOL bRepeat )
if ( pItem && (pItem->meType != VALUESETITEM_SPACE) )
{
if( GetStyle() & WB_MENUSTYLEVALUESET )
- mbHighlight = TRUE;
+ mbHighlight = sal_True;
ImplHighlightItem( pItem->mnId );
}
else
{
if( GetStyle() & WB_MENUSTYLEVALUESET )
- mbHighlight = TRUE;
+ mbHighlight = sal_True;
- ImplHighlightItem( mnSelItemId, FALSE );
+ ImplHighlightItem( mnSelItemId, sal_False );
}
}
// -----------------------------------------------------------------------
-void ValueSet::ImplEndTracking( const Point& rPos, BOOL bCancel )
+void ValueSet::ImplEndTracking( const Point& rPos, sal_Bool bCancel )
{
ValueSetItem* pItem;
@@ -1325,15 +1325,15 @@ void ValueSet::ImplEndTracking( const Point& rPos, BOOL bCancel )
SelectItem( pItem->mnId );
if ( !mbSelection && !(GetStyle() & WB_NOPOINTERFOCUS) )
GrabFocus();
- mbHighlight = FALSE;
- mbSelection = FALSE;
+ mbHighlight = sal_False;
+ mbSelection = sal_False;
Select();
}
else
{
- ImplHighlightItem( mnSelItemId, FALSE );
- mbHighlight = FALSE;
- mbSelection = FALSE;
+ ImplHighlightItem( mnSelItemId, sal_False );
+ mbHighlight = sal_False;
+ mbSelection = sal_False;
}
}
@@ -1346,7 +1346,7 @@ void ValueSet::MouseButtonDown( const MouseEvent& rMEvt )
ValueSetItem* pItem = ImplGetItem( ImplGetItem( rMEvt.GetPosPixel() ) );
if ( mbSelection )
{
- mbHighlight = TRUE;
+ mbHighlight = sal_True;
if ( pItem && (pItem->meType != VALUESETITEM_SPACE) )
{
mnOldItemId = mnSelItemId;
@@ -1363,7 +1363,7 @@ void ValueSet::MouseButtonDown( const MouseEvent& rMEvt )
if ( (pItem->mnBits & VIB_NODOUBLECLICK) || (rMEvt.GetClicks() == 1) )
{
mnOldItemId = mnSelItemId;
- mbHighlight = TRUE;
+ mbHighlight = sal_True;
mnHighItemId = mnSelItemId;
ImplHighlightItem( pItem->mnId );
StartTracking( STARTTRACK_SCROLLREPEAT );
@@ -1385,7 +1385,7 @@ void ValueSet::MouseButtonUp( const MouseEvent& rMEvt )
{
// Wegen SelectionMode
if ( rMEvt.IsLeft() && mbSelection )
- ImplEndTracking( rMEvt.GetPosPixel(), FALSE );
+ ImplEndTracking( rMEvt.GetPosPixel(), sal_False );
else
Control::MouseButtonUp( rMEvt );
}
@@ -1396,7 +1396,7 @@ void ValueSet::MouseMove( const MouseEvent& rMEvt )
{
// Wegen SelectionMode
if ( mbSelection || (GetStyle() & WB_MENUSTYLEVALUESET) )
- ImplTracking( rMEvt.GetPosPixel(), FALSE );
+ ImplTracking( rMEvt.GetPosPixel(), sal_False );
Control::MouseMove( rMEvt );
}
@@ -1416,10 +1416,10 @@ void ValueSet::Tracking( const TrackingEvent& rTEvt )
void ValueSet::KeyInput( const KeyEvent& rKEvt )
{
- USHORT nLastItem = (USHORT)mpImpl->mpItemList->Count();
- USHORT nItemPos = VALUESET_ITEM_NOTFOUND;
- USHORT nCurPos = VALUESET_ITEM_NONEITEM;
- USHORT nCalcPos;
+ sal_uInt16 nLastItem = (sal_uInt16)mpImpl->mpItemList->Count();
+ sal_uInt16 nItemPos = VALUESET_ITEM_NOTFOUND;
+ sal_uInt16 nCurPos = VALUESET_ITEM_NONEITEM;
+ sal_uInt16 nCalcPos;
if ( !nLastItem || !ImplGetFirstItem() )
{
@@ -1434,7 +1434,7 @@ void ValueSet::KeyInput( const KeyEvent& rKEvt )
nCalcPos = nCurPos;
//switch off selection mode if key travelling is used
- BOOL bDefault = FALSE;
+ sal_Bool bDefault = sal_False;
switch ( rKEvt.GetKeyCode().GetCode() )
{
case KEY_HOME:
@@ -1522,7 +1522,7 @@ void ValueSet::KeyInput( const KeyEvent& rKEvt )
}
}
else if ( nCalcPos >= ( nLineCount * mnCols ) )
- nItemPos = sal::static_int_cast< USHORT >(
+ nItemPos = sal::static_int_cast< sal_uInt16 >(
nCalcPos - ( nLineCount * mnCols ));
else
{
@@ -1564,7 +1564,7 @@ void ValueSet::KeyInput( const KeyEvent& rKEvt )
if ( nCalcPos == VALUESET_ITEM_NONEITEM )
nItemPos = mnCurCol;
else if ( nCalcPos + ( nLineCount * mnCols ) <= nLastItem )
- nItemPos = sal::static_int_cast< USHORT >(
+ nItemPos = sal::static_int_cast< sal_uInt16 >(
nCalcPos + ( nLineCount * mnCols ));
else
{
@@ -1607,14 +1607,14 @@ void ValueSet::KeyInput( const KeyEvent& rKEvt )
//no break;
default:
Control::KeyInput( rKEvt );
- bDefault = TRUE;
+ bDefault = sal_True;
break;
}
if(!bDefault)
EndSelection();
if ( nItemPos != VALUESET_ITEM_NOTFOUND )
{
- USHORT nItemId;
+ sal_uInt16 nItemId;
if ( nItemPos != VALUESET_ITEM_NONEITEM )
nItemId = GetItemId( nItemPos );
else
@@ -1671,7 +1671,7 @@ void ValueSet::GetFocus()
Control::GetFocus();
// Tell the accessible object that we got the focus.
- ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( FALSE ) );
+ ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( sal_False ) );
if( pAcc )
pAcc->GetFocus();
}
@@ -1688,7 +1688,7 @@ void ValueSet::LoseFocus()
Control::LoseFocus();
// Tell the accessible object that we lost the focus.
- ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( FALSE ) );
+ ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( sal_False ) );
if( pAcc )
pAcc->LoseFocus();
}
@@ -1697,7 +1697,7 @@ void ValueSet::LoseFocus()
void ValueSet::Resize()
{
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
Control::Resize();
@@ -1710,7 +1710,7 @@ void ValueSet::RequestHelp( const HelpEvent& rHEvt )
if ( (rHEvt.GetMode() & (HELPMODE_QUICK | HELPMODE_BALLOON)) == HELPMODE_QUICK )
{
Point aPos = ScreenToOutputPixel( rHEvt.GetMousePosPixel() );
- USHORT nItemPos = ImplGetItem( aPos );
+ sal_uInt16 nItemPos = ImplGetItem( aPos );
if ( nItemPos != VALUESET_ITEM_NOTFOUND )
{
ValueSetItem* pItem = ImplGetItem( nItemPos );
@@ -1756,23 +1756,23 @@ void ValueSet::StateChanged( StateChangedType nType )
else if ( (nType == STATE_CHANGE_ZOOM) ||
(nType == STATE_CHANGE_CONTROLFONT) )
{
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
{
- ImplInitSettings( FALSE, TRUE, FALSE );
+ ImplInitSettings( sal_False, sal_True, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
{
- ImplInitSettings( FALSE, FALSE, TRUE );
+ ImplInitSettings( sal_False, sal_False, sal_True );
Invalidate();
}
else if ( (nType == STATE_CHANGE_STYLE) || (nType == STATE_CHANGE_ENABLE) )
{
- mbFormat = TRUE;
- ImplInitSettings( FALSE, FALSE, TRUE );
+ mbFormat = sal_True;
+ ImplInitSettings( sal_False, sal_False, sal_True );
Invalidate();
}
}
@@ -1789,8 +1789,8 @@ void ValueSet::DataChanged( const DataChangedEvent& rDCEvt )
((rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE)) )
{
- mbFormat = TRUE;
- ImplInitSettings( TRUE, TRUE, TRUE );
+ mbFormat = sal_True;
+ ImplInitSettings( sal_True, sal_True, sal_True );
Invalidate();
}
}
@@ -1817,7 +1817,7 @@ void ValueSet::UserDraw( const UserDrawEvent& )
// -----------------------------------------------------------------------
-void ValueSet::InsertItem( USHORT nItemId, const Image& rImage, USHORT nPos )
+void ValueSet::InsertItem( sal_uInt16 nItemId, const Image& rImage, sal_uInt16 nPos )
{
DBG_ASSERT( nItemId, "ValueSet::InsertItem(): ItemId == 0" );
DBG_ASSERT( GetItemPos( nItemId ) == VALUESET_ITEM_NOTFOUND,
@@ -1827,16 +1827,16 @@ void ValueSet::InsertItem( USHORT nItemId, const Image& rImage, USHORT nPos )
pItem->mnId = nItemId;
pItem->meType = VALUESETITEM_IMAGE;
pItem->maImage = rImage;
- mpImpl->mpItemList->Insert( pItem, (ULONG)nPos );
+ mpImpl->mpItemList->Insert( pItem, (sal_uLong)nPos );
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
// -----------------------------------------------------------------------
-void ValueSet::InsertItem( USHORT nItemId, const Color& rColor, USHORT nPos )
+void ValueSet::InsertItem( sal_uInt16 nItemId, const Color& rColor, sal_uInt16 nPos )
{
DBG_ASSERT( nItemId, "ValueSet::InsertItem(): ItemId == 0" );
DBG_ASSERT( GetItemPos( nItemId ) == VALUESET_ITEM_NOTFOUND,
@@ -1846,17 +1846,17 @@ void ValueSet::InsertItem( USHORT nItemId, const Color& rColor, USHORT nPos )
pItem->mnId = nItemId;
pItem->meType = VALUESETITEM_COLOR;
pItem->maColor = rColor;
- mpImpl->mpItemList->Insert( pItem, (ULONG)nPos );
+ mpImpl->mpItemList->Insert( pItem, (sal_uLong)nPos );
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
// -----------------------------------------------------------------------
-void ValueSet::InsertItem( USHORT nItemId, const Image& rImage,
- const XubString& rText, USHORT nPos )
+void ValueSet::InsertItem( sal_uInt16 nItemId, const Image& rImage,
+ const XubString& rText, sal_uInt16 nPos )
{
DBG_ASSERT( nItemId, "ValueSet::InsertItem(): ItemId == 0" );
DBG_ASSERT( GetItemPos( nItemId ) == VALUESET_ITEM_NOTFOUND,
@@ -1867,17 +1867,17 @@ void ValueSet::InsertItem( USHORT nItemId, const Image& rImage,
pItem->meType = VALUESETITEM_IMAGE;
pItem->maImage = rImage;
pItem->maText = rText;
- mpImpl->mpItemList->Insert( pItem, (ULONG)nPos );
+ mpImpl->mpItemList->Insert( pItem, (sal_uLong)nPos );
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
// -----------------------------------------------------------------------
-void ValueSet::InsertItem( USHORT nItemId, const Color& rColor,
- const XubString& rText, USHORT nPos )
+void ValueSet::InsertItem( sal_uInt16 nItemId, const Color& rColor,
+ const XubString& rText, sal_uInt16 nPos )
{
DBG_ASSERT( nItemId, "ValueSet::InsertItem(): ItemId == 0" );
DBG_ASSERT( GetItemPos( nItemId ) == VALUESET_ITEM_NOTFOUND,
@@ -1888,16 +1888,16 @@ void ValueSet::InsertItem( USHORT nItemId, const Color& rColor,
pItem->meType = VALUESETITEM_COLOR;
pItem->maColor = rColor;
pItem->maText = rText;
- mpImpl->mpItemList->Insert( pItem, (ULONG)nPos );
+ mpImpl->mpItemList->Insert( pItem, (sal_uLong)nPos );
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
// -----------------------------------------------------------------------
-void ValueSet::InsertItem( USHORT nItemId, USHORT nPos )
+void ValueSet::InsertItem( sal_uInt16 nItemId, sal_uInt16 nPos )
{
DBG_ASSERT( nItemId, "ValueSet::InsertItem(): ItemId == 0" );
DBG_ASSERT( GetItemPos( nItemId ) == VALUESET_ITEM_NOTFOUND,
@@ -1906,16 +1906,16 @@ void ValueSet::InsertItem( USHORT nItemId, USHORT nPos )
ValueSetItem* pItem = new ValueSetItem( *this );
pItem->mnId = nItemId;
pItem->meType = VALUESETITEM_USERDRAW;
- mpImpl->mpItemList->Insert( pItem, (ULONG)nPos );
+ mpImpl->mpItemList->Insert( pItem, (sal_uLong)nPos );
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
// -----------------------------------------------------------------------
-void ValueSet::InsertSpace( USHORT nItemId, USHORT nPos )
+void ValueSet::InsertSpace( sal_uInt16 nItemId, sal_uInt16 nPos )
{
DBG_ASSERT( nItemId, "ValueSet::InsertSpace(): ItemId == 0" );
DBG_ASSERT( GetItemPos( nItemId ) == VALUESET_ITEM_NOTFOUND,
@@ -1924,18 +1924,18 @@ void ValueSet::InsertSpace( USHORT nItemId, USHORT nPos )
ValueSetItem* pItem = new ValueSetItem( *this );
pItem->mnId = nItemId;
pItem->meType = VALUESETITEM_SPACE;
- mpImpl->mpItemList->Insert( pItem, (ULONG)nPos );
+ mpImpl->mpItemList->Insert( pItem, (sal_uLong)nPos );
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
// -----------------------------------------------------------------------
-void ValueSet::RemoveItem( USHORT nItemId )
+void ValueSet::RemoveItem( sal_uInt16 nItemId )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos == VALUESET_ITEM_NOTFOUND )
return;
@@ -1949,10 +1949,10 @@ void ValueSet::RemoveItem( USHORT nItemId )
mnOldItemId = 0;
mnHighItemId = 0;
mnSelItemId = 0;
- mbNoSelection = TRUE;
+ mbNoSelection = sal_True;
}
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
@@ -1988,9 +1988,9 @@ void ValueSet::CopyItems( const ValueSet& rValueSet )
mnOldItemId = 0;
mnHighItemId = 0;
mnSelItemId = 0;
- mbNoSelection = TRUE;
+ mbNoSelection = sal_True;
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
@@ -2007,29 +2007,29 @@ void ValueSet::Clear()
mnOldItemId = 0;
mnHighItemId = 0;
mnSelItemId = 0;
- mbNoSelection = TRUE;
+ mbNoSelection = sal_True;
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
// -----------------------------------------------------------------------
-USHORT ValueSet::GetItemCount() const
+sal_uInt16 ValueSet::GetItemCount() const
{
- return (USHORT)mpImpl->mpItemList->Count();
+ return (sal_uInt16)mpImpl->mpItemList->Count();
}
// -----------------------------------------------------------------------
-USHORT ValueSet::GetItemPos( USHORT nItemId ) const
+sal_uInt16 ValueSet::GetItemPos( sal_uInt16 nItemId ) const
{
ValueSetItem* pItem = mpImpl->mpItemList->First();
while ( pItem )
{
if ( pItem->mnId == nItemId )
- return (USHORT)mpImpl->mpItemList->GetCurPos();
+ return (sal_uInt16)mpImpl->mpItemList->GetCurPos();
pItem = mpImpl->mpItemList->Next();
}
@@ -2038,7 +2038,7 @@ USHORT ValueSet::GetItemPos( USHORT nItemId ) const
// -----------------------------------------------------------------------
-USHORT ValueSet::GetItemId( USHORT nPos ) const
+sal_uInt16 ValueSet::GetItemId( sal_uInt16 nPos ) const
{
ValueSetItem* pItem = mpImpl->mpItemList->GetObject( nPos );
@@ -2050,9 +2050,9 @@ USHORT ValueSet::GetItemId( USHORT nPos ) const
// -----------------------------------------------------------------------
-USHORT ValueSet::GetItemId( const Point& rPos ) const
+sal_uInt16 ValueSet::GetItemId( const Point& rPos ) const
{
- USHORT nItemPos = ImplGetItem( rPos );
+ sal_uInt16 nItemPos = ImplGetItem( rPos );
if ( nItemPos != VALUESET_ITEM_NOTFOUND )
return GetItemId( nItemPos );
@@ -2061,9 +2061,9 @@ USHORT ValueSet::GetItemId( const Point& rPos ) const
// -----------------------------------------------------------------------
-Rectangle ValueSet::GetItemRect( USHORT nItemId ) const
+Rectangle ValueSet::GetItemRect( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != VALUESET_ITEM_NOTFOUND )
return mpImpl->mpItemList->GetObject( nPos )->maRect;
@@ -2073,19 +2073,19 @@ Rectangle ValueSet::GetItemRect( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void ValueSet::EnableFullItemMode( BOOL bFullMode )
+void ValueSet::EnableFullItemMode( sal_Bool bFullMode )
{
mbFullMode = bFullMode;
}
// -----------------------------------------------------------------------
-void ValueSet::SetColCount( USHORT nNewCols )
+void ValueSet::SetColCount( sal_uInt16 nNewCols )
{
if ( mnUserCols != nNewCols )
{
mnUserCols = nNewCols;
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
@@ -2093,12 +2093,12 @@ void ValueSet::SetColCount( USHORT nNewCols )
// -----------------------------------------------------------------------
-void ValueSet::SetLineCount( USHORT nNewLines )
+void ValueSet::SetLineCount( sal_uInt16 nNewLines )
{
if ( mnUserVisLines != nNewLines )
{
mnUserVisLines = nNewLines;
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
@@ -2111,7 +2111,7 @@ void ValueSet::SetItemWidth( long nNewItemWidth )
if ( mnUserItemWidth != nNewItemWidth )
{
mnUserItemWidth = nNewItemWidth;
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
@@ -2124,7 +2124,7 @@ void ValueSet::SetItemHeight( long nNewItemHeight )
if ( mnUserItemHeight != nNewItemHeight )
{
mnUserItemHeight = nNewItemHeight;
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
@@ -2132,12 +2132,12 @@ void ValueSet::SetItemHeight( long nNewItemHeight )
// -----------------------------------------------------------------------
-void ValueSet::SetFirstLine( USHORT nNewLine )
+void ValueSet::SetFirstLine( sal_uInt16 nNewLine )
{
if ( mnFirstLine != nNewLine )
{
mnFirstLine = nNewLine;
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
@@ -2145,9 +2145,9 @@ void ValueSet::SetFirstLine( USHORT nNewLine )
// -----------------------------------------------------------------------
-void ValueSet::SelectItem( USHORT nItemId )
+void ValueSet::SelectItem( sal_uInt16 nItemId )
{
- USHORT nItemPos = 0;
+ sal_uInt16 nItemPos = 0;
if ( nItemId )
{
@@ -2160,31 +2160,31 @@ void ValueSet::SelectItem( USHORT nItemId )
if ( (mnSelItemId != nItemId) || mbNoSelection )
{
- USHORT nOldItem = mnSelItemId ? mnSelItemId : 1;
+ sal_uInt16 nOldItem = mnSelItemId ? mnSelItemId : 1;
mnSelItemId = nItemId;
- mbNoSelection = FALSE;
+ mbNoSelection = sal_False;
- BOOL bNewOut;
- BOOL bNewLine;
+ sal_Bool bNewOut;
+ sal_Bool bNewLine;
if ( !mbFormat && IsReallyVisible() && IsUpdateMode() )
- bNewOut = TRUE;
+ bNewOut = sal_True;
else
- bNewOut = FALSE;
- bNewLine = FALSE;
+ bNewOut = sal_False;
+ bNewLine = sal_False;
// Gegebenenfalls in den sichtbaren Bereich scrollen
if ( mbScroll && nItemId )
{
- USHORT nNewLine = (USHORT)(nItemPos / mnCols);
+ sal_uInt16 nNewLine = (sal_uInt16)(nItemPos / mnCols);
if ( nNewLine < mnFirstLine )
{
mnFirstLine = nNewLine;
- bNewLine = TRUE;
+ bNewLine = sal_True;
}
- else if ( nNewLine > (USHORT)(mnFirstLine+mnVisLines-1) )
+ else if ( nNewLine > (sal_uInt16)(mnFirstLine+mnVisLines-1) )
{
- mnFirstLine = (USHORT)(nNewLine-mnVisLines+1);
- bNewLine = TRUE;
+ mnFirstLine = (sal_uInt16)(nNewLine-mnVisLines+1);
+ bNewLine = sal_True;
}
}
@@ -2194,7 +2194,7 @@ void ValueSet::SelectItem( USHORT nItemId )
{
// Falls sich der sichtbare Bereich geaendert hat,
// alles neu ausgeben
- mbFormat = TRUE;
+ mbFormat = sal_True;
ImplDraw();
}
else
@@ -2210,7 +2210,7 @@ void ValueSet::SelectItem( USHORT nItemId )
// focus event (deselect)
if( nOldItem )
{
- const USHORT nPos = GetItemPos( nItemId );
+ const sal_uInt16 nPos = GetItemPos( nItemId );
if( nPos != VALUESET_ITEM_NOTFOUND )
{
@@ -2236,7 +2236,7 @@ void ValueSet::SelectItem( USHORT nItemId )
}
// focus event (select)
- const USHORT nPos = GetItemPos( mnSelItemId );
+ const sal_uInt16 nPos = GetItemPos( mnSelItemId );
ValueSetItem* pItem;
if( nPos != VALUESET_ITEM_NOTFOUND )
@@ -2276,9 +2276,9 @@ void ValueSet::SelectItem( USHORT nItemId )
void ValueSet::SetNoSelection()
{
- mbNoSelection = TRUE;
- mbHighlight = FALSE;
- mbSelection = FALSE;
+ mbNoSelection = sal_True;
+ mbHighlight = sal_False;
+ mbSelection = sal_False;
if ( IsReallyVisible() && IsUpdateMode() )
ImplDraw();
@@ -2286,9 +2286,9 @@ void ValueSet::SetNoSelection()
// -----------------------------------------------------------------------
-void ValueSet::SetItemBits( USHORT nItemId, USHORT nItemBits )
+void ValueSet::SetItemBits( sal_uInt16 nItemId, sal_uInt16 nItemBits )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != VALUESET_ITEM_NOTFOUND )
mpImpl->mpItemList->GetObject( nPos )->mnBits = nItemBits;
@@ -2296,9 +2296,9 @@ void ValueSet::SetItemBits( USHORT nItemId, USHORT nItemBits )
// -----------------------------------------------------------------------
-USHORT ValueSet::GetItemBits( USHORT nItemId ) const
+sal_uInt16 ValueSet::GetItemBits( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != VALUESET_ITEM_NOTFOUND )
return mpImpl->mpItemList->GetObject( nPos )->mnBits;
@@ -2308,9 +2308,9 @@ USHORT ValueSet::GetItemBits( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void ValueSet::SetItemImage( USHORT nItemId, const Image& rImage )
+void ValueSet::SetItemImage( sal_uInt16 nItemId, const Image& rImage )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos == VALUESET_ITEM_NOTFOUND )
return;
@@ -2325,14 +2325,14 @@ void ValueSet::SetItemImage( USHORT nItemId, const Image& rImage )
Invalidate( pItem->maRect );
}
else
- mbFormat = TRUE;
+ mbFormat = sal_True;
}
// -----------------------------------------------------------------------
-Image ValueSet::GetItemImage( USHORT nItemId ) const
+Image ValueSet::GetItemImage( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != VALUESET_ITEM_NOTFOUND )
return mpImpl->mpItemList->GetObject( nPos )->maImage;
@@ -2342,9 +2342,9 @@ Image ValueSet::GetItemImage( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void ValueSet::SetItemColor( USHORT nItemId, const Color& rColor )
+void ValueSet::SetItemColor( sal_uInt16 nItemId, const Color& rColor )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos == VALUESET_ITEM_NOTFOUND )
return;
@@ -2359,14 +2359,14 @@ void ValueSet::SetItemColor( USHORT nItemId, const Color& rColor )
Invalidate( pItem->maRect );
}
else
- mbFormat = TRUE;
+ mbFormat = sal_True;
}
// -----------------------------------------------------------------------
-Color ValueSet::GetItemColor( USHORT nItemId ) const
+Color ValueSet::GetItemColor( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != VALUESET_ITEM_NOTFOUND )
return mpImpl->mpItemList->GetObject( nPos )->maColor;
@@ -2376,9 +2376,9 @@ Color ValueSet::GetItemColor( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void ValueSet::SetItemData( USHORT nItemId, void* pData )
+void ValueSet::SetItemData( sal_uInt16 nItemId, void* pData )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos == VALUESET_ITEM_NOTFOUND )
return;
@@ -2394,15 +2394,15 @@ void ValueSet::SetItemData( USHORT nItemId, void* pData )
Invalidate( pItem->maRect );
}
else
- mbFormat = TRUE;
+ mbFormat = sal_True;
}
}
// -----------------------------------------------------------------------
-void* ValueSet::GetItemData( USHORT nItemId ) const
+void* ValueSet::GetItemData( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != VALUESET_ITEM_NOTFOUND )
return mpImpl->mpItemList->GetObject( nPos )->mpData;
@@ -2412,9 +2412,9 @@ void* ValueSet::GetItemData( USHORT nItemId ) const
// -----------------------------------------------------------------------
-void ValueSet::SetItemText( USHORT nItemId, const XubString& rText )
+void ValueSet::SetItemText( sal_uInt16 nItemId, const XubString& rText )
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos == VALUESET_ITEM_NOTFOUND )
return;
@@ -2433,7 +2433,7 @@ void ValueSet::SetItemText( USHORT nItemId, const XubString& rText )
if ( !mbFormat && IsReallyVisible() && IsUpdateMode() )
{
- USHORT nTempId = mnSelItemId;
+ sal_uInt16 nTempId = mnSelItemId;
if ( mbHighlight )
nTempId = mnHighItemId;
@@ -2455,9 +2455,9 @@ void ValueSet::SetItemText( USHORT nItemId, const XubString& rText )
// -----------------------------------------------------------------------
-XubString ValueSet::GetItemText( USHORT nItemId ) const
+XubString ValueSet::GetItemText( sal_uInt16 nItemId ) const
{
- USHORT nPos = GetItemPos( nItemId );
+ sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != VALUESET_ITEM_NOTFOUND )
return mpImpl->mpItemList->GetObject( nPos )->maText;
@@ -2470,20 +2470,20 @@ XubString ValueSet::GetItemText( USHORT nItemId ) const
void ValueSet::SetColor( const Color& rColor )
{
maColor = rColor;
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
ImplDraw();
}
// -----------------------------------------------------------------------
-void ValueSet::SetExtraSpacing( USHORT nNewSpacing )
+void ValueSet::SetExtraSpacing( sal_uInt16 nNewSpacing )
{
if ( GetStyle() & WB_ITEMBORDER )
{
mnSpacing = nNewSpacing;
- mbFormat = TRUE;
+ mbFormat = sal_True;
if ( IsReallyVisible() && IsUpdateMode() )
Invalidate();
}
@@ -2494,8 +2494,8 @@ void ValueSet::SetExtraSpacing( USHORT nNewSpacing )
void ValueSet::StartSelection()
{
mnOldItemId = mnSelItemId;
- mbHighlight = TRUE;
- mbSelection = TRUE;
+ mbHighlight = sal_True;
+ mbSelection = sal_True;
mnHighItemId = mnSelItemId;
}
@@ -2509,17 +2509,17 @@ void ValueSet::EndSelection()
EndTracking( ENDTRACK_CANCEL );
ImplHighlightItem( mnSelItemId );
- mbHighlight = FALSE;
+ mbHighlight = sal_False;
}
- mbSelection = FALSE;
+ mbSelection = sal_False;
}
// -----------------------------------------------------------------------
-BOOL ValueSet::StartDrag( const CommandEvent& rCEvt, Region& rRegion )
+sal_Bool ValueSet::StartDrag( const CommandEvent& rCEvt, Region& rRegion )
{
if ( rCEvt.GetCommand() != COMMAND_STARTDRAG )
- return FALSE;
+ return sal_False;
// Gegebenenfalls eine vorhandene Aktion abbrechen
EndSelection();
@@ -2528,7 +2528,7 @@ BOOL ValueSet::StartDrag( const CommandEvent& rCEvt, Region& rRegion )
// der Fall ist, setzen wir ihn als aktuellen Eintrag. Falls Drag and
// Drop auch mal ueber Tastatur ausgeloest werden kann, testen wir
// dies nur bei einer Mausaktion.
- USHORT nSelId;
+ sal_uInt16 nSelId;
if ( rCEvt.IsMouseEvent() )
nSelId = GetItemId( rCEvt.GetMousePosPixel() );
else
@@ -2536,7 +2536,7 @@ BOOL ValueSet::StartDrag( const CommandEvent& rCEvt, Region& rRegion )
// Falls kein Eintrag angeklickt wurde, starten wir kein Dragging
if ( !nSelId )
- return FALSE;
+ return sal_False;
// Testen, ob Seite selektiertiert ist. Falls nicht, als aktuelle
// Seite setzen und Select rufen.
@@ -2552,13 +2552,13 @@ BOOL ValueSet::StartDrag( const CommandEvent& rCEvt, Region& rRegion )
// Region zuweisen
rRegion = aRegion;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-Size ValueSet::CalcWindowSizePixel( const Size& rItemSize, USHORT nDesireCols,
- USHORT nDesireLines )
+Size ValueSet::CalcWindowSizePixel( const Size& rItemSize, sal_uInt16 nDesireCols,
+ sal_uInt16 nDesireLines )
{
long nCalcCols = (long)nDesireCols;
long nCalcLines = (long)nDesireLines;
@@ -2640,7 +2640,7 @@ Size ValueSet::CalcWindowSizePixel( const Size& rItemSize, USHORT nDesireCols,
// -----------------------------------------------------------------------
-Size ValueSet::CalcItemSizePixel( const Size& rItemSize, BOOL bOut ) const
+Size ValueSet::CalcItemSizePixel( const Size& rItemSize, sal_Bool bOut ) const
{
Size aSize = rItemSize;
@@ -2684,15 +2684,15 @@ long ValueSet::GetScrollWidth() const
// -----------------------------------------------------------------------
-USHORT ValueSet::ShowDropPos( const Point& rPos )
+sal_uInt16 ValueSet::ShowDropPos( const Point& rPos )
{
- mbDropPos = TRUE;
+ mbDropPos = sal_True;
// Gegebenenfalls scrollen
ImplScroll( rPos );
// DropPosition ermitteln
- USHORT nPos = ImplGetItem( rPos, TRUE );
+ sal_uInt16 nPos = ImplGetItem( rPos, sal_True );
if ( nPos == VALUESET_ITEM_NONEITEM )
nPos = 0;
else if ( nPos == VALUESET_ITEM_NOTFOUND )
@@ -2702,7 +2702,7 @@ USHORT ValueSet::ShowDropPos( const Point& rPos )
aOutSize.Height() = mnTextOffset;
if ( (rPos.X() >= 0) && (rPos.X() < aOutSize.Width()) &&
(rPos.Y() >= 0) && (rPos.Y() < aOutSize.Height()) )
- nPos = (USHORT)mpImpl->mpItemList->Count();
+ nPos = (sal_uInt16)mpImpl->mpItemList->Count();
}
else
{
@@ -2714,9 +2714,9 @@ USHORT ValueSet::ShowDropPos( const Point& rPos )
if ( nPos != mnDropPos )
{
- ImplDrawDropPos( FALSE );
+ ImplDrawDropPos( sal_False );
mnDropPos = nPos;
- ImplDrawDropPos( TRUE );
+ ImplDrawDropPos( sal_True );
}
return mnDropPos;
@@ -2728,8 +2728,8 @@ void ValueSet::HideDropPos()
{
if ( mbDropPos )
{
- ImplDrawDropPos( FALSE );
- mbDropPos = FALSE;
+ ImplDrawDropPos( sal_False );
+ mbDropPos = sal_False;
}
}
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index bfcdfe98ea5a..27d1d1a6b239 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -41,7 +41,7 @@
#include <vcl/waitobj.hxx>
#include <vcl/msgbox.hxx>
#include <toolkit/helper/vclunohelper.hxx>
-#include <cppuhelper/extract.hxx>
+#include <comphelper/extract.hxx>
#include <comphelper/interaction.hxx>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <com/sun/star/awt/XWindow.hpp>
@@ -590,9 +590,9 @@ void AssignmentPersistentData::Commit()
for (sal_Int32 column=0; column<2; ++column)
{
// the label
- m_pImpl->pFieldLabels[row * 2 + column] = new FixedText(&m_aFieldsFrame, SvtResId((USHORT)(FT_FIELD_BASE + row * 2 + column)));
+ m_pImpl->pFieldLabels[row * 2 + column] = new FixedText(&m_aFieldsFrame, SvtResId((sal_uInt16)(FT_FIELD_BASE + row * 2 + column)));
// the listbox
- m_pImpl->pFields[row * 2 + column] = new ListBox(&m_aFieldsFrame, SvtResId((USHORT)(LB_FIELD_BASE + row * 2 + column)));
+ m_pImpl->pFields[row * 2 + column] = new ListBox(&m_aFieldsFrame, SvtResId((sal_uInt16)(LB_FIELD_BASE + row * 2 + column)));
m_pImpl->pFields[row * 2 + column]->SetDropDownLineCount(15);
m_pImpl->pFields[row * 2 + column]->SetSelectHdl(LINK(this, AddressBookSourceDialog, OnFieldSelect));
diff --git a/svtools/source/dialogs/colctrl.cxx b/svtools/source/dialogs/colctrl.cxx
index 4456fe2f1268..2aa1b5b10675 100644
--- a/svtools/source/dialogs/colctrl.cxx
+++ b/svtools/source/dialogs/colctrl.cxx
@@ -85,19 +85,19 @@ void SvColorControl::CreateBitmap()
if( pWriteAccess )
{
- USHORT nX = (USHORT) aSize.Width();
- USHORT nY = (USHORT) aSize.Height();
+ sal_uInt16 nX = (sal_uInt16) aSize.Width();
+ sal_uInt16 nY = (sal_uInt16) aSize.Height();
- UINT16 nHue, nSat;
+ sal_uInt16 nHue, nSat;
ColorHSB aColHSB( 0, 0, mnLuminance );
- for( USHORT i = 0; i < nY; i++ )
+ for( sal_uInt16 i = 0; i < nY; i++ )
{
- nSat = (UINT16) FRound( 100 - ( 100.0 * i + 0.5 ) / nY );
+ nSat = (sal_uInt16) FRound( 100 - ( 100.0 * i + 0.5 ) / nY );
- for( USHORT j = 0; j < nX; j++ )
+ for( sal_uInt16 j = 0; j < nX; j++ )
{
- nHue = (UINT16) FRound( ( 360.0 * j + 0.5 ) / nX );
+ nHue = (sal_uInt16) FRound( ( 360.0 * j + 0.5 ) / nX );
aColHSB.SetHue( nHue );
aColHSB.SetSat( nSat );
@@ -161,7 +161,7 @@ void SvColorControl::MouseButtonDown( const MouseEvent& rMEvt )
{
if( rMEvt.IsLeft() && !rMEvt.IsShift() )
{
- //ShowPointer( FALSE );
+ //ShowPointer( sal_False );
CaptureMouse();
ShowPosition( rMEvt.GetPosPixel() );
Modify();
@@ -171,7 +171,7 @@ void SvColorControl::MouseButtonDown( const MouseEvent& rMEvt )
// -----------------------------------------------------------------------
void SvColorControl::MouseButtonUp( const MouseEvent& )
{
- //ShowPointer( TRUE );
+ //ShowPointer( sal_True );
if( IsMouseCaptured() )
ReleaseMouse();
}
@@ -219,16 +219,16 @@ void SvColorControl::Modify()
}
// -----------------------------------------------------------------------
-void SvColorControl::SetColor( const ColorHSB& rCol, BOOL bSetColor )
+void SvColorControl::SetColor( const ColorHSB& rCol, sal_Bool bSetColor )
{
if( bSetColor )
maColor = rCol.GetRGB();
if( mpBitmap )
{
- USHORT nX = (USHORT) mpBitmap->GetSizePixel().Width();
- USHORT nY = (USHORT) mpBitmap->GetSizePixel().Height();
- INT16 nZ = rCol.GetBri();
+ sal_uInt16 nX = (sal_uInt16) mpBitmap->GetSizePixel().Width();
+ sal_uInt16 nY = (sal_uInt16) mpBitmap->GetSizePixel().Height();
+ sal_Int16 nZ = rCol.GetBri();
SetLuminance( nZ );
nX = rCol.GetHue() * nX / 360; // Farbe
@@ -245,7 +245,7 @@ void SvColorControl::SetColor( const Color& rCol )
if( mpBitmap )
{
ColorHSB aColHsb( rCol );
- SetColor( aColHsb, FALSE );
+ SetColor( aColHsb, sal_False );
}
}
@@ -332,7 +332,7 @@ void ColorPreviewControl::SetColor( const Color& rCol )
// -----------------------------------------------------------------------
ColorMixingControl::ColorMixingControl( Window* pParent, WinBits nStyle,
- USHORT nRows, USHORT nColumns ) :
+ sal_uInt16 nRows, sal_uInt16 nColumns ) :
ValueSet ( pParent, nStyle ),
mnRows ( nRows ),
mnColumns ( nColumns )
@@ -342,7 +342,7 @@ ColorMixingControl::ColorMixingControl( Window* pParent, WinBits nStyle,
// -----------------------------------------------------------------------
ColorMixingControl::ColorMixingControl( Window* pParent, const ResId& rResId,
- USHORT nRows, USHORT nColumns ) :
+ sal_uInt16 nRows, sal_uInt16 nColumns ) :
ValueSet ( pParent, rResId ),
mnRows ( nRows ),
mnColumns ( nColumns )
@@ -363,7 +363,7 @@ void ColorMixingControl::Initialize()
Color aColor;
String aStr;
- for( USHORT i = 1; i <= mnRows * mnColumns; i++ )
+ for( sal_uInt16 i = 1; i <= mnRows * mnColumns; i++ )
{
InsertItem( i, aColor, aStr );
}
@@ -386,30 +386,30 @@ void ColorMixingControl::Initialize()
}
// -----------------------------------------------------------------------
-Color ColorMixingControl::CalcDifferenceColor( USHORT nCol1, USHORT nCol2,
- USHORT nSteps )
+Color ColorMixingControl::CalcDifferenceColor( sal_uInt16 nCol1, sal_uInt16 nCol2,
+ sal_uInt16 nSteps )
{
// Die Berechnung ist noch etwas ungenau, daher sollte besser mit floats
// gearbeitet werden... (muss !!!)
Color aColor( GetItemColor( nCol1 ) );
Color aColor2( GetItemColor( nCol2 ) );
- aColor.SetRed( (UINT8) ( ( aColor2.GetRed() - aColor.GetRed() ) / nSteps ) );
- aColor.SetGreen( (UINT8) ( ( aColor2.GetGreen() - aColor.GetGreen() ) / nSteps ) );
- aColor.SetBlue( (UINT8) ( ( aColor2.GetBlue() - aColor.GetBlue() ) / nSteps ) );
+ aColor.SetRed( (sal_uInt8) ( ( aColor2.GetRed() - aColor.GetRed() ) / nSteps ) );
+ aColor.SetGreen( (sal_uInt8) ( ( aColor2.GetGreen() - aColor.GetGreen() ) / nSteps ) );
+ aColor.SetBlue( (sal_uInt8) ( ( aColor2.GetBlue() - aColor.GetBlue() ) / nSteps ) );
return( aColor );
}
// -----------------------------------------------------------------------
-void ColorMixingControl::FillRow( USHORT nRow )
+void ColorMixingControl::FillRow( sal_uInt16 nRow )
{
- USHORT nCol1 = nRow * mnColumns + 1;
- USHORT nCol2 = ( nRow + 1 ) * mnColumns;
+ sal_uInt16 nCol1 = nRow * mnColumns + 1;
+ sal_uInt16 nCol2 = ( nRow + 1 ) * mnColumns;
Color aColor( GetItemColor( nCol1 ) );
Color aDiffColor( CalcDifferenceColor( nCol1, nCol2, mnColumns - 1 ) );
- for( USHORT i = nCol1 + 1; i < nCol2; i++ )
+ for( sal_uInt16 i = nCol1 + 1; i < nCol2; i++ )
{
aColor.SetRed( aColor.GetRed() + aDiffColor.GetRed() );
aColor.SetGreen( aColor.GetGreen() + aDiffColor.GetGreen() );
@@ -421,14 +421,14 @@ void ColorMixingControl::FillRow( USHORT nRow )
}
// -----------------------------------------------------------------------
-void ColorMixingControl::FillColumn( USHORT nColumn )
+void ColorMixingControl::FillColumn( sal_uInt16 nColumn )
{
- USHORT nCol1 = nColumn + 1;
- USHORT nCol2 = nColumn + ( mnRows - 1 ) * mnColumns + 1;
+ sal_uInt16 nCol1 = nColumn + 1;
+ sal_uInt16 nCol2 = nColumn + ( mnRows - 1 ) * mnColumns + 1;
Color aColor( GetItemColor( nCol1 ) );
Color aDiffColor( CalcDifferenceColor( nCol1, nCol2, mnRows - 1 ) );
- for( USHORT i = nCol1 + mnColumns; i < nCol2; i = i + mnColumns )
+ for( sal_uInt16 i = nCol1 + mnColumns; i < nCol2; i = i + mnColumns )
{
aColor.SetRed( aColor.GetRed() + aDiffColor.GetRed() );
aColor.SetGreen( aColor.GetGreen() + aDiffColor.GetGreen() );
@@ -440,13 +440,13 @@ void ColorMixingControl::FillColumn( USHORT nColumn )
}
// -----------------------------------------------------------------------
-void ColorMixingControl::SetRows( USHORT nRows )
+void ColorMixingControl::SetRows( sal_uInt16 nRows )
{
mnRows = nRows;
}
// -----------------------------------------------------------------------
-void ColorMixingControl::SetColumns( USHORT nColumns )
+void ColorMixingControl::SetColumns( sal_uInt16 nColumns )
{
mnColumns = nColumns;
}
@@ -457,8 +457,8 @@ void ColorMixingControl::SetColor( CMCPosition ePos, const Color& rCol )
if( rCol != maColor[ ePos ] )
{
maColor[ ePos ] = rCol;
- USHORT nPos = 0;
- USHORT nColumn = 0;
+ sal_uInt16 nPos = 0;
+ sal_uInt16 nColumn = 0;
String aStr( GetRGBString( rCol ) );
switch( ePos )
@@ -489,7 +489,7 @@ void ColorMixingControl::SetColor( CMCPosition ePos, const Color& rCol )
SetItemText( nPos, aStr );
FillColumn( nColumn );
- for( USHORT i = 0; i < mnRows; i++ )
+ for( sal_uInt16 i = 0; i < mnRows; i++ )
FillRow( i );
}
}
@@ -509,7 +509,7 @@ String ColorMixingControl::GetRGBString( const Color& rColor )
CMCPosition ColorMixingControl::GetCMCPosition() const
{
CMCPosition ePos = CMC_OTHER;
- USHORT nPos = GetSelectItemId();
+ sal_uInt16 nPos = GetSelectItemId();
if( nPos == 1 )
ePos = CMC_TOPLEFT;
@@ -543,8 +543,8 @@ CMCPosition ColorMixingControl::GetCMCPosition() const
ColorHSB::ColorHSB( const Color& rColor )
{
- UINT8 c[3];
- UINT8 cMax, cMin;
+ sal_uInt8 c[3];
+ sal_uInt8 cMax, cMin;
c[0] = rColor.GetRed();
c[1] = rColor.GetGreen();
@@ -565,7 +565,7 @@ ColorHSB::ColorHSB( const Color& rColor )
if( c[2] < cMin )
cMin = c[2];
- UINT8 cDelta = cMax - cMin;
+ sal_uInt8 cDelta = cMax - cMin;
// Saturation = max - min / max
if( mnBri > 0 )
@@ -597,7 +597,7 @@ ColorHSB::ColorHSB( const Color& rColor )
if( dHue < 0.0 )
dHue += 360.0;
- mnHue = (UINT16) dHue;
+ mnHue = (sal_uInt16) dHue;
}
}
@@ -612,8 +612,8 @@ ColorHSB::ColorHSB( const Color& rColor )
Color ColorHSB::GetRGB() const
{
- UINT8 cR,cG,cB;
- UINT8 nB = (UINT8) ( mnBri * 255 / 100 );
+ sal_uInt8 cR,cG,cB;
+ sal_uInt8 nB = (sal_uInt8) ( mnBri * 255 / 100 );
if( mnSat == 0 )
{
@@ -625,20 +625,20 @@ Color ColorHSB::GetRGB() const
{
double dH = mnHue;
double f;
- UINT16 n;
+ sal_uInt16 n;
if( dH == 360.0 )
dH = 0.0;
dH /= 60.0;
- n = (UINT16) dH;
+ n = (sal_uInt16) dH;
f = dH - n;
// #107375# Doing the calculation completely in floating
// point, the former optimization gave sometimes negative
// results for c and was pointless anyway
- UINT8 a = static_cast<UINT8>( nB * ( 100.0 - mnSat ) / 100.0 );
- UINT8 b = static_cast<UINT8>( nB * ( 100.0 - mnSat * f ) / 100.0 );
- UINT8 c = static_cast<UINT8>( nB * ( 100.0 - mnSat * ( 1.0 - f ) ) / 100.0 );
+ sal_uInt8 a = static_cast<sal_uInt8>( nB * ( 100.0 - mnSat ) / 100.0 );
+ sal_uInt8 b = static_cast<sal_uInt8>( nB * ( 100.0 - mnSat * f ) / 100.0 );
+ sal_uInt8 c = static_cast<sal_uInt8>( nB * ( 100.0 - mnSat * ( 1.0 - f ) ) / 100.0 );
switch( n )
{
@@ -678,11 +678,11 @@ ColorCMYK::ColorCMYK( const Color& rColor )
Color ColorCMYK::GetRGB() const
{
int nTmp = Max( 0, 255 - ( mnCyan + mnKey ) );
- UINT8 cR = (UINT8) nTmp;
+ sal_uInt8 cR = (sal_uInt8) nTmp;
nTmp = Max( 0, 255 - ( mnMagenta + mnKey ) );
- UINT8 cG = (UINT8) nTmp;
+ sal_uInt8 cG = (sal_uInt8) nTmp;
nTmp = Max( 0, 255 - ( mnYellow + mnKey ) );
- UINT8 cB = (UINT8) nTmp;
+ sal_uInt8 cB = (sal_uInt8) nTmp;
return( Color( cR, cG, cB ) );
}
diff --git a/svtools/source/dialogs/colrdlg.cxx b/svtools/source/dialogs/colrdlg.cxx
index a52cc4b0834c..fa494b05b2ab 100644
--- a/svtools/source/dialogs/colrdlg.cxx
+++ b/svtools/source/dialogs/colrdlg.cxx
@@ -160,7 +160,7 @@ const Color& SvColorDialog::GetColor() const
// -----------------------------------------------------------------------
IMPL_LINK( SvColorDialog, ColorModifyHdl, void *, p )
{
- UINT16 n = 0x00; // 1 == RGB, 2 == CMYK, 4 == HSB
+ sal_uInt16 n = 0x00; // 1 == RGB, 2 == CMYK, 4 == HSB
if( p == &maCtlColor )
{
@@ -173,19 +173,19 @@ IMPL_LINK( SvColorDialog, ColorModifyHdl, void *, p )
}
else if( p == &maNumRed )
{
- maColor.SetRed( (UINT8)maNumRed.GetValue() );
+ maColor.SetRed( (sal_uInt8)maNumRed.GetValue() );
maCtlColor.SetColor( maColor );
n = 6;
}
else if( p == &maNumGreen )
{
- maColor.SetGreen( (UINT8)maNumGreen.GetValue() );
+ maColor.SetGreen( (sal_uInt8)maNumGreen.GetValue() );
maCtlColor.SetColor( maColor );
n = 6;
}
else if( p == &maNumBlue )
{
- maColor.SetBlue( (UINT8)maNumBlue.GetValue() );
+ maColor.SetBlue( (sal_uInt8)maNumBlue.GetValue() );
maCtlColor.SetColor( maColor );
n = 6;
}
@@ -194,9 +194,9 @@ IMPL_LINK( SvColorDialog, ColorModifyHdl, void *, p )
p == &maNumLuminance )
{
- ColorHSB aColorHSB( (UINT16) maNumHue.GetValue(),
- (UINT16) maNumSaturation.GetValue(),
- (UINT16) maNumLuminance.GetValue() );
+ ColorHSB aColorHSB( (sal_uInt16) maNumHue.GetValue(),
+ (sal_uInt16) maNumSaturation.GetValue(),
+ (sal_uInt16) maNumLuminance.GetValue() );
maCtlColor.SetColor( aColorHSB );
maColor = maCtlColor.GetColor();
n = 3;
@@ -211,10 +211,10 @@ IMPL_LINK( SvColorDialog, ColorModifyHdl, void *, p )
long aYellow = (long) ( (double)maNumYellow.GetValue() * 255.0 / 100.0 + 0.5 );
long aKey = (long) ( (double)maNumKey.GetValue() * 255.0 / 100.0 + 0.5 );
- ColorCMYK aColorCMYK( (UINT16) aCyan,
- (UINT16) aMagenta,
- (UINT16) aYellow,
- (UINT16) aKey );
+ ColorCMYK aColorCMYK( (sal_uInt16) aCyan,
+ (sal_uInt16) aMagenta,
+ (sal_uInt16) aYellow,
+ (sal_uInt16) aKey );
maColor = aColorCMYK.GetRGB();
maCtlColor.SetColor( maColor );
n = 5;
@@ -274,7 +274,7 @@ IMPL_LINK( SvColorDialog, ClickBtnHdl, void *, p )
}
else if( p == &maBtn2 )
{
- USHORT nPos = maColMixCtrl.GetSelectItemId();
+ sal_uInt16 nPos = maColMixCtrl.GetSelectItemId();
maColor = maColMixCtrl.GetItemColor( nPos );
maCtlColor.SetColor( maColor );
ColorModifyHdl( &maCtlColor );
@@ -286,7 +286,7 @@ IMPL_LINK( SvColorDialog, ClickBtnHdl, void *, p )
// -----------------------------------------------------------------------
IMPL_LINK( SvColorDialog, ClickMixCtrlHdl, void *, EMPTYARG )
{
- USHORT nPos = maColMixCtrl.GetSelectItemId();
+ sal_uInt16 nPos = maColMixCtrl.GetSelectItemId();
CMCPosition ePos = maColMixCtrl.GetCMCPosition();
if( ePos != CMC_OTHER )
@@ -304,12 +304,12 @@ IMPL_LINK( SvColorDialog, ClickMixCtrlHdl, void *, EMPTYARG )
// -----------------------------------------------------------------------
IMPL_LINK( SvColorDialog, SelectMixCtrlHdl, void *, EMPTYARG )
{
- //USHORT nPos = maColMixCtrl.GetSelectItemId();
+ //sal_uInt16 nPos = maColMixCtrl.GetSelectItemId();
//maFtRGB.SetText( maColMixCtrl.GetItemText( nPos ) );
CMCPosition ePos = maColMixCtrl.GetCMCPosition();
if( ePos == CMC_OTHER )
- maBtn1.Enable( FALSE );
+ maBtn1.Enable( sal_False );
else
maBtn1.Enable();
diff --git a/svtools/source/dialogs/filedlg.cxx b/svtools/source/dialogs/filedlg.cxx
index de465b34e1c6..d0f86867686a 100644
--- a/svtools/source/dialogs/filedlg.cxx
+++ b/svtools/source/dialogs/filedlg.cxx
@@ -31,7 +31,7 @@
#include <svtools/filedlg.hxx>
#include <filedlg2.hxx>
-PathDialog::PathDialog( Window* _pParent, WinBits nStyle, BOOL bCreateDir ) :
+PathDialog::PathDialog( Window* _pParent, WinBits nStyle, sal_Bool bCreateDir ) :
ModalDialog( _pParent, WB_STDMODAL | nStyle )
{
pImpFileDlg = new ImpSvFileDlg;
@@ -70,7 +70,7 @@ long PathDialog::OK()
if( aOKHdlLink.IsSet() )
return aOKHdlLink.Call( this );
else
- return TRUE;
+ return sal_True;
}
@@ -80,7 +80,7 @@ FileDialog::FileDialog( Window* _pParent, WinBits nStyle ) :
// Dadurch dass hier bei VCL nicht der CTOR mit ResType verwendet wird,
// wurde im PathDialog-CTOR leider ein ImpPathDialog angelegt...
// So zwar scheisse, aber der Dialog ist eh' nur ein Hack:
- pImpFileDlg->CreateDialog( this, nStyle, WINDOW_FILEDIALOG, FALSE );
+ pImpFileDlg->CreateDialog( this, nStyle, WINDOW_FILEDIALOG, sal_False );
}
FileDialog::~FileDialog()
@@ -122,17 +122,17 @@ void FileDialog::FilterSelect()
aFilterHdlLink.Call( this );
}
-USHORT FileDialog::GetFilterCount() const
+sal_uInt16 FileDialog::GetFilterCount() const
{
return ((ImpFileDialog*)pImpFileDlg->GetDialog())->GetFilterCount();
}
-UniString FileDialog::GetFilterName( USHORT nPos ) const
+UniString FileDialog::GetFilterName( sal_uInt16 nPos ) const
{
return ((ImpFileDialog*)pImpFileDlg->GetDialog())->GetFilterName( nPos );
}
-UniString FileDialog::GetFilterType( USHORT nPos ) const
+UniString FileDialog::GetFilterType( sal_uInt16 nPos ) const
{
return ((ImpFileDialog*)pImpFileDlg->GetDialog())->GetFilterType( nPos );
}
diff --git a/svtools/source/dialogs/filedlg2.cxx b/svtools/source/dialogs/filedlg2.cxx
index a2c68270ed81..6e6fd4fd2e84 100644
--- a/svtools/source/dialogs/filedlg2.cxx
+++ b/svtools/source/dialogs/filedlg2.cxx
@@ -73,9 +73,9 @@ DECLARE_LIST( UniStringList, UniString* )
p->Show();
-inline BOOL IsPrintable( sal_Unicode c )
+inline sal_Bool IsPrintable( sal_Unicode c )
{
- return c >= 32 && c != 127 ? TRUE : FALSE;
+ return c >= 32 && c != 127 ? sal_True : sal_False;
}
long
@@ -88,10 +88,10 @@ KbdListBox::PreNotify( NotifyEvent& rNEvt )
if ( IsPrintable ( cCharCode ) )
{
- USHORT nCurrentPos = GetSelectEntryPos();
- USHORT nEntries = GetEntryCount();
+ sal_uInt16 nCurrentPos = GetSelectEntryPos();
+ sal_uInt16 nEntries = GetEntryCount();
- for ( USHORT i = 1; i < nEntries; i++ )
+ for ( sal_uInt16 i = 1; i < nEntries; i++ )
{
UniString aEntry = GetEntry ( (i + nCurrentPos) % nEntries );
aEntry.EraseLeadingChars( ' ' );
@@ -116,7 +116,7 @@ KbdListBox::PreNotify( NotifyEvent& rNEvt )
return ListBox::PreNotify ( rNEvt );
}
-ImpPathDialog::ImpPathDialog( PathDialog* pDlg, RESOURCE_TYPE nType, BOOL bCreateDir )
+ImpPathDialog::ImpPathDialog( PathDialog* pDlg, RESOURCE_TYPE nType, sal_Bool bCreateDir )
{
pSvPathDialog = pDlg;
nDirCount = 0;
@@ -287,14 +287,14 @@ IMPL_LINK( ImpPathDialog, SelectHdl, ListBox *, p )
UniString aEntry( pDirList->GetSelectEntry() );
aEntry.EraseLeadingChars( ' ' );
- USHORT nPos = aEntry.Search( '/' );
+ sal_uInt16 nPos = aEntry.Search( '/' );
aEntry.Erase( nPos );
// build the absolute path to the selected item
DirEntry aNewPath;
aNewPath.ToAbs();
- USHORT nCurPos = pDirList->GetSelectEntryPos();
+ sal_uInt16 nCurPos = pDirList->GetSelectEntryPos();
// Wird nach oben gewechselt
if( nCurPos < nDirCount )
@@ -321,7 +321,7 @@ IMPL_LINK( ImpPathDialog, ClickHdl, Button*, pBtn )
// Ja, dann kompletten Pfad mit Filenamen merken und Dialog beenden
aPath = aFile;
aPath.ToAbs();
- GetPathDialog()->EndDialog( TRUE );
+ GetPathDialog()->EndDialog( sal_True );
}
else
{
@@ -338,7 +338,7 @@ IMPL_LINK( ImpPathDialog, ClickHdl, Button*, pBtn )
else
if ( pBtn == pCancelBtn )
{
- GetPathDialog()->EndDialog( FALSE );
+ GetPathDialog()->EndDialog( sal_False );
}
else
if ( pBtn == pHomeBtn )
@@ -380,7 +380,7 @@ IMPL_LINK( ImpPathDialog, DblClickHdl, ListBox*, pBox )
UniString aEntry( pBox->GetSelectEntry() );
aEntry.EraseLeadingChars( ' ' );
- USHORT nPos = aEntry.Search( '/' );
+ sal_uInt16 nPos = aEntry.Search( '/' );
aEntry.Erase( nPos );
// build the absolute path to the selected item
@@ -388,7 +388,7 @@ IMPL_LINK( ImpPathDialog, DblClickHdl, ListBox*, pBox )
aNewPath.ToAbs();
if( pBox == pDirList )
{
- USHORT nCurPos = pDirList->GetSelectEntryPos();
+ sal_uInt16 nCurPos = pDirList->GetSelectEntryPos();
// Wenn es schon das aktuelle ist, dann mache nichts
if( nCurPos == nDirCount-1 )
@@ -409,22 +409,22 @@ IMPL_LINK( ImpPathDialog, DblClickHdl, ListBox*, pBox )
{
// Neuen Pfad setzen und Listboxen updaten
aPath = aNewPath;
- if( !aPath.SetCWD( TRUE ) )
+ if( !aPath.SetCWD( sal_True ) )
{
ErrorBox aBox( GetPathDialog(),
WB_OK_CANCEL | WB_DEF_OK,
UniString( SvtResId( STR_FILEDLG_CANTCHDIR ) ) );
if( aBox.Execute() == RET_CANCEL )
- GetPathDialog()->EndDialog( FALSE );
+ GetPathDialog()->EndDialog( sal_False );
}
- UpdateEntries( TRUE );
+ UpdateEntries( sal_True );
}
pSvPathDialog->LeaveWait();
return 0;
}
-void ImpPathDialog::UpdateEntries( const BOOL )
+void ImpPathDialog::UpdateEntries( const sal_Bool )
{
UniString aTabString;
DirEntry aTmpPath;
@@ -432,10 +432,10 @@ void ImpPathDialog::UpdateEntries( const BOOL )
nDirCount = aTmpPath.Level();
- pDirList->SetUpdateMode( FALSE );
+ pDirList->SetUpdateMode( sal_False );
pDirList->Clear();
- for( USHORT i = nDirCount; i > 0; i-- )
+ for( sal_uInt16 i = nDirCount; i > 0; i-- )
{
UniString aName( aTabString );
aName += aTmpPath[i-1].GetName();
@@ -449,11 +449,11 @@ void ImpPathDialog::UpdateEntries( const BOOL )
Dir aDir( aCurrent, FSYS_KIND_DIR|FSYS_KIND_FILE );
- USHORT nEntries = aDir.Count();
+ sal_uInt16 nEntries = aDir.Count();
if( nEntries )
{
UniStringList aSortDirList;
- for ( USHORT n = 0; n < nEntries; n++ )
+ for ( sal_uInt16 n = 0; n < nEntries; n++ )
{
DirEntry& rEntry = aDir[n];
UniString aName( rEntry.GetName() );
@@ -461,7 +461,7 @@ void ImpPathDialog::UpdateEntries( const BOOL )
{
if( FileStat( rEntry ).GetKind() & FSYS_KIND_DIR )
{
- ULONG l = 0;
+ sal_uLong l = 0;
if( xCollator.is() )
{
for( l = 0; l < aSortDirList.Count(); l++ )
@@ -473,7 +473,7 @@ void ImpPathDialog::UpdateEntries( const BOOL )
}
}
- for( ULONG l = 0; l < aSortDirList.Count(); l++ )
+ for( sal_uLong l = 0; l < aSortDirList.Count(); l++ )
{
UniString aEntryStr( aTabString );
aEntryStr += *aSortDirList.GetObject(l);
@@ -491,7 +491,7 @@ void ImpPathDialog::UpdateDirs( const DirEntry& rTmpPath )
pDirList->SetTopEntry( nDirCount > 1
? nDirCount - 2
: nDirCount - 1 );
- pDirList->SetUpdateMode( TRUE );
+ pDirList->SetUpdateMode( sal_True );
pDirList->Invalidate();
pDirList->Update();
@@ -502,10 +502,10 @@ void ImpPathDialog::UpdateDirs( const DirEntry& rTmpPath )
pEdit->SetText( aDirName );
}
-BOOL ImpPathDialog::IsFileOk( const DirEntry& rDirEntry )
+sal_Bool ImpPathDialog::IsFileOk( const DirEntry& rDirEntry )
{
if( FileStat( rDirEntry ).GetKind() & (FSYS_KIND_WILD | FSYS_KIND_DEV) )
- return FALSE;
+ return sal_False;
else
{
// Datei vorhanden ?
@@ -519,7 +519,7 @@ BOOL ImpPathDialog::IsFileOk( const DirEntry& rDirEntry )
if( aQuery.Execute() == RET_YES )
rDirEntry.MakeDir();
else
- return FALSE;
+ return sal_False;
}
if( !FileStat( rDirEntry ).IsKind( FSYS_KIND_DIR ) )
{
@@ -529,7 +529,7 @@ BOOL ImpPathDialog::IsFileOk( const DirEntry& rDirEntry )
aBoxText.AppendAscii( "]" );
InfoBox aBox( GetPathDialog(), aBoxText );
aBox.Execute();
- return FALSE;
+ return sal_False;
}
}
return GetPathDialog()->OK() != 0;
@@ -539,8 +539,8 @@ BOOL ImpPathDialog::IsFileOk( const DirEntry& rDirEntry )
void ImpPathDialog::PreExecute()
{
// Neues Verzeichnis setzen und Listboxen updaten
- aPath.SetCWD( TRUE );
- UpdateEntries( TRUE );
+ aPath.SetCWD( sal_True );
+ UpdateEntries( sal_True );
// Zusaetzliche Buttons anordnen
Point aPos;
@@ -563,8 +563,8 @@ void ImpPathDialog::PreExecute()
long nMaxWidth = 0;
// Maximale Breite ermitteln
- USHORT nChilds = GetPathDialog()->GetChildCount();
- USHORT n;
+ sal_uInt16 nChilds = GetPathDialog()->GetChildCount();
+ sal_uInt16 n;
for ( n = nOwnChilds; n < nChilds; n++ )
{
Window* pChild = GetPathDialog()->GetChild( n );
@@ -624,11 +624,11 @@ void ImpPathDialog::PreExecute()
DirEntry aTmpDirEntry;
Dir aDir( aTmpDirEntry, FSYS_KIND_BLOCK );
- USHORT nCount = aDir.Count(), i;
+ sal_uInt16 nCount = aDir.Count(), i;
for( i = 0; i < nCount; ++i )
{
DirEntry& rEntry = aDir[i];
- UniString aStr = rEntry.GetFull( FSYS_STYLE_HOST, FALSE );
+ UniString aStr = rEntry.GetFull( FSYS_STYLE_HOST, sal_False );
UniString aVolume = rEntry.GetVolume() ;
aStr.ToUpperAscii();
@@ -674,8 +674,8 @@ void ImpPathDialog::SetPath( UniString const & rPath )
// Neue Maske und neues Verzeichnis setzen, und Listboxen updaten
pEdit->SetText( rPath );
- aFile.SetCWD( TRUE );
- UpdateEntries( TRUE );
+ aFile.SetCWD( sal_True );
+ UpdateEntries( sal_True );
pSvPathDialog->LeaveWait();
}
@@ -697,7 +697,7 @@ UniString ImpPathDialog::GetPath() const
ImpFileDialog::ImpFileDialog( PathDialog* pDlg, WinBits nWinBits, RESOURCE_TYPE nType ) :
- ImpPathDialog( pDlg, nType, FALSE )
+ ImpPathDialog( pDlg, nType, sal_False )
{
bOpen = (nWinBits & WB_SAVEAS) == 0;
@@ -838,7 +838,7 @@ IMPL_LINK( ImpFileDialog, DblClickHdl, ListBox *, pBox )
UniString aEntry( pBox->GetSelectEntry() );
aEntry.EraseLeadingChars( ' ' );
- USHORT nPos = aEntry.Search( '/' );
+ sal_uInt16 nPos = aEntry.Search( '/' );
aEntry.Erase( nPos );
// build the absolute path to the selected item
@@ -848,7 +848,7 @@ IMPL_LINK( ImpFileDialog, DblClickHdl, ListBox *, pBox )
if( ( pDirList != pFileList ) && ( pBox == pDirList ) )
{
// SVLOOK
- USHORT nCurPos = pDirList->GetSelectEntryPos();
+ sal_uInt16 nCurPos = pDirList->GetSelectEntryPos();
// Wenn es schon das aktuelle ist, dann mache nichts
if( nCurPos == nDirCount-1 )
@@ -877,7 +877,7 @@ IMPL_LINK( ImpFileDialog, DblClickHdl, ListBox *, pBox )
{
// dann kompletten Pfad mit Filenamen merken und Dialog beenden
aPath = aNewPath;
- GetFileDialog()->EndDialog( TRUE );
+ GetFileDialog()->EndDialog( sal_True );
}
}
@@ -890,23 +890,23 @@ IMPL_LINK( ImpFileDialog, DblClickHdl, ListBox *, pBox )
{
// Neuen Pfad setzen und Listboxen updaten
aPath = aNewPath;
- if( !aPath.SetCWD( TRUE ) )
+ if( !aPath.SetCWD( sal_True ) )
{
if( ErrorBox( GetFileDialog(), WB_OK_CANCEL|WB_DEF_OK,
UniString( SvtResId( STR_FILEDLG_CANTCHDIR ) ) ).Execute() == RET_CANCEL )
{
- GetFileDialog()->EndDialog( FALSE );
+ GetFileDialog()->EndDialog( sal_False );
}
}
- UpdateEntries( TRUE );
+ UpdateEntries( sal_True );
GetFileDialog()->FileSelect();
}
if( pBox == pTypeList )
{
// Neue Maske setzen, und Listboxen updaten
- USHORT nCurPos = pTypeList->GetSelectEntryPos();
- if( nCurPos+1 > (USHORT)aFilterList.Count() )
+ sal_uInt16 nCurPos = pTypeList->GetSelectEntryPos();
+ if( nCurPos+1 > (sal_uInt16)aFilterList.Count() )
aMask = UniString::CreateFromAscii( ALLFILES );
else
{
@@ -918,7 +918,7 @@ IMPL_LINK( ImpFileDialog, DblClickHdl, ListBox *, pBox )
}
pEdit->SetText( aMask() );
- UpdateEntries( FALSE );
+ UpdateEntries( sal_False );
GetFileDialog()->FilterSelect();
}
@@ -939,7 +939,7 @@ IMPL_LINK( ImpFileDialog, ClickHdl, Button*, pBtn )
// Ja, dann kompletten Pfad mit Filenamen merken und Dialog beenden
aPath = aFile;
aPath.ToAbs();
- GetFileDialog()->EndDialog( TRUE );
+ GetFileDialog()->EndDialog( sal_True );
}
else
{
@@ -954,19 +954,19 @@ IMPL_LINK( ImpFileDialog, ClickHdl, Button*, pBtn )
// Neue Maske und neues Verzeichnis setzen, und Listboxen updaten
pEdit->SetText( aMask() );
- aFile.SetCWD( TRUE );
- UpdateEntries( TRUE );
+ aFile.SetCWD( sal_True );
+ UpdateEntries( sal_True );
GetFileDialog()->LeaveWait();
}
}
else if( pBtn == pCancelBtn )
- GetFileDialog()->EndDialog( FALSE );
+ GetFileDialog()->EndDialog( sal_False );
return 0;
}
-void ImpFileDialog::UpdateEntries( const BOOL bWithDirs )
+void ImpFileDialog::UpdateEntries( const sal_Bool bWithDirs )
{
GetFileDialog()->EnterWait();
@@ -977,16 +977,16 @@ void ImpFileDialog::UpdateEntries( const BOOL bWithDirs )
if( pFileList )
{
- pFileList->SetUpdateMode( FALSE );
+ pFileList->SetUpdateMode( sal_False );
pFileList->Clear();
}
if( bWithDirs && (pDirList != pFileList) )
{
- pDirList->SetUpdateMode( FALSE );
+ pDirList->SetUpdateMode( sal_False );
pDirList->Clear();
- for( USHORT i = nDirCount; i > 0; i-- )
+ for( sal_uInt16 i = nDirCount; i > 0; i-- )
{
UniString aEntryStr( aTabString );
aEntryStr += aTmpPath[i-1].GetName();
@@ -1005,10 +1005,10 @@ void ImpFileDialog::UpdateEntries( const BOOL bWithDirs )
DirEntry aCurrent;
aCurrent.ToAbs();
Dir aDir( aCurrent, FSYS_KIND_DIR|FSYS_KIND_FILE );
- USHORT nEntries = aDir.Count();
+ sal_uInt16 nEntries = aDir.Count();
// TempMask, weil Vergleich case-sensitiv
- BOOL bMatchCase = FALSE; //aCurrent.IsCaseSensitive();
+ sal_Bool bMatchCase = sal_False; //aCurrent.IsCaseSensitive();
UniString aWildCard( aMask.GetWildCard() );
if ( !bMatchCase )
aWildCard.ToLowerAscii();
@@ -1016,7 +1016,7 @@ void ImpFileDialog::UpdateEntries( const BOOL bWithDirs )
if ( nEntries )
{
UniStringList aSortDirList;
- for ( USHORT n = 0; n < nEntries; n++ )
+ for ( sal_uInt16 n = 0; n < nEntries; n++ )
{
DirEntry& rEntry = aDir[n];
UniString aName( rEntry.GetName() );
@@ -1045,7 +1045,7 @@ void ImpFileDialog::UpdateEntries( const BOOL bWithDirs )
}
else
{
- ULONG l = 0;
+ sal_uLong l = 0;
if( xCollator.is() )
{
for( l = 0; l < aSortDirList.Count(); l++ )
@@ -1057,7 +1057,7 @@ void ImpFileDialog::UpdateEntries( const BOOL bWithDirs )
}
}
}
- for( ULONG l = 0; l < aSortDirList.Count(); l++ )
+ for( sal_uLong l = 0; l < aSortDirList.Count(); l++ )
{
UniString aEntryStr( aTabString );
aEntryStr += *aSortDirList.GetObject(l);
@@ -1075,7 +1075,7 @@ void ImpFileDialog::UpdateEntries( const BOOL bWithDirs )
pFileList->SelectEntryPos( 1 );
else
pFileList->SetNoSelection();
- pFileList->SetUpdateMode( TRUE );
+ pFileList->SetUpdateMode( sal_True );
pFileList->Invalidate();
pFileList->Update();
}
@@ -1094,14 +1094,14 @@ void ImpFileDialog::UpdateEntries( const BOOL bWithDirs )
GetFileDialog()->LeaveWait();
}
-BOOL ImpFileDialog::IsFileOk( const DirEntry& rDirEntry )
+sal_Bool ImpFileDialog::IsFileOk( const DirEntry& rDirEntry )
{
if( FileStat( rDirEntry ).GetKind() & (FSYS_KIND_WILD | FSYS_KIND_DEV) )
- return FALSE;
+ return sal_False;
if( FileStat( rDirEntry ).GetKind() & FSYS_KIND_DIR )
{
if( pFileList )
- return FALSE;
+ return sal_False;
}
else if( bOpen )
{
@@ -1115,7 +1115,7 @@ BOOL ImpFileDialog::IsFileOk( const DirEntry& rDirEntry )
InfoBox aBox( GetFileDialog(),
aErrorString );
aBox.Execute();
- return FALSE;
+ return sal_False;
}
}
else
@@ -1131,7 +1131,7 @@ BOOL ImpFileDialog::IsFileOk( const DirEntry& rDirEntry )
WinBits( WB_YES_NO | WB_DEF_NO ),
aQueryString );
if( aBox.Execute() != RET_YES )
- return FALSE;
+ return sal_False;
}
}
return GetFileDialog()->OK() != 0;
@@ -1160,9 +1160,9 @@ void ImpFileDialog::SetPath( UniString const & rPath )
pEdit->SetText( rPath );
}
- aFile.SetCWD( TRUE );
+ aFile.SetCWD( sal_True );
- UpdateEntries( TRUE );
+ UpdateEntries( sal_True );
GetFileDialog()->LeaveWait();
}
@@ -1223,7 +1223,7 @@ void ImpFileDialog::SetCurFilter( const UniString& rFilter )
pItem = aFilterList.Next();
if( pItem )
- pTypeList->SelectEntryPos( (USHORT)aFilterList.GetCurPos() );
+ pTypeList->SelectEntryPos( (sal_uInt16)aFilterList.GetCurPos() );
else
pTypeList->SetNoSelection();
}
@@ -1254,7 +1254,7 @@ void ImpFileDialog::PreExecute()
if( pTypeList )
{
- USHORT nCurType = pTypeList->GetSelectEntryPos();
+ sal_uInt16 nCurType = pTypeList->GetSelectEntryPos();
if( nCurType < aFilterList.Count() )
{
UniString aFilterListMask = aFilterList.GetObject( nCurType )->aMask;
@@ -1294,7 +1294,7 @@ UniString ImpFileDialog::ExtendFileName( DirEntry aEntry ) const
UniString aPostfix; // hier kommt die ausgesuchte Extension herein
// ist ein Filter mit Extension gesetzt?
- USHORT nChosenFilterPos = pTypeList->GetSelectEntryPos();
+ sal_uInt16 nChosenFilterPos = pTypeList->GetSelectEntryPos();
if( nChosenFilterPos != LISTBOX_ENTRY_NOTFOUND )
{
UniString aExtensionMask = GetFileDialog()->GetFilterType( nChosenFilterPos );
@@ -1347,7 +1347,7 @@ UniString ImpFileDialog::ExtendFileName( DirEntry aEntry ) const
}
-void ImpSvFileDlg::CreateDialog( PathDialog* pSvDlg, WinBits nStyle, RESOURCE_TYPE nType, BOOL bCreate )
+void ImpSvFileDlg::CreateDialog( PathDialog* pSvDlg, WinBits nStyle, RESOURCE_TYPE nType, sal_Bool bCreate )
{
delete pDlg;
if ( nType == WINDOW_PATHDIALOG )
diff --git a/svtools/source/dialogs/filedlg2.hxx b/svtools/source/dialogs/filedlg2.hxx
index 4d32565a2775..36214db27d33 100644
--- a/svtools/source/dialogs/filedlg2.hxx
+++ b/svtools/source/dialogs/filedlg2.hxx
@@ -91,10 +91,10 @@ private:
PushButton* pHomeBtn;
PushButton* pNewDirBtn;
- USHORT nOwnChilds;
+ sal_uInt16 nOwnChilds;
DirEntry aPath; // aktuell angewaehlter Pfad
- USHORT nDirCount; // Anzahl der Verzeichnis-
+ sal_uInt16 nDirCount; // Anzahl der Verzeichnis-
// Verschachtelungen
::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCollator >
@@ -102,10 +102,10 @@ private:
protected:
- virtual void UpdateEntries( const BOOL bWithDirs );
+ virtual void UpdateEntries( const sal_Bool bWithDirs );
void UpdateDirs( const DirEntry& rTmpPath );
- BOOL IsFileOk( const DirEntry& rDirEntry );
+ sal_Bool IsFileOk( const DirEntry& rDirEntry );
void InitControls();
DECL_LINK( SelectHdl, ListBox * );
@@ -113,7 +113,7 @@ protected:
DECL_LINK( ClickHdl, Button * );
public:
- ImpPathDialog( PathDialog* pDlg, RESOURCE_TYPE nType, BOOL bCreateDir );
+ ImpPathDialog( PathDialog* pDlg, RESOURCE_TYPE nType, sal_Bool bCreateDir );
virtual ~ImpPathDialog();
virtual void SetPath( const String& rPath );
@@ -142,9 +142,9 @@ private:
WildCard aMask; // aktuelle Maske
ImpFilterList aFilterList; // Filterliste
- USHORT nCurFilter; // aktueller Filter
+ sal_uInt16 nCurFilter; // aktueller Filter
- BOOL bOpen; // TRUE = Open; FALSE = SAVEAS
+ sal_Bool bOpen; // sal_True = Open; sal_False = SAVEAS
protected:
void InitControls();
@@ -155,8 +155,8 @@ protected:
DECL_LINK( DblClickHdl, ListBox * );
DECL_LINK( ClickHdl, Button * );
- virtual void UpdateEntries( const BOOL bWithDirs );
- BOOL IsFileOk( const DirEntry& rDirEntry );
+ virtual void UpdateEntries( const sal_Bool bWithDirs );
+ sal_Bool IsFileOk( const DirEntry& rDirEntry );
public:
ImpFileDialog( PathDialog* pDlg, WinBits nStyle, RESOURCE_TYPE nType );
@@ -168,9 +168,9 @@ public:
void SetCurFilter( const String& rFilter );
String GetCurFilter() const;
- USHORT GetFilterCount() const { return (USHORT)aFilterList.Count(); }
- inline String GetFilterName( USHORT nPos ) const;
- inline String GetFilterType( USHORT nPos ) const;
+ sal_uInt16 GetFilterCount() const { return (sal_uInt16)aFilterList.Count(); }
+ inline String GetFilterName( sal_uInt16 nPos ) const;
+ inline String GetFilterType( sal_uInt16 nPos ) const;
virtual void SetPath( const String& rPath );
virtual void SetPath( const Edit& rEdit );
@@ -181,7 +181,7 @@ public:
FileDialog* GetFileDialog() const { return (FileDialog*)GetPathDialog(); }
};
-inline String ImpFileDialog::GetFilterName( USHORT nPos ) const
+inline String ImpFileDialog::GetFilterName( sal_uInt16 nPos ) const
{
String aName;
ImpFilterItem* pItem = aFilterList.GetObject( nPos );
@@ -190,7 +190,7 @@ inline String ImpFileDialog::GetFilterName( USHORT nPos ) const
return aName;
}
-inline String ImpFileDialog::GetFilterType( USHORT nPos ) const
+inline String ImpFileDialog::GetFilterType( sal_uInt16 nPos ) const
{
String aFilterMask;
ImpFilterItem* pItem = aFilterList.GetObject( nPos );
@@ -209,7 +209,7 @@ public:
~ImpSvFileDlg() { delete pDlg; }
ImpPathDialog* GetDialog() const { return pDlg; }
- void CreateDialog( PathDialog* pCreateFrom, WinBits nStyle, RESOURCE_TYPE nType, BOOL bCreate );
+ void CreateDialog( PathDialog* pCreateFrom, WinBits nStyle, RESOURCE_TYPE nType, sal_Bool bCreate );
void SetOkButtonText( const String& rText ) { pDlg->SetOkButtonText( rText ); } // ihr habts ja nicht anders gewollt
void SetCancelButtonText( const String& rText ) { pDlg->SetCancelButtonText( rText ); }
diff --git a/svtools/source/dialogs/insdlg.cxx b/svtools/source/dialogs/insdlg.cxx
index 0dd30ebdab89..605f9ed5db07 100644
--- a/svtools/source/dialogs/insdlg.cxx
+++ b/svtools/source/dialogs/insdlg.cxx
@@ -77,7 +77,7 @@ PRV_SV_IMPL_OWNER_LIST( SvObjectServerList, SvObjectServer )
*************************************************************************/
const SvObjectServer * SvObjectServerList::Get( const String & rHumanName ) const
{
- for( ULONG i = 0; i < Count(); i++ )
+ for( sal_uLong i = 0; i < Count(); i++ )
{
if( rHumanName == GetObject( i ).GetHumanName() )
return &GetObject( i );
@@ -92,7 +92,7 @@ const SvObjectServer * SvObjectServerList::Get( const String & rHumanName ) cons
*************************************************************************/
const SvObjectServer * SvObjectServerList::Get( const SvGlobalName & rName ) const
{
- for( ULONG i = 0; i < Count(); i++ )
+ for( sal_uLong i = 0; i < Count(); i++ )
{
if( rName == GetObject( i ).GetClassName() )
return &GetObject( i );
@@ -238,7 +238,7 @@ String SvPasteObjectHelper::GetSotFormatUIName( SotFormatStringId nId )
struct SotResourcePair
{
SotFormatStringId mnSotId;
- USHORT mnResId;
+ sal_uInt16 mnResId;
};
static const SotResourcePair aSotResourcePairs[] =
@@ -312,7 +312,7 @@ String SvPasteObjectHelper::GetSotFormatUIName( SotFormatStringId nId )
};
String aUIName;
- USHORT nResId = 0;
+ sal_uInt16 nResId = 0;
for( sal_uInt32 i = 0, nCount = sizeof( aSotResourcePairs ) / sizeof( aSotResourcePairs[ 0 ] ); ( i < nCount ) && !nResId; i++ )
{
diff --git a/svtools/source/dialogs/mcvmath.cxx b/svtools/source/dialogs/mcvmath.cxx
index d07c41acba04..d98493114fd3 100644
--- a/svtools/source/dialogs/mcvmath.cxx
+++ b/svtools/source/dialogs/mcvmath.cxx
@@ -99,11 +99,11 @@ FixCpx ImpMultBig2( const FixCpx& ra, const FixCpx& rb )
|*
**************************************************************************/
-USHORT ImpSqrt( ULONG nRadi )
+sal_uInt16 ImpSqrt( sal_uLong nRadi )
{
- register ULONG inf = 1;
- register ULONG sup = nRadi;
- register ULONG sqr;
+ register sal_uLong inf = 1;
+ register sal_uLong sup = nRadi;
+ register sal_uLong sqr;
if ( !nRadi )
return 0;
@@ -118,7 +118,7 @@ USHORT ImpSqrt( ULONG nRadi )
sqr = (nRadi/sqr + sqr) >> 1; // 2 Newton-Iterationen reichen fuer
sqr = (nRadi/sqr + sqr) >> 1; // +- 1 Digit
- return sal::static_int_cast< USHORT >(sqr);
+ return sal::static_int_cast< sal_uInt16 >(sqr);
}
/**************************************************************************
@@ -133,7 +133,7 @@ USHORT ImpSqrt( ULONG nRadi )
// e**(i*nPhi), Einheit nPhi: 2**16 == 360 Grad
-FixCpx ImpExPI( USHORT nPhi )
+FixCpx ImpExPI( sal_uInt16 nPhi )
{
short i;
FixCpx aIter(1L); // e**(0*i)
@@ -165,10 +165,10 @@ FixCpx ImpExPI( USHORT nPhi )
// use for x*x+y*y==1 only
-static USHORT ImpATanx2( const Fix& rX, const Fix& rY )
+static sal_uInt16 ImpATanx2( const Fix& rX, const Fix& rY )
{
- USHORT phi0 = 0; // result angel higher part
- USHORT phi = 0; // dito lower part
+ sal_uInt16 phi0 = 0; // result angel higher part
+ sal_uInt16 phi = 0; // dito lower part
long x = rX.x;
long y = rY.x;
long z;
@@ -177,7 +177,7 @@ static USHORT ImpATanx2( const Fix& rX, const Fix& rY )
FixCpx aTry;
FixCpx aInc;
FixCpx aIter(1L);
- BOOL Small = FALSE;
+ sal_Bool Small = sal_False;
if ( (x==0) && (y==0) )
return 0;
@@ -225,7 +225,7 @@ static USHORT ImpATanx2( const Fix& rX, const Fix& rY )
phi += (1<<i);
if ( i > 11 )
- Small=TRUE;
+ Small=sal_True;
}
}
}
@@ -243,9 +243,9 @@ static USHORT ImpATanx2( const Fix& rX, const Fix& rY )
|*
**************************************************************************/
-USHORT ImpATan2( const short x, const short y )
+sal_uInt16 ImpATan2( const short x, const short y )
{
- Fix rRad = ImpSqrt(ULONG(long(x)*x+long(y)*y));
+ Fix rRad = ImpSqrt(sal_uLong(long(x)*x+long(y)*y));
if ( !rRad.x )
return 0;
@@ -267,9 +267,9 @@ USHORT ImpATan2( const short x, const short y )
|*
**************************************************************************/
-void ImpCartToPolar( const short x, const short y, Fix& rRad, USHORT& rPhi )
+void ImpCartToPolar( const short x, const short y, Fix& rRad, sal_uInt16& rPhi )
{
- rRad = Fix( ImpSqrt( ULONG( long(x)*x+long(y)*y ) ) );
+ rRad = Fix( ImpSqrt( sal_uLong( long(x)*x+long(y)*y ) ) );
if ( !rRad.x )
rPhi=0;
@@ -294,7 +294,7 @@ void ImpCartToPolar( const short x, const short y, Fix& rRad, USHORT& rPhi )
|*
**************************************************************************/
-void ImpPolarToCart( const Fix& rR, const USHORT Phi, short& rX, short& rY )
+void ImpPolarToCart( const Fix& rR, const sal_uInt16 Phi, short& rX, short& rY )
{
FixCpx fc = ImpExPI( Phi ); // calculate sin() & cos()
fc.GetReal().MultBig( rR );
diff --git a/svtools/source/dialogs/mcvmath.hxx b/svtools/source/dialogs/mcvmath.hxx
index 67d54fd80cf0..7708a8f1c89a 100644
--- a/svtools/source/dialogs/mcvmath.hxx
+++ b/svtools/source/dialogs/mcvmath.hxx
@@ -83,7 +83,7 @@ public:
Fix() { x=0; }
Fix( int i ) { x=(long(i)<<FIX_POST); }
Fix( short l ) { x=(long(l)<<FIX_POST); }
- Fix( USHORT l ) { x=(long(l)<<FIX_POST); }
+ Fix( sal_uInt16 l ) { x=(long(l)<<FIX_POST); }
Fix( long l ) { x=(l<<FIX_POST); }
Fix( long Z, long N ) { x=(Z<<FIX_POST)/N; }
@@ -101,8 +101,8 @@ public:
void DivBig( const Fix& a )
{ x=((x<<FIX_P3)/a.x)<<FIX_P2; }
- friend BOOL operator> ( const Fix& a, const Fix& b ) { return a.x > b.x; }
- friend BOOL operator< ( const Fix& a, const Fix& b ) { return a.x < b.x; }
+ friend sal_Bool operator> ( const Fix& a, const Fix& b ) { return a.x > b.x; }
+ friend sal_Bool operator< ( const Fix& a, const Fix& b ) { return a.x < b.x; }
operator long() const { return (x+FIX_ADD) >> FIX_POST; }
operator double() const { return double(x)/(1<<FIX_POST); }
@@ -218,11 +218,11 @@ inline FixCpx operator/ ( const FixCpx& a, const FixCpx& b )
Fix ImpMultBig2( const Fix& a, const Fix& b );
FixCpx ImpMultBig2( const FixCpx& ra, const FixCpx& rb );
-void ImpCartToPolar( const short x, const short y, Fix& rRad, USHORT& rPhi );
-void ImpPolarToCart( const Fix& rR, const USHORT Phi, short& rX, short& rY );
+void ImpCartToPolar( const short x, const short y, Fix& rRad, sal_uInt16& rPhi );
+void ImpPolarToCart( const Fix& rR, const sal_uInt16 Phi, short& rX, short& rY );
-USHORT ImpSqrt( ULONG nRadi );
-USHORT ImpATan2( const short x, const short y );
-FixCpx ImpExPI( USHORT nPhi );
+sal_uInt16 ImpSqrt( sal_uLong nRadi );
+sal_uInt16 ImpATan2( const short x, const short y );
+FixCpx ImpExPI( sal_uInt16 nPhi );
#endif // _MCVMATH_HXX
diff --git a/svtools/source/dialogs/prnsetup.cxx b/svtools/source/dialogs/prnsetup.cxx
index ceef2a88642b..12a71a706b60 100644
--- a/svtools/source/dialogs/prnsetup.cxx
+++ b/svtools/source/dialogs/prnsetup.cxx
@@ -61,7 +61,7 @@ void ImplFillPrnDlgListBox( const Printer* pPrinter,
// -----------------------------------------------------------------------
-void ImplFreePrnDlgListBox( ListBox* pBox, BOOL bClear )
+void ImplFreePrnDlgListBox( ListBox* pBox, sal_Bool bClear )
{
if ( bClear )
pBox->Clear();
@@ -149,7 +149,7 @@ static void ImplPrnDlgAddString( XubString& rStr, const XubString& rAddStr )
// -----------------------------------------------------------------------
-static void ImplPrnDlgAddResString( XubString& rStr, USHORT nResId )
+static void ImplPrnDlgAddResString( XubString& rStr, sal_uInt16 nResId )
{
SvtResId aResId( nResId );
XubString aAddStr( aResId );
@@ -161,7 +161,7 @@ static void ImplPrnDlgAddResString( XubString& rStr, USHORT nResId )
XubString ImplPrnDlgGetStatusText( const QueueInfo& rInfo )
{
XubString aStr;
- ULONG nStatus = rInfo.GetStatus();
+ sal_uLong nStatus = rInfo.GetStatus();
// Default-Printer
if ( rInfo.GetPrinterName().Len() &&
@@ -221,7 +221,7 @@ XubString ImplPrnDlgGetStatusText( const QueueInfo& rInfo )
ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_POWER_SAVE );
// Anzahl Jobs
- ULONG nJobs = rInfo.GetJobs();
+ sal_uLong nJobs = rInfo.GetJobs();
if ( nJobs && (nJobs != QUEUE_JOBS_DONTKNOW) )
{
XubString aJobStr( SvtResId( STR_SVT_PRNDLG_JOBCOUNT ) );
@@ -273,7 +273,7 @@ PrinterSetupDialog::PrinterSetupDialog( Window* pWindow ) :
PrinterSetupDialog::~PrinterSetupDialog()
{
- ImplFreePrnDlgListBox( &maLbName, FALSE );
+ ImplFreePrnDlgListBox( &maLbName, sal_False );
delete mpTempPrinter;
}
@@ -378,7 +378,7 @@ short PrinterSetupDialog::Execute()
if ( !mpPrinter || mpPrinter->IsPrinting() || mpPrinter->IsJobActive() )
{
DBG_ERRORFILE( "PrinterSetupDialog::Execute() - No Printer or printer is printing" );
- return FALSE;
+ return sal_False;
}
Printer::updatePrinters();
@@ -391,7 +391,7 @@ short PrinterSetupDialog::Execute()
short nRet = ModalDialog::Execute();
// Wenn Dialog mit OK beendet wurde, dann die Daten updaten
- if ( nRet == TRUE )
+ if ( nRet == sal_True )
{
if ( mpTempPrinter )
mpPrinter->SetPrinterProps( mpTempPrinter );
diff --git a/svtools/source/dialogs/property.cxx b/svtools/source/dialogs/property.cxx
index 3b081ce2f520..140d00d39bb1 100644
--- a/svtools/source/dialogs/property.cxx
+++ b/svtools/source/dialogs/property.cxx
@@ -108,7 +108,7 @@ void SvXPropertyEdit::SetCtrSize(const Size& rSize)
aEdit.SetSizePixel(aSize);
}
-void SvXPropertyEdit::SetLocked(BOOL bLocked)
+void SvXPropertyEdit::SetLocked(sal_Bool bLocked)
{
if(bLocked)
Disable();
@@ -126,9 +126,9 @@ String SvXPropertyEdit::GetProperty() const
return aEdit.GetText();
}
-BOOL SvXPropertyEdit::HasList()
+sal_Bool SvXPropertyEdit::HasList()
{
- return FALSE;
+ return sal_False;
};
@@ -136,7 +136,7 @@ void SvXPropertyEdit::ClearList()
{
return;
}
-void SvXPropertyEdit::InsertEntry( const String&,USHORT )
+void SvXPropertyEdit::InsertEntry( const String&,sal_uInt16 )
{
return;
}
@@ -236,7 +236,7 @@ void SvXPropertyListBox::SetCtrSize(const Size& rSize)
aListBox.SetSizePixel(aSize);
}
-void SvXPropertyListBox::SetLocked(BOOL bLocked)
+void SvXPropertyListBox::SetLocked(sal_Bool bLocked)
{
if(bLocked)
Disable();
@@ -254,9 +254,9 @@ String SvXPropertyListBox::GetProperty()const
return aListBox.GetSelectEntry();
}
-BOOL SvXPropertyListBox::HasList()
+sal_Bool SvXPropertyListBox::HasList()
{
- return TRUE;
+ return sal_True;
}
@@ -265,7 +265,7 @@ void SvXPropertyListBox::ClearList()
aListBox.Clear();
}
-void SvXPropertyListBox::InsertEntry( const String& rString,USHORT nPos)
+void SvXPropertyListBox::InsertEntry( const String& rString,sal_uInt16 nPos)
{
aListBox.InsertEntry(rString,nPos);
}
@@ -345,7 +345,7 @@ SvXPropertyComboBox::SvXPropertyComboBox( Window* pParent, const ResId& rResId)
aComboBox.Show();
}
-void SvXPropertyComboBox::SetLocked(BOOL bLocked)
+void SvXPropertyComboBox::SetLocked(sal_Bool bLocked)
{
if(bLocked)
Disable();
@@ -384,9 +384,9 @@ String SvXPropertyComboBox::GetProperty() const
return aComboBox.GetText();
}
-BOOL SvXPropertyComboBox::HasList()
+sal_Bool SvXPropertyComboBox::HasList()
{
- return TRUE;
+ return sal_True;
}
void SvXPropertyComboBox::ClearList()
@@ -394,7 +394,7 @@ void SvXPropertyComboBox::ClearList()
aComboBox.Clear();
}
-void SvXPropertyComboBox::InsertEntry( const String& rString,USHORT nPos)
+void SvXPropertyComboBox::InsertEntry( const String& rString,sal_uInt16 nPos)
{
aComboBox.InsertEntry(rString,nPos);
}
@@ -446,11 +446,11 @@ SvPropertyLine::SvPropertyLine( Window* pParent,WinBits nWinStyle)
aName(this,WB_BORDER),
pSvXPropertyControl(NULL),
aXButton(this,WB_BORDER),
- bIsLocked(FALSE),
- bIsHyperlink(FALSE)
+ bIsLocked(sal_False),
+ bIsHyperlink(sal_False)
{
- bNeedsRepaint = TRUE;
- bHasXButton = FALSE;
+ bNeedsRepaint = sal_True;
+ bHasXButton = sal_False;
aXButton.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "..." ) ) );
aName.Show();
aXButton.Show();
@@ -465,11 +465,11 @@ SvPropertyLine::SvPropertyLine( Window* pParent,const ResId& rResId )
aName (this,WB_BORDER),
pSvXPropertyControl(NULL),
aXButton (this,WB_BORDER),
- bIsLocked(FALSE),
- bIsHyperlink(FALSE)
+ bIsLocked(sal_False),
+ bIsHyperlink(sal_False)
{
- bNeedsRepaint = TRUE;
- bHasXButton = FALSE;
+ bNeedsRepaint = sal_True;
+ bHasXButton = sal_False;
eKindOfCtr = KOC_UNDEFINED;
aXButton.SetText( XubString( RTL_CONSTASCII_USTRINGPARAM( "..." ) ) );
aName.Show();
@@ -504,11 +504,11 @@ void SvPropertyLine::Resize()
aName.SetPosPixel(aPos);
aName.SetSizePixel(aSize);
- USHORT nXButtonWidth=0;
+ sal_uInt16 nXButtonWidth=0;
if(bHasXButton)
{
- nXButtonWidth=(USHORT)aSize.Height();
+ nXButtonWidth=(sal_uInt16)aSize.Height();
}
a2Size.Width()=a2Size.Width()-nXButtonWidth;
@@ -530,12 +530,12 @@ void SvPropertyLine::Resize()
}
}
-void SvPropertyLine::SetNeedsRepaint(BOOL bFlag)
+void SvPropertyLine::SetNeedsRepaint(sal_Bool bFlag)
{
bNeedsRepaint=bFlag;
}
-BOOL SvPropertyLine::NeedsRepaint()
+sal_Bool SvPropertyLine::NeedsRepaint()
{
return bNeedsRepaint;
}
@@ -563,22 +563,22 @@ eKindOfControl SvPropertyLine::GetKindOfControl()
void SvPropertyLine::ShowXButton()
{
- bHasXButton=TRUE;
+ bHasXButton=sal_True;
aXButton.Show();
Resize();
}
void SvPropertyLine::HideXButton()
{
- bHasXButton=FALSE;
+ bHasXButton=sal_False;
aXButton.Hide();
Resize();
}
-BOOL SvPropertyLine::IsVisibleXButton()
+sal_Bool SvPropertyLine::IsVisibleXButton()
{
return bHasXButton;
}
-void SvPropertyLine::ShowAsHyperLink(BOOL nFlag)
+void SvPropertyLine::ShowAsHyperLink(sal_Bool nFlag)
{
bIsHyperlink=nFlag;
if(nFlag)
@@ -595,24 +595,24 @@ void SvPropertyLine::ShowAsHyperLink(BOOL nFlag)
}
}
-BOOL SvPropertyLine::IsShownAsHyperlink()
+sal_Bool SvPropertyLine::IsShownAsHyperlink()
{
return bIsHyperlink;
}
-void SvPropertyLine::Locked(BOOL nFlag)
+void SvPropertyLine::Locked(sal_Bool nFlag)
{
bIsLocked=nFlag;
if(pSvXPropertyControl!=NULL)
pSvXPropertyControl->SetLocked(nFlag);
}
-BOOL SvPropertyLine::IsLineLocked()
+sal_Bool SvPropertyLine::IsLineLocked()
{
return bIsLocked;
}
-void SvPropertyLine::SetNameWidth(USHORT nWidth)
+void SvPropertyLine::SetNameWidth(sal_uInt16 nWidth)
{
nNameWidth=nWidth;
Resize();
@@ -687,7 +687,7 @@ SvListBoxForProperties::SvListBoxForProperties( Window* pParent, WinBits nWinSty
nTheNameSize=0;
ListBox aListBox(this,WB_DROPDOWN);
aListBox.SetPosSizePixel(Point(0,0),Size(100,100));
- nRowHeight=(USHORT)aListBox.GetSizePixel().Height();
+ nRowHeight=(sal_uInt16)aListBox.GetSizePixel().Height();
Wallpaper aWall = aPlayGround.GetBackground();
aWall.SetColor( Color( COL_TRANSPARENT ) );
aPlayGround.SetBackground( aWall );
@@ -709,7 +709,7 @@ SvListBoxForProperties::SvListBoxForProperties( Window* pParent, const ResId& rR
nYOffset=0;
ListBox aListBox(this,WB_DROPDOWN);
aListBox.SetPosSizePixel(Point(0,0),Size(100,100));
- nRowHeight=(USHORT)aListBox.GetSizePixel().Height();
+ nRowHeight=(sal_uInt16)aListBox.GetSizePixel().Height();
Wallpaper aWall = aPlayGround.GetBackground();
aWall.SetColor( Color( COL_TRANSPARENT ) );
aPlayGround.SetBackground( aWall );
@@ -727,7 +727,7 @@ SvListBoxForProperties::~SvListBoxForProperties()
void SvListBoxForProperties::Clear()
{
- for(USHORT i=0;i<PLineArray.Count();i++)
+ for(sal_uInt16 i=0;i<PLineArray.Count();i++)
{
SvPropertyLine* pPropLine=PLineArray[i];
@@ -773,19 +773,19 @@ void SvListBoxForProperties::SetController( SvPropertyDataControl *pPDC)
pPropDataControl=pPDC;
}
-USHORT SvListBoxForProperties::CalcVisibleLines()
+sal_uInt16 SvListBoxForProperties::CalcVisibleLines()
{
Size aSize=aPlayGround.GetOutputSizePixel();
- USHORT nResult=0;
+ sal_uInt16 nResult=0;
if(nRowHeight!=0)
- nResult=(USHORT) aSize.Height()/nRowHeight;
+ nResult=(sal_uInt16) aSize.Height()/nRowHeight;
return nResult;
}
void SvListBoxForProperties::UpdateVScroll()
{
- USHORT nLines=CalcVisibleLines();
+ sal_uInt16 nLines=CalcVisibleLines();
aVScroll.SetPageSize(nLines-1);
aVScroll.SetVisibleSize(nLines-1);
aVScroll.SetRange(Range(0,PLineArray.Count()-1));
@@ -795,7 +795,7 @@ void SvListBoxForProperties::UpdateVScroll()
}
else
{
- BOOL bFlag=aVScroll.IsVisible();
+ sal_Bool bFlag=aVScroll.IsVisible();
aVScroll.Show();
if(!bFlag)Resize();
}
@@ -807,7 +807,7 @@ void SvListBoxForProperties::UpdatePosNSize()
{
Point aPos(0,nYOffset);
- for(USHORT i=0; i<PLineArray.Count();i++)
+ for(sal_uInt16 i=0; i<PLineArray.Count();i++)
{
if((PLineArray[i])->NeedsRepaint())
{
@@ -819,7 +819,7 @@ void SvListBoxForProperties::UpdatePosNSize()
(PLineArray[i])->Invalidate();
(PLineArray[i])->Update();
(PLineArray[i])->Show();
- (PLineArray[i])->SetNeedsRepaint(FALSE);
+ (PLineArray[i])->SetNeedsRepaint(sal_False);
}
else
{
@@ -846,21 +846,21 @@ void SvListBoxForProperties::UpdatePlayGround()
long nLines=aVScroll.GetPageSize();
long nDelta=aVScroll.GetDelta();
- USHORT nStart,nEnd;
+ sal_uInt16 nStart,nEnd;
Size aSize=aPlayGround.GetOutputSizePixel();
Point aPEnd;
aPEnd.X()=aSize.Width();
if(nDelta>0)
{
- nStart=(USHORT)(nThumbPos+nLines+1-nDelta);
- nEnd=(USHORT)(nThumbPos+nLines);
+ nStart=(sal_uInt16)(nThumbPos+nLines+1-nDelta);
+ nEnd=(sal_uInt16)(nThumbPos+nLines);
aPos.Y()=(nLines+1-nDelta)*nRowHeight;
}
else
{
- nStart=(USHORT)nThumbPos;
- nEnd=(USHORT)(nThumbPos-nDelta);
+ nStart=(sal_uInt16)nThumbPos;
+ nEnd=(sal_uInt16)(nThumbPos-nDelta);
aPEnd.Y()=(nThumbPos-nDelta)*nRowHeight;;
}
@@ -870,7 +870,7 @@ void SvListBoxForProperties::UpdatePlayGround()
aPlayGround.Scroll(0,nDelta,SCROLL_CHILDREN);
- for(USHORT i=nStart; i<=nEnd;i++)
+ for(sal_uInt16 i=nStart; i<=nEnd;i++)
{
(PLineArray[i])->SetPosSizePixel(aPos,aSize);
(PLineArray[i])->SetNameWidth(nTheNameSize+2*FRAME_OFFSET);
@@ -889,18 +889,18 @@ void SvListBoxForProperties::UpdateAll()
void SvListBoxForProperties::DisableUpdate()
{
- bUpdate=FALSE;
+ bUpdate=sal_False;
}
void SvListBoxForProperties::EnableUpdate()
{
- bUpdate=TRUE;
+ bUpdate=sal_True;
UpdateAll();
}
void SvListBoxForProperties::SetPropertyValue( const String & rEntryName, const String & rValue )
{
- USHORT i, iEnd = PLineArray.Count();
+ sal_uInt16 i, iEnd = PLineArray.Count();
for( i = 0 ; i < iEnd ; i++ )
{
SvPropertyLine* pPropLine = PLineArray[ i ];
@@ -912,14 +912,14 @@ void SvListBoxForProperties::SetPropertyValue( const String & rEntryName, const
}
}
-USHORT SvListBoxForProperties::AppendEntry( const SvPropertyData& aPropData)
+sal_uInt16 SvListBoxForProperties::AppendEntry( const SvPropertyData& aPropData)
{
return InsertEntry(aPropData);
}
-USHORT SvListBoxForProperties::InsertEntry( const SvPropertyData& aPropData, USHORT nPos)
+sal_uInt16 SvListBoxForProperties::InsertEntry( const SvPropertyData& aPropData, sal_uInt16 nPos)
{
- USHORT nInsPos=nPos;
+ sal_uInt16 nInsPos=nPos;
SvPropertyLine* pPropLine=new SvPropertyLine(&aPlayGround,WB_TABSTOP | WB_DIALOGCONTROL);
if(nPos==LISTBOX_APPEND)
@@ -938,7 +938,7 @@ USHORT SvListBoxForProperties::InsertEntry( const SvPropertyData& aPropData, USH
return nInsPos;
}
-void SvListBoxForProperties::ChangeEntry( const SvPropertyData& aPropData, USHORT nPos)
+void SvListBoxForProperties::ChangeEntry( const SvPropertyData& aPropData, sal_uInt16 nPos)
{
if(nPos<PLineArray.Count())
{
@@ -993,7 +993,7 @@ void SvListBoxForProperties::ChangeEntry( const SvPropertyData& aPropData, USHOR
if(pSvXPCtr->HasList())
{
- for(USHORT i=0;i<aPropData.theValues.Count();i++)
+ for(sal_uInt16 i=0;i<aPropData.theValues.Count();i++)
{
pSvXPCtr->InsertEntry(*(aPropData.theValues[i]));
}
@@ -1002,7 +1002,7 @@ void SvListBoxForProperties::ChangeEntry( const SvPropertyData& aPropData, USHOR
pPropLine->SetName(aPropData.aName);
- USHORT nTextWidth=(USHORT)aPlayGround.GetTextWidth(aPropData.aName);
+ sal_uInt16 nTextWidth=(sal_uInt16)aPlayGround.GetTextWidth(aPropData.aName);
if ( nTheNameSize < nTextWidth )
nTheNameSize = nTextWidth;
@@ -1022,21 +1022,21 @@ void SvListBoxForProperties::ChangeEntry( const SvPropertyData& aPropData, USHOR
}
}
-USHORT SvListBoxForProperties::GetFirstVisibleEntry()
+sal_uInt16 SvListBoxForProperties::GetFirstVisibleEntry()
{
return 0;
}
-void SvListBoxForProperties::SetFirstVisibleEntry(USHORT)
+void SvListBoxForProperties::SetFirstVisibleEntry(sal_uInt16)
{
return;
}
-void SvListBoxForProperties::SetSelectedEntry(USHORT)
+void SvListBoxForProperties::SetSelectedEntry(sal_uInt16)
{
return;
}
-USHORT SvListBoxForProperties::GetSelectedEntry()
+sal_uInt16 SvListBoxForProperties::GetSelectedEntry()
{
return 0;
}
@@ -1047,7 +1047,7 @@ IMPL_LINK( SvListBoxForProperties, ScrollHdl, ScrollBar*, pSB )
{
long nDelta=aVScroll.GetDelta();
nYOffset=-aVScroll.GetThumbPos()*nRowHeight;
- //aPlayGround.SetUpdateMode(FALSE);
+ //aPlayGround.SetUpdateMode(sal_False);
long nThumbPos=aVScroll.GetThumbPos();
long nLines=aVScroll.GetPageSize();
@@ -1058,14 +1058,14 @@ IMPL_LINK( SvListBoxForProperties, ScrollHdl, ScrollBar*, pSB )
{
if(i>=nThumbPos && i<=nThumbPos+nLines)
{
- (PLineArray[sal::static_int_cast< USHORT >(i)])->
- SetNeedsRepaint(TRUE);
+ (PLineArray[sal::static_int_cast< sal_uInt16 >(i)])->
+ SetNeedsRepaint(sal_True);
}
else
{
- (PLineArray[sal::static_int_cast< USHORT >(i)])->Hide();
- (PLineArray[sal::static_int_cast< USHORT >(i)])->
- SetNeedsRepaint(FALSE);
+ (PLineArray[sal::static_int_cast< sal_uInt16 >(i)])->Hide();
+ (PLineArray[sal::static_int_cast< sal_uInt16 >(i)])->
+ SetNeedsRepaint(sal_False);
}
}
}
@@ -1186,9 +1186,9 @@ SvPropertyBox::~SvPropertyBox()
void SvPropertyBox::ClearAll()
{
- USHORT nCount=aTabControl.GetPageCount();
+ sal_uInt16 nCount=aTabControl.GetPageCount();
- for(USHORT i=nCount;i>=1;i--)
+ for(sal_uInt16 i=nCount;i>=1;i--)
{
SvTabPageForProperties* pPage=(SvTabPageForProperties*)
aTabControl.GetTabPage(i);
@@ -1207,10 +1207,10 @@ void SvPropertyBox::Resize()
aTabControl.SetPosSizePixel(aPos,aSize);
- USHORT nCount=aTabControl.GetPageCount();
+ sal_uInt16 nCount=aTabControl.GetPageCount();
aSize=aTabControl.GetTabPageSizePixel();
- for(USHORT i=1;i<=nCount;i++)
+ for(sal_uInt16 i=1;i<=nCount;i++)
{
SvTabPageForProperties* pPage=(SvTabPageForProperties*)
aTabControl.GetTabPage(i);
@@ -1220,9 +1220,9 @@ void SvPropertyBox::Resize()
}
-USHORT SvPropertyBox::AppendPage( const String & rText )
+sal_uInt16 SvPropertyBox::AppendPage( const String & rText )
{
- USHORT nId=aTabControl.GetPageCount()+1;
+ sal_uInt16 nId=aTabControl.GetPageCount()+1;
aTabControl.InsertPage( nId,rText);
SvTabPageForProperties* pPage=new SvTabPageForProperties(&aTabControl);
pPage->SetSizePixel(aTabControl.GetTabPageSizePixel());
@@ -1232,17 +1232,17 @@ USHORT SvPropertyBox::AppendPage( const String & rText )
return nId;
}
-void SvPropertyBox::SetPage( USHORT nId)
+void SvPropertyBox::SetPage( sal_uInt16 nId)
{
aTabControl.SetCurPageId(nId);
}
-USHORT SvPropertyBox::GetCurPage()
+sal_uInt16 SvPropertyBox::GetCurPage()
{
return aTabControl.GetCurPageId();
}
-USHORT SvPropertyBox::CalcVisibleLines()
+sal_uInt16 SvPropertyBox::CalcVisibleLines()
{
SvTabPageForProperties* pPage=(SvTabPageForProperties*)
aTabControl.GetTabPage(aTabControl.GetCurPageId());
@@ -1265,9 +1265,9 @@ void SvPropertyBox::DisableUpdate()
void SvPropertyBox::SetController(SvPropertyDataControl *pDataCtr)
{
pThePropDataCtr=pDataCtr;
- USHORT nCount=aTabControl.GetPageCount();
+ sal_uInt16 nCount=aTabControl.GetPageCount();
- for(USHORT i=1;i<=nCount;i++)
+ for(sal_uInt16 i=1;i<=nCount;i++)
{
SvTabPageForProperties* pPage=(SvTabPageForProperties*)
aTabControl.GetTabPage(i);
@@ -1277,21 +1277,21 @@ void SvPropertyBox::SetController(SvPropertyDataControl *pDataCtr)
}
-USHORT SvPropertyBox::InsertEntry( const SvPropertyData& rData, USHORT nPos)
+sal_uInt16 SvPropertyBox::InsertEntry( const SvPropertyData& rData, sal_uInt16 nPos)
{
SvTabPageForProperties* pPage=(SvTabPageForProperties*)
aTabControl.GetTabPage(aTabControl.GetCurPageId());
return pPage->GetTheListBox()->InsertEntry(rData,nPos);
}
-void SvPropertyBox::ChangeEntry( const SvPropertyData& rData, USHORT nPos)
+void SvPropertyBox::ChangeEntry( const SvPropertyData& rData, sal_uInt16 nPos)
{
SvTabPageForProperties* pPage=(SvTabPageForProperties*)
aTabControl.GetTabPage(aTabControl.GetCurPageId());
pPage->GetTheListBox()->ChangeEntry(rData,nPos);
}
-USHORT SvPropertyBox::AppendEntry( const SvPropertyData& rData)
+sal_uInt16 SvPropertyBox::AppendEntry( const SvPropertyData& rData)
{
SvTabPageForProperties* pPage=(SvTabPageForProperties*)
aTabControl.GetTabPage(aTabControl.GetCurPageId());
@@ -1305,26 +1305,26 @@ void SvPropertyBox::SetPropertyValue( const String & rEntryName, const String &
pPage->GetTheListBox()->SetPropertyValue( rEntryName, rValue );
}
-void SvPropertyBox::SetFirstVisibleEntry(USHORT nPos)
+void SvPropertyBox::SetFirstVisibleEntry(sal_uInt16 nPos)
{
SvTabPageForProperties* pPage=(SvTabPageForProperties*)
aTabControl.GetTabPage(aTabControl.GetCurPageId());
pPage->GetTheListBox()->SetFirstVisibleEntry(nPos);
}
-USHORT SvPropertyBox::GetFirstVisibleEntry()
+sal_uInt16 SvPropertyBox::GetFirstVisibleEntry()
{
SvTabPageForProperties* pPage=(SvTabPageForProperties*)
aTabControl.GetTabPage(aTabControl.GetCurPageId());
return pPage->GetTheListBox()->GetFirstVisibleEntry();
}
-void SvPropertyBox::SetSelectedEntry(USHORT nPos)
+void SvPropertyBox::SetSelectedEntry(sal_uInt16 nPos)
{
SvTabPageForProperties* pPage=(SvTabPageForProperties*)
aTabControl.GetTabPage(aTabControl.GetCurPageId());
pPage->GetTheListBox()->SetSelectedEntry(nPos);
}
-USHORT SvPropertyBox::GetSelectedEntry()
+sal_uInt16 SvPropertyBox::GetSelectedEntry()
{
SvTabPageForProperties* pPage=(SvTabPageForProperties*)
aTabControl.GetTabPage(aTabControl.GetCurPageId());
@@ -1411,7 +1411,7 @@ void SvBasicPropertyDataControl::SetTheCorrectProperty(const String& aString)
aCorrectProperty=aString;
}
-void SvBasicPropertyDataControl::SetIsCorrect(BOOL nFlag)
+void SvBasicPropertyDataControl::SetIsCorrect(sal_Bool nFlag)
{
bCorrectness=nFlag;
}
@@ -1451,15 +1451,15 @@ ScPropertyDlg::ScPropertyDlg( Window* pParent) :
aPropListBox.SetController(&aBaProDatCtr);
- USHORT nPageId=aPropListBox.AppendPage("YabbaDabbaDo");
+ sal_uInt16 nPageId=aPropListBox.AppendPage("YabbaDabbaDo");
aPropListBox.SetPage(nPageId);
aProperty.eKind=KOC_EDIT;
aProperty.aName=aString;
- aProperty.aName+=String((USHORT)++nCount);
+ aProperty.aName+=String((sal_uInt16)++nCount);
aProperty.aValue=sizeof ComboBox;
- aProperty.bHasVisibleXButton=FALSE;
- aProperty.bIsHyperLink=FALSE;
- aProperty.bIsLocked=FALSE;
+ aProperty.bHasVisibleXButton=sal_False;
+ aProperty.bIsHyperLink=sal_False;
+ aProperty.bIsLocked=sal_False;
aProperty.pDataPtr=NULL;
aProperty.pControl=NULL;
aProperty.theValues.Insert(new String("1"),aProperty.theValues.Count());
@@ -1467,16 +1467,16 @@ ScPropertyDlg::ScPropertyDlg( Window* pParent) :
aProperty.theValues.Insert(new String("3"),aProperty.theValues.Count());
aProperty.theValues.Insert(new String("4"),aProperty.theValues.Count());
aPropListBox.InsertEntry(aProperty);
- aProperty.bHasVisibleXButton=TRUE;
+ aProperty.bHasVisibleXButton=sal_True;
aProperty.aName=aString;
- aProperty.aName+=String((USHORT)++nCount);
+ aProperty.aName+=String((sal_uInt16)++nCount);
aProperty.aValue="42";
aProperty.eKind=KOC_LISTBOX;
aPropListBox.InsertEntry(aProperty);
aProperty.aName=aString;
- aProperty.aName+=String((USHORT)++nCount);
+ aProperty.aName+=String((sal_uInt16)++nCount);
aProperty.eKind=KOC_COMBOBOX;
- aProperty.bHasVisibleXButton=FALSE;
+ aProperty.bHasVisibleXButton=sal_False;
aPropListBox.InsertEntry(aProperty);
}
@@ -1494,19 +1494,19 @@ IMPL_LINK( ScPropertyDlg, ModifiedHdl, ListBox*, pLB )
{
String aString("Don't know ");
aProperty.aName=aString;
- aProperty.aName+=String((USHORT)++nCount);
+ aProperty.aName+=String((sal_uInt16)++nCount);
if(nCount>20)
{
String aStr("Yabba ");
aStr+=aPropListBox.GetCurPage();
- USHORT nPageId=aPropListBox.AppendPage(aStr);
+ sal_uInt16 nPageId=aPropListBox.AppendPage(aStr);
aPropListBox.SetPage(nPageId);
nCount=0;
}
aProperty.eKind=(eKindOfControl)(aKindOfListBox.GetSelectEntryPos()+1);
- aProperty.bHasVisibleXButton=FALSE;
- if((nCount % 5)==0) aProperty.bHasVisibleXButton=TRUE;
+ aProperty.bHasVisibleXButton=sal_False;
+ if((nCount % 5)==0) aProperty.bHasVisibleXButton=sal_True;
aPropListBox.InsertEntry(aProperty);
}
return 0;
@@ -1518,7 +1518,7 @@ IMPL_LINK( ScPropertyDlg, RowModifiedHdl, SvBasicPropertyDataControl* ,pProCtr)
{
aModAnswer.SetText(aBaProDatCtr.GetProperty());
aModAnswer.Invalidate();
- aBaProDatCtr.SetIsCorrect(TRUE);
+ aBaProDatCtr.SetIsCorrect(sal_True);
}
return 0;
}
@@ -1529,7 +1529,7 @@ IMPL_LINK( ScPropertyDlg, CommitHdl, SvBasicPropertyDataControl*,pProCtr)
{
aCommitAnswer.SetText(aBaProDatCtr.GetProperty());
aCommitAnswer.Invalidate();
- aBaProDatCtr.SetIsCorrect(TRUE);
+ aBaProDatCtr.SetIsCorrect(sal_True);
}
return 0;
}
@@ -1540,7 +1540,7 @@ IMPL_LINK( ScPropertyDlg, ClickHdl, SvBasicPropertyDataControl*,pProCtr)
{
aClickAnswer.SetText(aBaProDatCtr.GetName());
aClickAnswer.Invalidate();
- aBaProDatCtr.SetIsCorrect(TRUE);
+ aBaProDatCtr.SetIsCorrect(sal_True);
}
return 0;
}
@@ -1551,7 +1551,7 @@ IMPL_LINK( ScPropertyDlg, SelectHdl, SvBasicPropertyDataControl*,pProCtr)
{
aSelectAnswer.SetText(aBaProDatCtr.GetName());
aSelectAnswer.Invalidate();
- aBaProDatCtr.SetIsCorrect(TRUE);
+ aBaProDatCtr.SetIsCorrect(sal_True);
}
return 0;
}
diff --git a/svtools/source/dialogs/wizdlg.cxx b/svtools/source/dialogs/wizdlg.cxx
index f06b4f53ce7c..8787e39b1284 100644
--- a/svtools/source/dialogs/wizdlg.cxx
+++ b/svtools/source/dialogs/wizdlg.cxx
@@ -203,7 +203,7 @@ void WizardDialog::ImplPosCtrls()
long nViewWidth = 0;
long nViewHeight = 0;
long nDlgHeight = nOffY;
- USHORT nViewPosFlags = WINDOW_POSSIZE_POS;
+ sal_uInt16 nViewPosFlags = WINDOW_POSSIZE_POS;
if ( meViewAlign == WINDOWALIGN_TOP )
{
nViewOffX = WIZARDDIALOG_VIEW_DLGOFFSET_X;
@@ -338,9 +338,9 @@ void WizardDialog::ImplShowTabPage( TabPage* pTabPage )
// -----------------------------------------------------------------------
-TabPage* WizardDialog::ImplGetPage( USHORT nLevel ) const
+TabPage* WizardDialog::ImplGetPage( sal_uInt16 nLevel ) const
{
- USHORT nTempLevel = 0;
+ sal_uInt16 nTempLevel = 0;
ImplWizPageData* pPageData = mpFirstPage;
while ( pPageData )
{
@@ -447,7 +447,7 @@ long WizardDialog::Notify( NotifyEvent& rNEvt )
{
const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
KeyCode aKeyCode = pKEvt->GetKeyCode();
- USHORT nKeyCode = aKeyCode.GetCode();
+ sal_uInt16 nKeyCode = aKeyCode.GetCode();
if ( aKeyCode.IsMod1() )
{
@@ -458,11 +458,11 @@ long WizardDialog::Notify( NotifyEvent& rNEvt )
if ( mpPrevBtn->IsVisible() &&
mpPrevBtn->IsEnabled() && mpPrevBtn->IsInputEnabled() )
{
- mpPrevBtn->SetPressed( TRUE );
- mpPrevBtn->SetPressed( FALSE );
+ mpPrevBtn->SetPressed( sal_True );
+ mpPrevBtn->SetPressed( sal_False );
mpPrevBtn->Click();
}
- return TRUE;
+ return sal_True;
}
}
else
@@ -472,11 +472,11 @@ long WizardDialog::Notify( NotifyEvent& rNEvt )
if ( mpNextBtn->IsVisible() &&
mpNextBtn->IsEnabled() && mpNextBtn->IsInputEnabled() )
{
- mpNextBtn->SetPressed( TRUE );
- mpNextBtn->SetPressed( FALSE );
+ mpNextBtn->SetPressed( sal_True );
+ mpNextBtn->SetPressed( sal_False );
mpNextBtn->Click();
}
- return TRUE;
+ return sal_True;
}
}
}
@@ -499,43 +499,43 @@ long WizardDialog::DeactivatePage()
if ( maDeactivateHdl.IsSet() )
return maDeactivateHdl.Call( this );
else
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
-BOOL WizardDialog::ShowNextPage()
+sal_Bool WizardDialog::ShowNextPage()
{
return ShowPage( mnCurLevel+1 );
}
// -----------------------------------------------------------------------
-BOOL WizardDialog::ShowPrevPage()
+sal_Bool WizardDialog::ShowPrevPage()
{
if ( !mnCurLevel )
- return FALSE;
+ return sal_False;
return ShowPage( mnCurLevel-1 );
}
// -----------------------------------------------------------------------
-BOOL WizardDialog::ShowPage( USHORT nLevel )
+sal_Bool WizardDialog::ShowPage( sal_uInt16 nLevel )
{
if ( DeactivatePage() )
{
mnCurLevel = nLevel;
ActivatePage();
ImplShowTabPage( ImplGetPage( mnCurLevel ) );
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
-BOOL WizardDialog::Finnish( long nResult )
+sal_Bool WizardDialog::Finnish( long nResult )
{
if ( DeactivatePage() )
{
@@ -546,10 +546,10 @@ BOOL WizardDialog::Finnish( long nResult )
EndDialog( nResult );
else if ( GetStyle() & WB_CLOSEABLE )
Close();
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
// -----------------------------------------------------------------------
@@ -600,9 +600,9 @@ void WizardDialog::RemovePage( TabPage* pPage )
// -----------------------------------------------------------------------
-void WizardDialog::SetPage( USHORT nLevel, TabPage* pPage )
+void WizardDialog::SetPage( sal_uInt16 nLevel, TabPage* pPage )
{
- USHORT nTempLevel = 0;
+ sal_uInt16 nTempLevel = 0;
ImplWizPageData* pPageData = mpFirstPage;
while ( pPageData )
{
@@ -623,9 +623,9 @@ void WizardDialog::SetPage( USHORT nLevel, TabPage* pPage )
// -----------------------------------------------------------------------
-TabPage* WizardDialog::GetPage( USHORT nLevel ) const
+TabPage* WizardDialog::GetPage( sal_uInt16 nLevel ) const
{
- USHORT nTempLevel = 0;
+ sal_uInt16 nTempLevel = 0;
ImplWizPageData* pPageData = mpFirstPage;
while ( pPageData )
{
@@ -686,7 +686,7 @@ void WizardDialog::RemoveButton( Button* pButton )
// -----------------------------------------------------------------------
-void WizardDialog::ShowButtonFixedLine( BOOL bVisible )
+void WizardDialog::ShowButtonFixedLine( sal_Bool bVisible )
{
if ( !mpFixedLine )
{
@@ -701,7 +701,7 @@ void WizardDialog::ShowButtonFixedLine( BOOL bVisible )
// -----------------------------------------------------------------------
-BOOL WizardDialog::IsButtonFixedLineVisible()
+sal_Bool WizardDialog::IsButtonFixedLineVisible()
{
return (mpFixedLine && mpFixedLine->IsVisible());
}
diff --git a/svtools/source/edit/editsyntaxhighlighter.cxx b/svtools/source/edit/editsyntaxhighlighter.cxx
index c211413af925..a62df6d64700 100644
--- a/svtools/source/edit/editsyntaxhighlighter.cxx
+++ b/svtools/source/edit/editsyntaxhighlighter.cxx
@@ -68,12 +68,12 @@ void MultiLineEditSyntaxHighlight::SetText(const String& rNewText)
UpdateData();
}
-void MultiLineEditSyntaxHighlight::DoBracketHilight(USHORT aKey)
+void MultiLineEditSyntaxHighlight::DoBracketHilight(sal_uInt16 aKey)
{
TextSelection aCurrentPos = GetTextView()->GetSelection();
xub_StrLen aStartPos = aCurrentPos.GetStart().GetIndex();
- ULONG nStartPara = aCurrentPos.GetStart().GetPara();
- USHORT aCount = 0;
+ sal_uLong nStartPara = aCurrentPos.GetStart().GetPara();
+ sal_uInt16 aCount = 0;
int aChar = -1;
switch (aKey)
@@ -109,16 +109,16 @@ void MultiLineEditSyntaxHighlight::DoBracketHilight(USHORT aKey)
continue;
String aLine( GetTextEngine()->GetText( aPara ) );
- for (USHORT i = ((unsigned long)aPara==nStartPara) ? aStartPos-1 : (USHORT)(aLine.Len()-1); i>0; --i)
+ for (sal_uInt16 i = ((unsigned long)aPara==nStartPara) ? aStartPos-1 : (sal_uInt16)(aLine.Len()-1); i>0; --i)
{
if (aLine.GetChar(i)==aChar)
{
if (!aCount)
{
- GetTextEngine()->SetAttrib( TextAttribFontWeight( WEIGHT_ULTRABOLD ), aPara, i, i+1, TRUE );
- GetTextEngine()->SetAttrib( TextAttribFontColor( Color(0,0,0) ), aPara, i, i+1, TRUE );
- GetTextEngine()->SetAttrib( TextAttribFontWeight( WEIGHT_ULTRABOLD ), nStartPara, aStartPos, aStartPos, TRUE );
- GetTextEngine()->SetAttrib( TextAttribFontColor( Color(0,0,0) ), nStartPara, aStartPos, aStartPos, TRUE );
+ GetTextEngine()->SetAttrib( TextAttribFontWeight( WEIGHT_ULTRABOLD ), aPara, i, i+1, sal_True );
+ GetTextEngine()->SetAttrib( TextAttribFontColor( Color(0,0,0) ), aPara, i, i+1, sal_True );
+ GetTextEngine()->SetAttrib( TextAttribFontWeight( WEIGHT_ULTRABOLD ), nStartPara, aStartPos, aStartPos, sal_True );
+ GetTextEngine()->SetAttrib( TextAttribFontColor( Color(0,0,0) ), nStartPara, aStartPos, aStartPos, sal_True );
return;
}
else
@@ -184,19 +184,19 @@ void MultiLineEditSyntaxHighlight::UpdateData()
{
// syntax highlighting
// this must be possible improved by using notifychange correctly
- BOOL bTempModified = GetTextEngine()->IsModified();
+ sal_Bool bTempModified = GetTextEngine()->IsModified();
for (unsigned int nLine=0; nLine < GetTextEngine()->GetParagraphCount(); nLine++)
{
String aLine( GetTextEngine()->GetText( nLine ) );
Range aChanges = aHighlighter.notifyChange( nLine, 0, &aLine, 1 );
- GetTextEngine()->RemoveAttribs( nLine, TRUE );
+ GetTextEngine()->RemoveAttribs( nLine, sal_True );
HighlightPortions aPortions;
aHighlighter.getHighlightPortions( nLine, aLine, aPortions );
for ( size_t i = 0; i < aPortions.size(); i++ )
{
HighlightPortion& r = aPortions[i];
- GetTextEngine()->SetAttrib( TextAttribFontColor( GetColorValue(r.tokenType) ), nLine, r.nBegin, r.nEnd, TRUE );
+ GetTextEngine()->SetAttrib( TextAttribFontColor( GetColorValue(r.tokenType) ), nLine, r.nBegin, r.nEnd, sal_True );
}
}
GetTextView()->ShowCursor( false, true );
diff --git a/svtools/source/edit/svmedit.cxx b/svtools/source/edit/svmedit.cxx
index daaff472d1cc..1e9e7b7cd48b 100644
--- a/svtools/source/edit/svmedit.cxx
+++ b/svtools/source/edit/svmedit.cxx
@@ -65,11 +65,11 @@ private:
ExtTextEngine* mpExtTextEngine;
ExtTextView* mpExtTextView;
- BOOL mbInMBDown;
- BOOL mbFocusSelectionHide;
- BOOL mbIgnoreTab;
- BOOL mbActivePopup;
- BOOL mbSelectOnTab;
+ sal_Bool mbInMBDown;
+ sal_Bool mbFocusSelectionHide;
+ sal_Bool mbIgnoreTab;
+ sal_Bool mbActivePopup;
+ sal_Bool mbSelectOnTab;
public:
TextWindow( Window* pParent );
@@ -91,17 +91,17 @@ public:
virtual void GetFocus();
virtual void LoseFocus();
- BOOL IsAutoFocusHide() const { return mbFocusSelectionHide; }
- void SetAutoFocusHide( BOOL bAutoHide ) { mbFocusSelectionHide = bAutoHide; }
+ sal_Bool IsAutoFocusHide() const { return mbFocusSelectionHide; }
+ void SetAutoFocusHide( sal_Bool bAutoHide ) { mbFocusSelectionHide = bAutoHide; }
- BOOL IsIgnoreTab() const { return mbIgnoreTab; }
- void SetIgnoreTab( BOOL bIgnore ) { mbIgnoreTab = bIgnore; }
+ sal_Bool IsIgnoreTab() const { return mbIgnoreTab; }
+ void SetIgnoreTab( sal_Bool bIgnore ) { mbIgnoreTab = bIgnore; }
void DisableSelectionOnFocus() {mbSelectOnTab = sal_False;}
virtual
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >
- GetComponentInterface(BOOL bCreate = TRUE);
+ GetComponentInterface(sal_Bool bCreate = sal_True);
};
@@ -131,17 +131,17 @@ public:
ImpSvMEdit( MultiLineEdit* pSvMultiLineEdit, WinBits nWinStyle );
~ImpSvMEdit();
- void SetModified( BOOL bMod );
- BOOL IsModified() const;
+ void SetModified( sal_Bool bMod );
+ sal_Bool IsModified() const;
- void SetReadOnly( BOOL bRdOnly );
- BOOL IsReadOnly() const;
+ void SetReadOnly( sal_Bool bRdOnly );
+ sal_Bool IsReadOnly() const;
void SetMaxTextLen( xub_StrLen nLen );
xub_StrLen GetMaxTextLen() const;
- void SetInsertMode( BOOL bInsert );
- BOOL IsInsertMode() const;
+ void SetInsertMode( sal_Bool bInsert );
+ sal_Bool IsInsertMode() const;
void InsertText( const String& rStr );
String GetSelected() const;
@@ -163,13 +163,13 @@ public:
void Resize();
void GetFocus();
- BOOL HandleCommand( const CommandEvent& rCEvt );
+ sal_Bool HandleCommand( const CommandEvent& rCEvt );
- void Enable( BOOL bEnable );
+ void Enable( sal_Bool bEnable );
Size CalcMinimumSize() const;
- Size CalcSize( USHORT nColumns, USHORT nLines ) const;
- void GetMaxVisColumnsAndLines( USHORT& rnCols, USHORT& rnLines ) const;
+ Size CalcSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const;
+ void GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const;
void SetAlign( WinBits nWinStyle );
@@ -197,27 +197,27 @@ ImpSvMEdit::ImpSvMEdit( MultiLineEdit* pEdt, WinBits nWinStyle )
void ImpSvMEdit::ImpUpdateSrollBarVis( WinBits nWinStyle )
{
- const BOOL bHaveVScroll = (NULL != mpVScrollBar);
- const BOOL bHaveHScroll = (NULL != mpHScrollBar);
- const BOOL bHaveScrollBox = (NULL != mpScrollBox);
+ const sal_Bool bHaveVScroll = (NULL != mpVScrollBar);
+ const sal_Bool bHaveHScroll = (NULL != mpHScrollBar);
+ const sal_Bool bHaveScrollBox = (NULL != mpScrollBox);
- BOOL bNeedVScroll = ( nWinStyle & WB_VSCROLL ) == WB_VSCROLL;
- const BOOL bNeedHScroll = ( nWinStyle & WB_HSCROLL ) == WB_HSCROLL;
+ sal_Bool bNeedVScroll = ( nWinStyle & WB_VSCROLL ) == WB_VSCROLL;
+ const sal_Bool bNeedHScroll = ( nWinStyle & WB_HSCROLL ) == WB_HSCROLL;
- const BOOL bAutoVScroll = ( nWinStyle & WB_AUTOVSCROLL ) == WB_AUTOVSCROLL;
+ const sal_Bool bAutoVScroll = ( nWinStyle & WB_AUTOVSCROLL ) == WB_AUTOVSCROLL;
if ( !bNeedVScroll && bAutoVScroll )
{
TextEngine& rEngine( *mpTextWindow->GetTextEngine() );
- ULONG nOverallTextHeight(0);
- for ( ULONG i=0; i<rEngine.GetParagraphCount(); ++i )
+ sal_uLong nOverallTextHeight(0);
+ for ( sal_uLong i=0; i<rEngine.GetParagraphCount(); ++i )
nOverallTextHeight += rEngine.GetTextHeight( i );
- if ( nOverallTextHeight > (ULONG)mpTextWindow->GetOutputSizePixel().Height() )
+ if ( nOverallTextHeight > (sal_uLong)mpTextWindow->GetOutputSizePixel().Height() )
bNeedVScroll = true;
}
- const BOOL bNeedScrollBox = bNeedVScroll && bNeedHScroll;
+ const sal_Bool bNeedScrollBox = bNeedVScroll && bNeedHScroll;
- BOOL bScrollbarsChanged = false;
+ sal_Bool bScrollbarsChanged = false;
if ( bHaveVScroll != bNeedVScroll )
{
delete mpVScrollBar;
@@ -268,22 +268,22 @@ void ImpSvMEdit::InitFromStyle( WinBits nWinStyle )
SetAlign( nWinStyle );
if ( nWinStyle & WB_NOHIDESELECTION )
- mpTextWindow->SetAutoFocusHide( FALSE );
+ mpTextWindow->SetAutoFocusHide( sal_False );
else
- mpTextWindow->SetAutoFocusHide( TRUE );
+ mpTextWindow->SetAutoFocusHide( sal_True );
if ( nWinStyle & WB_READONLY )
- mpTextWindow->GetTextView()->SetReadOnly( TRUE );
+ mpTextWindow->GetTextView()->SetReadOnly( sal_True );
else
- mpTextWindow->GetTextView()->SetReadOnly( FALSE );
+ mpTextWindow->GetTextView()->SetReadOnly( sal_False );
if ( nWinStyle & WB_IGNORETAB )
{
- mpTextWindow->SetIgnoreTab( TRUE );
+ mpTextWindow->SetIgnoreTab( sal_True );
}
else
{
- mpTextWindow->SetIgnoreTab( FALSE );
+ mpTextWindow->SetIgnoreTab( sal_False );
// #103667# MultiLineEdit has the flag, but focusable window also needs this flag
WinBits nStyle = mpTextWindow->GetStyle();
nStyle |= WINDOW_DLGCTRL_MOD1TAB;
@@ -304,14 +304,14 @@ void ImpSvMEdit::ImpSetScrollBarRanges()
{
if ( mpVScrollBar )
{
- ULONG nTextHeight = mpTextWindow->GetTextEngine()->GetTextHeight();
+ sal_uLong nTextHeight = mpTextWindow->GetTextEngine()->GetTextHeight();
mpVScrollBar->SetRange( Range( 0, (long)nTextHeight-1 ) );
}
if ( mpHScrollBar )
{
-// ULONG nTextWidth = mpTextWindow->GetTextEngine()->CalcTextWidth();
+// sal_uLong nTextWidth = mpTextWindow->GetTextEngine()->CalcTextWidth();
// Es gibt kein Notify bei Breiten-Aenderung...
-// ULONG nW = Max( (ULONG)mpTextWindow->GetOutputSizePixel().Width()*5, (ULONG)nTextWidth );
+// sal_uLong nW = Max( (sal_uLong)mpTextWindow->GetOutputSizePixel().Width()*5, (sal_uLong)nTextWidth );
// mpHScrollBar->SetRange( Range( 0, (long)nW ) );
mpHScrollBar->SetRange( Range( 0, (long)mnTextWidth-1 ) );
}
@@ -364,7 +364,7 @@ IMPL_LINK( ImpSvMEdit, ScrollHdl, ScrollBar*, pCurScrollBar )
nDiffX = mpTextWindow->GetTextView()->GetStartDocPos().X() - pCurScrollBar->GetThumbPos();
mpTextWindow->GetTextView()->Scroll( nDiffX, nDiffY );
- // mpTextWindow->GetTextView()->ShowCursor( FALSE, TRUE );
+ // mpTextWindow->GetTextView()->ShowCursor( sal_False, sal_True );
return 0;
}
@@ -378,7 +378,7 @@ IMPL_LINK( ImpSvMEdit, ScrollHdl, ScrollBar*, pCurScrollBar )
void ImpSvMEdit::SetAlign( WinBits nWinStyle )
{
- BOOL bRTL = Application::GetSettings().GetLayoutRTL();
+ sal_Bool bRTL = Application::GetSettings().GetLayoutRTL();
mpTextWindow->GetTextEngine()->SetRightToLeft( bRTL );
if ( nWinStyle & WB_CENTER )
@@ -395,28 +395,28 @@ void ImpSvMEdit::SetTextWindowOffset( const Point& rOffset )
Resize();
}
-void ImpSvMEdit::SetModified( BOOL bMod )
+void ImpSvMEdit::SetModified( sal_Bool bMod )
{
mpTextWindow->GetTextEngine()->SetModified( bMod );
}
-BOOL ImpSvMEdit::IsModified() const
+sal_Bool ImpSvMEdit::IsModified() const
{
return mpTextWindow->GetTextEngine()->IsModified();
}
-void ImpSvMEdit::SetInsertMode( BOOL bInsert )
+void ImpSvMEdit::SetInsertMode( sal_Bool bInsert )
{
mpTextWindow->GetTextView()->SetInsertMode( bInsert );
}
-void ImpSvMEdit::SetReadOnly( BOOL bRdOnly )
+void ImpSvMEdit::SetReadOnly( sal_Bool bRdOnly )
{
mpTextWindow->GetTextView()->SetReadOnly( bRdOnly );
// Farbe anpassen ???????????????????????????
}
-BOOL ImpSvMEdit::IsReadOnly() const
+sal_Bool ImpSvMEdit::IsReadOnly() const
{
return mpTextWindow->GetTextView()->IsReadOnly();
}
@@ -533,10 +533,10 @@ void ImpSvMEdit::Paste()
void ImpSvMEdit::SetText( const String& rStr )
{
- BOOL bWasModified = mpTextWindow->GetTextEngine()->IsModified();
+ sal_Bool bWasModified = mpTextWindow->GetTextEngine()->IsModified();
mpTextWindow->GetTextEngine()->SetText( rStr );
if ( !bWasModified )
- mpTextWindow->GetTextEngine()->SetModified( FALSE );
+ mpTextWindow->GetTextEngine()->SetModified( sal_False );
mpTextWindow->GetTextView()->SetSelection( TextSelection() );
@@ -593,7 +593,7 @@ void ImpSvMEdit::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
if ( mpHScrollBar )
{
- ULONG nWidth = mpTextWindow->GetTextEngine()->CalcTextWidth();
+ sal_uLong nWidth = mpTextWindow->GetTextEngine()->CalcTextWidth();
if ( nWidth != mnTextWidth )
{
mnTextWidth = sal::static_int_cast< xub_StrLen >(nWidth);
@@ -625,9 +625,9 @@ void ImpSvMEdit::SetSelection( const Selection& rSelection )
long nEnd = Max( aNewSelection.Min(), aNewSelection.Max() );
TextSelection aTextSel;
- ULONG nPara = 0;
- USHORT nChar = 0;
- USHORT x = 0;
+ sal_uLong nPara = 0;
+ sal_uInt16 nChar = 0;
+ sal_uInt16 x = 0;
while ( x <= nEnd )
{
if ( x == aNewSelection.Min() )
@@ -656,7 +656,7 @@ const Selection& ImpSvMEdit::GetSelection() const
ExtTextEngine* pExtTextEngine = mpTextWindow->GetTextEngine();
// Absaetze davor:
- ULONG n;
+ sal_uLong n;
for ( n = 0; n < aTextSel.GetStart().GetPara(); n++ )
{
maSelection.Min() += pExtTextEngine->GetTextLen( n );
@@ -691,7 +691,7 @@ Size ImpSvMEdit::CalcMinimumSize() const
return aSz;
}
-Size ImpSvMEdit::CalcSize( USHORT nColumns, USHORT nLines ) const
+Size ImpSvMEdit::CalcSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const
{
static const sal_Unicode sampleText[] = { 'X', '\0' };
@@ -718,16 +718,16 @@ Size ImpSvMEdit::CalcSize( USHORT nColumns, USHORT nLines ) const
return aSz;
}
-void ImpSvMEdit::GetMaxVisColumnsAndLines( USHORT& rnCols, USHORT& rnLines ) const
+void ImpSvMEdit::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const
{
static const sal_Unicode sampleText[] = { 'x', '\0' };
Size aOutSz = mpTextWindow->GetOutputSizePixel();
Size aCharSz( mpTextWindow->GetTextWidth( sampleText ), mpTextWindow->GetTextHeight() );
- rnCols = (USHORT) (aOutSz.Width()/aCharSz.Width());
- rnLines = (USHORT) (aOutSz.Height()/aCharSz.Height());
+ rnCols = (sal_uInt16) (aOutSz.Width()/aCharSz.Width());
+ rnLines = (sal_uInt16) (aOutSz.Height()/aCharSz.Height());
}
-void ImpSvMEdit::Enable( BOOL bEnable )
+void ImpSvMEdit::Enable( sal_Bool bEnable )
{
mpTextWindow->Enable( bEnable );
if ( mpHScrollBar )
@@ -736,15 +736,15 @@ void ImpSvMEdit::Enable( BOOL bEnable )
mpVScrollBar->Enable( bEnable );
}
-BOOL ImpSvMEdit::HandleCommand( const CommandEvent& rCEvt )
+sal_Bool ImpSvMEdit::HandleCommand( const CommandEvent& rCEvt )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
if ( ( rCEvt.GetCommand() == COMMAND_WHEEL ) ||
( rCEvt.GetCommand() == COMMAND_STARTAUTOSCROLL ) ||
( rCEvt.GetCommand() == COMMAND_AUTOSCROLL ) )
{
mpTextWindow->HandleScrollCommand( rCEvt, mpHScrollBar, mpVScrollBar );
- bDone = TRUE;
+ bDone = sal_True;
}
return bDone;
}
@@ -752,12 +752,12 @@ BOOL ImpSvMEdit::HandleCommand( const CommandEvent& rCEvt )
TextWindow::TextWindow( Window* pParent ) : Window( pParent )
{
- mbInMBDown = FALSE;
- mbSelectOnTab = TRUE;
- mbFocusSelectionHide = FALSE;
- mbIgnoreTab = FALSE;
- mbActivePopup = FALSE;
- mbSelectOnTab = TRUE;
+ mbInMBDown = sal_False;
+ mbSelectOnTab = sal_True;
+ mbFocusSelectionHide = sal_False;
+ mbIgnoreTab = sal_False;
+ mbActivePopup = sal_False;
+ mbSelectOnTab = sal_True;
SetPointer( Pointer( POINTER_TEXT ) );
@@ -768,7 +768,7 @@ TextWindow::TextWindow( Window* pParent ) : Window( pParent )
mpExtTextEngine->SetLocale( GetSettings().GetLocale() );
mpExtTextView = new ExtTextView( mpExtTextEngine, this );
mpExtTextEngine->InsertView( mpExtTextView );
- mpExtTextEngine->EnableUndo( TRUE );
+ mpExtTextEngine->EnableUndo( sal_True );
mpExtTextView->ShowCursor();
Color aBackgroundColor = GetSettings().GetStyleSettings().GetWorkspaceColor();
@@ -790,11 +790,11 @@ void TextWindow::MouseMove( const MouseEvent& rMEvt )
void TextWindow::MouseButtonDown( const MouseEvent& rMEvt )
{
- mbInMBDown = TRUE; // Dann im GetFocus nicht alles selektieren wird
+ mbInMBDown = sal_True; // Dann im GetFocus nicht alles selektieren wird
mpExtTextView->MouseButtonDown( rMEvt );
Window::MouseButtonDown( rMEvt );
GrabFocus();
- mbInMBDown = FALSE;
+ mbInMBDown = sal_False;
}
void TextWindow::MouseButtonUp( const MouseEvent& rMEvt )
@@ -805,29 +805,29 @@ void TextWindow::MouseButtonUp( const MouseEvent& rMEvt )
void TextWindow::KeyInput( const KeyEvent& rKEvent )
{
- BOOL bDone = FALSE;
- USHORT nCode = rKEvent.GetKeyCode().GetCode();
+ sal_Bool bDone = sal_False;
+ sal_uInt16 nCode = rKEvent.GetKeyCode().GetCode();
if ( nCode == com::sun::star::awt::Key::SELECT_ALL ||
( (nCode == KEY_A) && rKEvent.GetKeyCode().IsMod1() && !rKEvent.GetKeyCode().IsMod2() )
)
{
mpExtTextView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( 0xFFFF, 0xFFFF ) ) );
- bDone = TRUE;
+ bDone = sal_True;
}
else if ( (nCode == KEY_S) && rKEvent.GetKeyCode().IsShift() && rKEvent.GetKeyCode().IsMod1() )
{
if ( Edit::GetGetSpecialCharsFunction() )
{
// Damit die Selektion erhalten bleibt
- mbActivePopup = TRUE;
+ mbActivePopup = sal_True;
XubString aChars = Edit::GetGetSpecialCharsFunction()( this, GetFont() );
if ( aChars.Len() )
{
mpExtTextView->InsertText( aChars );
- mpExtTextView->GetTextEngine()->SetModified( TRUE );
+ mpExtTextView->GetTextEngine()->SetModified( sal_True );
}
- mbActivePopup = FALSE;
- bDone = TRUE;
+ mbActivePopup = sal_False;
+ bDone = sal_True;
}
}
else if ( nCode == KEY_TAB )
@@ -863,33 +863,33 @@ void TextWindow::Command( const CommandEvent& rCEvt )
pPopup->SetMenuFlags( MENU_FLAG_HIDEDISABLEDENTRIES );
if ( !mpExtTextView->HasSelection() )
{
- pPopup->EnableItem( SV_MENU_EDIT_CUT, FALSE );
- pPopup->EnableItem( SV_MENU_EDIT_COPY, FALSE );
- pPopup->EnableItem( SV_MENU_EDIT_DELETE, FALSE );
+ pPopup->EnableItem( SV_MENU_EDIT_CUT, sal_False );
+ pPopup->EnableItem( SV_MENU_EDIT_COPY, sal_False );
+ pPopup->EnableItem( SV_MENU_EDIT_DELETE, sal_False );
}
if ( mpExtTextView->IsReadOnly() )
{
- pPopup->EnableItem( SV_MENU_EDIT_CUT, FALSE );
- pPopup->EnableItem( SV_MENU_EDIT_PASTE, FALSE );
- pPopup->EnableItem( SV_MENU_EDIT_DELETE, FALSE );
- pPopup->EnableItem( SV_MENU_EDIT_INSERTSYMBOL, FALSE );
+ pPopup->EnableItem( SV_MENU_EDIT_CUT, sal_False );
+ pPopup->EnableItem( SV_MENU_EDIT_PASTE, sal_False );
+ pPopup->EnableItem( SV_MENU_EDIT_DELETE, sal_False );
+ pPopup->EnableItem( SV_MENU_EDIT_INSERTSYMBOL, sal_False );
}
if ( !mpExtTextView->GetTextEngine()->HasUndoManager() || !mpExtTextView->GetTextEngine()->GetUndoManager().GetUndoActionCount() )
{
- pPopup->EnableItem( SV_MENU_EDIT_UNDO, FALSE );
+ pPopup->EnableItem( SV_MENU_EDIT_UNDO, sal_False );
}
// if ( ( maSelection.Min() == 0 ) && ( maSelection.Max() == maText.Len() ) )
// {
-// pPopup->EnableItem( SV_MENU_EDIT_SELECTALL, FALSE );
+// pPopup->EnableItem( SV_MENU_EDIT_SELECTALL, sal_False );
// }
if ( !Edit::GetGetSpecialCharsFunction() )
{
- USHORT nPos = pPopup->GetItemPos( SV_MENU_EDIT_INSERTSYMBOL );
+ sal_uInt16 nPos = pPopup->GetItemPos( SV_MENU_EDIT_INSERTSYMBOL );
pPopup->RemoveItem( nPos );
pPopup->RemoveItem( nPos-1 );
}
- mbActivePopup = TRUE;
+ mbActivePopup = sal_True;
Point aPos = rCEvt.GetMousePosPixel();
if ( !rCEvt.IsMouseEvent() )
{
@@ -898,26 +898,26 @@ void TextWindow::Command( const CommandEvent& rCEvt )
aPos = Point( aSize.Width()/2, aSize.Height()/2 );
}
// pPopup->RemoveDisabledEntries();
- USHORT n = pPopup->Execute( this, aPos );
+ sal_uInt16 n = pPopup->Execute( this, aPos );
Edit::DeletePopupMenu( pPopup );
switch ( n )
{
case SV_MENU_EDIT_UNDO: mpExtTextView->Undo();
- mpExtTextEngine->SetModified( TRUE );
+ mpExtTextEngine->SetModified( sal_True );
mpExtTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
break;
case SV_MENU_EDIT_CUT: mpExtTextView->Cut();
- mpExtTextEngine->SetModified( TRUE );
+ mpExtTextEngine->SetModified( sal_True );
mpExtTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
break;
case SV_MENU_EDIT_COPY: mpExtTextView->Copy();
break;
case SV_MENU_EDIT_PASTE: mpExtTextView->Paste();
- mpExtTextEngine->SetModified( TRUE );
+ mpExtTextEngine->SetModified( sal_True );
mpExtTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
break;
case SV_MENU_EDIT_DELETE: mpExtTextView->DeleteSelected();
- mpExtTextEngine->SetModified( TRUE );
+ mpExtTextEngine->SetModified( sal_True );
mpExtTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
break;
case SV_MENU_EDIT_SELECTALL: mpExtTextView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( 0xFFFFFFFF, 0xFFFF ) ) );
@@ -928,13 +928,13 @@ void TextWindow::Command( const CommandEvent& rCEvt )
if ( aChars.Len() )
{
mpExtTextView->InsertText( aChars );
- mpExtTextEngine->SetModified( TRUE );
+ mpExtTextEngine->SetModified( sal_True );
mpExtTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
}
}
break;
}
- mbActivePopup = FALSE;
+ mbActivePopup = sal_False;
}
else
{
@@ -948,19 +948,19 @@ void TextWindow::GetFocus()
Window::GetFocus();
if ( !mbActivePopup )
{
- BOOL bGotoCursor = !mpExtTextView->IsReadOnly();
+ sal_Bool bGotoCursor = !mpExtTextView->IsReadOnly();
if ( mbFocusSelectionHide && IsReallyVisible() && !mpExtTextView->IsReadOnly()
&& ( mbSelectOnTab &&
(!mbInMBDown || ( GetSettings().GetStyleSettings().GetSelectionOptions() & SELECTION_OPTION_FOCUS ) )) )
{
// Alles selektieren, aber nicht scrollen
- BOOL bAutoScroll = mpExtTextView->IsAutoScroll();
- mpExtTextView->SetAutoScroll( FALSE );
+ sal_Bool bAutoScroll = mpExtTextView->IsAutoScroll();
+ mpExtTextView->SetAutoScroll( sal_False );
mpExtTextView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( 0xFFFF, 0xFFFF ) ) );
mpExtTextView->SetAutoScroll( bAutoScroll );
- bGotoCursor = FALSE;
+ bGotoCursor = sal_False;
}
- mpExtTextView->SetPaintSelection( TRUE );
+ mpExtTextView->SetPaintSelection( sal_True );
mpExtTextView->ShowCursor( bGotoCursor );
}
}
@@ -970,12 +970,12 @@ void TextWindow::LoseFocus()
Window::LoseFocus();
if ( mbFocusSelectionHide && !mbActivePopup )
- mpExtTextView->SetPaintSelection( FALSE );
+ mpExtTextView->SetPaintSelection( sal_False );
}
// virtual
::css::uno::Reference< ::css::awt::XWindowPeer >
-TextWindow::GetComponentInterface(BOOL bCreate)
+TextWindow::GetComponentInterface(sal_Bool bCreate)
{
::css::uno::Reference< ::css::awt::XWindowPeer > xPeer(
Window::GetComponentInterface(false));
@@ -992,10 +992,10 @@ MultiLineEdit::MultiLineEdit( Window* pParent, WinBits nWinStyle )
{
SetType( WINDOW_MULTILINEEDIT );
pImpSvMEdit = new ImpSvMEdit( this, nWinStyle );
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
pUpdateDataTimer = 0;
- SetCompoundControl( TRUE );
+ SetCompoundControl( sal_True );
SetStyle( ImplInitStyle( nWinStyle ) );
}
@@ -1005,10 +1005,10 @@ MultiLineEdit::MultiLineEdit( Window* pParent, const ResId& rResId )
SetType( WINDOW_MULTILINEEDIT );
WinBits nWinStyle = rResId.GetWinBits();
pImpSvMEdit = new ImpSvMEdit( this, nWinStyle );
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
pUpdateDataTimer = 0;
- USHORT nMaxLen = Edit::GetMaxTextLen();
+ sal_uInt16 nMaxLen = Edit::GetMaxTextLen();
if ( nMaxLen )
SetMaxTextLen( nMaxLen );
@@ -1017,7 +1017,7 @@ MultiLineEdit::MultiLineEdit( Window* pParent, const ResId& rResId )
if ( IsVisible() )
pImpSvMEdit->Resize();
- SetCompoundControl( TRUE );
+ SetCompoundControl( sal_True );
SetStyle( ImplInitStyle( nWinStyle ) );
// Base Edit ctor could call Show already, but that would cause problems
@@ -1052,7 +1052,7 @@ WinBits MultiLineEdit::ImplInitStyle( WinBits nStyle )
}
-void MultiLineEdit::ImplInitSettings( BOOL /*bFont*/, BOOL /*bForeground*/, BOOL bBackground )
+void MultiLineEdit::ImplInitSettings( sal_Bool /*bFont*/, sal_Bool /*bForeground*/, sal_Bool bBackground )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
@@ -1084,7 +1084,7 @@ void MultiLineEdit::ImplInitSettings( BOOL /*bFont*/, BOOL /*bForeground*/, BOOL
{
if( IsPaintTransparent() )
{
- pImpSvMEdit->GetTextWindow()->SetPaintTransparent( TRUE );
+ pImpSvMEdit->GetTextWindow()->SetPaintTransparent( sal_True );
pImpSvMEdit->GetTextWindow()->SetBackground();
pImpSvMEdit->GetTextWindow()->SetControlBackground();
SetBackground();
@@ -1126,20 +1126,20 @@ void MultiLineEdit::UpdateData()
void MultiLineEdit::SetModifyFlag()
{
- pImpSvMEdit->SetModified( TRUE );
+ pImpSvMEdit->SetModified( sal_True );
}
void MultiLineEdit::ClearModifyFlag()
{
- pImpSvMEdit->SetModified( FALSE );
+ pImpSvMEdit->SetModified( sal_False );
}
-BOOL MultiLineEdit::IsModified() const
+sal_Bool MultiLineEdit::IsModified() const
{
return pImpSvMEdit->IsModified();
}
-void MultiLineEdit::EnableUpdateData( ULONG nTimeout )
+void MultiLineEdit::EnableUpdateData( sal_uLong nTimeout )
{
if ( !nTimeout )
DisableUpdateData();
@@ -1154,7 +1154,7 @@ void MultiLineEdit::EnableUpdateData( ULONG nTimeout )
}
}
-void MultiLineEdit::SetReadOnly( BOOL bReadOnly )
+void MultiLineEdit::SetReadOnly( sal_Bool bReadOnly )
{
pImpSvMEdit->SetReadOnly( bReadOnly );
Edit::SetReadOnly( bReadOnly );
@@ -1168,7 +1168,7 @@ void MultiLineEdit::SetReadOnly( BOOL bReadOnly )
SetStyle( nStyle );
}
-BOOL MultiLineEdit::IsReadOnly() const
+sal_Bool MultiLineEdit::IsReadOnly() const
{
return pImpSvMEdit->IsReadOnly();
}
@@ -1299,7 +1299,7 @@ Size MultiLineEdit::CalcAdjustedSize( const Size& rPrefSize ) const
return aSz;
}
-Size MultiLineEdit::CalcSize( USHORT nColumns, USHORT nLines ) const
+Size MultiLineEdit::CalcSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const
{
Size aSz = pImpSvMEdit->CalcSize( nColumns, nLines );
@@ -1310,7 +1310,7 @@ Size MultiLineEdit::CalcSize( USHORT nColumns, USHORT nLines ) const
return aSz;
}
-void MultiLineEdit::GetMaxVisColumnsAndLines( USHORT& rnCols, USHORT& rnLines ) const
+void MultiLineEdit::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines ) const
{
pImpSvMEdit->GetMaxVisColumnsAndLines( rnCols, rnLines );
}
@@ -1320,7 +1320,7 @@ void MultiLineEdit::StateChanged( StateChangedType nType )
if( nType == STATE_CHANGE_ENABLE )
{
pImpSvMEdit->Enable( IsEnabled() );
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
}
else if( nType == STATE_CHANGE_READONLY )
{
@@ -1329,23 +1329,23 @@ void MultiLineEdit::StateChanged( StateChangedType nType )
else if ( nType == STATE_CHANGE_ZOOM )
{
pImpSvMEdit->GetTextWindow()->SetZoom( GetZoom() );
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
Resize();
}
else if ( nType == STATE_CHANGE_CONTROLFONT )
{
- ImplInitSettings( TRUE, FALSE, FALSE );
+ ImplInitSettings( sal_True, sal_False, sal_False );
Resize();
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLFOREGROUND )
{
- ImplInitSettings( FALSE, TRUE, FALSE );
+ ImplInitSettings( sal_False, sal_True, sal_False );
Invalidate();
}
else if ( nType == STATE_CHANGE_CONTROLBACKGROUND )
{
- ImplInitSettings( FALSE, FALSE, TRUE );
+ ImplInitSettings( sal_False, sal_False, sal_True );
Invalidate();
}
else if ( nType == STATE_CHANGE_STYLE )
@@ -1357,7 +1357,7 @@ void MultiLineEdit::StateChanged( StateChangedType nType )
{
if( IsPaintTransparent() )
{
- pImpSvMEdit->GetTextWindow()->SetPaintTransparent( TRUE );
+ pImpSvMEdit->GetTextWindow()->SetPaintTransparent( sal_True );
pImpSvMEdit->GetTextWindow()->SetBackground();
pImpSvMEdit->GetTextWindow()->SetControlBackground();
SetBackground();
@@ -1373,7 +1373,7 @@ void MultiLineEdit::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
Resize();
Invalidate();
}
@@ -1381,14 +1381,14 @@ void MultiLineEdit::DataChanged( const DataChangedEvent& rDCEvt )
Control::DataChanged( rDCEvt );
}
-void MultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, ULONG nFlags )
+void MultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags )
{
- ImplInitSettings( TRUE, TRUE, TRUE );
+ ImplInitSettings( sal_True, sal_True, sal_True );
Point aPos = pDev->LogicToPixel( rPos );
Size aSize = pDev->LogicToPixel( rSize );
Font aFont = pImpSvMEdit->GetTextWindow()->GetDrawPixelFont( pDev );
- aFont.SetTransparent( TRUE );
+ aFont.SetTransparent( sal_True );
OutDevType eOutDevType = pDev->GetOutDevType();
pDev->Push();
@@ -1399,8 +1399,8 @@ void MultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSi
// Border/Background
pDev->SetLineColor();
pDev->SetFillColor();
- BOOL bBorder = !(nFlags & WINDOW_DRAW_NOBORDER ) && (GetStyle() & WB_BORDER);
- BOOL bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && IsControlBackground();
+ sal_Bool bBorder = !(nFlags & WINDOW_DRAW_NOBORDER ) && (GetStyle() & WB_BORDER);
+ sal_Bool bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && IsControlBackground();
if ( bBorder || bBackground )
{
Rectangle aRect( aPos, aSize );
@@ -1434,7 +1434,7 @@ void MultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSi
XubString aText = GetText();
Size aTextSz( pDev->GetTextWidth( aText ), pDev->GetTextHeight() );
- ULONG nLines = (ULONG) (aSize.Height() / aTextSz.Height());
+ sal_uLong nLines = (sal_uLong) (aSize.Height() / aTextSz.Height());
if ( !nLines )
nLines = 1;
aTextSz.Height() = nLines*aTextSz.Height();
@@ -1588,24 +1588,24 @@ ScrollBar* MultiLineEdit::GetVScrollBar() const
return pImpSvMEdit->GetVScrollBar();
}
-void MultiLineEdit::EnableFocusSelectionHide( BOOL bHide )
+void MultiLineEdit::EnableFocusSelectionHide( sal_Bool bHide )
{
pImpSvMEdit->GetTextWindow()->SetAutoFocusHide( bHide );
}
-BOOL MultiLineEdit::IsFocusSelectionHideEnabled() const
+sal_Bool MultiLineEdit::IsFocusSelectionHideEnabled() const
{
return pImpSvMEdit->GetTextWindow()->IsAutoFocusHide();
}
-void MultiLineEdit::SetLeftMargin( USHORT n )
+void MultiLineEdit::SetLeftMargin( sal_uInt16 n )
{
if ( GetTextEngine() )
GetTextEngine()->SetLeftMargin( n );
}
-USHORT MultiLineEdit::GetLeftMargin() const
+sal_uInt16 MultiLineEdit::GetLeftMargin() const
{
if ( GetTextEngine() )
return GetTextEngine()->GetLeftMargin();
@@ -1613,7 +1613,7 @@ USHORT MultiLineEdit::GetLeftMargin() const
return 0;
}
-void MultiLineEdit::SetRightToLeft( BOOL bRightToLeft )
+void MultiLineEdit::SetRightToLeft( sal_Bool bRightToLeft )
{
if ( GetTextEngine() )
{
@@ -1622,9 +1622,9 @@ void MultiLineEdit::SetRightToLeft( BOOL bRightToLeft )
}
}
-BOOL MultiLineEdit::IsRightToLeft() const
+sal_Bool MultiLineEdit::IsRightToLeft() const
{
- BOOL bRightToLeft = FALSE;
+ sal_Bool bRightToLeft = sal_False;
if ( GetTextEngine() )
bRightToLeft = GetTextEngine()->IsRightToLeft();
@@ -1634,7 +1634,7 @@ BOOL MultiLineEdit::IsRightToLeft() const
// virtual
::css::uno::Reference< ::css::awt::XWindowPeer >
-MultiLineEdit::GetComponentInterface(BOOL bCreate)
+MultiLineEdit::GetComponentInterface(sal_Bool bCreate)
{
::css::uno::Reference< ::css::awt::XWindowPeer > xPeer(
Edit::GetComponentInterface(false));
diff --git a/svtools/source/edit/svmedit2.cxx b/svtools/source/edit/svmedit2.cxx
index 19eba618a828..2a4c0134005a 100644
--- a/svtools/source/edit/svmedit2.cxx
+++ b/svtools/source/edit/svmedit2.cxx
@@ -49,32 +49,32 @@ ExtMultiLineEdit::~ExtMultiLineEdit()
{
}
-void ExtMultiLineEdit::InsertText( const String& rNew, BOOL )
+void ExtMultiLineEdit::InsertText( const String& rNew, sal_Bool )
{
- GetTextView()->InsertText( rNew, FALSE );
+ GetTextView()->InsertText( rNew, sal_False );
}
-void ExtMultiLineEdit::SetAutoScroll( BOOL bAutoScroll )
+void ExtMultiLineEdit::SetAutoScroll( sal_Bool bAutoScroll )
{
GetTextView()->SetAutoScroll( bAutoScroll );
}
-void ExtMultiLineEdit::EnableCursor( BOOL bEnable )
+void ExtMultiLineEdit::EnableCursor( sal_Bool bEnable )
{
GetTextView()->EnableCursor( bEnable );
}
-void ExtMultiLineEdit::SetAttrib( const TextAttrib& rAttr, ULONG nPara, USHORT nStart, USHORT nEnd )
+void ExtMultiLineEdit::SetAttrib( const TextAttrib& rAttr, sal_uLong nPara, sal_uInt16 nStart, sal_uInt16 nEnd )
{
GetTextEngine()->SetAttrib( rAttr, nPara, nStart, nEnd );
}
-void ExtMultiLineEdit::SetLeftMargin( USHORT nLeftMargin )
+void ExtMultiLineEdit::SetLeftMargin( sal_uInt16 nLeftMargin )
{
GetTextEngine()->SetLeftMargin( nLeftMargin );
}
-ULONG ExtMultiLineEdit::GetParagraphCount() const
+sal_uLong ExtMultiLineEdit::GetParagraphCount() const
{
return GetTextEngine()->GetParagraphCount();
}
diff --git a/svtools/source/edit/sychconv.cxx b/svtools/source/edit/sychconv.cxx
index d72200ac9c42..5e723815eb37 100644
--- a/svtools/source/edit/sychconv.cxx
+++ b/svtools/source/edit/sychconv.cxx
@@ -30,14 +30,14 @@
#include <svtools/sychconv.hxx>
#include <vcl/outdev.hxx>
-BOOL SymCharConverter::Convert( Font& rFont, UniString& rString, OutputDevice* pDev )
+sal_Bool SymCharConverter::Convert( Font& rFont, UniString& rString, OutputDevice* pDev )
{
// hibyte 0 = exact matching
// 1 = little differences,
// 2 = the converted character does not look like the original but got the same meaning
// 3 = the destination does not match looking and meaning of the original
- static USHORT __READONLY_DATA aWingdingsToStarBatsTable[ 256 - 32 ] =
+ static sal_uInt16 __READONLY_DATA aWingdingsToStarBatsTable[ 256 - 32 ] =
{
0x0020, 0x0238, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0174, 0x02BA, 0x017B, 0x017C, 0x037C, 0x037C, 0x037C, 0x037C,
0x0000, 0x0000, 0x0372, 0x0272, 0x0372, 0x0000, 0x0000, 0x0374, 0x0279, 0x0000, 0x027A, 0x0000, 0x0178, 0x0278, 0x0000, 0x0137,
@@ -55,7 +55,7 @@ BOOL SymCharConverter::Convert( Font& rFont, UniString& rString, OutputDevice* p
0x01AF, 0x01B2, 0x01B0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0150, 0x0032, 0x0033, 0x0034, 0x01C8
};
- static USHORT __READONLY_DATA aMonotypeSortsToStarBatsTable[ 256 - 32 ]=
+ static sal_uInt16 __READONLY_DATA aMonotypeSortsToStarBatsTable[ 256 - 32 ]=
{
0x0020, 0x00cb, 0x00cb, 0x00cb, 0x00cb, 0x0074, 0x00ba, 0x0021, 0x00cc, 0x007b, 0x0036, 0x007d, 0x007e, 0x0037, 0x0038, 0x0038,
0x0039, 0x0038, 0x0038, 0x0039, 0x003a, 0x004f, 0x0050, 0x004f, 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0086, 0x0086, 0x0086,
@@ -73,9 +73,9 @@ BOOL SymCharConverter::Convert( Font& rFont, UniString& rString, OutputDevice* p
0x0000, 0x00af, 0x0035, 0x00dc, 0x00da, 0x00dc, 0x00db, 0x00da, 0x00dc, 0x00db, 0x00dc, 0x00dc, 0x00dc, 0x00dc, 0x00af, 0x0000
};
- const USHORT* pTransTable = NULL;
+ const sal_uInt16* pTransTable = NULL;
- BOOL bIsAvailable = ( pDev ) ? pDev->IsFontAvailable( rFont.GetName() ) : FALSE;
+ sal_Bool bIsAvailable = ( pDev ) ? pDev->IsFontAvailable( rFont.GetName() ) : sal_False;
if ( !bIsAvailable )
{
if ( rFont.GetName().CompareToAscii( RTL_CONSTASCII_STRINGPARAM( "Wingdings" ) ) == COMPARE_EQUAL )
@@ -86,18 +86,18 @@ BOOL SymCharConverter::Convert( Font& rFont, UniString& rString, OutputDevice* p
if ( pTransTable )
{
sal_Unicode c;
- for ( UINT16 i = rString.Len(); i--; )
+ for ( sal_uInt16 i = rString.Len(); i--; )
{
c = rString.GetChar( i );
c -= 32;
- c = ( ((UINT16)c) >= 224 ) ? 0 : (sal_Unicode) pTransTable[ c ];
+ c = ( ((sal_uInt16)c) >= 224 ) ? 0 : (sal_Unicode) pTransTable[ c ];
if ( !c ) // if character is out of range or not matching
c = 0xA5; // we will default a StarBats-Bullet
rString.SetChar( i, c );
}
rFont.SetCharSet( RTL_TEXTENCODING_SYMBOL );
rFont.SetName( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "StarBats" ) ) );
- return TRUE;
+ return sal_True;
}
- else return FALSE;
+ else return sal_False;
};
diff --git a/svtools/source/edit/syntaxhighlight.cxx b/svtools/source/edit/syntaxhighlight.cxx
index 6ea9f05d78a1..8e26c58d57ae 100644
--- a/svtools/source/edit/syntaxhighlight.cxx
+++ b/svtools/source/edit/syntaxhighlight.cxx
@@ -256,22 +256,22 @@ class BasicSimpleCharClass
static LetterTable aLetterTable;
public:
- static BOOL isAlpha( sal_Unicode c, bool bCompatible )
+ static sal_Bool isAlpha( sal_Unicode c, bool bCompatible )
{
- BOOL bRet = (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')
+ sal_Bool bRet = (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')
|| (bCompatible && aLetterTable.isLetter( c ));
return bRet;
}
- static BOOL isDigit( sal_Unicode c )
+ static sal_Bool isDigit( sal_Unicode c )
{
- BOOL bRet = (c >= '0' && c <= '9');
+ sal_Bool bRet = (c >= '0' && c <= '9');
return bRet;
}
- static BOOL isAlphaNumeric( sal_Unicode c, bool bCompatible )
+ static sal_Bool isAlphaNumeric( sal_Unicode c, bool bCompatible )
{
- BOOL bRet = isDigit( c ) || isAlpha( c, bCompatible );
+ sal_Bool bRet = isDigit( c ) || isAlpha( c, bCompatible );
return bRet;
}
};
@@ -283,68 +283,68 @@ LetterTable::LetterTable( void )
for( int i = 0 ; i < 256 ; ++i )
IsLetterTab[i] = false;
- IsLetterTab[0xC0] = true; // À , CAPITAL LETTER A WITH GRAVE ACCENT
- IsLetterTab[0xC1] = true; // Á , CAPITAL LETTER A WITH ACUTE ACCENT
- IsLetterTab[0xC2] = true; // Â , CAPITAL LETTER A WITH CIRCUMFLEX ACCENT
- IsLetterTab[0xC3] = true; // Ã , CAPITAL LETTER A WITH TILDE
- IsLetterTab[0xC4] = true; // Ä , CAPITAL LETTER A WITH DIAERESIS
- IsLetterTab[0xC5] = true; // Å , CAPITAL LETTER A WITH RING ABOVE
- IsLetterTab[0xC6] = true; // Æ , CAPITAL LIGATURE AE
- IsLetterTab[0xC7] = true; // Ç , CAPITAL LETTER C WITH CEDILLA
- IsLetterTab[0xC8] = true; // È , CAPITAL LETTER E WITH GRAVE ACCENT
- IsLetterTab[0xC9] = true; // É , CAPITAL LETTER E WITH ACUTE ACCENT
- IsLetterTab[0xCA] = true; // Ê , CAPITAL LETTER E WITH CIRCUMFLEX ACCENT
- IsLetterTab[0xCB] = true; // Ë , CAPITAL LETTER E WITH DIAERESIS
- IsLetterTab[0xCC] = true; // Ì , CAPITAL LETTER I WITH GRAVE ACCENT
- IsLetterTab[0xCD] = true; // Í , CAPITAL LETTER I WITH ACUTE ACCENT
- IsLetterTab[0xCE] = true; // Î , CAPITAL LETTER I WITH CIRCUMFLEX ACCENT
- IsLetterTab[0xCF] = true; // Ï , CAPITAL LETTER I WITH DIAERESIS
- IsLetterTab[0xD0] = true; // Ð , CAPITAL LETTER ETH
- IsLetterTab[0xD1] = true; // Ñ , CAPITAL LETTER N WITH TILDE
- IsLetterTab[0xD2] = true; // Ò , CAPITAL LETTER O WITH GRAVE ACCENT
- IsLetterTab[0xD3] = true; // Ó , CAPITAL LETTER O WITH ACUTE ACCENT
- IsLetterTab[0xD4] = true; // Ô , CAPITAL LETTER O WITH CIRCUMFLEX ACCENT
- IsLetterTab[0xD5] = true; // Õ , CAPITAL LETTER O WITH TILDE
- IsLetterTab[0xD6] = true; // Ö , CAPITAL LETTER O WITH DIAERESIS
- IsLetterTab[0xD8] = true; // Ø , CAPITAL LETTER O WITH STROKE
- IsLetterTab[0xD9] = true; // Ù , CAPITAL LETTER U WITH GRAVE ACCENT
- IsLetterTab[0xDA] = true; // Ú , CAPITAL LETTER U WITH ACUTE ACCENT
- IsLetterTab[0xDB] = true; // Û , CAPITAL LETTER U WITH CIRCUMFLEX ACCENT
- IsLetterTab[0xDC] = true; // Ü , CAPITAL LETTER U WITH DIAERESIS
- IsLetterTab[0xDD] = true; // Ý , CAPITAL LETTER Y WITH ACUTE ACCENT
- IsLetterTab[0xDE] = true; // Þ , CAPITAL LETTER THORN
- IsLetterTab[0xDF] = true; // ß , SMALL LETTER SHARP S
- IsLetterTab[0xE0] = true; // à , SMALL LETTER A WITH GRAVE ACCENT
- IsLetterTab[0xE1] = true; // á , SMALL LETTER A WITH ACUTE ACCENT
- IsLetterTab[0xE2] = true; // â , SMALL LETTER A WITH CIRCUMFLEX ACCENT
- IsLetterTab[0xE3] = true; // ã , SMALL LETTER A WITH TILDE
- IsLetterTab[0xE4] = true; // ä , SMALL LETTER A WITH DIAERESIS
- IsLetterTab[0xE5] = true; // å , SMALL LETTER A WITH RING ABOVE
- IsLetterTab[0xE6] = true; // æ , SMALL LIGATURE AE
- IsLetterTab[0xE7] = true; // ç , SMALL LETTER C WITH CEDILLA
- IsLetterTab[0xE8] = true; // è , SMALL LETTER E WITH GRAVE ACCENT
- IsLetterTab[0xE9] = true; // é , SMALL LETTER E WITH ACUTE ACCENT
- IsLetterTab[0xEA] = true; // ê , SMALL LETTER E WITH CIRCUMFLEX ACCENT
- IsLetterTab[0xEB] = true; // ë , SMALL LETTER E WITH DIAERESIS
- IsLetterTab[0xEC] = true; // ì , SMALL LETTER I WITH GRAVE ACCENT
- IsLetterTab[0xED] = true; // í , SMALL LETTER I WITH ACUTE ACCENT
- IsLetterTab[0xEE] = true; // î , SMALL LETTER I WITH CIRCUMFLEX ACCENT
- IsLetterTab[0xEF] = true; // ï , SMALL LETTER I WITH DIAERESIS
- IsLetterTab[0xF0] = true; // ð , SMALL LETTER ETH
- IsLetterTab[0xF1] = true; // ñ , SMALL LETTER N WITH TILDE
- IsLetterTab[0xF2] = true; // ò , SMALL LETTER O WITH GRAVE ACCENT
- IsLetterTab[0xF3] = true; // ó , SMALL LETTER O WITH ACUTE ACCENT
- IsLetterTab[0xF4] = true; // ô , SMALL LETTER O WITH CIRCUMFLEX ACCENT
- IsLetterTab[0xF5] = true; // õ , SMALL LETTER O WITH TILDE
- IsLetterTab[0xF6] = true; // ö , SMALL LETTER O WITH DIAERESIS
- IsLetterTab[0xF8] = true; // ø , SMALL LETTER O WITH OBLIQUE BAR
- IsLetterTab[0xF9] = true; // ù , SMALL LETTER U WITH GRAVE ACCENT
- IsLetterTab[0xFA] = true; // ú , SMALL LETTER U WITH ACUTE ACCENT
- IsLetterTab[0xFB] = true; // û , SMALL LETTER U WITH CIRCUMFLEX ACCENT
- IsLetterTab[0xFC] = true; // ü , SMALL LETTER U WITH DIAERESIS
- IsLetterTab[0xFD] = true; // ý , SMALL LETTER Y WITH ACUTE ACCENT
- IsLetterTab[0xFE] = true; // þ , SMALL LETTER THORN
- IsLetterTab[0xFF] = true; // ÿ , SMALL LETTER Y WITH DIAERESIS
+ IsLetterTab[0xC0] = true; // ?, CAPITAL LETTER A WITH GRAVE ACCENT
+ IsLetterTab[0xC1] = true; // ?, CAPITAL LETTER A WITH ACUTE ACCENT
+ IsLetterTab[0xC2] = true; // ?, CAPITAL LETTER A WITH CIRCUMFLEX ACCENT
+ IsLetterTab[0xC3] = true; // ?, CAPITAL LETTER A WITH TILDE
+ IsLetterTab[0xC4] = true; // ?, CAPITAL LETTER A WITH DIAERESIS
+ IsLetterTab[0xC5] = true; // ?, CAPITAL LETTER A WITH RING ABOVE
+ IsLetterTab[0xC6] = true; // ?, CAPITAL LIGATURE AE
+ IsLetterTab[0xC7] = true; // ?, CAPITAL LETTER C WITH CEDILLA
+ IsLetterTab[0xC8] = true; // ?, CAPITAL LETTER E WITH GRAVE ACCENT
+ IsLetterTab[0xC9] = true; // ?, CAPITAL LETTER E WITH ACUTE ACCENT
+ IsLetterTab[0xCA] = true; // ?, CAPITAL LETTER E WITH CIRCUMFLEX ACCENT
+ IsLetterTab[0xCB] = true; // ?, CAPITAL LETTER E WITH DIAERESIS
+ IsLetterTab[0xCC] = true; // ?, CAPITAL LETTER I WITH GRAVE ACCENT
+ IsLetterTab[0xCD] = true; // ?, CAPITAL LETTER I WITH ACUTE ACCENT
+ IsLetterTab[0xCE] = true; // ?, CAPITAL LETTER I WITH CIRCUMFLEX ACCENT
+ IsLetterTab[0xCF] = true; // ?, CAPITAL LETTER I WITH DIAERESIS
+ IsLetterTab[0xD0] = true; // ?, CAPITAL LETTER ETH
+ IsLetterTab[0xD1] = true; // ?, CAPITAL LETTER N WITH TILDE
+ IsLetterTab[0xD2] = true; // ?, CAPITAL LETTER O WITH GRAVE ACCENT
+ IsLetterTab[0xD3] = true; // ?, CAPITAL LETTER O WITH ACUTE ACCENT
+ IsLetterTab[0xD4] = true; // ?, CAPITAL LETTER O WITH CIRCUMFLEX ACCENT
+ IsLetterTab[0xD5] = true; // ?, CAPITAL LETTER O WITH TILDE
+ IsLetterTab[0xD6] = true; // ?, CAPITAL LETTER O WITH DIAERESIS
+ IsLetterTab[0xD8] = true; // ?, CAPITAL LETTER O WITH STROKE
+ IsLetterTab[0xD9] = true; // ?, CAPITAL LETTER U WITH GRAVE ACCENT
+ IsLetterTab[0xDA] = true; // ?, CAPITAL LETTER U WITH ACUTE ACCENT
+ IsLetterTab[0xDB] = true; // ?, CAPITAL LETTER U WITH CIRCUMFLEX ACCENT
+ IsLetterTab[0xDC] = true; // ?, CAPITAL LETTER U WITH DIAERESIS
+ IsLetterTab[0xDD] = true; // ?, CAPITAL LETTER Y WITH ACUTE ACCENT
+ IsLetterTab[0xDE] = true; // ?, CAPITAL LETTER THORN
+ IsLetterTab[0xDF] = true; // ?, SMALL LETTER SHARP S
+ IsLetterTab[0xE0] = true; // ?, SMALL LETTER A WITH GRAVE ACCENT
+ IsLetterTab[0xE1] = true; // ?, SMALL LETTER A WITH ACUTE ACCENT
+ IsLetterTab[0xE2] = true; // ?, SMALL LETTER A WITH CIRCUMFLEX ACCENT
+ IsLetterTab[0xE3] = true; // ?, SMALL LETTER A WITH TILDE
+ IsLetterTab[0xE4] = true; // ?, SMALL LETTER A WITH DIAERESIS
+ IsLetterTab[0xE5] = true; // ?, SMALL LETTER A WITH RING ABOVE
+ IsLetterTab[0xE6] = true; // ?, SMALL LIGATURE AE
+ IsLetterTab[0xE7] = true; // ?, SMALL LETTER C WITH CEDILLA
+ IsLetterTab[0xE8] = true; // ?, SMALL LETTER E WITH GRAVE ACCENT
+ IsLetterTab[0xE9] = true; // ?, SMALL LETTER E WITH ACUTE ACCENT
+ IsLetterTab[0xEA] = true; // ?, SMALL LETTER E WITH CIRCUMFLEX ACCENT
+ IsLetterTab[0xEB] = true; // ?, SMALL LETTER E WITH DIAERESIS
+ IsLetterTab[0xEC] = true; // ?, SMALL LETTER I WITH GRAVE ACCENT
+ IsLetterTab[0xED] = true; // ?, SMALL LETTER I WITH ACUTE ACCENT
+ IsLetterTab[0xEE] = true; // ?, SMALL LETTER I WITH CIRCUMFLEX ACCENT
+ IsLetterTab[0xEF] = true; // ?, SMALL LETTER I WITH DIAERESIS
+ IsLetterTab[0xF0] = true; // ?, SMALL LETTER ETH
+ IsLetterTab[0xF1] = true; // ?, SMALL LETTER N WITH TILDE
+ IsLetterTab[0xF2] = true; // ?, SMALL LETTER O WITH GRAVE ACCENT
+ IsLetterTab[0xF3] = true; // ?, SMALL LETTER O WITH ACUTE ACCENT
+ IsLetterTab[0xF4] = true; // ?, SMALL LETTER O WITH CIRCUMFLEX ACCENT
+ IsLetterTab[0xF5] = true; // ?, SMALL LETTER O WITH TILDE
+ IsLetterTab[0xF6] = true; // ?, SMALL LETTER O WITH DIAERESIS
+ IsLetterTab[0xF8] = true; // ?, SMALL LETTER O WITH OBLIQUE BAR
+ IsLetterTab[0xF9] = true; // ?, SMALL LETTER U WITH GRAVE ACCENT
+ IsLetterTab[0xFA] = true; // ?, SMALL LETTER U WITH ACUTE ACCENT
+ IsLetterTab[0xFB] = true; // ?, SMALL LETTER U WITH CIRCUMFLEX ACCENT
+ IsLetterTab[0xFC] = true; // ?, SMALL LETTER U WITH DIAERESIS
+ IsLetterTab[0xFD] = true; // ?, SMALL LETTER Y WITH ACUTE ACCENT
+ IsLetterTab[0xFE] = true; // ?, SMALL LETTER THORN
+ IsLetterTab[0xFF] = true; // � , SMALL LETTER Y WITH DIAERESIS
}
bool LetterTable::isLetterUnicode( sal_Unicode c )
@@ -358,7 +358,7 @@ bool LetterTable::isLetterUnicode( sal_Unicode c )
}
// Hilfsfunktion: Zeichen-Flag Testen
-BOOL SimpleTokenizer_Impl::testCharFlags( sal_Unicode c, USHORT nTestFlags )
+sal_Bool SimpleTokenizer_Impl::testCharFlags( sal_Unicode c, sal_uInt16 nTestFlags )
{
bool bRet = false;
if( c != 0 && c <= 255 )
@@ -373,14 +373,14 @@ BOOL SimpleTokenizer_Impl::testCharFlags( sal_Unicode c, USHORT nTestFlags )
return bRet;
}
-void SimpleTokenizer_Impl::setKeyWords( const char** ppKeyWords, UINT16 nCount )
+void SimpleTokenizer_Impl::setKeyWords( const char** ppKeyWords, sal_uInt16 nCount )
{
ppListKeyWords = ppKeyWords;
nKeyWordCount = nCount;
}
// Neues Token holen
-BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
+sal_Bool SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
/*out*/const sal_Unicode*& rpStartPos, /*out*/const sal_Unicode*& rpEndPos )
{
reType = TT_UNKNOWN;
@@ -391,25 +391,25 @@ BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
// Zeichen untersuchen
sal_Unicode c = peekChar();
if( c == CHAR_EOF )
- return FALSE;
+ return sal_False;
// Zeichen lesen
getChar();
//*** Alle Moeglichkeiten durchgehen ***
// Space?
- if ( (testCharFlags( c, CHAR_SPACE ) == TRUE) )
+ if ( (testCharFlags( c, CHAR_SPACE ) == sal_True) )
{
- while( testCharFlags( peekChar(), CHAR_SPACE ) == TRUE )
+ while( testCharFlags( peekChar(), CHAR_SPACE ) == sal_True )
getChar();
reType = TT_WHITESPACE;
}
// Identifier?
- else if ( (testCharFlags( c, CHAR_START_IDENTIFIER ) == TRUE) )
+ else if ( (testCharFlags( c, CHAR_START_IDENTIFIER ) == sal_True) )
{
- BOOL bIdentifierChar;
+ sal_Bool bIdentifierChar;
do
{
// Naechstes Zeichen holen
@@ -452,7 +452,7 @@ BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
{
// Alle Zeichen bis Zeilen-Ende oder EOF entfernen
sal_Unicode cPeek = peekChar();
- while( cPeek != CHAR_EOF && testCharFlags( cPeek, CHAR_EOL ) == FALSE )
+ while( cPeek != CHAR_EOF && testCharFlags( cPeek, CHAR_EOL ) == sal_False )
{
c = getChar();
cPeek = peekChar();
@@ -467,14 +467,14 @@ BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
// Operator?
// only for BASIC '\'' should be a comment, otherwise it is a normal string and handled there
- else if ( ( testCharFlags( c, CHAR_OPERATOR ) == TRUE ) || ( (c == '\'') && (aLanguage==HIGHLIGHT_BASIC)) )
+ else if ( ( testCharFlags( c, CHAR_OPERATOR ) == sal_True ) || ( (c == '\'') && (aLanguage==HIGHLIGHT_BASIC)) )
{
// paramters for SQL view
if ( (c==':') || (c=='?'))
{
if (c!='?')
{
- BOOL bIdentifierChar;
+ sal_Bool bIdentifierChar;
do
{
// Naechstes Zeichen holen
@@ -493,7 +493,7 @@ BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
if (cPeekNext=='-')
{
// Alle Zeichen bis Zeilen-Ende oder EOF entfernen
- while( cPeekNext != CHAR_EOF && testCharFlags( cPeekNext, CHAR_EOL ) == FALSE )
+ while( cPeekNext != CHAR_EOF && testCharFlags( cPeekNext, CHAR_EOL ) == sal_False )
{
getChar();
cPeekNext = peekChar();
@@ -507,7 +507,7 @@ BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
if (cPeekNext=='/')
{
// Alle Zeichen bis Zeilen-Ende oder EOF entfernen
- while( cPeekNext != CHAR_EOF && testCharFlags( cPeekNext, CHAR_EOL ) == FALSE )
+ while( cPeekNext != CHAR_EOF && testCharFlags( cPeekNext, CHAR_EOL ) == sal_False )
{
getChar();
cPeekNext = peekChar();
@@ -524,7 +524,7 @@ BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
// Alle Zeichen bis Zeilen-Ende oder EOF entfernen
sal_Unicode cPeek = c;
- while( cPeek != CHAR_EOF && testCharFlags( cPeek, CHAR_EOL ) == FALSE )
+ while( cPeek != CHAR_EOF && testCharFlags( cPeek, CHAR_EOL ) == sal_False )
{
getChar();
cPeek = peekChar();
@@ -551,7 +551,7 @@ BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
}
// Zahl?
- else if( testCharFlags( c, CHAR_START_NUMBER ) == TRUE )
+ else if( testCharFlags( c, CHAR_START_NUMBER ) == sal_True )
{
reType = TT_NUMBER;
@@ -593,7 +593,7 @@ BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
if( reType == TT_NUMBER && nRadix == 10 )
{
// Flag, ob das letzte Zeichen ein Exponent war
- BOOL bAfterExpChar = FALSE;
+ sal_Bool bAfterExpChar = sal_False;
// Alle Ziffern einlesen
while( testCharFlags( peekChar(), CHAR_IN_NUMBER ) ||
@@ -610,7 +610,7 @@ BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
}
// String?
- else if( testCharFlags( c, CHAR_START_STRING ) == TRUE )
+ else if( testCharFlags( c, CHAR_START_STRING ) == sal_True )
{
// Merken, welches Zeichen den String eroeffnet hat
sal_Unicode cEndString = c;
@@ -628,7 +628,7 @@ BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
break;
}
c = getChar();
- if( testCharFlags( c, CHAR_EOL ) == TRUE )
+ if( testCharFlags( c, CHAR_EOL ) == sal_True )
{
// ERROR: unterminated string literal
reType = TT_ERROR;
@@ -648,11 +648,11 @@ BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
}
// Zeilenende?
- else if( testCharFlags( c, CHAR_EOL ) == TRUE )
+ else if( testCharFlags( c, CHAR_EOL ) == sal_True )
{
// Falls ein weiteres anderes EOL-Char folgt, weg damit
sal_Unicode cNext = peekChar();
- if( cNext != c && testCharFlags( cNext, CHAR_EOL ) == TRUE )
+ if( cNext != c && testCharFlags( cNext, CHAR_EOL ) == sal_True )
getChar();
// Positions-Daten auf Zeilen-Beginn setzen
@@ -667,13 +667,13 @@ BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType,
// End-Position eintragen
rpEndPos = mpActualPos;
- return TRUE;
+ return sal_True;
}
String SimpleTokenizer_Impl::getTokStr
( /*out*/const sal_Unicode* pStartPos, /*out*/const sal_Unicode* pEndPos )
{
- return String( pStartPos, (USHORT)( pEndPos - pStartPos ) );
+ return String( pStartPos, (sal_uInt16)( pEndPos - pStartPos ) );
}
#ifdef DBG_UTIL
@@ -698,7 +698,7 @@ String SimpleTokenizer_Impl::getFullTokenStr( /*out*/TokenTypes eType,
}
if( eType != TT_EOL )
{
- aOut += String( pStartPos, (USHORT)( pEndPos - pStartPos ) );
+ aOut += String( pStartPos, (sal_uInt16)( pEndPos - pStartPos ) );
}
aOut += String( RTL_CONSTASCII_USTRINGPARAM("\n") );
return aOut;
@@ -710,10 +710,10 @@ SimpleTokenizer_Impl::SimpleTokenizer_Impl( HighlighterLanguage aLang ): aLangua
memset( aCharTypeTab, 0, sizeof( aCharTypeTab ) );
// Zeichen-Tabelle fuellen
- USHORT i;
+ sal_uInt16 i;
// Zulaessige Zeichen fuer Identifier
- USHORT nHelpMask = (USHORT)( CHAR_START_IDENTIFIER | CHAR_IN_IDENTIFIER );
+ sal_uInt16 nHelpMask = (sal_uInt16)( CHAR_START_IDENTIFIER | CHAR_IN_IDENTIFIER );
for( i = 'a' ; i <= 'z' ; i++ )
aCharTypeTab[i] |= nHelpMask;
for( i = 'A' ; i <= 'Z' ; i++ )
@@ -724,7 +724,7 @@ SimpleTokenizer_Impl::SimpleTokenizer_Impl( HighlighterLanguage aLang ): aLangua
aCharTypeTab[(int)'$'] |= nHelpMask;
// Ziffern (Identifier und Number ist moeglich)
- nHelpMask = (USHORT)( CHAR_IN_IDENTIFIER | CHAR_START_NUMBER |
+ nHelpMask = (sal_uInt16)( CHAR_IN_IDENTIFIER | CHAR_START_NUMBER |
CHAR_IN_NUMBER | CHAR_IN_HEX_NUMBER );
for( i = '0' ; i <= '9' ; i++ )
aCharTypeTab[i] |= nHelpMask;
@@ -732,7 +732,7 @@ SimpleTokenizer_Impl::SimpleTokenizer_Impl( HighlighterLanguage aLang ): aLangua
// e und E sowie . von Hand ergaenzen
aCharTypeTab[(int)'e'] |= CHAR_IN_NUMBER;
aCharTypeTab[(int)'E'] |= CHAR_IN_NUMBER;
- aCharTypeTab[(int)'.'] |= (USHORT)( CHAR_IN_NUMBER | CHAR_START_NUMBER );
+ aCharTypeTab[(int)'.'] |= (sal_uInt16)( CHAR_IN_NUMBER | CHAR_START_NUMBER );
aCharTypeTab[(int)'&'] |= CHAR_START_NUMBER;
// Hex-Ziffern
@@ -800,7 +800,7 @@ SimpleTokenizer_Impl* getSimpleTokenizer( void )
}
// Heraussuchen der jeweils naechsten Funktion aus einem JavaScript-Modul
-UINT16 SimpleTokenizer_Impl::parseLine( UINT32 nParseLine, const String* aSource )
+sal_uInt16 SimpleTokenizer_Impl::parseLine( sal_uInt32 nParseLine, const String* aSource )
{
// Position auf den Anfang des Source-Strings setzen
mpStringBegin = mpActualPos = aSource->GetBuffer();
@@ -815,14 +815,14 @@ UINT16 SimpleTokenizer_Impl::parseLine( UINT32 nParseLine, const String* aSource
const sal_Unicode* pEndPos;
// Schleife ueber alle Tokens
- UINT16 nTokenCount = 0;
+ sal_uInt16 nTokenCount = 0;
while( getNextToken( eType, pStartPos, pEndPos ) )
nTokenCount++;
return nTokenCount;
}
-void SimpleTokenizer_Impl::getHighlightPortions( UINT32 nParseLine, const String& rLine,
+void SimpleTokenizer_Impl::getHighlightPortions( sal_uInt32 nParseLine, const String& rLine,
/*out*/HighlightPortions& portions )
{
// Position auf den Anfang des Source-Strings setzen
@@ -842,8 +842,8 @@ void SimpleTokenizer_Impl::getHighlightPortions( UINT32 nParseLine, const String
{
HighlightPortion portion;
- portion.nBegin = (UINT16)(pStartPos - mpStringBegin);
- portion.nEnd = (UINT16)(pEndPos - mpStringBegin);
+ portion.nBegin = (sal_uInt16)(pStartPos - mpStringBegin);
+ portion.nEnd = (sal_uInt16)(pEndPos - mpStringBegin);
portion.tokenType = eType;
portions.push_back(portion);
@@ -888,18 +888,18 @@ void SyntaxHighlighter::initialize( HighlighterLanguage eLanguage_ )
}
}
-const Range SyntaxHighlighter::notifyChange( UINT32 nLine, INT32 nLineCountDifference,
- const String* pChangedLines, UINT32 nArrayLength)
+const Range SyntaxHighlighter::notifyChange( sal_uInt32 nLine, sal_Int32 nLineCountDifference,
+ const String* pChangedLines, sal_uInt32 nArrayLength)
{
(void)nLineCountDifference;
- for( UINT32 i=0 ; i < nArrayLength ; i++ )
+ for( sal_uInt32 i=0 ; i < nArrayLength ; i++ )
m_pSimpleTokenizer->parseLine(nLine+i, &pChangedLines[i]);
return Range( nLine, nLine + nArrayLength-1 );
}
-void SyntaxHighlighter::getHighlightPortions( UINT32 nLine, const String& rLine,
+void SyntaxHighlighter::getHighlightPortions( sal_uInt32 nLine, const String& rLine,
/*out*/HighlightPortions& portions )
{
m_pSimpleTokenizer->getHighlightPortions( nLine, rLine, portions );
diff --git a/svtools/source/edit/textdat2.hxx b/svtools/source/edit/textdat2.hxx
index 222e8abee5a4..17b4454a109f 100644
--- a/svtools/source/edit/textdat2.hxx
+++ b/svtools/source/edit/textdat2.hxx
@@ -56,35 +56,35 @@ class TextView;
class TETextPortion
{
private:
- USHORT nLen;
+ sal_uInt16 nLen;
long nWidth;
- BYTE nKind;
- BYTE nRightToLeft;
+ sal_uInt8 nKind;
+ sal_uInt8 nRightToLeft;
TETextPortion() { nLen = 0; nKind = PORTIONKIND_TEXT; nWidth = -1; nRightToLeft = 0;}
public:
- TETextPortion( USHORT nL ) {
+ TETextPortion( sal_uInt16 nL ) {
nLen = nL;
nKind = PORTIONKIND_TEXT;
nWidth= -1;
nRightToLeft = 0;
}
- USHORT GetLen() const { return nLen; }
- USHORT& GetLen() { return nLen; }
+ sal_uInt16 GetLen() const { return nLen; }
+ sal_uInt16& GetLen() { return nLen; }
long GetWidth()const { return nWidth; }
long& GetWidth() { return nWidth; }
- BYTE GetKind() const { return nKind; }
- BYTE& GetKind() { return nKind; }
+ sal_uInt8 GetKind() const { return nKind; }
+ sal_uInt8& GetKind() { return nKind; }
- BYTE GetRightToLeft() const { return nRightToLeft; }
- BYTE& GetRightToLeft() { return nRightToLeft; }
- BOOL IsRightToLeft() const { return (nRightToLeft&1); }
+ sal_uInt8 GetRightToLeft() const { return nRightToLeft; }
+ sal_uInt8& GetRightToLeft() { return nRightToLeft; }
+ sal_Bool IsRightToLeft() const { return (nRightToLeft&1); }
- BOOL HasValidSize() const { return nWidth != (-1); }
+ sal_Bool HasValidSize() const { return nWidth != (-1); }
};
@@ -99,17 +99,17 @@ public:
~TETextPortionList();
void Reset();
- USHORT FindPortion( USHORT nCharPos, USHORT& rPortionStart, BOOL bPreferStartingPortion = FALSE );
- USHORT GetPortionStartIndex( USHORT nPortion );
- void DeleteFromPortion( USHORT nDelFrom );
+ sal_uInt16 FindPortion( sal_uInt16 nCharPos, sal_uInt16& rPortionStart, sal_Bool bPreferStartingPortion = sal_False );
+ sal_uInt16 GetPortionStartIndex( sal_uInt16 nPortion );
+ void DeleteFromPortion( sal_uInt16 nDelFrom );
};
struct TEWritingDirectionInfo
{
- BYTE nType;
- USHORT nStartPos;
- USHORT nEndPos;
- TEWritingDirectionInfo( BYTE _Type, USHORT _Start, USHORT _End )
+ sal_uInt8 nType;
+ sal_uInt16 nStartPos;
+ sal_uInt16 nEndPos;
+ TEWritingDirectionInfo( sal_uInt8 _Type, sal_uInt16 _Start, sal_uInt16 _End )
{
nType = _Type;
nStartPos = _Start;
@@ -122,65 +122,65 @@ SV_DECL_VARARR( TEWritingDirectionInfos, TEWritingDirectionInfo, 0, 4 )
class TextLine
{
private:
- USHORT mnStart;
- USHORT mnEnd;
- USHORT mnStartPortion;
- USHORT mnEndPortion;
+ sal_uInt16 mnStart;
+ sal_uInt16 mnEnd;
+ sal_uInt16 mnStartPortion;
+ sal_uInt16 mnEndPortion;
short mnStartX;
- BOOL mbInvalid; // fuer geschickte Formatierung/Ausgabe
+ sal_Bool mbInvalid; // fuer geschickte Formatierung/Ausgabe
public:
TextLine() {
mnStart = mnEnd = 0;
mnStartPortion = mnEndPortion = 0;
mnStartX = 0;
- mbInvalid = TRUE;
+ mbInvalid = sal_True;
}
- BOOL IsIn( USHORT nIndex ) const
+ sal_Bool IsIn( sal_uInt16 nIndex ) const
{ return ( (nIndex >= mnStart ) && ( nIndex < mnEnd ) ); }
- BOOL IsIn( USHORT nIndex, BOOL bInclEnd ) const
+ sal_Bool IsIn( sal_uInt16 nIndex, sal_Bool bInclEnd ) const
{ return ( ( nIndex >= mnStart ) && ( bInclEnd ? ( nIndex <= mnEnd ) : ( nIndex < mnEnd ) ) ); }
- void SetStart( USHORT n ) { mnStart = n; }
- USHORT GetStart() const { return mnStart; }
- USHORT& GetStart() { return mnStart; }
+ void SetStart( sal_uInt16 n ) { mnStart = n; }
+ sal_uInt16 GetStart() const { return mnStart; }
+ sal_uInt16& GetStart() { return mnStart; }
- void SetEnd( USHORT n ) { mnEnd = n; }
- USHORT GetEnd() const { return mnEnd; }
- USHORT& GetEnd() { return mnEnd; }
+ void SetEnd( sal_uInt16 n ) { mnEnd = n; }
+ sal_uInt16 GetEnd() const { return mnEnd; }
+ sal_uInt16& GetEnd() { return mnEnd; }
- void SetStartPortion( USHORT n ) { mnStartPortion = n; }
- USHORT GetStartPortion() const { return mnStartPortion; }
- USHORT& GetStartPortion() { return mnStartPortion; }
+ void SetStartPortion( sal_uInt16 n ) { mnStartPortion = n; }
+ sal_uInt16 GetStartPortion() const { return mnStartPortion; }
+ sal_uInt16& GetStartPortion() { return mnStartPortion; }
- void SetEndPortion( USHORT n ) { mnEndPortion = n; }
- USHORT GetEndPortion() const { return mnEndPortion; }
- USHORT& GetEndPortion() { return mnEndPortion; }
+ void SetEndPortion( sal_uInt16 n ) { mnEndPortion = n; }
+ sal_uInt16 GetEndPortion() const { return mnEndPortion; }
+ sal_uInt16& GetEndPortion() { return mnEndPortion; }
- USHORT GetLen() const { return mnEnd - mnStart; }
+ sal_uInt16 GetLen() const { return mnEnd - mnStart; }
- BOOL IsInvalid() const { return mbInvalid; }
- BOOL IsValid() const { return !mbInvalid; }
- void SetInvalid() { mbInvalid = TRUE; }
- void SetValid() { mbInvalid = FALSE; }
+ sal_Bool IsInvalid() const { return mbInvalid; }
+ sal_Bool IsValid() const { return !mbInvalid; }
+ void SetInvalid() { mbInvalid = sal_True; }
+ void SetValid() { mbInvalid = sal_False; }
- BOOL IsEmpty() const { return (mnEnd > mnStart) ? FALSE : TRUE; }
+ sal_Bool IsEmpty() const { return (mnEnd > mnStart) ? sal_False : sal_True; }
short GetStartX() const { return mnStartX; }
void SetStartX( short n ) { mnStartX = n; }
- inline BOOL operator == ( const TextLine& rLine ) const;
- inline BOOL operator != ( const TextLine& rLine ) const;
+ inline sal_Bool operator == ( const TextLine& rLine ) const;
+ inline sal_Bool operator != ( const TextLine& rLine ) const;
};
typedef TextLine* TextLinePtr;
SV_DECL_PTRARR_DEL( TextLines, TextLinePtr, 1, 4 )
-inline BOOL TextLine::operator == ( const TextLine& rLine ) const
+inline sal_Bool TextLine::operator == ( const TextLine& rLine ) const
{
return ( ( mnStart == rLine.mnStart ) &&
( mnEnd == rLine.mnEnd ) &&
@@ -188,7 +188,7 @@ inline BOOL TextLine::operator == ( const TextLine& rLine ) const
( mnEndPortion == rLine.mnEndPortion ) );
}
-inline BOOL TextLine::operator != ( const TextLine& rLine ) const
+inline sal_Bool TextLine::operator != ( const TextLine& rLine ) const
{
return !( *this == rLine );
}
@@ -205,11 +205,11 @@ private:
TEWritingDirectionInfos maWritingDirectionInfos;
- USHORT mnInvalidPosStart;
+ sal_uInt16 mnInvalidPosStart;
short mnInvalidDiff;
- BOOL mbInvalid;
- BOOL mbSimple; // nur lineares Tippen
+ sal_Bool mbInvalid;
+ sal_Bool mbSimple; // nur lineares Tippen
TEParaPortion( const TEParaPortion& ) {;}
@@ -219,15 +219,15 @@ public:
~TEParaPortion();
- BOOL IsInvalid() const { return mbInvalid; }
- BOOL IsSimpleInvalid() const { return mbSimple; }
- void SetNotSimpleInvalid() { mbSimple = FALSE; }
- void SetValid() { mbInvalid = FALSE; mbSimple = TRUE;}
+ sal_Bool IsInvalid() const { return mbInvalid; }
+ sal_Bool IsSimpleInvalid() const { return mbSimple; }
+ void SetNotSimpleInvalid() { mbSimple = sal_False; }
+ void SetValid() { mbInvalid = sal_False; mbSimple = sal_True;}
- void MarkInvalid( USHORT nStart, short nDiff);
- void MarkSelectionInvalid( USHORT nStart, USHORT nEnd );
+ void MarkInvalid( sal_uInt16 nStart, short nDiff);
+ void MarkSelectionInvalid( sal_uInt16 nStart, sal_uInt16 nEnd );
- USHORT GetInvalidPosStart() const { return mnInvalidPosStart; }
+ sal_uInt16 GetInvalidPosStart() const { return mnInvalidPosStart; }
short GetInvalidDiff() const { return mnInvalidDiff; }
TextNode* GetNode() const { return mpNode; }
@@ -236,8 +236,8 @@ public:
TEWritingDirectionInfos& GetWritingDirectionInfos() { return maWritingDirectionInfos; }
- USHORT GetLineNumber( USHORT nIndex, BOOL bInclEnd );
- void CorrectValuesBehindLastFormattedLine( USHORT nLastFormattedLine );
+ sal_uInt16 GetLineNumber( sal_uInt16 nIndex, sal_Bool bInclEnd );
+ void CorrectValuesBehindLastFormattedLine( sal_uInt16 nLastFormattedLine );
};
@@ -262,9 +262,9 @@ public:
virtual void CreateAnchor();
- virtual BOOL SetCursorAtPoint( const Point& rPointPixel, BOOL bDontSelectAtCursor = FALSE );
+ virtual sal_Bool SetCursorAtPoint( const Point& rPointPixel, sal_Bool bDontSelectAtCursor = sal_False );
- virtual BOOL IsSelectionAtPoint( const Point& rPointPixel );
+ virtual sal_Bool IsSelectionAtPoint( const Point& rPointPixel );
virtual void DeselectAll();
virtual void DeselectAtPoint( const Point& );
@@ -276,13 +276,13 @@ class IdleFormatter : public Timer
{
private:
TextView* mpView;
- USHORT mnRestarts;
+ sal_uInt16 mnRestarts;
public:
IdleFormatter();
~IdleFormatter();
- void DoIdleFormat( TextView* pV, USHORT nMaxRestarts );
+ void DoIdleFormat( TextView* pV, sal_uInt16 nMaxRestarts );
void ForceTimeout();
TextView* GetView() { return mpView; }
};
@@ -292,14 +292,14 @@ struct TextDDInfo
Cursor maCursor;
TextPaM maDropPos;
- BOOL mbStarterOfDD;
- BOOL mbVisCursor;
+ sal_Bool mbStarterOfDD;
+ sal_Bool mbVisCursor;
TextDDInfo()
{
maCursor.SetStyle( CURSOR_SHADOW );
- mbStarterOfDD = FALSE;
- mbVisCursor = FALSE;
+ mbStarterOfDD = sal_False;
+ mbVisCursor = sal_False;
}
};
diff --git a/svtools/source/edit/textdata.cxx b/svtools/source/edit/textdata.cxx
index cb33ea7d50e6..1cefb30700df 100644
--- a/svtools/source/edit/textdata.cxx
+++ b/svtools/source/edit/textdata.cxx
@@ -80,24 +80,24 @@ TETextPortionList::~TETextPortionList()
void TETextPortionList::Reset()
{
- for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ )
+ for ( sal_uInt16 nPortion = 0; nPortion < Count(); nPortion++ )
delete GetObject( nPortion );
Remove( 0, Count() );
}
-void TETextPortionList::DeleteFromPortion( USHORT nDelFrom )
+void TETextPortionList::DeleteFromPortion( sal_uInt16 nDelFrom )
{
DBG_ASSERT( ( nDelFrom < Count() ) || ( (nDelFrom == 0) && (Count() == 0) ), "DeleteFromPortion: Out of range" );
- for ( USHORT nP = nDelFrom; nP < Count(); nP++ )
+ for ( sal_uInt16 nP = nDelFrom; nP < Count(); nP++ )
delete GetObject( nP );
Remove( nDelFrom, Count()-nDelFrom );
}
-USHORT TETextPortionList::FindPortion( USHORT nCharPos, USHORT& nPortionStart, BOOL bPreferStartingPortion )
+sal_uInt16 TETextPortionList::FindPortion( sal_uInt16 nCharPos, sal_uInt16& nPortionStart, sal_Bool bPreferStartingPortion )
{
// Bei nCharPos an Portion-Grenze wird die linke Portion gefunden
- USHORT nTmpPos = 0;
- for ( USHORT nPortion = 0; nPortion < Count(); nPortion++ )
+ sal_uInt16 nTmpPos = 0;
+ for ( sal_uInt16 nPortion = 0; nPortion < Count(); nPortion++ )
{
TETextPortion* pPortion = GetObject( nPortion );
nTmpPos = nTmpPos + pPortion->GetLen();
@@ -116,10 +116,10 @@ USHORT TETextPortionList::FindPortion( USHORT nCharPos, USHORT& nPortionStart, B
}
/*
-USHORT TETextPortionList::GetPortionStartIndex( USHORT nPortion )
+sal_uInt16 TETextPortionList::GetPortionStartIndex( sal_uInt16 nPortion )
{
- USHORT nPos = 0;
- for ( USHORT nP = 0; nP < nPortion; nP++ )
+ sal_uInt16 nPos = 0;
+ for ( sal_uInt16 nP = 0; nP < nPortion; nP++ )
{
TETextPortion* pPortion = GetObject( nP );
nPos += pPortion->GetLen();
@@ -136,17 +136,17 @@ TEParaPortion::TEParaPortion( TextNode* pN )
{
mpNode = pN;
mnInvalidPosStart = mnInvalidDiff = 0;
- mbInvalid = TRUE;
- mbSimple = FALSE;
+ mbInvalid = sal_True;
+ mbSimple = sal_False;
}
TEParaPortion::~TEParaPortion()
{
}
-void TEParaPortion::MarkInvalid( USHORT nStart, short nDiff )
+void TEParaPortion::MarkInvalid( sal_uInt16 nStart, short nDiff )
{
- if ( mbInvalid == FALSE )
+ if ( mbInvalid == sal_False )
{
mnInvalidPosStart = ( nDiff >= 0 ) ? nStart : ( nStart + nDiff );
mnInvalidDiff = nDiff;
@@ -168,20 +168,20 @@ void TEParaPortion::MarkInvalid( USHORT nStart, short nDiff )
else
{
DBG_ASSERT( ( nDiff >= 0 ) || ( (nStart+nDiff) >= 0 ), "MarkInvalid: Diff out of Range" );
- mnInvalidPosStart = Min( mnInvalidPosStart, (USHORT) ( (nDiff < 0) ? nStart+nDiff : nDiff ) );
+ mnInvalidPosStart = Min( mnInvalidPosStart, (sal_uInt16) ( (nDiff < 0) ? nStart+nDiff : nDiff ) );
mnInvalidDiff = 0;
- mbSimple = FALSE;
+ mbSimple = sal_False;
}
}
maWritingDirectionInfos.Remove( 0, maWritingDirectionInfos.Count() );
- mbInvalid = TRUE;
+ mbInvalid = sal_True;
}
-void TEParaPortion::MarkSelectionInvalid( USHORT nStart, USHORT /*nEnd*/ )
+void TEParaPortion::MarkSelectionInvalid( sal_uInt16 nStart, sal_uInt16 /*nEnd*/ )
{
- if ( mbInvalid == FALSE )
+ if ( mbInvalid == sal_False )
{
mnInvalidPosStart = nStart;
// nInvalidPosEnd = nEnd;
@@ -195,13 +195,13 @@ void TEParaPortion::MarkSelectionInvalid( USHORT nStart, USHORT /*nEnd*/ )
maWritingDirectionInfos.Remove( 0, maWritingDirectionInfos.Count() );
mnInvalidDiff = 0;
- mbInvalid = TRUE;
- mbSimple = FALSE;
+ mbInvalid = sal_True;
+ mbSimple = sal_False;
}
-USHORT TEParaPortion::GetLineNumber( USHORT nChar, BOOL bInclEnd )
+sal_uInt16 TEParaPortion::GetLineNumber( sal_uInt16 nChar, sal_Bool bInclEnd )
{
- for ( USHORT nLine = 0; nLine < maLines.Count(); nLine++ )
+ for ( sal_uInt16 nLine = 0; nLine < maLines.Count(); nLine++ )
{
TextLine* pLine = maLines.GetObject( nLine );
if ( ( bInclEnd && ( pLine->GetEnd() >= nChar ) ) ||
@@ -218,9 +218,9 @@ USHORT TEParaPortion::GetLineNumber( USHORT nChar, BOOL bInclEnd )
}
-void TEParaPortion::CorrectValuesBehindLastFormattedLine( USHORT nLastFormattedLine )
+void TEParaPortion::CorrectValuesBehindLastFormattedLine( sal_uInt16 nLastFormattedLine )
{
- USHORT nLines = maLines.Count();
+ sal_uInt16 nLines = maLines.Count();
DBG_ASSERT( nLines, "CorrectPortionNumbersFromLine: Leere Portion?" );
if ( nLastFormattedLine < ( nLines - 1 ) )
{
@@ -238,7 +238,7 @@ void TEParaPortion::CorrectValuesBehindLastFormattedLine( USHORT nLastFormattedL
short nTDiff = sal::static_int_cast< short >(-( nTextDiff-1 ));
if ( nPDiff || nTDiff )
{
- for ( USHORT nL = nLastFormattedLine+1; nL < nLines; nL++ )
+ for ( sal_uInt16 nL = nLastFormattedLine+1; nL < nLines; nL++ )
{
TextLine* pLine = maLines[ nL ];
@@ -288,7 +288,7 @@ IdleFormatter::~IdleFormatter()
mpView = 0;
}
-void IdleFormatter::DoIdleFormat( TextView* pV, USHORT nMaxRestarts )
+void IdleFormatter::DoIdleFormat( TextView* pV, sal_uInt16 nMaxRestarts )
{
mpView = pV;
@@ -318,12 +318,12 @@ void IdleFormatter::ForceTimeout()
TYPEINIT1( TextHint, SfxSimpleHint );
-TextHint::TextHint( ULONG Id ) : SfxSimpleHint( Id )
+TextHint::TextHint( sal_uLong Id ) : SfxSimpleHint( Id )
{
mnValue = 0;
}
-TextHint::TextHint( ULONG Id, ULONG nValue ) : SfxSimpleHint( Id )
+TextHint::TextHint( sal_uLong Id, sal_uLong nValue ) : SfxSimpleHint( Id )
{
mnValue = nValue;
}
@@ -333,9 +333,9 @@ TEIMEInfos::TEIMEInfos( const TextPaM& rPos, const String& rOldTextAfterStartPos
{
aPos = rPos;
nLen = 0;
- bCursor = TRUE;
+ bCursor = sal_True;
pAttribs = NULL;
- bWasCursorOverwrite = FALSE;
+ bWasCursorOverwrite = sal_False;
}
TEIMEInfos::~TEIMEInfos()
@@ -343,12 +343,12 @@ TEIMEInfos::~TEIMEInfos()
delete[] pAttribs;
}
-void TEIMEInfos::CopyAttribs( const USHORT* pA, USHORT nL )
+void TEIMEInfos::CopyAttribs( const sal_uInt16* pA, sal_uInt16 nL )
{
nLen = nL;
delete pAttribs;
- pAttribs = new USHORT[ nL ];
- memcpy( pAttribs, pA, nL*sizeof(USHORT) );
+ pAttribs = new sal_uInt16[ nL ];
+ memcpy( pAttribs, pA, nL*sizeof(sal_uInt16) );
}
void TEIMEInfos::DestroyAttribs()
diff --git a/svtools/source/edit/textdoc.cxx b/svtools/source/edit/textdoc.cxx
index 1f7fa9745c8c..2dfb014117b1 100644
--- a/svtools/source/edit/textdoc.cxx
+++ b/svtools/source/edit/textdoc.cxx
@@ -65,7 +65,7 @@ CompareStart( const void* pFirst, const void* pSecond )
// -------------------------------------------------------------------------
// (+) class TextCharAttrib
// -------------------------------------------------------------------------
-TextCharAttrib::TextCharAttrib( const TextAttrib& rAttr, USHORT nStart, USHORT nEnd )
+TextCharAttrib::TextCharAttrib( const TextAttrib& rAttr, sal_uInt16 nStart, sal_uInt16 nEnd )
{
mpAttr = rAttr.Clone();
mnStart = nStart,
@@ -90,7 +90,7 @@ TextCharAttrib::~TextCharAttrib()
TextCharAttribList::TextCharAttribList()
{
- mbHasEmptyAttribs = FALSE;
+ mbHasEmptyAttribs = sal_False;
}
TextCharAttribList::~TextCharAttribList()
@@ -98,7 +98,7 @@ TextCharAttribList::~TextCharAttribList()
// PTRARR_DEL
}
-void TextCharAttribList::Clear( BOOL bDestroyAttribs )
+void TextCharAttribList::Clear( sal_Bool bDestroyAttribs )
{
if ( bDestroyAttribs )
TextCharAttribs::DeleteAndDestroy( 0, Count() );
@@ -110,18 +110,18 @@ void TextCharAttribList::Clear( BOOL bDestroyAttribs )
void TextCharAttribList::InsertAttrib( TextCharAttrib* pAttrib )
{
if ( pAttrib->IsEmpty() )
- mbHasEmptyAttribs = TRUE;
+ mbHasEmptyAttribs = sal_True;
- const USHORT nCount = Count();
- const USHORT nStart = pAttrib->GetStart(); // vielleicht besser fuer Comp.Opt.
- BOOL bInserted = FALSE;
- for ( USHORT x = 0; x < nCount; x++ )
+ const sal_uInt16 nCount = Count();
+ const sal_uInt16 nStart = pAttrib->GetStart(); // vielleicht besser fuer Comp.Opt.
+ sal_Bool bInserted = sal_False;
+ for ( sal_uInt16 x = 0; x < nCount; x++ )
{
TextCharAttrib* pCurAttrib = GetObject( x );
if ( pCurAttrib->GetStart() > nStart )
{
Insert( pAttrib, x );
- bInserted = TRUE;
+ bInserted = sal_True;
break;
}
}
@@ -135,12 +135,12 @@ void TextCharAttribList::ResortAttribs()
qsort( (void*)GetData(), Count(), sizeof( TextCharAttrib* ), CompareStart );
}
-TextCharAttrib* TextCharAttribList::FindAttrib( USHORT nWhich, USHORT nPos )
+TextCharAttrib* TextCharAttribList::FindAttrib( sal_uInt16 nWhich, sal_uInt16 nPos )
{
// Rueckwaerts, falls eins dort endet, das naechste startet.
// => Das startende gilt...
- for ( USHORT nAttr = Count(); nAttr; )
+ for ( sal_uInt16 nAttr = Count(); nAttr; )
{
TextCharAttrib* pAttr = GetObject( --nAttr );
@@ -153,11 +153,11 @@ TextCharAttrib* TextCharAttribList::FindAttrib( USHORT nWhich, USHORT nPos )
return NULL;
}
-TextCharAttrib* TextCharAttribList::FindNextAttrib( USHORT nWhich, USHORT nFromPos, USHORT nMaxPos ) const
+TextCharAttrib* TextCharAttribList::FindNextAttrib( sal_uInt16 nWhich, sal_uInt16 nFromPos, sal_uInt16 nMaxPos ) const
{
DBG_ASSERT( nWhich, "FindNextAttrib: Which?" );
- const USHORT nAttribs = Count();
- for ( USHORT nAttr = 0; nAttr < nAttribs; nAttr++ )
+ const sal_uInt16 nAttribs = Count();
+ for ( sal_uInt16 nAttr = 0; nAttr < nAttribs; nAttr++ )
{
TextCharAttrib* pAttr = GetObject( nAttr );
if ( ( pAttr->GetStart() >= nFromPos ) &&
@@ -168,41 +168,41 @@ TextCharAttrib* TextCharAttribList::FindNextAttrib( USHORT nWhich, USHORT nFromP
return NULL;
}
-BOOL TextCharAttribList::HasAttrib( USHORT nWhich ) const
+sal_Bool TextCharAttribList::HasAttrib( sal_uInt16 nWhich ) const
{
- for ( USHORT nAttr = Count(); nAttr; )
+ for ( sal_uInt16 nAttr = Count(); nAttr; )
{
const TextCharAttrib* pAttr = GetObject( --nAttr );
if ( pAttr->Which() == nWhich )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL TextCharAttribList::HasBoundingAttrib( USHORT nBound )
+sal_Bool TextCharAttribList::HasBoundingAttrib( sal_uInt16 nBound )
{
// Rueckwaerts, falls eins dort endet, das naechste startet.
// => Das startende gilt...
- for ( USHORT nAttr = Count(); nAttr; )
+ for ( sal_uInt16 nAttr = Count(); nAttr; )
{
TextCharAttrib* pAttr = GetObject( --nAttr );
if ( pAttr->GetEnd() < nBound )
- return FALSE;
+ return sal_False;
if ( ( pAttr->GetStart() == nBound ) || ( pAttr->GetEnd() == nBound ) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-TextCharAttrib* TextCharAttribList::FindEmptyAttrib( USHORT nWhich, USHORT nPos )
+TextCharAttrib* TextCharAttribList::FindEmptyAttrib( sal_uInt16 nWhich, sal_uInt16 nPos )
{
if ( !mbHasEmptyAttribs )
return 0;
- const USHORT nAttribs = Count();
- for ( USHORT nAttr = 0; nAttr < nAttribs; nAttr++ )
+ const sal_uInt16 nAttribs = Count();
+ for ( sal_uInt16 nAttr = 0; nAttr < nAttribs; nAttr++ )
{
TextCharAttrib* pAttr = GetObject( nAttr );
if ( pAttr->GetStart() > nPos )
@@ -216,7 +216,7 @@ TextCharAttrib* TextCharAttribList::FindEmptyAttrib( USHORT nWhich, USHORT nPos
void TextCharAttribList::DeleteEmptyAttribs()
{
- for ( USHORT nAttr = 0; nAttr < Count(); nAttr++ )
+ for ( sal_uInt16 nAttr = 0; nAttr < Count(); nAttr++ )
{
TextCharAttrib* pAttr = GetObject( nAttr );
if ( pAttr->IsEmpty() )
@@ -226,19 +226,19 @@ void TextCharAttribList::DeleteEmptyAttribs()
nAttr--;
}
}
- mbHasEmptyAttribs = FALSE;
+ mbHasEmptyAttribs = sal_False;
}
#ifdef DBG_UTIL
-BOOL TextCharAttribList::DbgCheckAttribs()
+sal_Bool TextCharAttribList::DbgCheckAttribs()
{
- BOOL bOK = TRUE;
- for ( USHORT nAttr = 0; nAttr < Count(); nAttr++ )
+ sal_Bool bOK = sal_True;
+ for ( sal_uInt16 nAttr = 0; nAttr < Count(); nAttr++ )
{
TextCharAttrib* pAttr = GetObject( nAttr );
if ( pAttr->GetStart() > pAttr->GetEnd() )
{
- bOK = FALSE;
+ bOK = sal_False;
DBG_ERROR( "Attr verdreht" );
}
}
@@ -255,14 +255,14 @@ TextNode::TextNode( const String& rText ) :
{
}
-void TextNode::ExpandAttribs( USHORT nIndex, USHORT nNew )
+void TextNode::ExpandAttribs( sal_uInt16 nIndex, sal_uInt16 nNew )
{
if ( !nNew )
return;
- BOOL bResort = FALSE;
- USHORT nAttribs = maCharAttribs.Count();
- for ( USHORT nAttr = 0; nAttr < nAttribs; nAttr++ )
+ sal_Bool bResort = sal_False;
+ sal_uInt16 nAttribs = maCharAttribs.Count();
+ for ( sal_uInt16 nAttr = 0; nAttr < nAttribs; nAttr++ )
{
TextCharAttrib* pAttrib = maCharAttribs.GetAttrib( nAttr );
if ( pAttrib->GetEnd() >= nIndex )
@@ -293,7 +293,7 @@ void TextNode::ExpandAttribs( USHORT nIndex, USHORT nNew )
pAttrib->Expand( nNew );
}
else
- bResort = TRUE;
+ bResort = sal_True;
}
// 2: Attribut startet davor, geht hinter Index...
else if ( ( pAttrib->GetStart() < nIndex ) && ( pAttrib->GetEnd() > nIndex ) )
@@ -306,7 +306,7 @@ void TextNode::ExpandAttribs( USHORT nIndex, USHORT nNew )
if ( nIndex == 0 )
{
pAttrib->Expand( nNew );
-// bResort = TRUE; // es gibt ja keine Features mehr...
+// bResort = sal_True; // es gibt ja keine Features mehr...
}
else
pAttrib->MoveForward( nNew );
@@ -326,18 +326,18 @@ void TextNode::ExpandAttribs( USHORT nIndex, USHORT nNew )
#endif
}
-void TextNode::CollapsAttribs( USHORT nIndex, USHORT nDeleted )
+void TextNode::CollapsAttribs( sal_uInt16 nIndex, sal_uInt16 nDeleted )
{
if ( !nDeleted )
return;
- BOOL bResort = FALSE;
- USHORT nEndChanges = nIndex+nDeleted;
+ sal_Bool bResort = sal_False;
+ sal_uInt16 nEndChanges = nIndex+nDeleted;
- for ( USHORT nAttr = 0; nAttr < maCharAttribs.Count(); nAttr++ )
+ for ( sal_uInt16 nAttr = 0; nAttr < maCharAttribs.Count(); nAttr++ )
{
TextCharAttrib* pAttrib = maCharAttribs.GetAttrib( nAttr );
- BOOL bDelAttr = FALSE;
+ sal_Bool bDelAttr = sal_False;
if ( pAttrib->GetEnd() >= nIndex )
{
// Alles Attribute hinter der Einfuegeposition verschieben...
@@ -353,7 +353,7 @@ void TextNode::CollapsAttribs( USHORT nIndex, USHORT nDeleted )
if ( ( pAttrib->GetStart() == nIndex ) && ( pAttrib->GetEnd() == nEndChanges ) )
pAttrib->GetEnd() = nIndex; // leer
else
- bDelAttr = TRUE;
+ bDelAttr = sal_True;
}
// 2. Attribut beginnt davor, endet drinnen oder dahinter...
else if ( ( pAttrib->GetStart() <= nIndex ) && ( pAttrib->GetEnd() > nIndex ) )
@@ -376,13 +376,13 @@ void TextNode::CollapsAttribs( USHORT nIndex, USHORT nDeleted )
DBG_ASSERT( ( pAttrib->GetEnd() <= maText.Len()) || bDelAttr, "Collaps: Attrib groesser als Absatz!" );
if ( bDelAttr /* || pAttrib->IsEmpty() */ )
{
- bResort = TRUE;
+ bResort = sal_True;
maCharAttribs.RemoveAttrib( nAttr );
delete pAttrib;
nAttr--;
}
else if ( pAttrib->IsEmpty() )
- maCharAttribs.HasEmptyAttribs() = TRUE;
+ maCharAttribs.HasEmptyAttribs() = sal_True;
}
if ( bResort )
@@ -393,25 +393,25 @@ void TextNode::CollapsAttribs( USHORT nIndex, USHORT nDeleted )
#endif
}
-void TextNode::InsertText( USHORT nPos, const String& rText )
+void TextNode::InsertText( sal_uInt16 nPos, const String& rText )
{
maText.Insert( rText, nPos );
ExpandAttribs( nPos, rText.Len() );
}
-void TextNode::InsertText( USHORT nPos, sal_Unicode c )
+void TextNode::InsertText( sal_uInt16 nPos, sal_Unicode c )
{
maText.Insert( c, nPos );
ExpandAttribs( nPos, 1 );
}
-void TextNode::RemoveText( USHORT nPos, USHORT nChars )
+void TextNode::RemoveText( sal_uInt16 nPos, sal_uInt16 nChars )
{
maText.Erase( nPos, nChars );
CollapsAttribs( nPos, nChars );
}
-TextNode* TextNode::Split( USHORT nPos, BOOL bKeepEndingAttribs )
+TextNode* TextNode::Split( sal_uInt16 nPos, sal_Bool bKeepEndingAttribs )
{
String aNewText;
if ( nPos < maText.Len() )
@@ -421,7 +421,7 @@ TextNode* TextNode::Split( USHORT nPos, BOOL bKeepEndingAttribs )
}
TextNode* pNew = new TextNode( aNewText );
- for ( USHORT nAttr = 0; nAttr < maCharAttribs.Count(); nAttr++ )
+ for ( sal_uInt16 nAttr = 0; nAttr < maCharAttribs.Count(); nAttr++ )
{
TextCharAttrib* pAttrib = maCharAttribs.GetAttrib( nAttr );
if ( pAttrib->GetEnd() < nPos )
@@ -469,7 +469,7 @@ TextNode* TextNode::Split( USHORT nPos, BOOL bKeepEndingAttribs )
void TextNode::Append( const TextNode& rNode )
{
- USHORT nOldLen = maText.Len();
+ sal_uInt16 nOldLen = maText.Len();
maText += rNode.GetText();
@@ -477,16 +477,16 @@ void TextNode::Append( const TextNode& rNode )
DBG_ASSERT( maCharAttribs.DbgCheckAttribs(), "Attribute VOR AppendAttribs kaputt" );
#endif
- const USHORT nAttribs = rNode.GetCharAttribs().Count();
- for ( USHORT nAttr = 0; nAttr < nAttribs; nAttr++ )
+ const sal_uInt16 nAttribs = rNode.GetCharAttribs().Count();
+ for ( sal_uInt16 nAttr = 0; nAttr < nAttribs; nAttr++ )
{
TextCharAttrib* pAttrib = rNode.GetCharAttribs().GetAttrib( nAttr );
- BOOL bMelted = FALSE;
+ sal_Bool bMelted = sal_False;
if ( pAttrib->GetStart() == 0 )
{
// Evtl koennen Attribute zusammengefasst werden:
- USHORT nTmpAttribs = maCharAttribs.Count();
- for ( USHORT nTmpAttr = 0; nTmpAttr < nTmpAttribs; nTmpAttr++ )
+ sal_uInt16 nTmpAttribs = maCharAttribs.Count();
+ for ( sal_uInt16 nTmpAttr = 0; nTmpAttr < nTmpAttribs; nTmpAttr++ )
{
TextCharAttrib* pTmpAttrib = maCharAttribs.GetAttrib( nTmpAttr );
@@ -497,7 +497,7 @@ void TextNode::Append( const TextNode& rNode )
{
pTmpAttrib->GetEnd() =
pTmpAttrib->GetEnd() + pAttrib->GetLen();
- bMelted = TRUE;
+ bMelted = sal_True;
break; // es kann nur eins von der Sorte an der Stelle geben
}
}
@@ -539,15 +539,15 @@ void TextDoc::Clear()
void TextDoc::DestroyTextNodes()
{
- for ( ULONG nNode = 0; nNode < maTextNodes.Count(); nNode++ )
+ for ( sal_uLong nNode = 0; nNode < maTextNodes.Count(); nNode++ )
delete maTextNodes.GetObject( nNode );
maTextNodes.clear();
}
String TextDoc::GetText( const sal_Unicode* pSep ) const
{
- ULONG nLen = GetTextLen( pSep );
- ULONG nNodes = maTextNodes.Count();
+ sal_uLong nLen = GetTextLen( pSep );
+ sal_uLong nNodes = maTextNodes.Count();
if ( nLen > STRING_MAXLEN )
{
@@ -556,8 +556,8 @@ String TextDoc::GetText( const sal_Unicode* pSep ) const
}
String aASCIIText;
- ULONG nLastNode = nNodes-1;
- for ( ULONG nNode = 0; nNode < nNodes; nNode++ )
+ sal_uLong nLastNode = nNodes-1;
+ for ( sal_uLong nNode = 0; nNode < nNodes; nNode++ )
{
TextNode* pNode = maTextNodes.GetObject( nNode );
String aTmp( pNode->GetText() );
@@ -569,7 +569,7 @@ String TextDoc::GetText( const sal_Unicode* pSep ) const
return aASCIIText;
}
-XubString TextDoc::GetText( ULONG nPara ) const
+XubString TextDoc::GetText( sal_uLong nPara ) const
{
XubString aText;
TextNode* pNode = ( nPara < maTextNodes.Count() ) ? maTextNodes.GetObject( nPara ) : 0;
@@ -580,26 +580,26 @@ XubString TextDoc::GetText( ULONG nPara ) const
}
-ULONG TextDoc::GetTextLen( const xub_Unicode* pSep, const TextSelection* pSel ) const
+sal_uLong TextDoc::GetTextLen( const xub_Unicode* pSep, const TextSelection* pSel ) const
{
- ULONG nLen = 0;
- ULONG nNodes = maTextNodes.Count();
+ sal_uLong nLen = 0;
+ sal_uLong nNodes = maTextNodes.Count();
if ( nNodes )
{
- ULONG nStartNode = 0;
- ULONG nEndNode = nNodes-1;
+ sal_uLong nStartNode = 0;
+ sal_uLong nEndNode = nNodes-1;
if ( pSel )
{
nStartNode = pSel->GetStart().GetPara();
nEndNode = pSel->GetEnd().GetPara();
}
- for ( ULONG nNode = nStartNode; nNode <= nEndNode; nNode++ )
+ for ( sal_uLong nNode = nStartNode; nNode <= nEndNode; nNode++ )
{
TextNode* pNode = maTextNodes.GetObject( nNode );
- USHORT nS = 0;
- ULONG nE = pNode->GetText().Len();
+ sal_uInt16 nS = 0;
+ sal_uLong nE = pNode->GetText().Len();
if ( pSel && ( nNode == pSel->GetStart().GetPara() ) )
nS = pSel->GetStart().GetIndex();
if ( pSel && ( nNode == pSel->GetEnd().GetPara() ) )
@@ -639,7 +639,7 @@ TextPaM TextDoc::InsertText( const TextPaM& rPaM, const XubString& rStr )
return aPaM;
}
-TextPaM TextDoc::InsertParaBreak( const TextPaM& rPaM, BOOL bKeepEndingAttribs )
+TextPaM TextDoc::InsertParaBreak( const TextPaM& rPaM, sal_Bool bKeepEndingAttribs )
{
TextNode* pNode = maTextNodes.GetObject( rPaM.GetPara() );
TextNode* pNew = pNode->Split( rPaM.GetIndex(), bKeepEndingAttribs );
@@ -652,20 +652,20 @@ TextPaM TextDoc::InsertParaBreak( const TextPaM& rPaM, BOOL bKeepEndingAttribs )
TextPaM TextDoc::ConnectParagraphs( TextNode* pLeft, TextNode* pRight )
{
- USHORT nPrevLen = pLeft->GetText().Len();
+ sal_uInt16 nPrevLen = pLeft->GetText().Len();
pLeft->Append( *pRight );
// der rechte verschwindet.
- ULONG nRight = maTextNodes.GetPos( pRight );
+ sal_uLong nRight = maTextNodes.GetPos( pRight );
maTextNodes.Remove( nRight );
delete pRight;
- ULONG nLeft = maTextNodes.GetPos( pLeft );
+ sal_uLong nLeft = maTextNodes.GetPos( pLeft );
TextPaM aPaM( nLeft, nPrevLen );
return aPaM;
}
-TextPaM TextDoc::RemoveChars( const TextPaM& rPaM, USHORT nChars )
+TextPaM TextDoc::RemoveChars( const TextPaM& rPaM, sal_uInt16 nChars )
{
TextNode* pNode = maTextNodes.GetObject( rPaM.GetPara() );
pNode->RemoveText( rPaM.GetIndex(), nChars );
@@ -673,25 +673,25 @@ TextPaM TextDoc::RemoveChars( const TextPaM& rPaM, USHORT nChars )
return rPaM;
}
-BOOL TextDoc::IsValidPaM( const TextPaM& rPaM )
+sal_Bool TextDoc::IsValidPaM( const TextPaM& rPaM )
{
if ( rPaM.GetPara() >= maTextNodes.Count() )
{
DBG_ERROR( "PaM: Para out of range" );
- return FALSE;
+ return sal_False;
}
TextNode * pNode = maTextNodes.GetObject( rPaM.GetPara() );
if ( rPaM.GetIndex() > pNode->GetText().Len() )
{
DBG_ERROR( "PaM: Index out of range" );
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
/*
-void TextDoc::InsertAttribInSelection( TextNode* pNode, USHORT nStart, USHORT nEnd, const SfxPoolItem& rPoolItem )
+void TextDoc::InsertAttribInSelection( TextNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, const SfxPoolItem& rPoolItem )
{
DBG_ASSERT( pNode, "Wohin mit dem Attribut?" );
DBG_ASSERT( nEnd <= pNode->Len(), "InsertAttrib: Attribut zu gross!" );
@@ -727,14 +727,14 @@ void TextDoc::InsertAttribInSelection( TextNode* pNode, USHORT nStart, USHORT nE
pNode->GetCharAttribs().ResortAttribs();
}
-BOOL TextDoc::RemoveAttribs( TextNode* pNode, USHORT nStart, USHORT nEnd, USHORT nWhich )
+sal_Bool TextDoc::RemoveAttribs( TextNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, sal_uInt16 nWhich )
{
TextCharAttrib* pStarting;
TextCharAttrib* pEnding;
return RemoveAttribs( pNode, nStart, nEnd, pStarting, pEnding, nWhich );
}
-BOOL TextDoc::RemoveAttribs( TextNode* pNode, USHORT nStart, USHORT nEnd, TextCharAttrib*& rpStarting, TextCharAttrib*& rpEnding, USHORT nWhich )
+sal_Bool TextDoc::RemoveAttribs( TextNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, TextCharAttrib*& rpStarting, TextCharAttrib*& rpEnding, sal_uInt16 nWhich )
{
DBG_ASSERT( pNode, "Wohin mit dem Attribut?" );
DBG_ASSERT( nEnd <= pNode->Len(), "InsertAttrib: Attribut zu gross!" );
@@ -744,22 +744,22 @@ BOOL TextDoc::RemoveAttribs( TextNode* pNode, USHORT nStart, USHORT nEnd, TextCh
// dieses startet am Ende der Selektion => kann erweitert werden
rpStarting = 0;
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
DBG_ASSERT( nStart <= nEnd, "Kleiner Rechenfehler in InsertAttribInSelection" );
// ueber die Attribute iterieren...
- USHORT nAttr = 0;
+ sal_uInt16 nAttr = 0;
TextCharAttrib* pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
while ( pAttr )
{
- BOOL bRemoveAttrib = FALSE;
+ sal_Bool bRemoveAttrib = sal_False;
if ( !nWhich || ( pAttr->Which() == nWhich ) )
{
// Attribut beginnt in Selection
if ( ( pAttr->GetStart() >= nStart ) && ( pAttr->GetStart() <= nEnd ) )
{
- bChanged = TRUE;
+ bChanged = sal_True;
if ( pAttr->GetEnd() > nEnd )
{
pAttr->GetStart() = nEnd; // dann faengt es dahinter an
@@ -769,14 +769,14 @@ BOOL TextDoc::RemoveAttribs( TextNode* pNode, USHORT nStart, USHORT nEnd, TextCh
else if ( !pAttr->IsFeature() || ( pAttr->GetStart() == nStart ) )
{
// Feature nur loeschen, wenn genau an der Stelle
- bRemoveAttrib = TRUE;
+ bRemoveAttrib = sal_True;
}
}
// Attribut endet in Selection
else if ( ( pAttr->GetEnd() >= nStart ) && ( pAttr->GetEnd() <= nEnd ) )
{
- bChanged = TRUE;
+ bChanged = sal_True;
if ( ( pAttr->GetStart() < nStart ) && !pAttr->IsFeature() )
{
pAttr->GetEnd() = nStart; // dann hoert es hier auf
@@ -785,13 +785,13 @@ BOOL TextDoc::RemoveAttribs( TextNode* pNode, USHORT nStart, USHORT nEnd, TextCh
else if ( !pAttr->IsFeature() || ( pAttr->GetStart() == nStart ) )
{
// Feature nur loeschen, wenn genau an der Stelle
- bRemoveAttrib = TRUE;
+ bRemoveAttrib = sal_True;
}
}
// Attribut ueberlappt die Selektion
else if ( ( pAttr->GetStart() <= nStart ) && ( pAttr->GetEnd() >= nEnd ) )
{
- bChanged = TRUE;
+ bChanged = sal_True;
if ( pAttr->GetStart() == nStart )
{
pAttr->GetStart() = nEnd;
@@ -806,10 +806,10 @@ BOOL TextDoc::RemoveAttribs( TextNode* pNode, USHORT nStart, USHORT nEnd, TextCh
}
else // Attribut muss gesplittet werden...
{
- USHORT nOldEnd = pAttr->GetEnd();
+ sal_uInt16 nOldEnd = pAttr->GetEnd();
pAttr->GetEnd() = nStart;
rpEnding = pAttr;
-// ULONG nSavePos = pNode->GetCharAttribs().GetStartList().GetCurPos();
+// sal_uLong nSavePos = pNode->GetCharAttribs().GetStartList().GetCurPos();
InsertAttrib( *pAttr->GetItem(), pNode, nEnd, nOldEnd );
// pNode->GetCharAttribs().GetStartList().Seek( nSavePos );
break; // es kann weitere Attribute geben!
@@ -832,14 +832,14 @@ BOOL TextDoc::RemoveAttribs( TextNode* pNode, USHORT nStart, USHORT nEnd, TextCh
#pragma SEG_FUNCDEF(editdoc_3f)
-void TextDoc::InsertAttrib( const SfxPoolItem& rPoolItem, TextNode* pNode, USHORT nStart, USHORT nEnd )
+void TextDoc::InsertAttrib( const SfxPoolItem& rPoolItem, TextNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd )
{
// Diese Methode prueft nicht mehr, ob ein entspr. Attribut
// schon an der Stelle existiert!
// pruefen, ob neues Attrib oder einfach nur Ende eines Attribs...
// const SfxPoolItem& rDefItem = pNode->GetContentAttribs().GetItem( rPoolItem.Which() );
-// BOOL bCreateAttrib = ( rDefItem != rPoolItem );
+// sal_Bool bCreateAttrib = ( rDefItem != rPoolItem );
// Durch den Verlust der Exclude-Liste geht es nicht mehr, dass ich
// kein neues Attribut benoetige und nur das alte nicht expandiere...
@@ -848,7 +848,7 @@ void TextDoc::InsertAttrib( const SfxPoolItem& rPoolItem, TextNode* pNode, USHOR
// => Wenn schon Default-Item, dann wenigstens nur dann einstellen,
// wenn davor wirklich ein entsprechendes Attribut.
// if ( pNode->GetCharAttribs().FindAttrib( rPoolItem.Which(), nStart ) )
-// bCreateAttrib = TRUE;
+// bCreateAttrib = sal_True;
// Aber kleiner Trost:
// Die wenigsten schreiben, aendern das Attr, schreiben, und
// stellen dann wieder das Default-Attr ein.
@@ -877,7 +877,7 @@ void TextDoc::InsertAttrib( const SfxPoolItem& rPoolItem, TextNode* pNode, USHOR
#pragma SEG_FUNCDEF(editdoc_40)
-void TextDoc::InsertAttrib( TextNode* pNode, USHORT nStart, USHORT nEnd, const SfxPoolItem& rPoolItem )
+void TextDoc::InsertAttrib( TextNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, const SfxPoolItem& rPoolItem )
{
if ( nStart != nEnd )
{
@@ -903,7 +903,7 @@ void TextDoc::InsertAttrib( TextNode* pNode, USHORT nStart, USHORT nEnd, const S
// ???????????????????????????????
// eigentlich noch pruefen, ob wirklich splittet, oder return !
// ???????????????????????????????
- USHORT nOldEnd = pAttr->GetEnd();
+ sal_uInt16 nOldEnd = pAttr->GetEnd();
pAttr->GetEnd() = nStart;
pAttr = MakeCharAttrib( *pCurPool, *(pAttr->GetItem()), nStart, nOldEnd );
pNode->GetCharAttribs().InsertAttrib( pAttr );
@@ -922,12 +922,12 @@ void TextDoc::InsertAttrib( TextNode* pNode, USHORT nStart, USHORT nEnd, const S
#pragma SEG_FUNCDEF(editdoc_41)
-void TextDoc::FindAttribs( TextNode* pNode, USHORT nStartPos, USHORT nEndPos, SfxItemSet& rCurSet )
+void TextDoc::FindAttribs( TextNode* pNode, sal_uInt16 nStartPos, sal_uInt16 nEndPos, SfxItemSet& rCurSet )
{
DBG_ASSERT( pNode, "Wo soll ich suchen ?" );
DBG_ASSERT( nStartPos <= nEndPos, "Ungueltiger Bereich!" );
- USHORT nAttr = 0;
+ sal_uInt16 nAttr = 0;
TextCharAttrib* pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
// keine Selection...
if ( nStartPos == nEndPos )
@@ -961,7 +961,7 @@ void TextDoc::FindAttribs( TextNode* pNode, USHORT nStartPos, USHORT nEndPos, Sf
if ( pItem )
{
- USHORT nWhich = pItem->Which();
+ sal_uInt16 nWhich = pItem->Which();
if ( rCurSet.GetItemState( nWhich ) == SFX_ITEM_OFF )
{
rCurSet.Put( *pItem );
@@ -1020,7 +1020,7 @@ void TextDoc::FindAttribs( TextNode* pNode, USHORT nStartPos, USHORT nEndPos, Sf
if ( pItem )
{
- USHORT nWhich = pItem->Which();
+ sal_uInt16 nWhich = pItem->Which();
if ( rCurSet.GetItemState( nWhich ) == SFX_ITEM_OFF )
{
rCurSet.Put( *pItem );
diff --git a/svtools/source/edit/textdoc.hxx b/svtools/source/edit/textdoc.hxx
index 258f821beb19..44ae2371a181 100644
--- a/svtools/source/edit/textdoc.hxx
+++ b/svtools/source/edit/textdoc.hxx
@@ -42,7 +42,7 @@ SV_DECL_PTRARR_DEL( TextCharAttribs, TextCharAttribPtr, 0, 4 )
class TextCharAttribList : private TextCharAttribs
{
private:
- BOOL mbHasEmptyAttribs;
+ sal_Bool mbHasEmptyAttribs;
TextCharAttribList( const TextCharAttribList& ) : TextCharAttribs() {}
@@ -50,28 +50,28 @@ public:
TextCharAttribList();
~TextCharAttribList();
- void Clear( BOOL bDestroyAttribs );
- USHORT Count() const { return TextCharAttribs::Count(); }
+ void Clear( sal_Bool bDestroyAttribs );
+ sal_uInt16 Count() const { return TextCharAttribs::Count(); }
- TextCharAttrib* GetAttrib( USHORT n ) const { return TextCharAttribs::GetObject( n ); }
- void RemoveAttrib( USHORT n ) { TextCharAttribs::Remove( n, 1 ); }
+ TextCharAttrib* GetAttrib( sal_uInt16 n ) const { return TextCharAttribs::GetObject( n ); }
+ void RemoveAttrib( sal_uInt16 n ) { TextCharAttribs::Remove( n, 1 ); }
void InsertAttrib( TextCharAttrib* pAttrib );
void DeleteEmptyAttribs();
void ResortAttribs();
- BOOL HasEmptyAttribs() const { return mbHasEmptyAttribs; }
- BOOL& HasEmptyAttribs() { return mbHasEmptyAttribs; }
+ sal_Bool HasEmptyAttribs() const { return mbHasEmptyAttribs; }
+ sal_Bool& HasEmptyAttribs() { return mbHasEmptyAttribs; }
- TextCharAttrib* FindAttrib( USHORT nWhich, USHORT nPos );
- TextCharAttrib* FindNextAttrib( USHORT nWhich, USHORT nFromPos, USHORT nMaxPos = 0xFFFF ) const;
- TextCharAttrib* FindEmptyAttrib( USHORT nWhich, USHORT nPos );
- BOOL HasAttrib( USHORT nWhich ) const;
- BOOL HasBoundingAttrib( USHORT nBound );
+ TextCharAttrib* FindAttrib( sal_uInt16 nWhich, sal_uInt16 nPos );
+ TextCharAttrib* FindNextAttrib( sal_uInt16 nWhich, sal_uInt16 nFromPos, sal_uInt16 nMaxPos = 0xFFFF ) const;
+ TextCharAttrib* FindEmptyAttrib( sal_uInt16 nWhich, sal_uInt16 nPos );
+ sal_Bool HasAttrib( sal_uInt16 nWhich ) const;
+ sal_Bool HasBoundingAttrib( sal_uInt16 nBound );
#ifdef DBG_UTIL
- BOOL DbgCheckAttribs();
+ sal_Bool DbgCheckAttribs();
#endif
};
@@ -84,8 +84,8 @@ private:
TextNode( const TextNode& ) {;}
protected:
- void ExpandAttribs( USHORT nIndex, USHORT nNewChars );
- void CollapsAttribs( USHORT nIndex, USHORT nDelChars );
+ void ExpandAttribs( sal_uInt16 nIndex, sal_uInt16 nNewChars );
+ void CollapsAttribs( sal_uInt16 nIndex, sal_uInt16 nDelChars );
public:
TextNode( const String& rText );
@@ -96,11 +96,11 @@ public:
const TextCharAttribList& GetCharAttribs() const { return maCharAttribs; }
TextCharAttribList& GetCharAttribs() { return maCharAttribs; }
- void InsertText( USHORT nPos, const String& rText );
- void InsertText( USHORT nPos, sal_Unicode c );
- void RemoveText( USHORT nPos, USHORT nChars );
+ void InsertText( sal_uInt16 nPos, const String& rText );
+ void InsertText( sal_uInt16 nPos, sal_Unicode c );
+ void RemoveText( sal_uInt16 nPos, sal_uInt16 nChars );
- TextNode* Split( USHORT nPos, BOOL bKeepEndigAttribs );
+ TextNode* Split( sal_uInt16 nPos, sal_Bool bKeepEndigAttribs );
void Append( const TextNode& rNode );
};
@@ -108,7 +108,7 @@ class TextDoc
{
private:
ToolsList<TextNode*> maTextNodes;
- USHORT mnLeftMargin;
+ sal_uInt16 mnLeftMargin;
protected:
void DestroyTextNodes();
@@ -122,27 +122,27 @@ public:
ToolsList<TextNode*>& GetNodes() { return maTextNodes; }
const ToolsList<TextNode*>& GetNodes() const { return maTextNodes; }
- TextPaM RemoveChars( const TextPaM& rPaM, USHORT nChars );
+ TextPaM RemoveChars( const TextPaM& rPaM, sal_uInt16 nChars );
TextPaM InsertText( const TextPaM& rPaM, sal_Unicode c );
TextPaM InsertText( const TextPaM& rPaM, const String& rStr );
- TextPaM InsertParaBreak( const TextPaM& rPaM, BOOL bKeepEndingAttribs );
+ TextPaM InsertParaBreak( const TextPaM& rPaM, sal_Bool bKeepEndingAttribs );
TextPaM ConnectParagraphs( TextNode* pLeft, TextNode* pRight );
- ULONG GetTextLen( const sal_Unicode* pSep, const TextSelection* pSel = NULL ) const;
+ sal_uLong GetTextLen( const sal_Unicode* pSep, const TextSelection* pSel = NULL ) const;
String GetText( const sal_Unicode* pSep ) const;
- String GetText( ULONG nPara ) const;
+ String GetText( sal_uLong nPara ) const;
- void SetLeftMargin( USHORT n ) { mnLeftMargin = n; }
- USHORT GetLeftMargin() const { return mnLeftMargin; }
+ void SetLeftMargin( sal_uInt16 n ) { mnLeftMargin = n; }
+ sal_uInt16 GetLeftMargin() const { return mnLeftMargin; }
-// BOOL RemoveAttribs( TextNode* pNode, USHORT nStart, USHORT nEnd ), USHORT nWhich = 0 );
-// BOOL RemoveAttribs( TextNode* pNode, USHORT nStart, USHORT nEnd, TextCharAttrib*& rpStarting, TextCharAttrib*& rpEnding, USHORT nWhich = 0 );
+// sal_Bool RemoveAttribs( TextNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd ), sal_uInt16 nWhich = 0 );
+// sal_Bool RemoveAttribs( TextNode* pNode, sal_uInt16 nStart, sal_uInt16 nEnd, TextCharAttrib*& rpStarting, TextCharAttrib*& rpEnding, sal_uInt16 nWhich = 0 );
// void InsertAttrib( const EditCharAttrib* pAttr );
// void InsertAttribInSelection( const EditCharAttrib* pAttr );
-// void FindAttribs( TextNode* pNode, USHORT nStartPos, USHORT nEndPos, SfxItemSet& rCurSet );
+// void FindAttribs( TextNode* pNode, sal_uInt16 nStartPos, sal_uInt16 nEndPos, SfxItemSet& rCurSet );
- BOOL IsValidPaM( const TextPaM& rPaM );
+ sal_Bool IsValidPaM( const TextPaM& rPaM );
};
#endif // _TEXTDOC_HXX
diff --git a/svtools/source/edit/texteng.cxx b/svtools/source/edit/texteng.cxx
index e0e136089d78..38ff8852c777 100644
--- a/svtools/source/edit/texteng.cxx
+++ b/svtools/source/edit/texteng.cxx
@@ -81,8 +81,8 @@ typedef TextView* TextViewPtr;
SV_DECL_PTRARR( TextViews, TextViewPtr, 0, 1 )
// SV_IMPL_PTRARR( TextViews, TextViewPtr );
-SV_DECL_VARARR_SORT( TESortedPositions, ULONG, 16, 8 )
-SV_IMPL_VARARR_SORT( TESortedPositions, ULONG )
+SV_DECL_VARARR_SORT( TESortedPositions, sal_uLong, 16, 8 )
+SV_IMPL_VARARR_SORT( TESortedPositions, sal_uLong )
#define RESDIFF 10
#define SCRLRANGE 20 // 1/20 der Breite/Hoehe scrollen, wenn im QueryDrop
@@ -99,15 +99,15 @@ TextEngine::TextEngine()
mpViews = new TextViews;
mpActiveView = NULL;
- mbIsFormatting = FALSE;
- mbFormatted = FALSE;
- mbUpdate = TRUE;
- mbModified = FALSE;
- mbUndoEnabled = FALSE;
- mbIsInUndo = FALSE;
- mbDowning = FALSE;
- mbRightToLeft = FALSE;
- mbHasMultiLineParas = FALSE;
+ mbIsFormatting = sal_False;
+ mbFormatted = sal_False;
+ mbUpdate = sal_True;
+ mbModified = sal_False;
+ mbUndoEnabled = sal_False;
+ mbIsInUndo = sal_False;
+ mbDowning = sal_False;
+ mbRightToLeft = sal_False;
+ mbHasMultiLineParas = sal_False;
meAlign = TXTALIGN_LEFT;
@@ -131,7 +131,7 @@ TextEngine::TextEngine()
maTextColor = COL_BLACK;
Font aFont;
- aFont.SetTransparent( FALSE );
+ aFont.SetTransparent( sal_False );
Color aFillColor( aFont.GetFillColor() );
aFillColor.SetTransparency( 0 );
aFont.SetFillColor( aFillColor );
@@ -140,7 +140,7 @@ TextEngine::TextEngine()
TextEngine::~TextEngine()
{
- mbDowning = TRUE;
+ mbDowning = sal_True;
delete mpIdleFormatter;
delete mpDoc;
@@ -163,7 +163,7 @@ void TextEngine::InsertView( TextView* pTextView )
void TextEngine::RemoveView( TextView* pTextView )
{
- USHORT nPos = mpViews->GetPos( pTextView );
+ sal_uInt16 nPos = mpViews->GetPos( pTextView );
if( nPos != USHRT_MAX )
{
pTextView->HideCursor();
@@ -173,12 +173,12 @@ void TextEngine::RemoveView( TextView* pTextView )
}
}
-USHORT TextEngine::GetViewCount() const
+sal_uInt16 TextEngine::GetViewCount() const
{
return mpViews->Count();
}
-TextView* TextEngine::GetView( USHORT nView ) const
+TextView* TextEngine::GetView( sal_uInt16 nView ) const
{
return mpViews->GetObject( nView );
}
@@ -217,7 +217,7 @@ void TextEngine::SetFont( const Font& rFont )
// Wegen Selektion keinen Transparenten Font zulassen...
// (Sonst spaeter in ImplPaint den Hintergrund anders loeschen...)
- maFont.SetTransparent( FALSE );
+ maFont.SetTransparent( sal_False );
// Tell VCL not to use the font color, use text color from OutputDevice
maFont.SetColor( COL_TRANSPARENT );
Color aFillColor( maFont.GetFillColor() );
@@ -232,10 +232,10 @@ void TextEngine::SetFont( const Font& rFont )
if ( !aTextSize.Width() )
aTextSize.Width() = mpRefDev->GetTextWidth( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "XXXX" ) ) );
- mnDefTab = (USHORT)aTextSize.Width();
+ mnDefTab = (sal_uInt16)aTextSize.Width();
if ( !mnDefTab )
mnDefTab = 1;
- mnCharHeight = (USHORT)aTextSize.Height();
+ mnCharHeight = (sal_uInt16)aTextSize.Height();
/*
// #93746# Doesn't work with CJK HalfWidth/FullWidth
FontMetric aRealFont( mpRefDev->GetFontMetric() );
@@ -243,7 +243,7 @@ void TextEngine::SetFont( const Font& rFont )
{
String aX100;
aX100.Fill( 100, 'X' );
- mnFixCharWidth100 = (USHORT)mpRefDev->GetTextWidth( aX100 );
+ mnFixCharWidth100 = (sal_uInt16)mpRefDev->GetTextWidth( aX100 );
}
else
*/
@@ -252,7 +252,7 @@ void TextEngine::SetFont( const Font& rFont )
FormatFullDoc();
UpdateViews();
- for ( USHORT nView = mpViews->Count(); nView; )
+ for ( sal_uInt16 nView = mpViews->Count(); nView; )
{
TextView* pView = mpViews->GetObject( --nView );
pView->GetWindow()->SetInputContext( InputContext( GetFont(), !pView->IsReadOnly() ? INPUTCONTEXT_TEXT|INPUTCONTEXT_EXTTEXTINPUT : 0 ) );
@@ -260,22 +260,22 @@ void TextEngine::SetFont( const Font& rFont )
}
}
-void TextEngine::SetDefTab( USHORT nDefTab )
+void TextEngine::SetDefTab( sal_uInt16 nDefTab )
{
mnDefTab = nDefTab;
// evtl neu setzen?
}
-void TextEngine::SetMaxTextLen( ULONG nLen )
+void TextEngine::SetMaxTextLen( sal_uLong nLen )
{
mnMaxTextLen = nLen;
}
-void TextEngine::SetMaxTextWidth( ULONG nMaxWidth )
+void TextEngine::SetMaxTextWidth( sal_uLong nMaxWidth )
{
if ( nMaxWidth != mnMaxTextWidth )
{
- mnMaxTextWidth = Min( nMaxWidth, (ULONG)0x7FFFFFFF );
+ mnMaxTextWidth = Min( nMaxWidth, (sal_uLong)0x7FFFFFFF );
FormatFullDoc();
UpdateViews();
}
@@ -311,14 +311,14 @@ String TextEngine::GetText( LineEnd aSeparator ) const
String TextEngine::GetTextLines( LineEnd aSeparator ) const
{
String aText;
- ULONG nParas = mpTEParaPortions->Count();
+ sal_uLong nParas = mpTEParaPortions->Count();
const sal_Unicode* pSep = static_getLineEndText( aSeparator );
- for ( ULONG nP = 0; nP < nParas; nP++ )
+ for ( sal_uLong nP = 0; nP < nParas; nP++ )
{
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nP );
- USHORT nLines = pTEParaPortion->GetLines().Count();
- for ( USHORT nL = 0; nL < nLines; nL++ )
+ sal_uInt16 nLines = pTEParaPortion->GetLines().Count();
+ for ( sal_uInt16 nL = 0; nL < nLines; nL++ )
{
TextLine* pLine = pTEParaPortion->GetLines()[nL];
aText += pTEParaPortion->GetNode()->GetText().Copy( pLine->GetStart(), pLine->GetEnd() - pLine->GetStart() );
@@ -329,17 +329,17 @@ String TextEngine::GetTextLines( LineEnd aSeparator ) const
return aText;
}
-String TextEngine::GetText( ULONG nPara ) const
+String TextEngine::GetText( sal_uLong nPara ) const
{
return mpDoc->GetText( nPara );
}
-ULONG TextEngine::GetTextLen( LineEnd aSeparator ) const
+sal_uLong TextEngine::GetTextLen( LineEnd aSeparator ) const
{
return mpDoc->GetTextLen( static_getLineEndText( aSeparator ) );
}
-ULONG TextEngine::GetTextLen( const TextSelection& rSel, LineEnd aSeparator ) const
+sal_uLong TextEngine::GetTextLen( const TextSelection& rSel, LineEnd aSeparator ) const
{
TextSelection aSel( rSel );
aSel.Justify();
@@ -347,12 +347,12 @@ ULONG TextEngine::GetTextLen( const TextSelection& rSel, LineEnd aSeparator ) co
return mpDoc->GetTextLen( static_getLineEndText( aSeparator ), &aSel );
}
-USHORT TextEngine::GetTextLen( ULONG nPara ) const
+sal_uInt16 TextEngine::GetTextLen( sal_uLong nPara ) const
{
return mpDoc->GetNodes().GetObject( nPara )->GetText().Len();
}
-void TextEngine::SetUpdateMode( BOOL bUpdate )
+void TextEngine::SetUpdateMode( sal_Bool bUpdate )
{
if ( bUpdate != mbUpdate )
{
@@ -366,9 +366,9 @@ void TextEngine::SetUpdateMode( BOOL bUpdate )
}
}
-BOOL TextEngine::DoesKeyMoveCursor( const KeyEvent& rKeyEvent )
+sal_Bool TextEngine::DoesKeyMoveCursor( const KeyEvent& rKeyEvent )
{
- BOOL bDoesMove = FALSE;
+ sal_Bool bDoesMove = sal_False;
switch ( rKeyEvent.GetKeyCode().GetCode() )
{
@@ -382,16 +382,16 @@ BOOL TextEngine::DoesKeyMoveCursor( const KeyEvent& rKeyEvent )
case KEY_PAGEDOWN:
{
if ( !rKeyEvent.GetKeyCode().IsMod2() )
- bDoesMove = TRUE;
+ bDoesMove = sal_True;
}
break;
}
return bDoesMove;
}
-BOOL TextEngine::DoesKeyChangeText( const KeyEvent& rKeyEvent )
+sal_Bool TextEngine::DoesKeyChangeText( const KeyEvent& rKeyEvent )
{
- BOOL bDoesChange = FALSE;
+ sal_Bool bDoesChange = sal_False;
KeyFuncType eFunc = rKeyEvent.GetKeyCode().GetFunction();
if ( eFunc != KEYFUNC_DONTKNOW )
@@ -401,7 +401,7 @@ BOOL TextEngine::DoesKeyChangeText( const KeyEvent& rKeyEvent )
case KEYFUNC_UNDO:
case KEYFUNC_REDO:
case KEYFUNC_CUT:
- case KEYFUNC_PASTE: bDoesChange = TRUE;
+ case KEYFUNC_PASTE: bDoesChange = sal_True;
break;
default: // wird dann evtl. unten bearbeitet.
eFunc = KEYFUNC_DONTKNOW;
@@ -415,14 +415,14 @@ BOOL TextEngine::DoesKeyChangeText( const KeyEvent& rKeyEvent )
case KEY_BACKSPACE:
{
if ( !rKeyEvent.GetKeyCode().IsMod2() )
- bDoesChange = TRUE;
+ bDoesChange = sal_True;
}
break;
case KEY_RETURN:
case KEY_TAB:
{
if ( !rKeyEvent.GetKeyCode().IsMod1() && !rKeyEvent.GetKeyCode().IsMod2() )
- bDoesChange = TRUE;
+ bDoesChange = sal_True;
}
break;
default:
@@ -434,15 +434,15 @@ BOOL TextEngine::DoesKeyChangeText( const KeyEvent& rKeyEvent )
return bDoesChange;
}
-BOOL TextEngine::IsSimpleCharInput( const KeyEvent& rKeyEvent )
+sal_Bool TextEngine::IsSimpleCharInput( const KeyEvent& rKeyEvent )
{
if( rKeyEvent.GetCharCode() >= 32 && rKeyEvent.GetCharCode() != 127 &&
KEY_MOD1 != (rKeyEvent.GetKeyCode().GetModifier() & ~KEY_SHIFT) && // (ssa) #i45714#:
KEY_MOD2 != (rKeyEvent.GetKeyCode().GetModifier() & ~KEY_SHIFT) ) // check for Ctrl and Alt separately
{
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
void TextEngine::ImpInitDoc()
@@ -459,9 +459,9 @@ void TextEngine::ImpInitDoc()
mpDoc->GetNodes().Insert( pNode, 0 );
TEParaPortion* pIniPortion = new TEParaPortion( pNode );
- mpTEParaPortions->Insert( pIniPortion, (ULONG)0 );
+ mpTEParaPortions->Insert( pIniPortion, (sal_uLong)0 );
- mbFormatted = FALSE;
+ mbFormatted = sal_False;
ImpParagraphRemoved( TEXT_PARA_ALL );
ImpParagraphInserted( 0 );
@@ -477,15 +477,15 @@ String TextEngine::GetText( const TextSelection& rSel, LineEnd aSeparator ) cons
TextSelection aSel( rSel );
aSel.Justify();
- ULONG nStartPara = aSel.GetStart().GetPara();
- ULONG nEndPara = aSel.GetEnd().GetPara();
+ sal_uLong nStartPara = aSel.GetStart().GetPara();
+ sal_uLong nEndPara = aSel.GetEnd().GetPara();
const sal_Unicode* pSep = static_getLineEndText( aSeparator );
- for ( ULONG nNode = aSel.GetStart().GetPara(); nNode <= nEndPara; nNode++ )
+ for ( sal_uLong nNode = aSel.GetStart().GetPara(); nNode <= nEndPara; nNode++ )
{
TextNode* pNode = mpDoc->GetNodes().GetObject( nNode );
- USHORT nStartPos = 0;
- USHORT nEndPos = pNode->GetText().Len();
+ sal_uInt16 nStartPos = 0;
+ sal_uInt16 nEndPos = pNode->GetText().Len();
if ( nNode == nStartPara )
nStartPos = aSel.GetStart().GetIndex();
if ( nNode == nEndPara ) // kann auch == nStart sein!
@@ -504,7 +504,7 @@ void TextEngine::ImpRemoveText()
TextPaM aStartPaM( 0, 0 );
TextSelection aEmptySel( aStartPaM, aStartPaM );
- for ( USHORT nView = 0; nView < mpViews->Count(); nView++ )
+ for ( sal_uInt16 nView = 0; nView < mpViews->Count(); nView++ )
{
TextView* pView = mpViews->GetObject( nView );
pView->ImpSetSelection( aEmptySel );
@@ -516,9 +516,9 @@ void TextEngine::SetText( const XubString& rText )
{
ImpRemoveText();
- BOOL bUndoCurrentlyEnabled = IsUndoEnabled();
+ sal_Bool bUndoCurrentlyEnabled = IsUndoEnabled();
// Der von Hand reingesteckte Text kann nicht vom Anwender rueckgaengig gemacht werden.
- EnableUndo( FALSE );
+ EnableUndo( sal_False );
TextPaM aStartPaM( 0, 0 );
TextSelection aEmptySel( aStartPaM, aStartPaM );
@@ -527,7 +527,7 @@ void TextEngine::SetText( const XubString& rText )
if ( rText.Len() )
aPaM = ImpInsertText( aEmptySel, rText );
- for ( USHORT nView = 0; nView < mpViews->Count(); nView++ )
+ for ( sal_uInt16 nView = 0; nView < mpViews->Count(); nView++ )
{
TextView* pView = mpViews->GetObject( nView );
pView->ImpSetSelection( aEmptySel );
@@ -548,7 +548,7 @@ void TextEngine::SetText( const XubString& rText )
}
-void TextEngine::CursorMoved( ULONG nNode )
+void TextEngine::CursorMoved( sal_uLong nNode )
{
// Leere Attribute loeschen, aber nur, wenn Absatz nicht leer!
TextNode* pNode = mpDoc->GetNodes().GetObject( nNode );
@@ -556,7 +556,7 @@ void TextEngine::CursorMoved( ULONG nNode )
pNode->GetCharAttribs().DeleteEmptyAttribs();
}
-void TextEngine::ImpRemoveChars( const TextPaM& rPaM, USHORT nChars, SfxUndoAction* )
+void TextEngine::ImpRemoveChars( const TextPaM& rPaM, sal_uInt16 nChars, SfxUndoAction* )
{
DBG_ASSERT( nChars, "ImpRemoveChars - 0 Chars?!" );
if ( IsUndoEnabled() && !IsInUndo() )
@@ -566,9 +566,9 @@ void TextEngine::ImpRemoveChars( const TextPaM& rPaM, USHORT nChars, SfxUndoActi
XubString aStr( pNode->GetText().Copy( rPaM.GetIndex(), nChars ) );
// Pruefen, ob Attribute geloescht oder geaendert werden:
- USHORT nStart = rPaM.GetIndex();
- USHORT nEnd = nStart + nChars;
- for ( USHORT nAttr = pNode->GetCharAttribs().Count(); nAttr; )
+ sal_uInt16 nStart = rPaM.GetIndex();
+ sal_uInt16 nEnd = nStart + nChars;
+ for ( sal_uInt16 nAttr = pNode->GetCharAttribs().Count(); nAttr; )
{
TextCharAttrib* pAttr = pNode->GetCharAttribs().GetAttrib( --nAttr );
if ( ( pAttr->GetEnd() >= nStart ) && ( pAttr->GetStart() < nEnd ) )
@@ -590,7 +590,7 @@ void TextEngine::ImpRemoveChars( const TextPaM& rPaM, USHORT nChars, SfxUndoActi
ImpCharsRemoved( rPaM.GetPara(), rPaM.GetIndex(), nChars );
}
-TextPaM TextEngine::ImpConnectParagraphs( ULONG nLeft, ULONG nRight )
+TextPaM TextEngine::ImpConnectParagraphs( sal_uLong nLeft, sal_uLong nRight )
{
DBG_ASSERT( nLeft != nRight, "Den gleichen Absatz zusammenfuegen ?" );
@@ -634,11 +634,11 @@ TextPaM TextEngine::ImpDeleteText( const TextSelection& rSel )
DBG_ASSERT( mpDoc->IsValidPaM( aStartPaM ), "Index im Wald in ImpDeleteText" );
DBG_ASSERT( mpDoc->IsValidPaM( aEndPaM ), "Index im Wald in ImpDeleteText" );
- ULONG nStartNode = aStartPaM.GetPara();
- ULONG nEndNode = aEndPaM.GetPara();
+ sal_uLong nStartNode = aStartPaM.GetPara();
+ sal_uLong nEndNode = aEndPaM.GetPara();
// Alle Nodes dazwischen entfernen....
- for ( ULONG z = nStartNode+1; z < nEndNode; z++ )
+ for ( sal_uLong z = nStartNode+1; z < nEndNode; z++ )
{
// Immer nStartNode+1, wegen Remove()!
ImpRemoveParagraph( nStartNode+1 );
@@ -648,7 +648,7 @@ TextPaM TextEngine::ImpDeleteText( const TextSelection& rSel )
{
// Den Rest des StartNodes...
TextNode* pLeft = mpDoc->GetNodes().GetObject( nStartNode );
- USHORT nChars = pLeft->GetText().Len() - aStartPaM.GetIndex();
+ sal_uInt16 nChars = pLeft->GetText().Len() - aStartPaM.GetIndex();
if ( nChars )
{
ImpRemoveChars( aStartPaM, nChars );
@@ -675,7 +675,7 @@ TextPaM TextEngine::ImpDeleteText( const TextSelection& rSel )
}
else
{
- USHORT nChars;
+ sal_uInt16 nChars;
nChars = aEndPaM.GetIndex() - aStartPaM.GetIndex();
ImpRemoveChars( aStartPaM, nChars );
TEParaPortion* pPortion = mpTEParaPortions->GetObject( nStartNode );
@@ -688,7 +688,7 @@ TextPaM TextEngine::ImpDeleteText( const TextSelection& rSel )
return aStartPaM;
}
-void TextEngine::ImpRemoveParagraph( ULONG nPara )
+void TextEngine::ImpRemoveParagraph( sal_uLong nPara )
{
TextNode* pNode = mpDoc->GetNodes().GetObject( nPara );
TEParaPortion* pPortion = mpTEParaPortions->GetObject( nPara );
@@ -722,14 +722,14 @@ uno::Reference < i18n::XExtendedInputSequenceChecker > TextEngine::GetInputSeque
return xISC;
}
-BOOL TextEngine::IsInputSequenceCheckingRequired( sal_Unicode c, const TextSelection& rCurSel ) const
+sal_Bool TextEngine::IsInputSequenceCheckingRequired( sal_Unicode c, const TextSelection& rCurSel ) const
{
uno::Reference< i18n::XBreakIterator > xBI = ((TextEngine *) this)->GetBreakIterator();
SvtCTLOptions aCTLOptions;
// get the index that really is first
- USHORT nFirstPos = rCurSel.GetStart().GetIndex();
- USHORT nMaxPos = rCurSel.GetEnd().GetIndex();
+ sal_uInt16 nFirstPos = rCurSel.GetStart().GetIndex();
+ sal_uInt16 nMaxPos = rCurSel.GetEnd().GetIndex();
if (nMaxPos < nFirstPos)
nFirstPos = nMaxPos;
@@ -742,12 +742,12 @@ BOOL TextEngine::IsInputSequenceCheckingRequired( sal_Unicode c, const TextSelec
return bIsSequenceChecking;
}
-TextPaM TextEngine::ImpInsertText( const TextSelection& rCurSel, sal_Unicode c, BOOL bOverwrite )
+TextPaM TextEngine::ImpInsertText( const TextSelection& rCurSel, sal_Unicode c, sal_Bool bOverwrite )
{
return ImpInsertText( c, rCurSel, bOverwrite, sal_False );
}
-TextPaM TextEngine::ImpInsertText( sal_Unicode c, const TextSelection& rCurSel, BOOL bOverwrite, BOOL bIsUserInput )
+TextPaM TextEngine::ImpInsertText( sal_Unicode c, const TextSelection& rCurSel, sal_Bool bOverwrite, sal_Bool bIsUserInput )
{
DBG_ASSERT( c != '\n', "Zeilenumbruch bei InsertText ?" );
DBG_ASSERT( c != '\r', "Zeilenumbruch bei InsertText ?" );
@@ -757,13 +757,13 @@ TextPaM TextEngine::ImpInsertText( sal_Unicode c, const TextSelection& rCurSel,
if ( pNode->GetText().Len() < STRING_MAXLEN )
{
- BOOL bDoOverwrite = ( bOverwrite &&
- ( aPaM.GetIndex() < pNode->GetText().Len() ) ) ? TRUE : FALSE;
+ sal_Bool bDoOverwrite = ( bOverwrite &&
+ ( aPaM.GetIndex() < pNode->GetText().Len() ) ) ? sal_True : sal_False;
- BOOL bUndoAction = ( rCurSel.HasRange() || bDoOverwrite );
+ sal_Bool bUndoAction = ( rCurSel.HasRange() || bDoOverwrite );
if ( bUndoAction )
- UndoActionStart( TEXTUNDO_INSERT );
+ UndoActionStart();
if ( rCurSel.HasRange() )
{
@@ -810,7 +810,7 @@ TextPaM TextEngine::ImpInsertText( sal_Unicode c, const TextSelection& rCurSel,
String aChgText( aNewText.copy( nChgPos ), nChgLen );
// select text from first pos to be changed to current pos
- TextSelection aSel( TextPaM( aPaM.GetPara(), (USHORT) nChgPos ), aPaM );
+ TextSelection aSel( TextPaM( aPaM.GetPara(), (sal_uInt16) nChgPos ), aPaM );
if (aChgText.Len())
// ImpInsertText implicitly handles undo...
@@ -833,7 +833,7 @@ TextPaM TextEngine::ImpInsertText( sal_Unicode c, const TextSelection& rCurSel,
if ( IsUndoEnabled() && !IsInUndo() )
{
TextUndoInsertChars* pNewUndo = new TextUndoInsertChars( this, aPaM, c );
- BOOL bTryMerge = ( !bDoOverwrite && ( c != ' ' ) ) ? TRUE : FALSE;
+ sal_Bool bTryMerge = ( !bDoOverwrite && ( c != ' ' ) ) ? sal_True : sal_False;
InsertUndo( pNewUndo, bTryMerge );
}
@@ -847,7 +847,7 @@ TextPaM TextEngine::ImpInsertText( sal_Unicode c, const TextSelection& rCurSel,
TextModified();
if ( bUndoAction )
- UndoActionEnd( TEXTUNDO_INSERT );
+ UndoActionEnd();
}
return aPaM;
@@ -856,7 +856,7 @@ TextPaM TextEngine::ImpInsertText( sal_Unicode c, const TextSelection& rCurSel,
TextPaM TextEngine::ImpInsertText( const TextSelection& rCurSel, const XubString& rStr )
{
- UndoActionStart( TEXTUNDO_INSERT );
+ UndoActionStart();
TextPaM aPaM;
@@ -868,21 +868,21 @@ TextPaM TextEngine::ImpInsertText( const TextSelection& rCurSel, const XubString
XubString aText( rStr );
aText.ConvertLineEnd( LINEEND_LF );
- USHORT nStart = 0;
+ sal_uInt16 nStart = 0;
while ( nStart < aText.Len() )
{
- USHORT nEnd = aText.Search( LINE_SEP, nStart );
+ sal_uInt16 nEnd = aText.Search( LINE_SEP, nStart );
if ( nEnd == STRING_NOTFOUND )
nEnd = aText.Len(); // nicht dereferenzieren!
// Start == End => Leerzeile
if ( nEnd > nStart )
{
- ULONG nL = aPaM.GetIndex();
+ sal_uLong nL = aPaM.GetIndex();
nL += ( nEnd-nStart );
if ( nL > STRING_MAXLEN )
{
- USHORT nDiff = (USHORT) (nL-STRING_MAXLEN);
+ sal_uInt16 nDiff = (sal_uInt16) (nL-STRING_MAXLEN);
nEnd = nEnd - nDiff;
}
@@ -908,13 +908,13 @@ TextPaM TextEngine::ImpInsertText( const TextSelection& rCurSel, const XubString
break;
}
- UndoActionEnd( TEXTUNDO_INSERT );
+ UndoActionEnd();
TextModified();
return aPaM;
}
-TextPaM TextEngine::ImpInsertParaBreak( const TextSelection& rCurSel, BOOL bKeepEndingAttribs )
+TextPaM TextEngine::ImpInsertParaBreak( const TextSelection& rCurSel, sal_Bool bKeepEndingAttribs )
{
TextPaM aPaM;
if ( rCurSel.HasRange() )
@@ -925,13 +925,13 @@ TextPaM TextEngine::ImpInsertParaBreak( const TextSelection& rCurSel, BOOL bKeep
return ImpInsertParaBreak( aPaM, bKeepEndingAttribs );
}
-TextPaM TextEngine::ImpInsertParaBreak( const TextPaM& rPaM, BOOL bKeepEndingAttribs )
+TextPaM TextEngine::ImpInsertParaBreak( const TextPaM& rPaM, sal_Bool bKeepEndingAttribs )
{
if ( IsUndoEnabled() && !IsInUndo() )
InsertUndo( new TextUndoSplitPara( this, rPaM.GetPara(), rPaM.GetIndex() ) );
TextNode* pNode = mpDoc->GetNodes().GetObject( rPaM.GetPara() );
- BOOL bFirstParaContentChanged = rPaM.GetIndex() < pNode->GetText().Len();
+ sal_Bool bFirstParaContentChanged = rPaM.GetIndex() < pNode->GetText().Len();
TextPaM aPaM( mpDoc->InsertParaBreak( rPaM, bKeepEndingAttribs ) );
@@ -953,9 +953,9 @@ TextPaM TextEngine::ImpInsertParaBreak( const TextPaM& rPaM, BOOL bKeepEndingAtt
return aPaM;
}
-Rectangle TextEngine::PaMtoEditCursor( const TextPaM& rPaM, BOOL bSpecial )
+Rectangle TextEngine::PaMtoEditCursor( const TextPaM& rPaM, sal_Bool bSpecial )
{
- DBG_ASSERT( GetUpdateMode(), "Darf bei Update=FALSE nicht erreicht werden: PaMtoEditCursor" );
+ DBG_ASSERT( GetUpdateMode(), "Darf bei Update=sal_False nicht erreicht werden: PaMtoEditCursor" );
Rectangle aEditCursor;
long nY = 0;
@@ -966,7 +966,7 @@ Rectangle TextEngine::PaMtoEditCursor( const TextPaM& rPaM, BOOL bSpecial )
}
else
{
- for ( ULONG nPortion = 0; nPortion < rPaM.GetPara(); nPortion++ )
+ for ( sal_uLong nPortion = 0; nPortion < rPaM.GetPara(); nPortion++ )
{
TEParaPortion* pPortion = mpTEParaPortions->GetObject(nPortion);
nY += pPortion->GetLines().Count() * mnCharHeight;
@@ -979,7 +979,7 @@ Rectangle TextEngine::PaMtoEditCursor( const TextPaM& rPaM, BOOL bSpecial )
return aEditCursor;
}
-Rectangle TextEngine::GetEditCursor( const TextPaM& rPaM, BOOL bSpecial, BOOL bPreferPortionStart )
+Rectangle TextEngine::GetEditCursor( const TextPaM& rPaM, sal_Bool bSpecial, sal_Bool bPreferPortionStart )
{
if ( !IsFormatted() && !IsFormatting() )
FormatAndUpdate();
@@ -1000,9 +1000,9 @@ Rectangle TextEngine::GetEditCursor( const TextPaM& rPaM, BOOL bSpecial, BOOL bP
*/
long nY = 0;
- USHORT nCurIndex = 0;
+ sal_uInt16 nCurIndex = 0;
TextLine* pLine = 0;
- for ( USHORT nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ )
+ for ( sal_uInt16 nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ )
{
TextLine* pTmpLine = pPortion->GetLines().GetObject( nLine );
if ( ( pTmpLine->GetStart() == rPaM.GetIndex() ) || ( pTmpLine->IsIn( rPaM.GetIndex(), bSpecial ) ) )
@@ -1036,21 +1036,21 @@ Rectangle TextEngine::GetEditCursor( const TextPaM& rPaM, BOOL bSpecial, BOOL bP
return aEditCursor;
}
-long TextEngine::ImpGetXPos( ULONG nPara, TextLine* pLine, USHORT nIndex, BOOL bPreferPortionStart )
+long TextEngine::ImpGetXPos( sal_uLong nPara, TextLine* pLine, sal_uInt16 nIndex, sal_Bool bPreferPortionStart )
{
DBG_ASSERT( ( nIndex >= pLine->GetStart() ) && ( nIndex <= pLine->GetEnd() ) , "ImpGetXPos muss richtig gerufen werden!" );
- BOOL bDoPreferPortionStart = bPreferPortionStart;
+ sal_Bool bDoPreferPortionStart = bPreferPortionStart;
// Assure that the portion belongs to this line:
if ( nIndex == pLine->GetStart() )
- bDoPreferPortionStart = TRUE;
+ bDoPreferPortionStart = sal_True;
else if ( nIndex == pLine->GetEnd() )
- bDoPreferPortionStart = FALSE;
+ bDoPreferPortionStart = sal_False;
TEParaPortion* pParaPortion = mpTEParaPortions->GetObject( nPara );
- USHORT nTextPortionStart = 0;
- USHORT nTextPortion = pParaPortion->GetTextPortions().FindPortion( nIndex, nTextPortionStart, bDoPreferPortionStart );
+ sal_uInt16 nTextPortionStart = 0;
+ sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( nIndex, nTextPortionStart, bDoPreferPortionStart );
DBG_ASSERT( ( nTextPortion >= pLine->GetStartPortion() ) && ( nTextPortion <= pLine->GetEndPortion() ), "GetXPos: Portion not in current line! " );
@@ -1081,7 +1081,7 @@ long TextEngine::ImpGetXPos( ULONG nPara, TextLine* pLine, USHORT nIndex, BOOL b
// nX += pNextPortion->GetWidth();
// End of the tab portion, use start of next for cursor pos
DBG_ASSERT( !bPreferPortionStart, "ImpGetXPos - How can we this tab portion here???" );
- nX = ImpGetXPos( nPara, pLine, nIndex, TRUE );
+ nX = ImpGetXPos( nPara, pLine, nIndex, sal_True );
}
}
@@ -1117,7 +1117,7 @@ long TextEngine::ImpGetXPos( ULONG nPara, TextLine* pLine, USHORT nIndex, BOOL b
return nX;
}
-const TextAttrib* TextEngine::FindAttrib( const TextPaM& rPaM, USHORT nWhich ) const
+const TextAttrib* TextEngine::FindAttrib( const TextPaM& rPaM, sal_uInt16 nWhich ) const
{
const TextAttrib* pAttr = NULL;
const TextCharAttrib* pCharAttr = FindCharAttrib( rPaM, nWhich );
@@ -1126,7 +1126,7 @@ const TextAttrib* TextEngine::FindAttrib( const TextPaM& rPaM, USHORT nWhich ) c
return pAttr;
}
-const TextCharAttrib* TextEngine::FindCharAttrib( const TextPaM& rPaM, USHORT nWhich ) const
+const TextCharAttrib* TextEngine::FindCharAttrib( const TextPaM& rPaM, sal_uInt16 nWhich ) const
{
const TextCharAttrib* pAttr = NULL;
TextNode* pNode = mpDoc->GetNodes().GetObject( rPaM.GetPara() );
@@ -1135,10 +1135,10 @@ const TextCharAttrib* TextEngine::FindCharAttrib( const TextPaM& rPaM, USHORT nW
return pAttr;
}
-BOOL TextEngine::HasAttrib( USHORT nWhich ) const
+sal_Bool TextEngine::HasAttrib( sal_uInt16 nWhich ) const
{
- BOOL bAttr = FALSE;
- for ( ULONG n = mpDoc->GetNodes().Count(); --n && !bAttr; )
+ sal_Bool bAttr = sal_False;
+ for ( sal_uLong n = mpDoc->GetNodes().Count(); --n && !bAttr; )
{
TextNode* pNode = mpDoc->GetNodes().GetObject( n );
bAttr = pNode->GetCharAttribs().HasAttrib( nWhich );
@@ -1146,12 +1146,12 @@ BOOL TextEngine::HasAttrib( USHORT nWhich ) const
return bAttr;
}
-TextPaM TextEngine::GetPaM( const Point& rDocPos, BOOL bSmart )
+TextPaM TextEngine::GetPaM( const Point& rDocPos, sal_Bool bSmart )
{
- DBG_ASSERT( GetUpdateMode(), "Darf bei Update=FALSE nicht erreicht werden: GetPaM" );
+ DBG_ASSERT( GetUpdateMode(), "Darf bei Update=sal_False nicht erreicht werden: GetPaM" );
long nY = 0;
- for ( ULONG nPortion = 0; nPortion < mpTEParaPortions->Count(); nPortion++ )
+ for ( sal_uLong nPortion = 0; nPortion < mpTEParaPortions->Count(); nPortion++ )
{
TEParaPortion* pPortion = mpTEParaPortions->GetObject( nPortion );
long nTmpHeight = pPortion->GetLines().Count() * mnCharHeight;
@@ -1169,21 +1169,21 @@ TextPaM TextEngine::GetPaM( const Point& rDocPos, BOOL bSmart )
}
// Nicht gefunden - Dann den letzten sichtbare...
- ULONG nLastNode = mpDoc->GetNodes().Count() - 1;
+ sal_uLong nLastNode = mpDoc->GetNodes().Count() - 1;
TextNode* pLast = mpDoc->GetNodes().GetObject( nLastNode );
return TextPaM( nLastNode, pLast->GetText().Len() );
}
-USHORT TextEngine::ImpFindIndex( ULONG nPortion, const Point& rPosInPara, BOOL bSmart )
+sal_uInt16 TextEngine::ImpFindIndex( sal_uLong nPortion, const Point& rPosInPara, sal_Bool bSmart )
{
DBG_ASSERT( IsFormatted(), "GetPaM: Nicht formatiert" );
TEParaPortion* pPortion = mpTEParaPortions->GetObject( nPortion );
- USHORT nCurIndex = 0;
+ sal_uInt16 nCurIndex = 0;
long nY = 0;
TextLine* pLine = 0;
- USHORT nLine;
+ sal_uInt16 nLine;
for ( nLine = 0; nLine < pPortion->GetLines().Count(); nLine++ )
{
TextLine* pTmpLine = pPortion->GetLines().GetObject( nLine );
@@ -1203,24 +1203,24 @@ USHORT TextEngine::ImpFindIndex( ULONG nPortion, const Point& rPosInPara, BOOL b
{
uno::Reference < i18n::XBreakIterator > xBI = GetBreakIterator();
sal_Int32 nCount = 1;
- nCurIndex = (USHORT)xBI->previousCharacters( pPortion->GetNode()->GetText(), nCurIndex, GetLocale(), i18n::CharacterIteratorMode::SKIPCELL, nCount, nCount );
+ nCurIndex = (sal_uInt16)xBI->previousCharacters( pPortion->GetNode()->GetText(), nCurIndex, GetLocale(), i18n::CharacterIteratorMode::SKIPCELL, nCount, nCount );
}
return nCurIndex;
}
-USHORT TextEngine::GetCharPos( ULONG nPortion, USHORT nLine, long nXPos, BOOL )
+sal_uInt16 TextEngine::GetCharPos( sal_uLong nPortion, sal_uInt16 nLine, long nXPos, sal_Bool )
{
TEParaPortion* pPortion = mpTEParaPortions->GetObject( nPortion );
TextLine* pLine = pPortion->GetLines().GetObject( nLine );
- USHORT nCurIndex = pLine->GetStart();
+ sal_uInt16 nCurIndex = pLine->GetStart();
long nTmpX = pLine->GetStartX();
if ( nXPos <= nTmpX )
return nCurIndex;
- for ( USHORT i = pLine->GetStartPortion(); i <= pLine->GetEndPortion(); i++ )
+ for ( sal_uInt16 i = pLine->GetStartPortion(); i <= pLine->GetEndPortion(); i++ )
{
TETextPortion* pTextPortion = pPortion->GetTextPortions().GetObject( i );
nTmpX += pTextPortion->GetWidth();
@@ -1248,9 +1248,9 @@ USHORT TextEngine::GetCharPos( ULONG nPortion, USHORT nLine, long nXPos, BOOL )
}
-ULONG TextEngine::GetTextHeight() const
+sal_uLong TextEngine::GetTextHeight() const
{
- DBG_ASSERT( GetUpdateMode(), "Sollte bei Update=FALSE nicht verwendet werden: GetTextHeight" );
+ DBG_ASSERT( GetUpdateMode(), "Sollte bei Update=sal_False nicht verwendet werden: GetTextHeight" );
if ( !IsFormatted() && !IsFormatting() )
((TextEngine*)this)->FormatAndUpdate();
@@ -1258,9 +1258,9 @@ ULONG TextEngine::GetTextHeight() const
return mnCurTextHeight;
}
-ULONG TextEngine::GetTextHeight( ULONG nParagraph ) const
+sal_uLong TextEngine::GetTextHeight( sal_uLong nParagraph ) const
{
- DBG_ASSERT( GetUpdateMode(), "Sollte bei Update=FALSE nicht verwendet werden: GetTextHeight" );
+ DBG_ASSERT( GetUpdateMode(), "Sollte bei Update=sal_False nicht verwendet werden: GetTextHeight" );
if ( !IsFormatted() && !IsFormatting() )
((TextEngine*)this)->FormatAndUpdate();
@@ -1268,15 +1268,15 @@ ULONG TextEngine::GetTextHeight( ULONG nParagraph ) const
return CalcParaHeight( nParagraph );
}
-ULONG TextEngine::CalcTextWidth( ULONG nPara )
+sal_uLong TextEngine::CalcTextWidth( sal_uLong nPara )
{
- ULONG nParaWidth = 0;
+ sal_uLong nParaWidth = 0;
TEParaPortion* pPortion = mpTEParaPortions->GetObject( nPara );
- for ( USHORT nLine = pPortion->GetLines().Count(); nLine; )
+ for ( sal_uInt16 nLine = pPortion->GetLines().Count(); nLine; )
{
- ULONG nLineWidth = 0;
+ sal_uLong nLineWidth = 0;
TextLine* pLine = pPortion->GetLines().GetObject( --nLine );
- for ( USHORT nTP = pLine->GetStartPortion(); nTP <= pLine->GetEndPortion(); nTP++ )
+ for ( sal_uInt16 nTP = pLine->GetStartPortion(); nTP <= pLine->GetEndPortion(); nTP++ )
{
TETextPortion* pTextPortion = pPortion->GetTextPortions().GetObject( nTP );
nLineWidth += pTextPortion->GetWidth();
@@ -1287,7 +1287,7 @@ ULONG TextEngine::CalcTextWidth( ULONG nPara )
return nParaWidth;
}
-ULONG TextEngine::CalcTextWidth()
+sal_uLong TextEngine::CalcTextWidth()
{
if ( !IsFormatted() && !IsFormatting() )
FormatAndUpdate();
@@ -1295,9 +1295,9 @@ ULONG TextEngine::CalcTextWidth()
if ( mnCurTextWidth == 0xFFFFFFFF )
{
mnCurTextWidth = 0;
- for ( ULONG nPara = mpTEParaPortions->Count(); nPara; )
+ for ( sal_uLong nPara = mpTEParaPortions->Count(); nPara; )
{
- ULONG nParaWidth = CalcTextWidth( --nPara );
+ sal_uLong nParaWidth = CalcTextWidth( --nPara );
if ( nParaWidth > mnCurTextWidth )
mnCurTextWidth = nParaWidth;
}
@@ -1305,25 +1305,25 @@ ULONG TextEngine::CalcTextWidth()
return mnCurTextWidth+1;// Ein breiter, da in CreateLines bei >= umgebrochen wird.
}
-ULONG TextEngine::CalcTextHeight()
+sal_uLong TextEngine::CalcTextHeight()
{
- DBG_ASSERT( GetUpdateMode(), "Sollte bei Update=FALSE nicht verwendet werden: CalcTextHeight" );
+ DBG_ASSERT( GetUpdateMode(), "Sollte bei Update=sal_False nicht verwendet werden: CalcTextHeight" );
- ULONG nY = 0;
- for ( ULONG nPortion = mpTEParaPortions->Count(); nPortion; )
+ sal_uLong nY = 0;
+ for ( sal_uLong nPortion = mpTEParaPortions->Count(); nPortion; )
nY += CalcParaHeight( --nPortion );
return nY;
}
-ULONG TextEngine::CalcTextWidth( ULONG nPara, USHORT nPortionStart, USHORT nLen, const Font* pFont )
+sal_uLong TextEngine::CalcTextWidth( sal_uLong nPara, sal_uInt16 nPortionStart, sal_uInt16 nLen, const Font* pFont )
{
// Innerhalb des Textes darf es keinen Portionwechsel (Attribut/Tab) geben!
DBG_ASSERT( mpDoc->GetNodes().GetObject( nPara )->GetText().Search( '\t', nPortionStart ) >= (nPortionStart+nLen), "CalcTextWidth: Tab!" );
- ULONG nWidth;
+ sal_uLong nWidth;
if ( mnFixCharWidth100 )
{
- nWidth = (ULONG)nLen*mnFixCharWidth100/100;
+ nWidth = (sal_uLong)nLen*mnFixCharWidth100/100;
}
else
{
@@ -1339,14 +1339,14 @@ ULONG TextEngine::CalcTextWidth( ULONG nPara, USHORT nPortionStart, USHORT nLen,
mpRefDev->SetFont( aFont );
}
TextNode* pNode = mpDoc->GetNodes().GetObject( nPara );
- nWidth = (ULONG)mpRefDev->GetTextWidth( pNode->GetText(), nPortionStart, nLen );
+ nWidth = (sal_uLong)mpRefDev->GetTextWidth( pNode->GetText(), nPortionStart, nLen );
}
return nWidth;
}
-USHORT TextEngine::GetLineCount( ULONG nParagraph ) const
+sal_uInt16 TextEngine::GetLineCount( sal_uLong nParagraph ) const
{
DBG_ASSERT( nParagraph < mpTEParaPortions->Count(), "GetLineCount: Out of range" );
@@ -1357,7 +1357,7 @@ USHORT TextEngine::GetLineCount( ULONG nParagraph ) const
return 0xFFFF;
}
-USHORT TextEngine::GetLineLen( ULONG nParagraph, USHORT nLine ) const
+sal_uInt16 TextEngine::GetLineLen( sal_uLong nParagraph, sal_uInt16 nLine ) const
{
DBG_ASSERT( nParagraph < mpTEParaPortions->Count(), "GetLineCount: Out of range" );
@@ -1371,9 +1371,9 @@ USHORT TextEngine::GetLineLen( ULONG nParagraph, USHORT nLine ) const
return 0xFFFF;
}
-ULONG TextEngine::CalcParaHeight( ULONG nParagraph ) const
+sal_uLong TextEngine::CalcParaHeight( sal_uLong nParagraph ) const
{
- ULONG nHeight = 0;
+ sal_uLong nHeight = 0;
TEParaPortion* pPPortion = mpTEParaPortions->GetObject( nParagraph );
DBG_ASSERT( pPPortion, "Absatz nicht gefunden: GetParaHeight" );
@@ -1387,12 +1387,12 @@ void TextEngine::UpdateSelections()
{
}
-Range TextEngine::GetInvalidYOffsets( ULONG nPortion )
+Range TextEngine::GetInvalidYOffsets( sal_uLong nPortion )
{
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPortion );
- USHORT nLines = pTEParaPortion->GetLines().Count();
- USHORT nLastInvalid, nFirstInvalid = 0;
- USHORT nLine;
+ sal_uInt16 nLines = pTEParaPortion->GetLines().Count();
+ sal_uInt16 nLastInvalid, nFirstInvalid = 0;
+ sal_uInt16 nLine;
for ( nLine = 0; nLine < nLines; nLine++ )
{
TextLine* pL = pTEParaPortion->GetLines().GetObject( nLine );
@@ -1416,12 +1416,12 @@ Range TextEngine::GetInvalidYOffsets( ULONG nPortion )
return Range( nFirstInvalid*mnCharHeight, ((nLastInvalid+1)*mnCharHeight)-1 );
}
-ULONG TextEngine::GetParagraphCount() const
+sal_uLong TextEngine::GetParagraphCount() const
{
return mpDoc->GetNodes().Count();
}
-void TextEngine::EnableUndo( BOOL bEnable )
+void TextEngine::EnableUndo( sal_Bool bEnable )
{
// Beim Umschalten des Modus Liste loeschen:
if ( bEnable != IsUndoEnabled() )
@@ -1430,14 +1430,14 @@ void TextEngine::EnableUndo( BOOL bEnable )
mbUndoEnabled = bEnable;
}
-SfxUndoManager& TextEngine::GetUndoManager()
+::svl::IUndoManager& TextEngine::GetUndoManager()
{
if ( !mpUndoManager )
mpUndoManager = new TextUndoManager( this );
return *mpUndoManager;
}
-void TextEngine::UndoActionStart( USHORT nId )
+void TextEngine::UndoActionStart( sal_uInt16 nId )
{
if ( IsUndoEnabled() && !IsInUndo() )
{
@@ -1447,13 +1447,13 @@ void TextEngine::UndoActionStart( USHORT nId )
}
}
-void TextEngine::UndoActionEnd( USHORT )
+void TextEngine::UndoActionEnd()
{
if ( IsUndoEnabled() && !IsInUndo() )
GetUndoManager().LeaveListAction();
}
-void TextEngine::InsertUndo( TextUndo* pUndo, BOOL bTryMerge )
+void TextEngine::InsertUndo( TextUndo* pUndo, sal_Bool bTryMerge )
{
DBG_ASSERT( !IsInUndo(), "InsertUndo im Undomodus!" );
GetUndoManager().AddUndoAction( pUndo, bTryMerge );
@@ -1465,7 +1465,7 @@ void TextEngine::ResetUndo()
mpUndoManager->Clear();
}
-void TextEngine::InsertContent( TextNode* pNode, ULONG nPara )
+void TextEngine::InsertContent( TextNode* pNode, sal_uLong nPara )
{
DBG_ASSERT( pNode, "NULL-Pointer in InsertContent! " );
DBG_ASSERT( IsInUndo(), "InsertContent nur fuer Undo()!" );
@@ -1475,7 +1475,7 @@ void TextEngine::InsertContent( TextNode* pNode, ULONG nPara )
ImpParagraphInserted( nPara );
}
-TextPaM TextEngine::SplitContent( ULONG nNode, USHORT nSepPos )
+TextPaM TextEngine::SplitContent( sal_uLong nNode, sal_uInt16 nSepPos )
{
#ifdef DBG_UTIL
TextNode* pNode = mpDoc->GetNodes().GetObject( nNode );
@@ -1487,21 +1487,21 @@ TextPaM TextEngine::SplitContent( ULONG nNode, USHORT nSepPos )
return ImpInsertParaBreak( aPaM );
}
-TextPaM TextEngine::ConnectContents( ULONG nLeftNode )
+TextPaM TextEngine::ConnectContents( sal_uLong nLeftNode )
{
DBG_ASSERT( IsInUndo(), "ConnectContent nur fuer Undo()!" );
return ImpConnectParagraphs( nLeftNode, nLeftNode+1 );
}
-void TextEngine::SeekCursor( ULONG nPara, USHORT nPos, Font& rFont, OutputDevice* pOutDev )
+void TextEngine::SeekCursor( sal_uLong nPara, sal_uInt16 nPos, Font& rFont, OutputDevice* pOutDev )
{
rFont = maFont;
if ( pOutDev )
pOutDev->SetTextColor( maTextColor );
TextNode* pNode = mpDoc->GetNodes().GetObject( nPara );
- USHORT nAttribs = pNode->GetCharAttribs().Count();
- for ( USHORT nAttr = 0; nAttr < nAttribs; nAttr++ )
+ sal_uInt16 nAttribs = pNode->GetCharAttribs().Count();
+ for ( sal_uInt16 nAttr = 0; nAttr < nAttribs; nAttr++ )
{
TextCharAttrib* pAttrib = pNode->GetCharAttribs().GetAttrib( nAttr );
if ( pAttrib->GetStart() > nPos )
@@ -1549,7 +1549,7 @@ void TextEngine::SeekCursor( ULONG nPara, USHORT nPos, Font& rFont, OutputDevice
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
rFont.SetColor( rStyleSettings.GetHighlightTextColor() );
rFont.SetFillColor( rStyleSettings.GetHighlightColor() );
- rFont.SetTransparent( FALSE );
+ rFont.SetTransparent( sal_False );
}
else if ( nAttr & EXTTEXTINPUT_ATTR_GRAYWAVELINE )
{
@@ -1560,9 +1560,9 @@ void TextEngine::SeekCursor( ULONG nPara, USHORT nPos, Font& rFont, OutputDevice
}
}
-void TextEngine::SetUpdateMode( BOOL bUp, TextView* pCurView, BOOL bForceUpdate )
+void TextEngine::SetUpdateMode( sal_Bool bUp, TextView* pCurView, sal_Bool bForceUpdate )
{
- BOOL bChanged = ( GetUpdateMode() != bUp );
+ sal_Bool bChanged = ( GetUpdateMode() != bUp );
mbUpdate = bUp;
if ( mbUpdate && ( bChanged || bForceUpdate ) )
@@ -1584,15 +1584,15 @@ void TextEngine::FormatAndUpdate( TextView* pCurView )
}
-void TextEngine::IdleFormatAndUpdate( TextView* pCurView, USHORT nMaxTimerRestarts )
+void TextEngine::IdleFormatAndUpdate( TextView* pCurView, sal_uInt16 nMaxTimerRestarts )
{
mpIdleFormatter->DoIdleFormat( pCurView, nMaxTimerRestarts );
}
void TextEngine::TextModified()
{
- mbFormatted = FALSE;
- mbModified = TRUE;
+ mbFormatted = sal_False;
+ mbModified = sal_True;
}
void TextEngine::UpdateViews( TextView* pCurView )
@@ -1602,7 +1602,7 @@ void TextEngine::UpdateViews( TextView* pCurView )
DBG_ASSERT( IsFormatted(), "UpdateViews: Doc nicht formatiert!" );
- for ( USHORT nView = 0; nView < mpViews->Count(); nView++ )
+ for ( sal_uInt16 nView = 0; nView < mpViews->Count(); nView++ )
{
TextView* pView = mpViews->GetObject( nView );
pView->HideCursor();
@@ -1647,12 +1647,12 @@ void TextEngine::CheckIdleFormatter()
void TextEngine::FormatFullDoc()
{
- for ( ULONG nPortion = 0; nPortion < mpTEParaPortions->Count(); nPortion++ )
+ for ( sal_uLong nPortion = 0; nPortion < mpTEParaPortions->Count(); nPortion++ )
{
- TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPortion ); USHORT nLen = pTEParaPortion->GetNode()->GetText().Len();
+ TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPortion ); sal_uInt16 nLen = pTEParaPortion->GetNode()->GetText().Len();
pTEParaPortion->MarkSelectionInvalid( 0, nLen );
}
- mbFormatted = FALSE;
+ mbFormatted = sal_False;
FormatDoc();
}
@@ -1661,26 +1661,26 @@ void TextEngine::FormatDoc()
if ( IsFormatted() || !GetUpdateMode() || IsFormatting() )
return;
- mbIsFormatting = TRUE;
- mbHasMultiLineParas = FALSE;
+ mbIsFormatting = sal_True;
+ mbHasMultiLineParas = sal_False;
long nY = 0;
- BOOL bGrow = FALSE;
+ sal_Bool bGrow = sal_False;
maInvalidRec = Rectangle(); // leermachen
- for ( ULONG nPara = 0; nPara < mpTEParaPortions->Count(); nPara++ )
+ for ( sal_uLong nPara = 0; nPara < mpTEParaPortions->Count(); nPara++ )
{
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara );
if ( pTEParaPortion->IsInvalid() )
{
- ULONG nOldParaWidth = 0xFFFFFFFF;
+ sal_uLong nOldParaWidth = 0xFFFFFFFF;
if ( mnCurTextWidth != 0xFFFFFFFF )
nOldParaWidth = CalcTextWidth( nPara );
ImpFormattingParagraph( nPara );
if ( CreateLines( nPara ) )
- bGrow = TRUE;
+ bGrow = sal_True;
// InvalidRec nur einmal setzen...
if ( maInvalidRec.IsEmpty() )
@@ -1700,7 +1700,7 @@ void TextEngine::FormatDoc()
if ( mnCurTextWidth != 0xFFFFFFFF )
{
- ULONG nNewParaWidth = CalcTextWidth( nPara );
+ sal_uLong nNewParaWidth = CalcTextWidth( nPara );
if ( nNewParaWidth >= mnCurTextWidth )
mnCurTextWidth = nNewParaWidth;
else if ( ( nOldParaWidth != 0xFFFFFFFF ) && ( nOldParaWidth >= mnCurTextWidth ) )
@@ -1713,12 +1713,12 @@ void TextEngine::FormatDoc()
}
nY += CalcParaHeight( nPara );
if ( !mbHasMultiLineParas && pTEParaPortion->GetLines().Count() > 1 )
- mbHasMultiLineParas = TRUE;
+ mbHasMultiLineParas = sal_True;
}
if ( !maInvalidRec.IsEmpty() )
{
- ULONG nNewHeight = CalcTextHeight();
+ sal_uLong nNewHeight = CalcTextHeight();
long nDiff = nNewHeight - mnCurTextHeight;
if ( nNewHeight < mnCurTextHeight )
{
@@ -1735,18 +1735,18 @@ void TextEngine::FormatDoc()
mnCurTextHeight = nNewHeight;
if ( nDiff )
{
- mbFormatted = TRUE;
+ mbFormatted = sal_True;
ImpTextHeightChanged();
}
}
- mbIsFormatting = FALSE;
- mbFormatted = TRUE;
+ mbIsFormatting = sal_False;
+ mbFormatted = sal_True;
ImpTextFormatted();
}
-void TextEngine::CreateAndInsertEmptyLine( ULONG nPara )
+void TextEngine::CreateAndInsertEmptyLine( sal_uLong nPara )
{
TextNode* pNode = mpDoc->GetNodes().GetObject( nPara );
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara );
@@ -1763,31 +1763,31 @@ void TextEngine::CreateAndInsertEmptyLine( ULONG nPara )
else
pTmpLine->SetStartX( mpDoc->GetLeftMargin() );
- BOOL bLineBreak = pNode->GetText().Len() ? TRUE : FALSE;
+ sal_Bool bLineBreak = pNode->GetText().Len() ? sal_True : sal_False;
TETextPortion* pDummyPortion = new TETextPortion( 0 );
pDummyPortion->GetWidth() = 0;
pTEParaPortion->GetTextPortions().Insert( pDummyPortion, pTEParaPortion->GetTextPortions().Count() );
- if ( bLineBreak == TRUE )
+ if ( bLineBreak == sal_True )
{
// -2: Die neue ist bereits eingefuegt.
#ifdef DBG_UTIL
TextLine* pLastLine = pTEParaPortion->GetLines().GetObject( pTEParaPortion->GetLines().Count()-2 );
DBG_ASSERT( pLastLine, "Weicher Umbruch, keine Zeile ?!" );
#endif
- USHORT nPos = (USHORT) pTEParaPortion->GetTextPortions().Count() - 1 ;
+ sal_uInt16 nPos = (sal_uInt16) pTEParaPortion->GetTextPortions().Count() - 1 ;
pTmpLine->SetStartPortion( nPos );
pTmpLine->SetEndPortion( nPos );
}
}
-void TextEngine::ImpBreakLine( ULONG nPara, TextLine* pLine, TETextPortion*, USHORT nPortionStart, long nRemainingWidth )
+void TextEngine::ImpBreakLine( sal_uLong nPara, TextLine* pLine, TETextPortion*, sal_uInt16 nPortionStart, long nRemainingWidth )
{
TextNode* pNode = mpDoc->GetNodes().GetObject( nPara );
// Font sollte noch eingestellt sein.
- USHORT nMaxBreakPos = mpRefDev->GetTextBreak( pNode->GetText(), nRemainingWidth, nPortionStart );
+ sal_uInt16 nMaxBreakPos = mpRefDev->GetTextBreak( pNode->GetText(), nRemainingWidth, nPortionStart );
DBG_ASSERT( nMaxBreakPos < pNode->GetText().Len(), "Break?!" );
@@ -1806,7 +1806,7 @@ void TextEngine::ImpBreakLine( ULONG nPara, TextLine* pLine, TETextPortion*, USH
static const com::sun::star::lang::Locale aDefLocale;
i18n::LineBreakResults aLBR = xBI->getLineBreak( pNode->GetText(), nMaxBreakPos, aDefLocale, pLine->GetStart(), aHyphOptions, aUserOptions );
- USHORT nBreakPos = (USHORT)aLBR.breakIndex;
+ sal_uInt16 nBreakPos = (sal_uInt16)aLBR.breakIndex;
if ( nBreakPos <= pLine->GetStart() )
{
nBreakPos = nMaxBreakPos;
@@ -1817,7 +1817,7 @@ void TextEngine::ImpBreakLine( ULONG nPara, TextLine* pLine, TETextPortion*, USH
// die angeknackste Portion ist die End-Portion
pLine->SetEnd( nBreakPos );
- USHORT nEndPortion = SplitTextPortion( nPara, nBreakPos );
+ sal_uInt16 nEndPortion = SplitTextPortion( nPara, nBreakPos );
sal_Bool bBlankSeparator = ( ( nBreakPos >= pLine->GetStart() ) &&
( pNode->GetText().GetChar( nBreakPos ) == ' ' ) ) ? sal_True : sal_False;
@@ -1832,7 +1832,7 @@ void TextEngine::ImpBreakLine( ULONG nPara, TextLine* pLine, TETextPortion*, USH
pLine->SetEndPortion( nEndPortion );
}
-USHORT TextEngine::SplitTextPortion( ULONG nPara, USHORT nPos )
+sal_uInt16 TextEngine::SplitTextPortion( sal_uLong nPara, sal_uInt16 nPos )
{
// Die Portion bei nPos wird geplittet, wenn bei nPos nicht
@@ -1840,11 +1840,11 @@ USHORT TextEngine::SplitTextPortion( ULONG nPara, USHORT nPos )
if ( nPos == 0 )
return 0;
- USHORT nSplitPortion;
- USHORT nTmpPos = 0;
+ sal_uInt16 nSplitPortion;
+ sal_uInt16 nTmpPos = 0;
TETextPortion* pTextPortion = 0;
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara );
- USHORT nPortions = pTEParaPortion->GetTextPortions().Count();
+ sal_uInt16 nPortions = pTEParaPortion->GetTextPortions().Count();
for ( nSplitPortion = 0; nSplitPortion < nPortions; nSplitPortion++ )
{
TETextPortion* pTP = pTEParaPortion->GetTextPortions().GetObject(nSplitPortion);
@@ -1860,7 +1860,7 @@ USHORT TextEngine::SplitTextPortion( ULONG nPara, USHORT nPos )
DBG_ASSERT( pTextPortion, "Position ausserhalb des Bereichs!" );
- USHORT nOverlapp = nTmpPos - nPos;
+ sal_uInt16 nOverlapp = nTmpPos - nPos;
pTextPortion->GetLen() = pTextPortion->GetLen() - nOverlapp;
TETextPortion* pNewPortion = new TETextPortion( nOverlapp );
pTEParaPortion->GetTextPortions().Insert( pNewPortion, nSplitPortion+1 );
@@ -1869,18 +1869,18 @@ USHORT TextEngine::SplitTextPortion( ULONG nPara, USHORT nPos )
return nSplitPortion;
}
-void TextEngine::CreateTextPortions( ULONG nPara, USHORT nStartPos )
+void TextEngine::CreateTextPortions( sal_uLong nPara, sal_uInt16 nStartPos )
{
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara );
TextNode* pNode = pTEParaPortion->GetNode();
DBG_ASSERT( pNode->GetText().Len(), "CreateTextPortions sollte nicht fuer leere Absaetze verwendet werden!" );
TESortedPositions aPositions;
- ULONG nZero = 0;
+ sal_uLong nZero = 0;
aPositions.Insert( nZero );
- USHORT nAttribs = pNode->GetCharAttribs().Count();
- for ( USHORT nAttr = 0; nAttr < nAttribs; nAttr++ )
+ sal_uInt16 nAttribs = pNode->GetCharAttribs().Count();
+ for ( sal_uInt16 nAttr = 0; nAttr < nAttribs; nAttr++ )
{
TextCharAttrib* pAttrib = pNode->GetCharAttribs().GetAttrib( nAttr );
@@ -1892,7 +1892,7 @@ void TextEngine::CreateTextPortions( ULONG nPara, USHORT nStartPos )
aPositions.Insert( pNode->GetText().Len() );
const TEWritingDirectionInfos& rWritingDirections = pTEParaPortion->GetWritingDirectionInfos();
- for ( USHORT nD = 0; nD < rWritingDirections.Count(); nD++ )
+ for ( sal_uInt16 nD = 0; nD < rWritingDirections.Count(); nD++ )
aPositions.Insert( rWritingDirections[nD].nStartPos );
if ( mpIMEInfos && mpIMEInfos->pAttribs && ( mpIMEInfos->aPos.GetPara() == nPara ) )
@@ -1908,7 +1908,7 @@ void TextEngine::CreateTextPortions( ULONG nPara, USHORT nStartPos )
}
}
- USHORT nTabPos = pNode->GetText().Search( '\t', 0 );
+ sal_uInt16 nTabPos = pNode->GetText().Search( '\t', 0 );
while ( nTabPos != STRING_NOTFOUND )
{
aPositions.Insert( nTabPos );
@@ -1919,9 +1919,9 @@ void TextEngine::CreateTextPortions( ULONG nPara, USHORT nStartPos )
// Ab ... loeschen:
// Leider muss die Anzahl der TextPortions mit aPositions.Count()
// nicht uebereinstimmen, da evtl. Zeilenumbrueche...
- USHORT nPortionStart = 0;
- USHORT nInvPortion = 0;
- USHORT nP;
+ sal_uInt16 nPortionStart = 0;
+ sal_uInt16 nInvPortion = 0;
+ sal_uInt16 nP;
for ( nP = 0; nP < pTEParaPortion->GetTextPortions().Count(); nP++ )
{
TETextPortion* pTmpPortion = pTEParaPortion->GetTextPortions().GetObject(nP);
@@ -1947,15 +1947,15 @@ void TextEngine::CreateTextPortions( ULONG nPara, USHORT nStartPos )
// Eine Portion kann auch durch einen Zeilenumbruch entstanden sein:
aPositions.Insert( nPortionStart );
- USHORT nInvPos;
+ sal_uInt16 nInvPos;
#ifdef DBG_UTIL
- BOOL bFound =
+ sal_Bool bFound =
#endif
aPositions.Seek_Entry( nPortionStart, &nInvPos );
DBG_ASSERT( bFound && ( nInvPos < (aPositions.Count()-1) ), "InvPos ?!" );
- for ( USHORT i = nInvPos+1; i < aPositions.Count(); i++ )
+ for ( sal_uInt16 i = nInvPos+1; i < aPositions.Count(); i++ )
{
- TETextPortion* pNew = new TETextPortion( (USHORT)aPositions[i] - (USHORT)aPositions[i-1] );
+ TETextPortion* pNew = new TETextPortion( (sal_uInt16)aPositions[i] - (sal_uInt16)aPositions[i-1] );
pTEParaPortion->GetTextPortions().Insert( pNew, pTEParaPortion->GetTextPortions().Count());
}
@@ -1965,7 +1965,7 @@ void TextEngine::CreateTextPortions( ULONG nPara, USHORT nStartPos )
#endif
}
-void TextEngine::RecalcTextPortion( ULONG nPara, USHORT nStartPos, short nNewChars )
+void TextEngine::RecalcTextPortion( sal_uLong nPara, sal_uInt16 nStartPos, short nNewChars )
{
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara );
DBG_ASSERT( pTEParaPortion->GetTextPortions().Count(), "Keine Portions!" );
@@ -1983,7 +1983,7 @@ void TextEngine::RecalcTextPortion( ULONG nPara, USHORT nStartPos, short nNewCha
( nStartPos && ( pNode->GetText().GetChar( nStartPos - 1 ) == '\t' ) ) ||
( ( !nStartPos && ( nNewChars < pNode->GetText().Len() ) && pNode->GetText().GetChar( nNewChars ) == '\t' ) ) )
{
- USHORT nNewPortionPos = 0;
+ sal_uInt16 nNewPortionPos = 0;
if ( nStartPos )
nNewPortionPos = SplitTextPortion( nPara, nStartPos ) + 1;
// else if ( ( pTEParaPortion->GetTextPortions().Count() == 1 ) &&
@@ -1996,7 +1996,7 @@ void TextEngine::RecalcTextPortion( ULONG nPara, USHORT nStartPos, short nNewCha
!pTEParaPortion->GetTextPortions()[nNewPortionPos]->GetLen() )
{
// Dann die leere Portion verwenden.
- USHORT & r =
+ sal_uInt16 & r =
pTEParaPortion->GetTextPortions()[nNewPortionPos]->GetLen();
r = r + nNewChars;
}
@@ -2008,8 +2008,8 @@ void TextEngine::RecalcTextPortion( ULONG nPara, USHORT nStartPos, short nNewCha
}
else
{
- USHORT nPortionStart;
- const USHORT nTP = pTEParaPortion->GetTextPortions().
+ sal_uInt16 nPortionStart;
+ const sal_uInt16 nTP = pTEParaPortion->GetTextPortions().
FindPortion( nStartPos, nPortionStart );
TETextPortion* const pTP = pTEParaPortion->GetTextPortions()[ nTP ];
DBG_ASSERT( pTP, "RecalcTextPortion: Portion nicht gefunden" );
@@ -2025,10 +2025,10 @@ void TextEngine::RecalcTextPortion( ULONG nPara, USHORT nStartPos, short nNewCha
// Es darf keine reinragende oder im Bereich startende Portion geben,
// also muss nStartPos <= nPos <= nStartPos - nNewChars(neg.) sein
- USHORT nPortion = 0;
- USHORT nPos = 0;
- USHORT nEnd = nStartPos-nNewChars;
- USHORT nPortions = pTEParaPortion->GetTextPortions().Count();
+ sal_uInt16 nPortion = 0;
+ sal_uInt16 nPos = 0;
+ sal_uInt16 nEnd = nStartPos-nNewChars;
+ sal_uInt16 nPortions = pTEParaPortion->GetTextPortions().Count();
TETextPortion* pTP = 0;
for ( nPortion = 0; nPortion < nPortions; nPortion++ )
{
@@ -2079,7 +2079,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
TextPaM const* pSelEnd = 0;
if ( pSelection && pSelection->HasRange() )
{
- BOOL bInvers = pSelection->GetEnd() < pSelection->GetStart();
+ sal_Bool bInvers = pSelection->GetEnd() < pSelection->GetStart();
pSelStart = !bInvers ? &pSelection->GetStart() : &pSelection->GetEnd();
pSelEnd = bInvers ? &pSelection->GetStart() : &pSelection->GetEnd();
}
@@ -2090,23 +2090,23 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
// --------------------------------------------------
// Ueber alle Absaetze...
// --------------------------------------------------
- for ( ULONG nPara = 0; nPara < mpTEParaPortions->Count(); nPara++ )
+ for ( sal_uLong nPara = 0; nPara < mpTEParaPortions->Count(); nPara++ )
{
TEParaPortion* pPortion = mpTEParaPortions->GetObject( nPara );
// falls beim Tippen Idle-Formatierung, asynchrones Paint.
if ( pPortion->IsInvalid() )
return;
- ULONG nParaHeight = CalcParaHeight( nPara );
- USHORT nIndex = 0;
+ sal_uLong nParaHeight = CalcParaHeight( nPara );
+ sal_uInt16 nIndex = 0;
if ( ( !pPaintArea || ( ( nY + (long)nParaHeight ) > pPaintArea->Top() ) )
&& ( !pPaintRange || ( ( nPara >= pPaintRange->GetStart().GetPara() ) && ( nPara <= pPaintRange->GetEnd().GetPara() ) ) ) )
{
// --------------------------------------------------
// Ueber die Zeilen des Absatzes...
// --------------------------------------------------
- USHORT nLines = pPortion->GetLines().Count();
- for ( USHORT nLine = 0; nLine < nLines; nLine++ )
+ sal_uInt16 nLines = pPortion->GetLines().Count();
+ for ( sal_uInt16 nLine = 0; nLine < nLines; nLine++ )
{
TextLine* pLine = pPortion->GetLines().GetObject(nLine);
Point aTmpPos( rStartPos.X() + pLine->GetStartX(), nY );
@@ -2120,7 +2120,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
// Ueber die Portions der Zeile...
// --------------------------------------------------
nIndex = pLine->GetStart();
- for ( USHORT y = pLine->GetStartPortion(); y <= pLine->GetEndPortion(); y++ )
+ for ( sal_uInt16 y = pLine->GetStartPortion(); y <= pLine->GetEndPortion(); y++ )
{
DBG_ASSERT( pPortion->GetTextPortions().Count(), "Zeile ohne Textportion im Paint!" );
TETextPortion* pTextPortion = pPortion->GetTextPortions().GetObject( y );
@@ -2145,13 +2145,13 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
Font aFont;
SeekCursor( nPara, nIndex+1, aFont, pOutDev );
if( bTransparent )
- aFont.SetTransparent( TRUE );
+ aFont.SetTransparent( sal_True );
else if ( pSelection )
- aFont.SetTransparent( FALSE );
+ aFont.SetTransparent( sal_False );
pOutDev->SetFont( aFont );
- USHORT nTmpIndex = nIndex;
- USHORT nEnd = nTmpIndex + pTextPortion->GetLen();
+ sal_uInt16 nTmpIndex = nIndex;
+ sal_uInt16 nEnd = nTmpIndex + pTextPortion->GetLen();
Point aPos = aTmpPos;
if ( pPaintRange )
{
@@ -2168,7 +2168,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
}
}
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
if ( pSelStart )
{
// liegt ein Teil in der Selektion???
@@ -2176,7 +2176,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
TextPaM aTextEnd( nPara, nEnd );
if ( ( aTextStart < *pSelEnd ) && ( aTextEnd > *pSelStart ) )
{
- USHORT nL;
+ sal_uInt16 nL;
// 1) Bereich vor Selektion
if ( aTextStart < *pSelStart )
@@ -2211,7 +2211,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
aPos.X() = rStartPos.X() + ImpGetOutputOffset( nPara, pLine, nTmpIndex, nTmpIndex+nL );
pOutDev->DrawText( aPos, pPortion->GetNode()->GetText(), nTmpIndex, nEnd-nTmpIndex );
}
- bDone = TRUE;
+ bDone = sal_True;
}
}
if ( !bDone )
@@ -2229,7 +2229,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
if ( pSelStart || pPaintRange )
{
Rectangle aTabArea( aTmpPos, Point( aTmpPos.X()+nTxtWidth, aTmpPos.Y()+mnCharHeight-1 ) );
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
if ( pSelStart )
{
// liegt der Tab in der Selektion???
@@ -2241,7 +2241,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
pOutDev->SetFillColor( rStyleSettings.GetHighlightColor() );
pOutDev->DrawRect( aTabArea );
pOutDev->SetFillColor( aOldColor );
- bDone = TRUE;
+ bDone = sal_True;
}
}
if ( !bDone )
@@ -2282,15 +2282,15 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
}
}
-BOOL TextEngine::CreateLines( ULONG nPara )
+sal_Bool TextEngine::CreateLines( sal_uLong nPara )
{
- // BOOL: Aenderung der Hoehe des Absatzes Ja/Nein - TRUE/FALSE
+ // sal_Bool: Aenderung der Hoehe des Absatzes Ja/Nein - sal_True/sal_False
TextNode* pNode = mpDoc->GetNodes().GetObject( nPara );
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara );
DBG_ASSERT( pTEParaPortion->IsInvalid(), "CreateLines: Portion nicht invalid!" );
- USHORT nOldLineCount = pTEParaPortion->GetLines().Count();
+ sal_uInt16 nOldLineCount = pTEParaPortion->GetLines().Count();
// ---------------------------------------------------------------
// Schnelle Sonderbehandlung fuer leere Absaetze...
@@ -2318,9 +2318,9 @@ BOOL TextEngine::CreateLines( ULONG nPara )
}
const short nInvalidDiff = pTEParaPortion->GetInvalidDiff();
- const USHORT nInvalidStart = pTEParaPortion->GetInvalidPosStart();
- const USHORT nInvalidEnd = nInvalidStart + Abs( nInvalidDiff );
- BOOL bQuickFormat = FALSE;
+ const sal_uInt16 nInvalidStart = pTEParaPortion->GetInvalidPosStart();
+ const sal_uInt16 nInvalidEnd = nInvalidStart + Abs( nInvalidDiff );
+ sal_Bool bQuickFormat = sal_False;
if ( !pTEParaPortion->GetWritingDirectionInfos().Count() )
ImpInitWritingDirections( nPara );
@@ -2329,24 +2329,24 @@ BOOL TextEngine::CreateLines( ULONG nPara )
{
if ( pTEParaPortion->IsSimpleInvalid() && ( nInvalidDiff > 0 ) )
{
- bQuickFormat = TRUE;
+ bQuickFormat = sal_True;
}
else if ( ( pTEParaPortion->IsSimpleInvalid() ) && ( nInvalidDiff < 0 ) )
{
// pruefen, ob loeschen ueber Portiongrenzen erfolgte...
- USHORT nStart = nInvalidStart; // DOPPELT !!!!!!!!!!!!!!!
- USHORT nEnd = nStart - nInvalidDiff; // neg.
- bQuickFormat = TRUE;
- USHORT nPos = 0;
- USHORT nPortions = pTEParaPortion->GetTextPortions().Count();
- for ( USHORT nTP = 0; nTP < nPortions; nTP++ )
+ sal_uInt16 nStart = nInvalidStart; // DOPPELT !!!!!!!!!!!!!!!
+ sal_uInt16 nEnd = nStart - nInvalidDiff; // neg.
+ bQuickFormat = sal_True;
+ sal_uInt16 nPos = 0;
+ sal_uInt16 nPortions = pTEParaPortion->GetTextPortions().Count();
+ for ( sal_uInt16 nTP = 0; nTP < nPortions; nTP++ )
{
// Es darf kein Start/Ende im geloeschten Bereich liegen.
TETextPortion* const pTP = pTEParaPortion->GetTextPortions().GetObject( nTP );
nPos = nPos + pTP->GetLen();
if ( ( nPos > nStart ) && ( nPos < nEnd ) )
{
- bQuickFormat = FALSE;
+ bQuickFormat = sal_False;
break;
}
}
@@ -2363,8 +2363,8 @@ BOOL TextEngine::CreateLines( ULONG nPara )
// Zeilen flaggen => nicht removen !
// ---------------------------------------------------------------
- USHORT nLine = pTEParaPortion->GetLines().Count()-1;
- for ( USHORT nL = 0; nL <= nLine; nL++ )
+ sal_uInt16 nLine = pTEParaPortion->GetLines().Count()-1;
+ for ( sal_uInt16 nL = 0; nL <= nLine; nL++ )
{
TextLine* pLine = pTEParaPortion->GetLines().GetObject( nL );
if ( pLine->GetEnd() > nInvalidStart )
@@ -2384,25 +2384,25 @@ BOOL TextEngine::CreateLines( ULONG nPara )
// ---------------------------------------------------------------
// Ab hier alle Zeilen durchformatieren...
// ---------------------------------------------------------------
- USHORT nDelFromLine = 0xFFFF;
- BOOL bLineBreak = FALSE;
+ sal_uInt16 nDelFromLine = 0xFFFF;
+ sal_Bool bLineBreak = sal_False;
- USHORT nIndex = pLine->GetStart();
+ sal_uInt16 nIndex = pLine->GetStart();
TextLine aSaveLine( *pLine );
Font aFont;
- BOOL bCalcPortion = TRUE;
+ sal_Bool bCalcPortion = sal_True;
while ( nIndex < pNode->GetText().Len() )
{
- BOOL bEOL = FALSE;
- BOOL bEOC = FALSE;
- USHORT nPortionStart = 0;
- USHORT nPortionEnd = 0;
+ sal_Bool bEOL = sal_False;
+ sal_Bool bEOC = sal_False;
+ sal_uInt16 nPortionStart = 0;
+ sal_uInt16 nPortionEnd = 0;
- USHORT nTmpPos = nIndex;
- USHORT nTmpPortion = pLine->GetStartPortion();
+ sal_uInt16 nTmpPos = nIndex;
+ sal_uInt16 nTmpPortion = pLine->GetStartPortion();
long nTmpWidth = mpDoc->GetLeftMargin();
// long nXWidth = mnMaxTextWidth ? ( mnMaxTextWidth - mpDoc->GetLeftMargin() ) : 0x7FFFFFFF;
// Margin nicht abziehen, ist schon in TmpWidth enthalten.
@@ -2412,8 +2412,8 @@ BOOL TextEngine::CreateLines( ULONG nPara )
// Portion suchen, die nicht mehr in Zeile passt....
TETextPortion* pPortion = 0;
- BOOL bBrokenLine = FALSE;
- bLineBreak = FALSE;
+ sal_Bool bBrokenLine = sal_False;
+ bLineBreak = sal_False;
while ( ( nTmpWidth <= nXWidth ) && !bEOL && ( nTmpPortion < pTEParaPortion->GetTextPortions().Count() ) )
{
@@ -2432,8 +2432,8 @@ BOOL TextEngine::CreateLines( ULONG nPara )
// Aber was jetzt ? Tab passend machen!
pPortion->GetWidth() = nXWidth-1;
nTmpWidth = pPortion->GetWidth();
- bEOL = TRUE;
- bBrokenLine = TRUE;
+ bEOL = sal_True;
+ bBrokenLine = sal_True;
}
pPortion->GetKind() = PORTIONKIND_TAB;
}
@@ -2454,30 +2454,30 @@ BOOL TextEngine::CreateLines( ULONG nPara )
}
// das war evtl. eine Portion zu weit:
- BOOL bFixedEnd = FALSE;
+ sal_Bool bFixedEnd = sal_False;
if ( nTmpWidth > nXWidth )
{
nPortionEnd = nTmpPos;
nTmpPos = nTmpPos - pPortion->GetLen();
nPortionStart = nTmpPos;
nTmpPortion--;
- bEOL = FALSE;
- bEOC = FALSE;
+ bEOL = sal_False;
+ bEOC = sal_False;
nTmpWidth -= pPortion->GetWidth();
if ( pPortion->GetKind() == PORTIONKIND_TAB )
{
- bEOL = TRUE;
- bFixedEnd = TRUE;
+ bEOL = sal_True;
+ bFixedEnd = sal_True;
}
}
else
{
- bEOL = TRUE;
- bEOC = TRUE;
+ bEOL = sal_True;
+ bEOC = sal_True;
pLine->SetEnd( nPortionEnd );
DBG_ASSERT( pTEParaPortion->GetTextPortions().Count(), "Keine TextPortions?" );
- pLine->SetEndPortion( (USHORT)pTEParaPortion->GetTextPortions().Count() - 1 );
+ pLine->SetEndPortion( (sal_uInt16)pTEParaPortion->GetTextPortions().Count() - 1 );
}
if ( bFixedEnd )
@@ -2489,7 +2489,7 @@ BOOL TextEngine::CreateLines( ULONG nPara )
{
pLine->SetEnd( nPortionStart+1 );
pLine->SetEndPortion( nTmpPortion-1 );
- bEOC = FALSE; // wurde oben gesetzt, vielleich mal die if's umstellen?
+ bEOC = sal_False; // wurde oben gesetzt, vielleich mal die if's umstellen?
}
else if ( !bEOL )
{
@@ -2502,7 +2502,7 @@ BOOL TextEngine::CreateLines( ULONG nPara )
{
// Ausrichten...
long nTextWidth = 0;
- for ( USHORT nTP = pLine->GetStartPortion(); nTP <= pLine->GetEndPortion(); nTP++ )
+ for ( sal_uInt16 nTP = pLine->GetStartPortion(); nTP <= pLine->GetEndPortion(); nTP++ )
{
TETextPortion* pTextPortion = pTEParaPortion->GetTextPortions().GetObject( nTP );
nTextWidth += pTextPortion->GetWidth();
@@ -2511,9 +2511,9 @@ BOOL TextEngine::CreateLines( ULONG nPara )
if ( nSpace > 0 )
{
if ( ImpGetAlign() == TXTALIGN_CENTER )
- pLine->SetStartX( (USHORT)(nSpace / 2) );
+ pLine->SetStartX( (sal_uInt16)(nSpace / 2) );
else // TXTALIGN_RIGHT
- pLine->SetStartX( (USHORT)nSpace );
+ pLine->SetStartX( (sal_uInt16)nSpace );
}
}
else
@@ -2542,8 +2542,8 @@ BOOL TextEngine::CreateLines( ULONG nPara )
}
else
{
- USHORT nStart = pLine->GetStart();
- USHORT nEnd = pLine->GetEnd();
+ sal_uInt16 nStart = pLine->GetStart();
+ sal_uInt16 nEnd = pLine->GetEnd();
if ( nStart > nInvalidEnd )
{
@@ -2553,7 +2553,7 @@ BOOL TextEngine::CreateLines( ULONG nPara )
pLine->SetValid();
if ( bCalcPortion && bQuickFormat )
{
- bCalcPortion = FALSE;
+ bCalcPortion = sal_False;
pTEParaPortion->CorrectValuesBehindLastFormattedLine( nLine );
break;
}
@@ -2567,7 +2567,7 @@ BOOL TextEngine::CreateLines( ULONG nPara )
// textbreiten neu bestimmen:
if ( nEnd == ( aSaveLine.GetEnd() + nInvalidDiff ) )
{
- bCalcPortion = FALSE;
+ bCalcPortion = sal_False;
pTEParaPortion->CorrectValuesBehindLastFormattedLine( nLine );
break;
}
@@ -2578,7 +2578,7 @@ BOOL TextEngine::CreateLines( ULONG nPara )
nIndex = pLine->GetEnd(); // naechste Zeile Start = letzte Zeile Ende
// weil nEnd hinter das letzte Zeichen zeigt!
- USHORT nEndPortion = pLine->GetEndPortion();
+ sal_uInt16 nEndPortion = pLine->GetEndPortion();
// Naechste Zeile oder ggf. neue Zeile....
pLine = 0;
@@ -2609,7 +2609,7 @@ BOOL TextEngine::CreateLines( ULONG nPara )
DBG_ASSERT( pTEParaPortion->GetLines().Count(), "Keine Zeile nach CreateLines!" );
- if ( bLineBreak == TRUE )
+ if ( bLineBreak == sal_True )
CreateAndInsertEmptyLine( nPara );
pTEParaPortion->SetValid();
@@ -2626,8 +2626,8 @@ String TextEngine::GetWord( const TextPaM& rCursorPos, TextPaM* pStartOfWord )
TextNode* pNode = mpDoc->GetNodes().GetObject( rCursorPos.GetPara() );
uno::Reference < i18n::XBreakIterator > xBI = GetBreakIterator();
i18n::Boundary aBoundary = xBI->getWordBoundary( pNode->GetText(), rCursorPos.GetIndex(), GetLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES, sal_True );
- aSel.GetStart().GetIndex() = (USHORT)aBoundary.startPos;
- aSel.GetEnd().GetIndex() = (USHORT)aBoundary.endPos;
+ aSel.GetStart().GetIndex() = (sal_uInt16)aBoundary.startPos;
+ aSel.GetEnd().GetIndex() = (sal_uInt16)aBoundary.endPos;
aWord = pNode->GetText().Copy( aSel.GetStart().GetIndex(), aSel.GetEnd().GetIndex() - aSel.GetStart().GetIndex() );
if ( pStartOfWord )
*pStartOfWord = aSel.GetStart();
@@ -2635,18 +2635,18 @@ String TextEngine::GetWord( const TextPaM& rCursorPos, TextPaM* pStartOfWord )
return aWord;
}
-BOOL TextEngine::Read( SvStream& rInput, const TextSelection* pSel )
+sal_Bool TextEngine::Read( SvStream& rInput, const TextSelection* pSel )
{
- BOOL bUpdate = GetUpdateMode();
- SetUpdateMode( FALSE );
+ sal_Bool bUpdate = GetUpdateMode();
+ SetUpdateMode( sal_False );
- UndoActionStart( TEXTUNDO_READ );
+ UndoActionStart();
TextSelection aSel;
if ( pSel )
aSel = *pSel;
else
{
- ULONG nParas = mpDoc->GetNodes().Count();
+ sal_uLong nParas = mpDoc->GetNodes().Count();
TextNode* pNode = mpDoc->GetNodes().GetObject( nParas - 1 );
aSel = TextPaM( nParas-1 , pNode->GetText().Len() );
}
@@ -2655,7 +2655,7 @@ BOOL TextEngine::Read( SvStream& rInput, const TextSelection* pSel )
aSel = ImpDeleteText( aSel );
ByteString aLine;
- BOOL bDone = rInput.ReadLine( aLine );
+ sal_Bool bDone = rInput.ReadLine( aLine );
String aTmpStr( aLine, rInput.GetStreamCharSet() ), aStr;
while ( bDone )
{
@@ -2666,7 +2666,7 @@ BOOL TextEngine::Read( SvStream& rInput, const TextSelection* pSel )
aSel = ImpInsertParaBreak( aSel.GetEnd() );
}
- UndoActionEnd( TEXTUNDO_READ );
+ UndoActionEnd();
TextSelection aNewSel( aSel.GetEnd(), aSel.GetEnd() );
@@ -2677,17 +2677,17 @@ BOOL TextEngine::Read( SvStream& rInput, const TextSelection* pSel )
SetUpdateMode( bUpdate );
FormatAndUpdate( GetActiveView() );
- return rInput.GetError() ? FALSE : TRUE;
+ return rInput.GetError() ? sal_False : sal_True;
}
-BOOL TextEngine::Write( SvStream& rOutput, const TextSelection* pSel, BOOL bHTML )
+sal_Bool TextEngine::Write( SvStream& rOutput, const TextSelection* pSel, sal_Bool bHTML )
{
TextSelection aSel;
if ( pSel )
aSel = *pSel;
else
{
- ULONG nParas = mpDoc->GetNodes().Count();
+ sal_uLong nParas = mpDoc->GetNodes().Count();
TextNode* pNode = mpDoc->GetNodes().GetObject( nParas - 1 );
aSel.GetStart() = TextPaM( 0, 0 );
aSel.GetEnd() = TextPaM( nParas-1, pNode->GetText().Len() );
@@ -2699,12 +2699,12 @@ BOOL TextEngine::Write( SvStream& rOutput, const TextSelection* pSel, BOOL bHTML
rOutput.WriteLine( "<BODY>" );
}
- for ( ULONG nPara = aSel.GetStart().GetPara(); nPara <= aSel.GetEnd().GetPara(); nPara++ )
+ for ( sal_uLong nPara = aSel.GetStart().GetPara(); nPara <= aSel.GetEnd().GetPara(); nPara++ )
{
TextNode* pNode = mpDoc->GetNodes().GetObject( nPara );
- USHORT nStartPos = 0;
- USHORT nEndPos = pNode->GetText().Len();
+ sal_uInt16 nStartPos = 0;
+ sal_uInt16 nEndPos = pNode->GetText().Len();
if ( nPara == aSel.GetStart().GetPara() )
nStartPos = aSel.GetStart().GetIndex();
if ( nPara == aSel.GetEnd().GetPara() )
@@ -2726,8 +2726,8 @@ BOOL TextEngine::Write( SvStream& rOutput, const TextSelection* pSel, BOOL bHTML
}
else
{
- USHORT nTmpStart = nStartPos;
- USHORT nTmpEnd = nEndPos;
+ sal_uInt16 nTmpStart = nStartPos;
+ sal_uInt16 nTmpEnd = nEndPos;
do
{
TextCharAttrib* pAttr = pNode->GetCharAttribs().FindNextAttrib( TEXTATTR_HYPERLINK, nTmpStart, nEndPos );
@@ -2764,22 +2764,22 @@ BOOL TextEngine::Write( SvStream& rOutput, const TextSelection* pSel, BOOL bHTML
rOutput.WriteLine( "</HTML>" );
}
- return rOutput.GetError() ? FALSE : TRUE;
+ return rOutput.GetError() ? sal_False : sal_True;
}
-void TextEngine::RemoveAttribs( ULONG nPara, BOOL bIdleFormatAndUpdate )
+void TextEngine::RemoveAttribs( sal_uLong nPara, sal_Bool bIdleFormatAndUpdate )
{
if ( nPara < mpDoc->GetNodes().Count() )
{
TextNode* pNode = mpDoc->GetNodes().GetObject( nPara );
if ( pNode->GetCharAttribs().Count() )
{
- pNode->GetCharAttribs().Clear( TRUE );
+ pNode->GetCharAttribs().Clear( sal_True );
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara );
pTEParaPortion->MarkSelectionInvalid( 0, pNode->GetText().Len() );
- mbFormatted = FALSE;
+ mbFormatted = sal_False;
if ( bIdleFormatAndUpdate )
IdleFormatAndUpdate( NULL, 0xFFFF );
@@ -2788,7 +2788,7 @@ void TextEngine::RemoveAttribs( ULONG nPara, BOOL bIdleFormatAndUpdate )
}
}
}
-void TextEngine::RemoveAttribs( ULONG nPara, USHORT nWhich, BOOL bIdleFormatAndUpdate )
+void TextEngine::RemoveAttribs( sal_uLong nPara, sal_uInt16 nWhich, sal_Bool bIdleFormatAndUpdate )
{
if ( nPara < mpDoc->GetNodes().Count() )
{
@@ -2796,15 +2796,15 @@ void TextEngine::RemoveAttribs( ULONG nPara, USHORT nWhich, BOOL bIdleFormatAndU
if ( pNode->GetCharAttribs().Count() )
{
TextCharAttribList& rAttribs = pNode->GetCharAttribs();
- USHORT nAttrCount = rAttribs.Count();
- for(USHORT nAttr = nAttrCount; nAttr; --nAttr)
+ sal_uInt16 nAttrCount = rAttribs.Count();
+ for(sal_uInt16 nAttr = nAttrCount; nAttr; --nAttr)
{
if(rAttribs.GetAttrib( nAttr - 1 )->Which() == nWhich)
rAttribs.RemoveAttrib( nAttr -1 );
}
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara );
pTEParaPortion->MarkSelectionInvalid( 0, pNode->GetText().Len() );
- mbFormatted = FALSE;
+ mbFormatted = sal_False;
if(bIdleFormatAndUpdate)
IdleFormatAndUpdate( NULL, 0xFFFF );
else
@@ -2812,7 +2812,7 @@ void TextEngine::RemoveAttribs( ULONG nPara, USHORT nWhich, BOOL bIdleFormatAndU
}
}
}
-void TextEngine::RemoveAttrib( ULONG nPara, const TextCharAttrib& rAttrib )
+void TextEngine::RemoveAttrib( sal_uLong nPara, const TextCharAttrib& rAttrib )
{
if ( nPara < mpDoc->GetNodes().Count() )
{
@@ -2820,8 +2820,8 @@ void TextEngine::RemoveAttrib( ULONG nPara, const TextCharAttrib& rAttrib )
if ( pNode->GetCharAttribs().Count() )
{
TextCharAttribList& rAttribs = pNode->GetCharAttribs();
- USHORT nAttrCount = rAttribs.Count();
- for(USHORT nAttr = nAttrCount; nAttr; --nAttr)
+ sal_uInt16 nAttrCount = rAttribs.Count();
+ for(sal_uInt16 nAttr = nAttrCount; nAttr; --nAttr)
{
if(rAttribs.GetAttrib( nAttr - 1 ) == &rAttrib)
{
@@ -2831,13 +2831,13 @@ void TextEngine::RemoveAttrib( ULONG nPara, const TextCharAttrib& rAttrib )
}
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara );
pTEParaPortion->MarkSelectionInvalid( 0, pNode->GetText().Len() );
- mbFormatted = FALSE;
+ mbFormatted = sal_False;
FormatAndUpdate( NULL );
}
}
}
-void TextEngine::SetAttrib( const TextAttrib& rAttr, ULONG nPara, USHORT nStart, USHORT nEnd, BOOL bIdleFormatAndUpdate )
+void TextEngine::SetAttrib( const TextAttrib& rAttr, sal_uLong nPara, sal_uInt16 nStart, sal_uInt16 nEnd, sal_Bool bIdleFormatAndUpdate )
{
// Es wird hier erstmal nicht geprueft, ob sich Attribute ueberlappen!
// Diese Methode ist erstmal nur fuer einen Editor, der fuer eine Zeile
@@ -2851,7 +2851,7 @@ void TextEngine::SetAttrib( const TextAttrib& rAttr, ULONG nPara, USHORT nStart,
TextNode* pNode = mpDoc->GetNodes().GetObject( nPara );
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara );
- USHORT nMax = pNode->GetText().Len();
+ sal_uInt16 nMax = pNode->GetText().Len();
if ( nStart > nMax )
nStart = nMax;
if ( nEnd > nMax )
@@ -2860,7 +2860,7 @@ void TextEngine::SetAttrib( const TextAttrib& rAttr, ULONG nPara, USHORT nStart,
pNode->GetCharAttribs().InsertAttrib( new TextCharAttrib( rAttr, nStart, nEnd ) );
pTEParaPortion->MarkSelectionInvalid( nStart, nEnd );
- mbFormatted = FALSE;
+ mbFormatted = sal_False;
if ( bIdleFormatAndUpdate )
IdleFormatAndUpdate( NULL, 0xFFFF );
else
@@ -2887,14 +2887,14 @@ void TextEngine::ValidateSelection( TextSelection& rSel ) const
void TextEngine::ValidatePaM( TextPaM& rPaM ) const
{
- ULONG nMaxPara = mpDoc->GetNodes().Count() - 1;
+ sal_uLong nMaxPara = mpDoc->GetNodes().Count() - 1;
if ( rPaM.GetPara() > nMaxPara )
{
rPaM.GetPara() = nMaxPara;
rPaM.GetIndex() = 0xFFFF;
}
- USHORT nMaxIndex = GetTextLen( rPaM.GetPara() );
+ sal_uInt16 nMaxIndex = GetTextLen( rPaM.GetPara() );
if ( rPaM.GetIndex() > nMaxIndex )
rPaM.GetIndex() = nMaxIndex;
}
@@ -2902,18 +2902,18 @@ void TextEngine::ValidatePaM( TextPaM& rPaM ) const
// Status & Selektionsanpassung
-void TextEngine::ImpParagraphInserted( ULONG nPara )
+void TextEngine::ImpParagraphInserted( sal_uLong nPara )
{
// Die aktive View braucht nicht angepasst werden, aber bei allen
// passiven muss die Selektion angepasst werden:
if ( mpViews->Count() > 1 )
{
- for ( USHORT nView = mpViews->Count(); nView; )
+ for ( sal_uInt16 nView = mpViews->Count(); nView; )
{
TextView* pView = mpViews->GetObject( --nView );
if ( pView != GetActiveView() )
{
-// BOOL bInvers = pView->maSelection.GetEnd() < pView->maSelection.GetStart();
+// sal_Bool bInvers = pView->maSelection.GetEnd() < pView->maSelection.GetStart();
// TextPaM& rMin = !bInvers ? pView->maSelection.GetStart(): pView->maSelection.GetEnd();
// TextPaM& rMax = bInvers ? pView->maSelection.GetStart() : pView->maSelection.GetEnd();
//
@@ -2933,16 +2933,16 @@ void TextEngine::ImpParagraphInserted( ULONG nPara )
Broadcast( TextHint( TEXT_HINT_PARAINSERTED, nPara ) );
}
-void TextEngine::ImpParagraphRemoved( ULONG nPara )
+void TextEngine::ImpParagraphRemoved( sal_uLong nPara )
{
if ( mpViews->Count() > 1 )
{
- for ( USHORT nView = mpViews->Count(); nView; )
+ for ( sal_uInt16 nView = mpViews->Count(); nView; )
{
TextView* pView = mpViews->GetObject( --nView );
if ( pView != GetActiveView() )
{
- ULONG nParas = mpDoc->GetNodes().Count();
+ sal_uLong nParas = mpDoc->GetNodes().Count();
for ( int n = 0; n <= 1; n++ )
{
TextPaM& rPaM = n ? pView->GetSelection().GetStart(): pView->GetSelection().GetEnd();
@@ -2961,16 +2961,16 @@ void TextEngine::ImpParagraphRemoved( ULONG nPara )
Broadcast( TextHint( TEXT_HINT_PARAREMOVED, nPara ) );
}
-void TextEngine::ImpCharsRemoved( ULONG nPara, USHORT nPos, USHORT nChars )
+void TextEngine::ImpCharsRemoved( sal_uLong nPara, sal_uInt16 nPos, sal_uInt16 nChars )
{
if ( mpViews->Count() > 1 )
{
- for ( USHORT nView = mpViews->Count(); nView; )
+ for ( sal_uInt16 nView = mpViews->Count(); nView; )
{
TextView* pView = mpViews->GetObject( --nView );
if ( pView != GetActiveView() )
{
- USHORT nEnd = nPos+nChars;
+ sal_uInt16 nEnd = nPos+nChars;
for ( int n = 0; n <= 1; n++ )
{
TextPaM& rPaM = n ? pView->GetSelection().GetStart(): pView->GetSelection().GetEnd();
@@ -2988,11 +2988,11 @@ void TextEngine::ImpCharsRemoved( ULONG nPara, USHORT nPos, USHORT nChars )
Broadcast( TextHint( TEXT_HINT_PARACONTENTCHANGED, nPara ) );
}
-void TextEngine::ImpCharsInserted( ULONG nPara, USHORT nPos, USHORT nChars )
+void TextEngine::ImpCharsInserted( sal_uLong nPara, sal_uInt16 nPos, sal_uInt16 nChars )
{
if ( mpViews->Count() > 1 )
{
- for ( USHORT nView = mpViews->Count(); nView; )
+ for ( sal_uInt16 nView = mpViews->Count(); nView; )
{
TextView* pView = mpViews->GetObject( --nView );
if ( pView != GetActiveView() )
@@ -3012,7 +3012,7 @@ void TextEngine::ImpCharsInserted( ULONG nPara, USHORT nPos, USHORT nChars )
Broadcast( TextHint( TEXT_HINT_PARACONTENTCHANGED, nPara ) );
}
-void TextEngine::ImpFormattingParagraph( ULONG nPara )
+void TextEngine::ImpFormattingParagraph( sal_uLong nPara )
{
Broadcast( TextHint( TEXT_HINT_FORMATPARA, nPara ) );
}
@@ -3032,12 +3032,12 @@ void TextEngine::Draw( OutputDevice* pDev, const Point& rPos )
ImpPaint( pDev, rPos, NULL );
}
-void TextEngine::SetLeftMargin( USHORT n )
+void TextEngine::SetLeftMargin( sal_uInt16 n )
{
mpDoc->SetLeftMargin( n );
}
-USHORT TextEngine::GetLeftMargin() const
+sal_uInt16 TextEngine::GetLeftMargin() const
{
return mpDoc->GetLeftMargin();
}
@@ -3074,7 +3074,7 @@ LocaleDataWrapper* TextEngine::ImpGetLocaleDataWrapper()
return mpLocaleDataWrapper;
}
-void TextEngine::SetRightToLeft( BOOL bR2L )
+void TextEngine::SetRightToLeft( sal_Bool bR2L )
{
if ( mbRightToLeft != bR2L )
{
@@ -3085,7 +3085,7 @@ void TextEngine::SetRightToLeft( BOOL bR2L )
}
}
-void TextEngine::ImpInitWritingDirections( ULONG nPara )
+void TextEngine::ImpInitWritingDirections( sal_uLong nPara )
{
TEParaPortion* pParaPortion = mpTEParaPortions->GetObject( nPara );
TEWritingDirectionInfos& rInfos = pParaPortion->GetWritingDirectionInfos();
@@ -3112,10 +3112,10 @@ void TextEngine::ImpInitWritingDirections( ULONG nPara )
int32_t nEnd;
UBiDiLevel nCurrDir;
- for ( USHORT nIdx = 0; nIdx < nCount; ++nIdx )
+ for ( sal_uInt16 nIdx = 0; nIdx < nCount; ++nIdx )
{
ubidi_getLogicalRun( pBidi, nStart, &nEnd, &nCurrDir );
- rInfos.Insert( TEWritingDirectionInfo( nCurrDir, (USHORT)nStart, (USHORT)nEnd ), rInfos.Count() );
+ rInfos.Insert( TEWritingDirectionInfo( nCurrDir, (sal_uInt16)nStart, (sal_uInt16)nEnd ), rInfos.Count() );
nStart = nEnd;
}
@@ -3124,13 +3124,13 @@ void TextEngine::ImpInitWritingDirections( ULONG nPara )
// No infos mean no CTL and default dir is L2R...
if ( !rInfos.Count() )
- rInfos.Insert( TEWritingDirectionInfo( 0, 0, (USHORT)pParaPortion->GetNode()->GetText().Len() ), rInfos.Count() );
+ rInfos.Insert( TEWritingDirectionInfo( 0, 0, (sal_uInt16)pParaPortion->GetNode()->GetText().Len() ), rInfos.Count() );
}
-BYTE TextEngine::ImpGetRightToLeft( ULONG nPara, USHORT nPos, USHORT* pStart, USHORT* pEnd )
+sal_uInt8 TextEngine::ImpGetRightToLeft( sal_uLong nPara, sal_uInt16 nPos, sal_uInt16* pStart, sal_uInt16* pEnd )
{
- BYTE nRightToLeft = 0;
+ sal_uInt8 nRightToLeft = 0;
TextNode* pNode = mpDoc->GetNodes().GetObject( nPara );
if ( pNode && pNode->GetText().Len() )
@@ -3140,7 +3140,7 @@ BYTE TextEngine::ImpGetRightToLeft( ULONG nPara, USHORT nPos, USHORT* pStart, US
ImpInitWritingDirections( nPara );
TEWritingDirectionInfos& rDirInfos = pParaPortion->GetWritingDirectionInfos();
- for ( USHORT n = 0; n < rDirInfos.Count(); n++ )
+ for ( sal_uInt16 n = 0; n < rDirInfos.Count(); n++ )
{
if ( ( rDirInfos[n].nStartPos <= nPos ) && ( rDirInfos[n].nEndPos >= nPos ) )
{
@@ -3156,13 +3156,13 @@ BYTE TextEngine::ImpGetRightToLeft( ULONG nPara, USHORT nPos, USHORT* pStart, US
return nRightToLeft;
}
-long TextEngine::ImpGetPortionXOffset( ULONG nPara, TextLine* pLine, USHORT nTextPortion )
+long TextEngine::ImpGetPortionXOffset( sal_uLong nPara, TextLine* pLine, sal_uInt16 nTextPortion )
{
long nX = pLine->GetStartX();
TEParaPortion* pParaPortion = mpTEParaPortions->GetObject( nPara );
- for ( USHORT i = pLine->GetStartPortion(); i < nTextPortion; i++ )
+ for ( sal_uInt16 i = pLine->GetStartPortion(); i < nTextPortion; i++ )
{
TETextPortion* pPortion = pParaPortion->GetTextPortions().GetObject( i );
nX += pPortion->GetWidth();
@@ -3236,9 +3236,9 @@ long TextEngine::ImpGetPortionXOffset( ULONG nPara, TextLine* pLine, USHORT nTex
return nX;
}
-void TextEngine::ImpInitLayoutMode( OutputDevice* pOutDev, BOOL bDrawingR2LPortion )
+void TextEngine::ImpInitLayoutMode( OutputDevice* pOutDev, sal_Bool bDrawingR2LPortion )
{
- ULONG nLayoutMode = pOutDev->GetLayoutMode();
+ sal_uLong nLayoutMode = pOutDev->GetLayoutMode();
nLayoutMode &= ~(TEXT_LAYOUT_BIDI_RTL | TEXT_LAYOUT_COMPLEX_DISABLED | TEXT_LAYOUT_BIDI_STRONG );
if ( bDrawingR2LPortion )
@@ -3260,12 +3260,12 @@ TxtAlign TextEngine::ImpGetAlign() const
return eAlign;
}
-long TextEngine::ImpGetOutputOffset( ULONG nPara, TextLine* pLine, USHORT nIndex, USHORT nIndex2 )
+long TextEngine::ImpGetOutputOffset( sal_uLong nPara, TextLine* pLine, sal_uInt16 nIndex, sal_uInt16 nIndex2 )
{
TEParaPortion* pPortion = mpTEParaPortions->GetObject( nPara );
- USHORT nPortionStart;
- USHORT nPortion = pPortion->GetTextPortions().FindPortion( nIndex, nPortionStart, TRUE );
+ sal_uInt16 nPortionStart;
+ sal_uInt16 nPortion = pPortion->GetTextPortions().FindPortion( nIndex, nPortionStart, sal_True );
TETextPortion* pTextPortion = pPortion->GetTextPortions().GetObject( nPortion );
@@ -3286,7 +3286,7 @@ long TextEngine::ImpGetOutputOffset( ULONG nPara, TextLine* pLine, USHORT nIndex
nX = ImpGetXPos( nPara, pLine, nIndex, nIndex == nPortionStart );
if ( nIndex2 != nIndex )
{
- long nX2 = ImpGetXPos( nPara, pLine, nIndex2, FALSE );
+ long nX2 = ImpGetXPos( nPara, pLine, nIndex2, sal_False );
if ( ( !IsRightToLeft() && ( nX2 < nX ) ) ||
( IsRightToLeft() && ( nX2 > nX ) ) )
{
diff --git a/svtools/source/edit/textund2.hxx b/svtools/source/edit/textund2.hxx
index 18cf9331328e..ba559c3dc98c 100644
--- a/svtools/source/edit/textund2.hxx
+++ b/svtools/source/edit/textund2.hxx
@@ -33,13 +33,13 @@
class TextUndoDelPara : public TextUndo
{
private:
- BOOL mbDelObject;
- ULONG mnPara;
+ sal_Bool mbDelObject;
+ sal_uLong mnPara;
TextNode* mpNode; // Zeigt auf das gueltige, nicht zerstoerte Objekt!
public:
TYPEINFO();
- TextUndoDelPara( TextEngine* pTextEngine, TextNode* pNode, ULONG nPara );
+ TextUndoDelPara( TextEngine* pTextEngine, TextNode* pNode, sal_uLong nPara );
~TextUndoDelPara();
virtual void Undo();
@@ -50,12 +50,12 @@ public:
class TextUndoConnectParas : public TextUndo
{
private:
- ULONG mnPara;
- USHORT mnSepPos;
+ sal_uLong mnPara;
+ sal_uInt16 mnSepPos;
public:
TYPEINFO();
- TextUndoConnectParas( TextEngine* pTextEngine, ULONG nPara, USHORT nSepPos );
+ TextUndoConnectParas( TextEngine* pTextEngine, sal_uLong nPara, sal_uInt16 nSepPos );
~TextUndoConnectParas();
virtual void Undo();
@@ -66,12 +66,12 @@ public:
class TextUndoSplitPara : public TextUndo
{
private:
- ULONG mnPara;
- USHORT mnSepPos;
+ sal_uLong mnPara;
+ sal_uInt16 mnSepPos;
public:
TYPEINFO();
- TextUndoSplitPara( TextEngine* pTextEngine, ULONG nPara, USHORT nSepPos );
+ TextUndoSplitPara( TextEngine* pTextEngine, sal_uLong nPara, sal_uInt16 nSepPos );
~TextUndoSplitPara();
virtual void Undo();
@@ -95,7 +95,7 @@ public:
virtual void Undo();
virtual void Redo();
- virtual BOOL Merge( SfxUndoAction *pNextAction );
+ virtual sal_Bool Merge( SfxUndoAction *pNextAction );
};
@@ -123,9 +123,9 @@ private:
TextSelection maSelection;
// SfxItemSet aNewAttribs;
// TextInfoArray aPrevAttribs;
-// BYTE nSpecial;
-// BOOL bSetIsRemove;
-// USHORT nRemoveWhich;
+// sal_uInt8 nSpecial;
+// sal_Bool bSetIsRemove;
+// sal_uInt16 nRemoveWhich;
//
// void ImpSetSelection( TextView* pView );
@@ -137,9 +137,9 @@ public:
// TextInfoArray& GetTextInfos() { return aPrevAttribs; }
// SfxItemSet& GetNewAttribs() { return aNewAttribs; }
-// void SetSpecial( BYTE n ) { nSpecial = n; }
-// void SetRemoveAttribs( BOOL b ) { bSetIsRemove = b; }
-// void SetRemoveWhich( USHORT n ) { nRemoveWhich = n; }
+// void SetSpecial( sal_uInt8 n ) { nSpecial = n; }
+// void SetRemoveAttribs( sal_Bool b ) { bSetIsRemove = b; }
+// void SetRemoveWhich( sal_uInt16 n ) { nRemoveWhich = n; }
virtual void Undo();
virtual void Redo();
diff --git a/svtools/source/edit/textundo.cxx b/svtools/source/edit/textundo.cxx
index 4c243de16c31..742c3ed4c707 100644
--- a/svtools/source/edit/textundo.cxx
+++ b/svtools/source/edit/textundo.cxx
@@ -54,33 +54,33 @@ TextUndoManager::~TextUndoManager()
{
}
-BOOL __EXPORT TextUndoManager::Undo( USHORT nCount )
+sal_Bool __EXPORT TextUndoManager::Undo()
{
if ( GetUndoActionCount() == 0 )
- return FALSE;
+ return sal_False;
UndoRedoStart();
- mpTextEngine->SetIsInUndo( TRUE );
- BOOL bDone = SfxUndoManager::Undo( nCount );
- mpTextEngine->SetIsInUndo( FALSE );
+ mpTextEngine->SetIsInUndo( sal_True );
+ sal_Bool bDone = SfxUndoManager::Undo();
+ mpTextEngine->SetIsInUndo( sal_False );
UndoRedoEnd();
return bDone;
}
-BOOL __EXPORT TextUndoManager::Redo( USHORT nCount )
+sal_Bool __EXPORT TextUndoManager::Redo()
{
if ( GetRedoActionCount() == 0 )
- return FALSE;
+ return sal_False;
UndoRedoStart();
- mpTextEngine->SetIsInUndo( TRUE );
- BOOL bDone = SfxUndoManager::Redo( nCount );
- mpTextEngine->SetIsInUndo( FALSE );
+ mpTextEngine->SetIsInUndo( sal_True );
+ sal_Bool bDone = SfxUndoManager::Redo();
+ mpTextEngine->SetIsInUndo( sal_False );
UndoRedoEnd();
@@ -110,9 +110,8 @@ void TextUndoManager::UndoRedoEnd()
}
-TextUndo::TextUndo( USHORT nI, TextEngine* p )
+TextUndo::TextUndo( TextEngine* p )
{
- mnId = nI;
mpTextEngine = p;
}
@@ -120,12 +119,6 @@ TextUndo::~TextUndo()
{
}
-USHORT __EXPORT TextUndo::GetId() const
-{
- //nId sollte mal entfallen => GetId ueberall ueberladen...
- return mnId;
-}
-
XubString __EXPORT TextUndo::GetComment() const
{
// return mpTextEngine->GetUndoComment( this );
@@ -139,12 +132,12 @@ void TextUndo::SetSelection( const TextSelection& rSel )
}
-TextUndoDelPara::TextUndoDelPara( TextEngine* pTextEngine, TextNode* pNode, ULONG nPara )
- : TextUndo( TEXTUNDO_DELCONTENT, pTextEngine )
+TextUndoDelPara::TextUndoDelPara( TextEngine* pTextEngine, TextNode* pNode, sal_uLong nPara )
+ : TextUndo( pTextEngine )
{
mpNode = pNode;
mnPara = nPara;
- mbDelObject = TRUE;
+ mbDelObject = sal_True;
}
TextUndoDelPara::~TextUndoDelPara()
@@ -156,7 +149,7 @@ TextUndoDelPara::~TextUndoDelPara()
void __EXPORT TextUndoDelPara::Undo()
{
GetTextEngine()->InsertContent( mpNode, mnPara );
- mbDelObject = FALSE; // gehoert wieder der Engine
+ mbDelObject = sal_False; // gehoert wieder der Engine
if ( GetView() )
{
@@ -178,10 +171,10 @@ void __EXPORT TextUndoDelPara::Redo()
GetDoc()->GetNodes().Remove( mnPara );
GetTextEngine()->ImpParagraphRemoved( mnPara );
- mbDelObject = TRUE; // gehoert wieder dem Undo
+ mbDelObject = sal_True; // gehoert wieder dem Undo
- ULONG nParas = GetDoc()->GetNodes().Count();
- ULONG n = mnPara < nParas ? mnPara : (nParas-1);
+ sal_uLong nParas = GetDoc()->GetNodes().Count();
+ sal_uLong n = mnPara < nParas ? mnPara : (nParas-1);
TextNode* pN = GetDoc()->GetNodes().GetObject( n );
TextPaM aPaM( n, pN->GetText().Len() );
SetSelection( aPaM );
@@ -190,8 +183,8 @@ void __EXPORT TextUndoDelPara::Redo()
// -----------------------------------------------------------------------
// TextUndoConnectParas
// ------------------------------------------------------------------------
-TextUndoConnectParas::TextUndoConnectParas( TextEngine* pTextEngine, ULONG nPara, USHORT nPos )
- : TextUndo( TEXTUNDO_CONNECTPARAS, pTextEngine )
+TextUndoConnectParas::TextUndoConnectParas( TextEngine* pTextEngine, sal_uLong nPara, sal_uInt16 nPos )
+ : TextUndo( pTextEngine )
{
mnPara = nPara;
mnSepPos = nPos;
@@ -214,8 +207,8 @@ void __EXPORT TextUndoConnectParas::Redo()
}
-TextUndoSplitPara::TextUndoSplitPara( TextEngine* pTextEngine, ULONG nPara, USHORT nPos )
- : TextUndo( TEXTUNDO_SPLITPARA, pTextEngine )
+TextUndoSplitPara::TextUndoSplitPara( TextEngine* pTextEngine, sal_uLong nPara, sal_uInt16 nPos )
+ : TextUndo( pTextEngine )
{
mnPara = nPara;
mnSepPos = nPos;
@@ -239,7 +232,7 @@ void __EXPORT TextUndoSplitPara::Redo()
TextUndoInsertChars::TextUndoInsertChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const XubString& rStr )
- : TextUndo( TEXTUNDO_INSERTCHARS, pTextEngine ),
+ : TextUndo( pTextEngine ),
maTextPaM( rTextPaM ), maText( rStr )
{
}
@@ -261,27 +254,27 @@ void __EXPORT TextUndoInsertChars::Redo()
SetSelection( TextSelection( aSel.GetStart(), aNewPaM ) );
}
-BOOL __EXPORT TextUndoInsertChars::Merge( SfxUndoAction* pNextAction )
+sal_Bool __EXPORT TextUndoInsertChars::Merge( SfxUndoAction* pNextAction )
{
if ( !pNextAction->ISA( TextUndoInsertChars ) )
- return FALSE;
+ return sal_False;
TextUndoInsertChars* pNext = (TextUndoInsertChars*)pNextAction;
if ( maTextPaM.GetPara() != pNext->maTextPaM.GetPara() )
- return FALSE;
+ return sal_False;
if ( ( maTextPaM.GetIndex() + maText.Len() ) == pNext->maTextPaM.GetIndex() )
{
maText += pNext->maText;
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
TextUndoRemoveChars::TextUndoRemoveChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const XubString& rStr )
- : TextUndo( TEXTUNDO_REMOVECHARS, pTextEngine ),
+ : TextUndo( pTextEngine ),
maTextPaM( rTextPaM ), maText( rStr )
{
}
@@ -304,11 +297,11 @@ void __EXPORT TextUndoRemoveChars::Redo()
TextUndoSetAttribs::TextUndoSetAttribs( TextEngine* pTextEngine, const TextSelection& rSel )
- : TextUndo( TEXTUNDO_ATTRIBS, pTextEngine ), maSelection( rSel )
+ : TextUndo( pTextEngine ), maSelection( rSel )
{
maSelection.Justify();
// aNewAttribs.Set( rNewItems );
-// mbSetIsRemove = FALSE;
+// mbSetIsRemove = sal_False;
// mnRemoveWhich = 0;
// mnSpecial = 0;
}
@@ -320,12 +313,12 @@ TextUndoSetAttribs::~TextUndoSetAttribs()
void __EXPORT TextUndoSetAttribs::Undo()
{
- for ( ULONG nPara = maSelection.GetStart().GetPara(); nPara <= maSelection.GetEnd().GetPara(); nPara++ )
+ for ( sal_uLong nPara = maSelection.GetStart().GetPara(); nPara <= maSelection.GetEnd().GetPara(); nPara++ )
{
-// ContentAttribsInfo* pInf = aPrevAttribs[ (USHORT)(nPara-aESel.nStartPara) ];
+// ContentAttribsInfo* pInf = aPrevAttribs[ (sal_uInt16)(nPara-aESel.nStartPara) ];
// GetTextEngine()->RemoveCharAttribs( nPara );
// TextNode* pNode = GetTextEngine()->GetTextDoc().GetObject( nPara );
-// for ( USHORT nAttr = 0; nAttr < pInf->GetPrevCharAttribs().Count(); nAttr++ )
+// for ( sal_uInt16 nAttr = 0; nAttr < pInf->GetPrevCharAttribs().Count(); nAttr++ )
// {
// GetTextEngine()->GetTextDoc().InsertAttrib( pNode, pX->GetStart(), pX->GetEnd(), *pX->GetItem() );
// }
diff --git a/svtools/source/edit/textundo.hxx b/svtools/source/edit/textundo.hxx
index cc26c0b51ef6..357331057aeb 100644
--- a/svtools/source/edit/textundo.hxx
+++ b/svtools/source/edit/textundo.hxx
@@ -47,16 +47,15 @@ public:
~TextUndoManager();
using SfxUndoManager::Undo;
- virtual BOOL Undo( USHORT nCount=1 );
+ virtual sal_Bool Undo();
using SfxUndoManager::Redo;
- virtual BOOL Redo( USHORT nCount=1 );
+ virtual sal_Bool Redo();
};
class TextUndo : public SfxUndoAction
{
private:
- USHORT mnId;
TextEngine* mpTextEngine;
protected:
@@ -69,7 +68,7 @@ protected:
public:
TYPEINFO();
- TextUndo( USHORT nId, TextEngine* pTextEngine );
+ TextUndo( TextEngine* pTextEngine );
virtual ~TextUndo();
TextEngine* GetTextEngine() const { return mpTextEngine; }
@@ -78,7 +77,6 @@ public:
virtual void Redo() = 0;
virtual XubString GetComment() const;
- virtual USHORT GetId() const;
};
#endif // _TEXTUNDO_HXX
diff --git a/svtools/source/edit/textview.cxx b/svtools/source/edit/textview.cxx
index 48cd23bdcc6f..0b4fb6ee2ca5 100644
--- a/svtools/source/edit/textview.cxx
+++ b/svtools/source/edit/textview.cxx
@@ -124,7 +124,7 @@ uno::Any TETextDataObject::getTransferData( const datatransfer::DataFlavor& rFla
{
uno::Any aAny;
- ULONG nT = SotExchange::GetFormat( rFlavor );
+ sal_uLong nT = SotExchange::GetFormat( rFlavor );
if ( nT == SOT_FORMAT_STRING )
{
aAny <<= (::rtl::OUString)GetText();
@@ -132,7 +132,7 @@ uno::Any TETextDataObject::getTransferData( const datatransfer::DataFlavor& rFla
else if ( nT == SOT_FORMATSTR_ID_HTML )
{
GetHTMLStream().Seek( STREAM_SEEK_TO_END );
- ULONG nLen = GetHTMLStream().Tell();
+ sal_uLong nLen = GetHTMLStream().Tell();
GetHTMLStream().Seek(0);
uno::Sequence< sal_Int8 > aSeq( nLen );
@@ -149,7 +149,7 @@ uno::Any TETextDataObject::getTransferData( const datatransfer::DataFlavor& rFla
uno::Sequence< datatransfer::DataFlavor > TETextDataObject::getTransferDataFlavors( ) throw(uno::RuntimeException)
{
GetHTMLStream().Seek( STREAM_SEEK_TO_END );
- BOOL bHTML = GetHTMLStream().Tell() > 0;
+ sal_Bool bHTML = GetHTMLStream().Tell() > 0;
uno::Sequence< datatransfer::DataFlavor > aDataFlavors( bHTML ? 2 : 1 );
SotExchange::GetFormatDataFlavor( SOT_FORMAT_STRING, aDataFlavors.getArray()[0] );
if ( bHTML )
@@ -159,7 +159,7 @@ uno::Sequence< datatransfer::DataFlavor > TETextDataObject::getTransferDataFlavo
sal_Bool TETextDataObject::isDataFlavorSupported( const datatransfer::DataFlavor& rFlavor ) throw(uno::RuntimeException)
{
- ULONG nT = SotExchange::GetFormat( rFlavor );
+ sal_uLong nT = SotExchange::GetFormat( rFlavor );
return ( nT == SOT_FORMAT_STRING );
}
@@ -186,17 +186,17 @@ struct ImpTextView
::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSourceListener > mxDnDListener;
- USHORT mnTravelXPos;
-
- BOOL mbAutoScroll : 1;
- BOOL mbInsertMode : 1;
- BOOL mbReadOnly : 1;
- BOOL mbPaintSelection : 1;
- BOOL mbAutoIndent : 1;
- BOOL mbHighlightSelection : 1;
- BOOL mbCursorEnabled : 1;
- BOOL mbClickedInSelection : 1;
- BOOL mbSupportProtectAttribute : 1;
+ sal_uInt16 mnTravelXPos;
+
+ sal_Bool mbAutoScroll : 1;
+ sal_Bool mbInsertMode : 1;
+ sal_Bool mbReadOnly : 1;
+ sal_Bool mbPaintSelection : 1;
+ sal_Bool mbAutoIndent : 1;
+ sal_Bool mbHighlightSelection : 1;
+ sal_Bool mbCursorEnabled : 1;
+ sal_Bool mbClickedInSelection : 1;
+ sal_Bool mbSupportProtectAttribute : 1;
bool mbCursorAtEndOfLine;
};
@@ -206,30 +206,30 @@ struct ImpTextView
TextView::TextView( TextEngine* pEng, Window* pWindow ) :
mpImpl(new ImpTextView)
{
- pWindow->EnableRTL( FALSE );
+ pWindow->EnableRTL( sal_False );
mpImpl->mpWindow = pWindow;
mpImpl->mpTextEngine = pEng;
mpImpl->mpVirtDev = NULL;
- mpImpl->mbPaintSelection = TRUE;
- mpImpl->mbAutoScroll = TRUE;
- mpImpl->mbInsertMode = TRUE;
- mpImpl->mbReadOnly = FALSE;
- mpImpl->mbHighlightSelection = FALSE;
- mpImpl->mbAutoIndent = FALSE;
- mpImpl->mbCursorEnabled = TRUE;
- mpImpl->mbClickedInSelection = FALSE;
- mpImpl->mbSupportProtectAttribute = FALSE;
+ mpImpl->mbPaintSelection = sal_True;
+ mpImpl->mbAutoScroll = sal_True;
+ mpImpl->mbInsertMode = sal_True;
+ mpImpl->mbReadOnly = sal_False;
+ mpImpl->mbHighlightSelection = sal_False;
+ mpImpl->mbAutoIndent = sal_False;
+ mpImpl->mbCursorEnabled = sal_True;
+ mpImpl->mbClickedInSelection = sal_False;
+ mpImpl->mbSupportProtectAttribute = sal_False;
mpImpl->mbCursorAtEndOfLine = false;
-// mbInSelection = FALSE;
+// mbInSelection = sal_False;
mpImpl->mnTravelXPos = TRAVEL_X_DONTKNOW;
mpImpl->mpSelFuncSet = new TextSelFunctionSet( this );
mpImpl->mpSelEngine = new SelectionEngine( mpImpl->mpWindow, mpImpl->mpSelFuncSet );
mpImpl->mpSelEngine->SetSelectionMode( RANGE_SELECTION );
- mpImpl->mpSelEngine->EnableDrag( TRUE );
+ mpImpl->mpSelEngine->EnableDrag( sal_True );
mpImpl->mpCursor = new Cursor;
mpImpl->mpCursor->Show();
@@ -237,7 +237,7 @@ TextView::TextView( TextEngine* pEng, Window* pWindow ) :
pWindow->SetInputContext( InputContext( pEng->GetFont(), INPUTCONTEXT_TEXT|INPUTCONTEXT_EXTTEXTINPUT ) );
if ( pWindow->GetSettings().GetStyleSettings().GetSelectionOptions() & SELECTION_OPTION_INVERT )
- mpImpl->mbHighlightSelection = TRUE;
+ mpImpl->mbHighlightSelection = sal_True;
pWindow->SetLineColor();
@@ -275,7 +275,7 @@ void TextView::Invalidate()
mpImpl->mpWindow->Invalidate();
}
-void TextView::SetSelection( const TextSelection& rTextSel, BOOL bGotoCursor )
+void TextView::SetSelection( const TextSelection& rTextSel, sal_Bool bGotoCursor )
{
// Falls jemand gerade ein leeres Attribut hinterlassen hat,
// und dann der Outliner die Selektion manipulitert:
@@ -311,9 +311,9 @@ void TextView::DeleteSelected()
{
// HideSelection();
- mpImpl->mpTextEngine->UndoActionStart( TEXTUNDO_DELETE );
+ mpImpl->mpTextEngine->UndoActionStart();
TextPaM aPaM = mpImpl->mpTextEngine->ImpDeleteText( mpImpl->maSelection );
- mpImpl->mpTextEngine->UndoActionEnd( TEXTUNDO_DELETE );
+ mpImpl->mpTextEngine->UndoActionEnd();
ImpSetSelection( aPaM );
mpImpl->mpTextEngine->FormatAndUpdate( this );
@@ -345,10 +345,10 @@ void TextView::ImpPaint( OutputDevice* pOut, const Point& rStartPos, Rectangle c
void TextView::Paint( const Rectangle& rRect )
{
- ImpPaint( rRect, FALSE );
+ ImpPaint( rRect, sal_False );
}
-void TextView::ImpPaint( const Rectangle& rRect, BOOL bUseVirtDev )
+void TextView::ImpPaint( const Rectangle& rRect, sal_Bool bUseVirtDev )
{
if ( !mpImpl->mpTextEngine->GetUpdateMode() || mpImpl->mpTextEngine->IsInUndo() )
return;
@@ -367,7 +367,7 @@ void TextView::ImpPaint( const Rectangle& rRect, BOOL bUseVirtDev )
if ( pVDev->GetBackground().GetColor() != rBackgroundColor )
pVDev->SetBackground( rBackgroundColor );
- BOOL bVDevValid = TRUE;
+ sal_Bool bVDevValid = sal_True;
Size aOutSz( pVDev->GetOutputSizePixel() );
if ( ( aOutSz.Width() < rRect.GetWidth() ) ||
( aOutSz.Height() < rRect.GetHeight() ) )
@@ -390,7 +390,7 @@ void TextView::ImpPaint( const Rectangle& rRect, BOOL bUseVirtDev )
}
if ( !bVDevValid )
{
- ImpPaint( rRect, FALSE /* ohne VDev */ );
+ ImpPaint( rRect, sal_False /* ohne VDev */ );
return;
}
@@ -428,27 +428,27 @@ void TextView::ImpHighlight( const TextSelection& rSel )
Rectangle aVisArea( mpImpl->maStartDocPos, mpImpl->mpWindow->GetOutputSizePixel() );
long nY = 0;
- ULONG nStartPara = aSel.GetStart().GetPara();
- ULONG nEndPara = aSel.GetEnd().GetPara();
- for ( ULONG nPara = 0; nPara <= nEndPara; nPara++ )
+ sal_uLong nStartPara = aSel.GetStart().GetPara();
+ sal_uLong nEndPara = aSel.GetEnd().GetPara();
+ for ( sal_uLong nPara = 0; nPara <= nEndPara; nPara++ )
{
long nParaHeight = (long)mpImpl->mpTextEngine->CalcParaHeight( nPara );
if ( ( nPara >= nStartPara ) && ( ( nY + nParaHeight ) > aVisArea.Top() ) )
{
TEParaPortion* pTEParaPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( nPara );
- USHORT nStartLine = 0;
- USHORT nEndLine = pTEParaPortion->GetLines().Count() -1;
+ sal_uInt16 nStartLine = 0;
+ sal_uInt16 nEndLine = pTEParaPortion->GetLines().Count() -1;
if ( nPara == nStartPara )
- nStartLine = pTEParaPortion->GetLineNumber( aSel.GetStart().GetIndex(), FALSE );
+ nStartLine = pTEParaPortion->GetLineNumber( aSel.GetStart().GetIndex(), sal_False );
if ( nPara == nEndPara )
- nEndLine = pTEParaPortion->GetLineNumber( aSel.GetEnd().GetIndex(), TRUE );
+ nEndLine = pTEParaPortion->GetLineNumber( aSel.GetEnd().GetIndex(), sal_True );
// ueber die Zeilen iterieren....
- for ( USHORT nLine = nStartLine; nLine <= nEndLine; nLine++ )
+ for ( sal_uInt16 nLine = nStartLine; nLine <= nEndLine; nLine++ )
{
TextLine* pLine = pTEParaPortion->GetLines().GetObject( nLine );
- USHORT nStartIndex = pLine->GetStart();
- USHORT nEndIndex = pLine->GetEnd();
+ sal_uInt16 nStartIndex = pLine->GetStart();
+ sal_uInt16 nEndIndex = pLine->GetEnd();
if ( ( nPara == nStartPara ) && ( nLine == nStartLine ) )
nStartIndex = aSel.GetStart().GetIndex();
if ( ( nPara == nEndPara ) && ( nLine == nEndLine ) )
@@ -458,12 +458,12 @@ void TextView::ImpHighlight( const TextSelection& rSel )
if ( nEndIndex < nStartIndex )
nEndIndex = nStartIndex;
- Rectangle aTmpRec( mpImpl->mpTextEngine->GetEditCursor( TextPaM( nPara, nStartIndex ), FALSE ) );
+ Rectangle aTmpRec( mpImpl->mpTextEngine->GetEditCursor( TextPaM( nPara, nStartIndex ), sal_False ) );
aTmpRec.Top() += nY;
aTmpRec.Bottom() += nY;
Point aTopLeft( aTmpRec.TopLeft() );
- aTmpRec = mpImpl->mpTextEngine->GetEditCursor( TextPaM( nPara, nEndIndex ), TRUE );
+ aTmpRec = mpImpl->mpTextEngine->GetEditCursor( TextPaM( nPara, nEndIndex ), sal_True );
aTmpRec.Top() += nY;
aTmpRec.Bottom() += nY;
Point aBottomRight( aTmpRec.BottomRight() );
@@ -499,20 +499,20 @@ void TextView::ImpSetSelection( const TextSelection& rSelection )
void TextView::ShowSelection()
{
- ImpShowHideSelection( TRUE );
+ ImpShowHideSelection( sal_True );
}
void TextView::HideSelection()
{
- ImpShowHideSelection( FALSE );
+ ImpShowHideSelection( sal_False );
}
void TextView::ShowSelection( const TextSelection& rRange )
{
- ImpShowHideSelection( TRUE, &rRange );
+ ImpShowHideSelection( sal_True, &rRange );
}
-void TextView::ImpShowHideSelection( BOOL bShow, const TextSelection* pRange )
+void TextView::ImpShowHideSelection( sal_Bool bShow, const TextSelection* pRange )
{
const TextSelection* pRangeOrSelection = pRange ? pRange : &mpImpl->maSelection;
@@ -532,7 +532,7 @@ void TextView::ImpShowHideSelection( BOOL bShow, const TextSelection* pRange )
Point aStartPos( ImpGetOutputStartPos( mpImpl->maStartDocPos ) );
TextSelection aRange( *pRangeOrSelection );
aRange.Justify();
- BOOL bVisCursor = mpImpl->mpCursor->IsVisible();
+ sal_Bool bVisCursor = mpImpl->mpCursor->IsVisible();
mpImpl->mpCursor->Hide();
ImpPaint( mpImpl->mpWindow, aStartPos, &aOutArea, &aRange, bShow ? &mpImpl->maSelection : NULL );
if ( bVisCursor )
@@ -558,24 +558,24 @@ void TextView::EraseVirtualDevice()
mpImpl->mpVirtDev = 0;
}
-BOOL TextView::KeyInput( const KeyEvent& rKeyEvent )
+sal_Bool TextView::KeyInput( const KeyEvent& rKeyEvent )
{
- BOOL bDone = TRUE;
- BOOL bModified = FALSE;
- BOOL bMoved = FALSE;
- BOOL bEndKey = FALSE; // spezielle CursorPosition
- BOOL bAllowIdle = TRUE;
+ sal_Bool bDone = sal_True;
+ sal_Bool bModified = sal_False;
+ sal_Bool bMoved = sal_False;
+ sal_Bool bEndKey = sal_False; // spezielle CursorPosition
+ sal_Bool bAllowIdle = sal_True;
// Um zu pruefen ob durch irgendeine Aktion mModified, das lokale
// bModified wird z.B. bei Cut/Paste nicht gesetzt, weil dort an anderen
// Stellen das updaten erfolgt.
- BOOL bWasModified = mpImpl->mpTextEngine->IsModified();
- mpImpl->mpTextEngine->SetModified( FALSE );
+ sal_Bool bWasModified = mpImpl->mpTextEngine->IsModified();
+ mpImpl->mpTextEngine->SetModified( sal_False );
TextSelection aCurSel( mpImpl->maSelection );
TextSelection aOldSel( aCurSel );
- USHORT nCode = rKeyEvent.GetKeyCode().GetCode();
+ sal_uInt16 nCode = rKeyEvent.GetKeyCode().GetCode();
KeyFuncType eFunc = rKeyEvent.GetKeyCode().GetFunction();
if ( eFunc != KEYFUNC_DONTKNOW )
{
@@ -652,12 +652,12 @@ BOOL TextView::KeyInput( const KeyEvent& rKeyEvent )
uno::Reference<datatransfer::clipboard::XClipboard> aSelection(GetWindow()->GetPrimarySelection());
Copy( aSelection );
}
- bMoved = TRUE;
+ bMoved = sal_True;
if ( nCode == KEY_END )
- bEndKey = TRUE;
+ bEndKey = sal_True;
}
else
- bDone = FALSE;
+ bDone = sal_False;
}
break;
case KEY_BACKSPACE:
@@ -669,8 +669,8 @@ BOOL TextView::KeyInput( const KeyEvent& rKeyEvent )
{
if ( !mpImpl->mbReadOnly && !rKeyEvent.GetKeyCode().IsMod2() )
{
- BYTE nDel = ( nCode == KEY_DELETE ) ? DEL_RIGHT : DEL_LEFT;
- BYTE nMode = rKeyEvent.GetKeyCode().IsMod1() ? DELMODE_RESTOFWORD : DELMODE_SIMPLE;
+ sal_uInt8 nDel = ( nCode == KEY_DELETE ) ? DEL_RIGHT : DEL_LEFT;
+ sal_uInt8 nMode = rKeyEvent.GetKeyCode().IsMod1() ? DELMODE_RESTOFWORD : DELMODE_SIMPLE;
if ( ( nMode == DELMODE_RESTOFWORD ) && rKeyEvent.GetKeyCode().IsShift() )
nMode = DELMODE_RESTOFCONTENT;
@@ -695,7 +695,7 @@ BOOL TextView::KeyInput( const KeyEvent& rKeyEvent )
default: break;
}
- mpImpl->mpTextEngine->UndoActionStart( TEXTUNDO_DELETE );
+ mpImpl->mpTextEngine->UndoActionStart();
if(mpImpl->mbSupportProtectAttribute)
{
//expand selection to include all protected content - if there is any
@@ -717,12 +717,12 @@ BOOL TextView::KeyInput( const KeyEvent& rKeyEvent )
}
}
aCurSel = ImpDelete( nDel, nMode );
- mpImpl->mpTextEngine->UndoActionEnd( TEXTUNDO_DELETE );
- bModified = TRUE;
- bAllowIdle = FALSE;
+ mpImpl->mpTextEngine->UndoActionEnd();
+ bModified = sal_True;
+ bAllowIdle = sal_False;
}
else
- bDone = FALSE;
+ bDone = sal_False;
}
break;
case KEY_TAB:
@@ -732,10 +732,10 @@ BOOL TextView::KeyInput( const KeyEvent& rKeyEvent )
ImplCheckTextLen( 'x' ) )
{
aCurSel = mpImpl->mpTextEngine->ImpInsertText( aCurSel, '\t', !IsInsertMode() );
- bModified = TRUE;
+ bModified = sal_True;
}
else
- bDone = FALSE;
+ bDone = sal_False;
}
break;
case KEY_RETURN:
@@ -745,12 +745,12 @@ BOOL TextView::KeyInput( const KeyEvent& rKeyEvent )
if ( !mpImpl->mbReadOnly && !rKeyEvent.GetKeyCode().IsMod1() &&
!rKeyEvent.GetKeyCode().IsMod2() && ImplCheckTextLen( 'x' ) )
{
- mpImpl->mpTextEngine->UndoActionStart( TEXTUNDO_INSERT );
+ mpImpl->mpTextEngine->UndoActionStart();
aCurSel = mpImpl->mpTextEngine->ImpInsertParaBreak( aCurSel );
if ( mpImpl->mbAutoIndent )
{
TextNode* pPrev = mpImpl->mpTextEngine->mpDoc->GetNodes().GetObject( aCurSel.GetEnd().GetPara() - 1 );
- USHORT n = 0;
+ sal_uInt16 n = 0;
while ( ( n < pPrev->GetText().Len() ) && (
( pPrev->GetText().GetChar( n ) == ' ' ) ||
( pPrev->GetText().GetChar( n ) == '\t' ) ) )
@@ -760,11 +760,11 @@ BOOL TextView::KeyInput( const KeyEvent& rKeyEvent )
if ( n )
aCurSel = mpImpl->mpTextEngine->ImpInsertText( aCurSel, pPrev->GetText().Copy( 0, n ) );
}
- mpImpl->mpTextEngine->UndoActionEnd( TEXTUNDO_INSERT );
- bModified = TRUE;
+ mpImpl->mpTextEngine->UndoActionEnd();
+ bModified = sal_True;
}
else
- bDone = FALSE;
+ bDone = sal_False;
}
break;
case KEY_INSERT:
@@ -781,11 +781,11 @@ BOOL TextView::KeyInput( const KeyEvent& rKeyEvent )
if ( !mpImpl->mbReadOnly && ImplCheckTextLen( nCharCode ) ) // sonst trotzdem das Zeichen schlucken...
{
aCurSel = mpImpl->mpTextEngine->ImpInsertText( nCharCode, aCurSel, !IsInsertMode(), sal_True );
- bModified = TRUE;
+ bModified = sal_True;
}
}
else
- bDone = FALSE;
+ bDone = sal_False;
}
}
}
@@ -809,20 +809,20 @@ BOOL TextView::KeyInput( const KeyEvent& rKeyEvent )
else if ( bMoved )
{
// Selection wird jetzt gezielt in ImpMoveCursor gemalt.
- ImpShowCursor( mpImpl->mbAutoScroll, TRUE, bEndKey );
+ ImpShowCursor( mpImpl->mbAutoScroll, sal_True, bEndKey );
}
if ( mpImpl->mpTextEngine->IsModified() )
mpImpl->mpTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
else if ( bWasModified )
- mpImpl->mpTextEngine->SetModified( TRUE );
+ mpImpl->mpTextEngine->SetModified( sal_True );
return bDone;
}
void TextView::MouseButtonUp( const MouseEvent& rMouseEvent )
{
- mpImpl->mbClickedInSelection = FALSE;
+ mpImpl->mbClickedInSelection = sal_False;
mpImpl->mnTravelXPos = TRAVEL_X_DONTKNOW;
mpImpl->mpSelEngine->SelMouseButtonUp( rMouseEvent );
if ( rMouseEvent.IsMiddle() && !IsReadOnly() &&
@@ -876,18 +876,18 @@ void TextView::MouseButtonDown( const MouseEvent& rMouseEvent )
uno::Reference < i18n::XBreakIterator > xBI = mpImpl->mpTextEngine->GetBreakIterator();
i18n::Boundary aBoundary = xBI->getWordBoundary( pNode->GetText(), mpImpl->maSelection.GetEnd().GetIndex(), mpImpl->mpTextEngine->GetLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES, sal_True );
TextSelection aNewSel( mpImpl->maSelection );
- aNewSel.GetStart().GetIndex() = (USHORT)aBoundary.startPos;
- aNewSel.GetEnd().GetIndex() = (USHORT)aBoundary.endPos;
+ aNewSel.GetStart().GetIndex() = (sal_uInt16)aBoundary.startPos;
+ aNewSel.GetEnd().GetIndex() = (sal_uInt16)aBoundary.endPos;
if(mpImpl->mbSupportProtectAttribute)
{
//expand selection to include all protected content - if there is any
const TextCharAttrib* pStartAttr = mpImpl->mpTextEngine->FindCharAttrib(
TextPaM(aNewSel.GetStart().GetPara(),
- (USHORT)aBoundary.startPos),
+ (sal_uInt16)aBoundary.startPos),
TEXTATTR_PROTECTED );
const TextCharAttrib* pEndAttr = mpImpl->mpTextEngine->FindCharAttrib(
TextPaM(aNewSel.GetEnd().GetPara(),
- (USHORT)aBoundary.endPos),
+ (sal_uInt16)aBoundary.endPos),
TEXTATTR_PROTECTED );
if(pStartAttr && pStartAttr->GetStart() < aNewSel.GetStart().GetIndex())
{
@@ -900,7 +900,7 @@ void TextView::MouseButtonDown( const MouseEvent& rMouseEvent )
}
ImpSetSelection( aNewSel );
ShowSelection();
- ShowCursor( TRUE, TRUE );
+ ShowCursor( sal_True, sal_True );
}
}
else if ( rMouseEvent.GetClicks() == 3 )
@@ -914,7 +914,7 @@ void TextView::MouseButtonDown( const MouseEvent& rMouseEvent )
aNewSel.GetEnd().GetIndex() = mpImpl->mpTextEngine->mpDoc->GetNodes().GetObject( mpImpl->maSelection.GetEnd().GetPara() )->GetText().Len();
ImpSetSelection( aNewSel );
ShowSelection();
- ShowCursor( TRUE, TRUE );
+ ShowCursor( sal_True, sal_True );
}
}
}
@@ -948,7 +948,7 @@ void TextView::Command( const CommandEvent& rCEvt )
TEParaPortion* pPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( mpImpl->mpTextEngine->mpIMEInfos->aPos.GetPara() );
pPortion->MarkSelectionInvalid( mpImpl->mpTextEngine->mpIMEInfos->aPos.GetIndex(), 0 );
- BOOL bInsertMode = !mpImpl->mpTextEngine->mpIMEInfos->bWasCursorOverwrite;
+ sal_Bool bInsertMode = !mpImpl->mpTextEngine->mpIMEInfos->bWasCursorOverwrite;
delete mpImpl->mpTextEngine->mpIMEInfos;
mpImpl->mpTextEngine->mpIMEInfos = NULL;
@@ -977,14 +977,14 @@ void TextView::Command( const CommandEvent& rCEvt )
if ( mpImpl->mpTextEngine->mpIMEInfos->bWasCursorOverwrite )
{
- USHORT nOldIMETextLen = mpImpl->mpTextEngine->mpIMEInfos->nLen;
- USHORT nNewIMETextLen = pData->GetText().Len();
+ sal_uInt16 nOldIMETextLen = mpImpl->mpTextEngine->mpIMEInfos->nLen;
+ sal_uInt16 nNewIMETextLen = pData->GetText().Len();
if ( ( nOldIMETextLen > nNewIMETextLen ) &&
( nNewIMETextLen < mpImpl->mpTextEngine->mpIMEInfos->aOldTextAfterStartPos.Len() ) )
{
// restore old characters
- USHORT nRestore = nOldIMETextLen - nNewIMETextLen;
+ sal_uInt16 nRestore = nOldIMETextLen - nNewIMETextLen;
TextPaM aPaM( mpImpl->mpTextEngine->mpIMEInfos->aPos );
aPaM.GetIndex() = aPaM.GetIndex() + nNewIMETextLen;
mpImpl->mpTextEngine->ImpInsertText( aPaM, mpImpl->mpTextEngine->mpIMEInfos->aOldTextAfterStartPos.Copy( nNewIMETextLen, nRestore ) );
@@ -993,7 +993,7 @@ void TextView::Command( const CommandEvent& rCEvt )
( nOldIMETextLen < mpImpl->mpTextEngine->mpIMEInfos->aOldTextAfterStartPos.Len() ) )
{
// overwrite
- USHORT nOverwrite = nNewIMETextLen - nOldIMETextLen;
+ sal_uInt16 nOverwrite = nNewIMETextLen - nOldIMETextLen;
if ( ( nOldIMETextLen + nOverwrite ) > mpImpl->mpTextEngine->mpIMEInfos->aOldTextAfterStartPos.Len() )
nOverwrite = mpImpl->mpTextEngine->mpIMEInfos->aOldTextAfterStartPos.Len() - nOldIMETextLen;
DBG_ASSERT( nOverwrite && (nOverwrite < 0xFF00), "IME Overwrite?!" );
@@ -1038,13 +1038,13 @@ void TextView::Command( const CommandEvent& rCEvt )
TextPaM aPaM( GetSelection().GetEnd() );
Rectangle aR1 = mpImpl->mpTextEngine->PaMtoEditCursor( aPaM );
- USHORT nInputEnd = mpImpl->mpTextEngine->mpIMEInfos->aPos.GetIndex() + mpImpl->mpTextEngine->mpIMEInfos->nLen;
+ sal_uInt16 nInputEnd = mpImpl->mpTextEngine->mpIMEInfos->aPos.GetIndex() + mpImpl->mpTextEngine->mpIMEInfos->nLen;
if ( !mpImpl->mpTextEngine->IsFormatted() )
mpImpl->mpTextEngine->FormatDoc();
TEParaPortion* pParaPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( aPaM.GetPara() );
- USHORT nLine = pParaPortion->GetLineNumber( aPaM.GetIndex(), sal_True );
+ sal_uInt16 nLine = pParaPortion->GetLineNumber( aPaM.GetIndex(), sal_True );
TextLine* pLine = pParaPortion->GetLines().GetObject( nLine );
if ( pLine && ( nInputEnd > pLine->GetEnd() ) )
nInputEnd = pLine->GetEnd();
@@ -1065,12 +1065,12 @@ void TextView::Command( const CommandEvent& rCEvt )
}
}
-void TextView::ShowCursor( BOOL bGotoCursor, BOOL bForceVisCursor )
+void TextView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor )
{
// Die Einstellung hat mehr Gewicht:
if ( !mpImpl->mbAutoScroll )
- bGotoCursor = FALSE;
- ImpShowCursor( bGotoCursor, bForceVisCursor, FALSE );
+ bGotoCursor = sal_False;
+ ImpShowCursor( bGotoCursor, bForceVisCursor, sal_False );
}
void TextView::HideCursor()
@@ -1102,7 +1102,7 @@ void TextView::Scroll( long ndX, long ndY )
if ( nDiffX || nDiffY )
{
- BOOL bVisCursor = mpImpl->mpCursor->IsVisible();
+ sal_Bool bVisCursor = mpImpl->mpCursor->IsVisible();
mpImpl->mpCursor->Hide();
mpImpl->mpWindow->Update();
mpImpl->maStartDocPos = aNewStartPos;
@@ -1122,21 +1122,21 @@ void TextView::Scroll( long ndX, long ndY )
void TextView::Undo()
{
mpImpl->mpTextEngine->SetActiveView( this );
- mpImpl->mpTextEngine->GetUndoManager().Undo( 1 );
+ mpImpl->mpTextEngine->GetUndoManager().Undo();
}
void TextView::Redo()
{
mpImpl->mpTextEngine->SetActiveView( this );
- mpImpl->mpTextEngine->GetUndoManager().Redo( 0 );
+ mpImpl->mpTextEngine->GetUndoManager().Redo();
}
void TextView::Cut()
{
- mpImpl->mpTextEngine->UndoActionStart( TEXTUNDO_CUT );
+ mpImpl->mpTextEngine->UndoActionStart();
Copy();
DeleteSelected();
- mpImpl->mpTextEngine->UndoActionEnd( TEXTUNDO_CUT );
+ mpImpl->mpTextEngine->UndoActionEnd();
}
void TextView::Copy( uno::Reference< datatransfer::clipboard::XClipboard >& rxClipboard )
@@ -1146,7 +1146,7 @@ void TextView::Copy( uno::Reference< datatransfer::clipboard::XClipboard >& rxCl
TETextDataObject* pDataObj = new TETextDataObject( GetSelected() );
if ( mpImpl->mpTextEngine->HasAttrib( TEXTATTR_HYPERLINK ) ) // Dann auch als HTML
- mpImpl->mpTextEngine->Write( pDataObj->GetHTMLStream(), &mpImpl->maSelection, TRUE );
+ mpImpl->mpTextEngine->Write( pDataObj->GetHTMLStream(), &mpImpl->maSelection, sal_True );
const sal_uInt32 nRef = Application::ReleaseSolarMutex();
@@ -1204,7 +1204,7 @@ void TextView::Paste( uno::Reference< datatransfer::clipboard::XClipboard >& rxC
bool bWasTruncated = false;
if( mpImpl->mpTextEngine->GetMaxTextLen() != 0 )
bWasTruncated = ImplTruncateNewText( aText );
- InsertNewText( aText, FALSE );
+ InsertNewText( aText, sal_False );
mpImpl->mpTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) );
if( bWasTruncated )
@@ -1234,22 +1234,22 @@ String TextView::GetSelected( LineEnd aSeparator )
return mpImpl->mpTextEngine->GetText( mpImpl->maSelection, aSeparator );
}
-void TextView::SetInsertMode( BOOL bInsert )
+void TextView::SetInsertMode( sal_Bool bInsert )
{
if ( mpImpl->mbInsertMode != bInsert )
{
mpImpl->mbInsertMode = bInsert;
- ShowCursor( mpImpl->mbAutoScroll, FALSE );
+ ShowCursor( mpImpl->mbAutoScroll, sal_False );
}
}
-void TextView::SetReadOnly( BOOL bReadOnly )
+void TextView::SetReadOnly( sal_Bool bReadOnly )
{
if ( mpImpl->mbReadOnly != bReadOnly )
{
mpImpl->mbReadOnly = bReadOnly;
if ( !mpImpl->mbReadOnly )
- ShowCursor( mpImpl->mbAutoScroll, FALSE );
+ ShowCursor( mpImpl->mbAutoScroll, sal_False );
else
HideCursor();
@@ -1271,8 +1271,8 @@ TextSelection TextView::ImpMoveCursor( const KeyEvent& rKeyEvent )
KeyEvent aTranslatedKeyEvent = rKeyEvent.LogicalTextDirectionality( eTextDirection );
- BOOL bCtrl = aTranslatedKeyEvent.GetKeyCode().IsMod1() ? TRUE : FALSE;
- USHORT nCode = aTranslatedKeyEvent.GetKeyCode().GetCode();
+ sal_Bool bCtrl = aTranslatedKeyEvent.GetKeyCode().IsMod1() ? sal_True : sal_False;
+ sal_uInt16 nCode = aTranslatedKeyEvent.GetKeyCode().GetCode();
bool bSelect = aTranslatedKeyEvent.GetKeyCode().IsShift();
switch ( nCode )
@@ -1289,9 +1289,9 @@ TextSelection TextView::ImpMoveCursor( const KeyEvent& rKeyEvent )
break;
case KEY_PAGEDOWN: aPaM = bCtrl ? CursorEndOfDoc() : PageDown( aPaM );
break;
- case KEY_LEFT: aPaM = bCtrl ? CursorWordLeft( aPaM ) : CursorLeft( aPaM, aTranslatedKeyEvent.GetKeyCode().IsMod2() ? (USHORT)i18n::CharacterIteratorMode::SKIPCHARACTER : (USHORT)i18n::CharacterIteratorMode::SKIPCELL );
+ case KEY_LEFT: aPaM = bCtrl ? CursorWordLeft( aPaM ) : CursorLeft( aPaM, aTranslatedKeyEvent.GetKeyCode().IsMod2() ? (sal_uInt16)i18n::CharacterIteratorMode::SKIPCHARACTER : (sal_uInt16)i18n::CharacterIteratorMode::SKIPCELL );
break;
- case KEY_RIGHT: aPaM = bCtrl ? CursorWordRight( aPaM ) : CursorRight( aPaM, aTranslatedKeyEvent.GetKeyCode().IsMod2() ? (USHORT)i18n::CharacterIteratorMode::SKIPCHARACTER : (USHORT)i18n::CharacterIteratorMode::SKIPCELL );
+ case KEY_RIGHT: aPaM = bCtrl ? CursorWordRight( aPaM ) : CursorRight( aPaM, aTranslatedKeyEvent.GetKeyCode().IsMod2() ? (sal_uInt16)i18n::CharacterIteratorMode::SKIPCHARACTER : (sal_uInt16)i18n::CharacterIteratorMode::SKIPCELL );
break;
case com::sun::star::awt::Key::SELECT_WORD_FORWARD:
bSelect = true; // fallthrough intentional
@@ -1362,15 +1362,15 @@ TextSelection TextView::ImpMoveCursor( const KeyEvent& rKeyEvent )
return mpImpl->maSelection;
}
-void TextView::InsertText( const XubString& rStr, BOOL bSelect )
+void TextView::InsertText( const XubString& rStr, sal_Bool bSelect )
{
InsertNewText( rStr, bSelect );
}
-void TextView::InsertNewText( const rtl::OUString& rStr, BOOL bSelect )
+void TextView::InsertNewText( const rtl::OUString& rStr, sal_Bool bSelect )
{
// HideSelection();
- mpImpl->mpTextEngine->UndoActionStart( TEXTUNDO_INSERT );
+ mpImpl->mpTextEngine->UndoActionStart();
/* #i87633#
break inserted text into chunks that fit into the underlying String
@@ -1405,21 +1405,21 @@ void TextView::InsertNewText( const rtl::OUString& rStr, BOOL bSelect )
nLen -= nChunkLen;
nPos += nChunkLen;
}
- mpImpl->mpTextEngine->UndoActionEnd( TEXTUNDO_INSERT );
+ mpImpl->mpTextEngine->UndoActionEnd();
mpImpl->mpTextEngine->FormatAndUpdate( this );
}
/*
-void TextView::InsertText( const XubString& rStr, BOOL bSelect )
+void TextView::InsertText( const XubString& rStr, sal_Bool bSelect )
{
// HideSelection();
TextSelection aNewSel( mpImpl->maSelection );
- mpImpl->mpTextEngine->UndoActionStart( TEXTUNDO_INSERT );
+ mpImpl->mpTextEngine->UndoActionStart();
TextPaM aPaM = mpImpl->mpTextEngine->ImpInsertText( mpImpl->maSelection, rStr );
- mpImpl->mpTextEngine->UndoActionEnd( TEXTUNDO_INSERT );
+ mpImpl->mpTextEngine->UndoActionEnd();
if ( bSelect )
{
@@ -1438,22 +1438,22 @@ void TextView::InsertText( const XubString& rStr, BOOL bSelect )
*/
// OLD
-TextPaM TextView::CursorLeft( const TextPaM& rPaM, BOOL bWordMode )
+TextPaM TextView::CursorLeft( const TextPaM& rPaM, sal_Bool bWordMode )
{
- return bWordMode ? CursorWordLeft( rPaM ) : CursorLeft( rPaM, (USHORT)i18n::CharacterIteratorMode::SKIPCELL );
+ return bWordMode ? CursorWordLeft( rPaM ) : CursorLeft( rPaM, (sal_uInt16)i18n::CharacterIteratorMode::SKIPCELL );
- // Remove (USHORT) typecasts in this file when removing this method!
+ // Remove (sal_uInt16) typecasts in this file when removing this method!
}
// OLD
-TextPaM TextView::CursorRight( const TextPaM& rPaM, BOOL bWordMode )
+TextPaM TextView::CursorRight( const TextPaM& rPaM, sal_Bool bWordMode )
{
- return bWordMode ? CursorWordRight( rPaM ) : CursorRight( rPaM, (USHORT)i18n::CharacterIteratorMode::SKIPCELL );
+ return bWordMode ? CursorWordRight( rPaM ) : CursorRight( rPaM, (sal_uInt16)i18n::CharacterIteratorMode::SKIPCELL );
- // Remove (USHORT) typecasts in this file when removing this method!
+ // Remove (sal_uInt16) typecasts in this file when removing this method!
}
-TextPaM TextView::CursorLeft( const TextPaM& rPaM, USHORT nCharacterIteratorMode )
+TextPaM TextView::CursorLeft( const TextPaM& rPaM, sal_uInt16 nCharacterIteratorMode )
{
TextPaM aPaM( rPaM );
@@ -1462,7 +1462,7 @@ TextPaM TextView::CursorLeft( const TextPaM& rPaM, USHORT nCharacterIteratorMode
TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNodes().GetObject( aPaM.GetPara() );
uno::Reference < i18n::XBreakIterator > xBI = mpImpl->mpTextEngine->GetBreakIterator();
sal_Int32 nCount = 1;
- aPaM.GetIndex() = (USHORT)xBI->previousCharacters( pNode->GetText(), aPaM.GetIndex(), mpImpl->mpTextEngine->GetLocale(), nCharacterIteratorMode, nCount, nCount );
+ aPaM.GetIndex() = (sal_uInt16)xBI->previousCharacters( pNode->GetText(), aPaM.GetIndex(), mpImpl->mpTextEngine->GetLocale(), nCharacterIteratorMode, nCount, nCount );
}
else if ( aPaM.GetPara() )
{
@@ -1473,7 +1473,7 @@ TextPaM TextView::CursorLeft( const TextPaM& rPaM, USHORT nCharacterIteratorMode
return aPaM;
}
-TextPaM TextView::CursorRight( const TextPaM& rPaM, USHORT nCharacterIteratorMode )
+TextPaM TextView::CursorRight( const TextPaM& rPaM, sal_uInt16 nCharacterIteratorMode )
{
TextPaM aPaM( rPaM );
@@ -1482,7 +1482,7 @@ TextPaM TextView::CursorRight( const TextPaM& rPaM, USHORT nCharacterIteratorMod
{
uno::Reference < i18n::XBreakIterator > xBI = mpImpl->mpTextEngine->GetBreakIterator();
sal_Int32 nCount = 1;
- aPaM.GetIndex() = (USHORT)xBI->nextCharacters( pNode->GetText(), aPaM.GetIndex(), mpImpl->mpTextEngine->GetLocale(), nCharacterIteratorMode, nCount, nCount );
+ aPaM.GetIndex() = (sal_uInt16)xBI->nextCharacters( pNode->GetText(), aPaM.GetIndex(), mpImpl->mpTextEngine->GetLocale(), nCharacterIteratorMode, nCount, nCount );
}
else if ( aPaM.GetPara() < ( mpImpl->mpTextEngine->mpDoc->GetNodes().Count()-1) )
{
@@ -1505,7 +1505,7 @@ TextPaM TextView::CursorWordLeft( const TextPaM& rPaM )
i18n::Boundary aBoundary = xBI->getWordBoundary( pNode->GetText(), rPaM.GetIndex(), mpImpl->mpTextEngine->GetLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES, sal_True );
if ( aBoundary.startPos >= rPaM.GetIndex() )
aBoundary = xBI->previousWord( pNode->GetText(), rPaM.GetIndex(), mpImpl->mpTextEngine->GetLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES );
- aPaM.GetIndex() = ( aBoundary.startPos != -1 ) ? (USHORT)aBoundary.startPos : 0;
+ aPaM.GetIndex() = ( aBoundary.startPos != -1 ) ? (sal_uInt16)aBoundary.startPos : 0;
}
else if ( aPaM.GetPara() )
{
@@ -1526,7 +1526,7 @@ TextPaM TextView::CursorWordRight( const TextPaM& rPaM )
{
uno::Reference < i18n::XBreakIterator > xBI = mpImpl->mpTextEngine->GetBreakIterator();
i18n::Boundary aBoundary = xBI->nextWord( pNode->GetText(), aPaM.GetIndex(), mpImpl->mpTextEngine->GetLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES );
- aPaM.GetIndex() = (USHORT)aBoundary.startPos;
+ aPaM.GetIndex() = (sal_uInt16)aBoundary.startPos;
}
else if ( aPaM.GetPara() < ( mpImpl->mpTextEngine->mpDoc->GetNodes().Count()-1) )
{
@@ -1537,7 +1537,7 @@ TextPaM TextView::CursorWordRight( const TextPaM& rPaM )
return aPaM;
}
-TextPaM TextView::ImpDelete( BYTE nMode, BYTE nDelMode )
+TextPaM TextView::ImpDelete( sal_uInt8 nMode, sal_uInt8 nDelMode )
{
if ( mpImpl->maSelection.HasRange() ) // dann nur Sel. loeschen
return mpImpl->mpTextEngine->ImpDeleteText( mpImpl->maSelection );
@@ -1548,7 +1548,7 @@ TextPaM TextView::ImpDelete( BYTE nMode, BYTE nDelMode )
{
if ( nDelMode == DELMODE_SIMPLE )
{
- aEndPaM = CursorLeft( aEndPaM, (USHORT)i18n::CharacterIteratorMode::SKIPCHARACTER );
+ aEndPaM = CursorLeft( aEndPaM, (sal_uInt16)i18n::CharacterIteratorMode::SKIPCHARACTER );
}
else if ( nDelMode == DELMODE_RESTOFWORD )
{
@@ -1558,7 +1558,7 @@ TextPaM TextView::ImpDelete( BYTE nMode, BYTE nDelMode )
if ( aBoundary.startPos == mpImpl->maSelection.GetEnd().GetIndex() )
aBoundary = xBI->previousWord( pNode->GetText(), mpImpl->maSelection.GetEnd().GetIndex(), mpImpl->mpTextEngine->GetLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES );
// #i63506# startPos is -1 when the paragraph starts with a tab
- aEndPaM.GetIndex() = (aBoundary.startPos >= 0) ? (USHORT)aBoundary.startPos : 0;
+ aEndPaM.GetIndex() = (aBoundary.startPos >= 0) ? (sal_uInt16)aBoundary.startPos : 0;
}
else // DELMODE_RESTOFCONTENT
{
@@ -1576,14 +1576,14 @@ TextPaM TextView::ImpDelete( BYTE nMode, BYTE nDelMode )
{
if ( nDelMode == DELMODE_SIMPLE )
{
- aEndPaM = CursorRight( aEndPaM, (USHORT)i18n::CharacterIteratorMode::SKIPCELL );
+ aEndPaM = CursorRight( aEndPaM, (sal_uInt16)i18n::CharacterIteratorMode::SKIPCELL );
}
else if ( nDelMode == DELMODE_RESTOFWORD )
{
TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNodes().GetObject( aEndPaM.GetPara() );
uno::Reference < i18n::XBreakIterator > xBI = mpImpl->mpTextEngine->GetBreakIterator();
i18n::Boundary aBoundary = xBI->nextWord( pNode->GetText(), mpImpl->maSelection.GetEnd().GetIndex(), mpImpl->mpTextEngine->GetLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES );
- aEndPaM.GetIndex() = (USHORT)aBoundary.startPos;
+ aEndPaM.GetIndex() = (sal_uInt16)aBoundary.startPos;
}
else // DELMODE_RESTOFCONTENT
{
@@ -1612,17 +1612,17 @@ TextPaM TextView::CursorUp( const TextPaM& rPaM )
long nX;
if ( mpImpl->mnTravelXPos == TRAVEL_X_DONTKNOW )
{
- nX = mpImpl->mpTextEngine->GetEditCursor( rPaM, FALSE ).Left();
- mpImpl->mnTravelXPos = (USHORT)nX+1;
+ nX = mpImpl->mpTextEngine->GetEditCursor( rPaM, sal_False ).Left();
+ mpImpl->mnTravelXPos = (sal_uInt16)nX+1;
}
else
nX = mpImpl->mnTravelXPos;
TEParaPortion* pPPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( rPaM.GetPara() );
- USHORT nLine = pPPortion->GetLineNumber( rPaM.GetIndex(), FALSE );
+ sal_uInt16 nLine = pPPortion->GetLineNumber( rPaM.GetIndex(), sal_False );
if ( nLine ) // gleicher Absatz
{
- USHORT nCharPos = mpImpl->mpTextEngine->GetCharPos( rPaM.GetPara(), nLine-1, nX );
+ sal_uInt16 nCharPos = mpImpl->mpTextEngine->GetCharPos( rPaM.GetPara(), nLine-1, nX );
aPaM.GetIndex() = nCharPos;
// Wenn davor eine autom.Umgebrochene Zeile, und ich muss genau an das
// Ende dieser Zeile, landet der Cursor in der aktuellen Zeile am Anfang
@@ -1635,8 +1635,8 @@ TextPaM TextView::CursorUp( const TextPaM& rPaM )
{
aPaM.GetPara()--;
pPPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( aPaM.GetPara() );
- USHORT nL = pPPortion->GetLines().Count() - 1;
- USHORT nCharPos = mpImpl->mpTextEngine->GetCharPos( aPaM.GetPara(), nL, nX+1 );
+ sal_uInt16 nL = pPPortion->GetLines().Count() - 1;
+ sal_uInt16 nCharPos = mpImpl->mpTextEngine->GetCharPos( aPaM.GetPara(), nL, nX+1 );
aPaM.GetIndex() = nCharPos;
}
@@ -1650,17 +1650,17 @@ TextPaM TextView::CursorDown( const TextPaM& rPaM )
long nX;
if ( mpImpl->mnTravelXPos == TRAVEL_X_DONTKNOW )
{
- nX = mpImpl->mpTextEngine->GetEditCursor( rPaM, FALSE ).Left();
- mpImpl->mnTravelXPos = (USHORT)nX+1;
+ nX = mpImpl->mpTextEngine->GetEditCursor( rPaM, sal_False ).Left();
+ mpImpl->mnTravelXPos = (sal_uInt16)nX+1;
}
else
nX = mpImpl->mnTravelXPos;
TEParaPortion* pPPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( rPaM.GetPara() );
- USHORT nLine = pPPortion->GetLineNumber( rPaM.GetIndex(), FALSE );
+ sal_uInt16 nLine = pPPortion->GetLineNumber( rPaM.GetIndex(), sal_False );
if ( nLine < ( pPPortion->GetLines().Count() - 1 ) )
{
- USHORT nCharPos = mpImpl->mpTextEngine->GetCharPos( rPaM.GetPara(), nLine+1, nX );
+ sal_uInt16 nCharPos = mpImpl->mpTextEngine->GetCharPos( rPaM.GetPara(), nLine+1, nX );
aPaM.GetIndex() = nCharPos;
// Sonderbehandlung siehe CursorUp...
@@ -1672,7 +1672,7 @@ TextPaM TextView::CursorDown( const TextPaM& rPaM )
{
aPaM.GetPara()++;
pPPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( aPaM.GetPara() );
- USHORT nCharPos = mpImpl->mpTextEngine->GetCharPos( aPaM.GetPara(), 0, nX+1 );
+ sal_uInt16 nCharPos = mpImpl->mpTextEngine->GetCharPos( aPaM.GetPara(), 0, nX+1 );
aPaM.GetIndex() = nCharPos;
TextLine* pLine = pPPortion->GetLines().GetObject( 0 );
if ( ( aPaM.GetIndex() == pLine->GetEnd() ) && ( aPaM.GetIndex() > pLine->GetStart() ) && ( pPPortion->GetLines().Count() > 1 ) )
@@ -1687,7 +1687,7 @@ TextPaM TextView::CursorStartOfLine( const TextPaM& rPaM )
TextPaM aPaM( rPaM );
TEParaPortion* pPPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( rPaM.GetPara() );
- USHORT nLine = pPPortion->GetLineNumber( aPaM.GetIndex(), FALSE );
+ sal_uInt16 nLine = pPPortion->GetLineNumber( aPaM.GetIndex(), sal_False );
TextLine* pLine = pPPortion->GetLines().GetObject( nLine );
aPaM.GetIndex() = pLine->GetStart();
@@ -1699,13 +1699,13 @@ TextPaM TextView::CursorEndOfLine( const TextPaM& rPaM )
TextPaM aPaM( rPaM );
TEParaPortion* pPPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( rPaM.GetPara() );
- USHORT nLine = pPPortion->GetLineNumber( aPaM.GetIndex(), FALSE );
+ sal_uInt16 nLine = pPPortion->GetLineNumber( aPaM.GetIndex(), sal_False );
TextLine* pLine = pPPortion->GetLines().GetObject( nLine );
aPaM.GetIndex() = pLine->GetEnd();
if ( pLine->GetEnd() > pLine->GetStart() ) // Leerzeile
{
- xub_Unicode cLastChar = pPPortion->GetNode()->GetText().GetChar((USHORT)(aPaM.GetIndex()-1) );
+ xub_Unicode cLastChar = pPPortion->GetNode()->GetText().GetChar((sal_uInt16)(aPaM.GetIndex()-1) );
if ( ( cLastChar == ' ' ) && ( aPaM.GetIndex() != pPPortion->GetNode()->GetText().Len() ) )
{
// Bei einem Blank in einer autom. umgebrochenen Zeile macht es Sinn,
@@ -1740,7 +1740,7 @@ TextPaM TextView::CursorStartOfDoc()
TextPaM TextView::CursorEndOfDoc()
{
- ULONG nNode = mpImpl->mpTextEngine->mpDoc->GetNodes().Count() - 1;
+ sal_uLong nNode = mpImpl->mpTextEngine->mpDoc->GetNodes().Count() - 1;
TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNodes().GetObject( nNode );
TextPaM aPaM( nNode, pNode->GetText().Len() );
return aPaM;
@@ -1773,11 +1773,11 @@ TextPaM TextView::PageDown( const TextPaM& rPaM )
return aPaM;
}
-void TextView::ImpShowCursor( BOOL bGotoCursor, BOOL bForceVisCursor, BOOL bSpecial )
+void TextView::ImpShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, sal_Bool bSpecial )
{
if ( mpImpl->mpTextEngine->IsFormatting() )
return;
- if ( mpImpl->mpTextEngine->GetUpdateMode() == FALSE )
+ if ( mpImpl->mpTextEngine->GetUpdateMode() == sal_False )
return;
if ( mpImpl->mpTextEngine->IsInUndo() )
return;
@@ -1796,7 +1796,7 @@ void TextView::ImpShowCursor( BOOL bGotoCursor, BOOL bForceVisCursor, BOOL bSpec
{
TEParaPortion* pParaPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( aPaM.GetPara() );
mpImpl->mbCursorAtEndOfLine =
- pParaPortion->GetLineNumber( aPaM.GetIndex(), TRUE ) != pParaPortion->GetLineNumber( aPaM.GetIndex(), FALSE );
+ pParaPortion->GetLineNumber( aPaM.GetIndex(), sal_True ) != pParaPortion->GetLineNumber( aPaM.GetIndex(), sal_False );
}
if ( !IsInsertMode() && !mpImpl->maSelection.HasRange() )
@@ -1805,12 +1805,12 @@ void TextView::ImpShowCursor( BOOL bGotoCursor, BOOL bForceVisCursor, BOOL bSpec
if ( pNode->GetText().Len() && ( aPaM.GetIndex() < pNode->GetText().Len() ) )
{
// If we are behind a portion, and the next portion has other direction, we must change position...
- aEditCursor.Left() = aEditCursor.Right() = mpImpl->mpTextEngine->GetEditCursor( aPaM, FALSE, TRUE ).Left();
+ aEditCursor.Left() = aEditCursor.Right() = mpImpl->mpTextEngine->GetEditCursor( aPaM, sal_False, sal_True ).Left();
TEParaPortion* pParaPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( aPaM.GetPara() );
- USHORT nTextPortionStart = 0;
- USHORT nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTextPortionStart, TRUE );
+ sal_uInt16 nTextPortionStart = 0;
+ sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTextPortionStart, sal_True );
TETextPortion* pTextPortion = pParaPortion->GetTextPortions().GetObject( nTextPortion );
if ( pTextPortion->GetKind() == PORTIONKIND_TAB )
{
@@ -1822,8 +1822,8 @@ void TextView::ImpShowCursor( BOOL bGotoCursor, BOOL bForceVisCursor, BOOL bSpec
}
else
{
- TextPaM aNext = CursorRight( TextPaM( aPaM.GetPara(), aPaM.GetIndex() ), (USHORT)i18n::CharacterIteratorMode::SKIPCELL );
- aEditCursor.Right() = mpImpl->mpTextEngine->GetEditCursor( aNext, TRUE ).Left();
+ TextPaM aNext = CursorRight( TextPaM( aPaM.GetPara(), aPaM.GetIndex() ), (sal_uInt16)i18n::CharacterIteratorMode::SKIPCELL );
+ aEditCursor.Right() = mpImpl->mpTextEngine->GetEditCursor( aNext, sal_True ).Left();
}
}
}
@@ -1872,7 +1872,7 @@ void TextView::ImpShowCursor( BOOL bGotoCursor, BOOL bForceVisCursor, BOOL bSpec
}
// X kann durch das 'bischen mehr' falsch sein:
-// ULONG nMaxTextWidth = mpImpl->mpTextEngine->GetMaxTextWidth();
+// sal_uLong nMaxTextWidth = mpImpl->mpTextEngine->GetMaxTextWidth();
// if ( !nMaxTextWidth || ( nMaxTextWidth > 0x7FFFFFFF ) )
// nMaxTextWidth = 0x7FFFFFFF;
// long nMaxX = (long)nMaxTextWidth - aOutSz.Width();
@@ -1910,7 +1910,7 @@ void TextView::ImpShowCursor( BOOL bGotoCursor, BOOL bForceVisCursor, BOOL bSpec
mpImpl->mpCursor->Show();
}
-BOOL TextView::SetCursorAtPoint( const Point& rPosPixel )
+sal_Bool TextView::SetCursorAtPoint( const Point& rPosPixel )
{
mpImpl->mpTextEngine->CheckIdleFormatter();
@@ -1936,50 +1936,50 @@ BOOL TextView::SetCursorAtPoint( const Point& rPosPixel )
ShowSelection( aTmpNewSel );
}
- BOOL bForceCursor = mpImpl->mpDDInfo ? FALSE : TRUE; // && !mbInSelection
- ImpShowCursor( mpImpl->mbAutoScroll, bForceCursor, FALSE );
- return TRUE;
+ sal_Bool bForceCursor = mpImpl->mpDDInfo ? sal_False : sal_True; // && !mbInSelection
+ ImpShowCursor( mpImpl->mbAutoScroll, bForceCursor, sal_False );
+ return sal_True;
}
-BOOL TextView::IsSelectionAtPoint( const Point& rPosPixel )
+sal_Bool TextView::IsSelectionAtPoint( const Point& rPosPixel )
{
// if ( !Rectangle( Point(), mpImpl->mpWindow->GetOutputSizePixel() ).IsInside( rPosPixel ) && !mbInSelection )
-// return FALSE;
+// return sal_False;
Point aDocPos = GetDocPos( rPosPixel );
- TextPaM aPaM = mpImpl->mpTextEngine->GetPaM( aDocPos, FALSE );
+ TextPaM aPaM = mpImpl->mpTextEngine->GetPaM( aDocPos, sal_False );
// Bei Hyperlinks D&D auch ohne Selektion starten.
// BeginDrag wird aber nur gerufen, wenn IsSelectionAtPoint()
// Problem: IsSelectionAtPoint wird bei Command() nicht gerufen,
- // wenn vorher im MBDown schon FALSE returnt wurde.
+ // wenn vorher im MBDown schon sal_False returnt wurde.
return ( IsInSelection( aPaM ) ||
( /* mpImpl->mpSelEngine->IsInCommand() && */ mpImpl->mpTextEngine->FindAttrib( aPaM, TEXTATTR_HYPERLINK ) ) );
}
-BOOL TextView::IsInSelection( const TextPaM& rPaM )
+sal_Bool TextView::IsInSelection( const TextPaM& rPaM )
{
TextSelection aSel = mpImpl->maSelection;
aSel.Justify();
- ULONG nStartNode = aSel.GetStart().GetPara();
- ULONG nEndNode = aSel.GetEnd().GetPara();
- ULONG nCurNode = rPaM.GetPara();
+ sal_uLong nStartNode = aSel.GetStart().GetPara();
+ sal_uLong nEndNode = aSel.GetEnd().GetPara();
+ sal_uLong nCurNode = rPaM.GetPara();
if ( ( nCurNode > nStartNode ) && ( nCurNode < nEndNode ) )
- return TRUE;
+ return sal_True;
if ( nStartNode == nEndNode )
{
if ( nCurNode == nStartNode )
if ( ( rPaM.GetIndex() >= aSel.GetStart().GetIndex() ) && ( rPaM.GetIndex() < aSel.GetEnd().GetIndex() ) )
- return TRUE;
+ return sal_True;
}
else if ( ( nCurNode == nStartNode ) && ( rPaM.GetIndex() >= aSel.GetStart().GetIndex() ) )
- return TRUE;
+ return sal_True;
else if ( ( nCurNode == nEndNode ) && ( rPaM.GetIndex() < aSel.GetEnd().GetIndex() ) )
- return TRUE;
+ return sal_True;
- return FALSE;
+ return sal_False;
}
void TextView::ImpHideDDCursor()
@@ -1987,7 +1987,7 @@ void TextView::ImpHideDDCursor()
if ( mpImpl->mpDDInfo && mpImpl->mpDDInfo->mbVisCursor )
{
mpImpl->mpDDInfo->maCursor.Hide();
- mpImpl->mpDDInfo->mbVisCursor = FALSE;
+ mpImpl->mpDDInfo->mbVisCursor = sal_False;
}
}
@@ -1995,7 +1995,7 @@ void TextView::ImpShowDDCursor()
{
if ( !mpImpl->mpDDInfo->mbVisCursor )
{
- Rectangle aCursor = mpImpl->mpTextEngine->PaMtoEditCursor( mpImpl->mpDDInfo->maDropPos, TRUE );
+ Rectangle aCursor = mpImpl->mpTextEngine->PaMtoEditCursor( mpImpl->mpDDInfo->maDropPos, sal_True );
aCursor.Right()++;
aCursor.SetPos( GetWindowPos( aCursor.TopLeft() ) );
@@ -2003,11 +2003,11 @@ void TextView::ImpShowDDCursor()
mpImpl->mpDDInfo->maCursor.SetPos( aCursor.TopLeft() );
mpImpl->mpDDInfo->maCursor.SetSize( aCursor.GetSize() );
mpImpl->mpDDInfo->maCursor.Show();
- mpImpl->mpDDInfo->mbVisCursor = TRUE;
+ mpImpl->mpDDInfo->mbVisCursor = sal_True;
}
}
-void TextView::SetPaintSelection( BOOL bPaint )
+void TextView::SetPaintSelection( sal_Bool bPaint )
{
if ( bPaint != mpImpl->mbPaintSelection )
{
@@ -2016,7 +2016,7 @@ void TextView::SetPaintSelection( BOOL bPaint )
}
}
-void TextView::SetHighlightSelection( BOOL bSelectByHighlight )
+void TextView::SetHighlightSelection( sal_Bool bSelectByHighlight )
{
if ( bSelectByHighlight != mpImpl->mbHighlightSelection )
{
@@ -2025,14 +2025,14 @@ void TextView::SetHighlightSelection( BOOL bSelectByHighlight )
}
}
-BOOL TextView::Read( SvStream& rInput )
+sal_Bool TextView::Read( SvStream& rInput )
{
- BOOL bDone = mpImpl->mpTextEngine->Read( rInput, &mpImpl->maSelection );
+ sal_Bool bDone = mpImpl->mpTextEngine->Read( rInput, &mpImpl->maSelection );
ShowCursor();
return bDone;
}
-BOOL TextView::Write( SvStream& rOutput )
+sal_Bool TextView::Write( SvStream& rOutput )
{
return mpImpl->mpTextEngine->Read( rOutput, &mpImpl->maSelection );
}
@@ -2047,17 +2047,17 @@ bool TextView::ImplTruncateNewText( rtl::OUString& rNewText ) const
bTruncated = true;
}
- ULONG nMaxLen = mpImpl->mpTextEngine->GetMaxTextLen();
+ sal_uLong nMaxLen = mpImpl->mpTextEngine->GetMaxTextLen();
// 0 means unlimited, there is just the String API limit handled above
if( nMaxLen != 0 )
{
- ULONG nCurLen = mpImpl->mpTextEngine->GetTextLen();
+ sal_uLong nCurLen = mpImpl->mpTextEngine->GetTextLen();
sal_uInt32 nNewLen = rNewText.getLength();
if ( nCurLen + nNewLen > nMaxLen )
{
// see how much text will be replaced
- ULONG nSelLen = mpImpl->mpTextEngine->GetTextLen( mpImpl->maSelection );
+ sal_uLong nSelLen = mpImpl->mpTextEngine->GetTextLen( mpImpl->maSelection );
if ( nCurLen + nNewLen - nSelLen > nMaxLen )
{
sal_uInt32 nTruncatedLen = static_cast<sal_uInt32>(nMaxLen - (nCurLen - nSelLen));
@@ -2069,12 +2069,12 @@ bool TextView::ImplTruncateNewText( rtl::OUString& rNewText ) const
return bTruncated;
}
-BOOL TextView::ImplCheckTextLen( const String& rNewText )
+sal_Bool TextView::ImplCheckTextLen( const String& rNewText )
{
- BOOL bOK = TRUE;
+ sal_Bool bOK = sal_True;
if ( mpImpl->mpTextEngine->GetMaxTextLen() )
{
- ULONG n = mpImpl->mpTextEngine->GetTextLen();
+ sal_uLong n = mpImpl->mpTextEngine->GetTextLen();
n += rNewText.Len();
if ( n > mpImpl->mpTextEngine->GetMaxTextLen() )
{
@@ -2085,7 +2085,7 @@ BOOL TextView::ImplCheckTextLen( const String& rNewText )
// Beep hat hier eigentlich nichts verloren, sondern lieber ein Hdl,
// aber so funktioniert es wenigstens in ME, BasicIDE, SourceView
Sound::Beep();
- bOK = FALSE;
+ bOK = sal_False;
}
}
}
@@ -2102,12 +2102,12 @@ void TextView::dragGestureRecognized( const ::com::sun::star::datatransfer::dnd:
delete mpImpl->mpDDInfo;
mpImpl->mpDDInfo = new TextDDInfo;
- mpImpl->mpDDInfo->mbStarterOfDD = TRUE;
+ mpImpl->mpDDInfo->mbStarterOfDD = sal_True;
TETextDataObject* pDataObj = new TETextDataObject( GetSelected() );
if ( mpImpl->mpTextEngine->HasAttrib( TEXTATTR_HYPERLINK ) ) // Dann auch als HTML
- mpImpl->mpTextEngine->Write( pDataObj->GetHTMLStream(), &mpImpl->maSelection, TRUE );
+ mpImpl->mpTextEngine->Write( pDataObj->GetHTMLStream(), &mpImpl->maSelection, sal_True );
/*
@@ -2151,7 +2151,7 @@ void TextView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEv
{
vos::OGuard aVclGuard( Application::GetSolarMutex() );
- BOOL bChanges = FALSE;
+ sal_Bool bChanges = sal_False;
if ( !mpImpl->mbReadOnly && mpImpl->mpDDInfo )
{
ImpHideDDCursor();
@@ -2159,17 +2159,17 @@ void TextView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEv
// Daten fuer das loeschen nach einem DROP_MOVE:
TextSelection aPrevSel( mpImpl->maSelection );
aPrevSel.Justify();
- ULONG nPrevParaCount = mpImpl->mpTextEngine->GetParagraphCount();
- USHORT nPrevStartParaLen = mpImpl->mpTextEngine->GetTextLen( aPrevSel.GetStart().GetPara() );
+ sal_uLong nPrevParaCount = mpImpl->mpTextEngine->GetParagraphCount();
+ sal_uInt16 nPrevStartParaLen = mpImpl->mpTextEngine->GetTextLen( aPrevSel.GetStart().GetPara() );
- BOOL bStarterOfDD = FALSE;
- for ( USHORT nView = mpImpl->mpTextEngine->GetViewCount(); nView && !bStarterOfDD; )
- bStarterOfDD = mpImpl->mpTextEngine->GetView( --nView )->mpImpl->mpDDInfo ? mpImpl->mpTextEngine->GetView( nView )->mpImpl->mpDDInfo->mbStarterOfDD : FALSE;
+ sal_Bool bStarterOfDD = sal_False;
+ for ( sal_uInt16 nView = mpImpl->mpTextEngine->GetViewCount(); nView && !bStarterOfDD; )
+ bStarterOfDD = mpImpl->mpTextEngine->GetView( --nView )->mpImpl->mpDDInfo ? mpImpl->mpTextEngine->GetView( nView )->mpImpl->mpDDInfo->mbStarterOfDD : sal_False;
HideSelection();
ImpSetSelection( mpImpl->mpDDInfo->maDropPos );
- mpImpl->mpTextEngine->UndoActionStart( TEXTUNDO_DRAGANDDROP );
+ mpImpl->mpTextEngine->UndoActionStart();
String aText;
uno::Reference< datatransfer::XTransferable > xDataObj = rDTDE.Transferable;
@@ -2198,7 +2198,7 @@ void TextView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEv
mpImpl->mpTextEngine->SetAttrib( TextAttribProtect(),
aTempStart.GetPara(),
aTempStart.GetIndex(),
- mpImpl->maSelection.GetEnd().GetIndex(), FALSE );
+ mpImpl->maSelection.GetEnd().GetIndex(), sal_False );
}
if ( aPrevSel.HasRange() &&
@@ -2210,7 +2210,7 @@ void TextView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEv
( ( mpImpl->mpDDInfo->maDropPos.GetPara() == aPrevSel.GetStart().GetPara() )
&& ( mpImpl->mpDDInfo->maDropPos.GetIndex() < aPrevSel.GetStart().GetIndex() ) ) )
{
- ULONG nNewParasBeforeSelection =
+ sal_uLong nNewParasBeforeSelection =
mpImpl->mpTextEngine->GetParagraphCount() - nPrevParaCount;
aPrevSel.GetStart().GetPara() += nNewParasBeforeSelection;
@@ -2218,7 +2218,7 @@ void TextView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEv
if ( mpImpl->mpDDInfo->maDropPos.GetPara() == aPrevSel.GetStart().GetPara() )
{
- USHORT nNewChars =
+ sal_uInt16 nNewChars =
mpImpl->mpTextEngine->GetTextLen( aPrevSel.GetStart().GetPara() ) - nPrevStartParaLen;
aPrevSel.GetStart().GetIndex() =
@@ -2247,7 +2247,7 @@ void TextView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEv
mpImpl->mpTextEngine->ImpDeleteText( aPrevSel );
}
- mpImpl->mpTextEngine->UndoActionEnd( TEXTUNDO_DRAGANDDROP );
+ mpImpl->mpTextEngine->UndoActionEnd();
delete mpImpl->mpDDInfo;
mpImpl->mpDDInfo = 0;
@@ -2380,7 +2380,7 @@ sal_Int32 TextView::GetLineNumberOfCursorInSelection() const
{
TextPaM aPaM = GetSelection().GetEnd();
TEParaPortion* pPPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( aPaM.GetPara() );
- nLineNo = pPPortion->GetLineNumber( aPaM.GetIndex(), FALSE );
+ nLineNo = pPPortion->GetLineNumber( aPaM.GetIndex(), sal_False );
if( mpImpl->mbCursorAtEndOfLine )
--nLineNo;
}
@@ -2411,12 +2411,12 @@ void __EXPORT TextSelFunctionSet::CreateAnchor()
mpView->ImpSetSelection( mpView->mpImpl->maSelection.GetEnd() );
}
-BOOL __EXPORT TextSelFunctionSet::SetCursorAtPoint( const Point& rPointPixel, BOOL )
+sal_Bool __EXPORT TextSelFunctionSet::SetCursorAtPoint( const Point& rPointPixel, sal_Bool )
{
return mpView->SetCursorAtPoint( rPointPixel );
}
-BOOL __EXPORT TextSelFunctionSet::IsSelectionAtPoint( const Point& rPointPixel )
+sal_Bool __EXPORT TextSelFunctionSet::IsSelectionAtPoint( const Point& rPointPixel )
{
return mpView->IsSelectionAtPoint( rPointPixel );
}
@@ -2439,31 +2439,31 @@ TextEngine* TextView::GetTextEngine() const
{ return mpImpl->mpTextEngine; }
Window* TextView::GetWindow() const
{ return mpImpl->mpWindow; }
-void TextView::EnableCursor( BOOL bEnable )
+void TextView::EnableCursor( sal_Bool bEnable )
{ mpImpl->mbCursorEnabled = bEnable; }
-BOOL TextView::IsCursorEnabled() const
+sal_Bool TextView::IsCursorEnabled() const
{ return mpImpl->mbCursorEnabled; }
void TextView::SetStartDocPos( const Point& rPos )
{ mpImpl->maStartDocPos = rPos; }
const Point& TextView::GetStartDocPos() const
{ return mpImpl->maStartDocPos; }
-void TextView::SetAutoIndentMode( BOOL bAutoIndent )
+void TextView::SetAutoIndentMode( sal_Bool bAutoIndent )
{ mpImpl->mbAutoIndent = bAutoIndent; }
-BOOL TextView::IsAutoIndentMode() const
+sal_Bool TextView::IsAutoIndentMode() const
{ return mpImpl->mbAutoIndent; }
-BOOL TextView::IsReadOnly() const
+sal_Bool TextView::IsReadOnly() const
{ return mpImpl->mbReadOnly; }
-void TextView::SetAutoScroll( BOOL bAutoScroll )
+void TextView::SetAutoScroll( sal_Bool bAutoScroll )
{ mpImpl->mbAutoScroll = bAutoScroll; }
-BOOL TextView::IsAutoScroll() const
+sal_Bool TextView::IsAutoScroll() const
{ return mpImpl->mbAutoScroll; }
-BOOL TextView::IsPaintSelection() const
+sal_Bool TextView::IsPaintSelection() const
{ return mpImpl->mbPaintSelection; }
-BOOL TextView::IsHighlightSelection() const
+sal_Bool TextView::IsHighlightSelection() const
{ return mpImpl->mbHighlightSelection; }
-BOOL TextView::HasSelection() const
+sal_Bool TextView::HasSelection() const
{ return mpImpl->maSelection.HasRange(); }
-BOOL TextView::IsInsertMode() const
+sal_Bool TextView::IsInsertMode() const
{ return mpImpl->mbInsertMode; }
void TextView::SupportProtectAttribute(sal_Bool bSupport)
{ mpImpl->mbSupportProtectAttribute = bSupport;}
diff --git a/svtools/source/edit/xtextedt.cxx b/svtools/source/edit/xtextedt.cxx
index 0a4907edcadd..0241c7c3cbbc 100644
--- a/svtools/source/edit/xtextedt.cxx
+++ b/svtools/source/edit/xtextedt.cxx
@@ -52,12 +52,12 @@ ExtTextEngine::~ExtTextEngine()
TextSelection ExtTextEngine::MatchGroup( const TextPaM& rCursor ) const
{
TextSelection aSel( rCursor );
- USHORT nPos = rCursor.GetIndex();
- ULONG nPara = rCursor.GetPara();
- ULONG nParas = GetParagraphCount();
+ sal_uInt16 nPos = rCursor.GetIndex();
+ sal_uLong nPara = rCursor.GetPara();
+ sal_uLong nParas = GetParagraphCount();
if ( ( nPara < nParas ) && ( nPos < GetTextLen( nPara ) ) )
{
- USHORT nMatchChar = maGroupChars.Search( GetText( rCursor.GetPara() ).GetChar( nPos ) );
+ sal_uInt16 nMatchChar = maGroupChars.Search( GetText( rCursor.GetPara() ).GetChar( nPos ) );
if ( nMatchChar != STRING_NOTFOUND )
{
if ( ( nMatchChar % 2 ) == 0 )
@@ -66,8 +66,8 @@ TextSelection ExtTextEngine::MatchGroup( const TextPaM& rCursor ) const
sal_Unicode nSC = maGroupChars.GetChar( nMatchChar );
sal_Unicode nEC = maGroupChars.GetChar( nMatchChar+1 );
- USHORT nCur = nPos+1;
- USHORT nLevel = 1;
+ sal_uInt16 nCur = nPos+1;
+ sal_uInt16 nLevel = 1;
while ( nLevel && ( nPara < nParas ) )
{
XubString aStr = GetText( nPara );
@@ -102,8 +102,8 @@ TextSelection ExtTextEngine::MatchGroup( const TextPaM& rCursor ) const
xub_Unicode nEC = maGroupChars.GetChar( nMatchChar );
xub_Unicode nSC = maGroupChars.GetChar( nMatchChar-1 );
- USHORT nCur = rCursor.GetIndex()-1;
- USHORT nLevel = 1;
+ sal_uInt16 nCur = rCursor.GetIndex()-1;
+ sal_uInt16 nLevel = 1;
while ( nLevel )
{
if ( GetTextLen( nPara ) )
@@ -148,12 +148,12 @@ TextSelection ExtTextEngine::MatchGroup( const TextPaM& rCursor ) const
return aSel;
}
-BOOL ExtTextEngine::Search( TextSelection& rSel, const util::SearchOptions& rSearchOptions, BOOL bForward )
+sal_Bool ExtTextEngine::Search( TextSelection& rSel, const util::SearchOptions& rSearchOptions, sal_Bool bForward )
{
TextSelection aSel( rSel );
aSel.Justify();
- BOOL bSearchInSelection = (0 != (rSearchOptions.searchFlag & util::SearchFlags::REG_NOT_BEGINOFLINE) );
+ sal_Bool bSearchInSelection = (0 != (rSearchOptions.searchFlag & util::SearchFlags::REG_NOT_BEGINOFLINE) );
TextPaM aStartPaM( aSel.GetEnd() );
if ( aSel.HasRange() && ( ( bSearchInSelection && bForward ) || ( !bSearchInSelection && !bForward ) ) )
@@ -162,7 +162,7 @@ BOOL ExtTextEngine::Search( TextSelection& rSel, const util::SearchOptions& rSea
}
bool bFound = false;
- ULONG nStartNode, nEndNode;
+ sal_uLong nStartNode, nEndNode;
if ( bSearchInSelection )
nEndNode = bForward ? aSel.GetEnd().GetPara() : aSel.GetStart().GetPara();
@@ -176,13 +176,13 @@ BOOL ExtTextEngine::Search( TextSelection& rSel, const util::SearchOptions& rSea
utl::TextSearch aSearcher( rSearchOptions );
// ueber die Absaetze iterieren...
- for ( ULONG nNode = nStartNode;
+ for ( sal_uLong nNode = nStartNode;
bForward ? ( nNode <= nEndNode) : ( nNode >= nEndNode );
bForward ? nNode++ : nNode-- )
{
String aText = GetText( nNode );
- USHORT nStartPos = 0;
- USHORT nEndPos = aText.Len();
+ sal_uInt16 nStartPos = 0;
+ sal_uInt16 nEndPos = aText.Len();
if ( nNode == nStartNode )
{
if ( bForward )
@@ -212,7 +212,7 @@ BOOL ExtTextEngine::Search( TextSelection& rSel, const util::SearchOptions& rSea
// Ueber den Absatz selektieren?
// Select over the paragraph?
// FIXME This should be max long...
- if( nEndPos == sal::static_int_cast<USHORT>(-1) ) // USHORT for 0 and -1 !
+ if( nEndPos == sal::static_int_cast<sal_uInt16>(-1) ) // sal_uInt16 for 0 and -1 !
{
if ( (rSel.GetEnd().GetPara()+1) < GetParagraphCount() )
{
@@ -249,34 +249,34 @@ ExtTextView::~ExtTextView()
{
}
-BOOL ExtTextView::MatchGroup()
+sal_Bool ExtTextView::MatchGroup()
{
TextSelection aTmpSel( GetSelection() );
aTmpSel.Justify();
if ( ( aTmpSel.GetStart().GetPara() != aTmpSel.GetEnd().GetPara() ) ||
( ( aTmpSel.GetEnd().GetIndex() - aTmpSel.GetStart().GetIndex() ) > 1 ) )
{
- return FALSE;
+ return sal_False;
}
TextSelection aMatchSel = ((ExtTextEngine*)GetTextEngine())->MatchGroup( aTmpSel.GetStart() );
if ( aMatchSel.HasRange() )
SetSelection( aMatchSel );
- return aMatchSel.HasRange() ? TRUE : FALSE;
+ return aMatchSel.HasRange() ? sal_True : sal_False;
}
-BOOL ExtTextView::Search( const util::SearchOptions& rSearchOptions, BOOL bForward )
+sal_Bool ExtTextView::Search( const util::SearchOptions& rSearchOptions, sal_Bool bForward )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
TextSelection aSel( GetSelection() );
if ( ((ExtTextEngine*)GetTextEngine())->Search( aSel, rSearchOptions, bForward ) )
{
- bFound = TRUE;
+ bFound = sal_True;
// Erstmal den Anfang des Wortes als Selektion einstellen,
// damit das ganze Wort in den sichtbaren Bereich kommt.
SetSelection( aSel.GetStart() );
- ShowCursor( TRUE, FALSE );
+ ShowCursor( sal_True, sal_False );
}
else
{
@@ -289,9 +289,9 @@ BOOL ExtTextView::Search( const util::SearchOptions& rSearchOptions, BOOL bForwa
return bFound;
}
-USHORT ExtTextView::Replace( const util::SearchOptions& rSearchOptions, BOOL bAll, BOOL bForward )
+sal_uInt16 ExtTextView::Replace( const util::SearchOptions& rSearchOptions, sal_Bool bAll, sal_Bool bForward )
{
- USHORT nFound = 0;
+ sal_uInt16 nFound = 0;
if ( !bAll )
{
@@ -316,7 +316,7 @@ USHORT ExtTextView::Replace( const util::SearchOptions& rSearchOptions, BOOL bAl
// HideSelection();
TextSelection aSel;
- BOOL bSearchInSelection = (0 != (rSearchOptions.searchFlag & util::SearchFlags::REG_NOT_BEGINOFLINE) );
+ sal_Bool bSearchInSelection = (0 != (rSearchOptions.searchFlag & util::SearchFlags::REG_NOT_BEGINOFLINE) );
if ( bSearchInSelection )
{
aSel = GetSelection();
@@ -325,9 +325,9 @@ USHORT ExtTextView::Replace( const util::SearchOptions& rSearchOptions, BOOL bAl
TextSelection aSearchSel( aSel );
- BOOL bFound = pTextEngine->Search( aSel, rSearchOptions, TRUE );
+ sal_Bool bFound = pTextEngine->Search( aSel, rSearchOptions, sal_True );
if ( bFound )
- pTextEngine->UndoActionStart( XTEXTUNDO_REPLACEALL );
+ pTextEngine->UndoActionStart();
while ( bFound )
{
nFound++;
@@ -335,42 +335,42 @@ USHORT ExtTextView::Replace( const util::SearchOptions& rSearchOptions, BOOL bAl
TextPaM aNewStart = pTextEngine->ImpInsertText( aSel, rSearchOptions.replaceString );
aSel = aSearchSel;
aSel.GetStart() = aNewStart;
- bFound = pTextEngine->Search( aSel, rSearchOptions, TRUE );
+ bFound = pTextEngine->Search( aSel, rSearchOptions, sal_True );
}
if ( nFound )
{
SetSelection( aSel.GetStart() );
pTextEngine->FormatAndUpdate( this );
- pTextEngine->UndoActionEnd( XTEXTUNDO_REPLACEALL );
+ pTextEngine->UndoActionEnd();
}
}
return nFound;
}
-BOOL ExtTextView::ImpIndentBlock( BOOL bRight )
+sal_Bool ExtTextView::ImpIndentBlock( sal_Bool bRight )
{
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
TextSelection aSel = GetSelection();
aSel.Justify();
HideSelection();
- GetTextEngine()->UndoActionStart( bRight ? XTEXTUNDO_INDENTBLOCK : XTEXTUNDO_UNINDENTBLOCK );
+ GetTextEngine()->UndoActionStart();
- ULONG nStartPara = aSel.GetStart().GetPara();
- ULONG nEndPara = aSel.GetEnd().GetPara();
+ sal_uLong nStartPara = aSel.GetStart().GetPara();
+ sal_uLong nEndPara = aSel.GetEnd().GetPara();
if ( aSel.HasRange() && !aSel.GetEnd().GetIndex() )
{
nEndPara--; // den dann nicht einruecken...
}
- for ( ULONG nPara = nStartPara; nPara <= nEndPara; nPara++ )
+ for ( sal_uLong nPara = nStartPara; nPara <= nEndPara; nPara++ )
{
if ( bRight )
{
// Tabs hinzufuegen
GetTextEngine()->ImpInsertText( TextPaM( nPara, 0 ), '\t' );
- bDone = TRUE;
+ bDone = sal_True;
}
else
{
@@ -381,14 +381,14 @@ BOOL ExtTextView::ImpIndentBlock( BOOL bRight )
( aText.GetChar( 0 ) == ' ' ) ) )
{
GetTextEngine()->ImpDeleteText( TextSelection( TextPaM( nPara, 0 ), TextPaM( nPara, 1 ) ) );
- bDone = TRUE;
+ bDone = sal_True;
}
}
}
- GetTextEngine()->UndoActionEnd( bRight ? XTEXTUNDO_INDENTBLOCK : XTEXTUNDO_UNINDENTBLOCK );
+ GetTextEngine()->UndoActionEnd();
- BOOL bRange = aSel.HasRange();
+ sal_Bool bRange = aSel.HasRange();
if ( bRight )
{
aSel.GetStart().GetIndex()++;
@@ -409,13 +409,13 @@ BOOL ExtTextView::ImpIndentBlock( BOOL bRight )
return bDone;
}
-BOOL ExtTextView::IndentBlock()
+sal_Bool ExtTextView::IndentBlock()
{
- return ImpIndentBlock( TRUE );
+ return ImpIndentBlock( sal_True );
}
-BOOL ExtTextView::UnindentBlock()
+sal_Bool ExtTextView::UnindentBlock()
{
- return ImpIndentBlock( FALSE );
+ return ImpIndentBlock( sal_False );
}
diff --git a/svtools/source/filter.vcl/filter/FilterConfigItem.cxx b/svtools/source/filter.vcl/filter/FilterConfigItem.cxx
index 312f62af9d84..8d7752ddd7df 100644
--- a/svtools/source/filter.vcl/filter/FilterConfigItem.cxx
+++ b/svtools/source/filter.vcl/filter/FilterConfigItem.cxx
@@ -428,7 +428,7 @@ void FilterConfigItem::WriteBool( const OUString& rKey, sal_Bool bNewValue )
Any aAny;
if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) )
{
- sal_Bool bOldValue;
+ sal_Bool bOldValue(sal_True);
if ( aAny >>= bOldValue )
{
if ( bOldValue != bNewValue )
@@ -462,7 +462,7 @@ void FilterConfigItem::WriteInt32( const OUString& rKey, sal_Int32 nNewValue )
if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) )
{
- sal_Int32 nOldValue;
+ sal_Int32 nOldValue = 0;
if ( aAny >>= nOldValue )
{
if ( nOldValue != nNewValue )
diff --git a/svtools/source/filter.vcl/filter/exportdialog.cxx b/svtools/source/filter.vcl/filter/exportdialog.cxx
index 20cc46a30ab5..701619d31f6c 100644
--- a/svtools/source/filter.vcl/filter/exportdialog.cxx
+++ b/svtools/source/filter.vcl/filter/exportdialog.cxx
@@ -794,7 +794,7 @@ void ExportDialog::createSizeControls( vcl::RowOrColumn& rLayout )
nUnit = UNIT_PIXEL;
if ( nUnit < 0 )
nUnit = UNIT_CM;
- maLbSizeX.SelectEntryPos( static_cast< USHORT >( nUnit ) );
+ maLbSizeX.SelectEntryPos( static_cast< sal_uInt16 >( nUnit ) );
if ( mbIsPixelFormat ) // TODO: (metafileresolutionsupport) should be supported for vector formats also... this makes
{ // sense eg for bitmap fillings in metafiles, to preserve high dpi output
@@ -807,7 +807,7 @@ void ExportDialog::createSizeControls( vcl::RowOrColumn& rLayout )
sal_Int32 nResolutionUnit = mpOptionsItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "PixelExportResolutionUnit" ) ), 1 );
if ( ( nResolutionUnit < 0 ) || ( nResolutionUnit > 2 ) )
nResolutionUnit = 1;
- maLbResolution.SelectEntryPos( static_cast< USHORT >( nResolutionUnit ) );
+ maLbResolution.SelectEntryPos( static_cast< sal_uInt16 >( nResolutionUnit ) );
}
boost::shared_ptr< vcl::Spacer > xSpacer( new vcl::Spacer( &rLayout, 2 ) );
diff --git a/svtools/source/filter.vcl/filter/filter.cxx b/svtools/source/filter.vcl/filter/filter.cxx
index 7e0729082841..9c2c28dfbe3b 100644
--- a/svtools/source/filter.vcl/filter/filter.cxx
+++ b/svtools/source/filter.vcl/filter/filter.cxx
@@ -133,9 +133,9 @@ public:
~ImpFilterOutputStream() {}
};
-BOOL ImplDirEntryHelper::Exists( const INetURLObject& rObj )
+sal_Bool ImplDirEntryHelper::Exists( const INetURLObject& rObj )
{
- BOOL bExists = FALSE;
+ sal_Bool bExists = sal_False;
try
{
@@ -188,11 +188,11 @@ void ImplDirEntryHelper::Kill( const String& rMainUrl )
//--------------------------------------------------------------------------
-BYTE* ImplSearchEntry( BYTE* pSource, BYTE* pDest, ULONG nComp, ULONG nSize )
+sal_uInt8* ImplSearchEntry( sal_uInt8* pSource, sal_uInt8* pDest, sal_uLong nComp, sal_uLong nSize )
{
while ( nComp-- >= nSize )
{
- ULONG i;
+ sal_uLong i;
for ( i = 0; i < nSize; i++ )
{
if ( ( pSource[i]&~0x20 ) != ( pDest[i]&~0x20 ) )
@@ -225,9 +225,9 @@ inline String ImpGetExtension( const String &rPath )
|* Eingabe-prarameter:
|* rPath - Dateipfad
|* rFormatExtension - Inhalt egal
-|* bTest - setze FALSE
+|* bTest - setze sal_False
|* Ausgabe-parameter:
-|* Funkionswert - TRUE wenn Erfolg
+|* Funkionswert - sal_True wenn Erfolg
|* rFormatExtension - Bei Erfolg: uebliche Dateiendung
|* des Formats (Grossbuchstaben)
|* 2.) Datei anlesen, Dateiformat ueberpruefen
@@ -235,11 +235,11 @@ inline String ImpGetExtension( const String &rPath )
|* rPath - Dateipfad
|* rFormatExtension - uebliche Dateiendung des Formats
|* (Grossbuchstaben)
-|* bTest - setze TRUE
+|* bTest - setze sal_True
|* Ausgabe-parameter:
-|* Funkionswert - FALSE, wenn die Datei bestimmt nicht
+|* Funkionswert - sal_False, wenn die Datei bestimmt nicht
|* vom uebgebenen Format ist.
-|* TRUE, wenn die Datei WAHRSCHEINLICH von
+|* sal_True, wenn die Datei WAHRSCHEINLICH von
|* dem Format ist, ODER WENN DAS FORMAT
|* DIESER FUNKTION NICHT BEKANNT IST!
|*
@@ -248,22 +248,22 @@ inline String ImpGetExtension( const String &rPath )
|*
*************************************************************************/
-static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, BOOL bTest )
+static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, sal_Bool bTest )
{
- USHORT i;
- BYTE sFirstBytes[ 256 ];
- ULONG nFirstLong,nSecondLong;
- ULONG nStreamPos = rStream.Tell();
+ sal_uInt16 i;
+ sal_uInt8 sFirstBytes[ 256 ];
+ sal_uLong nFirstLong,nSecondLong;
+ sal_uLong nStreamPos = rStream.Tell();
rStream.Seek( STREAM_SEEK_TO_END );
- ULONG nStreamLen = rStream.Tell() - nStreamPos;
+ sal_uLong nStreamLen = rStream.Tell() - nStreamPos;
rStream.Seek( nStreamPos );
if ( !nStreamLen )
{
SvLockBytes* pLockBytes = rStream.GetLockBytes();
if ( pLockBytes )
- pLockBytes->SetSynchronMode( TRUE );
+ pLockBytes->SetSynchronMode( sal_True );
rStream.Seek( STREAM_SEEK_TO_END );
nStreamLen = rStream.Tell() - nStreamPos;
@@ -276,25 +276,25 @@ static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, B
{
rStream.Read( sFirstBytes, nStreamLen );
- for( i = (USHORT) nStreamLen; i < 256; i++ )
+ for( i = (sal_uInt16) nStreamLen; i < 256; i++ )
sFirstBytes[ i ]=0;
}
if( rStream.GetError() )
- return FALSE;
+ return sal_False;
// Die ersten 8 Bytes in nFirstLong, nSecondLong unterbringen,
// Big-Endian:
for( i = 0, nFirstLong = 0L, nSecondLong = 0L; i < 4; i++ )
{
- nFirstLong=(nFirstLong<<8)|(ULONG)sFirstBytes[i];
- nSecondLong=(nSecondLong<<8)|(ULONG)sFirstBytes[i+4];
+ nFirstLong=(nFirstLong<<8)|(sal_uLong)sFirstBytes[i];
+ nSecondLong=(nSecondLong<<8)|(sal_uLong)sFirstBytes[i+4];
}
- // Folgende Variable ist nur bei bTest==TRUE interessant. Sie
- // bleibt FALSE, wenn das Format (rFormatExtension) hier noch nicht
+ // Folgende Variable ist nur bei bTest==sal_True interessant. Sie
+ // bleibt sal_False, wenn das Format (rFormatExtension) hier noch nicht
// einprogrammiert wurde.
- BOOL bSomethingTested = FALSE;
+ sal_Bool bSomethingTested = sal_False;
// Nun werden die verschieden Formate ueberprueft. Dabei ist die
// Reihenfolge nicht egal. Z.b. koennte eine MET-Datei auch durch
@@ -303,7 +303,7 @@ static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, B
// Theoretisch waere aber vielleicht auch eine BMP-Datei denkbar,
// die durch den MET-Test geht.
// Diese Probleme gibt es natuerlich nicht nur bei MET und BMP.
- // Deshalb wird im Falle der Uberpruefung eines Formats (bTest==TRUE)
+ // Deshalb wird im Falle der Uberpruefung eines Formats (bTest==sal_True)
// nur genau dieses eine Format getestet. Alles andere koennte fatale
// Folgen haben, z.B. wenn der Benutzer sagt, es sei BMP-Datei (und es
// ist BMP-Datei), und hier wuerde die Datei durch den MET-Test gehen...
@@ -311,26 +311,26 @@ static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, B
//--------------------------- MET ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "MET", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested=TRUE;
+ bSomethingTested=sal_True;
if( sFirstBytes[2] == 0xd3 )
{
rStream.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
rStream.Seek( nStreamPos );
- USHORT nFieldSize;
- BYTE nMagic;
- BOOL bOK=TRUE;
+ sal_uInt16 nFieldSize;
+ sal_uInt8 nMagic;
+ sal_Bool bOK=sal_True;
rStream >> nFieldSize >> nMagic;
for (i=0; i<3; i++) {
- if (nFieldSize<6) { bOK=FALSE; break; }
- if (nStreamLen < rStream.Tell() + nFieldSize ) { bOK=FALSE; break; }
+ if (nFieldSize<6) { bOK=sal_False; break; }
+ if (nStreamLen < rStream.Tell() + nFieldSize ) { bOK=sal_False; break; }
rStream.SeekRel(nFieldSize-3);
rStream >> nFieldSize >> nMagic;
- if (nMagic!=0xd3) { bOK=FALSE; break; }
+ if (nMagic!=0xd3) { bOK=sal_False; break; }
}
rStream.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
if (bOK && !rStream.GetError()) {
rFormatExtension= UniString::CreateFromAscii( "MET", 3 );
- return TRUE;
+ return sal_True;
}
}
}
@@ -338,9 +338,9 @@ static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, B
//--------------------------- BMP ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "BMP", 3 ) == COMPARE_EQUAL ) )
{
- BYTE nOffs;
+ sal_uInt8 nOffs;
- bSomethingTested=TRUE;
+ bSomethingTested=sal_True;
// OS/2-Bitmaparray ('BA') koennen wir evtl. auch lesen,
// dementspr. muessen wir den Offset anpassen,
@@ -364,7 +364,7 @@ static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, B
sFirstBytes[14+nOffs] == 0x0c )
{
rFormatExtension = UniString::CreateFromAscii( "BMP", 3 );
- return TRUE;
+ return sal_True;
}
}
}
@@ -375,33 +375,33 @@ static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, B
( rFormatExtension.CompareToAscii( "WMF", 3 ) == COMPARE_EQUAL ) ||
( rFormatExtension.CompareToAscii( "EMF", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested = TRUE;
+ bSomethingTested = sal_True;
if ( nFirstLong==0xd7cdc69a || nFirstLong==0x01000900 )
{
rFormatExtension = UniString::CreateFromAscii( "WMF", 3 );
- return TRUE;
+ return sal_True;
}
else if( nFirstLong == 0x01000000 && sFirstBytes[ 40 ] == 0x20 && sFirstBytes[ 41 ] == 0x45 &&
sFirstBytes[ 42 ] == 0x4d && sFirstBytes[ 43 ] == 0x46 )
{
rFormatExtension = UniString::CreateFromAscii( "EMF", 3 );
- return TRUE;
+ return sal_True;
}
}
//--------------------------- PCX ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "PCX", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested=TRUE;
+ bSomethingTested=sal_True;
if (sFirstBytes[0]==0x0a)
{
- BYTE nVersion=sFirstBytes[1];
- BYTE nEncoding=sFirstBytes[2];
+ sal_uInt8 nVersion=sFirstBytes[1];
+ sal_uInt8 nEncoding=sFirstBytes[2];
if( ( nVersion==0 || nVersion==2 || nVersion==3 || nVersion==5 ) && nEncoding<=1 )
{
rFormatExtension = UniString::CreateFromAscii( "PCX", 3 );
- return TRUE;
+ return sal_True;
}
}
}
@@ -409,69 +409,69 @@ static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, B
//--------------------------- TIF ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "TIF", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested=TRUE;
+ bSomethingTested=sal_True;
if ( nFirstLong==0x49492a00 || nFirstLong==0x4d4d002a )
{
rFormatExtension=UniString::CreateFromAscii( "TIF", 3 );
- return TRUE;
+ return sal_True;
}
}
//--------------------------- GIF ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "GIF", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested=TRUE;
+ bSomethingTested=sal_True;
if ( nFirstLong==0x47494638 && (sFirstBytes[4]==0x37 || sFirstBytes[4]==0x39) && sFirstBytes[5]==0x61 )
{
rFormatExtension = UniString::CreateFromAscii( "GIF", 3 );
- return TRUE;
+ return sal_True;
}
}
//--------------------------- PNG ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "PNG", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested=TRUE;
+ bSomethingTested=sal_True;
if (nFirstLong==0x89504e47 && nSecondLong==0x0d0a1a0a)
{
rFormatExtension = UniString::CreateFromAscii( "PNG", 3 );
- return TRUE;
+ return sal_True;
}
}
//--------------------------- JPG ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "JPG", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested=TRUE;
+ bSomethingTested=sal_True;
if ( ( nFirstLong==0xffd8ffe0 && sFirstBytes[6]==0x4a && sFirstBytes[7]==0x46 && sFirstBytes[8]==0x49 && sFirstBytes[9]==0x46 ) ||
( nFirstLong==0xffd8fffe ) || ( 0xffd8ff00 == ( nFirstLong & 0xffffff00 ) ) )
{
rFormatExtension = UniString::CreateFromAscii( "JPG", 3 );
- return TRUE;
+ return sal_True;
}
}
//--------------------------- SVM ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "SVM", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested=TRUE;
+ bSomethingTested=sal_True;
if( nFirstLong==0x53564744 && sFirstBytes[4]==0x49 )
{
rFormatExtension = UniString::CreateFromAscii( "SVM", 3 );
- return TRUE;
+ return sal_True;
}
else if( sFirstBytes[0]==0x56 && sFirstBytes[1]==0x43 && sFirstBytes[2]==0x4C &&
sFirstBytes[3]==0x4D && sFirstBytes[4]==0x54 && sFirstBytes[5]==0x46 )
{
rFormatExtension = UniString::CreateFromAscii( "SVM", 3 );
- return TRUE;
+ return sal_True;
}
}
//--------------------------- PCD ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "PCD", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested = TRUE;
+ bSomethingTested = sal_True;
if( nStreamLen >= 2055 )
{
char sBuf[8];
@@ -481,7 +481,7 @@ static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, B
if( strncmp( sBuf, "PCD_IPI", 7 ) == 0 )
{
rFormatExtension = UniString::CreateFromAscii( "PCD", 3 );
- return TRUE;
+ return sal_True;
}
}
}
@@ -489,30 +489,30 @@ static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, B
//--------------------------- PSD ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "PSD", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested = TRUE;
+ bSomethingTested = sal_True;
if ( ( nFirstLong == 0x38425053 ) && ( (nSecondLong >> 16 ) == 1 ) )
{
rFormatExtension = UniString::CreateFromAscii( "PSD", 3 );
- return TRUE;
+ return sal_True;
}
}
//--------------------------- EPS ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "EPS", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested = TRUE;
- if ( ( nFirstLong == 0xC5D0D3C6 ) || ( ImplSearchEntry( sFirstBytes, (BYTE*)"%!PS-Adobe", 10, 10 ) &&
- ImplSearchEntry( &sFirstBytes[15], (BYTE*)"EPS", 3, 3 ) ) )
+ bSomethingTested = sal_True;
+ if ( ( nFirstLong == 0xC5D0D3C6 ) || ( ImplSearchEntry( sFirstBytes, (sal_uInt8*)"%!PS-Adobe", 10, 10 ) &&
+ ImplSearchEntry( &sFirstBytes[15], (sal_uInt8*)"EPS", 3, 3 ) ) )
{
rFormatExtension = UniString::CreateFromAscii( "EPS", 3 );
- return TRUE;
+ return sal_True;
}
}
//--------------------------- DXF ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "DXF", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested=TRUE;
+ bSomethingTested=sal_True;
i=0;
while (i<256 && sFirstBytes[i]<=32)
@@ -533,22 +533,22 @@ static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, B
if (strncmp((char*)(sFirstBytes+i),"SECTION",7)==0)
{
rFormatExtension = UniString::CreateFromAscii( "DXF", 3 );
- return TRUE;
+ return sal_True;
}
}
if( strncmp( (char*) sFirstBytes, "AutoCAD Binary DXF", 18 ) == 0 )
{
rFormatExtension = UniString::CreateFromAscii( "DXF", 3 );
- return TRUE;
+ return sal_True;
}
}
//--------------------------- PCT ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "PCT", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested = TRUE;
- BYTE sBuf[3];
+ bSomethingTested = sal_True;
+ sal_uInt8 sBuf[3];
// store number format
sal_uInt16 oldNumberFormat = rStream.GetNumberFormatInt();
sal_uInt32 nOffset; // in ms documents the pict format is used without the first 512 bytes
@@ -577,19 +577,19 @@ static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, B
if ( sBuf[ 0 ] == 0x00 && sBuf[ 1 ] == 0x11 && sBuf[ 2 ] == 0x02)
{
rFormatExtension = UniString::CreateFromAscii( "PCT", 3 );
- return TRUE;
+ return sal_True;
}
// normal version 1 - page A25
else if (sBuf[ 0 ] == 0x11 && sBuf[ 1 ] == 0x01 && bdBoxOk) {
rFormatExtension = UniString::CreateFromAscii( "PCT", 3 );
- return TRUE;
+ return sal_True;
}
// previous code kept in order to do not break any compatibility
// probably eroneous
else if ( sBuf[ 0 ] == 0x00 && sBuf[ 1 ] == 0x11 && sBuf[ 2 ] == 0x01 && bdBoxOk)
{
rFormatExtension = UniString::CreateFromAscii( "PCT", 3 );
- return TRUE;
+ return sal_True;
}
}
}
@@ -600,7 +600,7 @@ static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, B
( rFormatExtension.CompareToAscii( "PGM", 3 ) == COMPARE_EQUAL ) ||
( rFormatExtension.CompareToAscii( "PPM", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested=TRUE;
+ bSomethingTested=sal_True;
if ( sFirstBytes[ 0 ] == 'P' )
{
switch( sFirstBytes[ 1 ] )
@@ -608,17 +608,17 @@ static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, B
case '1' :
case '4' :
rFormatExtension = UniString::CreateFromAscii( "PBM", 3 );
- return TRUE;
+ return sal_True;
case '2' :
case '5' :
rFormatExtension = UniString::CreateFromAscii( "PGM", 3 );
- return TRUE;
+ return sal_True;
case '3' :
case '6' :
rFormatExtension = UniString::CreateFromAscii( "PPM", 3 );
- return TRUE;
+ return sal_True;
}
}
}
@@ -626,81 +626,81 @@ static BOOL ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtension, B
//--------------------------- RAS( SUN RasterFile )------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "RAS", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested=TRUE;
+ bSomethingTested=sal_True;
if( nFirstLong == 0x59a66a95 )
{
rFormatExtension = UniString::CreateFromAscii( "RAS", 3 );
- return TRUE;
+ return sal_True;
}
}
//--------------------------- XPM ------------------------------------
if( !bTest )
{
- bSomethingTested = TRUE;
- if( ImplSearchEntry( sFirstBytes, (BYTE*)"/* XPM */", 256, 9 ) )
+ bSomethingTested = sal_True;
+ if( ImplSearchEntry( sFirstBytes, (sal_uInt8*)"/* XPM */", 256, 9 ) )
{
rFormatExtension = UniString::CreateFromAscii( "XPM", 3 );
- return TRUE;
+ return sal_True;
}
}
else if( rFormatExtension.CompareToAscii( "XPM", 3 ) == COMPARE_EQUAL )
{
- bSomethingTested = TRUE;
- return TRUE;
+ bSomethingTested = sal_True;
+ return sal_True;
}
//--------------------------- XBM ------------------------------------
if( !bTest )
{
- ULONG nSize = ( nStreamLen > 2048 ) ? 2048 : nStreamLen;
- BYTE* pBuf = new BYTE [ nSize ];
+ sal_uLong nSize = ( nStreamLen > 2048 ) ? 2048 : nStreamLen;
+ sal_uInt8* pBuf = new sal_uInt8 [ nSize ];
rStream.Seek( nStreamPos );
rStream.Read( pBuf, nSize );
- BYTE* pPtr = ImplSearchEntry( pBuf, (BYTE*)"#define", nSize, 7 );
+ sal_uInt8* pPtr = ImplSearchEntry( pBuf, (sal_uInt8*)"#define", nSize, 7 );
if( pPtr )
{
- if( ImplSearchEntry( pPtr, (BYTE*)"_width", pBuf + nSize - pPtr, 6 ) )
+ if( ImplSearchEntry( pPtr, (sal_uInt8*)"_width", pBuf + nSize - pPtr, 6 ) )
{
rFormatExtension = UniString::CreateFromAscii( "XBM", 3 );
delete[] pBuf;
- return TRUE;
+ return sal_True;
}
}
delete[] pBuf;
}
else if( rFormatExtension.CompareToAscii( "XBM", 3 ) == COMPARE_EQUAL )
{
- bSomethingTested = TRUE;
- return TRUE;
+ bSomethingTested = sal_True;
+ return sal_True;
}
//--------------------------- TGA ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "TGA", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested = TRUE;
+ bSomethingTested = sal_True;
if( rFormatExtension.CompareToAscii( "TGA", 3 ) == COMPARE_EQUAL )
- return TRUE;
+ return sal_True;
}
//--------------------------- SGV ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "SGV", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested = TRUE;
+ bSomethingTested = sal_True;
if( rFormatExtension.CompareToAscii( "SGV", 3 ) == COMPARE_EQUAL )
- return TRUE;
+ return sal_True;
}
//--------------------------- SGF ------------------------------------
if( !bTest || ( rFormatExtension.CompareToAscii( "SGF", 3 ) == COMPARE_EQUAL ) )
{
- bSomethingTested=TRUE;
+ bSomethingTested=sal_True;
if( sFirstBytes[ 0 ] == 'J' && sFirstBytes[ 1 ] == 'J' )
{
rFormatExtension = UniString::CreateFromAscii( "SGF", 3 );
- return TRUE;
+ return sal_True;
}
}
@@ -718,7 +718,7 @@ sal_uInt16 GraphicFilter::ImpTestOrFindFormat( const String& rPath, SvStream& rS
if( rFormat == GRFILTER_FORMAT_DONTKNOW )
{
String aFormatExt;
- if( ImpPeekGraphicFormat( rStream, aFormatExt, FALSE ) )
+ if( ImpPeekGraphicFormat( rStream, aFormatExt, sal_False ) )
{
for( sal_uInt16 i = 0; i < n; i++ )
{
@@ -747,7 +747,7 @@ sal_uInt16 GraphicFilter::ImpTestOrFindFormat( const String& rPath, SvStream& rS
else
{
String aTmpStr( pConfig->GetImportFormatExtension( rFormat ) );
- if( !ImpPeekGraphicFormat( rStream, aTmpStr, TRUE ) )
+ if( !ImpPeekGraphicFormat( rStream, aTmpStr, sal_True ) )
return GRFILTER_FORMATERROR;
if ( pConfig->GetImportFormatExtension( rFormat ).EqualsIgnoreCaseAscii( "pcd" ) )
{
@@ -1079,7 +1079,7 @@ void GraphicFilter::ImplInit()
// ------------------------------------------------------------------------
-ULONG GraphicFilter::ImplSetError( ULONG nError, const SvStream* pStm )
+sal_uLong GraphicFilter::ImplSetError( sal_uLong nError, const SvStream* pStm )
{
pErrorEx->nFilterError = nError;
pErrorEx->nStreamError = pStm ? pStm->GetError() : ERRCODE_NONE;
@@ -1087,28 +1087,28 @@ ULONG GraphicFilter::ImplSetError( ULONG nError, const SvStream* pStm )
}
// ------------------------------------------------------------------------
-USHORT GraphicFilter::GetImportFormatCount()
+sal_uInt16 GraphicFilter::GetImportFormatCount()
{
return pConfig->GetImportFormatCount();
}
// ------------------------------------------------------------------------
-USHORT GraphicFilter::GetImportFormatNumber( const String& rFormatName )
+sal_uInt16 GraphicFilter::GetImportFormatNumber( const String& rFormatName )
{
return pConfig->GetImportFormatNumber( rFormatName );
}
// ------------------------------------------------------------------------
-USHORT GraphicFilter::GetImportFormatNumberForMediaType( const String& rMediaType )
+sal_uInt16 GraphicFilter::GetImportFormatNumberForMediaType( const String& rMediaType )
{
return pConfig->GetImportFormatNumberForMediaType( rMediaType );
}
// ------------------------------------------------------------------------
-USHORT GraphicFilter::GetImportFormatNumberForShortName( const String& rShortName )
+sal_uInt16 GraphicFilter::GetImportFormatNumberForShortName( const String& rShortName )
{
return pConfig->GetImportFormatNumberForShortName( rShortName );
}
@@ -1122,35 +1122,35 @@ sal_uInt16 GraphicFilter::GetImportFormatNumberForTypeName( const String& rType
// ------------------------------------------------------------------------
-String GraphicFilter::GetImportFormatName( USHORT nFormat )
+String GraphicFilter::GetImportFormatName( sal_uInt16 nFormat )
{
return pConfig->GetImportFormatName( nFormat );
}
// ------------------------------------------------------------------------
-String GraphicFilter::GetImportFormatTypeName( USHORT nFormat )
+String GraphicFilter::GetImportFormatTypeName( sal_uInt16 nFormat )
{
return pConfig->GetImportFilterTypeName( nFormat );
}
// ------------------------------------------------------------------------
-String GraphicFilter::GetImportFormatMediaType( USHORT nFormat )
+String GraphicFilter::GetImportFormatMediaType( sal_uInt16 nFormat )
{
return pConfig->GetImportFormatMediaType( nFormat );
}
// ------------------------------------------------------------------------
-String GraphicFilter::GetImportFormatShortName( USHORT nFormat )
+String GraphicFilter::GetImportFormatShortName( sal_uInt16 nFormat )
{
return pConfig->GetImportFormatShortName( nFormat );
}
// ------------------------------------------------------------------------
-String GraphicFilter::GetImportOSFileType( USHORT )
+String GraphicFilter::GetImportOSFileType( sal_uInt16 )
{
String aOSFileType;
return aOSFileType;
@@ -1158,42 +1158,42 @@ String GraphicFilter::GetImportOSFileType( USHORT )
// ------------------------------------------------------------------------
-String GraphicFilter::GetImportWildcard( USHORT nFormat, sal_Int32 nEntry )
+String GraphicFilter::GetImportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry )
{
return pConfig->GetImportWildcard( nFormat, nEntry );
}
// ------------------------------------------------------------------------
-BOOL GraphicFilter::IsImportPixelFormat( USHORT nFormat )
+sal_Bool GraphicFilter::IsImportPixelFormat( sal_uInt16 nFormat )
{
return pConfig->IsImportPixelFormat( nFormat );
}
// ------------------------------------------------------------------------
-USHORT GraphicFilter::GetExportFormatCount()
+sal_uInt16 GraphicFilter::GetExportFormatCount()
{
return pConfig->GetExportFormatCount();
}
// ------------------------------------------------------------------------
-USHORT GraphicFilter::GetExportFormatNumber( const String& rFormatName )
+sal_uInt16 GraphicFilter::GetExportFormatNumber( const String& rFormatName )
{
return pConfig->GetExportFormatNumber( rFormatName );
}
// ------------------------------------------------------------------------
-USHORT GraphicFilter::GetExportFormatNumberForMediaType( const String& rMediaType )
+sal_uInt16 GraphicFilter::GetExportFormatNumberForMediaType( const String& rMediaType )
{
return pConfig->GetExportFormatNumberForMediaType( rMediaType );
}
// ------------------------------------------------------------------------
-USHORT GraphicFilter::GetExportFormatNumberForShortName( const String& rShortName )
+sal_uInt16 GraphicFilter::GetExportFormatNumberForShortName( const String& rShortName )
{
return pConfig->GetExportFormatNumberForShortName( rShortName );
}
@@ -1207,35 +1207,35 @@ sal_uInt16 GraphicFilter::GetExportFormatNumberForTypeName( const String& rType
// ------------------------------------------------------------------------
-String GraphicFilter::GetExportFormatName( USHORT nFormat )
+String GraphicFilter::GetExportFormatName( sal_uInt16 nFormat )
{
return pConfig->GetExportFormatName( nFormat );
}
// ------------------------------------------------------------------------
-String GraphicFilter::GetExportFormatTypeName( USHORT nFormat )
+String GraphicFilter::GetExportFormatTypeName( sal_uInt16 nFormat )
{
return pConfig->GetExportFilterTypeName( nFormat );
}
// ------------------------------------------------------------------------
-String GraphicFilter::GetExportFormatMediaType( USHORT nFormat )
+String GraphicFilter::GetExportFormatMediaType( sal_uInt16 nFormat )
{
return pConfig->GetExportFormatMediaType( nFormat );
}
// ------------------------------------------------------------------------
-String GraphicFilter::GetExportFormatShortName( USHORT nFormat )
+String GraphicFilter::GetExportFormatShortName( sal_uInt16 nFormat )
{
return pConfig->GetExportFormatShortName( nFormat );
}
// ------------------------------------------------------------------------
-String GraphicFilter::GetExportOSFileType( USHORT )
+String GraphicFilter::GetExportOSFileType( sal_uInt16 )
{
String aOSFileType;
return aOSFileType;
@@ -1243,22 +1243,22 @@ String GraphicFilter::GetExportOSFileType( USHORT )
// ------------------------------------------------------------------------
-String GraphicFilter::GetExportWildcard( USHORT nFormat, sal_Int32 nEntry )
+String GraphicFilter::GetExportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry )
{
return pConfig->GetExportWildcard( nFormat, nEntry );
}
// ------------------------------------------------------------------------
-BOOL GraphicFilter::IsExportPixelFormat( USHORT nFormat )
+sal_Bool GraphicFilter::IsExportPixelFormat( sal_uInt16 nFormat )
{
return pConfig->IsExportPixelFormat( nFormat );
}
// ------------------------------------------------------------------------
-USHORT GraphicFilter::CanImportGraphic( const INetURLObject& rPath,
- USHORT nFormat, USHORT* pDeterminedFormat )
+sal_uInt16 GraphicFilter::CanImportGraphic( const INetURLObject& rPath,
+ sal_uInt16 nFormat, sal_uInt16* pDeterminedFormat )
{
sal_uInt16 nRetValue = GRFILTER_FORMATERROR;
DBG_ASSERT( rPath.GetProtocol() != INET_PROT_NOT_VALID, "GraphicFilter::CanImportGraphic() : ProtType == INET_PROT_NOT_VALID" );
@@ -1275,10 +1275,10 @@ USHORT GraphicFilter::CanImportGraphic( const INetURLObject& rPath,
// ------------------------------------------------------------------------
-USHORT GraphicFilter::CanImportGraphic( const String& rMainUrl, SvStream& rIStream,
- USHORT nFormat, USHORT* pDeterminedFormat )
+sal_uInt16 GraphicFilter::CanImportGraphic( const String& rMainUrl, SvStream& rIStream,
+ sal_uInt16 nFormat, sal_uInt16* pDeterminedFormat )
{
- ULONG nStreamPos = rIStream.Tell();
+ sal_uLong nStreamPos = rIStream.Tell();
sal_uInt16 nRes = ImpTestOrFindFormat( rMainUrl, rIStream, nFormat );
rIStream.Seek(nStreamPos);
@@ -1286,13 +1286,13 @@ USHORT GraphicFilter::CanImportGraphic( const String& rMainUrl, SvStream& rIStre
if( nRes==GRFILTER_OK && pDeterminedFormat!=NULL )
*pDeterminedFormat = nFormat;
- return (USHORT) ImplSetError( nRes, &rIStream );
+ return (sal_uInt16) ImplSetError( nRes, &rIStream );
}
// ------------------------------------------------------------------------
//SJ: TODO, we need to create a GraphicImporter component
-USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const INetURLObject& rPath,
- USHORT nFormat, USHORT * pDeterminedFormat, sal_uInt32 nImportFlags )
+sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const INetURLObject& rPath,
+ sal_uInt16 nFormat, sal_uInt16 * pDeterminedFormat, sal_uInt32 nImportFlags )
{
sal_uInt16 nRetValue = GRFILTER_FORMATERROR;
DBG_ASSERT( rPath.GetProtocol() != INET_PROT_NOT_VALID, "GraphicFilter::ImportGraphic() : ProtType == INET_PROT_NOT_VALID" );
@@ -1307,25 +1307,25 @@ USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const INetURLObject& rPa
return nRetValue;
}
-USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvStream& rIStream,
- USHORT nFormat, USHORT* pDeterminedFormat, sal_uInt32 nImportFlags )
+sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvStream& rIStream,
+ sal_uInt16 nFormat, sal_uInt16* pDeterminedFormat, sal_uInt32 nImportFlags )
{
return ImportGraphic( rGraphic, rPath, rIStream, nFormat, pDeterminedFormat, nImportFlags, NULL );
}
//-------------------------------------------------------------------------
-USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvStream& rIStream,
- USHORT nFormat, USHORT* pDeterminedFormat, sal_uInt32 nImportFlags,
+sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvStream& rIStream,
+ sal_uInt16 nFormat, sal_uInt16* pDeterminedFormat, sal_uInt32 nImportFlags,
com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >* pFilterData )
{
String aFilterName;
- ULONG nStmBegin;
- USHORT nStatus;
+ sal_uLong nStmBegin;
+ sal_uInt16 nStatus;
GraphicReader* pContext = rGraphic.GetContext();
GfxLinkType eLinkType = GFX_LINK_TYPE_NONE;
- BOOL bDummyContext = ( pContext == (GraphicReader*) 1 );
- const BOOL bLinkSet = rGraphic.IsLink();
+ sal_Bool bDummyContext = ( pContext == (GraphicReader*) 1 );
+ const sal_Bool bLinkSet = rGraphic.IsLink();
FilterConfigItem* pFilterConfigItem = NULL;
Size aPreviewSizeHint( 0, 0 );
@@ -1376,7 +1376,7 @@ USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvS
else
nStmBegin = rIStream.Tell();
- bAbort = FALSE;
+ bAbort = sal_False;
nStatus = ImpTestOrFindFormat( rPath, rIStream, nFormat );
// Falls Pending, geben wir GRFILTER_OK zurueck,
// um mehr Bytes anzufordern
@@ -1385,13 +1385,13 @@ USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvS
rGraphic.SetContext( (GraphicReader*) 1 );
rIStream.ResetError();
rIStream.Seek( nStmBegin );
- return (USHORT) ImplSetError( GRFILTER_OK );
+ return (sal_uInt16) ImplSetError( GRFILTER_OK );
}
rIStream.Seek( nStmBegin );
if( ( nStatus != GRFILTER_OK ) || rIStream.GetError() )
- return (USHORT) ImplSetError( ( nStatus != GRFILTER_OK ) ? nStatus : GRFILTER_OPENERROR, &rIStream );
+ return (sal_uInt16) ImplSetError( ( nStatus != GRFILTER_OK ) ? nStatus : GRFILTER_OPENERROR, &rIStream );
if( pDeterminedFormat )
*pDeterminedFormat = nFormat;
@@ -1525,7 +1525,7 @@ USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvS
else if( aFilterName.EqualsIgnoreCaseAscii( IMP_SVSGF )
|| aFilterName.EqualsIgnoreCaseAscii( IMP_SVSGV ) )
{
- USHORT nVersion;
+ sal_uInt16 nVersion;
unsigned char nTyp = CheckSgfTyp( rIStream, nVersion );
switch( nTyp )
@@ -1637,15 +1637,15 @@ USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvS
if( nStatus == GRFILTER_OK && bCreateNativeLink && ( eLinkType != GFX_LINK_TYPE_NONE ) && !rGraphic.GetContext() && !bLinkSet )
{
- const ULONG nStmEnd = rIStream.Tell();
- const ULONG nBufSize = nStmEnd - nStmBegin;
+ const sal_uLong nStmEnd = rIStream.Tell();
+ const sal_uLong nBufSize = nStmEnd - nStmBegin;
if( nBufSize )
{
- BYTE* pBuf=0;
+ sal_uInt8* pBuf=0;
try
{
- pBuf = new BYTE[ nBufSize ];
+ pBuf = new sal_uInt8[ nBufSize ];
}
catch (std::bad_alloc)
{
@@ -1656,7 +1656,7 @@ USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvS
{
rIStream.Seek( nStmBegin );
rIStream.Read( pBuf, nBufSize );
- rGraphic.SetLink( GfxLink( pBuf, nBufSize, eLinkType, TRUE ) );
+ rGraphic.SetLink( GfxLink( pBuf, nBufSize, eLinkType, sal_True ) );
}
}
}
@@ -1679,12 +1679,12 @@ USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvS
// ------------------------------------------------------------------------
-USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const INetURLObject& rPath,
+sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const INetURLObject& rPath,
sal_uInt16 nFormat, const uno::Sequence< beans::PropertyValue >* pFilterData )
{
sal_uInt16 nRetValue = GRFILTER_FORMATERROR;
DBG_ASSERT( rPath.GetProtocol() != INET_PROT_NOT_VALID, "GraphicFilter::ExportGraphic() : ProtType == INET_PROT_NOT_VALID" );
- BOOL bAlreadyExists = ImplDirEntryHelper::Exists( rPath );
+ sal_Bool bAlreadyExists = ImplDirEntryHelper::Exists( rPath );
String aMainUrl( rPath.GetMainURL( INetURLObject::NO_DECODE ) );
SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( aMainUrl, STREAM_WRITE | STREAM_TRUNC );
@@ -1701,10 +1701,10 @@ USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const INetURLObjec
// ------------------------------------------------------------------------
-USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPath,
+sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPath,
SvStream& rOStm, sal_uInt16 nFormat, const uno::Sequence< beans::PropertyValue >* pFilterData )
{
- USHORT nFormatCount = GetExportFormatCount();
+ sal_uInt16 nFormatCount = GetExportFormatCount();
ResetLastError();
nExpGraphHint = 0;
@@ -1715,7 +1715,7 @@ USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPat
String aExt( aURL.GetFileExtension().toAsciiUpperCase() );
- for( USHORT i = 0; i < nFormatCount; i++ )
+ for( sal_uInt16 i = 0; i < nFormatCount; i++ )
{
if ( pConfig->GetExportFormatExtension( i ).EqualsIgnoreCaseAscii( aExt ) )
{
@@ -1725,13 +1725,13 @@ USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPat
}
}
if( nFormat >= nFormatCount )
- return (USHORT) ImplSetError( GRFILTER_FORMATERROR );
+ return (sal_uInt16) ImplSetError( GRFILTER_FORMATERROR );
FilterConfigItem aConfigItem( (uno::Sequence< beans::PropertyValue >*)pFilterData );
String aFilterName( pConfig->GetExportFilterName( nFormat ) );
- bAbort = FALSE;
- USHORT nStatus = GRFILTER_OK;
+ bAbort = sal_False;
+ sal_uInt16 nStatus = GRFILTER_OK;
GraphicType eType;
Graphic aGraphic( rGraphic );
@@ -1743,12 +1743,12 @@ USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPat
if( eType != GRAPHIC_BITMAP )
{
Size aSizePixel;
- ULONG nColorCount,nBitsPerPixel,nNeededMem,nMaxMem;
+ sal_uLong nColorCount,nBitsPerPixel,nNeededMem,nMaxMem;
VirtualDevice aVirDev;
// Maximalen Speicherbedarf fuer das Bildes holen:
// if( GetOptionsConfig() )
-// nMaxMem = (UINT32)GetOptionsConfig()->ReadKey( "VEC-TO-PIX-MAX-KB", "1024" ).ToInt32();
+// nMaxMem = (sal_uInt32)GetOptionsConfig()->ReadKey( "VEC-TO-PIX-MAX-KB", "1024" ).ToInt32();
// else
nMaxMem = 1024;
@@ -1765,14 +1765,14 @@ USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPat
else if (nColorCount<=256) nBitsPerPixel=8;
else if (nColorCount<=65536) nBitsPerPixel=16;
else nBitsPerPixel=24;
- nNeededMem=((ULONG)aSizePixel.Width()*(ULONG)aSizePixel.Height()*nBitsPerPixel+7)/8;
+ nNeededMem=((sal_uLong)aSizePixel.Width()*(sal_uLong)aSizePixel.Height()*nBitsPerPixel+7)/8;
// ggf. Groesse des Bildes einschraenken:
if (nMaxMem<nNeededMem)
{
double fFak=sqrt(((double)nMaxMem)/((double)nNeededMem));
- aSizePixel.Width()=(ULONG)(((double)aSizePixel.Width())*fFak);
- aSizePixel.Height()=(ULONG)(((double)aSizePixel.Height())*fFak);
+ aSizePixel.Width()=(sal_uLong)(((double)aSizePixel.Width())*fFak);
+ aSizePixel.Height()=(sal_uLong)(((double)aSizePixel.Height())*fFak);
}
aVirDev.SetMapMode(MapMode(MAP_PIXEL));
@@ -1793,7 +1793,7 @@ USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPat
{
Bitmap aBmp( aGraphic.GetBitmap() );
sal_Int32 nColorRes = aConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Colors" ) ), 0 );
- if ( nColorRes && ( nColorRes <= (USHORT)BMP_CONVERSION_24BIT) )
+ if ( nColorRes && ( nColorRes <= (sal_uInt16)BMP_CONVERSION_24BIT) )
{
if( !aBmp.Convert( (BmpConversion) nColorRes ) )
aBmp = aGraphic.GetBitmap();
@@ -2019,16 +2019,16 @@ USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPat
// ------------------------------------------------------------------------
-BOOL GraphicFilter::Setup( USHORT )
+sal_Bool GraphicFilter::Setup( sal_uInt16 )
{
- return FALSE;
+ return sal_False;
}
/* ------------------------------------------------------------------------
No Import filter has a dialog, so
the following two methods are obsolete */
-BOOL GraphicFilter::HasImportDialog( USHORT )
+sal_Bool GraphicFilter::HasImportDialog( sal_uInt16 )
{
return sal_True;
// return pConfig->IsImportDialog( nFormat );
@@ -2036,26 +2036,26 @@ BOOL GraphicFilter::HasImportDialog( USHORT )
// ------------------------------------------------------------------------
-BOOL GraphicFilter::DoImportDialog( Window*, USHORT )
+sal_Bool GraphicFilter::DoImportDialog( Window*, sal_uInt16 )
{
return sal_True;
}
// ------------------------------------------------------------------------
-BOOL GraphicFilter::HasExportDialog( USHORT nFormat )
+sal_Bool GraphicFilter::HasExportDialog( sal_uInt16 nFormat )
{
return pConfig->IsExportDialog( nFormat );
}
// ------------------------------------------------------------------------
-BOOL GraphicFilter::DoExportDialog( Window* pWindow, USHORT nFormat )
+sal_Bool GraphicFilter::DoExportDialog( Window* pWindow, sal_uInt16 nFormat )
{
return DoExportDialog( pWindow, nFormat, FUNIT_MM );
}
-BOOL GraphicFilter::DoExportDialog( Window*, USHORT nFormat, FieldUnit )
+sal_Bool GraphicFilter::DoExportDialog( Window*, sal_uInt16 nFormat, FieldUnit )
{
sal_Bool bRet = sal_False;
com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >
@@ -2113,7 +2113,7 @@ IMPL_LINK( GraphicFilter, FilterCallback, ConvertData*, pData )
if( pData )
{
- USHORT nFormat = GRFILTER_FORMAT_DONTKNOW;
+ sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW;
ByteString aShortName;
switch( pData->mnFormat )
{
@@ -2161,12 +2161,12 @@ GraphicFilter* GraphicFilter::GetGraphicFilter()
int GraphicFilter::LoadGraphic( const String &rPath, const String &rFilterName,
Graphic& rGraphic, GraphicFilter* pFilter,
- USHORT* pDeterminedFormat )
+ sal_uInt16* pDeterminedFormat )
{
if ( !pFilter )
pFilter = GetGraphicFilter();
- const USHORT nFilter = rFilterName.Len() && pFilter->GetImportFormatCount()
+ const sal_uInt16 nFilter = rFilterName.Len() && pFilter->GetImportFormatCount()
? pFilter->GetImportFormatNumber( rFilterName )
: GRFILTER_FORMAT_DONTKNOW;
diff --git a/svtools/source/filter.vcl/filter/filter2.cxx b/svtools/source/filter.vcl/filter/filter2.cxx
index d91ec1a19772..9b655c732036 100644
--- a/svtools/source/filter.vcl/filter/filter2.cxx
+++ b/svtools/source/filter.vcl/filter/filter2.cxx
@@ -40,7 +40,7 @@
#define DATA_SIZE 640
-BYTE* ImplSearchEntry( BYTE* , BYTE* , ULONG , ULONG );
+sal_uInt8* ImplSearchEntry( sal_uInt8* , sal_uInt8* , sal_uLong , sal_uLong );
/*************************************************************************
|*
@@ -51,7 +51,7 @@ BYTE* ImplSearchEntry( BYTE* , BYTE* , ULONG , ULONG );
GraphicDescriptor::GraphicDescriptor( const INetURLObject& rPath ) :
pFileStm( ::utl::UcbStreamHelper::CreateStream( rPath.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ ) ),
aPathExt( rPath.GetFileExtension().toAsciiLowerCase() ),
- bOwnStream( TRUE )
+ bOwnStream( sal_True )
{
ImpConstruct();
}
@@ -64,7 +64,7 @@ GraphicDescriptor::GraphicDescriptor( const INetURLObject& rPath ) :
GraphicDescriptor::GraphicDescriptor( SvStream& rInStream, const String* pPath) :
pFileStm ( &rInStream ),
- bOwnStream ( FALSE )
+ bOwnStream ( sal_False )
{
ImpConstruct();
@@ -93,38 +93,38 @@ GraphicDescriptor::~GraphicDescriptor()
|*
\************************************************************************/
-BOOL GraphicDescriptor::Detect( BOOL bExtendedInfo )
+sal_Bool GraphicDescriptor::Detect( sal_Bool bExtendedInfo )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( pFileStm && !pFileStm->GetError() )
{
SvStream& rStm = *pFileStm;
- UINT16 nOldFormat = rStm.GetNumberFormatInt();
-
- if ( ImpDetectGIF( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectJPG( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectBMP( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectPNG( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectTIF( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectPCX( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectDXF( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectMET( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectSGF( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectSGV( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectSVM( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectWMF( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectEMF( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectPCT( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectXBM( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectXPM( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectPBM( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectPGM( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectPPM( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectRAS( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectTGA( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectPSD( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectEPS( rStm, bExtendedInfo ) ) bRet = TRUE;
- else if ( ImpDetectPCD( rStm, bExtendedInfo ) ) bRet = TRUE;
+ sal_uInt16 nOldFormat = rStm.GetNumberFormatInt();
+
+ if ( ImpDetectGIF( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectJPG( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectBMP( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectPNG( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectTIF( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectPCX( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectDXF( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectMET( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectSGF( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectSGV( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectSVM( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectWMF( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectEMF( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectPCT( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectXBM( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectXPM( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectPBM( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectPGM( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectPPM( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectRAS( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectTGA( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectPSD( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectEPS( rStm, bExtendedInfo ) ) bRet = sal_True;
+ else if ( ImpDetectPCD( rStm, bExtendedInfo ) ) bRet = sal_True;
rStm.SetNumberFormatInt( nOldFormat );
}
@@ -142,7 +142,7 @@ void GraphicDescriptor::ImpConstruct()
nFormat = GFF_NOT;
nBitsPerPixel = 0;
nPlanes = 0;
- bCompressed = FALSE;
+ bCompressed = sal_False;
}
@@ -152,10 +152,10 @@ void GraphicDescriptor::ImpConstruct()
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectBMP( SvStream& rStm, BOOL bExtendedInfo )
+sal_Bool GraphicDescriptor::ImpDetectBMP( SvStream& rStm, sal_Bool bExtendedInfo )
{
- UINT16 nTemp16;
- BOOL bRet = FALSE;
+ sal_uInt16 nTemp16;
+ sal_Bool bRet = sal_False;
sal_Int32 nStmPos = rStm.Tell();
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -172,12 +172,12 @@ BOOL GraphicDescriptor::ImpDetectBMP( SvStream& rStm, BOOL bExtendedInfo )
if ( nTemp16 == 0x4d42 )
{
nFormat = GFF_BMP;
- bRet = TRUE;
+ bRet = sal_True;
if ( bExtendedInfo )
{
- UINT32 nTemp32;
- UINT32 nCompression;
+ sal_uInt32 nTemp32;
+ sal_uInt32 nCompression;
// bis zur ersten Information
rStm.SeekRel( 0x10 );
@@ -218,7 +218,7 @@ BOOL GraphicDescriptor::ImpDetectBMP( SvStream& rStm, BOOL bExtendedInfo )
if ( ( nBitsPerPixel > 24 ) || ( nCompression > 3 ) )
{
nFormat = GFF_NOT;
- bRet = FALSE;
+ bRet = sal_False;
}
}
}
@@ -233,12 +233,12 @@ BOOL GraphicDescriptor::ImpDetectBMP( SvStream& rStm, BOOL bExtendedInfo )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectGIF( SvStream& rStm, BOOL bExtendedInfo )
+sal_Bool GraphicDescriptor::ImpDetectGIF( SvStream& rStm, sal_Bool bExtendedInfo )
{
- UINT32 n32;
- UINT16 n16;
- BOOL bRet = FALSE;
- BYTE cByte;
+ sal_uInt32 n32;
+ sal_uInt16 n16;
+ sal_Bool bRet = sal_False;
+ sal_uInt8 cByte;
sal_Int32 nStmPos = rStm.Tell();
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -250,11 +250,11 @@ BOOL GraphicDescriptor::ImpDetectGIF( SvStream& rStm, BOOL bExtendedInfo )
if ( ( n16 == 0x6137 ) || ( n16 == 0x6139 ) )
{
nFormat = GFF_GIF;
- bRet = TRUE;
+ bRet = sal_True;
if ( bExtendedInfo )
{
- UINT16 nTemp16;
+ sal_uInt16 nTemp16;
// PixelBreite auslesen
rStm >> nTemp16;
@@ -307,10 +307,10 @@ sal_uInt8 ImpDetectJPG_GetNextMarker( SvStream& rStm )
return nByte;
}
-BOOL GraphicDescriptor::ImpDetectJPG( SvStream& rStm, BOOL bExtendedInfo )
+sal_Bool GraphicDescriptor::ImpDetectJPG( SvStream& rStm, sal_Bool bExtendedInfo )
{
- UINT32 nTemp32;
- BOOL bRet = FALSE;
+ sal_uInt32 nTemp32;
+ sal_Bool bRet = sal_False;
sal_Int32 nStmPos = rStm.Tell();
@@ -321,7 +321,7 @@ BOOL GraphicDescriptor::ImpDetectJPG( SvStream& rStm, BOOL bExtendedInfo )
if( 0xffd8ff00 == ( nTemp32 & 0xffffff00 ) )
{
nFormat = GFF_JPG;
- bRet = TRUE;
+ bRet = sal_True;
if ( bExtendedInfo )
{
@@ -473,16 +473,16 @@ BOOL GraphicDescriptor::ImpDetectJPG( SvStream& rStm, BOOL bExtendedInfo )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectPCD( SvStream& rStm, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectPCD( SvStream& rStm, sal_Bool )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
sal_Int32 nStmPos = rStm.Tell();
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
- UINT32 nTemp32;
- UINT16 nTemp16;
- BYTE cByte;
+ sal_uInt32 nTemp32;
+ sal_uInt16 nTemp16;
+ sal_uInt8 cByte;
rStm.SeekRel( 2048 );
rStm >> nTemp32;
@@ -494,7 +494,7 @@ BOOL GraphicDescriptor::ImpDetectPCD( SvStream& rStm, BOOL )
( cByte == 0x49 ) )
{
nFormat = GFF_PCD;
- bRet = TRUE;
+ bRet = sal_True;
}
rStm.Seek( nStmPos );
return bRet;
@@ -507,16 +507,16 @@ BOOL GraphicDescriptor::ImpDetectPCD( SvStream& rStm, BOOL )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectPCX( SvStream& rStm, BOOL bExtendedInfo )
+sal_Bool GraphicDescriptor::ImpDetectPCX( SvStream& rStm, sal_Bool bExtendedInfo )
{
// ! Because 0x0a can be interpreted as LF too ...
// we cant be shure that this special sign represent a PCX file only.
// Every Ascii file is possible here :-(
// We must detect the whole header.
- bExtendedInfo = TRUE;
+ bExtendedInfo = sal_True;
- BOOL bRet = FALSE;
- BYTE cByte;
+ sal_Bool bRet = sal_False;
+ sal_uInt8 cByte;
sal_Int32 nStmPos = rStm.Tell();
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -525,17 +525,17 @@ BOOL GraphicDescriptor::ImpDetectPCX( SvStream& rStm, BOOL bExtendedInfo )
if ( cByte == 0x0a )
{
nFormat = GFF_PCX;
- bRet = TRUE;
+ bRet = sal_True;
if ( bExtendedInfo )
{
- UINT16 nTemp16;
- USHORT nXmin;
- USHORT nXmax;
- USHORT nYmin;
- USHORT nYmax;
- USHORT nDPIx;
- USHORT nDPIy;
+ sal_uInt16 nTemp16;
+ sal_uInt16 nXmin;
+ sal_uInt16 nXmax;
+ sal_uInt16 nYmin;
+ sal_uInt16 nYmax;
+ sal_uInt16 nDPIx;
+ sal_uInt16 nDPIy;
rStm.SeekRel( 1 );
@@ -596,10 +596,10 @@ BOOL GraphicDescriptor::ImpDetectPCX( SvStream& rStm, BOOL bExtendedInfo )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectPNG( SvStream& rStm, BOOL bExtendedInfo )
+sal_Bool GraphicDescriptor::ImpDetectPNG( SvStream& rStm, sal_Bool bExtendedInfo )
{
- UINT32 nTemp32;
- BOOL bRet = FALSE;
+ sal_uInt32 nTemp32;
+ sal_Bool bRet = sal_False;
sal_Int32 nStmPos = rStm.Tell();
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
@@ -611,11 +611,11 @@ BOOL GraphicDescriptor::ImpDetectPNG( SvStream& rStm, BOOL bExtendedInfo )
if ( nTemp32 == 0x0d0a1a0a )
{
nFormat = GFF_PNG;
- bRet = TRUE;
+ bRet = sal_True;
if ( bExtendedInfo )
{
- BYTE cByte;
+ sal_uInt8 cByte;
// IHDR-Chunk
rStm.SeekRel( 8 );
@@ -635,9 +635,9 @@ BOOL GraphicDescriptor::ImpDetectPNG( SvStream& rStm, BOOL bExtendedInfo )
// Planes immer 1;
// Kompression immer
nPlanes = 1;
- bCompressed = TRUE;
+ bCompressed = sal_True;
- UINT32 nLen32;
+ sal_uInt32 nLen32;
rStm.SeekRel( 8 );
@@ -654,8 +654,8 @@ BOOL GraphicDescriptor::ImpDetectPNG( SvStream& rStm, BOOL bExtendedInfo )
if ( nTemp32 == 0x70485973 )
{
- ULONG nXRes;
- ULONG nYRes;
+ sal_uLong nXRes;
+ sal_uLong nYRes;
// horizontale Aufloesung
rStm >> nTemp32;
@@ -693,12 +693,12 @@ BOOL GraphicDescriptor::ImpDetectPNG( SvStream& rStm, BOOL bExtendedInfo )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectTIF( SvStream& rStm, BOOL bExtendedInfo )
+sal_Bool GraphicDescriptor::ImpDetectTIF( SvStream& rStm, sal_Bool bExtendedInfo )
{
- BOOL bDetectOk = FALSE;
- BOOL bRet = FALSE;
- BYTE cByte1;
- BYTE cByte2;
+ sal_Bool bDetectOk = sal_False;
+ sal_Bool bRet = sal_False;
+ sal_uInt8 cByte1;
+ sal_uInt8 cByte2;
sal_Int32 nStmPos = rStm.Tell();
rStm >> cByte1;
@@ -708,30 +708,30 @@ BOOL GraphicDescriptor::ImpDetectTIF( SvStream& rStm, BOOL bExtendedInfo )
if ( cByte1 == 0x49 )
{
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
- bDetectOk = TRUE;
+ bDetectOk = sal_True;
}
else if ( cByte1 == 0x4d )
{
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
- bDetectOk = TRUE;
+ bDetectOk = sal_True;
}
if ( bDetectOk )
{
- UINT16 nTemp16;
+ sal_uInt16 nTemp16;
rStm >> nTemp16;
if ( nTemp16 == 0x2a )
{
nFormat = GFF_TIF;
- bRet = TRUE;
+ bRet = sal_True;
if ( bExtendedInfo )
{
- ULONG nCount;
- ULONG nMax = DATA_SIZE - 48;
- UINT32 nTemp32;
- BOOL bOk = FALSE;
+ sal_uLong nCount;
+ sal_uLong nMax = DATA_SIZE - 48;
+ sal_uInt32 nTemp32;
+ sal_Bool bOk = sal_False;
// Offset des ersten IFD einlesen
rStm >> nTemp32;
@@ -831,9 +831,9 @@ BOOL GraphicDescriptor::ImpDetectTIF( SvStream& rStm, BOOL bExtendedInfo )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectXBM( SvStream&, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectXBM( SvStream&, sal_Bool )
{
- BOOL bRet = aPathExt.CompareToAscii( "xbm", 3 ) == COMPARE_EQUAL;
+ sal_Bool bRet = aPathExt.CompareToAscii( "xbm", 3 ) == COMPARE_EQUAL;
if (bRet)
nFormat = GFF_XBM;
@@ -847,9 +847,9 @@ BOOL GraphicDescriptor::ImpDetectXBM( SvStream&, BOOL )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectXPM( SvStream&, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectXPM( SvStream&, sal_Bool )
{
- BOOL bRet = aPathExt.CompareToAscii( "xpm", 3 ) == COMPARE_EQUAL;
+ sal_Bool bRet = aPathExt.CompareToAscii( "xpm", 3 ) == COMPARE_EQUAL;
if (bRet)
nFormat = GFF_XPM;
@@ -862,22 +862,22 @@ BOOL GraphicDescriptor::ImpDetectXPM( SvStream&, BOOL )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectPBM( SvStream& rStm, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectPBM( SvStream& rStm, sal_Bool )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
// erst auf Datei Extension pruefen, da diese aussagekraeftiger ist
// als die 2 ID Bytes
if ( aPathExt.CompareToAscii( "pbm", 3 ) == COMPARE_EQUAL )
- bRet = TRUE;
+ bRet = sal_True;
else
{
sal_Int32 nStmPos = rStm.Tell();
- BYTE nFirst, nSecond;
+ sal_uInt8 nFirst, nSecond;
rStm >> nFirst >> nSecond;
if ( nFirst == 'P' && ( ( nSecond == '1' ) || ( nSecond == '4' ) ) )
- bRet = TRUE;
+ bRet = sal_True;
rStm.Seek( nStmPos );
}
@@ -893,19 +893,19 @@ BOOL GraphicDescriptor::ImpDetectPBM( SvStream& rStm, BOOL )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectPGM( SvStream& rStm, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectPGM( SvStream& rStm, sal_Bool )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( aPathExt.CompareToAscii( "pgm", 3 ) == COMPARE_EQUAL )
- bRet = TRUE;
+ bRet = sal_True;
else
{
- BYTE nFirst, nSecond;
+ sal_uInt8 nFirst, nSecond;
sal_Int32 nStmPos = rStm.Tell();
rStm >> nFirst >> nSecond;
if ( nFirst == 'P' && ( ( nSecond == '2' ) || ( nSecond == '5' ) ) )
- bRet = TRUE;
+ bRet = sal_True;
rStm.Seek( nStmPos );
}
@@ -921,19 +921,19 @@ BOOL GraphicDescriptor::ImpDetectPGM( SvStream& rStm, BOOL )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectPPM( SvStream& rStm, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectPPM( SvStream& rStm, sal_Bool )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( aPathExt.CompareToAscii( "ppm", 3 ) == COMPARE_EQUAL )
- bRet = TRUE;
+ bRet = sal_True;
else
{
- BYTE nFirst, nSecond;
+ sal_uInt8 nFirst, nSecond;
sal_Int32 nStmPos = rStm.Tell();
rStm >> nFirst >> nSecond;
if ( nFirst == 'P' && ( ( nSecond == '3' ) || ( nSecond == '6' ) ) )
- bRet = TRUE;
+ bRet = sal_True;
rStm.Seek( nStmPos );
}
@@ -949,17 +949,17 @@ BOOL GraphicDescriptor::ImpDetectPPM( SvStream& rStm, BOOL )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectRAS( SvStream& rStm, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectRAS( SvStream& rStm, sal_Bool )
{
- UINT32 nMagicNumber;
- BOOL bRet = FALSE;
+ sal_uInt32 nMagicNumber;
+ sal_Bool bRet = sal_False;
sal_Int32 nStmPos = rStm.Tell();
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
rStm >> nMagicNumber;
if ( nMagicNumber == 0x59a66a95 )
{
nFormat = GFF_RAS;
- bRet = TRUE;
+ bRet = sal_True;
}
rStm.Seek( nStmPos );
return bRet;
@@ -971,9 +971,9 @@ BOOL GraphicDescriptor::ImpDetectRAS( SvStream& rStm, BOOL )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectTGA( SvStream&, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectTGA( SvStream&, sal_Bool )
{
- BOOL bRet = aPathExt.CompareToAscii( "tga", 3 ) == COMPARE_EQUAL;
+ sal_Bool bRet = aPathExt.CompareToAscii( "tga", 3 ) == COMPARE_EQUAL;
if (bRet)
nFormat = GFF_TGA;
@@ -986,28 +986,28 @@ BOOL GraphicDescriptor::ImpDetectTGA( SvStream&, BOOL )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectPSD( SvStream& rStm, BOOL bExtendedInfo )
+sal_Bool GraphicDescriptor::ImpDetectPSD( SvStream& rStm, sal_Bool bExtendedInfo )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
- UINT32 nMagicNumber;
+ sal_uInt32 nMagicNumber;
sal_Int32 nStmPos = rStm.Tell();
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
rStm >> nMagicNumber;
if ( nMagicNumber == 0x38425053 )
{
- UINT16 nVersion;
+ sal_uInt16 nVersion;
rStm >> nVersion;
if ( nVersion == 1 )
{
- bRet = TRUE;
+ bRet = sal_True;
if ( bExtendedInfo )
{
- UINT16 nChannels;
- UINT32 nRows;
- UINT32 nColumns;
- UINT16 nDepth;
- UINT16 nMode;
+ sal_uInt16 nChannels;
+ sal_uInt32 nRows;
+ sal_uInt32 nColumns;
+ sal_uInt16 nDepth;
+ sal_uInt16 nMode;
rStm.SeekRel( 6 ); // Pad
rStm >> nChannels >> nRows >> nColumns >> nDepth >> nMode;
if ( ( nDepth == 1 ) || ( nDepth == 8 ) || ( nDepth == 16 ) )
@@ -1024,11 +1024,11 @@ BOOL GraphicDescriptor::ImpDetectPSD( SvStream& rStm, BOOL bExtendedInfo )
aPixSize.Height() = nRows;
break;
default:
- bRet = FALSE;
+ bRet = sal_False;
}
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
}
}
@@ -1045,14 +1045,14 @@ BOOL GraphicDescriptor::ImpDetectPSD( SvStream& rStm, BOOL bExtendedInfo )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectEPS( SvStream& rStm, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectEPS( SvStream& rStm, sal_Bool )
{
// es wird die EPS mit Vorschaubild Variante und die Extensionuebereinstimmung
// geprueft
sal_uInt32 nFirstLong;
sal_uInt8 nFirstBytes[20];
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
sal_Int32 nStmPos = rStm.Tell();
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
@@ -1065,7 +1065,7 @@ BOOL GraphicDescriptor::ImpDetectEPS( SvStream& rStm, BOOL )
&& ImplSearchEntry( &nFirstBytes[15], (sal_uInt8*)"EPS", 3, 3 ) ) )
{
nFormat = GFF_EPS;
- bRet = TRUE;
+ bRet = sal_True;
}
rStm.Seek( nStmPos );
return bRet;
@@ -1077,9 +1077,9 @@ BOOL GraphicDescriptor::ImpDetectEPS( SvStream& rStm, BOOL )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectDXF( SvStream&, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectDXF( SvStream&, sal_Bool )
{
- BOOL bRet = aPathExt.CompareToAscii( "dxf", 3 ) == COMPARE_EQUAL;
+ sal_Bool bRet = aPathExt.CompareToAscii( "dxf", 3 ) == COMPARE_EQUAL;
if (bRet)
nFormat = GFF_DXF;
@@ -1092,9 +1092,9 @@ BOOL GraphicDescriptor::ImpDetectDXF( SvStream&, BOOL )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectMET( SvStream&, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectMET( SvStream&, sal_Bool )
{
- BOOL bRet = aPathExt.CompareToAscii( "met", 3 ) == COMPARE_EQUAL;
+ sal_Bool bRet = aPathExt.CompareToAscii( "met", 3 ) == COMPARE_EQUAL;
if (bRet)
nFormat = GFF_MET;
@@ -1108,16 +1108,16 @@ BOOL GraphicDescriptor::ImpDetectMET( SvStream&, BOOL )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectPCT( SvStream& rStm, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectPCT( SvStream& rStm, sal_Bool )
{
- BOOL bRet = aPathExt.CompareToAscii( "pct", 3 ) == COMPARE_EQUAL;
+ sal_Bool bRet = aPathExt.CompareToAscii( "pct", 3 ) == COMPARE_EQUAL;
if (bRet)
nFormat = GFF_PCT;
else
{
sal_Int32 nStmPos = rStm.Tell();
- BYTE sBuf[4];
+ sal_uInt8 sBuf[4];
rStm.SeekRel( 522 );
rStm.Read( sBuf, 3 );
@@ -1127,7 +1127,7 @@ BOOL GraphicDescriptor::ImpDetectPCT( SvStream& rStm, BOOL )
if ( ( sBuf[0] == 0x00 ) && ( sBuf[1] == 0x11 ) &&
( ( sBuf[2] == 0x01 ) || ( sBuf[2] == 0x02 ) ) )
{
- bRet = TRUE;
+ bRet = sal_True;
nFormat = GFF_PCT;
}
}
@@ -1144,21 +1144,21 @@ BOOL GraphicDescriptor::ImpDetectPCT( SvStream& rStm, BOOL )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectSGF( SvStream& rStm, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectSGF( SvStream& rStm, sal_Bool )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( aPathExt.CompareToAscii( "sgf", 3 ) == COMPARE_EQUAL )
- bRet = TRUE;
+ bRet = sal_True;
else
{
sal_Int32 nStmPos = rStm.Tell();
- BYTE nFirst, nSecond;
+ sal_uInt8 nFirst, nSecond;
rStm >> nFirst >> nSecond;
if( nFirst == 'J' && nSecond == 'J' )
- bRet = TRUE;
+ bRet = sal_True;
rStm.Seek( nStmPos );
}
@@ -1176,9 +1176,9 @@ BOOL GraphicDescriptor::ImpDetectSGF( SvStream& rStm, BOOL )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectSGV( SvStream&, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectSGV( SvStream&, sal_Bool )
{
- BOOL bRet = aPathExt.CompareToAscii( "sgv", 3 ) == COMPARE_EQUAL;
+ sal_Bool bRet = aPathExt.CompareToAscii( "sgv", 3 ) == COMPARE_EQUAL;
if (bRet)
nFormat = GFF_SGV;
@@ -1192,11 +1192,11 @@ BOOL GraphicDescriptor::ImpDetectSGV( SvStream&, BOOL )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectSVM( SvStream& rStm, BOOL bExtendedInfo )
+sal_Bool GraphicDescriptor::ImpDetectSVM( SvStream& rStm, sal_Bool bExtendedInfo )
{
- UINT32 n32;
- BOOL bRet = FALSE;
- BYTE cByte;
+ sal_uInt32 n32;
+ sal_Bool bRet = sal_False;
+ sal_uInt8 cByte;
sal_Int32 nStmPos = rStm.Tell();
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -1207,12 +1207,12 @@ BOOL GraphicDescriptor::ImpDetectSVM( SvStream& rStm, BOOL bExtendedInfo )
if ( cByte == 0x49 )
{
nFormat = GFF_SVM;
- bRet = TRUE;
+ bRet = sal_True;
if ( bExtendedInfo )
{
- UINT32 nTemp32;
- UINT16 nTemp16;
+ sal_uInt32 nTemp32;
+ sal_uInt16 nTemp16;
rStm.SeekRel( 0x04 );
@@ -1239,14 +1239,14 @@ BOOL GraphicDescriptor::ImpDetectSVM( SvStream& rStm, BOOL bExtendedInfo )
if( n32 == 0x4D4C4356 )
{
- UINT16 nTmp16;
+ sal_uInt16 nTmp16;
rStm >> nTmp16;
if( nTmp16 == 0x4654 )
{
nFormat = GFF_SVM;
- bRet = TRUE;
+ bRet = sal_True;
if( bExtendedInfo )
{
@@ -1271,9 +1271,9 @@ BOOL GraphicDescriptor::ImpDetectSVM( SvStream& rStm, BOOL bExtendedInfo )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectWMF( SvStream&, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectWMF( SvStream&, sal_Bool )
{
- BOOL bRet = aPathExt.CompareToAscii( "wmf",3 ) == COMPARE_EQUAL;
+ sal_Bool bRet = aPathExt.CompareToAscii( "wmf",3 ) == COMPARE_EQUAL;
if (bRet)
nFormat = GFF_WMF;
@@ -1286,9 +1286,9 @@ BOOL GraphicDescriptor::ImpDetectWMF( SvStream&, BOOL )
|*
\************************************************************************/
-BOOL GraphicDescriptor::ImpDetectEMF( SvStream&, BOOL )
+sal_Bool GraphicDescriptor::ImpDetectEMF( SvStream&, sal_Bool )
{
- BOOL bRet = aPathExt.CompareToAscii( "emf", 3 ) == COMPARE_EQUAL;
+ sal_Bool bRet = aPathExt.CompareToAscii( "emf", 3 ) == COMPARE_EQUAL;
if (bRet)
nFormat = GFF_EMF;
diff --git a/svtools/source/filter.vcl/filter/sgfbram.cxx b/svtools/source/filter.vcl/filter/sgfbram.cxx
index 3d1a71f5a2db..9b981f8c0d94 100644
--- a/svtools/source/filter.vcl/filter/sgfbram.cxx
+++ b/svtools/source/filter.vcl/filter/sgfbram.cxx
@@ -75,11 +75,11 @@ SvStream& operator>>(SvStream& rIStream, SgfHeader& rHead)
|* Letzte Aenderung JOE 23.06.93
|*
*************************************************************************/
-BOOL SgfHeader::ChkMagic()
+sal_Bool SgfHeader::ChkMagic()
{ return Magic=='J'*256+'J'; }
-UINT32 SgfHeader::GetOffset()
-{ return UINT32(OfsLo)+0x00010000*UINT32(OfsHi); }
+sal_uInt32 SgfHeader::GetOffset()
+{ return sal_uInt32(OfsLo)+0x00010000*sal_uInt32(OfsHi); }
/*************************************************************************
@@ -105,8 +105,8 @@ SvStream& operator>>(SvStream& rIStream, SgfEntry& rEntr)
return rIStream;
}
-UINT32 SgfEntry::GetOffset()
-{ return UINT32(OfsLo)+0x00010000*UINT32(OfsHi); }
+sal_uInt32 SgfEntry::GetOffset()
+{ return sal_uInt32(OfsLo)+0x00010000*sal_uInt32(OfsHi); }
/*************************************************************************
@@ -165,21 +165,21 @@ SvStream& operator<<(SvStream& rOStream, BmpFileHeader& rHead)
return rOStream;
}
-void BmpFileHeader::SetSize(UINT32 Size)
+void BmpFileHeader::SetSize(sal_uInt32 Size)
{
- SizeLo=UINT16(Size & 0x0000FFFF);
- SizeHi=UINT16((Size & 0xFFFF0000)>>16);
+ SizeLo=sal_uInt16(Size & 0x0000FFFF);
+ SizeHi=sal_uInt16((Size & 0xFFFF0000)>>16);
}
-void BmpFileHeader::SetOfs(UINT32 Ofs)
+void BmpFileHeader::SetOfs(sal_uInt32 Ofs)
{
- OfsLo=UINT16(Ofs & 0x0000FFFF);
- OfsHi=UINT16((Ofs & 0xFFFF0000)>>16);
+ OfsLo=sal_uInt16(Ofs & 0x0000FFFF);
+ OfsHi=sal_uInt16((Ofs & 0xFFFF0000)>>16);
}
-UINT32 BmpFileHeader::GetOfs()
+sal_uInt32 BmpFileHeader::GetOfs()
{
- return UINT32(OfsLo)+0x00010000*UINT32(OfsHi);
+ return sal_uInt32(OfsLo)+0x00010000*sal_uInt32(OfsHi);
}
/*************************************************************************
@@ -247,14 +247,14 @@ SvStream& operator<<(SvStream& rOStream, const RGBQuad& rQuad)
class PcxExpand
{
private:
- USHORT Count;
- BYTE Data;
+ sal_uInt16 Count;
+ sal_uInt8 Data;
public:
PcxExpand() { Count=0; }
- BYTE GetByte(SvStream& rInp);
+ sal_uInt8 GetByte(SvStream& rInp);
};
-BYTE PcxExpand::GetByte(SvStream& rInp)
+sal_uInt8 PcxExpand::GetByte(SvStream& rInp)
{
if (Count>0) {
Count--;
@@ -282,21 +282,21 @@ BYTE PcxExpand::GetByte(SvStream& rInp)
|* Letzte Aenderung JOE 23.06.93
|*
*************************************************************************/
-BOOL SgfFilterBMap(SvStream& rInp, SvStream& rOut, SgfHeader& rHead, SgfEntry&)
+sal_Bool SgfFilterBMap(SvStream& rInp, SvStream& rOut, SgfHeader& rHead, SgfEntry&)
{
BmpFileHeader aBmpHead;
BmpInfoHeader aBmpInfo;
- USHORT nWdtInp=(rHead.Xsize+7)/8; // Breite der Input-Bitmap in Bytes
- USHORT nWdtOut; // Breite der Output-Bitmap in Bytes
- USHORT nColors; // Anzahl der Farben (1,16,256)
- USHORT nColBits; // Anzahl der Bits/Pixel (2, 4, 8)
- USHORT i,j,k; // Spaltenzaehler, Zeilenzaehler, Planezaehler
- USHORT a,b; // Hilfsvariable
- BYTE pl1 = 0,pl2= 0; // Masken fuer die Planes
- BYTE* pBuf=NULL; // Buffer fuer eine Pixelzeile
+ sal_uInt16 nWdtInp=(rHead.Xsize+7)/8; // Breite der Input-Bitmap in Bytes
+ sal_uInt16 nWdtOut; // Breite der Output-Bitmap in Bytes
+ sal_uInt16 nColors; // Anzahl der Farben (1,16,256)
+ sal_uInt16 nColBits; // Anzahl der Bits/Pixel (2, 4, 8)
+ sal_uInt16 i,j,k; // Spaltenzaehler, Zeilenzaehler, Planezaehler
+ sal_uInt16 a,b; // Hilfsvariable
+ sal_uInt8 pl1 = 0,pl2= 0; // Masken fuer die Planes
+ sal_uInt8* pBuf=NULL; // Buffer fuer eine Pixelzeile
PcxExpand aPcx;
- ULONG nOfs;
- BYTE cRGB[4];
+ sal_uLong nOfs;
+ sal_uInt8 cRGB[4];
if (rHead.Planes<=1) nColBits=1; else nColBits=4; if (rHead.Typ==4) nColBits=8;
nColors=1<<nColBits;
@@ -317,8 +317,8 @@ BOOL SgfFilterBMap(SvStream& rInp, SvStream& rOut, SgfHeader& rHead, SgfEntry&)
aBmpInfo.yDpmm=0;
aBmpInfo.ColUsed=0;
aBmpInfo.ColMust=0;
- pBuf=new BYTE[nWdtOut];
- if (!pBuf) return FALSE; // Fehler: kein Speichel da
+ pBuf=new sal_uInt8[nWdtOut];
+ if (!pBuf) return sal_False; // Fehler: kein Speichel da
rOut<<aBmpHead<<aBmpInfo;
memset(pBuf,0,nWdtOut); // Buffer mit Nullen fuellen
@@ -335,7 +335,7 @@ BOOL SgfFilterBMap(SvStream& rInp, SvStream& rOut, SgfHeader& rHead, SgfEntry&)
pBuf[i]=aPcx.GetByte(rInp);
}
for(i=nWdtInp;i<nWdtOut;i++) pBuf[i]=0; // noch bis zu 3 Bytes
- rOut.Seek(nOfs+((ULONG)rHead.Ysize-j-1L)*(ULONG)nWdtOut); // rueckwaerts schreiben!
+ rOut.Seek(nOfs+((sal_uLong)rHead.Ysize-j-1L)*(sal_uLong)nWdtOut); // rueckwaerts schreiben!
rOut.Write((char*)pBuf,nWdtOut);
}
} else if (nColors==16) {
@@ -381,7 +381,7 @@ BOOL SgfFilterBMap(SvStream& rInp, SvStream& rOut, SgfHeader& rHead, SgfEntry&)
}
}
for(i=nWdtInp*4;i<nWdtOut;i++) pBuf[i]=0; // noch bis zu 3 Bytes
- rOut.Seek(nOfs+((ULONG)rHead.Ysize-j-1L)*(ULONG)nWdtOut); // rueckwaerts schreiben!
+ rOut.Seek(nOfs+((sal_uLong)rHead.Ysize-j-1L)*(sal_uLong)nWdtOut); // rueckwaerts schreiben!
rOut.Write((char*)pBuf,nWdtOut);
}
} else if (nColors==256) {
@@ -401,12 +401,12 @@ BOOL SgfFilterBMap(SvStream& rInp, SvStream& rOut, SgfHeader& rHead, SgfEntry&)
for(i=0;i<rHead.Xsize;i++)
pBuf[i]=aPcx.GetByte(rInp);
for(i=rHead.Xsize;i<nWdtOut;i++) pBuf[i]=0; // noch bis zu 3 Bytes
- rOut.Seek(nOfs+((ULONG)rHead.Ysize-j-1L)*(ULONG)nWdtOut); // rueckwaerts schreiben!
+ rOut.Seek(nOfs+((sal_uLong)rHead.Ysize-j-1L)*(sal_uLong)nWdtOut); // rueckwaerts schreiben!
rOut.Write((char*)pBuf,nWdtOut);
}
}
delete[] pBuf;
- return TRUE;
+ return sal_True;
}
@@ -419,14 +419,14 @@ BOOL SgfFilterBMap(SvStream& rInp, SvStream& rOut, SgfHeader& rHead, SgfEntry&)
|* Letzte Aenderung JOE 23.06.93
|*
*************************************************************************/
-BOOL SgfBMapFilter(SvStream& rInp, SvStream& rOut)
+sal_Bool SgfBMapFilter(SvStream& rInp, SvStream& rOut)
{
- ULONG nFileStart; // Offset des SgfHeaders. Im allgemeinen 0.
+ sal_uLong nFileStart; // Offset des SgfHeaders. Im allgemeinen 0.
SgfHeader aHead;
SgfEntry aEntr;
- ULONG nNext;
- BOOL bRdFlag=FALSE; // Grafikentry gelesen ?
- BOOL bRet=FALSE; // Returncode
+ sal_uLong nNext;
+ sal_Bool bRdFlag=sal_False; // Grafikentry gelesen ?
+ sal_Bool bRet=sal_False; // Returncode
nFileStart=rInp.Tell();
rInp>>aHead;
@@ -438,7 +438,7 @@ BOOL SgfBMapFilter(SvStream& rInp, SvStream& rOut)
rInp>>aEntr;
nNext=aEntr.GetOffset();
if (aEntr.Typ==aHead.Typ) {
- bRdFlag=TRUE;
+ bRdFlag=sal_True;
switch(aEntr.Typ) {
case SgfBitImag0:
case SgfBitImag1:
@@ -448,7 +448,7 @@ BOOL SgfBMapFilter(SvStream& rInp, SvStream& rOut)
}
} // while(nNext)
}
- if (rInp.GetError()) bRet=FALSE;
+ if (rInp.GetError()) bRet=sal_False;
return(bRet);
}
@@ -464,15 +464,15 @@ long SgfVectXmul=0;
long SgfVectYmul=0;
long SgfVectXdiv=0;
long SgfVectYdiv=0;
-BOOL SgfVectScal=FALSE;
+sal_Bool SgfVectScal=sal_False;
////////////////////////////////////////////////////////////
// Hpgl2SvFarbe ////////////////////////////////////////////
////////////////////////////////////////////////////////////
-Color Hpgl2SvFarbe( BYTE nFarb )
+Color Hpgl2SvFarbe( sal_uInt8 nFarb )
{
- ULONG nColor = COL_BLACK;
+ sal_uLong nColor = COL_BLACK;
switch (nFarb & 0x07) {
case 0: nColor=COL_WHITE; break;
@@ -497,20 +497,20 @@ Color Hpgl2SvFarbe( BYTE nFarb )
|* Letzte Aenderung JOE 23.06.93
|*
*************************************************************************/
-BOOL SgfFilterVect(SvStream& rInp, SgfHeader& rHead, SgfEntry&, GDIMetaFile& rMtf)
+sal_Bool SgfFilterVect(SvStream& rInp, SgfHeader& rHead, SgfEntry&, GDIMetaFile& rMtf)
{
VirtualDevice aOutDev;
SgfVector aVect;
- BYTE nFarb;
- BYTE nFrb0=7;
- BYTE nLTyp;
- BYTE nOTyp;
- BOOL bEoDt=FALSE;
- BOOL bPDwn=FALSE;
+ sal_uInt8 nFarb;
+ sal_uInt8 nFrb0=7;
+ sal_uInt8 nLTyp;
+ sal_uInt8 nOTyp;
+ sal_Bool bEoDt=sal_False;
+ sal_Bool bPDwn=sal_False;
Point aP0(0,0);
Point aP1(0,0);
String Msg;
- USHORT RecNr=0;
+ sal_uInt16 RecNr=0;
rMtf.Record(&aOutDev);
aOutDev.SetLineColor(Color(COL_BLACK));
@@ -518,9 +518,9 @@ BOOL SgfFilterVect(SvStream& rInp, SgfHeader& rHead, SgfEntry&, GDIMetaFile& rMt
while (!bEoDt && !rInp.GetError()) {
rInp>>aVect; RecNr++;
- nFarb=(BYTE) (aVect.Flag & 0x000F);
- nLTyp=(BYTE)((aVect.Flag & 0x00F0) >>4);
- nOTyp=(BYTE)((aVect.Flag & 0x0F00) >>8);
+ nFarb=(sal_uInt8) (aVect.Flag & 0x000F);
+ nLTyp=(sal_uInt8)((aVect.Flag & 0x00F0) >>4);
+ nOTyp=(sal_uInt8)((aVect.Flag & 0x0F00) >>8);
bEoDt=(aVect.Flag & 0x4000) !=0;
bPDwn=(aVect.Flag & 0x8000) !=0;
@@ -561,7 +561,7 @@ BOOL SgfFilterVect(SvStream& rInp, SgfHeader& rHead, SgfEntry&, GDIMetaFile& rMt
Fraction( 1, 4 ), Fraction( 1, 4 ) );
rMtf.SetPrefMapMode( aMap );
rMtf.SetPrefSize( Size( (short)rHead.Xsize, (short)rHead.Ysize ) );
- return TRUE;
+ return sal_True;
}
@@ -574,14 +574,14 @@ BOOL SgfFilterVect(SvStream& rInp, SgfHeader& rHead, SgfEntry&, GDIMetaFile& rMt
|* Letzte Aenderung JOE 23.06.93
|*
*************************************************************************/
-BOOL SgfVectFilter(SvStream& rInp, GDIMetaFile& rMtf)
+sal_Bool SgfVectFilter(SvStream& rInp, GDIMetaFile& rMtf)
{
- ULONG nFileStart; // Offset des SgfHeaders. Im allgemeinen 0.
+ sal_uLong nFileStart; // Offset des SgfHeaders. Im allgemeinen 0.
SgfHeader aHead;
SgfEntry aEntr;
- ULONG nNext;
- BOOL bRdFlag=FALSE; // Grafikentry gelesen ?
- BOOL bRet=FALSE; // Returncode
+ sal_uLong nNext;
+ sal_Bool bRdFlag=sal_False; // Grafikentry gelesen ?
+ sal_Bool bRet=sal_False; // Returncode
nFileStart=rInp.Tell();
rInp>>aHead;
@@ -596,7 +596,7 @@ BOOL SgfVectFilter(SvStream& rInp, GDIMetaFile& rMtf)
}
} // while(nNext)
if (bRdFlag) {
- if (!rInp.GetError()) bRet=TRUE; // Scheinbar Ok
+ if (!rInp.GetError()) bRet=sal_True; // Scheinbar Ok
}
}
return(bRet);
@@ -612,9 +612,9 @@ BOOL SgfVectFilter(SvStream& rInp, GDIMetaFile& rMtf)
|* Letzte Aenderung JOE 23.06.93
|*
*************************************************************************/
-BOOL SgfFilterPScr(SvStream&, SgfHeader&, SgfEntry&)
+sal_Bool SgfFilterPScr(SvStream&, SgfHeader&, SgfEntry&)
{
- return FALSE; // PostSrcipt wird noch nicht unterstuetzt !
+ return sal_False; // PostSrcipt wird noch nicht unterstuetzt !
}
@@ -627,7 +627,7 @@ BOOL SgfFilterPScr(SvStream&, SgfHeader&, SgfEntry&)
|* Letzte Aenderung JOE 23.06.93
|*
*************************************************************************/
-BYTE CheckSgfTyp(SvStream& rInp, USHORT& nVersion)
+sal_uInt8 CheckSgfTyp(SvStream& rInp, sal_uInt16& nVersion)
{
#if OSL_DEBUG_LEVEL > 1 // Recordgroessen checken. Neuer Compiler hat vielleichte anderes Allignment!
if (sizeof(SgfHeader)!=SgfHeaderSize ||
@@ -638,7 +638,7 @@ BYTE CheckSgfTyp(SvStream& rInp, USHORT& nVersion)
sizeof(RGBQuad )!=RGBQuadSize ) return SGF_DONTKNOW;
#endif
- ULONG nPos;
+ sal_uLong nPos;
SgfHeader aHead;
nVersion=0;
nPos=rInp.Tell();
diff --git a/svtools/source/filter.vcl/filter/sgvmain.cxx b/svtools/source/filter.vcl/filter/sgvmain.cxx
index 293c6dab7964..3b0f3ebd2912 100644
--- a/svtools/source/filter.vcl/filter/sgvmain.cxx
+++ b/svtools/source/filter.vcl/filter/sgvmain.cxx
@@ -58,7 +58,7 @@
p.Paper.RandO =SWAPSHORT(p.Paper.RandO ); \
p.Paper.RandU =SWAPSHORT(p.Paper.RandU ); \
SWAPPOINT(p.U); \
- UINT16 iTemp; \
+ sal_uInt16 iTemp; \
for (iTemp=0;iTemp<20;iTemp++) { \
rPage.HlpLnH[iTemp]=SWAPSHORT(rPage.HlpLnH[iTemp]); \
rPage.HlpLnV[iTemp]=SWAPSHORT(rPage.HlpLnV[iTemp]); }}
@@ -118,41 +118,41 @@ SgfFontLst* pSgfFonts = 0;
////////////////////////////////////////////////////////////////////////////////////////////////////
// Fuer Kreisunterarten, Text und gedrehte Rechtecke ///////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
-void RotatePoint(PointType& P, INT16 cx, INT16 cy, double sn, double cs)
+void RotatePoint(PointType& P, sal_Int16 cx, sal_Int16 cy, double sn, double cs)
{
- INT16 dx,dy;
+ sal_Int16 dx,dy;
double x1,y1;
dx=P.x-cx;
dy=P.y-cy;
x1=dx*cs-dy*sn;
y1=dy*cs+dx*sn;
- P.x=cx+INT16(x1);
- P.y=cy+INT16(y1);
+ P.x=cx+sal_Int16(x1);
+ P.y=cy+sal_Int16(y1);
}
-void RotatePoint(Point& P, INT16 cx, INT16 cy, double sn, double cs)
+void RotatePoint(Point& P, sal_Int16 cx, sal_Int16 cy, double sn, double cs)
{
- INT16 dx,dy;
+ sal_Int16 dx,dy;
double x1,y1;
- dx=(INT16)(P.X()-cx);
- dy=(INT16)(P.Y()-cy);
+ dx=(sal_Int16)(P.X()-cx);
+ dy=(sal_Int16)(P.Y()-cy);
x1=dx*cs-dy*sn;
y1=dy*cs+dx*sn;
- P=Point(cx+INT16(x1),cy+INT16(y1));
+ P=Point(cx+sal_Int16(x1),cy+sal_Int16(y1));
}
-INT16 iMulDiv(INT16 a, INT16 Mul, INT16 Div)
+sal_Int16 iMulDiv(sal_Int16 a, sal_Int16 Mul, sal_Int16 Div)
{
- INT32 Temp;
- Temp=INT32(a)*INT32(Mul)/INT32(Div);
- return INT16(Temp);
+ sal_Int32 Temp;
+ Temp=sal_Int32(a)*sal_Int32(Mul)/sal_Int32(Div);
+ return sal_Int16(Temp);
}
-UINT16 MulDiv(UINT16 a, UINT16 Mul, UINT16 Div)
+sal_uInt16 MulDiv(sal_uInt16 a, sal_uInt16 Mul, sal_uInt16 Div)
{
- UINT32 Temp;
- Temp=UINT32(a)*UINT32(Mul)/UINT32(Div);
- return UINT16(Temp);
+ sal_uInt32 Temp;
+ Temp=sal_uInt32(a)*sal_uInt32(Mul)/sal_uInt32(Div);
+ return sal_uInt16(Temp);
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -167,10 +167,10 @@ SvStream& operator>>(SvStream& rIStream, DtHdType& rDtHd)
void DtHdOverSeek(SvStream& rInp)
{
- ULONG FPos=rInp.Tell();
- FPos+=(ULONG)DtHdSize;
+ sal_uLong FPos=rInp.Tell();
+ FPos+=(sal_uLong)DtHdSize;
rInp.Seek(FPos);
-// rInp.seekg(rInp.tellg()+(ULONG)DtHdSize);
+// rInp.seekg(rInp.tellg()+(sal_uLong)DtHdSize);
}
@@ -185,21 +185,21 @@ SvStream& operator>>(SvStream& rIStream, PageType& rPage)
void ObjkOverSeek(SvStream& rInp, ObjkType& rObjk)
{
- ULONG Siz;
- Siz=(ULONG)rObjk.MemSize+rObjk.Last; // ObjSize+ObjAnhSize
+ sal_uLong Siz;
+ Siz=(sal_uLong)rObjk.MemSize+rObjk.Last; // ObjSize+ObjAnhSize
rInp.Seek(rInp.Tell()+Siz);
}
SvStream& operator>>(SvStream& rInp, ObjkType& rObjk)
{ // Die Fileposition im Stream bleibt unveraendert!
- ULONG nPos;
+ sal_uLong nPos;
nPos=rInp.Tell();
rInp.Read((char*)&rObjk.Last,ObjkSize);
#if defined OSL_BIGENDIAN
SWAPOBJK(rObjk);
#endif
#ifdef InArbeit
- ULONG nPos1=rInp.Tell();
+ sal_uLong nPos1=rInp.Tell();
if(nPos == nPos1) InfoBox( NULL, "tellg funkt nich" ).Execute();
#endif
rInp.Seek(nPos);
@@ -331,10 +331,10 @@ SvStream& operator>>(SvStream& rInp, GrupType& rGrup)
|* Letzte Aenderung JOE 23.06.93
|*
*************************************************************************/
-Color Sgv2SvFarbe(BYTE nFrb1, BYTE nFrb2, BYTE nInts)
+Color Sgv2SvFarbe(sal_uInt8 nFrb1, sal_uInt8 nFrb2, sal_uInt8 nInts)
{
- UINT16 r1=0,g1=0,b1=0,r2=0,g2=0,b2=0;
- BYTE nInt2=100-nInts;
+ sal_uInt16 r1=0,g1=0,b1=0,r2=0,g2=0,b2=0;
+ sal_uInt8 nInt2=100-nInts;
switch(nFrb1 & 0x07) {
case 0: r1=0xFF; g1=0xFF; b1=0xFF; break;
case 1: r1=0xFF; g1=0xFF; break;
@@ -355,9 +355,9 @@ Color Sgv2SvFarbe(BYTE nFrb1, BYTE nFrb2, BYTE nInts)
case 6: b2=0xFF; break;
case 7: break;
}
- r1=(UINT16)((UINT32)r1*nInts/100+(UINT32)r2*nInt2/100);
- g1=(UINT16)((UINT32)g1*nInts/100+(UINT32)g2*nInt2/100);
- b1=(UINT16)((UINT32)b1*nInts/100+(UINT32)b2*nInt2/100);
+ r1=(sal_uInt16)((sal_uInt32)r1*nInts/100+(sal_uInt32)r2*nInt2/100);
+ g1=(sal_uInt16)((sal_uInt32)g1*nInts/100+(sal_uInt32)g2*nInt2/100);
+ b1=(sal_uInt16)((sal_uInt32)b1*nInts/100+(sal_uInt32)b2*nInt2/100);
Color aColor( (sal_uInt8)r1, (sal_uInt8)g1, (sal_uInt8)b1 );
return aColor;
}
@@ -458,7 +458,7 @@ void StrkType::Draw(OutputDevice& rOut)
|* Letzte Aenderung JOE 23.06.93
|*
*************************************************************************/
-void SgfAreaColorIntens(UINT16 Muster, BYTE Col1, BYTE Col2, BYTE Int, OutputDevice& rOut)
+void SgfAreaColorIntens(sal_uInt16 Muster, sal_uInt8 Col1, sal_uInt8 Col2, sal_uInt8 Int, OutputDevice& rOut)
{
ObjAreaType F;
F.FMuster=Muster;
@@ -468,15 +468,15 @@ void SgfAreaColorIntens(UINT16 Muster, BYTE Col1, BYTE Col2, BYTE Int, OutputDev
SetArea(F,rOut);
}
-void DrawSlideRect(INT16 x1, INT16 y1, INT16 x2, INT16 y2, ObjAreaType& F, OutputDevice& rOut)
+void DrawSlideRect(sal_Int16 x1, sal_Int16 y1, sal_Int16 x2, sal_Int16 y2, ObjAreaType& F, OutputDevice& rOut)
{
- INT16 i,i0,b,b0;
- INT16 Int1,Int2;
- INT16 Col1,Col2;
+ sal_Int16 i,i0,b,b0;
+ sal_Int16 Int1,Int2;
+ sal_Int16 Col1,Col2;
// ClipMerk: HgdClipRec;
- INT16 cx,cy;
- INT16 MaxR;
- INT32 dx,dy;
+ sal_Int16 cx,cy;
+ sal_Int16 MaxR;
+ sal_Int32 dx,dy;
rOut.SetLineColor();
if (x1>x2) { i=x1; x1=x2; x2=i; }
@@ -484,7 +484,7 @@ void DrawSlideRect(INT16 x1, INT16 y1, INT16 x2, INT16 y2, ObjAreaType& F, Outpu
Col1=F.FBFarbe & 0x87; Col2=F.FFarbe & 0x87;
Int1=100-F.FIntens; Int2=F.FIntens;
if (Int1==Int2) {
- SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int2,rOut);
+ SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut);
rOut.DrawRect(Rectangle(x1,y1,x2,y2));
} else {
b0=Int1;
@@ -493,30 +493,30 @@ void DrawSlideRect(INT16 x1, INT16 y1, INT16 x2, INT16 y2, ObjAreaType& F, Outpu
i0=y1;
i=y1;
while (i<=y2) {
- b=Int1+INT16((INT32)(Int2-Int1)*(INT32)(i-y1) /(INT32)(y2-y1+1));
+ b=Int1+sal_Int16((sal_Int32)(Int2-Int1)*(sal_Int32)(i-y1) /(sal_Int32)(y2-y1+1));
if (b!=b0) {
- SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)b0,rOut);
+ SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut);
rOut.DrawRect(Rectangle(x1,i0,x2,i-1));
i0=i; b0=b;
}
i++;
}
- SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int2,rOut);
+ SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut);
rOut.DrawRect(Rectangle(x1,i0,x2,y2));
} break;
case 0x28: { // horizontal
i0=x1;
i=x1;
while (i<=x2) {
- b=Int1+INT16((INT32)(Int2-Int1)*(INT32)(i-x1) /(INT32)(x2-x1+1));
+ b=Int1+sal_Int16((sal_Int32)(Int2-Int1)*(sal_Int32)(i-x1) /(sal_Int32)(x2-x1+1));
if (b!=b0) {
- SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)b0,rOut);
+ SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut);
rOut.DrawRect(Rectangle(i0,y1,i-1,y2));
i0=i; b0=b;
}
i++;
}
- SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int2,rOut);
+ SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut);
rOut.DrawRect(Rectangle(i0,y1,x2,y2));
} break;
@@ -530,14 +530,14 @@ void DrawSlideRect(INT16 x1, INT16 y1, INT16 x2, INT16 y2, ObjAreaType& F, Outpu
dx=x2-x1+1;
dy=y2-y1+1;
a=sqrt((double)(dx*dx+dy*dy));
- MaxR=INT16(a) /2 +1;
+ MaxR=sal_Int16(a) /2 +1;
b0=Int2;
i0=MaxR; if (MaxR<1) MaxR=1;
i=MaxR;
while (i>=0) {
- b=Int1+INT16((INT32(Int2-Int1)*INT32(i)) /INT32(MaxR));
+ b=Int1+sal_Int16((sal_Int32(Int2-Int1)*sal_Int32(i)) /sal_Int32(MaxR));
if (b!=b0) {
- SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)b0,rOut);
+ SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut);
//if (i0>200 || (Col1 & $80)!=0 || (Col2 & $80)!=0) {
// then begin { Fallunterscheidung fuer etwas bessere Performance }
// s2:=i0-i+2;
@@ -550,7 +550,7 @@ void DrawSlideRect(INT16 x1, INT16 y1, INT16 x2, INT16 y2, ObjAreaType& F, Outpu
}
i--;
}
- SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int1,rOut);
+ SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int1,rOut);
rOut.DrawEllipse(Rectangle(cx-i0,cy-i0,cx+i0,cy+i0));
rOut.SetClipRegion(ClipMerk);
} break; // Kreis
@@ -577,7 +577,7 @@ void RectType::Draw(OutputDevice& rOut)
}
} else {
Point aPts[4];
- USHORT i;
+ sal_uInt16 i;
double sn,cs;
sn=sin(double(DrehWink)*3.14159265359/18000);
cs=cos(double(DrehWink)*3.14159265359/18000);
@@ -608,7 +608,7 @@ void PolyType::Draw(OutputDevice& rOut)
if ((Flags & PolyClosBit) !=0) SetArea(F,rOut);
SetLine(L,rOut);
Polygon aPoly(nPoints);
- USHORT i;
+ sal_uInt16 i;
for(i=0;i<nPoints;i++) aPoly.SetPoint(Point(EckP[i].x,EckP[i].y),i);
if ((Flags & PolyClosBit) !=0) {
rOut.DrawPolygon(aPoly);
@@ -632,13 +632,13 @@ void SplnType::Draw(OutputDevice& rOut)
SetLine(L,rOut);
Polygon aPoly(0);
Polygon aSpln(nPoints);
- USHORT i;
+ sal_uInt16 i;
for(i=0;i<nPoints;i++) aSpln.SetPoint(Point(EckP[i].x,EckP[i].y),i);
if ((Flags & PolyClosBit) !=0) {
- Spline2Poly(aSpln,TRUE,aPoly);
+ Spline2Poly(aSpln,sal_True,aPoly);
if (aPoly.GetSize()>0) rOut.DrawPolygon(aPoly);
} else {
- Spline2Poly(aSpln,FALSE,aPoly);
+ Spline2Poly(aSpln,sal_False,aPoly);
if (aPoly.GetSize()>0) rOut.DrawPolyLine(aPoly);
}
}
@@ -652,22 +652,22 @@ void SplnType::Draw(OutputDevice& rOut)
|* Letzte Aenderung JOE 23.06.93
|*
*************************************************************************/
-void DrawSlideCirc(INT16 cx, INT16 cy, INT16 rx, INT16 ry, ObjAreaType& F, OutputDevice& rOut)
+void DrawSlideCirc(sal_Int16 cx, sal_Int16 cy, sal_Int16 rx, sal_Int16 ry, ObjAreaType& F, OutputDevice& rOut)
{
- INT16 x1=cx-rx;
- INT16 y1=cy-ry;
- INT16 x2=cx+rx;
- INT16 y2=cy+ry;
+ sal_Int16 x1=cx-rx;
+ sal_Int16 y1=cy-ry;
+ sal_Int16 x2=cx+rx;
+ sal_Int16 y2=cy+ry;
- INT16 i,i0,b,b0;
- INT16 Int1,Int2;
- INT16 Col1,Col2;
+ sal_Int16 i,i0,b,b0;
+ sal_Int16 Int1,Int2;
+ sal_Int16 Col1,Col2;
rOut.SetLineColor();
Col1=F.FBFarbe & 0x87; Col2=F.FFarbe & 0x87;
Int1=100-F.FIntens; Int2=F.FIntens;
if (Int1==Int2) {
- SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int2,rOut);
+ SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut);
rOut.DrawEllipse(Rectangle(x1,y1,x2,y2));
} else {
b0=Int1;
@@ -677,16 +677,16 @@ void DrawSlideCirc(INT16 cx, INT16 cy, INT16 rx, INT16 ry, ObjAreaType& F, Outpu
i0=y1;
i=y1;
while (i<=y2) {
- b=Int1+INT16((INT32)(Int2-Int1)*(INT32)(i-y1) /(INT32)(y2-y1+1));
+ b=Int1+sal_Int16((sal_Int32)(Int2-Int1)*(sal_Int32)(i-y1) /(sal_Int32)(y2-y1+1));
if (b!=b0) {
- SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)b0,rOut);
+ SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut);
rOut.SetClipRegion(Rectangle(x1,i0,x2,i-1));
rOut.DrawEllipse(Rectangle(x1,y1,x2,y2));
i0=i; b0=b;
}
i++;
}
- SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int2,rOut);
+ SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut);
rOut.SetClipRegion(Rectangle(x1,i0,x2,y2));
rOut.DrawEllipse(Rectangle(x1,y1,x2,y2));
rOut.SetClipRegion(ClipMerk);
@@ -696,23 +696,23 @@ void DrawSlideCirc(INT16 cx, INT16 cy, INT16 rx, INT16 ry, ObjAreaType& F, Outpu
i0=x1;
i=x1;
while (i<=x2) {
- b=Int1+INT16((INT32)(Int2-Int1)*(INT32)(i-x1) /(INT32)(x2-x1+1));
+ b=Int1+sal_Int16((sal_Int32)(Int2-Int1)*(sal_Int32)(i-x1) /(sal_Int32)(x2-x1+1));
if (b!=b0) {
- SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)b0,rOut);
+ SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut);
rOut.SetClipRegion(Rectangle(i0,y1,i-1,y2));
rOut.DrawEllipse(Rectangle(x1,y1,x2,y2));
i0=i; b0=b;
}
i++;
}
- SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int2,rOut);
+ SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int2,rOut);
rOut.SetClipRegion(Rectangle(i0,y1,x2,y2));
rOut.DrawEllipse(Rectangle(x1,y1,x2,y2));
rOut.SetClipRegion(ClipMerk);
} break;
case 0x18: case 0x38: { // Kreis
- INT16 MaxR;
+ sal_Int16 MaxR;
if (rx<1) rx=1;
if (ry<1) ry=1;
@@ -721,17 +721,17 @@ void DrawSlideCirc(INT16 cx, INT16 cy, INT16 rx, INT16 ry, ObjAreaType& F, Outpu
i0=MaxR; if (MaxR<1) MaxR=1;
i=MaxR;
while (i>=0) {
- b=Int1+INT16((INT32(Int2-Int1)*INT32(i)) /INT32(MaxR));
+ b=Int1+sal_Int16((sal_Int32(Int2-Int1)*sal_Int32(i)) /sal_Int32(MaxR));
if (b!=b0) {
- INT32 temp=INT32(i0)*INT32(ry)/INT32(rx);
- INT16 j0=INT16(temp);
- SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)b0,rOut);
+ sal_Int32 temp=sal_Int32(i0)*sal_Int32(ry)/sal_Int32(rx);
+ sal_Int16 j0=sal_Int16(temp);
+ SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)b0,rOut);
rOut.DrawEllipse(Rectangle(cx-i0,cy-j0,cx+i0,cy+j0));
i0=i; b0=b;
}
i--;
}
- SgfAreaColorIntens(F.FMuster,(BYTE)Col1,(BYTE)Col2,(BYTE)Int1,rOut);
+ SgfAreaColorIntens(F.FMuster,(sal_uInt8)Col1,(sal_uInt8)Col2,(sal_uInt8)Int1,rOut);
rOut.DrawEllipse(Rectangle(cx-i0,cy-i0,cx+i0,cy+i0));
} break; // Kreis
}
@@ -804,7 +804,7 @@ void BmapType::Draw(OutputDevice& rOut)
{
//ifstream aInp;
unsigned char nSgfTyp;
- USHORT nVersion;
+ sal_uInt16 nVersion;
String aStr(
reinterpret_cast< char const * >(&Filename[ 1 ]),
(xub_StrLen)Filename[ 0 ], RTL_TEXTENCODING_UTF8 );
@@ -818,7 +818,7 @@ void BmapType::Draw(OutputDevice& rOut)
case SGF_BITIMAGE: {
GraphicFilter aFlt;
Graphic aGrf;
- USHORT nRet;
+ sal_uInt16 nRet;
nRet=aFlt.ImportGraphic(aGrf,aFNam);
aGrf.Draw(&rOut,Point(Pos1.x,Pos1.y),Size(Pos2.x-Pos1.x,Pos2.y-Pos1.y));
} break;
@@ -830,7 +830,7 @@ void BmapType::Draw(OutputDevice& rOut)
SgfVectYmul=Pos2.y-Pos1.y;
SgfVectXdiv=0;
SgfVectYdiv=0;
- SgfVectScal=TRUE;
+ SgfVectScal=sal_True;
SgfVectFilter(*pInp,aMtf);
SgfVectXofs=0;
SgfVectYofs=0;
@@ -838,7 +838,7 @@ void BmapType::Draw(OutputDevice& rOut)
SgfVectYmul=0;
SgfVectXdiv=0;
SgfVectYdiv=0;
- SgfVectScal=FALSE;
+ SgfVectScal=sal_False;
aMtf.Play(&rOut);
} break;
}
@@ -856,9 +856,9 @@ void BmapType::Draw(OutputDevice& rOut)
|* Letzte Aenderung JOE 23.06.93
|*
*************************************************************************/
-UINT32 GrupType::GetSubPtr()
+sal_uInt32 GrupType::GetSubPtr()
{
- return UINT32(SbLo)+0x00010000*UINT32(SbHi);
+ return sal_uInt32(SbLo)+0x00010000*sal_uInt32(SbHi);
}
/*************************************************************************
@@ -873,8 +873,8 @@ UINT32 GrupType::GetSubPtr()
void DrawObjkList( SvStream& rInp, OutputDevice& rOut )
{
ObjkType aObjk;
- USHORT nGrpCnt=0;
- BOOL bEnde=FALSE;
+ sal_uInt16 nGrpCnt=0;
+ sal_Bool bEnde=sal_False;
do {
rInp>>aObjk;
if (!rInp.GetError()) {
@@ -941,11 +941,11 @@ void DrawObjkList( SvStream& rInp, OutputDevice& rOut )
} // if rInp
if (!rInp.GetError()) {
if (aObjk.Next==0L) {
- if (nGrpCnt==0) bEnde=TRUE;
+ if (nGrpCnt==0) bEnde=sal_True;
else nGrpCnt--;
}
} else {
- bEnde=TRUE; // Lesefehler
+ bEnde=sal_True; // Lesefehler
}
} while (!bEnde);
}
@@ -985,15 +985,15 @@ void SkipObjkList(SvStream& rInp)
|* Letzte Aenderung JOE 23.06.93
|*
*************************************************************************/
-BOOL SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf )
+sal_Bool SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
PageType aPage;
VirtualDevice aOutDev;
OutputDevice* pOutDev;
- ULONG nStdPos;
- ULONG nZchPos;
- USHORT Num;
+ sal_uLong nStdPos;
+ sal_uLong nZchPos;
+ sal_uInt16 Num;
pOutDev=&aOutDev;
DtHdOverSeek(rInp); // DataHeader weglesen
@@ -1029,8 +1029,8 @@ BOOL SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf )
rMtf.WindStart();
MapMode aMap(MAP_10TH_MM,Point(),Fraction(1,4),Fraction(1,4));
rMtf.SetPrefMapMode(aMap);
- rMtf.SetPrefSize(Size((INT16)aPage.Paper.Size.x,(INT16)aPage.Paper.Size.y));
- bRet=TRUE;
+ rMtf.SetPrefSize(Size((sal_Int16)aPage.Paper.Size.x,(sal_Int16)aPage.Paper.Size.y));
+ bRet=sal_True;
return bRet;
}
@@ -1045,18 +1045,18 @@ BOOL SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf )
|* Letzte Aenderung JOE 23.06.93
|*
*************************************************************************/
-BOOL SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath )
+sal_Bool SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath )
{
#if OSL_DEBUG_LEVEL > 1 // Recordgroessen checken. Neuer Compiler hat vielleichte anderes Alignment!
- if (sizeof(ObjTextType)!=ObjTextTypeSize) return FALSE;
+ if (sizeof(ObjTextType)!=ObjTextTypeSize) return sal_False;
#endif
- ULONG nFileStart; // Offset des SgfHeaders. Im allgemeinen 0.
+ sal_uLong nFileStart; // Offset des SgfHeaders. Im allgemeinen 0.
SgfHeader aHead;
SgfEntry aEntr;
- ULONG nNext;
- BOOL bRdFlag=FALSE; // Grafikentry gelesen ?
- BOOL bRet=FALSE; // Returncode
+ sal_uLong nNext;
+ sal_Bool bRdFlag=sal_False; // Grafikentry gelesen ?
+ sal_Bool bRet=sal_False; // Returncode
aIniPath.Append( String::CreateFromAscii( "sgf.ini", 7 ) );
// aIniPath.ToAbs();
@@ -1077,7 +1077,7 @@ BOOL SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath )
}
} // while(nNext)
if (bRdFlag) {
- if (!rInp.GetError()) bRet=TRUE; // Scheinbar Ok
+ if (!rInp.GetError()) bRet=sal_True; // Scheinbar Ok
}
}
delete pSgfFonts;
@@ -1085,7 +1085,7 @@ BOOL SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath )
}
/*
-Bitmap Dither(BYTE Intens)
+Bitmap Dither(sal_uInt8 Intens)
{
Bitmap aBmp;
BmpInfoHeader Info;
diff --git a/svtools/source/filter.vcl/filter/sgvspln.cxx b/svtools/source/filter.vcl/filter/sgvspln.cxx
index d695e171a194..aac7e1f04e0a 100644
--- a/svtools/source/filter.vcl/filter/sgvspln.cxx
+++ b/svtools/source/filter.vcl/filter/sgvspln.cxx
@@ -140,10 +140,6 @@ short basis() /* BASIS maschinenunabhaengig bestimmen */
#define NEGMAX -POSMIN /* groesste negative Zahl */
#define NEGMIN -POSMAX /* kleinste negative Zahl */
-#define TRUE 1
-#define FALSE 0
-
-
/* Definition von Funktionsmakros:
*/
@@ -170,7 +166,7 @@ short basis() /* BASIS maschinenunabhaengig bestimmen */
/*---------------------- MODUL TRIDIAGONAL ------------------------*/
-USHORT TriDiagGS(BOOL rep, USHORT n, double* lower,
+sal_uInt16 TriDiagGS(sal_Bool rep, sal_uInt16 n, double* lower,
double* diag, double* upper, double* b)
/************************/
/* GAUSS-Verfahren fuer */
@@ -207,7 +203,7 @@ USHORT TriDiagGS(BOOL rep, USHORT n, double* lower,
/* */
/* Eingabeparameter: */
/* ================ */
-/* n Dimension der Matrix ( > 1 ) USHORT n */
+/* n Dimension der Matrix ( > 1 ) sal_uInt16 n */
/* */
/* lower untere Nebendiagonale double lower[n] */
/* diag Hauptdiagonale double diag[n] */
@@ -217,7 +213,7 @@ USHORT TriDiagGS(BOOL rep, USHORT n, double* lower,
/* Dreieckzerlegung der Ausgangsmatrix. */
/* */
/* b rechte Seite des Systems double b[n] */
-/* rep = 0 erstmaliger Aufruf BOOL rep */
+/* rep = 0 erstmaliger Aufruf sal_Bool rep */
/* !=0 wiederholter Aufruf */
/* fuer gleiche Matrix, */
/* aber verschiedenes b. */
@@ -251,7 +247,7 @@ USHORT TriDiagGS(BOOL rep, USHORT n, double* lower,
/*.cp 5 */
{
- USHORT i;
+ sal_uInt16 i;
short j;
// double fabs(double);
@@ -302,7 +298,7 @@ USHORT TriDiagGS(BOOL rep, USHORT n, double* lower,
/*---------------- MODUL ZYKLISCH TRIDIAGONAL ----------------------*/
-USHORT ZyklTriDiagGS(BOOL rep, USHORT n, double* lower, double* diag,
+sal_uInt16 ZyklTriDiagGS(sal_Bool rep, sal_uInt16 n, double* lower, double* diag,
double* upper, double* lowrow, double* ricol, double* b)
/******************************/
/* Systeme mit zyklisch tri- */
@@ -343,12 +339,12 @@ USHORT ZyklTriDiagGS(BOOL rep, USHORT n, double* lower, double* diag,
/* */
/* Eingabeparameter: */
/* ================ */
-/* n Dimension der Matrix ( > 2 ) USHORT n */
+/* n Dimension der Matrix ( > 2 ) sal_uInt16 n */
/* lower untere Nebendiagonale double lower[n] */
/* diag Hauptdiagonale double diag[n] */
/* upper obere Nebendiagonale double upper[n] */
/* b rechte Seite des Systems double b[n] */
-/* rep = 0 erstmaliger Aufruf BOOL rep */
+/* rep = 0 erstmaliger Aufruf sal_Bool rep */
/* !=0 wiederholter Aufruf */
/* fuer gleiche Matrix, */
/* aber verschiedenes b. */
@@ -385,7 +381,7 @@ USHORT ZyklTriDiagGS(BOOL rep, USHORT n, double* lower, double* diag,
/*.cp 5 */
{
double temp; // fabs(double);
- USHORT i;
+ sal_uInt16 i;
short j;
if ( n < 3 ) return(1);
@@ -458,15 +454,15 @@ USHORT ZyklTriDiagGS(BOOL rep, USHORT n, double* lower, double* diag,
|*
*************************************************************************/
-USHORT NaturalSpline(USHORT n, double* x, double* y,
+sal_uInt16 NaturalSpline(sal_uInt16 n, double* x, double* y,
double Marg0, double MargN,
- BYTE MargCond,
+ sal_uInt8 MargCond,
double* b, double* c, double* d)
{
- USHORT i;
+ sal_uInt16 i;
double* a;
double* h;
- USHORT error;
+ sal_uInt16 error;
if (n<2) return 1;
if ( (MargCond & ~3) ) return 2;
@@ -516,7 +512,7 @@ USHORT NaturalSpline(USHORT n, double* x, double* y,
if (n==2) {
c[1]=a[0]/d[0];
} else {
- error=TriDiagGS(FALSE,n-1,b,d,c,a);
+ error=TriDiagGS(sal_False,n-1,b,d,c,a);
if (error!=0) { delete[] a; delete[] h; return error+2; }
for (i=0;i<n-1;i++) c[i+1]=a[i];
}
@@ -567,11 +563,11 @@ USHORT NaturalSpline(USHORT n, double* x, double* y,
*************************************************************************/
-USHORT PeriodicSpline(USHORT n, double* x, double* y,
+sal_uInt16 PeriodicSpline(sal_uInt16 n, double* x, double* y,
double* b, double* c, double* d)
{ // Arrays muessen von [0..n] dimensioniert sein!
- USHORT Error;
- USHORT i,im1,nm1; //integer
+ sal_uInt16 Error;
+ sal_uInt16 i,im1,nm1; //integer
double hr,hl;
double* a;
double* lowrow;
@@ -608,7 +604,7 @@ USHORT PeriodicSpline(USHORT n, double* x, double* y,
lowrow[0]=hr;
ricol[0]=hr;
a[nm1]=3.0*((y[1]-y[0])/hr-(y[n]-y[nm1])/hl);
- Error=ZyklTriDiagGS(FALSE,n,b,d,c,lowrow,ricol,a);
+ Error=ZyklTriDiagGS(sal_False,n,b,d,c,lowrow,ricol,a);
if ( Error != 0 )
{
delete[] a;
@@ -645,22 +641,22 @@ USHORT PeriodicSpline(USHORT n, double* x, double* y,
|*
*************************************************************************/
-USHORT ParaSpline(USHORT n, double* x, double* y, BYTE MargCond,
+sal_uInt16 ParaSpline(sal_uInt16 n, double* x, double* y, sal_uInt8 MargCond,
double Marg01, double Marg02,
double MargN1, double MargN2,
- BOOL CondT, double* T,
+ sal_Bool CondT, double* T,
double* bx, double* cx, double* dx,
double* by, double* cy, double* dy)
{
- USHORT Error,Marg;
- USHORT i;
+ sal_uInt16 Error,Marg;
+ sal_uInt16 i;
double deltX,deltY,delt,
alphX = 0,alphY = 0,
betX = 0,betY = 0;
if (n<2) return 1;
if ((MargCond & ~3) && (MargCond != 4)) return 2; // ungueltige Randbedingung
- if (CondT==FALSE) {
+ if (CondT==sal_False) {
T[0]=0.0;
for (i=0;i<n;i++) {
deltX=x[i+1]-x[i]; deltY=y[i+1]-y[i];
@@ -724,7 +720,7 @@ USHORT ParaSpline(USHORT n, double* x, double* y, BYTE MargCond,
|* Polygons werden als Stuetzstellen angenommen.
|* n liefert die Anzahl der Teilpolynome.
|* Ist die Berechnung fehlerfrei verlaufen, so
-|* liefert die Funktion TRUE. Nur in diesem Fall
+|* liefert die Funktion sal_True. Nur in diesem Fall
|* ist Speicher fuer die Koeffizientenarrays
|* allokiert, der dann spaeter vom Aufrufer mittels
|* delete freizugeben ist.
@@ -733,14 +729,14 @@ USHORT ParaSpline(USHORT n, double* x, double* y, BYTE MargCond,
|*
*************************************************************************/
-BOOL CalcSpline(Polygon& rPoly, BOOL Periodic, USHORT& n,
+sal_Bool CalcSpline(Polygon& rPoly, sal_Bool Periodic, sal_uInt16& n,
double*& ax, double*& ay, double*& bx, double*& by,
double*& cx, double*& cy, double*& dx, double*& dy, double*& T)
{
- BYTE Marg;
+ sal_uInt8 Marg;
double Marg01,Marg02;
double MargN1,MargN2;
- USHORT i;
+ sal_uInt16 i;
Point P0(-32768,-32768);
Point Pt;
@@ -782,12 +778,12 @@ BOOL CalcSpline(Polygon& rPoly, BOOL Periodic, USHORT& n,
MargN2=0.0;
if (n>0) n--; // n Korregieren (Anzahl der Teilpolynome)
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( ( Marg == 3 && n >= 3 ) || ( Marg == 2 && n >= 2 ) )
{
- bRet = ParaSpline(n,ax,ay,Marg,Marg01,Marg01,MargN1,MargN2,FALSE,T,bx,cx,dx,by,cy,dy) == 0;
+ bRet = ParaSpline(n,ax,ay,Marg,Marg01,Marg01,MargN1,MargN2,sal_False,T,bx,cx,dx,by,cy,dy) == 0;
}
- if ( bRet == FALSE )
+ if ( bRet == sal_False )
{
delete[] ax;
delete[] ay;
@@ -811,7 +807,7 @@ BOOL CalcSpline(Polygon& rPoly, BOOL Periodic, USHORT& n,
|* Beschreibung Konvertiert einen parametrichen kubischen
|* Polynomspline Spline (natuerlich oder periodisch)
|* in ein angenaehertes Polygon.
-|* Die Funktion liefert FALSE, wenn ein Fehler bei
+|* Die Funktion liefert sal_False, wenn ein Fehler bei
|* der Koeffizientenberechnung aufgetreten ist oder
|* das Polygon zu gross wird (>PolyMax=16380). Im 1.
|* Fall hat das Polygon 0, im 2. Fall PolyMax Punkte.
@@ -821,7 +817,7 @@ BOOL CalcSpline(Polygon& rPoly, BOOL Periodic, USHORT& n,
|* Letzte Aenderung JOE 23.06.93
|*
*************************************************************************/
-BOOL Spline2Poly(Polygon& rSpln, BOOL Periodic, Polygon& rPoly)
+sal_Bool Spline2Poly(Polygon& rSpln, sal_Bool Periodic, Polygon& rPoly)
{
short MinKoord=-32000; // zur Vermeidung
short MaxKoord=32000; // von Ueberlaeufen
@@ -839,11 +835,11 @@ BOOL Spline2Poly(Polygon& rSpln, BOOL Periodic, Polygon& rPoly)
double Step; // Schrittweite fuer t
double dt1,dt2,dt3; // Delta t, y, ^3
double t;
- BOOL bEnde; // Teilpolynom zu Ende?
- USHORT n; // Anzahl der zu zeichnenden Teilpolynome
- USHORT i; // aktuelles Teilpolynom
- BOOL bOk; // noch alles ok?
- USHORT PolyMax=16380;// Maximale Anzahl von Polygonpunkten
+ sal_Bool bEnde; // Teilpolynom zu Ende?
+ sal_uInt16 n; // Anzahl der zu zeichnenden Teilpolynome
+ sal_uInt16 i; // aktuelles Teilpolynom
+ sal_Bool bOk; // noch alles ok?
+ sal_uInt16 PolyMax=16380;// Maximale Anzahl von Polygonpunkten
long x,y;
bOk=CalcSpline(rSpln,Periodic,n,ax,ay,bx,by,cx,cy,dx,dy,tv);
@@ -855,7 +851,7 @@ BOOL Spline2Poly(Polygon& rSpln, BOOL Periodic, Polygon& rPoly)
i=0;
while (i<n) { // n Teilpolynome malen
t=tv[i]+Step;
- bEnde=FALSE;
+ bEnde=sal_False;
while (!bEnde) { // ein Teilpolynom interpolieren
bEnde=t>=tv[i+1];
if (bEnde) t=tv[i+1];
@@ -868,7 +864,7 @@ BOOL Spline2Poly(Polygon& rSpln, BOOL Periodic, Polygon& rPoly)
rPoly.SetSize(rPoly.GetSize()+1);
rPoly.SetPoint(Point(short(x),short(y)),rPoly.GetSize()-1);
} else {
- bOk=FALSE; // Fehler: Polygon wird zu gross
+ bOk=sal_False; // Fehler: Polygon wird zu gross
}
t=t+Step;
} // Ende von Teilpolynom
@@ -886,5 +882,5 @@ BOOL Spline2Poly(Polygon& rSpln, BOOL Periodic, Polygon& rPoly)
return bOk;
} // Ende von if (bOk)
rPoly.SetSize(0);
- return FALSE;
+ return sal_False;
}
diff --git a/svtools/source/filter.vcl/filter/sgvtext.cxx b/svtools/source/filter.vcl/filter/sgvtext.cxx
index 9a82cd486599..f0130b21c9d6 100644
--- a/svtools/source/filter.vcl/filter/sgvtext.cxx
+++ b/svtools/source/filter.vcl/filter/sgvtext.cxx
@@ -213,9 +213,9 @@ extern SgfFontLst* pSgfFonts;
/////////////////////////////////////////////////////////////////////////////////
-BOOL CheckTextOutl(ObjAreaType& F, ObjLineType& L);
+sal_Bool CheckTextOutl(ObjAreaType& F, ObjLineType& L);
-BOOL CheckTextOutl(ObjAreaType& F, ObjLineType& L)
+sal_Bool CheckTextOutl(ObjAreaType& F, ObjLineType& L)
{
return (F.FIntens!=L.LIntens) ||
((F.FFarbe!=L.LFarbe) && (F.FIntens>0)) ||
@@ -261,11 +261,11 @@ short Sgf2hPoint(short a)
// Unterkante berechnen. Alles in SGF-Units.
// ======================================================================
-USHORT GetTopToBaseLine(USHORT MaxGrad)
+sal_uInt16 GetTopToBaseLine(sal_uInt16 MaxGrad)
{
long ret;
ret=long(MaxGrad)*long(CharTopToBase) /long(100);
- return USHORT(ret);
+ return sal_uInt16(ret);
}
// ======================================================================
@@ -306,9 +306,9 @@ UCHAR ConvertTextChar(UCHAR c)
-USHORT GetSchnittBit(UCHAR c)
+sal_uInt16 GetSchnittBit(UCHAR c)
{
- USHORT r=0;
+ sal_uInt16 r=0;
switch (c) {
case EscBold : r=TextBoldBit; break;
case EscRSlnt: r=TextRSlnBit; break;
@@ -349,10 +349,10 @@ long ChgValue(long Def, long Min, long Max, UCHAR FlgVal, long NumVal)
-void ChgSchnittBit(USHORT Bit, USHORT Radio1, USHORT Radio2, USHORT Radio3,
- UCHAR FlgVal, USHORT Schnitt0, USHORT& Schnitt)
+void ChgSchnittBit(sal_uInt16 Bit, sal_uInt16 Radio1, sal_uInt16 Radio2, sal_uInt16 Radio3,
+ UCHAR FlgVal, sal_uInt16 Schnitt0, sal_uInt16& Schnitt)
{
- USHORT All,Rad;
+ sal_uInt16 All,Rad;
Rad=Radio1 | Radio2 | Radio3;
All=Bit | Rad;
@@ -367,9 +367,9 @@ void ChgSchnittBit(USHORT Bit, USHORT Radio1, USHORT Radio2, USHORT Radio3,
-UCHAR GetNextChar(UCHAR* TBuf, USHORT Index)
+UCHAR GetNextChar(UCHAR* TBuf, sal_uInt16 Index)
{
- USHORT Cnt;
+ sal_uInt16 Cnt;
while (TBuf[Index]==Escape) {
Index++;
Cnt=0;
@@ -382,24 +382,24 @@ UCHAR GetNextChar(UCHAR* TBuf, USHORT Index)
-UCHAR ProcessOne(UCHAR* TBuf, USHORT& Index,
+UCHAR ProcessOne(UCHAR* TBuf, sal_uInt16& Index,
ObjTextType& Atr0, ObjTextType& AktAtr,
- BOOL ScanEsc)
+ sal_Bool ScanEsc)
{
UCHAR c;
UCHAR Ident;
- BOOL Ende;
- BOOL q;
+ sal_Bool Ende;
+ sal_Bool q;
UCHAR FlgVal;
long NumVal;
long Sgn;
short i;
- BOOL EoVal;
+ sal_Bool EoVal;
do {
c=TBuf[Index]; Index++;
Ende=(c!=Escape);
- if (Ende==FALSE) {
+ if (Ende==sal_False) {
c=TBuf[Index]; Index++;
Ident=c; // Identifer merken
FlgVal=EscNoFlg;
@@ -413,36 +413,36 @@ UCHAR ProcessOne(UCHAR* TBuf, USHORT& Index,
do {
NumVal=10*NumVal+c-'0';
EoVal=(TBuf[Index]<'0' || TBuf[Index]>'9');
- if (EoVal==FALSE) { c=TBuf[Index]; Index++; }
+ if (EoVal==sal_False) { c=TBuf[Index]; Index++; }
i--;
- } while (i>0 && EoVal==FALSE);
+ } while (i>0 && EoVal==sal_False);
NumVal=Sgn*NumVal;
}
q=!CheckTextOutl(AktAtr.F,AktAtr.L);
switch (Ident) {
- case EscFont : AktAtr.SetFont(ULONG (ChgValue(Atr0.GetFont(),0,0 ,FlgVal,NumVal)));break;
- case EscGrad : AktAtr.Grad =USHORT(ChgValue(Atr0.Grad, 2,2000 ,FlgVal,NumVal)); break;
- case EscBreit: AktAtr.Breite =USHORT(ChgValue(Atr0.Breite, 1,1000 ,FlgVal,NumVal)); break;
- case EscKaptS: AktAtr.Kapit =(BYTE)(ChgValue(Atr0.Kapit, 1,255 ,FlgVal,NumVal)); break;
- case EscLFeed: AktAtr.LnFeed =USHORT(ChgValue(Atr0.LnFeed, 1,65535 ,FlgVal,NumVal)); break;
- case EscSlant: AktAtr.Slant =USHORT(ChgValue(Atr0.Slant, 1,MaxCharSlant ,FlgVal,NumVal)); break;
+ case EscFont : AktAtr.SetFont(sal_uLong (ChgValue(Atr0.GetFont(),0,0 ,FlgVal,NumVal)));break;
+ case EscGrad : AktAtr.Grad =sal_uInt16(ChgValue(Atr0.Grad, 2,2000 ,FlgVal,NumVal)); break;
+ case EscBreit: AktAtr.Breite =sal_uInt16(ChgValue(Atr0.Breite, 1,1000 ,FlgVal,NumVal)); break;
+ case EscKaptS: AktAtr.Kapit =(sal_uInt8)(ChgValue(Atr0.Kapit, 1,255 ,FlgVal,NumVal)); break;
+ case EscLFeed: AktAtr.LnFeed =sal_uInt16(ChgValue(Atr0.LnFeed, 1,65535 ,FlgVal,NumVal)); break;
+ case EscSlant: AktAtr.Slant =sal_uInt16(ChgValue(Atr0.Slant, 1,MaxCharSlant ,FlgVal,NumVal)); break;
case EscVPos : AktAtr.ChrVPos=char (ChgValue(Atr0.ChrVPos,-128,127 ,FlgVal,NumVal)); break;
- case EscZAbst: AktAtr.ZAbst =(BYTE)(ChgValue(Atr0.ZAbst, 1,255 ,FlgVal,NumVal)); break;
- case EscHJust: AktAtr.Justify=(BYTE)(ChgValue(Atr0.Justify & 0x0F,0,5 ,FlgVal,NumVal)); break;
- case EscFarbe: { AktAtr.L.LFarbe =(BYTE)(ChgValue(Atr0.L.LFarbe,0,7 ,FlgVal,NumVal)); if (q) AktAtr.F.FFarbe =AktAtr.L.LFarbe; } break;
- case EscBFarb: { AktAtr.L.LBFarbe=(BYTE)(ChgValue(Atr0.L.LBFarbe,0,255,FlgVal,NumVal)); if (q) AktAtr.F.FBFarbe=AktAtr.L.LBFarbe; } break;
- case EscInts : { AktAtr.L.LIntens=(BYTE)(ChgValue(Atr0.L.LIntens,0,100,FlgVal,NumVal)); if (q) AktAtr.F.FIntens=AktAtr.L.LIntens; } break;
-
- case EscMustr: { AktAtr.F.FMuster=USHORT(ChgValue(Atr0.F.FMuster,0,65535,FlgVal,NumVal)); } break;
- case EscMFarb: { AktAtr.F.FFarbe =(BYTE)(ChgValue(Atr0.F.FFarbe,0,7 ,FlgVal,NumVal)); } break;
- case EscMBFrb: { AktAtr.F.FBFarbe=(BYTE)(ChgValue(Atr0.F.FBFarbe,0,255,FlgVal,NumVal)); } break;
- case EscMInts: { AktAtr.F.FIntens=(BYTE)(ChgValue(Atr0.F.FIntens,0,100,FlgVal,NumVal)); } break;
-
- case EscSMstr: { AktAtr.ShdF.FMuster=USHORT(ChgValue(Atr0.ShdF.FMuster,0,65535,FlgVal,NumVal)); } break;
- case EscSFarb: { AktAtr.ShdL.LFarbe =(BYTE)(ChgValue(Atr0.ShdL.LFarbe,0,7 ,FlgVal,NumVal)); AktAtr.ShdF.FFarbe =AktAtr.ShdL.LFarbe; } break;
- case EscSBFrb: { AktAtr.ShdL.LBFarbe=(BYTE)(ChgValue(Atr0.ShdL.LBFarbe,0,255,FlgVal,NumVal)); AktAtr.ShdF.FBFarbe=AktAtr.ShdL.LBFarbe; } break;
- case EscSInts: { AktAtr.ShdL.LIntens=(BYTE)(ChgValue(Atr0.ShdL.LIntens,0,100,FlgVal,NumVal)); AktAtr.ShdF.FIntens=AktAtr.ShdL.LIntens; } break;
+ case EscZAbst: AktAtr.ZAbst =(sal_uInt8)(ChgValue(Atr0.ZAbst, 1,255 ,FlgVal,NumVal)); break;
+ case EscHJust: AktAtr.Justify=(sal_uInt8)(ChgValue(Atr0.Justify & 0x0F,0,5 ,FlgVal,NumVal)); break;
+ case EscFarbe: { AktAtr.L.LFarbe =(sal_uInt8)(ChgValue(Atr0.L.LFarbe,0,7 ,FlgVal,NumVal)); if (q) AktAtr.F.FFarbe =AktAtr.L.LFarbe; } break;
+ case EscBFarb: { AktAtr.L.LBFarbe=(sal_uInt8)(ChgValue(Atr0.L.LBFarbe,0,255,FlgVal,NumVal)); if (q) AktAtr.F.FBFarbe=AktAtr.L.LBFarbe; } break;
+ case EscInts : { AktAtr.L.LIntens=(sal_uInt8)(ChgValue(Atr0.L.LIntens,0,100,FlgVal,NumVal)); if (q) AktAtr.F.FIntens=AktAtr.L.LIntens; } break;
+
+ case EscMustr: { AktAtr.F.FMuster=sal_uInt16(ChgValue(Atr0.F.FMuster,0,65535,FlgVal,NumVal)); } break;
+ case EscMFarb: { AktAtr.F.FFarbe =(sal_uInt8)(ChgValue(Atr0.F.FFarbe,0,7 ,FlgVal,NumVal)); } break;
+ case EscMBFrb: { AktAtr.F.FBFarbe=(sal_uInt8)(ChgValue(Atr0.F.FBFarbe,0,255,FlgVal,NumVal)); } break;
+ case EscMInts: { AktAtr.F.FIntens=(sal_uInt8)(ChgValue(Atr0.F.FIntens,0,100,FlgVal,NumVal)); } break;
+
+ case EscSMstr: { AktAtr.ShdF.FMuster=sal_uInt16(ChgValue(Atr0.ShdF.FMuster,0,65535,FlgVal,NumVal)); } break;
+ case EscSFarb: { AktAtr.ShdL.LFarbe =(sal_uInt8)(ChgValue(Atr0.ShdL.LFarbe,0,7 ,FlgVal,NumVal)); AktAtr.ShdF.FFarbe =AktAtr.ShdL.LFarbe; } break;
+ case EscSBFrb: { AktAtr.ShdL.LBFarbe=(sal_uInt8)(ChgValue(Atr0.ShdL.LBFarbe,0,255,FlgVal,NumVal)); AktAtr.ShdF.FBFarbe=AktAtr.ShdL.LBFarbe; } break;
+ case EscSInts: { AktAtr.ShdL.LIntens=(sal_uInt8)(ChgValue(Atr0.ShdL.LIntens,0,100,FlgVal,NumVal)); AktAtr.ShdF.FIntens=AktAtr.ShdL.LIntens; } break;
case EscSDist: { AktAtr.ShdVers.x=(short)ChgValue(Atr0.ShdVers.x,0,30000,FlgVal,NumVal); AktAtr.ShdVers.y=AktAtr.ShdVers.x; } break;
case EscSXDst: { AktAtr.ShdVers.x=(short)ChgValue(Atr0.ShdVers.x,0,30000,FlgVal,NumVal); } break;
case EscSYDst: { AktAtr.ShdVers.y=(short)ChgValue(Atr0.ShdVers.y,0,30000,FlgVal,NumVal); } break;
@@ -463,21 +463,21 @@ UCHAR ProcessOne(UCHAR* TBuf, USHORT& Index,
case EscEbShd: ChgSchnittBit(TextShEbBit,TextSh2DBit,TextSh3DBit,TextSh4DBit,FlgVal,Atr0.Schnitt,AktAtr.Schnitt); break;
} //endcase
if (TBuf[Index]==Escape) Index++; // zweites Esc weglesen }
- } // if Ende==FALSE
- } while (Ende==FALSE && ScanEsc==FALSE);
- if (Ende==FALSE) c=Escape;
+ } // if Ende==sal_False
+ } while (Ende==sal_False && ScanEsc==sal_False);
+ if (Ende==sal_False) c=Escape;
return c;
} // end of ProcessOne
-UCHAR GetTextChar(UCHAR* TBuf, USHORT& Index,
+UCHAR GetTextChar(UCHAR* TBuf, sal_uInt16& Index,
ObjTextType& Atr0, ObjTextType& AktAtr,
- USHORT Rest, BOOL ScanEsc)
+ sal_uInt16 Rest, sal_Bool ScanEsc)
{
UCHAR c,c0,nc;
c=ProcessOne(TBuf,Index,Atr0,AktAtr,ScanEsc);
- if (ScanEsc==FALSE) {
+ if (ScanEsc==sal_False) {
if (c==SoftTrennAdd || c==SoftTrennK || c==SoftTrenn) {
nc=GetNextChar(TBuf,Index);
c0=c;
@@ -507,9 +507,9 @@ UCHAR GetTextChar(UCHAR* TBuf, USHORT& Index,
-UCHAR GetTextCharConv(UCHAR* TBuf, USHORT& Index,
+UCHAR GetTextCharConv(UCHAR* TBuf, sal_uInt16& Index,
ObjTextType& Atr0, ObjTextType& AktAtr,
- USHORT Rest, BOOL ScanEsc)
+ sal_uInt16 Rest, sal_Bool ScanEsc)
{
UCHAR c;
@@ -530,23 +530,23 @@ UCHAR GetTextCharConv(UCHAR* TBuf, USHORT& Index,
//
// Benoetigter Zeilenabstand in SGF-Units. ChrVPos wird beruecksichtigt.
// ======================================================================
-USHORT GetLineFeed(UCHAR* TBuf, USHORT Index, ObjTextType Atr0, ObjTextType AktAtr,
- USHORT nChar, USHORT& LF, USHORT& MaxGrad)
+sal_uInt16 GetLineFeed(UCHAR* TBuf, sal_uInt16 Index, ObjTextType Atr0, ObjTextType AktAtr,
+ sal_uInt16 nChar, sal_uInt16& LF, sal_uInt16& MaxGrad)
{
UCHAR c=0;
- BOOL AbsEnd=FALSE;
- ULONG LF100=0;
- ULONG MaxLF100=0;
- BOOL LFauto=0;
- BOOL First=TRUE;
- USHORT Grad;
- USHORT i=0;
- USHORT r=1;
+ sal_Bool AbsEnd=sal_False;
+ sal_uLong LF100=0;
+ sal_uLong MaxLF100=0;
+ sal_Bool LFauto=0;
+ sal_Bool First=sal_True;
+ sal_uInt16 Grad;
+ sal_uInt16 i=0;
+ sal_uInt16 r=1;
MaxGrad=0;
while (!AbsEnd && nChar>0) {
nChar--;
- c=GetTextChar(TBuf,Index,Atr0,AktAtr,nChar,FALSE);
+ c=GetTextChar(TBuf,Index,Atr0,AktAtr,nChar,sal_False);
i++;
AbsEnd=(c==TextEnd || c==AbsatzEnd);
if (First || (!AbsEnd && c!=' ' && c!=HardTrenn)) {
@@ -558,15 +558,15 @@ USHORT GetLineFeed(UCHAR* TBuf, USHORT Index, ObjTextType Atr0, ObjTextType AktA
Grad=AktAtr.Grad;
if (AktAtr.ChrVPos>0) Grad=Grad-AktAtr.ChrVPos;
if (Grad>MaxGrad) MaxGrad=Grad;
- First=FALSE;
+ First=sal_False;
}
if (!AbsEnd && c!=' ') r=i;
}
MaxGrad=hPoint2Sgf(MaxGrad);
if (MaxLF100<=4000) { // sonst Overflowgefahr
- LF=USHORT(hPoint2Sgf(short(MaxLF100)) /100);
+ LF=sal_uInt16(hPoint2Sgf(short(MaxLF100)) /100);
} else {
- LF=USHORT(hPoint2Sgf(short(MaxLF100) /100));
+ LF=sal_uInt16(hPoint2Sgf(short(MaxLF100) /100));
}
return r;
@@ -588,17 +588,17 @@ USHORT GetLineFeed(UCHAR* TBuf, USHORT Index, ObjTextType Atr0, ObjTextType AktA
#define SuperSubFact 60 /* SuperScript/SubScript: 60% vom Schriftgrad */
#define DefaultSpace 40 /* Default: Space ist 40% vom SchriftGrad */
-USHORT SetTextContext(OutputDevice& rOut, ObjTextType& Atr, BOOL Kapt, USHORT Dreh,
- USHORT FitXMul, USHORT FitXDiv, USHORT FitYMul, USHORT FitYDiv)
+sal_uInt16 SetTextContext(OutputDevice& rOut, ObjTextType& Atr, sal_Bool Kapt, sal_uInt16 Dreh,
+ sal_uInt16 FitXMul, sal_uInt16 FitXDiv, sal_uInt16 FitYMul, sal_uInt16 FitYDiv)
{
SgfFontOne* pSgfFont; // Font aus dem IniFile
Font aFont;
Color aColor;
- ULONG Grad;
- ULONG Brei;
+ sal_uLong Grad;
+ sal_uLong Brei;
String FNam;
- USHORT StdBrei=50; // Durchschnittliche Zeichenbreite in % von Schriftgrad
- BOOL bFit=(FitXMul!=1 || FitXDiv!=1 || FitYMul!=1 || FitYDiv!=1);
+ sal_uInt16 StdBrei=50; // Durchschnittliche Zeichenbreite in % von Schriftgrad
+ sal_Bool bFit=(FitXMul!=1 || FitXDiv!=1 || FitYMul!=1 || FitYDiv!=1);
pSgfFont = pSgfFonts->GetFontDesc(Atr.GetFont());
@@ -649,25 +649,25 @@ USHORT SetTextContext(OutputDevice& rOut, ObjTextType& Atr, BOOL Kapt, USHORT Dr
//aFont.SetCharSet(CHARSET_SYSTEM);
}
- Grad=ULONG(Atr.Grad);
- if ((Atr.Schnitt & TextKaptBit) !=0 && Kapt) Grad=Grad*ULONG(Atr.Kapit)/100;
+ Grad=sal_uLong(Atr.Grad);
+ if ((Atr.Schnitt & TextKaptBit) !=0 && Kapt) Grad=Grad*sal_uLong(Atr.Kapit)/100;
if ((Atr.Schnitt & TextSupSBit) !=0 || (Atr.Schnitt & TextSubSBit) !=0) Grad=Grad*SuperSubFact/100;
Brei=Grad;
if (Atr.Breite!=100 || bFit) {
if (bFit) {
- Grad=Grad*ULONG(FitYMul)/ULONG(FitYDiv);
- Brei=Brei*ULONG(FitXMul)/ULONG(FitXDiv);
+ Grad=Grad*sal_uLong(FitYMul)/sal_uLong(FitYDiv);
+ Brei=Brei*sal_uLong(FitXMul)/sal_uLong(FitXDiv);
}
- Brei=Brei*ULONG(Atr.Breite)/100;
- Brei=Brei*ULONG(StdBrei)/100;
- aFont.SetSize(Size(hPoint2Sgf(USHORT(Brei)),hPoint2Sgf(USHORT(Grad))));
+ Brei=Brei*sal_uLong(Atr.Breite)/100;
+ Brei=Brei*sal_uLong(StdBrei)/100;
+ aFont.SetSize(Size(hPoint2Sgf(sal_uInt16(Brei)),hPoint2Sgf(sal_uInt16(Grad))));
} else {
- aFont.SetSize(Size(0,hPoint2Sgf(USHORT(Grad))));
+ aFont.SetSize(Size(0,hPoint2Sgf(sal_uInt16(Grad))));
}
aColor=Sgv2SvFarbe(Atr.L.LFarbe,Atr.L.LBFarbe,Atr.L.LIntens); aFont.SetColor(aColor);
aColor=Sgv2SvFarbe(Atr.F.FFarbe,Atr.F.FBFarbe,Atr.F.FIntens); aFont.SetFillColor(aColor);
- aFont.SetTransparent(TRUE);
+ aFont.SetTransparent(sal_True);
aFont.SetAlign(ALIGN_BASELINE);
Dreh/=10; Dreh=3600-Dreh; if (Dreh==3600) Dreh=0;
@@ -679,11 +679,11 @@ USHORT SetTextContext(OutputDevice& rOut, ObjTextType& Atr, BOOL Kapt, USHORT Dr
if ((Atr.Schnitt & TextDbUnBit) !=0) aFont.SetUnderline(UNDERLINE_DOUBLE);
if ((Atr.Schnitt & TextStrkBit) !=0) aFont.SetStrikeout(STRIKEOUT_SINGLE);
if ((Atr.Schnitt & TextDbStBit) !=0) aFont.SetStrikeout(STRIKEOUT_DOUBLE);
- if ((Atr.Schnitt & TextSh2DBit) !=0) aFont.SetShadow(TRUE);
- if ((Atr.Schnitt & TextSh3DBit) !=0) aFont.SetShadow(TRUE);
- if ((Atr.Schnitt & TextSh4DBit) !=0) aFont.SetShadow(TRUE);
- if ((Atr.Schnitt & TextShEbBit) !=0) aFont.SetShadow(TRUE);
- if (CheckTextOutl(Atr.F,Atr.L)) aFont.SetOutline(TRUE);
+ if ((Atr.Schnitt & TextSh2DBit) !=0) aFont.SetShadow(sal_True);
+ if ((Atr.Schnitt & TextSh3DBit) !=0) aFont.SetShadow(sal_True);
+ if ((Atr.Schnitt & TextSh4DBit) !=0) aFont.SetShadow(sal_True);
+ if ((Atr.Schnitt & TextShEbBit) !=0) aFont.SetShadow(sal_True);
+ if (CheckTextOutl(Atr.F,Atr.L)) aFont.SetOutline(sal_True);
if (aFont!=rOut.GetFont()) rOut.SetFont(aFont);
@@ -702,26 +702,26 @@ USHORT SetTextContext(OutputDevice& rOut, ObjTextType& Atr, BOOL Kapt, USHORT Dr
// Absatz.Pas
struct ProcChrSta {
- USHORT Index;
- USHORT ChrXP;
+ sal_uInt16 Index;
+ sal_uInt16 ChrXP;
UCHAR OutCh;
- BOOL Kapt;
+ sal_Bool Kapt;
ObjTextType Attrib;
};
-void InitProcessCharState(ProcChrSta& State, ObjTextType& AktAtr, USHORT IndexA)
+void InitProcessCharState(ProcChrSta& State, ObjTextType& AktAtr, sal_uInt16 IndexA)
{
State.Attrib=AktAtr;
State.OutCh=0;
State.Index=IndexA;
State.ChrXP=0;
- State.Kapt=FALSE;
+ State.Kapt=sal_False;
}
-BOOL UpcasePossible(UCHAR c)
+sal_Bool UpcasePossible(UCHAR c)
{
- if ((c>='a' && c<='z') || c == 0xe4 || c == 0xf6 || c == 0xfc ) return TRUE;
- else return FALSE;
+ if ((c>='a' && c<='z') || c == 0xe4 || c == 0xf6 || c == 0xfc ) return sal_True;
+ else return sal_False;
}
UCHAR Upcase(UCHAR c)
@@ -733,15 +733,15 @@ UCHAR Upcase(UCHAR c)
return c;
}
-USHORT GetCharWidth(OutputDevice& rOut, UCHAR c)
+sal_uInt16 GetCharWidth(OutputDevice& rOut, UCHAR c)
{
UCHAR c1;
- USHORT ChrWidth;
+ sal_uInt16 ChrWidth;
c1 = ByteString::Convert((char)c,RTL_TEXTENCODING_IBM_437, gsl_getSystemTextEncoding() );
if (c==' ')
{
- ChrWidth=(USHORT)rOut.GetTextWidth( String('A') );
+ ChrWidth=(sal_uInt16)rOut.GetTextWidth( String('A') );
if (rOut.GetFont().GetPitch()!=PITCH_FIXED) {
ChrWidth=MulDiv(ChrWidth,DefaultSpace,100);
}
@@ -751,30 +751,30 @@ USHORT GetCharWidth(OutputDevice& rOut, UCHAR c)
OSL_ENSURE( MaxChar == 255, "MaxChar not 255" );
if (c>=MinChar /*&& c<=MaxChar*/)
{
- ChrWidth=(USHORT)rOut.GetTextWidth(String((char)c1));
+ ChrWidth=(sal_uInt16)rOut.GetTextWidth(String((char)c1));
}
else
{
- ChrWidth=(USHORT)rOut.GetTextWidth(String('A'));
+ ChrWidth=(sal_uInt16)rOut.GetTextWidth(String('A'));
}
}
return ChrWidth;
}
UCHAR ProcessChar(OutputDevice& rOut, UCHAR* TBuf, ProcChrSta& R, ObjTextType& Atr0,
- USHORT& nChars, USHORT Rest,
+ sal_uInt16& nChars, sal_uInt16 Rest,
short* Line, UCHAR* cLine)
{
- USHORT KernDist=0; // Wert fuer Kerning
- USHORT ChrWidth;
+ sal_uInt16 KernDist=0; // Wert fuer Kerning
+ sal_uInt16 ChrWidth;
UCHAR c;
UCHAR c1;
- BOOL AbsEnd;
+ sal_Bool AbsEnd;
- c=GetTextChar(TBuf,R.Index,Atr0,R.Attrib,Rest,FALSE); // versucht evtl. zu trennen, wenn Rest entsprechenden Wert besitzt
+ c=GetTextChar(TBuf,R.Index,Atr0,R.Attrib,Rest,sal_False); // versucht evtl. zu trennen, wenn Rest entsprechenden Wert besitzt
AbsEnd=(c==AbsatzEnd || c==TextEnd);
- if (AbsEnd==FALSE) {
+ if (AbsEnd==sal_False) {
R.OutCh=ConvertTextChar(c); // von HardTrenn nach '-', ...
R.Kapt=(R.Attrib.Schnitt & TextKaptBit) !=0 && UpcasePossible(R.OutCh);
if (R.Kapt) R.OutCh=Upcase(R.OutCh);
@@ -784,9 +784,9 @@ UCHAR ProcessChar(OutputDevice& rOut, UCHAR* TBuf, ProcChrSta& R, ObjTextType& A
ChrWidth=GetCharWidth(rOut,c1);
if (R.Attrib.ZAbst!=100) { // Spezial-Zeichenabstand ?
- ULONG Temp;
- Temp=ULONG(ChrWidth)*ULONG(R.Attrib.ZAbst)/100;
- ChrWidth=USHORT(Temp);
+ sal_uLong Temp;
+ Temp=sal_uLong(ChrWidth)*sal_uLong(R.Attrib.ZAbst)/100;
+ ChrWidth=sal_uInt16(Temp);
}
nChars++;
if (R.ChrXP>32000) R.ChrXP=32000;
@@ -797,44 +797,44 @@ UCHAR ProcessChar(OutputDevice& rOut, UCHAR* TBuf, ProcChrSta& R, ObjTextType& A
return c;
}
-void FormatLine(UCHAR* TBuf, USHORT& Index, ObjTextType& Atr0, ObjTextType& AktAtr,
- USHORT UmbWdt, USHORT AdjWdt,
- short* Line, USHORT& nChars,
+void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType& AktAtr,
+ sal_uInt16 UmbWdt, sal_uInt16 AdjWdt,
+ short* Line, sal_uInt16& nChars,
double, double,
- UCHAR* cLine, BOOL TextFit)
+ UCHAR* cLine, sal_Bool TextFit)
{
VirtualDevice vOut;
UCHAR c,c0;
UCHAR ct;
- BOOL First; // erster Char ?
- BYTE Just = 0; // Absatzformatierung
- BOOL Border; // Rand der Box erreicht ?
- BOOL Border0;
- BOOL AbsEnd; // Ende des Absatzes erreicht ?
+ sal_Bool First; // erster Char ?
+ sal_uInt8 Just = 0; // Absatzformatierung
+ sal_Bool Border; // Rand der Box erreicht ?
+ sal_Bool Border0;
+ sal_Bool AbsEnd; // Ende des Absatzes erreicht ?
ProcChrSta* R=new ProcChrSta;
ProcChrSta* R0=new ProcChrSta;
ProcChrSta* WErec=new ProcChrSta;
- USHORT WEnChar;
+ sal_uInt16 WEnChar;
ProcChrSta* WErec0=new ProcChrSta;
- USHORT WEnChar0;
+ sal_uInt16 WEnChar0;
ProcChrSta* TRrec=new ProcChrSta;
- USHORT TRnChar;
+ sal_uInt16 TRnChar;
- USHORT WordEndCnt; // Justieren und Trennen
- BOOL WordEnd;
- BOOL Trenn;
+ sal_uInt16 WordEndCnt; // Justieren und Trennen
+ sal_Bool WordEnd;
+ sal_Bool Trenn;
short BoxRest; // zum Quetschen und formatieren
- USHORT i,j,k,h;
- USHORT re,li;
+ sal_uInt16 i,j,k,h;
+ sal_uInt16 re,li;
vOut.SetMapMode(MapMode(MAP_10TH_MM,Point(),Fraction(1,4),Fraction(1,4)));
nChars=0;
- SetTextContext(vOut,AktAtr,FALSE,0,1,1,1,1);
+ SetTextContext(vOut,AktAtr,sal_False,0,1,1,1,1);
InitProcessCharState(*R,AktAtr,Index);
- (*R0)=(*R); (*WErec)=(*R); WEnChar=0; c0=0; Border0=FALSE;
- Border=FALSE; First=TRUE;
+ (*R0)=(*R); (*WErec)=(*R); WEnChar=0; c0=0; Border0=sal_False;
+ Border=sal_False; First=sal_True;
WordEndCnt=0;
do { // mal schauen, wieviele Worte so in die Zeile passen
@@ -862,16 +862,16 @@ void FormatLine(UCHAR* TBuf, USHORT& Index, ObjTextType& Atr0, ObjTextType& AktA
}
(*R0)=(*R); c0=c;
Border0=Border;
- First=FALSE;
+ First=sal_False;
AbsEnd=AbsEnd || (nChars>=MaxLineChars);
} while (!(AbsEnd || (Border && ((WordEndCnt>0) || WordEnd || Trenn))));
if (Border) { // Trennen und Quetschen
(*WErec0)=(*WErec); WEnChar0=WEnChar;
- AbsEnd=FALSE; c0=0;
+ AbsEnd=sal_False; c0=0;
(*R)=(*WErec); nChars=WEnChar;
(*TRrec)=(*R); TRnChar=nChars;
- Border0=FALSE; Border=FALSE;
+ Border0=sal_False; Border=sal_False;
do { // erst mal gucken wieviele Silben noch reinpassen
ct=ProcessChar(vOut,TBuf,*TRrec,Atr0,TRnChar,DoTrenn,Line,cLine);
c=ProcessChar(vOut,TBuf,*R,Atr0,nChars,NoTrenn,Line,cLine);
@@ -918,7 +918,7 @@ void FormatLine(UCHAR* TBuf, USHORT& Index, ObjTextType& Atr0, ObjTextType& AktA
if (!AbsEnd) {
do { // Leerzeichen weglesen
(*WErec)=(*R);
- c=GetTextChar(TBuf,R->Index,Atr0,R->Attrib,NoTrenn,FALSE);
+ c=GetTextChar(TBuf,R->Index,Atr0,R->Attrib,NoTrenn,sal_False);
nChars++;
Line[nChars]=R->ChrXP;
cLine[nChars]=c;
@@ -934,7 +934,7 @@ void FormatLine(UCHAR* TBuf, USHORT& Index, ObjTextType& Atr0, ObjTextType& AktA
nChars++; Line[nChars]=R->ChrXP; // Damit AbsatzEnde auch weggelesen wird
Line[nChars+1]=R->ChrXP; // denn die Breite von CR oder #0 ist nun mal sehr klein
if (TBuf[R->Index-1]!=AbsatzEnd && TBuf[R->Index-1]!=TextEnd) {
- c=GetTextChar(TBuf,R->Index,Atr0,R->Attrib,NoTrenn,FALSE); // Kleine Korrektur. Notig, wenn nur 1 Wort in
+ c=GetTextChar(TBuf,R->Index,Atr0,R->Attrib,NoTrenn,sal_False); // Kleine Korrektur. Notig, wenn nur 1 Wort in
}
}
@@ -1018,8 +1018,8 @@ void FormatLine(UCHAR* TBuf, USHORT& Index, ObjTextType& Atr0, ObjTextType& AktA
/////////////////////////////////////////////////////////////////////////////////
// DrawText.Pas
-void DrawChar(OutputDevice& rOut, UCHAR c, ObjTextType T, PointType Pos, USHORT DrehWink,
- USHORT FitXMul, USHORT FitXDiv, USHORT FitYMul, USHORT FitYDiv)
+void DrawChar(OutputDevice& rOut, UCHAR c, ObjTextType T, PointType Pos, sal_uInt16 DrehWink,
+ sal_uInt16 FitXMul, sal_uInt16 FitXDiv, sal_uInt16 FitYMul, sal_uInt16 FitYDiv)
{
SetTextContext(rOut,T,UpcasePossible(c),DrehWink,FitXMul,FitXDiv,FitYMul,FitYDiv);
if ((T.Schnitt & TextKaptBit)!=0 && UpcasePossible(c)) c=Upcase(c);
@@ -1041,32 +1041,32 @@ void TextType::Draw(OutputDevice& rOut)
if ((Flags & TextOutlBit)!=0) return; // Sourcetext fuer Outliner !!
ObjTextType T1,T2;
- USHORT Index1;
- USHORT Index2;
+ sal_uInt16 Index1;
+ sal_uInt16 Index2;
UCHAR c = TextEnd;
- USHORT l; // Anzahl der Zeichen in der Zeile
- USHORT i;
+ sal_uInt16 l; // Anzahl der Zeichen in der Zeile
+ sal_uInt16 i;
short yPos0;
short xPos;
short yPos;
- USHORT LF;
- USHORT MaxGrad;
+ sal_uInt16 LF;
+ sal_uInt16 MaxGrad;
short xSize;
short xSAdj;
short ySize;
double sn,cs;
- USHORT TopToBase;
- BOOL Ende = 0;
- USHORT lc;
- BOOL LineFit; // FitSize.x=0? oder Flags -> jede Zeile stretchen
- BOOL TextFit;
+ sal_uInt16 TopToBase;
+ sal_Bool Ende = 0;
+ sal_uInt16 lc;
+ sal_Bool LineFit; // FitSize.x=0? oder Flags -> jede Zeile stretchen
+ sal_Bool TextFit;
short* xLine;
UCHAR* cLine; // Buffer fuer FormatLine
- USHORT FitXMul;
- USHORT FitXDiv;
- USHORT FitYMul;
- USHORT FitYDiv;
- BOOL Fehler;
+ sal_uInt16 FitXMul;
+ sal_uInt16 FitXDiv;
+ sal_uInt16 FitYMul;
+ sal_uInt16 FitYDiv;
+ sal_Bool Fehler;
UCHAR* Buf=Buffer; // Zeiger auf die Buchstaben
pSgfFonts->ReadList();
@@ -1074,9 +1074,9 @@ void TextType::Draw(OutputDevice& rOut)
cLine=new UCHAR[CharLineSize];
TextFit=(Flags & TextFitBits)!=0;
- LineFit=FALSE;
+ LineFit=sal_False;
LineFit=((Flags & TextFitZBit)!=0);
- if (TextFit && FitSize.x==0) LineFit=TRUE;
+ if (TextFit && FitSize.x==0) LineFit=sal_True;
if (DrehWink==0) {
sn=0.0;
@@ -1091,9 +1091,9 @@ void TextType::Draw(OutputDevice& rOut)
ySize=Pos2.y-Pos1.y;
xSize=32000 /2; // Umbruch
xSAdj=Pos2.x-Pos1.x; // zum Ausrichten bei Zentriert/Blocksatz
- //if (xSize<=0) { xSize=32000 /2; LineFit=TRUE; }
- FitXMul=sal::static_int_cast< USHORT >(abs(Pos2.x-Pos1.x)); FitXDiv=FitSize.x; if (FitXDiv==0) FitXDiv=1;
- FitYMul=sal::static_int_cast< USHORT >(abs(Pos2.y-Pos1.y)); FitYDiv=FitSize.y; if (FitYDiv==0) FitYDiv=1;
+ //if (xSize<=0) { xSize=32000 /2; LineFit=sal_True; }
+ FitXMul=sal::static_int_cast< sal_uInt16 >(abs(Pos2.x-Pos1.x)); FitXDiv=FitSize.x; if (FitXDiv==0) FitXDiv=1;
+ FitYMul=sal::static_int_cast< sal_uInt16 >(abs(Pos2.y-Pos1.y)); FitYDiv=FitSize.y; if (FitYDiv==0) FitYDiv=1;
} else {
xSize=Pos2.x-Pos1.x;
xSAdj=xSize;
@@ -1132,7 +1132,7 @@ void TextType::Draw(OutputDevice& rOut)
T2=T1; Index2=Index1;
i=1;
while (i<=l) {
- c=GetTextCharConv(Buf,Index2,T,T2,l-i,FALSE);
+ c=GetTextCharConv(Buf,Index2,T,T2,l-i,sal_False);
long xp1,yp1; // wegen Overflowgefahr
PointType Pos;
xp1=long(Pos1.x)+xPos+long(xLine[i]);
@@ -1164,27 +1164,27 @@ void TextType::Draw(OutputDevice& rOut)
// (DEC Alpha hat naemlich 64Bit-Pointer!)
//UCHAR* TextType::GetBufPtr()
//{
-// ULONG Temp;
-// Temp=ULONG(BufLo)+0x00010000*ULONG(BufHi);
+// sal_uLong Temp;
+// Temp=sal_uLong(BufLo)+0x00010000*sal_uLong(BufHi);
// return (UCHAR*)Temp;
//}
//
//void TextType::SetBufPtr(UCHAR* Ptr)
//{
-// ULONG Temp=(ULONG)Ptr;
-// BufLo=USHORT(Temp & 0x0000FFFF);
-// BufHi=USHORT((Temp & 0xFFFF0000)>>16);
+// sal_uLong Temp=(sal_uLong)Ptr;
+// BufLo=sal_uInt16(Temp & 0x0000FFFF);
+// BufHi=sal_uInt16((Temp & 0xFFFF0000)>>16);
//}
-UINT32 ObjTextType::GetFont()
+sal_uInt32 ObjTextType::GetFont()
{
- return ULONG(FontLo)+0x00010000*ULONG(FontHi);
+ return sal_uLong(FontLo)+0x00010000*sal_uLong(FontHi);
}
-void ObjTextType::SetFont(UINT32 FontID)
+void ObjTextType::SetFont(sal_uInt32 FontID)
{
- FontLo=USHORT(FontID & 0x0000FFFF);
- FontHi=USHORT((FontID & 0xFFFF0000)>>16);
+ FontLo=sal_uInt16(FontID & 0x0000FFFF);
+ FontHi=sal_uInt16((FontID & 0xFFFF0000)>>16);
}
@@ -1195,11 +1195,11 @@ SgfFontOne::SgfFontOne()
{
Next=NULL;
IFID=0;
- Bold=FALSE;
- Ital=FALSE;
- Sans=FALSE;
- Serf=FALSE;
- Fixd=FALSE;
+ Bold=sal_False;
+ Ital=sal_False;
+ Sans=sal_False;
+ Serf=sal_False;
+ Fixd=sal_False;
SVFamil=FAMILY_DONTKNOW;
SVChSet=RTL_TEXTENCODING_DONTKNOW;
SVWidth=40;
@@ -1207,7 +1207,7 @@ SgfFontOne::SgfFontOne()
void SgfFontOne::ReadOne( ByteString& ID, ByteString& Dsc )
{
- USHORT i,j,n;
+ sal_uInt16 i,j,n;
ByteString s;
if ( Dsc.Len() < 4 || ( Dsc.GetChar( 0 ) != '(' ) )
@@ -1229,7 +1229,7 @@ void SgfFontOne::ReadOne( ByteString& ID, ByteString& Dsc )
SVFName=String(Dsc,i+1,j); // SV-Fontname rausholen
Dsc.Erase(i,j);
- IFID = (UINT32)ID.ToInt32();
+ IFID = (sal_uInt32)ID.ToInt32();
n=Dsc.GetTokenCount(' ');
for (i=0;i<n;i++)
{
@@ -1237,11 +1237,11 @@ void SgfFontOne::ReadOne( ByteString& ID, ByteString& Dsc )
if ( s.Len() )
{
s.ToUpperAscii();
- if ( s.CompareTo( "BOLD", 4 ) == COMPARE_EQUAL ) Bold=TRUE;
- else if ( s.CompareTo( "ITAL", 4 ) == COMPARE_EQUAL ) Ital=TRUE;
- else if ( s.CompareTo( "SERF", 4 ) == COMPARE_EQUAL ) Serf=TRUE;
- else if ( s.CompareTo( "SANS", 4 ) == COMPARE_EQUAL ) Sans=TRUE;
- else if ( s.CompareTo( "FIXD", 4 ) == COMPARE_EQUAL ) Fixd=TRUE;
+ if ( s.CompareTo( "BOLD", 4 ) == COMPARE_EQUAL ) Bold=sal_True;
+ else if ( s.CompareTo( "ITAL", 4 ) == COMPARE_EQUAL ) Ital=sal_True;
+ else if ( s.CompareTo( "SERF", 4 ) == COMPARE_EQUAL ) Serf=sal_True;
+ else if ( s.CompareTo( "SANS", 4 ) == COMPARE_EQUAL ) Sans=sal_True;
+ else if ( s.CompareTo( "FIXD", 4 ) == COMPARE_EQUAL ) Fixd=sal_True;
else if ( s.CompareTo( "ROMAN", 5 ) == COMPARE_EQUAL ) SVFamil=FAMILY_ROMAN;
else if ( s.CompareTo( "SWISS", 5 ) == COMPARE_EQUAL ) SVFamil=FAMILY_SWISS;
else if ( s.CompareTo( "MODERN", 6 ) == COMPARE_EQUAL ) SVFamil=FAMILY_MODERN;
@@ -1252,7 +1252,7 @@ void SgfFontOne::ReadOne( ByteString& ID, ByteString& Dsc )
else if ( s.CompareTo( "MAC", 3 ) == COMPARE_EQUAL ) SVChSet=RTL_TEXTENCODING_APPLE_ROMAN;
else if ( s.CompareTo( "SYMBOL", 6 ) == COMPARE_EQUAL ) SVChSet=RTL_TEXTENCODING_SYMBOL;
else if ( s.CompareTo( "SYSTEM", 6 ) == COMPARE_EQUAL ) SVChSet = gsl_getSystemTextEncoding();
- else if ( s.IsNumericAscii() ) SVWidth=sal::static_int_cast< USHORT >(s.ToInt32());
+ else if ( s.IsNumericAscii() ) SVWidth=sal::static_int_cast< sal_uInt16 >(s.ToInt32());
}
}
}
@@ -1265,7 +1265,7 @@ SgfFontLst::SgfFontLst()
Last=NULL;
LastID=0;
LastLn=NULL;
- Tried=FALSE;
+ Tried=sal_False;
}
SgfFontLst::~SgfFontLst()
@@ -1285,7 +1285,7 @@ void SgfFontLst::RausList()
}
pList=NULL;
Last=NULL;
- Tried=FALSE;
+ Tried=sal_False;
LastID=0;
LastLn=NULL;
}
@@ -1296,14 +1296,14 @@ void SgfFontLst::AssignFN(const String& rFName)
void SgfFontLst::ReadList()
{
if (!Tried) {
- Tried=TRUE;
+ Tried=sal_True;
LastID=0;
LastLn=NULL;
SgfFontOne* P,P1;
Config aCfg(FNam);
aCfg.SetGroup("SGV Fonts fuer StarView");
- USHORT Anz=aCfg.GetKeyCount();
- USHORT i;
+ sal_uInt16 Anz=aCfg.GetKeyCount();
+ sal_uInt16 i;
ByteString FID,Dsc;
for (i=0;i<Anz;i++)
@@ -1321,7 +1321,7 @@ void SgfFontLst::ReadList()
}
}
-SgfFontOne* SgfFontLst::GetFontDesc(UINT32 ID)
+SgfFontOne* SgfFontLst::GetFontDesc(sal_uInt32 ID)
{
if (ID!=LastID) {
SgfFontOne* P;
diff --git a/svtools/source/filter.vcl/igif/decode.cxx b/svtools/source/filter.vcl/igif/decode.cxx
index bfe77319b81a..ddea94a5555e 100644
--- a/svtools/source/filter.vcl/igif/decode.cxx
+++ b/svtools/source/filter.vcl/igif/decode.cxx
@@ -36,19 +36,19 @@ struct GIFLZWTableEntry
{
GIFLZWTableEntry* pPrev;
GIFLZWTableEntry* pFirst;
- BYTE nData;
+ sal_uInt8 nData;
};
// ------------------------------------------------------------------------
-GIFLZWDecompressor::GIFLZWDecompressor( BYTE cDataSize ) :
+GIFLZWDecompressor::GIFLZWDecompressor( sal_uInt8 cDataSize ) :
nInputBitsBuf ( 0 ),
nOutBufDataLen ( 0 ),
nInputBitsBufSize ( 0 ),
- bEOIFound ( FALSE ),
+ bEOIFound ( sal_False ),
nDataSize ( cDataSize )
{
- pOutBuf = new BYTE[ 4096 ];
+ pOutBuf = new sal_uInt8[ 4096 ];
nClearCode = 1 << nDataSize;
nEOICode = nClearCode + 1;
@@ -59,11 +59,11 @@ GIFLZWDecompressor::GIFLZWDecompressor( BYTE cDataSize ) :
pTable = new GIFLZWTableEntry[ 4098 ];
- for( USHORT i = 0; i < nTableSize; i++ )
+ for( sal_uInt16 i = 0; i < nTableSize; i++ )
{
pTable[i].pPrev = NULL;
pTable[i].pFirst = pTable + i;
- pTable[i].nData = (BYTE) i;
+ pTable[i].nData = (sal_uInt8) i;
}
}
@@ -77,11 +77,11 @@ GIFLZWDecompressor::~GIFLZWDecompressor()
// ------------------------------------------------------------------------
-HPBYTE GIFLZWDecompressor::DecompressBlock( HPBYTE pSrc, BYTE cBufSize,
- ULONG& rCount, BOOL& rEOI )
+HPBYTE GIFLZWDecompressor::DecompressBlock( HPBYTE pSrc, sal_uInt8 cBufSize,
+ sal_uLong& rCount, sal_Bool& rEOI )
{
- ULONG nTargetSize = 4096;
- ULONG nCount = 0;
+ sal_uLong nTargetSize = 4096;
+ sal_uLong nCount = 0;
HPBYTE pTarget = (HPBYTE) rtl_allocateMemory( nTargetSize );
HPBYTE pTmpTarget = pTarget;
@@ -95,8 +95,8 @@ HPBYTE GIFLZWDecompressor::DecompressBlock( HPBYTE pSrc, BYTE cBufSize,
if( nCount > nTargetSize )
{
- ULONG nNewSize = nTargetSize << 1;
- ULONG nOffset = pTmpTarget - pTarget;
+ sal_uLong nNewSize = nTargetSize << 1;
+ sal_uLong nOffset = pTmpTarget - pTarget;
HPBYTE pTmp = (HPBYTE) rtl_allocateMemory( nNewSize );
memcpy( pTmp, pTarget, nTargetSize );
@@ -123,7 +123,7 @@ HPBYTE GIFLZWDecompressor::DecompressBlock( HPBYTE pSrc, BYTE cBufSize,
// ------------------------------------------------------------------------
-void GIFLZWDecompressor::AddToTable( USHORT nPrevCode, USHORT nCodeFirstData )
+void GIFLZWDecompressor::AddToTable( sal_uInt16 nPrevCode, sal_uInt16 nCodeFirstData )
{
GIFLZWTableEntry* pE;
@@ -135,37 +135,37 @@ void GIFLZWDecompressor::AddToTable( USHORT nPrevCode, USHORT nCodeFirstData )
pE->nData = pTable[ nCodeFirstData ].pFirst->nData;
nTableSize++;
- if ( ( nTableSize == (USHORT) (1 << nCodeSize) ) && ( nTableSize < 4096 ) )
+ if ( ( nTableSize == (sal_uInt16) (1 << nCodeSize) ) && ( nTableSize < 4096 ) )
nCodeSize++;
}
}
// ------------------------------------------------------------------------
-BOOL GIFLZWDecompressor::ProcessOneCode()
+sal_Bool GIFLZWDecompressor::ProcessOneCode()
{
GIFLZWTableEntry* pE;
- USHORT nCode;
- BOOL bRet = FALSE;
- BOOL bEndOfBlock = FALSE;
+ sal_uInt16 nCode;
+ sal_Bool bRet = sal_False;
+ sal_Bool bEndOfBlock = sal_False;
while( nInputBitsBufSize < nCodeSize )
{
if( nBlockBufPos >= nBlockBufSize )
{
- bEndOfBlock = TRUE;
+ bEndOfBlock = sal_True;
break;
}
- nInputBitsBuf |= ( (ULONG) pBlockBuf[ nBlockBufPos++ ] ) << nInputBitsBufSize;
+ nInputBitsBuf |= ( (sal_uLong) pBlockBuf[ nBlockBufPos++ ] ) << nInputBitsBufSize;
nInputBitsBufSize += 8;
}
if ( !bEndOfBlock )
{
// Einen Code aus dem Eingabe-Buffer holen:
- nCode = sal::static_int_cast< USHORT >(
- ( (USHORT) nInputBitsBuf ) & ( ~( 0xffff << nCodeSize ) ));
+ nCode = sal::static_int_cast< sal_uInt16 >(
+ ( (sal_uInt16) nInputBitsBuf ) & ( ~( 0xffff << nCodeSize ) ));
nInputBitsBuf >>= nCodeSize;
nInputBitsBufSize = nInputBitsBufSize - nCodeSize;
@@ -191,9 +191,9 @@ BOOL GIFLZWDecompressor::ProcessOneCode()
nOutBufDataLen = 0;
}
else
- bEOIFound = TRUE;
+ bEOIFound = sal_True;
- return TRUE;
+ return sal_True;
}
nOldCode = nCode;
@@ -208,7 +208,7 @@ BOOL GIFLZWDecompressor::ProcessOneCode()
}
while( pE );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
diff --git a/svtools/source/filter.vcl/igif/decode.hxx b/svtools/source/filter.vcl/igif/decode.hxx
index 3c6a61e7508d..e85cc30eaf9e 100644
--- a/svtools/source/filter.vcl/igif/decode.hxx
+++ b/svtools/source/filter.vcl/igif/decode.hxx
@@ -40,29 +40,29 @@ class GIFLZWDecompressor
HPBYTE pOutBuf;
HPBYTE pOutBufData;
HPBYTE pBlockBuf;
- ULONG nInputBitsBuf;
- USHORT nTableSize;
- USHORT nClearCode;
- USHORT nEOICode;
- USHORT nCodeSize;
- USHORT nOldCode;
- USHORT nOutBufDataLen;
- USHORT nInputBitsBufSize;
- BOOL bEOIFound;
- BYTE nDataSize;
- BYTE nBlockBufSize;
- BYTE nBlockBufPos;
+ sal_uLong nInputBitsBuf;
+ sal_uInt16 nTableSize;
+ sal_uInt16 nClearCode;
+ sal_uInt16 nEOICode;
+ sal_uInt16 nCodeSize;
+ sal_uInt16 nOldCode;
+ sal_uInt16 nOutBufDataLen;
+ sal_uInt16 nInputBitsBufSize;
+ sal_Bool bEOIFound;
+ sal_uInt8 nDataSize;
+ sal_uInt8 nBlockBufSize;
+ sal_uInt8 nBlockBufPos;
- void AddToTable(USHORT nPrevCode, USHORT nCodeFirstData);
- BOOL ProcessOneCode();
+ void AddToTable(sal_uInt16 nPrevCode, sal_uInt16 nCodeFirstData);
+ sal_Bool ProcessOneCode();
public:
- GIFLZWDecompressor( BYTE cDataSize );
+ GIFLZWDecompressor( sal_uInt8 cDataSize );
~GIFLZWDecompressor();
- HPBYTE DecompressBlock( HPBYTE pSrc, BYTE cBufSize, ULONG& rCount, BOOL& rEOI );
+ HPBYTE DecompressBlock( HPBYTE pSrc, sal_uInt8 cBufSize, sal_uLong& rCount, sal_Bool& rEOI );
};
#endif
diff --git a/svtools/source/filter.vcl/igif/gifread.cxx b/svtools/source/filter.vcl/igif/gifread.cxx
index e4020c727ff4..16318e5b143e 100644
--- a/svtools/source/filter.vcl/igif/gifread.cxx
+++ b/svtools/source/filter.vcl/igif/gifread.cxx
@@ -54,11 +54,11 @@ GIFReader::GIFReader( SvStream& rStm ) :
nLogHeight100 ( 0UL ),
nLoops ( 1 ),
eActAction ( GLOBAL_HEADER_READING ),
- bGCTransparent ( FALSE ),
- bImGraphicReady ( FALSE )
+ bGCTransparent ( sal_False ),
+ bImGraphicReady ( sal_False )
{
maUpperName = UniString::CreateFromAscii( "SVIGIF", 6 );
- pSrcBuf = new BYTE[ 256 ];
+ pSrcBuf = new sal_uInt8[ 256 ];
ClearImageExtensions();
}
@@ -82,14 +82,14 @@ GIFReader::~GIFReader()
void GIFReader::ClearImageExtensions()
{
nGCDisposalMethod = 0;
- bGCTransparent = FALSE;
+ bGCTransparent = sal_False;
nTimer = 0;
}
// ------------------------------------------------------------------------
-BOOL GIFReader::CreateBitmaps( long nWidth, long nHeight, BitmapPalette* pPal,
- BOOL bWatchForBackgroundColor )
+sal_Bool GIFReader::CreateBitmaps( long nWidth, long nHeight, BitmapPalette* pPal,
+ sal_Bool bWatchForBackgroundColor )
{
const Size aSize( nWidth, nHeight );
@@ -106,11 +106,11 @@ BOOL GIFReader::CreateBitmaps( long nWidth, long nHeight, BitmapPalette* pPal,
if( pAcc1 )
{
- cTransIndex1 = (BYTE) pAcc1->GetBestPaletteIndex( aWhite );
+ cTransIndex1 = (sal_uInt8) pAcc1->GetBestPaletteIndex( aWhite );
cNonTransIndex1 = cTransIndex1 ? 0 : 1;
}
else
- bStatus = FALSE;
+ bStatus = sal_False;
}
if( bStatus )
@@ -131,12 +131,12 @@ BOOL GIFReader::CreateBitmaps( long nWidth, long nHeight, BitmapPalette* pPal,
// ------------------------------------------------------------------------
-BOOL GIFReader::ReadGlobalHeader()
+sal_Bool GIFReader::ReadGlobalHeader()
{
char pBuf[ 7 ];
- BYTE nRF;
- BYTE nAspect;
- BOOL bRet = FALSE;
+ sal_uInt8 nRF;
+ sal_uInt8 nAspect;
+ sal_Bool bRet = sal_False;
rIStm.Read( pBuf, 6 );
if( NO_PENDING( rIStm ) )
@@ -149,14 +149,14 @@ BOOL GIFReader::ReadGlobalHeader()
{
SvMemoryStream aMemStm;
- aMemStm.SetBuffer( pBuf, 7, FALSE, 7 );
+ aMemStm.SetBuffer( pBuf, 7, sal_False, 7 );
aMemStm >> nGlobalWidth;
aMemStm >> nGlobalHeight;
aMemStm >> nRF;
aMemStm >> nBackgroundColor;
aMemStm >> nAspect;
- bGlobalPalette = (BOOL) ( nRF & 0x80 );
+ bGlobalPalette = (sal_Bool) ( nRF & 0x80 );
if( bGlobalPalette )
ReadPaletteEntries( &aGPalette, 1 << ( ( nRF & 7 ) + 1 ) );
@@ -164,11 +164,11 @@ BOOL GIFReader::ReadGlobalHeader()
nBackgroundColor = 0;
if( NO_PENDING( rIStm ) )
- bRet = TRUE;
+ bRet = sal_True;
}
}
else
- bStatus = FALSE;
+ bStatus = sal_False;
}
return bRet;
@@ -176,19 +176,19 @@ BOOL GIFReader::ReadGlobalHeader()
// ------------------------------------------------------------------------
-void GIFReader::ReadPaletteEntries( BitmapPalette* pPal, ULONG nCount )
+void GIFReader::ReadPaletteEntries( BitmapPalette* pPal, sal_uLong nCount )
{
- const ULONG nLen = 3UL * nCount;
- BYTE* pBuf = new BYTE[ nLen ];
+ const sal_uLong nLen = 3UL * nCount;
+ sal_uInt8* pBuf = new sal_uInt8[ nLen ];
rIStm.Read( pBuf, nLen );
if( NO_PENDING( rIStm ) )
{
- BYTE* pTmp = pBuf;
+ sal_uInt8* pTmp = pBuf;
- for( ULONG i = 0UL; i < nCount; )
+ for( sal_uLong i = 0UL; i < nCount; )
{
- BitmapColor& rColor = (*pPal)[ (USHORT) i++ ];
+ BitmapColor& rColor = (*pPal)[ (sal_uInt16) i++ ];
rColor.SetRed( *pTmp++ );
rColor.SetGreen( *pTmp++ );
@@ -210,13 +210,13 @@ void GIFReader::ReadPaletteEntries( BitmapPalette* pPal, ULONG nCount )
// ------------------------------------------------------------------------
-BOOL GIFReader::ReadExtension()
+sal_Bool GIFReader::ReadExtension()
{
- BYTE cFunction;
- BYTE cSize;
- BYTE cByte;
- BOOL bRet = FALSE;
- BOOL bOverreadDataBlocks = FALSE;
+ sal_uInt8 cFunction;
+ sal_uInt8 cSize;
+ sal_uInt8 cByte;
+ sal_Bool bRet = sal_False;
+ sal_Bool bOverreadDataBlocks = sal_False;
// Extension-Label
rIStm >> cFunction;
@@ -230,7 +230,7 @@ BOOL GIFReader::ReadExtension()
// 'Graphic Control Extension'
case( 0xf9 ) :
{
- BYTE cFlags;
+ sal_uInt8 cFlags;
rIStm >> cFlags;
rIStm >> nTimer;
@@ -240,9 +240,9 @@ BOOL GIFReader::ReadExtension()
if ( NO_PENDING( rIStm ) )
{
nGCDisposalMethod = ( cFlags >> 2) & 7;
- bGCTransparent = ( cFlags & 1 ) ? TRUE : FALSE;
+ bGCTransparent = ( cFlags & 1 ) ? sal_True : sal_False;
bStatus = ( cSize == 4 ) && ( cByte == 0 );
- bRet = TRUE;
+ bRet = sal_True;
}
}
break;
@@ -253,7 +253,7 @@ BOOL GIFReader::ReadExtension()
if ( NO_PENDING( rIStm ) )
{
// default diese Extension ueberlesen
- bOverreadDataBlocks = TRUE;
+ bOverreadDataBlocks = sal_True;
// Appl.-Extension hat Laenge 11
if ( cSize == 0x0b )
@@ -276,12 +276,12 @@ BOOL GIFReader::ReadExtension()
rIStm >> cByte;
nLoops = cByte;
rIStm >> cByte;
- nLoops |= ( (USHORT) cByte << 8 );
+ nLoops |= ( (sal_uInt16) cByte << 8 );
rIStm >> cByte;
bStatus = ( cByte == 0 );
bRet = NO_PENDING( rIStm );
- bOverreadDataBlocks = FALSE;
+ bOverreadDataBlocks = sal_False;
// Netscape interpretiert den LoopCount
// als reine Anzahl der _Wiederholungen_;
@@ -304,7 +304,7 @@ BOOL GIFReader::ReadExtension()
rIStm >> cByte;
bStatus = ( cByte == 0 );
bRet = NO_PENDING( rIStm );
- bOverreadDataBlocks = FALSE;
+ bOverreadDataBlocks = sal_False;
}
else
rIStm.SeekRel( -1 );
@@ -317,25 +317,25 @@ BOOL GIFReader::ReadExtension()
// alles andere ueberlesen
default:
- bOverreadDataBlocks = TRUE;
+ bOverreadDataBlocks = sal_True;
break;
}
// Sub-Blocks ueberlesen
if ( bOverreadDataBlocks )
{
- bRet = TRUE;
+ bRet = sal_True;
while( cSize && bStatus && !rIStm.IsEof() )
{
- USHORT nCount = (USHORT) cSize + 1;
+ sal_uInt16 nCount = (sal_uInt16) cSize + 1;
char* pBuffer = new char[ nCount ];
- bRet = FALSE;
+ bRet = sal_False;
rIStm.Read( pBuffer, nCount );
if( NO_PENDING( rIStm ) )
{
- cSize = (BYTE) pBuffer[ cSize ];
- bRet = TRUE;
+ cSize = (sal_uInt8) pBuffer[ cSize ];
+ bRet = sal_True;
}
else
cSize = 0;
@@ -350,19 +350,19 @@ BOOL GIFReader::ReadExtension()
// ------------------------------------------------------------------------
-BOOL GIFReader::ReadLocalHeader()
+sal_Bool GIFReader::ReadLocalHeader()
{
- BYTE pBuf[ 9 ];
- BOOL bRet = FALSE;
+ sal_uInt8 pBuf[ 9 ];
+ sal_Bool bRet = sal_False;
rIStm.Read( pBuf, 9 );
if( NO_PENDING( rIStm ) )
{
SvMemoryStream aMemStm;
BitmapPalette* pPal;
- BYTE nFlags;
+ sal_uInt8 nFlags;
- aMemStm.SetBuffer( (char*) pBuf, 9, FALSE, 9 );
+ aMemStm.SetBuffer( (char*) pBuf, 9, sal_False, 9 );
aMemStm >> nImagePosX;
aMemStm >> nImagePosY;
aMemStm >> nImageWidth;
@@ -390,7 +390,7 @@ BOOL GIFReader::ReadLocalHeader()
if( NO_PENDING( rIStm ) )
{
CreateBitmaps( nImageWidth, nImageHeight, pPal, bGlobalPalette && ( pPal == &aGPalette ) );
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -399,11 +399,11 @@ BOOL GIFReader::ReadLocalHeader()
// ------------------------------------------------------------------------
-ULONG GIFReader::ReadNextBlock()
+sal_uLong GIFReader::ReadNextBlock()
{
- ULONG nRet = 0UL;
- ULONG nRead;
- BYTE cBlockSize;
+ sal_uLong nRet = 0UL;
+ sal_uLong nRead;
+ sal_uInt8 cBlockSize;
rIStm >> cBlockSize;
@@ -423,7 +423,7 @@ ULONG GIFReader::ReadNextBlock()
nRet = 3UL;
else
{
- BOOL bEOI;
+ sal_Bool bEOI;
HPBYTE pTarget = pDecomp->DecompressBlock( pSrcBuf, cBlockSize, nRead, bEOI );
nRet = ( bEOI ? 3 : 1 );
@@ -442,9 +442,9 @@ ULONG GIFReader::ReadNextBlock()
// ------------------------------------------------------------------------
-void GIFReader::FillImages( HPBYTE pBytes, ULONG nCount )
+void GIFReader::FillImages( HPBYTE pBytes, sal_uLong nCount )
{
- for( ULONG i = 0UL; i < nCount; i++ )
+ for( sal_uLong i = 0UL; i < nCount; i++ )
{
if( nImageX >= nImageWidth )
{
@@ -463,9 +463,9 @@ void GIFReader::FillImages( HPBYTE pBytes, ULONG nCount )
if( ( nMinY > nLastImageY ) && ( nLastImageY < ( nImageHeight - 1 ) ) )
{
HPBYTE pScanline8 = pAcc8->GetScanline( nYAcc );
- ULONG nSize8 = pAcc8->GetScanlineSize();
+ sal_uLong nSize8 = pAcc8->GetScanlineSize();
HPBYTE pScanline1 = 0;
- ULONG nSize1 = 0;
+ sal_uLong nSize1 = 0;
if( bGCTransparent )
{
@@ -507,7 +507,7 @@ void GIFReader::FillImages( HPBYTE pBytes, ULONG nCount )
}
}
- nLastImageY = (USHORT) nT1;
+ nLastImageY = (sal_uInt16) nT1;
nYAcc = nT1;
}
else
@@ -522,7 +522,7 @@ void GIFReader::FillImages( HPBYTE pBytes, ULONG nCount )
if( nImageY < nImageHeight )
{
- const BYTE cTmp = pBytes[ i ];
+ const sal_uInt8 cTmp = pBytes[ i ];
if( bGCTransparent )
{
@@ -539,7 +539,7 @@ void GIFReader::FillImages( HPBYTE pBytes, ULONG nCount )
}
else
{
- bOverreadBlock = TRUE;
+ bOverreadBlock = sal_True;
break;
}
}
@@ -566,7 +566,7 @@ void GIFReader::CreateNewBitmaps()
aAnimBmp.aPosPix = Point( nImagePosX, nImagePosY );
aAnimBmp.aSizePix = Size( nImageWidth, nImageHeight );
aAnimBmp.nWait = ( nTimer != 65535 ) ? nTimer : ANIMATION_TIMEOUT_ON_CLICK;
- aAnimBmp.bUserInput = FALSE;
+ aAnimBmp.bUserInput = sal_False;
if( nGCDisposalMethod == 2 )
aAnimBmp.eDisposal = DISPOSE_BACK;
@@ -617,10 +617,10 @@ const Graphic& GIFReader::GetIntermediateGraphic()
// ------------------------------------------------------------------------
-BOOL GIFReader::ProcessGIF()
+sal_Bool GIFReader::ProcessGIF()
{
- BOOL bRead = FALSE;
- BOOL bEnd = FALSE;
+ sal_Bool bRead = sal_False;
+ sal_Bool bEnd = sal_False;
if ( !bStatus )
eActAction = ABORT_READING;
@@ -633,7 +633,7 @@ BOOL GIFReader::ProcessGIF()
// naechsten Marker lesen
case( MARKER_READING ):
{
- BYTE cByte;
+ sal_uInt8 cByte;
rIStm >> cByte;
@@ -641,7 +641,7 @@ BOOL GIFReader::ProcessGIF()
eActAction = END_READING;
else if( NO_PENDING( rIStm ) )
{
- bRead = TRUE;
+ bRead = sal_True;
if( cByte == '!' )
eActAction = EXTENSION_READING;
@@ -658,7 +658,7 @@ BOOL GIFReader::ProcessGIF()
// ScreenDescriptor lesen
case( GLOBAL_HEADER_READING ):
{
- if( ( bRead = ReadGlobalHeader() ) == TRUE )
+ if( ( bRead = ReadGlobalHeader() ) == sal_True )
{
ClearImageExtensions();
eActAction = MARKER_READING;
@@ -670,7 +670,7 @@ BOOL GIFReader::ProcessGIF()
// Extension lesen
case( EXTENSION_READING ):
{
- if( ( bRead = ReadExtension() ) == TRUE )
+ if( ( bRead = ReadExtension() ) == sal_True )
eActAction = MARKER_READING;
}
break;
@@ -679,7 +679,7 @@ BOOL GIFReader::ProcessGIF()
// Image-Descriptor lesen
case( LOCAL_HEADER_READING ):
{
- if( ( bRead = ReadLocalHeader() ) == TRUE )
+ if( ( bRead = ReadLocalHeader() ) == sal_True )
{
nYAcc = nImageX = nImageY = 0;
eActAction = FIRST_BLOCK_READING;
@@ -691,20 +691,20 @@ BOOL GIFReader::ProcessGIF()
// ersten Datenblock lesen
case( FIRST_BLOCK_READING ):
{
- BYTE cDataSize;
+ sal_uInt8 cDataSize;
rIStm >> cDataSize;
if( rIStm.IsEof() )
eActAction = ABORT_READING;
else if( cDataSize > 12 )
- bStatus = FALSE;
+ bStatus = sal_False;
else if( NO_PENDING( rIStm ) )
{
- bRead = TRUE;
+ bRead = sal_True;
pDecomp = new GIFLZWDecompressor( cDataSize );
eActAction = NEXT_BLOCK_READING;
- bOverreadBlock = FALSE;
+ bOverreadBlock = sal_False;
}
else
eActAction = FIRST_BLOCK_READING;
@@ -714,20 +714,20 @@ BOOL GIFReader::ProcessGIF()
// naechsten Datenblock lesen
case( NEXT_BLOCK_READING ):
{
- USHORT nLastX = nImageX;
- USHORT nLastY = nImageY;
- ULONG nRet = ReadNextBlock();
+ sal_uInt16 nLastX = nImageX;
+ sal_uInt16 nLastY = nImageY;
+ sal_uLong nRet = ReadNextBlock();
// Return: 0:Pending / 1:OK; / 2:OK und letzter Block: / 3:EOI / 4:HardAbort
if( nRet )
{
- bRead = TRUE;
+ bRead = sal_True;
if ( nRet == 1UL )
{
- bImGraphicReady = TRUE;
+ bImGraphicReady = sal_True;
eActAction = NEXT_BLOCK_READING;
- bOverreadBlock = FALSE;
+ bOverreadBlock = sal_False;
}
else
{
@@ -741,7 +741,7 @@ BOOL GIFReader::ProcessGIF()
else if( nRet == 3UL )
{
eActAction = NEXT_BLOCK_READING;
- bOverreadBlock = TRUE;
+ bOverreadBlock = sal_True;
}
else
{
@@ -763,7 +763,7 @@ BOOL GIFReader::ProcessGIF()
// ein Fehler trat auf
case( ABORT_READING ):
{
- bEnd = TRUE;
+ bEnd = sal_True;
eActAction = END_READING;
}
break;
@@ -787,7 +787,7 @@ ReadState GIFReader::ReadGIF( Graphic& rGraphic )
{
ReadState eReadState;
- bStatus = TRUE;
+ bStatus = sal_True;
while( ProcessGIF() && ( eActAction != END_READING ) ) {}
@@ -824,12 +824,12 @@ ReadState GIFReader::ReadGIF( Graphic& rGraphic )
// - ImportGIF -
// -------------
-BOOL ImportGIF( SvStream & rStm, Graphic& rGraphic )
+sal_Bool ImportGIF( SvStream & rStm, Graphic& rGraphic )
{
GIFReader* pGIFReader = (GIFReader*) rGraphic.GetContext();
- USHORT nOldFormat = rStm.GetNumberFormatInt();
+ sal_uInt16 nOldFormat = rStm.GetNumberFormatInt();
ReadState eReadState;
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -841,7 +841,7 @@ BOOL ImportGIF( SvStream & rStm, Graphic& rGraphic )
if( eReadState == GIFREAD_ERROR )
{
- bRet = FALSE;
+ bRet = sal_False;
delete pGIFReader;
}
else if( eReadState == GIFREAD_OK )
diff --git a/svtools/source/filter.vcl/ixbm/xbmread.cxx b/svtools/source/filter.vcl/ixbm/xbmread.cxx
index 9c7faaafa88c..5084f7267e46 100644
--- a/svtools/source/filter.vcl/ixbm/xbmread.cxx
+++ b/svtools/source/filter.vcl/ixbm/xbmread.cxx
@@ -44,7 +44,7 @@ XBMReader::XBMReader( SvStream& rStm ) :
nLastPos ( rStm.Tell() ),
nWidth ( 0 ),
nHeight ( 0 ),
- bStatus ( TRUE )
+ bStatus ( sal_True )
{
pHexTable = new short[ 256 ];
maUpperName = String::CreateFromAscii( "SVIXBM", 6 );
@@ -109,7 +109,7 @@ ByteString XBMReader::FindTokenLine( SvStream* pInStm, const char* pTok1,
long nPos2;
long nPos3;
- bStatus = FALSE;
+ bStatus = sal_False;
do
{
@@ -120,23 +120,23 @@ ByteString XBMReader::FindTokenLine( SvStream* pInStm, const char* pTok1,
{
if( ( nPos1 = aRet.Search( pTok1 ) ) != STRING_NOTFOUND )
{
- bStatus = TRUE;
+ bStatus = sal_True;
if( pTok2 )
{
- bStatus = FALSE;
+ bStatus = sal_False;
if( ( ( nPos2 = aRet.Search( pTok2 ) ) != STRING_NOTFOUND ) &&
( nPos2 > nPos1 ) )
{
- bStatus = TRUE;
+ bStatus = sal_True;
if( pTok3 )
{
- bStatus = FALSE;
+ bStatus = sal_False;
if( ( ( nPos3 = aRet.Search( pTok3 ) ) != STRING_NOTFOUND ) && ( nPos3 > nPos2 ) )
- bStatus = TRUE;
+ bStatus = sal_True;
}
}
}
@@ -199,16 +199,16 @@ long XBMReader::ParseDefine( const sal_Char* pDefine )
// ------------------------------------------------------------------------
-BOOL XBMReader::ParseData( SvStream* pInStm, const ByteString& aLastLine, XBMFormat eFormat )
+sal_Bool XBMReader::ParseData( SvStream* pInStm, const ByteString& aLastLine, XBMFormat eFormat )
{
ByteString aLine;
long nRow = 0;
long nCol = 0;
long nBits = ( eFormat == XBM10 ) ? 16 : 8;
long nBit;
- USHORT nValue;
- USHORT nDigits;
- BOOL bFirstLine = TRUE;
+ sal_uInt16 nValue;
+ sal_uInt16 nDigits;
+ sal_Bool bFirstLine = sal_True;
while( nRow < nHeight )
{
@@ -220,20 +220,20 @@ BOOL XBMReader::ParseData( SvStream* pInStm, const ByteString& aLastLine, XBMFor
if( (nPos = ( aLine = aLastLine ).Search( '{' ) ) != STRING_NOTFOUND )
aLine.Erase( 0, nPos + 1 );
- bFirstLine = FALSE;
+ bFirstLine = sal_False;
}
else if( !pInStm->ReadLine( aLine ) )
break;
if( aLine.Len() )
{
- const USHORT nCount = aLine.GetTokenCount( ',' );
+ const sal_uInt16 nCount = aLine.GetTokenCount( ',' );
- for( USHORT i = 0; ( i < nCount ) && ( nRow < nHeight ); i++ )
+ for( sal_uInt16 i = 0; ( i < nCount ) && ( nRow < nHeight ); i++ )
{
const ByteString aToken( aLine.GetToken( i, ',' ) );
const xub_StrLen nLen = aToken.Len();
- BOOL bProcessed = FALSE;
+ sal_Bool bProcessed = sal_False;
nBit = nDigits = nValue = 0;
@@ -246,11 +246,11 @@ BOOL XBMReader::ParseData( SvStream* pInStm, const ByteString& aLastLine, XBMFor
{
nValue = ( nValue << 4 ) + nTable;
nDigits++;
- bProcessed = TRUE;
+ bProcessed = sal_True;
}
else if( ( nTable < 0 ) && nDigits )
{
- bProcessed = TRUE;
+ bProcessed = sal_True;
break;
}
}
@@ -267,7 +267,7 @@ BOOL XBMReader::ParseData( SvStream* pInStm, const ByteString& aLastLine, XBMFor
}
}
- return TRUE;
+ return sal_True;
}
// ------------------------------------------------------------------------
@@ -275,7 +275,7 @@ BOOL XBMReader::ParseData( SvStream* pInStm, const ByteString& aLastLine, XBMFor
ReadState XBMReader::ReadXBM( Graphic& rGraphic )
{
ReadState eReadState;
- BYTE cDummy;
+ sal_uInt8 cDummy;
// sehen, ob wir _alles_ lesen koennen
rIStm.Seek( STREAM_SEEK_TO_END );
@@ -289,7 +289,7 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic )
int nValue;
rIStm.Seek( nLastPos );
- bStatus = FALSE;
+ bStatus = sal_False;
aLine = FindTokenLine( &rIStm, "#define", "_width" );
if ( bStatus )
@@ -308,7 +308,7 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic )
}
}
else
- bStatus = FALSE;
+ bStatus = sal_False;
if ( bStatus )
{
@@ -326,7 +326,7 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic )
else if ( aLine.Search( "char" ) != STRING_NOTFOUND )
eFormat = XBM11;
else
- bStatus = FALSE;
+ bStatus = sal_False;
if ( bStatus && nWidth && nHeight )
{
@@ -340,7 +340,7 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic )
bStatus = ParseData( &rIStm, aLine, eFormat );
}
else
- bStatus = FALSE;
+ bStatus = sal_False;
}
}
}
@@ -372,11 +372,11 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic )
// - ImportXBM -
// -------------
-BOOL ImportXBM( SvStream& rStm, Graphic& rGraphic )
+sal_Bool ImportXBM( SvStream& rStm, Graphic& rGraphic )
{
XBMReader* pXBMReader = (XBMReader*) rGraphic.GetContext();
ReadState eReadState;
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( !pXBMReader )
pXBMReader = new XBMReader( rStm );
@@ -386,7 +386,7 @@ BOOL ImportXBM( SvStream& rStm, Graphic& rGraphic )
if( eReadState == XBMREAD_ERROR )
{
- bRet = FALSE;
+ bRet = sal_False;
delete pXBMReader;
}
else if( eReadState == XBMREAD_OK )
diff --git a/svtools/source/filter.vcl/ixpm/rgbtable.hxx b/svtools/source/filter.vcl/ixpm/rgbtable.hxx
index afdab883b369..054e1e86b064 100644
--- a/svtools/source/filter.vcl/ixpm/rgbtable.hxx
+++ b/svtools/source/filter.vcl/ixpm/rgbtable.hxx
@@ -28,9 +28,9 @@
struct XPMRGBTab
{
const char* name;
- BYTE red;
- BYTE green;
- BYTE blue;
+ sal_uInt8 red;
+ sal_uInt8 green;
+ sal_uInt8 blue;
};
static XPMRGBTab pRGBTable[] = {
diff --git a/svtools/source/filter.vcl/ixpm/xpmread.cxx b/svtools/source/filter.vcl/ixpm/xpmread.cxx
index 7575c94e3ed9..425ed6323bcc 100644
--- a/svtools/source/filter.vcl/ixpm/xpmread.cxx
+++ b/svtools/source/filter.vcl/ixpm/xpmread.cxx
@@ -51,8 +51,8 @@ XPMReader::XPMReader( SvStream& rStm ) :
mnHeight ( 0 ),
mnColors ( 0 ),
mnCpp ( 0 ),
- mbTransparent ( FALSE ),
- mbStatus ( TRUE ),
+ mbTransparent ( sal_False ),
+ mbStatus ( sal_True ),
mnStatus ( 0 ),
mnIdentifier ( XPMIDENTIFIER ),
mcThisByte ( 0 ),
@@ -80,7 +80,7 @@ XPMReader::~XPMReader()
ReadState XPMReader::ReadXPM( Graphic& rGraphic )
{
ReadState eReadState;
- BYTE cDummy;
+ sal_uInt8 cDummy;
// sehen, ob wir _alles_ lesen koennen
mrIStm.Seek( STREAM_SEEK_TO_END );
@@ -91,14 +91,14 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic )
if ( mrIStm.GetError() != ERRCODE_IO_PENDING )
{
mrIStm.Seek( mnLastPos );
- mbStatus = TRUE;
+ mbStatus = sal_True;
if ( mbStatus )
{
- mpStringBuf = new BYTE [ XPMSTRINGBUF ];
- mpTempBuf = new BYTE [ XPMTEMPBUFSIZE ];
+ mpStringBuf = new sal_uInt8 [ XPMSTRINGBUF ];
+ mpTempBuf = new sal_uInt8 [ XPMTEMPBUFSIZE ];
- if ( ( mbStatus = ImplGetString() ) == TRUE )
+ if ( ( mbStatus = ImplGetString() ) == sal_True )
{
mnIdentifier = XPMVALUES; // Bitmap informationen einholen
mnWidth = ImplGetULONG( 0 );
@@ -118,14 +118,14 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic )
// Farbe: ( mnCpp )Byte(s)-> ASCII Eintrag der der Farbe zugeordnet ist
// 1 Byte -> 0xff wenn Farbe transparent ist
// 3 Bytes -> RGB Wert der Farbe
- mpColMap = new BYTE[ mnColors * ( 4 + mnCpp ) ];
+ mpColMap = new sal_uInt8[ mnColors * ( 4 + mnCpp ) ];
if ( mpColMap )
{
- for ( ULONG i = 0; i < mnColors; i++ )
+ for ( sal_uLong i = 0; i < mnColors; i++ )
{
- if ( ImplGetColor( i ) == FALSE )
+ if ( ImplGetColor( i ) == sal_False )
{
- mbStatus = FALSE;
+ mbStatus = sal_False;
break;
}
}
@@ -149,35 +149,35 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic )
maBmp = Bitmap( Size( mnWidth, mnHeight ), nBits );
mpAcc = maBmp.AcquireWriteAccess();
- // mbTransparent ist TRUE wenn mindestens eine Farbe Transparent ist
+ // mbTransparent ist sal_True wenn mindestens eine Farbe Transparent ist
if ( mbTransparent )
{
maMaskBmp = Bitmap( Size( mnWidth, mnHeight ), 1 );
if ( ( mpMaskAcc = maMaskBmp.AcquireWriteAccess() ) == NULL )
- mbStatus = FALSE;
+ mbStatus = sal_False;
}
if( mpAcc && mbStatus )
{
- ULONG i;
+ sal_uLong i;
if ( mnColors <=256 ) // palette is only needed by using less than 257
{ // colors
- BYTE* pPtr = &mpColMap[mnCpp];
+ sal_uInt8* pPtr = &mpColMap[mnCpp];
for ( i = 0; i < mnColors; i++ )
{
- mpAcc->SetPaletteColor( (BYTE)i, Color( pPtr[1], pPtr[2], pPtr[3] ) );
+ mpAcc->SetPaletteColor( (sal_uInt8)i, Color( pPtr[1], pPtr[2], pPtr[3] ) );
pPtr += ( mnCpp + 4 );
}
// using 2 charakters per pixel and less than 257 Colors we speed up
if ( mnCpp == 2 ) // by using a 64kb indexing table
{
- mpFastColorTable = new BYTE[ 256 * 256 ];
+ mpFastColorTable = new sal_uInt8[ 256 * 256 ];
for ( pPtr = mpColMap, i = 0; i < mnColors; i++, pPtr += mnCpp + 4 )
{
- ULONG j = pPtr[ 0 ] << 8;
+ sal_uLong j = pPtr[ 0 ] << 8;
j += pPtr[ 1 ];
- mpFastColorTable[ j ] = (BYTE)i;
+ mpFastColorTable[ j ] = (sal_uInt8)i;
}
}
}
@@ -185,9 +185,9 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic )
mnIdentifier = XPMPIXELS;
for ( i = 0; i < mnHeight; i++ )
{
- if ( ImplGetScanLine( i ) == FALSE )
+ if ( ImplGetScanLine( i ) == sal_False )
{
- mbStatus = FALSE;
+ mbStatus = sal_False;
break;
}
}
@@ -238,17 +238,17 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic )
// ------------------------------------------------------------------------
// ImplGetColor ermittelt saemtliche Farbwerte,
-// die Rueckgabe ist TRUE wenn saemtliche Farben zugeordnet werden konnten
+// die Rueckgabe ist sal_True wenn saemtliche Farben zugeordnet werden konnten
-BOOL XPMReader::ImplGetColor( ULONG nNumb )
+sal_Bool XPMReader::ImplGetColor( sal_uLong nNumb )
{
- BYTE* pString = mpStringBuf;
- BYTE* pPtr = ( mpColMap + nNumb * ( 4 + mnCpp ) );
- BOOL bStatus = ImplGetString();
+ sal_uInt8* pString = mpStringBuf;
+ sal_uInt8* pPtr = ( mpColMap + nNumb * ( 4 + mnCpp ) );
+ sal_Bool bStatus = ImplGetString();
if ( bStatus )
{
- for ( ULONG i = 0; i < mnCpp; i++ )
+ for ( sal_uLong i = 0; i < mnCpp; i++ )
*pPtr++ = *pString++;
bStatus = ImplGetColSub ( pPtr );
}
@@ -259,11 +259,11 @@ BOOL XPMReader::ImplGetColor( ULONG nNumb )
// ImpGetScanLine liest den String mpBufSize aus und schreibt die Pixel in die
// Bitmap. Der Parameter nY gibt die horizontale Position an.
-BOOL XPMReader::ImplGetScanLine( ULONG nY )
+sal_Bool XPMReader::ImplGetScanLine( sal_uLong nY )
{
- BOOL bStatus = ImplGetString();
- BYTE* pString = mpStringBuf;
- BYTE* pColor;
+ sal_Bool bStatus = ImplGetString();
+ sal_uInt8* pString = mpStringBuf;
+ sal_uInt8* pColor;
BitmapColor aWhite;
BitmapColor aBlack;
@@ -275,18 +275,18 @@ BOOL XPMReader::ImplGetScanLine( ULONG nY )
aBlack = mpMaskAcc->GetBestMatchingColor( Color( COL_BLACK ) );
}
if ( mnStringSize != ( mnWidth * mnCpp ))
- bStatus = FALSE;
+ bStatus = sal_False;
else
{
- ULONG i, j;
+ sal_uLong i, j;
if ( mpFastColorTable )
{
for ( i = 0; i < mnWidth; i++ )
{
j = (*pString++) << 8;
j += *pString++;
- BYTE k = (BYTE)mpFastColorTable[ j ];
- mpAcc->SetPixel( nY, i, BitmapColor( (BYTE)k ) );
+ sal_uInt8 k = (sal_uInt8)mpFastColorTable[ j ];
+ mpAcc->SetPixel( nY, i, BitmapColor( (sal_uInt8)k ) );
if ( mpMaskAcc )
mpMaskAcc->SetPixel( nY, i,
@@ -298,12 +298,12 @@ BOOL XPMReader::ImplGetScanLine( ULONG nY )
pColor = mpColMap;
for ( j = 0; j < mnColors; j++ )
{
- if ( ImplCompare( pString, pColor, mnCpp, XPMCASESENSITIVE ) == TRUE )
+ if ( ImplCompare( pString, pColor, mnCpp, XPMCASESENSITIVE ) == sal_True )
{
if ( mnColors > 256 )
mpAcc->SetPixel( nY, i, Color ( pColor[3], pColor[4], pColor[5] ) );
else
- mpAcc->SetPixel( nY, i, BitmapColor( (BYTE) j ) );
+ mpAcc->SetPixel( nY, i, BitmapColor( (sal_uInt8) j ) );
if ( mpMaskAcc )
mpMaskAcc->SetPixel( nY, i, (
@@ -326,11 +326,11 @@ BOOL XPMReader::ImplGetScanLine( ULONG nY )
// wurde eine Farbe gefunden wird an pDest[1]..pDest[2] der RGB wert geschrieben
// pDest[0] enthaelt 0xff wenn die Farbe transparent ist sonst 0
-BOOL XPMReader::ImplGetColSub( BYTE* pDest )
+sal_Bool XPMReader::ImplGetColSub( sal_uInt8* pDest )
{
unsigned char cTransparent[] = "None";
- BOOL bColStatus = FALSE;
+ sal_Bool bColStatus = sal_False;
if ( ImplGetColKey( 'c' ) || ImplGetColKey( 'm' ) || ImplGetColKey( 'g' ) )
{
@@ -338,7 +338,7 @@ BOOL XPMReader::ImplGetColSub( BYTE* pDest )
if ( *mpPara == '#' )
{
*pDest++ = 0;
- bColStatus = TRUE;
+ bColStatus = sal_True;
switch ( mnParaSize )
{
case 25 :
@@ -351,7 +351,7 @@ BOOL XPMReader::ImplGetColSub( BYTE* pDest )
ImplGetRGBHex ( pDest, 0 );
break;
default:
- bColStatus = FALSE;
+ bColStatus = sal_False;
break;
}
}
@@ -359,14 +359,14 @@ BOOL XPMReader::ImplGetColSub( BYTE* pDest )
else if ( ImplCompare( &cTransparent[0], mpPara, 4 ))
{
*pDest++ = 0xff;
- bColStatus = TRUE;
- mbTransparent = TRUE;
+ bColStatus = sal_True;
+ mbTransparent = sal_True;
}
// last we will try to get the colorname
else if ( mnParaSize > 2 ) // name must enlarge the minimum size
{
- ULONG i = 0;
- while ( TRUE )
+ sal_uLong i = 0;
+ while ( sal_True )
{
if ( pRGBTable[ i ].name == NULL )
break;
@@ -375,7 +375,7 @@ BOOL XPMReader::ImplGetColSub( BYTE* pDest )
if ( ImplCompare ( (unsigned char*)pRGBTable[ i ].name,
mpPara, mnParaSize, XPMCASENONSENSITIVE ) )
{
- bColStatus = TRUE;
+ bColStatus = sal_True;
*pDest++ = 0;
*pDest++ = pRGBTable[ i ].red;
*pDest++ = pRGBTable[ i ].green;
@@ -391,11 +391,11 @@ BOOL XPMReader::ImplGetColSub( BYTE* pDest )
// ------------------------------------------------------------------------
// ImplGetColKey durchsuch den String mpStringBuf nach einem Parameter 'nKey'
-// und gibt einen BOOL zurueck. ( wenn TRUE werden mpPara und mnParaSize gesetzt )
+// und gibt einen sal_Bool zurueck. ( wenn sal_True werden mpPara und mnParaSize gesetzt )
-BOOL XPMReader::ImplGetColKey( BYTE nKey )
+sal_Bool XPMReader::ImplGetColKey( sal_uInt8 nKey )
{
- BYTE nTemp, nPrev = ' ';
+ sal_uInt8 nTemp, nPrev = ' ';
mpPara = mpStringBuf + mnCpp + 1;
mnParaSize = 0;
@@ -430,7 +430,7 @@ BOOL XPMReader::ImplGetColKey( BYTE nKey )
}
}
}
- return ( mnParaSize ) ? TRUE : FALSE;
+ return ( mnParaSize ) ? sal_True : sal_False;
}
// ------------------------------------------------------------------------
@@ -442,12 +442,12 @@ BOOL XPMReader::ImplGetColKey( BYTE nKey )
// 6 : '#12345678abcdefab12345678' " " " "
-void XPMReader::ImplGetRGBHex( BYTE* pDest,ULONG nAdd )
+void XPMReader::ImplGetRGBHex( sal_uInt8* pDest,sal_uLong nAdd )
{
- BYTE* pPtr = mpPara+1;
- BYTE nHex, nTemp;
+ sal_uInt8* pPtr = mpPara+1;
+ sal_uInt8 nHex, nTemp;
- for ( ULONG i = 0; i < 3; i++ )
+ for ( sal_uLong i = 0; i < 3; i++ )
{
nHex = (*pPtr++) - '0';
if ( nHex > 9 )
@@ -459,24 +459,24 @@ void XPMReader::ImplGetRGBHex( BYTE* pDest,ULONG nAdd )
nHex = ( nHex << 4 ) + nTemp;
pPtr += nAdd;
- *pDest++ = (BYTE)nHex;
+ *pDest++ = (sal_uInt8)nHex;
}
}
// ------------------------------------------------------------------------
// ImplGetUlong gibt den wert einer bis zu 6stelligen ASCII-Dezimalzahl zurueck.
-ULONG XPMReader::ImplGetULONG( ULONG nPara )
+sal_uLong XPMReader::ImplGetULONG( sal_uLong nPara )
{
if ( ImplGetPara ( nPara ) )
{
- ULONG nRetValue = 0;
- BYTE* pPtr = mpPara;
+ sal_uLong nRetValue = 0;
+ sal_uInt8* pPtr = mpPara;
if ( ( mnParaSize > 6 ) || ( mnParaSize == 0 ) ) return 0;
- for ( ULONG i = 0; i < mnParaSize; i++ )
+ for ( sal_uLong i = 0; i < mnParaSize; i++ )
{
- BYTE j = (*pPtr++) - 48;
+ sal_uInt8 j = (*pPtr++) - 48;
if ( j > 9 ) return 0; // ascii is invalid
nRetValue*=10;
nRetValue+=j;
@@ -488,28 +488,28 @@ ULONG XPMReader::ImplGetULONG( ULONG nPara )
// ------------------------------------------------------------------------
-BOOL XPMReader::ImplCompare( BYTE* pSource, BYTE* pDest, ULONG nSize, ULONG nMode )
+sal_Bool XPMReader::ImplCompare( sal_uInt8* pSource, sal_uInt8* pDest, sal_uLong nSize, sal_uLong nMode )
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if ( nMode == XPMCASENONSENSITIVE )
{
- for ( ULONG i = 0; i < nSize; i++ )
+ for ( sal_uLong i = 0; i < nSize; i++ )
{
if ( ( pSource[i]&~0x20 ) != ( pDest[i]&~0x20 ) )
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
}
else
{
- for ( ULONG i = 0; i < nSize; i++ )
+ for ( sal_uLong i = 0; i < nSize; i++ )
{
if ( pSource[i] != pDest[i] )
{
- bRet = FALSE;
+ bRet = sal_False;
break;
}
}
@@ -520,15 +520,15 @@ BOOL XPMReader::ImplCompare( BYTE* pSource, BYTE* pDest, ULONG nSize, ULONG nMod
// ------------------------------------------------------------------------
// ImplGetPara versucht den nNumb ( 0...x ) Parameter aus mpStringBuf zu ermitteln.
// Ein Parameter ist durch Spaces oder Tabs von den anderen getrennt.
-// Konnte der Parameter gefunden werden ist der Rueckgabewert TRUE und mpPara + mnParaSize
+// Konnte der Parameter gefunden werden ist der Rueckgabewert sal_True und mpPara + mnParaSize
// werden gesetzt.
-BOOL XPMReader::ImplGetPara ( ULONG nNumb )
+sal_Bool XPMReader::ImplGetPara ( sal_uLong nNumb )
{
- BYTE nByte;
- ULONG pSize = 0;
- BYTE* pPtr = mpStringBuf;
- ULONG nCount = 0;
+ sal_uInt8 nByte;
+ sal_uLong pSize = 0;
+ sal_uInt8* pPtr = mpStringBuf;
+ sal_uLong nCount = 0;
if ( ( *pPtr != ' ' ) && ( *pPtr != 0x09 ) )
{
@@ -570,7 +570,7 @@ BOOL XPMReader::ImplGetPara ( ULONG nNumb )
pSize++;
pPtr++;
}
- return ( ( nCount == nNumb ) && ( mpPara ) ) ? TRUE : FALSE;
+ return ( ( nCount == nNumb ) && ( mpPara ) ) ? sal_True : sal_False;
}
// ------------------------------------------------------------------------
@@ -578,10 +578,10 @@ BOOL XPMReader::ImplGetPara ( ULONG nNumb )
// mnStringSize enthaelt die Groesse des gelesenen Strings.
// Bemerkungen wie '//' und '/*.....*/' werden uebersprungen.
-BOOL XPMReader::ImplGetString( void )
+sal_Bool XPMReader::ImplGetString( void )
{
- BYTE sID[] = "/* XPM */";
- BYTE* pString = mpStringBuf;
+ sal_uInt8 sID[] = "/* XPM */";
+ sal_uInt8* pString = mpStringBuf;
mnStringSize = 0;
mpStringBuf[0] = 0;
@@ -600,13 +600,13 @@ BOOL XPMReader::ImplGetString( void )
{
if ( mnTempAvail <= 50 )
{
- mbStatus = FALSE; // file is too short to be a correct XPM format
+ mbStatus = sal_False; // file is too short to be a correct XPM format
break;
}
for ( int i = 0; i < 9; i++ ) // searching for "/* XPM */"
if ( *mpTempPtr++ != sID[i] )
{
- mbStatus = FALSE;
+ mbStatus = sal_False;
break;
}
mnTempAvail-=9;
@@ -638,7 +638,7 @@ BOOL XPMReader::ImplGetString( void )
}
if ( mnStringSize >= ( XPMSTRINGBUF - 1 ) )
{
- mbStatus = FALSE;
+ mbStatus = sal_False;
break;
}
*pString++ = mcThisByte;
@@ -676,11 +676,11 @@ BOOL XPMReader::ImplGetString( void )
// - ImportXPM -
// -------------
-BOOL ImportXPM( SvStream& rStm, Graphic& rGraphic )
+sal_Bool ImportXPM( SvStream& rStm, Graphic& rGraphic )
{
XPMReader* pXPMReader = (XPMReader*) rGraphic.GetContext();
ReadState eReadState;
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( !pXPMReader )
pXPMReader = new XPMReader( rStm );
@@ -690,7 +690,7 @@ BOOL ImportXPM( SvStream& rStm, Graphic& rGraphic )
if( eReadState == XPMREAD_ERROR )
{
- bRet = FALSE;
+ bRet = sal_False;
delete pXPMReader;
}
else if( eReadState == XPMREAD_OK )
diff --git a/svtools/source/filter.vcl/jpeg/jpeg.cxx b/svtools/source/filter.vcl/jpeg/jpeg.cxx
index a2de92171af3..dff6ec8ff51f 100644
--- a/svtools/source/filter.vcl/jpeg/jpeg.cxx
+++ b/svtools/source/filter.vcl/jpeg/jpeg.cxx
@@ -32,12 +32,10 @@
extern "C"
{
- #define INT32 JPEG_INT32
#include "stdio.h"
#include "jpeg.h"
#include "jpeglib.h"
#include "jerror.h"
- #undef INT32
}
#define _JPEGPRIVATE
@@ -125,7 +123,7 @@ extern "C" int empty_output_buffer (j_compress_ptr cinfo)
dest->pub.next_output_byte = dest->buffer;
dest->pub.free_in_buffer = BUF_SIZE;
- return TRUE;
+ return sal_True;
}
extern "C" void term_destination (j_compress_ptr cinfo)
@@ -189,7 +187,7 @@ extern "C" void init_source (j_decompress_ptr cinfo)
* but we don't clear the input buffer.
* This is correct behavior for reading a series of images from one source.
*/
- src->start_of_file = TRUE;
+ src->start_of_file = sal_True;
}
long StreamRead( SvStream* pSvStm, void* pBuffer, long nBufferSize )
@@ -238,9 +236,9 @@ extern "C" int fill_input_buffer (j_decompress_ptr cinfo)
src->pub.next_input_byte = src->buffer;
src->pub.bytes_in_buffer = nbytes;
- src->start_of_file = FALSE;
+ src->start_of_file = sal_False;
- return TRUE;
+ return sal_True;
}
extern "C" void skip_input_data (j_decompress_ptr cinfo, long num_bytes)
@@ -255,7 +253,7 @@ extern "C" void skip_input_data (j_decompress_ptr cinfo, long num_bytes)
while (num_bytes > (long) src->pub.bytes_in_buffer) {
num_bytes -= (long) src->pub.bytes_in_buffer;
(void) fill_input_buffer(cinfo);
- /* note we assume that fill_input_buffer will never return FALSE,
+ /* note we assume that fill_input_buffer will never return sal_False,
* so suspension need not be handled.
*/
}
@@ -350,9 +348,9 @@ void* JPEGReader::CreateBitmap( void* pParam )
{
BitmapPalette aGrayPal( 256 );
- for( USHORT n = 0; n < 256; n++ )
+ for( sal_uInt16 n = 0; n < 256; n++ )
{
- const BYTE cGray = (BYTE) n;
+ const sal_uInt8 cGray = (sal_uInt8) n;
aGrayPal[ n ] = BitmapColor( cGray, cGray, cGray );
}
@@ -386,7 +384,7 @@ void* JPEGReader::CreateBitmap( void* pParam )
{
long nAlignedWidth;
- const ULONG nFormat = pAcc->GetScanlineFormat();
+ const sal_uLong nFormat = pAcc->GetScanlineFormat();
if(
( bGray && ( BMP_FORMAT_8BIT_PAL == nFormat ) ) ||
@@ -400,7 +398,7 @@ void* JPEGReader::CreateBitmap( void* pParam )
else
{
nAlignedWidth = AlignedWidth4Bytes( aSize.Width() * ( bGray ? 8 : 24 ) );
- ((JPEGCreateBitmapParam*)pParam)->bTopDown = TRUE;
+ ((JPEGCreateBitmapParam*)pParam)->bTopDown = sal_True;
pBmpBuf = pBuffer = rtl_allocateMemory( nAlignedWidth * aSize.Height() );
}
((JPEGCreateBitmapParam*)pParam)->nAlignedWidth = nAlignedWidth;
@@ -425,9 +423,9 @@ void JPEGReader::FillBitmap()
{
BitmapColor* pCols = new BitmapColor[ 256 ];
- for( USHORT n = 0; n < 256; n++ )
+ for( sal_uInt16 n = 0; n < 256; n++ )
{
- const BYTE cGray = (BYTE) n;
+ const sal_uInt8 cGray = (sal_uInt8) n;
pCols[ n ] = pAcc->GetBestMatchingColor( BitmapColor( cGray, cGray, cGray ) );
}
@@ -435,7 +433,7 @@ void JPEGReader::FillBitmap()
for( long nY = 0L; nY < nHeight; nY++ )
{
- pTmp = (BYTE*) pBuffer + nY * nAlignedWidth;
+ pTmp = (sal_uInt8*) pBuffer + nY * nAlignedWidth;
for( long nX = 0L; nX < nWidth; nX++ )
pAcc->SetPixel( nY, nX, pCols[ *pTmp++ ] );
@@ -449,7 +447,7 @@ void JPEGReader::FillBitmap()
for( long nY = 0L; nY < nHeight; nY++ )
{
- pTmp = (BYTE*) pBuffer + nY * nAlignedWidth;
+ pTmp = (sal_uInt8*) pBuffer + nY * nAlignedWidth;
for( long nX = 0L; nX < nWidth; nX++ )
{
@@ -515,8 +513,8 @@ ReadState JPEGReader::Read( Graphic& rGraphic )
long nEndPos;
long nLines;
ReadState eReadState;
- BOOL bRet = FALSE;
- BYTE cDummy;
+ sal_Bool bRet = sal_False;
+ sal_uInt8 cDummy;
#if 1 // TODO: is it possible to get rid of this seek to the end?
// check if the stream's end is already available
@@ -562,10 +560,10 @@ ReadState JPEGReader::Read( Graphic& rGraphic )
else
rGraphic = aBmp;
- bRet = TRUE;
+ bRet = sal_True;
}
else if( rIStm.GetError() == ERRCODE_IO_PENDING )
- bRet = TRUE;
+ bRet = sal_True;
// Status setzen ( Pending hat immer Vorrang )
if( rIStm.GetError() == ERRCODE_IO_PENDING )
@@ -629,13 +627,13 @@ void* JPEGWriter::GetScanline( long nY )
{
BitmapColor aColor;
long nWidth = pAcc->Width();
- BYTE* pTmp = pBuffer;
+ sal_uInt8* pTmp = pBuffer;
if( pAcc->HasPalette() )
{
for( long nX = 0L; nX < nWidth; nX++ )
{
- aColor = pAcc->GetPaletteColor( (BYTE) pAcc->GetPixel( nY, nX ) );
+ aColor = pAcc->GetPaletteColor( (sal_uInt8) pAcc->GetPixel( nY, nX ) );
*pTmp++ = aColor.GetRed();
if ( bGreys )
continue;
@@ -665,9 +663,9 @@ void* JPEGWriter::GetScanline( long nY )
// ------------------------------------------------------------------------
-BOOL JPEGWriter::Write( const Graphic& rGraphic )
+sal_Bool JPEGWriter::Write( const Graphic& rGraphic )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( xStatusIndicator.is() )
{
@@ -696,7 +694,7 @@ BOOL JPEGWriter::Write( const Graphic& rGraphic )
BitmapColor aColor;
for( long nX = 0L; bIsGrey && ( nX < nWidth ); nX++ )
{
- aColor = pAcc->HasPalette() ? pAcc->GetPaletteColor( (BYTE) pAcc->GetPixel( nY, nX ) )
+ aColor = pAcc->HasPalette() ? pAcc->GetPaletteColor( (sal_uInt8) pAcc->GetPixel( nY, nX ) )
: pAcc->GetPixel( nY, nX );
bIsGrey = ( aColor.GetRed() == aColor.GetGreen() ) && ( aColor.GetRed() == aColor.GetBlue() );
}
@@ -713,11 +711,11 @@ BOOL JPEGWriter::Write( const Graphic& rGraphic )
bNative = ( pAcc->GetScanlineFormat() == BMP_FORMAT_24BIT_TC_RGB );
if( !bNative )
- pBuffer = new BYTE[ AlignedWidth4Bytes( bGreys ? pAcc->Width() * 8L : pAcc->Width() * 24L ) ];
+ pBuffer = new sal_uInt8[ AlignedWidth4Bytes( bGreys ? pAcc->Width() * 8L : pAcc->Width() * 24L ) ];
JPEGCallbackStruct aCallbackData;
aCallbackData.xStatusIndicator = xStatusIndicator;
- bRet = (BOOL) WriteJPEG( this, &rOStm, pAcc->Width(), pAcc->Height(), bGreys, nQuality, &aCallbackData );
+ bRet = (sal_Bool) WriteJPEG( this, &rOStm, pAcc->Width(), pAcc->Height(), bGreys, nQuality, &aCallbackData );
delete[] pBuffer;
pBuffer = NULL;
@@ -735,11 +733,11 @@ BOOL JPEGWriter::Write( const Graphic& rGraphic )
// - ImportJPEG -
// --------------
-BOOL ImportJPEG( SvStream& rStm, Graphic& rGraphic, void* pCallerData, sal_Int32 nImportFlags )
+sal_Bool ImportJPEG( SvStream& rStm, Graphic& rGraphic, void* pCallerData, sal_Int32 nImportFlags )
{
JPEGReader* pJPEGReader = (JPEGReader*) rGraphic.GetContext();
ReadState eReadState;
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if( !pJPEGReader )
pJPEGReader = new JPEGReader( rStm, pCallerData, ( nImportFlags & GRFILTER_I_FLAGS_SET_LOGSIZE_FOR_JPEG ) != 0 );
@@ -754,7 +752,7 @@ BOOL ImportJPEG( SvStream& rStm, Graphic& rGraphic, void* pCallerData, sal_Int32
if( eReadState == JPEGREAD_ERROR )
{
- bRet = FALSE;
+ bRet = sal_False;
delete pJPEGReader;
}
else if( eReadState == JPEGREAD_OK )
@@ -769,7 +767,7 @@ BOOL ImportJPEG( SvStream& rStm, Graphic& rGraphic, void* pCallerData, sal_Int32
// - ExportJPEG -
// --------------
-BOOL ExportJPEG( SvStream& rOStm, const Graphic& rGraphic,
+sal_Bool ExportJPEG( SvStream& rOStm, const Graphic& rGraphic,
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData,
bool* pExportWasGrey
)
diff --git a/svtools/source/filter.vcl/jpeg/jpeg.h b/svtools/source/filter.vcl/jpeg/jpeg.h
index 82a2f80a838c..ca9b294d2f9d 100644
--- a/svtools/source/filter.vcl/jpeg/jpeg.h
+++ b/svtools/source/filter.vcl/jpeg/jpeg.h
@@ -50,7 +50,6 @@ struct JPEGCreateBitmapParam
};
typedef struct my_error_mgr* my_error_ptr;
-typedef unsigned char BYTE;
typedef unsigned char* HPBYTE;
void* JPEGMalloc( size_t size );
diff --git a/svtools/source/filter.vcl/jpeg/jpegc.c b/svtools/source/filter.vcl/jpeg/jpegc.c
index 29b4749a7b51..8d3a82a86ef3 100644
--- a/svtools/source/filter.vcl/jpeg/jpegc.c
+++ b/svtools/source/filter.vcl/jpeg/jpegc.c
@@ -100,13 +100,13 @@ void ReadJPEG( void* pJPEGReader, void* pIStm, long* pLines )
jpeg_create_decompress( &cinfo );
bDecompCreated = 1;
jpeg_svstream_src( &cinfo, pIStm );
- jpeg_read_header( &cinfo, TRUE );
+ jpeg_read_header( &cinfo, sal_True );
cinfo.scale_num = 1;
cinfo.scale_denom = 1;
cinfo.output_gamma = 1.0;
- cinfo.raw_data_out = FALSE;
- cinfo.quantize_colors = FALSE;
+ cinfo.raw_data_out = sal_False;
+ cinfo.quantize_colors = sal_False;
if ( cinfo.jpeg_color_space == JCS_YCbCr )
cinfo.out_color_space = JCS_RGB;
else if ( cinfo.jpeg_color_space == JCS_YCCK )
@@ -138,8 +138,8 @@ void ReadJPEG( void* pJPEGReader, void* pIStm, long* pLines )
if( cinfo.scale_denom > 1 )
{
cinfo.dct_method = JDCT_FASTEST;
- cinfo.do_fancy_upsampling = FALSE;
- cinfo.do_block_smoothing = FALSE;
+ cinfo.do_fancy_upsampling = sal_False;
+ cinfo.do_block_smoothing = sal_False;
}
}
@@ -253,12 +253,12 @@ long WriteJPEG( void* pJPEGWriter, void* pOStm,
}
jpeg_set_defaults( &cinfo );
- jpeg_set_quality( &cinfo, (int) nQualityPercent, FALSE );
+ jpeg_set_quality( &cinfo, (int) nQualityPercent, sal_False );
if ( ( nWidth > 128 ) || ( nHeight > 128 ) )
jpeg_simple_progression( &cinfo );
- jpeg_start_compress( &cinfo, TRUE );
+ jpeg_start_compress( &cinfo, sal_True );
for( nY = 0; nY < nHeight; nY++ )
{
diff --git a/svtools/source/filter.vcl/wmf/emfwr.cxx b/svtools/source/filter.vcl/wmf/emfwr.cxx
index f31fd4439e9f..d82f11cdce5a 100644
--- a/svtools/source/filter.vcl/wmf/emfwr.cxx
+++ b/svtools/source/filter.vcl/wmf/emfwr.cxx
@@ -168,18 +168,18 @@
// - EMFWriter -
// -------------
-BOOL EMFWriter::WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterConfigItem* pFilterConfigItem )
+sal_Bool EMFWriter::WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterConfigItem* pFilterConfigItem )
{
- const ULONG nHeaderPos = rOStm.Tell();
+ const sal_uLong nHeaderPos = rOStm.Tell();
- mpHandlesUsed = new BOOL[ MAXHANDLES ];
- memset( mpHandlesUsed, 0, MAXHANDLES * sizeof( BOOL ) );
+ mpHandlesUsed = new sal_Bool[ MAXHANDLES ];
+ memset( mpHandlesUsed, 0, MAXHANDLES * sizeof( sal_Bool ) );
mnHorTextAlign = mnHandleCount = mnLastPercent = mnRecordPos = mnRecordCount = 0;
mnLineHandle = mnFillHandle = mnTextHandle = HANDLE_INVALID;
- mbRecordOpen = FALSE;
+ mbRecordOpen = sal_False;
mpStm = &rOStm;
- maVDev.EnableOutput( FALSE );
+ maVDev.EnableOutput( sal_False );
maVDev.SetMapMode( rMtf.GetPrefMapMode() );
mpFilterConfigItem = pFilterConfigItem;
@@ -197,29 +197,29 @@ BOOL EMFWriter::WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterConfig
// set 100th mm map mode in EMF
ImplBeginRecord( WIN_EMR_SETMAPMODE );
- (*mpStm) << (INT32) MM_ANISOTROPIC;
+ (*mpStm) << (sal_Int32) MM_ANISOTROPIC;
ImplEndRecord();
ImplBeginRecord( WIN_EMR_SETVIEWPORTEXTEX );
- (*mpStm) << (INT32) maVDev.ImplGetDPIX() << (INT32) maVDev.ImplGetDPIY();
+ (*mpStm) << (sal_Int32) maVDev.ImplGetDPIX() << (sal_Int32) maVDev.ImplGetDPIY();
ImplEndRecord();
ImplBeginRecord( WIN_EMR_SETWINDOWEXTEX );
- (*mpStm) << (INT32) 2540 << (INT32) 2540;
+ (*mpStm) << (sal_Int32) 2540 << (sal_Int32) 2540;
ImplEndRecord();
ImplBeginRecord( WIN_EMR_SETVIEWPORTORGEX );
- (*mpStm) << (INT32) 0 << (INT32) 0;
+ (*mpStm) << (sal_Int32) 0 << (sal_Int32) 0;
ImplEndRecord();
ImplBeginRecord( WIN_EMR_SETWINDOWORGEX );
- (*mpStm) << (INT32) 0 << (INT32) 0;
+ (*mpStm) << (sal_Int32) 0 << (sal_Int32) 0;
ImplEndRecord();
ImplWriteRasterOp( ROP_OVERPAINT );
ImplBeginRecord( WIN_EMR_SETBKMODE );
- (*mpStm) << (UINT32) 1; // TRANSPARENT
+ (*mpStm) << (sal_uInt32) 1; // TRANSPARENT
ImplEndRecord();
// write emf data
@@ -233,17 +233,17 @@ BOOL EMFWriter::WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterConfig
// write header
- const ULONG nEndPos = mpStm->Tell(); mpStm->Seek( nHeaderPos );
-
- (*mpStm) << (UINT32) 0x00000001 << (UINT32) 108 //use [MS-EMF 2.2.11] HeaderExtension2 Object
- << (INT32) 0 << (INT32) 0 << (INT32) ( aMtfSizePix.Width() - 1 ) << (INT32) ( aMtfSizePix.Height() - 1 )
- << (INT32) 0 << (INT32) 0 << (INT32) ( aMtfSizeLog.Width() - 1 ) << (INT32) ( aMtfSizeLog.Height() - 1 )
- << (UINT32) 0x464d4520 << (UINT32) 0x10000 << (UINT32) ( nEndPos - nHeaderPos )
- << (UINT32) mnRecordCount << (UINT16) ( mnHandleCount + 1 ) << (UINT16) 0 << (UINT32) 0 << (UINT32) 0 << (UINT32) 0
- << (INT32) aMtfSizePix.Width() << (INT32) aMtfSizePix.Height()
- << (INT32) ( aMtfSizeLog.Width() / 100 ) << (INT32) ( aMtfSizeLog.Height() / 100 )
- << (UINT32) 0 << (UINT32) 0 << (UINT32) 0
- << (INT32) ( aMtfSizeLog.Width() * 10 ) << (INT32) ( aMtfSizeLog.Height() * 10 ); //use [MS-EMF 2.2.11] HeaderExtension2 Object
+ const sal_uLong nEndPos = mpStm->Tell(); mpStm->Seek( nHeaderPos );
+
+ (*mpStm) << (sal_uInt32) 0x00000001 << (sal_uInt32) 108 //use [MS-EMF 2.2.11] HeaderExtension2 Object
+ << (sal_Int32) 0 << (sal_Int32) 0 << (sal_Int32) ( aMtfSizePix.Width() - 1 ) << (sal_Int32) ( aMtfSizePix.Height() - 1 )
+ << (sal_Int32) 0 << (sal_Int32) 0 << (sal_Int32) ( aMtfSizeLog.Width() - 1 ) << (sal_Int32) ( aMtfSizeLog.Height() - 1 )
+ << (sal_uInt32) 0x464d4520 << (sal_uInt32) 0x10000 << (sal_uInt32) ( nEndPos - nHeaderPos )
+ << (sal_uInt32) mnRecordCount << (sal_uInt16) ( mnHandleCount + 1 ) << (sal_uInt16) 0 << (sal_uInt32) 0 << (sal_uInt32) 0 << (sal_uInt32) 0
+ << (sal_Int32) aMtfSizePix.Width() << (sal_Int32) aMtfSizePix.Height()
+ << (sal_Int32) ( aMtfSizeLog.Width() / 100 ) << (sal_Int32) ( aMtfSizeLog.Height() / 100 )
+ << (sal_uInt32) 0 << (sal_uInt32) 0 << (sal_uInt32) 0
+ << (sal_Int32) ( aMtfSizeLog.Width() * 10 ) << (sal_Int32) ( aMtfSizeLog.Height() * 10 ); //use [MS-EMF 2.2.11] HeaderExtension2 Object
mpStm->Seek( nEndPos );
delete[] mpHandlesUsed;
@@ -253,15 +253,15 @@ BOOL EMFWriter::WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterConfig
// -----------------------------------------------------------------------------
-ULONG EMFWriter::ImplAcquireHandle()
+sal_uLong EMFWriter::ImplAcquireHandle()
{
- ULONG nHandle = HANDLE_INVALID;
+ sal_uLong nHandle = HANDLE_INVALID;
- for( ULONG i = 0; i < MAXHANDLES && ( HANDLE_INVALID == nHandle ); i++ )
+ for( sal_uLong i = 0; i < MAXHANDLES && ( HANDLE_INVALID == nHandle ); i++ )
{
if( !mpHandlesUsed[ i ] )
{
- mpHandlesUsed[ i ] = TRUE;
+ mpHandlesUsed[ i ] = sal_True;
if( ( nHandle = i ) == mnHandleCount )
mnHandleCount++;
@@ -274,10 +274,10 @@ ULONG EMFWriter::ImplAcquireHandle()
// -----------------------------------------------------------------------------
-void EMFWriter::ImplReleaseHandle( ULONG nHandle )
+void EMFWriter::ImplReleaseHandle( sal_uLong nHandle )
{
DBG_ASSERT( nHandle && ( nHandle < MAXHANDLES ), "Handle out of range" );
- mpHandlesUsed[ nHandle - 1 ] = FALSE;
+ mpHandlesUsed[ nHandle - 1 ] = sal_False;
}
// -----------------------------------------------------------------------------
@@ -288,7 +288,7 @@ void EMFWriter::ImplBeginRecord( sal_uInt32 nType )
if( !mbRecordOpen )
{
- mbRecordOpen = TRUE;
+ mbRecordOpen = sal_True;
mnRecordPos = mpStm->Tell();
(*mpStm) << nType;
@@ -315,17 +315,17 @@ void EMFWriter::ImplEndRecord()
while( nFillBytes-- )
*mpStm << (sal_uInt8)0;
mnRecordCount++;
- mbRecordOpen = FALSE;
+ mbRecordOpen = sal_False;
}
}
// -----------------------------------------------------------------------------
-BOOL EMFWriter::ImplPrepareHandleSelect( sal_uInt32& rHandle, ULONG nSelectType )
+sal_Bool EMFWriter::ImplPrepareHandleSelect( sal_uInt32& rHandle, sal_uLong nSelectType )
{
if( rHandle != HANDLE_INVALID )
{
- UINT32 nStockObject = 0x80000000;
+ sal_uInt32 nStockObject = 0x80000000;
if( LINE_SELECT == nSelectType )
nStockObject |= 0x00000007;
@@ -410,7 +410,7 @@ void EMFWriter::ImplCheckTextAttr()
(*mpStm) << mnTextHandle;
ImplWriteExtent( -rFont.GetSize().Height() );
ImplWriteExtent( rFont.GetSize().Width() );
- (*mpStm) << (INT32) rFont.GetOrientation() << (INT32) rFont.GetOrientation();
+ (*mpStm) << (sal_Int32) rFont.GetOrientation() << (sal_Int32) rFont.GetOrientation();
switch( rFont.GetWeight() )
{
@@ -428,11 +428,11 @@ void EMFWriter::ImplCheckTextAttr()
}
(*mpStm) << nWeight;
- (*mpStm) << (BYTE) ( ( ITALIC_NONE == rFont.GetItalic() ) ? 0 : 1 );
- (*mpStm) << (BYTE) ( ( UNDERLINE_NONE == rFont.GetUnderline() ) ? 0 : 1 );
- (*mpStm) << (BYTE) ( ( STRIKEOUT_NONE == rFont.GetStrikeout() ) ? 0 : 1 );
- (*mpStm) << (BYTE) ( ( RTL_TEXTENCODING_SYMBOL == rFont.GetCharSet() ) ? 2 : 0 );
- (*mpStm) << (BYTE) 0 << (BYTE) 0 << (BYTE) 0;
+ (*mpStm) << (sal_uInt8) ( ( ITALIC_NONE == rFont.GetItalic() ) ? 0 : 1 );
+ (*mpStm) << (sal_uInt8) ( ( UNDERLINE_NONE == rFont.GetUnderline() ) ? 0 : 1 );
+ (*mpStm) << (sal_uInt8) ( ( STRIKEOUT_NONE == rFont.GetStrikeout() ) ? 0 : 1 );
+ (*mpStm) << (sal_uInt8) ( ( RTL_TEXTENCODING_SYMBOL == rFont.GetCharSet() ) ? 2 : 0 );
+ (*mpStm) << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0;
switch( rFont.GetPitch() )
{
@@ -465,24 +465,24 @@ void EMFWriter::ImplCheckTextAttr()
(*mpStm) << (sal_Unicode) 0;
// dummy elfVersion, elfStyleSize, elfMatch, elfReserved
- (*mpStm) << (UINT32) 0 << (UINT32) 0 << (UINT32) 0 << (UINT32) 0 ;
+ (*mpStm) << (sal_uInt32) 0 << (sal_uInt32) 0 << (sal_uInt32) 0 << (sal_uInt32) 0 ;
// dummy elfVendorId
- (*mpStm) << (UINT32) 0;
+ (*mpStm) << (sal_uInt32) 0;
// dummy elfCulture
- (*mpStm) << (UINT32) 0;
+ (*mpStm) << (sal_uInt32) 0;
// dummy elfPanose
- (*mpStm) << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0 << (BYTE) 0;
+ (*mpStm) << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0 << (sal_uInt8) 0;
// fill record to get a record size divideable by 4
- (*mpStm) << (UINT16) 0;
+ (*mpStm) << (sal_uInt16) 0;
ImplEndRecord();
// TextAlign
- UINT32 nTextAlign;
+ sal_uInt32 nTextAlign;
switch( rFont.GetAlign() )
{
@@ -511,10 +511,10 @@ void EMFWriter::ImplCheckTextAttr()
void EMFWriter::ImplWriteColor( const Color& rColor )
{
- UINT32 nCol = rColor.GetRed();
+ sal_uInt32 nCol = rColor.GetRed();
- nCol |= ( (UINT32) rColor.GetGreen() ) << 8;
- nCol |= ( (UINT32) rColor.GetBlue() ) << 16;
+ nCol |= ( (sal_uInt32) rColor.GetGreen() ) << 8;
+ nCol |= ( (sal_uInt32) rColor.GetBlue() ) << 16;
(*mpStm) << nCol;
}
@@ -523,7 +523,7 @@ void EMFWriter::ImplWriteColor( const Color& rColor )
void EMFWriter::ImplWriteRasterOp( RasterOp eRop )
{
- UINT32 nROP2;
+ sal_uInt32 nROP2;
switch( eRop )
{
@@ -542,7 +542,7 @@ void EMFWriter::ImplWriteRasterOp( RasterOp eRop )
void EMFWriter::ImplWriteExtent( long nExtent )
{
nExtent = maVDev.LogicToLogic( Size( nExtent, 0 ), maVDev.GetMapMode(), maDestMapMode ).Width();
- (*mpStm) << (INT32) nExtent;
+ (*mpStm) << (sal_Int32) nExtent;
}
// -----------------------------------------------------------------------------
@@ -550,7 +550,7 @@ void EMFWriter::ImplWriteExtent( long nExtent )
void EMFWriter::ImplWritePoint( const Point& rPoint )
{
const Point aPoint( maVDev.LogicToLogic( rPoint, maVDev.GetMapMode(), maDestMapMode ));
- (*mpStm) << (INT32) aPoint.X() << (INT32) aPoint.Y();
+ (*mpStm) << (sal_Int32) aPoint.X() << (sal_Int32) aPoint.Y();
}
// -----------------------------------------------------------------------------
@@ -558,7 +558,7 @@ void EMFWriter::ImplWritePoint( const Point& rPoint )
void EMFWriter::ImplWriteSize( const Size& rSize)
{
const Size aSize( maVDev.LogicToLogic( rSize, maVDev.GetMapMode(), maDestMapMode ));
- (*mpStm) << (INT32) aSize.Width() << (INT32) aSize.Height();
+ (*mpStm) << (sal_Int32) aSize.Width() << (sal_Int32) aSize.Height();
}
// -----------------------------------------------------------------------------
@@ -571,7 +571,7 @@ void EMFWriter::ImplWriteRect( const Rectangle& rRect )
// -----------------------------------------------------------------------------
-void EMFWriter::ImplWritePolygonRecord( const Polygon& rPoly, BOOL bClose )
+void EMFWriter::ImplWritePolygonRecord( const Polygon& rPoly, sal_Bool bClose )
{
if( rPoly.GetSize() )
{
@@ -586,9 +586,9 @@ void EMFWriter::ImplWritePolygonRecord( const Polygon& rPoly, BOOL bClose )
ImplBeginRecord( bClose ? WIN_EMR_POLYGON : WIN_EMR_POLYLINE );
ImplWriteRect( rPoly.GetBoundRect() );
- (*mpStm) << (UINT32) rPoly.GetSize();
+ (*mpStm) << (sal_uInt32) rPoly.GetSize();
- for( USHORT i = 0; i < rPoly.GetSize(); i++ )
+ for( sal_uInt16 i = 0; i < rPoly.GetSize(); i++ )
ImplWritePoint( rPoly[ i ] );
ImplEndRecord();
@@ -605,7 +605,7 @@ void EMFWriter::ImplWritePolyPolygonRecord( const PolyPolygon& rPolyPoly )
if( nPolyCount )
{
if( 1 == nPolyCount )
- ImplWritePolygonRecord( rPolyPoly[ 0 ], TRUE );
+ ImplWritePolygonRecord( rPolyPoly[ 0 ], sal_True );
else
{
sal_Bool bHasFlags = sal_False;
@@ -737,7 +737,7 @@ void EMFWriter::ImplWritePath( const PolyPolygon& rPolyPoly, sal_Bool bClosed )
// -----------------------------------------------------------------------------
void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt,
- const Size& rSz, UINT32 nROP )
+ const Size& rSz, sal_uInt32 nROP )
{
if( !!rBmp )
{
@@ -747,19 +747,19 @@ void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt,
ImplBeginRecord( WIN_EMR_STRETCHDIBITS );
ImplWriteRect( Rectangle( rPt, rSz ) );
ImplWritePoint( rPt );
- (*mpStm) << (INT32) 0 << (INT32) 0 << (INT32) aBmpSizePixel.Width() << (INT32) aBmpSizePixel.Height();
+ (*mpStm) << (sal_Int32) 0 << (sal_Int32) 0 << (sal_Int32) aBmpSizePixel.Width() << (sal_Int32) aBmpSizePixel.Height();
// write offset positions and sizes later
- const ULONG nOffPos = mpStm->Tell();
+ const sal_uLong nOffPos = mpStm->Tell();
mpStm->SeekRel( 16 );
- (*mpStm) << (UINT32) 0 << ( ( ROP_XOR == maVDev.GetRasterOp() && WIN_SRCCOPY == nROP ) ? WIN_SRCINVERT : nROP );
+ (*mpStm) << (sal_uInt32) 0 << ( ( ROP_XOR == maVDev.GetRasterOp() && WIN_SRCCOPY == nROP ) ? WIN_SRCINVERT : nROP );
ImplWriteSize( rSz );
- rBmp.Write( aMemStm, TRUE, FALSE );
+ rBmp.Write( aMemStm, sal_True, sal_False );
- UINT32 nDIBSize = aMemStm.Tell(), nHeaderSize, nCompression, nColsUsed, nPalCount, nImageSize;
- UINT16 nBitCount;
+ sal_uInt32 nDIBSize = aMemStm.Tell(), nHeaderSize, nCompression, nColsUsed, nPalCount, nImageSize;
+ sal_uInt16 nBitCount;
// get DIB parameters
aMemStm.Seek( 0 );
@@ -769,15 +769,15 @@ void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt,
aMemStm.SeekRel( 8 );
aMemStm >> nColsUsed;
- nPalCount = ( nBitCount <= 8 ) ? ( nColsUsed ? nColsUsed : ( 1 << (UINT32) nBitCount ) ) :
+ nPalCount = ( nBitCount <= 8 ) ? ( nColsUsed ? nColsUsed : ( 1 << (sal_uInt32) nBitCount ) ) :
( ( 3 == nCompression ) ? 12 : 0 );
mpStm->Write( aMemStm.GetData(), nDIBSize );
- const ULONG nEndPos = mpStm->Tell();
+ const sal_uLong nEndPos = mpStm->Tell();
mpStm->Seek( nOffPos );
- (*mpStm) << (UINT32) 80 << (UINT32)( nHeaderSize + ( nPalCount << 2 ) );
- (*mpStm) << (UINT32)( 80 + ( nHeaderSize + ( nPalCount << 2 ) ) ) << nImageSize;
+ (*mpStm) << (sal_uInt32) 80 << (sal_uInt32)( nHeaderSize + ( nPalCount << 2 ) );
+ (*mpStm) << (sal_uInt32)( 80 + ( nHeaderSize + ( nPalCount << 2 ) ) ) << nImageSize;
mpStm->Seek( nEndPos );
ImplEndRecord();
@@ -827,12 +827,12 @@ void EMFWriter::ImplWriteTextRecord( const Point& rPos, const String rText, cons
ImplBeginRecord( WIN_EMR_EXTTEXTOUTW );
ImplWriteRect( Rectangle( rPos, Size( nNormWidth, maVDev.GetTextHeight() ) ) );
- (*mpStm) << (UINT32)1;
- (*mpStm) << (INT32) 0 << (INT32) 0;
+ (*mpStm) << (sal_uInt32)1;
+ (*mpStm) << (sal_Int32) 0 << (sal_Int32) 0;
ImplWritePoint( rPos );
- (*mpStm) << (UINT32) nLen << (UINT32) 76 << (UINT32) 2;
- (*mpStm) << (INT32) 0 << (INT32) 0 << (INT32) 0 << (INT32) 0;
- (*mpStm) << (UINT32) ( 76 + ( nLen << 1 ) + ( (nLen & 1 ) ? 2 : 0 ) );
+ (*mpStm) << (sal_uInt32) nLen << (sal_uInt32) 76 << (sal_uInt32) 2;
+ (*mpStm) << (sal_Int32) 0 << (sal_Int32) 0 << (sal_Int32) 0 << (sal_Int32) 0;
+ (*mpStm) << (sal_uInt32) ( 76 + ( nLen << 1 ) + ( (nLen & 1 ) ? 2 : 0 ) );
// write text
for( i = 0; i < nLen; i++ )
@@ -840,7 +840,7 @@ void EMFWriter::ImplWriteTextRecord( const Point& rPos, const String rText, cons
// padding word
if( nLen & 1 )
- (*mpStm) << (UINT16) 0;
+ (*mpStm) << (sal_uInt16) 0;
// write DX array
ImplWriteExtent( pDX[ 0 ] );
@@ -874,7 +874,7 @@ void EMFWriter::Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const bas
for(sal_uInt32 a(0); a < aLinePolyPolygon.count(); a++)
{
const basegfx::B2DPolygon aCandidate(aLinePolyPolygon.getB2DPolygon(a));
- ImplWritePolygonRecord( Polygon(aCandidate), FALSE );
+ ImplWritePolygonRecord( Polygon(aCandidate), sal_False );
}
}
@@ -902,10 +902,10 @@ void EMFWriter::Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const bas
void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
{
- for( ULONG j = 0, nActionCount = rMtf.GetActionCount(); j < nActionCount; j++ )
+ for( sal_uLong j = 0, nActionCount = rMtf.GetActionCount(); j < nActionCount; j++ )
{
const MetaAction* pAction = rMtf.GetAction( j );
- const USHORT nType = pAction->GetType();
+ const sal_uInt16 nType = pAction->GetType();
switch( nType )
{
@@ -1073,7 +1073,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
{
if(pA->GetLineInfo().IsDefault())
{
- ImplWritePolygonRecord( rPoly, FALSE );
+ ImplWritePolygonRecord( rPoly, sal_False );
}
else
{
@@ -1156,7 +1156,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
const MetaEPSAction* pA = (const MetaEPSAction*) pAction;
const GDIMetaFile aSubstitute( pA->GetSubstitute() );
- for( ULONG i = 0, nCount = aSubstitute.GetActionCount(); i < nCount; i++ )
+ for( sal_uLong i = 0, nCount = aSubstitute.GetActionCount(); i < nCount; i++ )
{
const MetaAction* pSubstAct = aSubstitute.GetAction( i );
if( pSubstAct->GetType() == META_BMPSCALE_ACTION )
@@ -1175,7 +1175,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
maVDev.Pop();
ImplBeginRecord( WIN_EMR_RESTOREDC );
- (*mpStm) << (INT32) -1;
+ (*mpStm) << (sal_Int32) -1;
ImplEndRecord();
break;
}
@@ -1306,14 +1306,14 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case( META_LINECOLOR_ACTION ):
{
( (MetaAction*) pAction )->Execute( &maVDev );
- mbLineChanged = TRUE;
+ mbLineChanged = sal_True;
}
break;
case( META_FILLCOLOR_ACTION ):
{
( (MetaAction*) pAction )->Execute( &maVDev );
- mbFillChanged = TRUE;
+ mbFillChanged = sal_True;
}
break;
@@ -1324,7 +1324,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case( META_FONT_ACTION ):
{
( (MetaAction*) pAction )->Execute( &maVDev );
- mbTextChanged = TRUE;
+ mbTextChanged = sal_True;
}
break;
@@ -1365,11 +1365,11 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
( (MetaAction*) pAction )->Execute( &maVDev );
ImplBeginRecord( WIN_EMR_RESTOREDC );
- (*mpStm) << (INT32) -1;
+ (*mpStm) << (sal_Int32) -1;
ImplEndRecord();
ImplWriteRasterOp( maVDev.GetRasterOp() );
- mbLineChanged = mbFillChanged = mbTextChanged = TRUE;
+ mbLineChanged = mbFillChanged = mbTextChanged = sal_True;
}
break;
diff --git a/svtools/source/filter.vcl/wmf/emfwr.hxx b/svtools/source/filter.vcl/wmf/emfwr.hxx
index 6334b5dfe16f..8c65e91e5f73 100644
--- a/svtools/source/filter.vcl/wmf/emfwr.hxx
+++ b/svtools/source/filter.vcl/wmf/emfwr.hxx
@@ -50,27 +50,27 @@ private:
MapMode maDestMapMode;
FilterConfigItem* mpFilterConfigItem;
SvStream* mpStm;
- BOOL* mpHandlesUsed;
- ULONG mnHandleCount;
- ULONG mnLastPercent;
- ULONG mnRecordCount;
- ULONG mnRecordPos;
- BOOL mbRecordOpen;
- BOOL mbLineChanged;
+ sal_Bool* mpHandlesUsed;
+ sal_uLong mnHandleCount;
+ sal_uLong mnLastPercent;
+ sal_uLong mnRecordCount;
+ sal_uLong mnRecordPos;
+ sal_Bool mbRecordOpen;
+ sal_Bool mbLineChanged;
sal_uInt32 mnLineHandle;
- BOOL mbFillChanged;
+ sal_Bool mbFillChanged;
sal_uInt32 mnFillHandle;
- BOOL mbTextChanged;
+ sal_Bool mbTextChanged;
sal_uInt32 mnTextHandle;
sal_uInt32 mnHorTextAlign;
void ImplBeginRecord( sal_uInt32 nType );
void ImplEndRecord();
- ULONG ImplAcquireHandle();
- void ImplReleaseHandle( ULONG nHandle );
+ sal_uLong ImplAcquireHandle();
+ void ImplReleaseHandle( sal_uLong nHandle );
- BOOL ImplPrepareHandleSelect( sal_uInt32& rHandle, ULONG nSelectType );
+ sal_Bool ImplPrepareHandleSelect( sal_uInt32& rHandle, sal_uLong nSelectType );
void ImplCheckLineAttr();
void ImplCheckFillAttr();
void ImplCheckTextAttr();
@@ -82,9 +82,9 @@ private:
void ImplWriteSize( const Size& rSize);
void ImplWriteRect( const Rectangle& rRect );
void ImplWritePath( const PolyPolygon& rPolyPoly, sal_Bool bClose );
- void ImplWritePolygonRecord( const Polygon& rPoly, BOOL bClose );
+ void ImplWritePolygonRecord( const Polygon& rPoly, sal_Bool bClose );
void ImplWritePolyPolygonRecord( const PolyPolygon& rPolyPoly );
- void ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, const Size& rSz, UINT32 nROP );
+ void ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, const Size& rSz, sal_uInt32 nROP );
void ImplWriteTextRecord( const Point& rPos, const String rText, const sal_Int32* pDXArray, sal_uInt32 nWidth );
void Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon);
@@ -94,7 +94,7 @@ public:
EMFWriter() {}
- BOOL WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterConfigItem* pConfigItem = NULL );
+ sal_Bool WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterConfigItem* pConfigItem = NULL );
};
#endif // _EMFWR_HXX
diff --git a/svtools/source/filter.vcl/wmf/enhwmf.cxx b/svtools/source/filter.vcl/wmf/enhwmf.cxx
index 1e49e0d61446..29128ffd7904 100644
--- a/svtools/source/filter.vcl/wmf/enhwmf.cxx
+++ b/svtools/source/filter.vcl/wmf/enhwmf.cxx
@@ -229,7 +229,7 @@ static sal_Bool ImplReadRegion( PolyPolygon& rPolyPoly, SvStream& rSt, sal_uInt3
return bOk;
}
-BOOL EnhWMFReader::ReadEnhWMF()
+sal_Bool EnhWMFReader::ReadEnhWMF()
{
sal_uInt32 nStretchBltMode = 0;
sal_uInt32 nRecType, nRecSize, nNextPos,
@@ -246,7 +246,7 @@ BOOL EnhWMFReader::ReadEnhWMF()
if ( ( nRecSize < 8 ) || ( nRecSize & 3 ) ) // Parameter sind immer durch 4 teilbar
{
- bStatus = FALSE;
+ bStatus = sal_False;
break;
}
@@ -254,7 +254,7 @@ BOOL EnhWMFReader::ReadEnhWMF()
if ( nNextPos > nEndPos )
{
- bStatus = FALSE;
+ bStatus = sal_False;
break;
}
@@ -291,8 +291,8 @@ BOOL EnhWMFReader::ReadEnhWMF()
{
pWMF->SeekRel( 16 );
*pWMF >> nPoints;
- Polygon aPoly( (UINT16)nPoints );
- for( UINT16 k = 0; k < (UINT16)nPoints; k++ )
+ Polygon aPoly( (sal_uInt16)nPoints );
+ for( sal_uInt16 k = 0; k < (sal_uInt16)nPoints; k++ )
{
*pWMF >> nX32 >> nY32;
aPoly[ k ] = Point( nX32, nY32 );
@@ -307,14 +307,14 @@ BOOL EnhWMFReader::ReadEnhWMF()
{
pWMF->SeekRel( 0x10 );
*pWMF >> nPoints;
- UINT16 i = 0;
+ sal_uInt16 i = 0;
if ( bFlag )
{
i++;
nPoints++;
}
- Polygon aPolygon( (UINT16)nPoints );
- for ( ; i < (UINT16)nPoints; i++ )
+ Polygon aPolygon( (sal_uInt16)nPoints );
+ for ( ; i < (sal_uInt16)nPoints; i++ )
{
*pWMF >> nX32 >> nY32;
aPolygon[ i ] = Point( nX32, nY32 );
@@ -325,25 +325,25 @@ BOOL EnhWMFReader::ReadEnhWMF()
case EMR_POLYPOLYLINE :
{
- UINT16* pnPoints;
+ sal_uInt16* pnPoints;
- INT32 i, nPoly;
+ sal_Int32 i, nPoly;
pWMF->SeekRel( 0x10 );
// Anzahl der Polygone:
*pWMF >> nPoly >> i;
// taking the amount of points of each polygon, retrieving the total number of points
- if ( static_cast< sal_uInt32 >(nPoly) < SAL_MAX_UINT32 / sizeof(UINT16) )
+ if ( static_cast< sal_uInt32 >(nPoly) < SAL_MAX_UINT32 / sizeof(sal_uInt16) )
{
- if ( ( static_cast< sal_uInt32 >( nPoly ) * sizeof(UINT16) ) <= ( nEndPos - pWMF->Tell() ) )
+ if ( ( static_cast< sal_uInt32 >( nPoly ) * sizeof(sal_uInt16) ) <= ( nEndPos - pWMF->Tell() ) )
{
- pnPoints = new UINT16[ nPoly ];
+ pnPoints = new sal_uInt16[ nPoly ];
for ( i = 0; i < nPoly; i++ )
{
*pWMF >> nPoints;
- pnPoints[ i ] = (UINT16)nPoints;
+ pnPoints[ i ] = (sal_uInt16)nPoints;
}
// Polygonpunkte holen:
@@ -351,7 +351,7 @@ BOOL EnhWMFReader::ReadEnhWMF()
for ( i = 0; ( i < nPoly ) && !pWMF->IsEof(); i++ )
{
Polygon aPoly( pnPoints[ i ] );
- for( UINT16 k = 0; k < pnPoints[ i ]; k++ )
+ for( sal_uInt16 k = 0; k < pnPoints[ i ]; k++ )
{
*pWMF >> nX32 >> nY32;
aPoly[ k ] = Point( nX32, nY32 );
@@ -366,25 +366,25 @@ BOOL EnhWMFReader::ReadEnhWMF()
case EMR_POLYPOLYGON :
{
- UINT16* pnPoints;
+ sal_uInt16* pnPoints;
Point* pPtAry;
- UINT32 i, nPoly, nGesPoints;
+ sal_uInt32 i, nPoly, nGesPoints;
pWMF->SeekRel( 0x10 );
// Anzahl der Polygone:
*pWMF >> nPoly >> nGesPoints;
- if ( ( nGesPoints < SAL_MAX_UINT32 / sizeof(Point) ) && ( nPoly < SAL_MAX_UINT32 / sizeof(UINT16) ) )
+ if ( ( nGesPoints < SAL_MAX_UINT32 / sizeof(Point) ) && ( nPoly < SAL_MAX_UINT32 / sizeof(sal_uInt16) ) )
{
- if ( ( nPoly * sizeof(UINT16) ) <= ( nEndPos - pWMF->Tell() ) )
+ if ( ( nPoly * sizeof(sal_uInt16) ) <= ( nEndPos - pWMF->Tell() ) )
{
- pnPoints = new UINT16[ nPoly ];
+ pnPoints = new sal_uInt16[ nPoly ];
for ( i = 0; i < nPoly; i++ )
{
*pWMF >> nPoints;
- pnPoints[ i ] = (UINT16)nPoints;
+ pnPoints[ i ] = (sal_uInt16)nPoints;
}
if ( ( nGesPoints * (sizeof(sal_uInt32)+sizeof(sal_uInt32)) ) <= ( nEndPos - pWMF->Tell() ) )
@@ -398,7 +398,7 @@ BOOL EnhWMFReader::ReadEnhWMF()
pPtAry[ i ] = Point( nX32, nY32 );
}
// PolyPolygon Actions erzeugen
- PolyPolygon aPolyPoly( (UINT16)nPoly, pnPoints, pPtAry );
+ PolyPolygon aPolyPoly( (sal_uInt16)nPoly, pnPoints, pPtAry );
pOut->DrawPolyPolygon( aPolyPoly, bRecordPath );
delete[] pPtAry;
}
@@ -554,7 +554,7 @@ BOOL EnhWMFReader::ReadEnhWMF()
case EMR_MODIFYWORLDTRANSFORM :
{
- UINT32 nMode;
+ sal_uInt32 nMode;
XForm aTempXForm;
*pWMF >> aTempXForm >> nMode;
pOut->ModifyWorldTransform( aTempXForm, nMode );
@@ -575,7 +575,7 @@ BOOL EnhWMFReader::ReadEnhWMF()
{
LineInfo aLineInfo;
- UINT32 nStyle;
+ sal_uInt32 nStyle;
Size aSize;
*pWMF >> nStyle >> aSize.Width() >> aSize.Height();
@@ -583,9 +583,9 @@ BOOL EnhWMFReader::ReadEnhWMF()
if ( aSize.Width() )
aLineInfo.SetWidth( aSize.Width() );
- BOOL bTransparent = FALSE;
- UINT16 nDashCount = 0;
- UINT16 nDotCount = 0;
+ sal_Bool bTransparent = sal_False;
+ sal_uInt16 nDashCount = 0;
+ sal_uInt16 nDotCount = 0;
switch( nStyle )
{
case PS_DASHDOTDOT :
@@ -599,7 +599,7 @@ BOOL EnhWMFReader::ReadEnhWMF()
nDashCount++;
break;
case PS_NULL :
- bTransparent = TRUE;
+ bTransparent = sal_True;
aLineInfo.SetStyle( LINE_NONE );
break;
default :
@@ -674,12 +674,12 @@ BOOL EnhWMFReader::ReadEnhWMF()
case EMR_CREATEBRUSHINDIRECT :
{
- UINT32 nStyle;
+ sal_uInt32 nStyle;
*pWMF >> nIndex;
if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 )
{
*pWMF >> nStyle;
- pOut->CreateObject( nIndex, GDI_BRUSH, new WinMtfFillStyle( ReadColor(), ( nStyle == BS_HOLLOW ) ? TRUE : FALSE ) );
+ pOut->CreateObject( nIndex, GDI_BRUSH, new WinMtfFillStyle( ReadColor(), ( nStyle == BS_HOLLOW ) ? sal_True : sal_False ) );
}
}
break;
@@ -716,7 +716,7 @@ BOOL EnhWMFReader::ReadEnhWMF()
case EMR_ARC :
{
- UINT32 nStartX, nStartY, nEndX, nEndY;
+ sal_uInt32 nStartX, nStartY, nEndX, nEndY;
*pWMF >> nX32 >> nY32 >> nx32 >> ny32 >> nStartX >> nStartY >> nEndX >> nEndY;
pOut->DrawArc( ReadRectangle( nX32, nY32, nx32, ny32 ), Point( nStartX, nStartY ), Point( nEndX, nEndY ) );
}
@@ -724,7 +724,7 @@ BOOL EnhWMFReader::ReadEnhWMF()
case EMR_CHORD :
{
- UINT32 nStartX, nStartY, nEndX, nEndY;
+ sal_uInt32 nStartX, nStartY, nEndX, nEndY;
*pWMF >> nX32 >> nY32 >> nx32 >> ny32 >> nStartX >> nStartY >> nEndX >> nEndY;
pOut->DrawChord( ReadRectangle( nX32, nY32, nx32, ny32 ), Point( nStartX, nStartY ), Point( nEndX, nEndY ) );
}
@@ -732,7 +732,7 @@ BOOL EnhWMFReader::ReadEnhWMF()
case EMR_PIE :
{
- UINT32 nStartX, nStartY, nEndX, nEndY;
+ sal_uInt32 nStartX, nStartY, nEndX, nEndY;
*pWMF >> nX32 >> nY32 >> nx32 >> ny32 >> nStartX >> nStartY >> nEndX >> nEndY;
const Rectangle aRect( ReadRectangle( nX32, nY32, nx32, ny32 ));
@@ -754,9 +754,9 @@ BOOL EnhWMFReader::ReadEnhWMF()
case EMR_ARCTO :
{
- UINT32 nStartX, nStartY, nEndX, nEndY;
+ sal_uInt32 nStartX, nStartY, nEndX, nEndY;
*pWMF >> nX32 >> nY32 >> nx32 >> ny32 >> nStartX >> nStartY >> nEndX >> nEndY;
- pOut->DrawArc( ReadRectangle( nX32, nY32, nx32, ny32 ), Point( nStartX, nStartY ), Point( nEndX, nEndY ), TRUE );
+ pOut->DrawArc( ReadRectangle( nX32, nY32, nx32, ny32 ), Point( nStartX, nStartY ), Point( nEndX, nEndY ), sal_True );
}
break;
@@ -813,11 +813,11 @@ BOOL EnhWMFReader::ReadEnhWMF()
case EMR_BITBLT : // PASSTHROUGH INTENDED
case EMR_STRETCHBLT :
{
- INT32 xDest, yDest, cxDest, cyDest, xSrc, ySrc, cxSrc, cySrc;
- UINT32 dwRop, iUsageSrc, offBmiSrc, cbBmiSrc, offBitsSrc, cbBitsSrc;
+ sal_Int32 xDest, yDest, cxDest, cyDest, xSrc, ySrc, cxSrc, cySrc;
+ sal_uInt32 dwRop, iUsageSrc, offBmiSrc, cbBmiSrc, offBitsSrc, cbBitsSrc;
XForm xformSrc;
- UINT32 nStart = pWMF->Tell() - 8;
+ sal_uInt32 nStart = pWMF->Tell() - 8;
pWMF->SeekRel( 0x10 );
*pWMF >> xDest >> yDest >> cxDest >> cyDest >> dwRop >> xSrc >> ySrc
@@ -836,27 +836,27 @@ BOOL EnhWMFReader::ReadEnhWMF()
cyDest = abs( (int)cyDest ); // and also 122889
if ( (cbBitsSrc > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc) )
- bStatus = FALSE;
+ bStatus = sal_False;
else
{
- UINT32 nSize = cbBmiSrc + cbBitsSrc + 14;
+ sal_uInt32 nSize = cbBmiSrc + cbBitsSrc + 14;
if ( nSize <= ( nEndPos - nStartPos ) )
{
char* pBuf = new char[ nSize ];
SvMemoryStream aTmp( pBuf, nSize, STREAM_READ | STREAM_WRITE );
- aTmp.ObjectOwnsMemory( TRUE );
- aTmp << (BYTE)'B'
- << (BYTE)'M'
- << (UINT32)cbBitsSrc
- << (UINT16)0
- << (UINT16)0
- << (UINT32)cbBmiSrc + 14;
+ aTmp.ObjectOwnsMemory( sal_True );
+ aTmp << (sal_uInt8)'B'
+ << (sal_uInt8)'M'
+ << (sal_uInt32)cbBitsSrc
+ << (sal_uInt16)0
+ << (sal_uInt16)0
+ << (sal_uInt32)cbBmiSrc + 14;
pWMF->Seek( nStart + offBmiSrc );
pWMF->Read( pBuf + 14, cbBmiSrc );
pWMF->Seek( nStart + offBitsSrc );
pWMF->Read( pBuf + 14 + cbBmiSrc, cbBitsSrc );
aTmp.Seek( 0 );
- aBitmap.Read( aTmp, TRUE );
+ aBitmap.Read( aTmp, sal_True );
// test if it is sensible to crop
if ( ( cxSrc > 0 ) && ( cySrc > 0 ) &&
@@ -875,9 +875,9 @@ BOOL EnhWMFReader::ReadEnhWMF()
case EMR_STRETCHDIBITS :
{
- INT32 xDest, yDest, xSrc, ySrc, cxSrc, cySrc, cxDest, cyDest;
- UINT32 offBmiSrc, cbBmiSrc, offBitsSrc, cbBitsSrc, iUsageSrc, dwRop;
- UINT32 nStart = pWMF->Tell() - 8;
+ sal_Int32 xDest, yDest, xSrc, ySrc, cxSrc, cySrc, cxDest, cyDest;
+ sal_uInt32 offBmiSrc, cbBmiSrc, offBitsSrc, cbBitsSrc, iUsageSrc, dwRop;
+ sal_uInt32 nStart = pWMF->Tell() - 8;
pWMF->SeekRel( 0x10 );
*pWMF >> xDest >> yDest >> xSrc >> ySrc >> cxSrc >> cySrc >> offBmiSrc >> cbBmiSrc >> offBitsSrc
@@ -890,27 +890,27 @@ BOOL EnhWMFReader::ReadEnhWMF()
cyDest = abs( (int)cyDest ); // and also 122889
if ( (cbBitsSrc > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc) )
- bStatus = FALSE;
+ bStatus = sal_False;
else
{
- UINT32 nSize = cbBmiSrc + cbBitsSrc + 14;
+ sal_uInt32 nSize = cbBmiSrc + cbBitsSrc + 14;
if ( nSize <= ( nEndPos - nStartPos ) )
{
char* pBuf = new char[ nSize ];
SvMemoryStream aTmp( pBuf, nSize, STREAM_READ | STREAM_WRITE );
- aTmp.ObjectOwnsMemory( TRUE );
- aTmp << (BYTE)'B'
- << (BYTE)'M'
- << (UINT32)cbBitsSrc
- << (UINT16)0
- << (UINT16)0
- << (UINT32)cbBmiSrc + 14;
+ aTmp.ObjectOwnsMemory( sal_True );
+ aTmp << (sal_uInt8)'B'
+ << (sal_uInt8)'M'
+ << (sal_uInt32)cbBitsSrc
+ << (sal_uInt16)0
+ << (sal_uInt16)0
+ << (sal_uInt32)cbBmiSrc + 14;
pWMF->Seek( nStart + offBmiSrc );
pWMF->Read( pBuf + 14, cbBmiSrc );
pWMF->Seek( nStart + offBitsSrc );
pWMF->Read( pBuf + 14 + cbBmiSrc, cbBitsSrc );
aTmp.Seek( 0 );
- aBitmap.Read( aTmp, TRUE );
+ aBitmap.Read( aTmp, sal_True );
// test if it is sensible to crop
if ( ( cxSrc > 0 ) && ( cySrc > 0 ) &&
@@ -941,7 +941,7 @@ BOOL EnhWMFReader::ReadEnhWMF()
for ( int i = 0; i < LF_FACESIZE; i++ )
{
- UINT16 nChar;
+ sal_uInt16 nChar;
*pWMF >> nChar;
lfFaceName[ i ] = nChar;
}
@@ -1045,14 +1045,14 @@ BOOL EnhWMFReader::ReadEnhWMF()
{
pWMF->SeekRel( 16 );
*pWMF >> nPoints;
- UINT16 i = 0;
+ sal_uInt16 i = 0;
if ( bFlag )
{
i++;
nPoints++;
}
- Polygon aPoly( (UINT16)nPoints );
- for( ; i < (UINT16)nPoints; i++ )
+ Polygon aPoly( (sal_uInt16)nPoints );
+ for( ; i < (sal_uInt16)nPoints; i++ )
{
*pWMF >> nX16 >> nY16;
aPoly[ i ] = Point( nX16, nY16 );
@@ -1065,8 +1065,8 @@ BOOL EnhWMFReader::ReadEnhWMF()
{
pWMF->SeekRel( 16 );
*pWMF >> nPoints;
- Polygon aPoly( (UINT16)nPoints );
- for( UINT16 k = 0; k < (UINT16)nPoints; k++ )
+ Polygon aPoly( (sal_uInt16)nPoints );
+ for( sal_uInt16 k = 0; k < (sal_uInt16)nPoints; k++ )
{
*pWMF >> nX16 >> nY16;
aPoly[ k ] = Point( nX16, nY16 );
@@ -1081,15 +1081,15 @@ BOOL EnhWMFReader::ReadEnhWMF()
{
pWMF->SeekRel( 16 );
*pWMF >> nPoints;
- UINT16 i = 0;
+ sal_uInt16 i = 0;
if ( bFlag )
{
i++;
nPoints++;
}
- Polygon aPoly( (UINT16)nPoints );
- for( ; i < (UINT16)nPoints; i++ )
+ Polygon aPoly( (sal_uInt16)nPoints );
+ for( ; i < (sal_uInt16)nPoints; i++ )
{
*pWMF >> nX16 >> nY16;
aPoly[ i ] = Point( nX16, nY16 );
@@ -1100,29 +1100,29 @@ BOOL EnhWMFReader::ReadEnhWMF()
case EMR_POLYPOLYLINE16 :
{
- UINT16* pnPoints;
+ sal_uInt16* pnPoints;
- INT32 i, nPoly, nGesPoints;
+ sal_Int32 i, nPoly, nGesPoints;
pWMF->SeekRel( 0x10 );
// Anzahl der Polygone:
*pWMF >> nPoly >> nGesPoints;
// taking the amount of points of each polygon, retrieving the total number of points
- if ( static_cast< sal_uInt32 >(nPoly) < SAL_MAX_UINT32 / sizeof(UINT16) )
+ if ( static_cast< sal_uInt32 >(nPoly) < SAL_MAX_UINT32 / sizeof(sal_uInt16) )
{
- if ( ( static_cast< sal_uInt32 >( nPoly ) * sizeof(UINT16) ) <= ( nEndPos - pWMF->Tell() ) )
+ if ( ( static_cast< sal_uInt32 >( nPoly ) * sizeof(sal_uInt16) ) <= ( nEndPos - pWMF->Tell() ) )
{
- pnPoints = new UINT16[ nPoly ];
+ pnPoints = new sal_uInt16[ nPoly ];
for ( i = 0; i < nPoly; i++ )
{
*pWMF >> nPoints;
- pnPoints[ i ] = (UINT16)nPoints;
+ pnPoints[ i ] = (sal_uInt16)nPoints;
}
// Polygonpunkte holen:
for ( i = 0; ( i < nPoly ) && !pWMF->IsEof(); i++ )
{
Polygon aPolygon( pnPoints[ i ] );
- for ( UINT16 k = 0; k < pnPoints[ i ]; k++ )
+ for ( sal_uInt16 k = 0; k < pnPoints[ i ]; k++ )
{
*pWMF >> nX16 >> nY16;
aPolygon[ k ] = Point( nX16, nY16 );
@@ -1137,22 +1137,22 @@ BOOL EnhWMFReader::ReadEnhWMF()
case EMR_POLYPOLYGON16 :
{
- UINT16* pnPoints;
+ sal_uInt16* pnPoints;
Point* pPtAry;
- UINT32 i, nPoly, nGesPoints;
+ sal_uInt32 i, nPoly, nGesPoints;
pWMF->SeekRel( 0x10 );
// Anzahl der Polygone:
*pWMF >> nPoly >> nGesPoints;
- if ( ( nGesPoints < SAL_MAX_UINT32 / sizeof(Point) ) && ( nPoly < SAL_MAX_UINT32 / sizeof(UINT16) ) )
+ if ( ( nGesPoints < SAL_MAX_UINT32 / sizeof(Point) ) && ( nPoly < SAL_MAX_UINT32 / sizeof(sal_uInt16) ) )
{
- if ( ( static_cast< sal_uInt32 >( nPoly ) * sizeof( UINT16 ) ) <= ( nEndPos - pWMF->Tell() ) )
+ if ( ( static_cast< sal_uInt32 >( nPoly ) * sizeof( sal_uInt16 ) ) <= ( nEndPos - pWMF->Tell() ) )
{
- pnPoints = new UINT16[ nPoly ];
+ pnPoints = new sal_uInt16[ nPoly ];
for ( i = 0; i < nPoly; i++ )
{
*pWMF >> nPoints;
- pnPoints[ i ] = (UINT16)nPoints;
+ pnPoints[ i ] = (sal_uInt16)nPoints;
}
if ( ( nGesPoints * (sizeof(sal_uInt16)+sizeof(sal_uInt16)) ) <= ( nEndPos - pWMF->Tell() ) )
{
@@ -1165,7 +1165,7 @@ BOOL EnhWMFReader::ReadEnhWMF()
}
// PolyPolygon Actions erzeugen
- PolyPolygon aPolyPoly( (UINT16)nPoly, pnPoints, pPtAry );
+ PolyPolygon aPolyPoly( (sal_uInt16)nPoly, pnPoints, pPtAry );
pOut->DrawPolyPolygon( aPolyPoly, bRecordPath );
delete[] pPtAry;
}
@@ -1266,16 +1266,16 @@ BOOL EnhWMFReader::ReadEnhWMF()
//-----------------------------------------------------------------------------------
-BOOL EnhWMFReader::ReadHeader()
+sal_Bool EnhWMFReader::ReadHeader()
{
- UINT32 nUINT32, nHeaderSize, nPalEntries;
- INT32 nLeft, nTop, nRight, nBottom;
+ sal_uInt32 nUINT32, nHeaderSize, nPalEntries;
+ sal_Int32 nLeft, nTop, nRight, nBottom;
// METAFILEHEADER SPARE ICH MIR HIER
// Einlesen des METAHEADER
*pWMF >> nUINT32 >> nHeaderSize;
if ( nUINT32 != 1 ) // Typ
- return FALSE;
+ return sal_False;
// bound size
Rectangle rclBounds; // rectangle in logical units 1/100th mm
@@ -1296,7 +1296,7 @@ BOOL EnhWMFReader::ReadHeader()
*pWMF >> nUINT32; // signature
if ( nUINT32 != 0x464d4520 )
- return FALSE;
+ return sal_False;
*pWMF >> nUINT32; // nVersion
*pWMF >> nEndPos; // size of metafile
@@ -1311,7 +1311,7 @@ BOOL EnhWMFReader::ReadHeader()
*pWMF >> nRecordCount;
if ( !nRecordCount )
- return FALSE;
+ return sal_False;
pWMF->SeekRel( 0xc );
@@ -1324,12 +1324,12 @@ BOOL EnhWMFReader::ReadHeader()
pOut->SetRefMill( Size( nMillX, nMillY ) );
pWMF->Seek( nStartPos + nHeaderSize );
- return TRUE;
+ return sal_True;
}
//-----------------------------------------------------------------------------------
-Rectangle EnhWMFReader::ReadRectangle( INT32 x1, INT32 y1, INT32 x2, INT32 y2 )
+Rectangle EnhWMFReader::ReadRectangle( sal_Int32 x1, sal_Int32 y1, sal_Int32 x2, sal_Int32 y2 )
{
Point aTL ( Point( x1, y1 ) );
Point aBR( Point( --x2, --y2 ) );
diff --git a/svtools/source/filter.vcl/wmf/winmtf.cxx b/svtools/source/filter.vcl/wmf/winmtf.cxx
index 787e6522b890..feff21933ab6 100644
--- a/svtools/source/filter.vcl/wmf/winmtf.cxx
+++ b/svtools/source/filter.vcl/wmf/winmtf.cxx
@@ -355,7 +355,7 @@ WinMtf::WinMtf( WinMtfOutput* pWinMtfOutput, SvStream& rStreamWMF, FilterConfigI
SvLockBytes *pLB = pWMF->GetLockBytes();
if ( pLB )
- pLB->SetSynchronMode( TRUE );
+ pLB->SetSynchronMode( sal_True );
nStartPos = pWMF->Tell();
@@ -383,7 +383,7 @@ WinMtf::~WinMtf()
// ------------------------------------------------------------------------
-void WinMtf::Callback( USHORT nPercent )
+void WinMtf::Callback( sal_uInt16 nPercent )
{
if ( xStatusIndicator.is() )
xStatusIndicator->setValue( nPercent );
@@ -393,9 +393,9 @@ void WinMtf::Callback( USHORT nPercent )
Color WinMtf::ReadColor()
{
- UINT32 nColor;
+ sal_uInt32 nColor;
*pWMF >> nColor;
- return Color( (BYTE)nColor, (BYTE)( nColor >> 8 ), (BYTE)( nColor >> 16 ) );
+ return Color( (sal_uInt8)nColor, (sal_uInt8)( nColor >> 8 ), (sal_uInt8)( nColor >> 16 ) );
};
//-----------------------------------------------------------------------------------
@@ -561,8 +561,8 @@ void WinMtfOutput::ImplMap( Font& rFont )
Polygon& WinMtfOutput::ImplMap( Polygon& rPolygon )
{
- UINT16 nPoints = rPolygon.GetSize();
- for ( UINT16 i = 0; i < nPoints; i++ )
+ sal_uInt16 nPoints = rPolygon.GetSize();
+ for ( sal_uInt16 i = 0; i < nPoints; i++ )
{
rPolygon[ i ] = ImplMap( rPolygon[ i ] );
}
@@ -573,14 +573,14 @@ Polygon& WinMtfOutput::ImplMap( Polygon& rPolygon )
PolyPolygon& WinMtfOutput::ImplMap( PolyPolygon& rPolyPolygon )
{
- UINT16 nPolys = rPolyPolygon.Count();
- for ( UINT16 i = 0; i < nPolys; ImplMap( rPolyPolygon[ i++ ] ) ) ;
+ sal_uInt16 nPolys = rPolyPolygon.Count();
+ for ( sal_uInt16 i = 0; i < nPolys; ImplMap( rPolyPolygon[ i++ ] ) ) ;
return rPolyPolygon;
}
//-----------------------------------------------------------------------------------
-void WinMtfOutput::SelectObject( INT32 nIndex )
+void WinMtfOutput::SelectObject( sal_Int32 nIndex )
{
GDIObj* pGDIObj = NULL;
@@ -590,7 +590,7 @@ void WinMtfOutput::SelectObject( INT32 nIndex )
{
nIndex &= 0xffff; // zur Sicherheit: mehr als 65535 nicht zulassen
- if ( (UINT32)nIndex < vGDIObj.size() )
+ if ( (sal_uInt32)nIndex < vGDIObj.size() )
pGDIObj = vGDIObj[ nIndex ];
}
@@ -599,7 +599,7 @@ void WinMtfOutput::SelectObject( INT32 nIndex )
if ( nIndex & ENHMETA_STOCK_OBJECT )
{
- UINT16 nStockId = (BYTE)nIndex;
+ sal_uInt16 nStockId = (sal_uInt8)nIndex;
switch( nStockId )
{
case WHITE_BRUSH :
@@ -625,7 +625,7 @@ void WinMtfOutput::SelectObject( INT32 nIndex )
break;
case NULL_BRUSH :
{
- pGDIObj->Set( GDI_BRUSH, new WinMtfFillStyle( Color( COL_TRANSPARENT ), TRUE ) );
+ pGDIObj->Set( GDI_BRUSH, new WinMtfFillStyle( Color( COL_TRANSPARENT ), sal_True ) );
}
break;
case WHITE_PEN :
@@ -640,7 +640,7 @@ void WinMtfOutput::SelectObject( INT32 nIndex )
break;
case NULL_PEN :
{
- pGDIObj->Set( GDI_PEN, new WinMtfLineStyle( Color( COL_TRANSPARENT ), TRUE ) );
+ pGDIObj->Set( GDI_PEN, new WinMtfLineStyle( Color( COL_TRANSPARENT ), sal_True ) );
}
break;
default:
@@ -701,7 +701,7 @@ sal_uInt32 WinMtfOutput::GetTextLayoutMode() const
//-----------------------------------------------------------------------------------
-void WinMtfOutput::SetBkMode( UINT32 nMode )
+void WinMtfOutput::SetBkMode( sal_uInt32 nMode )
{
mnBkMode = nMode;
}
@@ -722,14 +722,14 @@ void WinMtfOutput::SetTextColor( const Color& rColor )
//-----------------------------------------------------------------------------------
-void WinMtfOutput::SetTextAlign( UINT32 nAlign )
+void WinMtfOutput::SetTextAlign( sal_uInt32 nAlign )
{
mnTextAlign = nAlign;
}
//-----------------------------------------------------------------------------------
-void WinMtfOutput::ImplResizeObjectArry( UINT32 nNewEntrys )
+void WinMtfOutput::ImplResizeObjectArry( sal_uInt32 nNewEntrys )
{
sal_uInt32 i = vGDIObj.size();
vGDIObj.resize( nNewEntrys );
@@ -795,7 +795,7 @@ void WinMtfOutput::CreateObject( GDIObjectType eType, void* pStyle )
}
}
}
- UINT32 nIndex;
+ sal_uInt32 nIndex;
for ( nIndex = 0; nIndex < vGDIObj.size(); nIndex++ )
{
if ( vGDIObj[ nIndex ] == NULL )
@@ -809,7 +809,7 @@ void WinMtfOutput::CreateObject( GDIObjectType eType, void* pStyle )
//-----------------------------------------------------------------------------------
-void WinMtfOutput::CreateObject( INT32 nIndex, GDIObjectType eType, void* pStyle )
+void WinMtfOutput::CreateObject( sal_Int32 nIndex, GDIObjectType eType, void* pStyle )
{
if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 )
{
@@ -832,7 +832,7 @@ void WinMtfOutput::CreateObject( INT32 nIndex, GDIObjectType eType, void* pStyle
}
}
}
- if ( (UINT32)nIndex >= vGDIObj.size() )
+ if ( (sal_uInt32)nIndex >= vGDIObj.size() )
ImplResizeObjectArry( nIndex + 16 );
if ( vGDIObj[ nIndex ] != NULL )
@@ -968,7 +968,7 @@ WinMtfOutput::~WinMtfOutput()
else
mpGDIMetaFile->SetPrefSize( mrclFrame.GetSize() );
- for ( UINT32 i = 0; i < vGDIObj.size(); i++ )
+ for ( sal_uInt32 i = 0; i < vGDIObj.size(); i++ )
delete vGDIObj[ i ];
};
@@ -1010,7 +1010,7 @@ void WinMtfOutput::UpdateClipRegion()
void WinMtfOutput::ImplSetNonPersistentLineColorTransparenz()
{
Color aColor( COL_TRANSPARENT);
- WinMtfLineStyle aTransparentLine( aColor, TRUE );
+ WinMtfLineStyle aTransparentLine( aColor, sal_True );
if ( ! ( maLatestLineStyle == aTransparentLine ) )
{
maLatestLineStyle = aTransparentLine;
@@ -1044,7 +1044,7 @@ void WinMtfOutput::UpdateFillStyle()
//-----------------------------------------------------------------------------------
-sal_uInt32 WinMtfOutput::SetRasterOp( UINT32 nRasterOp )
+sal_uInt32 WinMtfOutput::SetRasterOp( sal_uInt32 nRasterOp )
{
sal_uInt32 nRetROP = mnRop;
if ( nRasterOp != mnRop )
@@ -1077,8 +1077,8 @@ sal_uInt32 WinMtfOutput::SetRasterOp( UINT32 nRasterOp )
{
aNopFillStyle = maFillStyle;
aNopLineStyle = maLineStyle;
- maFillStyle = WinMtfFillStyle( Color( COL_TRANSPARENT ), TRUE );
- maLineStyle = WinMtfLineStyle( Color( COL_TRANSPARENT ), TRUE );
+ maFillStyle = WinMtfFillStyle( Color( COL_TRANSPARENT ), sal_True );
+ maLineStyle = WinMtfLineStyle( Color( COL_TRANSPARENT ), sal_True );
mbNopMode = sal_True;
}
}
@@ -1108,7 +1108,7 @@ void WinMtfOutput::StrokeAndFillPath( sal_Bool bStroke, sal_Bool bFill )
if ( !bStroke )
{
mpGDIMetaFile->AddAction( new MetaPushAction( PUSH_LINECOLOR ) );
- mpGDIMetaFile->AddAction( new MetaLineColorAction( Color(), FALSE ) );
+ mpGDIMetaFile->AddAction( new MetaLineColorAction( Color(), sal_False ) );
}
if ( aPathObj.Count() == 1 )
mpGDIMetaFile->AddAction( new MetaPolygonAction( aPathObj.GetObject( 0 ) ) );
@@ -1173,7 +1173,7 @@ void WinMtfOutput::DrawLine( const Point& rSource, const Point& rDest )
//-----------------------------------------------------------------------------------
-void WinMtfOutput::DrawRect( const Rectangle& rRect, BOOL bEdge )
+void WinMtfOutput::DrawRect( const Rectangle& rRect, sal_Bool bEdge )
{
UpdateClipRegion();
UpdateFillStyle();
@@ -1247,7 +1247,7 @@ void WinMtfOutput::DrawEllipse( const Rectangle& rRect )
//-----------------------------------------------------------------------------------
-void WinMtfOutput::DrawArc( const Rectangle& rRect, const Point& rStart, const Point& rEnd, BOOL bTo )
+void WinMtfOutput::DrawArc( const Rectangle& rRect, const Point& rStart, const Point& rEnd, sal_Bool bTo )
{
UpdateClipRegion();
UpdateLineStyle();
@@ -1349,7 +1349,7 @@ void WinMtfOutput::DrawPolygon( Polygon& rPolygon, sal_Bool bRecordPath )
{
if ( maLineStyle.aLineInfo.GetWidth() || ( maLineStyle.aLineInfo.GetStyle() == LINE_DASH ) )
{
- USHORT nCount = rPolygon.GetSize();
+ sal_uInt16 nCount = rPolygon.GetSize();
if ( nCount )
{
if ( rPolygon[ nCount - 1 ] != rPolygon[ 0 ] )
@@ -1564,7 +1564,7 @@ void WinMtfOutput::DrawText( Point& rPosition, String& rText, sal_Int32* pDXArry
pVDev->SetFont( maFont );
if( pDXArry )
{
- UINT32 nLen = rText.Len();
+ sal_uInt32 nLen = rText.Len();
nTextWidth = pVDev->GetTextWidth( rText.GetChar( (sal_uInt16)( nLen - 1 ) ) );
if( nLen > 1 )
nTextWidth += pDXArry[ nLen - 2 ];
@@ -1644,7 +1644,7 @@ void WinMtfOutput::ImplDrawBitmap( const Point& rPos, const Size& rSize, const B
const Point aEmptyPoint;
// #i50672# Extract whole VDev content (to match size of rBitmap)
- aVDev.EnableMapMode( FALSE );
+ aVDev.EnableMapMode( sal_False );
Bitmap aMask( aVDev.GetBitmap( aEmptyPoint, aSizePixel ).CreateMask( Color( COL_WHITE ) ) );
if ( aBmpEx.IsTransparent() )
@@ -1713,7 +1713,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList )
{ // patterns aren't well supported yet
sal_uInt32 nOldRop = SetRasterOp( ROP_OVERPAINT ); // in this case nRasterOperation is either 0 or 0xff
UpdateFillStyle();
- DrawRect( aRect, FALSE );
+ DrawRect( aRect, sal_False );
SetRasterOp( nOldRop );
}
else
@@ -1778,7 +1778,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList )
if ( nOperation == 0x1 )
{
SetRasterOp( R2_NOT );
- DrawRect( aRect, FALSE );
+ DrawRect( aRect, sal_False );
}
}
break;
@@ -1796,7 +1796,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList )
if ( nOperation == 0x7 )
{
SetRasterOp( R2_NOT );
- DrawRect( aRect, FALSE );
+ DrawRect( aRect, sal_False );
}
}
break;
@@ -1805,7 +1805,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList )
case 0xb :
{
SetRasterOp( R2_NOT );
- DrawRect( aRect, FALSE );
+ DrawRect( aRect, sal_False );
SetRasterOp( R2_COPYPEN );
Bitmap aMask( aBitmap );
aBitmap.Invert();
@@ -1816,7 +1816,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList )
if ( nOperation == 0xb )
{
SetRasterOp( R2_NOT );
- DrawRect( aRect, FALSE );
+ DrawRect( aRect, sal_False );
}
}
break;
@@ -1833,7 +1833,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList )
if ( nOperation == 0xd )
{
SetRasterOp( R2_NOT );
- DrawRect( aRect, FALSE );
+ DrawRect( aRect, sal_False );
}
}
break;
@@ -1845,7 +1845,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList )
if ( nOperation == 0x9 )
{
SetRasterOp( R2_NOT );
- DrawRect( aRect, FALSE );
+ DrawRect( aRect, sal_False );
}
}
break;
@@ -1855,7 +1855,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList )
{ // in this case nRasterOperation is either 0 or 0xff
maFillStyle = WinMtfFillStyle( Color( nRasterOperation, nRasterOperation, nRasterOperation ) );
UpdateFillStyle();
- DrawRect( aRect, FALSE );
+ DrawRect( aRect, sal_False );
}
break;
@@ -1871,7 +1871,7 @@ void WinMtfOutput::ResolveBitmapActions( List& rSaveList )
case 0x5 : // only destination is used
{
SetRasterOp( R2_NOT );
- DrawRect( aRect, FALSE );
+ DrawRect( aRect, sal_False );
}
case 0xa : // no operation
break;
@@ -1900,7 +1900,7 @@ void WinMtfOutput::SetDevOrg( const Point& rPoint )
//-----------------------------------------------------------------------------------
-void WinMtfOutput::SetDevOrgOffset( INT32 nXAdd, INT32 nYAdd )
+void WinMtfOutput::SetDevOrgOffset( sal_Int32 nXAdd, sal_Int32 nYAdd )
{
mnDevOrgX += nXAdd;
mnDevOrgY += nYAdd;
@@ -1942,7 +1942,7 @@ void WinMtfOutput::SetWinOrg( const Point& rPoint )
//-----------------------------------------------------------------------------------
-void WinMtfOutput::SetWinOrgOffset( INT32 nXAdd, INT32 nYAdd )
+void WinMtfOutput::SetWinOrgOffset( sal_Int32 nXAdd, sal_Int32 nYAdd )
{
mnWinOrgX += nXAdd;
mnWinOrgY += nYAdd;
@@ -2036,7 +2036,7 @@ void WinMtfOutput::SetWorldTransform( const XForm& rXForm )
//-----------------------------------------------------------------------------------
-void WinMtfOutput::ModifyWorldTransform( const XForm& rXForm, UINT32 nMode )
+void WinMtfOutput::ModifyWorldTransform( const XForm& rXForm, sal_uInt32 nMode )
{
switch( nMode )
{
diff --git a/svtools/source/filter.vcl/wmf/winmtf.hxx b/svtools/source/filter.vcl/wmf/winmtf.hxx
index fb4fd2fe0c57..299d297c90bc 100644
--- a/svtools/source/filter.vcl/wmf/winmtf.hxx
+++ b/svtools/source/filter.vcl/wmf/winmtf.hxx
@@ -144,19 +144,19 @@
struct LOGFONTW
{
- INT32 lfHeight;
- INT32 lfWidth;
- INT32 lfEscapement;
- INT32 lfOrientation;
- INT32 lfWeight;
- BYTE lfItalic;
- BYTE lfUnderline;
- BYTE lfStrikeOut;
- BYTE lfCharSet;
- BYTE lfOutPrecision;
- BYTE lfClipPrecision;
- BYTE lfQuality;
- BYTE lfPitchAndFamily;
+ sal_Int32 lfHeight;
+ sal_Int32 lfWidth;
+ sal_Int32 lfEscapement;
+ sal_Int32 lfOrientation;
+ sal_Int32 lfWeight;
+ sal_uInt8 lfItalic;
+ sal_uInt8 lfUnderline;
+ sal_uInt8 lfStrikeOut;
+ sal_uInt8 lfCharSet;
+ sal_uInt8 lfOutPrecision;
+ sal_uInt8 lfClipPrecision;
+ sal_uInt8 lfQuality;
+ sal_uInt8 lfPitchAndFamily;
String alfFaceName;
};
@@ -367,23 +367,23 @@ struct WinMtfFontStyle
struct WinMtfFillStyle
{
Color aFillColor;
- BOOL bTransparent;
+ sal_Bool bTransparent;
WinMtfFillStyle() :
aFillColor ( Color( COL_BLACK ) ),
- bTransparent( FALSE )
+ bTransparent( sal_False )
{
};
- WinMtfFillStyle( const Color& rColor, BOOL bTrans = FALSE ) :
+ WinMtfFillStyle( const Color& rColor, sal_Bool bTrans = sal_False ) :
aFillColor ( rColor ),
bTransparent( bTrans )
{
};
- BOOL operator==( const WinMtfFillStyle& rStyle )
+ sal_Bool operator==( const WinMtfFillStyle& rStyle )
{ return ( ( aFillColor == rStyle.aFillColor ) && ( bTransparent == rStyle.bTransparent ) ); };
- BOOL operator==( WinMtfFillStyle* pStyle )
+ sal_Bool operator==( WinMtfFillStyle* pStyle )
{ return ( ( aFillColor == pStyle->aFillColor ) && ( bTransparent == pStyle->bTransparent ) ); };
void operator=( const WinMtfFillStyle& rStyle ) { aFillColor = rStyle.aFillColor; bTransparent = rStyle.bTransparent; };
void operator=( WinMtfFillStyle* pStyle ) { aFillColor = pStyle->aFillColor; bTransparent = pStyle->bTransparent; };
@@ -395,23 +395,23 @@ struct WinMtfLineStyle
{
Color aLineColor;
LineInfo aLineInfo;
- BOOL bTransparent;
+ sal_Bool bTransparent;
WinMtfLineStyle() :
aLineColor ( COL_BLACK ),
- bTransparent( FALSE ) {};
+ bTransparent( sal_False ) {};
- WinMtfLineStyle( const Color& rColor, BOOL bTrans = FALSE ) :
+ WinMtfLineStyle( const Color& rColor, sal_Bool bTrans = sal_False ) :
aLineColor ( rColor ),
bTransparent( bTrans ) {};
- WinMtfLineStyle( const Color& rColor, const LineInfo rStyle, BOOL bTrans = FALSE ) :
+ WinMtfLineStyle( const Color& rColor, const LineInfo rStyle, sal_Bool bTrans = sal_False ) :
aLineColor ( rColor ),
aLineInfo ( rStyle ),
bTransparent( bTrans ) {};
- BOOL operator==( const WinMtfLineStyle& rStyle ) { return ( ( aLineColor == rStyle.aLineColor ) && ( bTransparent == rStyle.bTransparent ) && ( aLineInfo == rStyle.aLineInfo ) ); };
- BOOL operator==( WinMtfLineStyle* pStyle ) { return ( ( aLineColor == pStyle->aLineColor ) && ( bTransparent == pStyle->bTransparent ) && ( aLineInfo == pStyle->aLineInfo ) ); };
+ sal_Bool operator==( const WinMtfLineStyle& rStyle ) { return ( ( aLineColor == rStyle.aLineColor ) && ( bTransparent == rStyle.bTransparent ) && ( aLineInfo == rStyle.aLineInfo ) ); };
+ sal_Bool operator==( WinMtfLineStyle* pStyle ) { return ( ( aLineColor == pStyle->aLineColor ) && ( bTransparent == pStyle->bTransparent ) && ( aLineInfo == pStyle->aLineInfo ) ); };
void operator=( const WinMtfLineStyle& rStyle )
{
aLineColor = rStyle.aLineColor;
@@ -480,9 +480,9 @@ struct BSaveStruct
{
Bitmap aBmp;
Rectangle aOutRect;
- UINT32 nWinRop;
+ sal_uInt32 nWinRop;
- BSaveStruct( const Bitmap& rBmp, const Rectangle& rOutRect, UINT32 nRop ) :
+ BSaveStruct( const Bitmap& rBmp, const Rectangle& rOutRect, sal_uInt32 nRop ) :
aBmp( rBmp ), aOutRect( rOutRect ), nWinRop( nRop ){};
};
@@ -594,7 +594,7 @@ class WinMtfOutput
void ImplMap( Font& rFont );
Polygon& ImplMap( Polygon& rPolygon );
PolyPolygon& ImplMap( PolyPolygon& rPolyPolygon );
- void ImplResizeObjectArry( UINT32 nNewEntry );
+ void ImplResizeObjectArry( sal_uInt32 nNewEntry );
void ImplSetNonPersistentLineColorTransparenz();
void ImplDrawClippedPolyPolygon( const PolyPolygon& rPolyPoly );
void ImplDrawBitmap( const Point& rPos, const Size& rSize, const BitmapEx rBitmap );
@@ -602,12 +602,12 @@ class WinMtfOutput
public:
void SetDevOrg( const Point& rPoint );
- void SetDevOrgOffset( INT32 nXAdd, INT32 nYAdd );
+ void SetDevOrgOffset( sal_Int32 nXAdd, sal_Int32 nYAdd );
void SetDevExt( const Size& rSize );
void ScaleDevExt( double fX, double fY );
void SetWinOrg( const Point& rPoint );
- void SetWinOrgOffset( INT32 nX, INT32 nY );
+ void SetWinOrgOffset( sal_Int32 nX, sal_Int32 nY );
void SetWinExt( const Size& rSize );
void ScaleWinExt( double fX, double fY );
@@ -619,24 +619,24 @@ class WinMtfOutput
sal_uInt32 GetMapMode() const { return mnMapMode; };
void SetMapMode( sal_uInt32 mnMapMode );
void SetWorldTransform( const XForm& rXForm );
- void ModifyWorldTransform( const XForm& rXForm, UINT32 nMode );
+ void ModifyWorldTransform( const XForm& rXForm, sal_uInt32 nMode );
void Push();
void Pop();
- UINT32 SetRasterOp( UINT32 nRasterOp );
+ sal_uInt32 SetRasterOp( sal_uInt32 nRasterOp );
void StrokeAndFillPath( sal_Bool bStroke, sal_Bool bFill );
void SetGfxMode( sal_Int32 nGfxMode ){ mnGfxMode = nGfxMode; };
sal_Int32 GetGfxMode() const { return mnGfxMode; };
- void SetBkMode( UINT32 nMode );
+ void SetBkMode( sal_uInt32 nMode );
void SetBkColor( const Color& rColor );
void SetTextColor( const Color& rColor );
- void SetTextAlign( UINT32 nAlign );
+ void SetTextAlign( sal_uInt32 nAlign );
void CreateObject( GDIObjectType, void* pStyle = NULL );
- void CreateObject( INT32 nIndex, GDIObjectType, void* pStyle = NULL );
- void DeleteObject( INT32 nIndex );
- void SelectObject( INT32 nIndex );
+ void CreateObject( sal_Int32 nIndex, GDIObjectType, void* pStyle = NULL );
+ void DeleteObject( sal_Int32 nIndex );
+ void SelectObject( sal_Int32 nIndex );
CharSet GetCharSet(){ return maFont.GetCharSet(); };
void SetFont( const Font& rFont );
const Font& GetFont() const;
@@ -651,10 +651,10 @@ class WinMtfOutput
void LineTo( const Point& rPoint, sal_Bool bRecordPath = sal_False );
void DrawPixel( const Point& rSource, const Color& rColor );
void DrawLine( const Point& rSource, const Point& rDest );
- void DrawRect( const Rectangle& rRect, BOOL bEdge = TRUE );
+ void DrawRect( const Rectangle& rRect, sal_Bool bEdge = sal_True );
void DrawRoundRect( const Rectangle& rRect, const Size& rSize );
void DrawEllipse( const Rectangle& rRect );
- void DrawArc( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle, BOOL bDrawTo = FALSE );
+ void DrawArc( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle, sal_Bool bDrawTo = sal_False );
void DrawPie( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle );
void DrawChord( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle );
void DrawPolygon( Polygon& rPolygon, sal_Bool bRecordPath = sal_False );
@@ -685,7 +685,7 @@ class WinMtf
WinMtfOutput* pOut; //
SvStream* pWMF; // Die einzulesende WMF/EMF-Datei
- UINT32 nStartPos, nEndPos;
+ sal_uInt32 nStartPos, nEndPos;
List aBmpSaveList;
FilterConfigItem* pFilterConfigItem;
@@ -695,7 +695,7 @@ class WinMtf
// Sorgt dafuer, das aSampledBrush der aktuelle Brush des GDIMetaFiles ist.
Color ReadColor();
- void Callback( USHORT nPercent );
+ void Callback( sal_uInt16 nPercent );
WinMtf( WinMtfOutput* pOut, SvStream& rStreamWMF, FilterConfigItem* pConfigItem = NULL );
~WinMtf();
@@ -711,16 +711,16 @@ class EnhWMFReader : public WinMtf
sal_Bool bRecordPath;
sal_Int32 nRecordCount;
- BOOL ReadHeader();
- Rectangle ReadRectangle( INT32, INT32, INT32, INT32 ); // Liesst und konvertiert ein Rechteck
- void ImplExtTextOut( BOOL bWideCharakter );
+ sal_Bool ReadHeader();
+ Rectangle ReadRectangle( sal_Int32, sal_Int32, sal_Int32, sal_Int32 ); // Liesst und konvertiert ein Rechteck
+ void ImplExtTextOut( sal_Bool bWideCharakter );
public:
EnhWMFReader( SvStream& rStreamWMF, GDIMetaFile& rGDIMetaFile, FilterConfigItem* pConfigItem = NULL )
: WinMtf( new WinMtfOutput( rGDIMetaFile ), rStreamWMF, pConfigItem ), bRecordPath( sal_False ) {};
~EnhWMFReader();
- BOOL ReadEnhWMF();
+ sal_Bool ReadEnhWMF();
};
//============================ WMFReader ==================================
@@ -730,7 +730,7 @@ class WMFReader : public WinMtf
private:
VirtualDevice aVDev; // just for the purpose of "IsFontAvailable"
- UINT16 nUnitsPerInch;
+ sal_uInt16 nUnitsPerInch;
sal_uInt32 nRecSize;
// embedded EMF data
@@ -750,10 +750,10 @@ private:
sal_uInt32 nUnicodeEscapeAction;
// Liesst den Kopf der WMF-Datei
- BOOL ReadHeader();
+ sal_Bool ReadHeader();
// Liesst die Parameter des Rocords mit der Funktionsnummer nFunction.
- void ReadRecordParams( USHORT nFunction );
+ void ReadRecordParams( sal_uInt16 nFunction );
Point ReadPoint(); // Liesst und konvertiert einen Punkt (erst X dann Y)
Point ReadYX(); // Liesst und konvertiert einen Punkt (erst Y dann X)
diff --git a/svtools/source/filter.vcl/wmf/winwmf.cxx b/svtools/source/filter.vcl/wmf/winwmf.cxx
index cea1ab490b04..880841cd36f8 100644
--- a/svtools/source/filter.vcl/wmf/winwmf.cxx
+++ b/svtools/source/filter.vcl/wmf/winwmf.cxx
@@ -156,7 +156,7 @@ Size WMFReader::ReadYXExt()
// ------------------------------------------------------------------------
-void WMFReader::ReadRecordParams( USHORT nFunc )
+void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
{
switch( nFunc )
{
@@ -168,7 +168,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
case W_META_SETBKMODE:
{
- USHORT nDat;
+ sal_uInt16 nDat;
*pWMF >> nDat;
pOut->SetBkMode( nDat );
}
@@ -185,7 +185,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
case W_META_SETROP2:
{
- UINT16 nROP2;
+ sal_uInt16 nROP2;
*pWMF >> nROP2;
pOut->SetRasterOp( nROP2 );
}
@@ -322,7 +322,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
case W_META_POLYGON:
{
- USHORT i,nPoints;
+ sal_uInt16 i,nPoints;
*pWMF >> nPoints;
Polygon aPoly( nPoints );
for( i = 0; i < nPoints; i++ )
@@ -333,13 +333,13 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
case W_META_POLYPOLYGON:
{
- USHORT i, nPoly, nPoints;
- USHORT* pnPoints;
+ sal_uInt16 i, nPoly, nPoints;
+ sal_uInt16* pnPoints;
Point* pPtAry;
// Anzahl der Polygone:
*pWMF >> nPoly;
// Anzahl der Punkte eines jeden Polygons holen, Gesammtzahl der Punkte ermitteln:
- pnPoints = new USHORT[ nPoly ];
+ pnPoints = new sal_uInt16[ nPoly ];
nPoints = 0;
for( i = 0; i < nPoly; i++ )
{
@@ -360,7 +360,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
case W_META_POLYLINE:
{
- USHORT i,nPoints;
+ sal_uInt16 i,nPoints;
*pWMF >> nPoints;
Polygon aPoly( nPoints );
for( i = 0; i < nPoints; i++ )
@@ -396,7 +396,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
case W_META_TEXTOUT:
{
- USHORT nLength;
+ sal_uInt16 nLength;
*pWMF >> nLength;
if ( nLength )
{
@@ -453,7 +453,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
sal_uInt32 nMaxStreamPos = nRecordPos + ( nRecordSize << 1 );
sal_Int32 nDxArySize = nMaxStreamPos - pWMF->Tell();
sal_Int32 nDxAryEntries = nDxArySize >> 1;
- sal_Bool bUseDXAry = FALSE;
+ sal_Bool bUseDXAry = sal_False;
if ( ( ( nDxAryEntries % nOriginalTextLen ) == 0 ) && ( nNewTextLen <= nOriginalTextLen ) )
{
@@ -481,7 +481,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
pDXAry[ i ] = nDx;
}
if ( i == nNewTextLen )
- bUseDXAry = TRUE;
+ bUseDXAry = sal_True;
}
if ( pDXAry && bUseDXAry )
pOut->DrawText( aPosition, aText, pDXAry );
@@ -496,7 +496,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
case W_META_SELECTOBJECT:
{
- INT16 nObjIndex;
+ sal_Int16 nObjIndex;
*pWMF >> nObjIndex;
pOut->SelectObject( nObjIndex );
}
@@ -504,7 +504,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
case W_META_SETTEXTALIGN:
{
- UINT16 nAlign;
+ sal_uInt16 nAlign;
*pWMF >> nAlign;
pOut->SetTextAlign( nAlign );
}
@@ -602,14 +602,14 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
{
if ( nWinROP == PATCOPY )
*pWMF >> nUsage; // i don't know anything of this parameter, so its called nUsage
- // pOut->DrawRect( Rectangle( ReadYX(), aDestSize ), FALSE );
+ // pOut->DrawRect( Rectangle( ReadYX(), aDestSize ), sal_False );
Size aDestSize( ReadYXExt() );
if ( aDestSize.Width() && aDestSize.Height() ) // #92623# do not try to read buggy bitmaps
{
Rectangle aDestRect( ReadYX(), aDestSize );
if ( nWinROP != PATCOPY )
- aBmp.Read( *pWMF, FALSE );
+ aBmp.Read( *pWMF, sal_False );
// test if it is sensible to crop
if ( nSye && nSxe &&
@@ -629,18 +629,18 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
{
Bitmap aBmp;
BitmapReadAccess* pBmp;
- UINT32 nRed = 0, nGreen = 0, nBlue = 0, nCount = 1;
- UINT16 nFunction;
+ sal_uInt32 nRed = 0, nGreen = 0, nBlue = 0, nCount = 1;
+ sal_uInt16 nFunction;
*pWMF >> nFunction >> nFunction;
- aBmp.Read( *pWMF, FALSE );
+ aBmp.Read( *pWMF, sal_False );
pBmp = aBmp.AcquireReadAccess();
if ( pBmp )
{
- for ( INT32 y = 0; y < pBmp->Height(); y++ )
+ for ( sal_Int32 y = 0; y < pBmp->Height(); y++ )
{
- for ( INT32 x = 0; x < pBmp->Width(); x++ )
+ for ( sal_Int32 x = 0; x < pBmp->Width(); x++ )
{
const BitmapColor aColor( pBmp->GetColor( y, x ) );
@@ -654,14 +654,14 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
nCount++;
aBmp.ReleaseAccess( pBmp );
}
- Color aColor( (BYTE)( nRed / nCount ), (BYTE)( nGreen / nCount ), (BYTE)( nBlue / nCount ) );
- pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( aColor, FALSE ) );
+ Color aColor( (sal_uInt8)( nRed / nCount ), (sal_uInt8)( nGreen / nCount ), (sal_uInt8)( nBlue / nCount ) );
+ pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( aColor, sal_False ) );
}
break;
case W_META_DELETEOBJECT:
{
- INT16 nIndex;
+ sal_Int16 nIndex;
*pWMF >> nIndex;
pOut->DeleteObject( nIndex );
}
@@ -675,29 +675,29 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
case W_META_CREATEBRUSH:
{
- pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( Color( COL_WHITE ), FALSE ) );
+ pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( Color( COL_WHITE ), sal_False ) );
}
break;
case W_META_CREATEPATTERNBRUSH:
{
- pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( Color( COL_WHITE ), FALSE ) );
+ pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( Color( COL_WHITE ), sal_False ) );
}
break;
case W_META_CREATEPENINDIRECT:
{
LineInfo aLineInfo;
- USHORT nStyle, nWidth, nHeight;
+ sal_uInt16 nStyle, nWidth, nHeight;
*pWMF >> nStyle >> nWidth >> nHeight;
if ( nWidth )
aLineInfo.SetWidth( nWidth );
- BOOL bTransparent = FALSE;
- UINT16 nDashCount = 0;
- UINT16 nDotCount = 0;
+ sal_Bool bTransparent = sal_False;
+ sal_uInt16 nDashCount = 0;
+ sal_uInt16 nDotCount = 0;
switch( nStyle )
{
case PS_DASHDOTDOT :
@@ -711,7 +711,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
nDashCount++;
break;
case PS_NULL :
- bTransparent = TRUE;
+ bTransparent = sal_True;
aLineInfo.SetStyle( LINE_NONE );
break;
default :
@@ -731,9 +731,9 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
case W_META_CREATEBRUSHINDIRECT:
{
- USHORT nStyle;
+ sal_uInt16 nStyle;
*pWMF >> nStyle;
- pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( ReadColor(), ( nStyle == BS_HOLLOW ) ? TRUE : FALSE ) );
+ pOut->CreateObject( GDI_BRUSH, new WinMtfFillStyle( ReadColor(), ( nStyle == BS_HOLLOW ) ? sal_True : sal_False ) );
}
break;
@@ -741,7 +741,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
{
Size aFontSize;
char lfFaceName[ LF_FACESIZE ];
- INT16 lfEscapement, lfOrientation, lfWeight; // ( ehemals USHORT )
+ sal_Int16 lfEscapement, lfOrientation, lfWeight; // ( ehemals sal_uInt16 )
LOGFONTW aLogFont;
aFontSize = ReadYXExt();
@@ -796,11 +796,11 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
case W_META_PATBLT:
{
- UINT32 nROP, nOldROP;
+ sal_uInt32 nROP, nOldROP;
*pWMF >> nROP;
Size aSize = ReadYXExt();
nOldROP = pOut->SetRasterOp( nROP );
- pOut->DrawRect( Rectangle( ReadYX(), aSize ), FALSE );
+ pOut->DrawRect( Rectangle( ReadYX(), aSize ), sal_False );
pOut->SetRasterOp( nOldROP );
}
break;
@@ -996,7 +996,7 @@ void WMFReader::ReadRecordParams( USHORT nFunc )
// ------------------------------------------------------------------------
-BOOL WMFReader::ReadHeader()
+sal_Bool WMFReader::ReadHeader()
{
Rectangle aPlaceableBound;
sal_uInt32 nl, nStrmPos = pWMF->Tell();
@@ -1007,7 +1007,7 @@ BOOL WMFReader::ReadHeader()
Size aWMFSize;
if ( nl == 0x9ac6cdd7L )
{
- INT16 nVal;
+ sal_Int16 nVal;
// hmf (Unused) ueberlesen wir
pWMF->SeekRel(2);
@@ -1055,7 +1055,7 @@ BOOL WMFReader::ReadHeader()
if( nl != 0x00090001 )
{
pWMF->SetError( SVSTREAM_FILEFORMAT_ERROR );
- return FALSE;
+ return sal_False;
}
pWMF->SeekRel( 2 ); // Version (von Windows)
@@ -1064,13 +1064,13 @@ BOOL WMFReader::ReadHeader()
pWMF->SeekRel( 4 ); // MaxRecord (Groesse des groessten Records in Words)
pWMF->SeekRel( 2 ); // NoParameters (Unused
- return TRUE;
+ return sal_True;
}
void WMFReader::ReadWMF()
{
- USHORT nFunction;
- ULONG nPos, nPercent, nLastPercent;
+ sal_uInt16 nFunction;
+ sal_uLong nPos, nPercent, nLastPercent;
nSkipActions = 0;
nCurrentAction = 0;
@@ -1090,7 +1090,7 @@ void WMFReader::ReadWMF()
nEndPos=pWMF->Seek( STREAM_SEEK_TO_END );
pWMF->Seek( nStartPos );
- Callback( (USHORT) ( nLastPercent = 0 ) );
+ Callback( (sal_uInt16) ( nLastPercent = 0 ) );
if ( ReadHeader() )
{
@@ -1099,14 +1099,14 @@ void WMFReader::ReadWMF()
if( nEndPos - nStartPos )
{
- while( TRUE )
+ while( sal_True )
{
nCurrentAction++;
nPercent = ( nPos - nStartPos ) * 100 / ( nEndPos - nStartPos );
if( nLastPercent + 4 <= nPercent )
{
- Callback( (USHORT) nPercent );
+ Callback( (sal_uInt16) nPercent );
nLastPercent = nPercent;
}
*pWMF >> nRecSize >> nFunction;
@@ -1288,7 +1288,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt
case W_META_POLYGON:
{
- USHORT i,nPoints;
+ sal_uInt16 i,nPoints;
*pStm >> nPoints;
for( i = 0; i < nPoints; i++ )
GetWinExtMax( ReadPoint(), rPlaceableBound, nMapMode );
@@ -1297,7 +1297,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt
case W_META_POLYPOLYGON:
{
- USHORT i, nPoly, nPoints = 0;
+ sal_uInt16 i, nPoly, nPoints = 0;
*pStm >> nPoly;
for( i = 0; i < nPoly; i++ )
{
@@ -1312,7 +1312,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt
case W_META_POLYLINE:
{
- USHORT i,nPoints;
+ sal_uInt16 i,nPoints;
*pStm >> nPoints;
for( i = 0; i < nPoints; i++ )
GetWinExtMax( ReadPoint(), rPlaceableBound, nMapMode );
@@ -1328,7 +1328,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt
case W_META_TEXTOUT:
{
- USHORT nLength;
+ sal_uInt16 nLength;
*pStm >> nLength;
// todo: we also have to take care of the text width
if ( nLength )
@@ -1383,7 +1383,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt
{
if ( nWinROP == PATCOPY )
*pStm >> nUsage; // i don't know anything of this parameter, so its called nUsage
- // pOut->DrawRect( Rectangle( ReadYX(), aDestSize ), FALSE );
+ // pOut->DrawRect( Rectangle( ReadYX(), aDestSize ), sal_False );
Size aDestSize( ReadYXExt() );
if ( aDestSize.Width() && aDestSize.Height() ) // #92623# do not try to read buggy bitmaps
@@ -1397,7 +1397,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt
case W_META_PATBLT:
{
- UINT32 nROP;
+ sal_uInt32 nROP;
*pStm >> nROP;
Size aSize = ReadYXExt();
GetWinExtMax( Rectangle( ReadYX(), aSize ), rPlaceableBound, nMapMode );
diff --git a/svtools/source/filter.vcl/wmf/wmf.cxx b/svtools/source/filter.vcl/wmf/wmf.cxx
index 25ca9f721b33..4e84cd920b56 100644
--- a/svtools/source/filter.vcl/wmf/wmf.cxx
+++ b/svtools/source/filter.vcl/wmf/wmf.cxx
@@ -35,18 +35,18 @@
// -----------------------------------------------------------------------------
-BOOL ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaFile, FilterConfigItem* pConfigItem )
+sal_Bool ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaFile, FilterConfigItem* pConfigItem )
{
- UINT32 nMetaType;
- UINT32 nOrgPos = rStreamWMF.Tell();
- UINT16 nOrigNumberFormat = rStreamWMF.GetNumberFormatInt();
+ sal_uInt32 nMetaType;
+ sal_uInt32 nOrgPos = rStreamWMF.Tell();
+ sal_uInt16 nOrigNumberFormat = rStreamWMF.GetNumberFormatInt();
rStreamWMF.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
rStreamWMF.Seek( 0x28 );
rStreamWMF >> nMetaType;
rStreamWMF.Seek( nOrgPos );
if ( nMetaType == 0x464d4520 )
{
- if ( EnhWMFReader( rStreamWMF, rGDIMetaFile, pConfigItem ).ReadEnhWMF() == FALSE )
+ if ( EnhWMFReader( rStreamWMF, rGDIMetaFile, pConfigItem ).ReadEnhWMF() == sal_False )
rStreamWMF.SetError( SVSTREAM_FILEFORMAT_ERROR );
}
else
@@ -59,18 +59,18 @@ BOOL ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaFile,
// -----------------------------------------------------------------------------
-BOOL ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem* pFilterConfigItem )
+sal_Bool ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem* pFilterConfigItem )
{
- UINT32 nMetaType;
- UINT32 nOrgPos = rStream.Tell();
- UINT16 nOrigNumberFormat = rStream.GetNumberFormatInt();
+ sal_uInt32 nMetaType;
+ sal_uInt32 nOrgPos = rStream.Tell();
+ sal_uInt16 nOrigNumberFormat = rStream.GetNumberFormatInt();
rStream.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
rStream.Seek( 0x28 );
rStream >> nMetaType;
rStream.Seek( nOrgPos );
if ( nMetaType == 0x464d4520 )
{
- if ( EnhWMFReader( rStream, rMTF, NULL ).ReadEnhWMF() == FALSE )
+ if ( EnhWMFReader( rStream, rMTF, NULL ).ReadEnhWMF() == sal_False )
rStream.SetError( SVSTREAM_FILEFORMAT_ERROR );
}
else
@@ -83,8 +83,8 @@ BOOL ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem*
// -----------------------------------------------------------------------------
-BOOL ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetStream,
- FilterConfigItem* pConfigItem, BOOL bPlaceable)
+sal_Bool ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetStream,
+ FilterConfigItem* pConfigItem, sal_Bool bPlaceable)
{
WMFWriter aWMFWriter;
return aWMFWriter.WriteWMF( rMTF, rTargetStream, pConfigItem, bPlaceable );
@@ -92,7 +92,7 @@ BOOL ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetStream
// -----------------------------------------------------------------------------
-BOOL ConvertGDIMetaFileToEMF( const GDIMetaFile & rMTF, SvStream & rTargetStream,
+sal_Bool ConvertGDIMetaFileToEMF( const GDIMetaFile & rMTF, SvStream & rTargetStream,
FilterConfigItem* pConfigItem )
{
EMFWriter aEMFWriter;
@@ -101,14 +101,14 @@ BOOL ConvertGDIMetaFileToEMF( const GDIMetaFile & rMTF, SvStream & rTargetStream
// -----------------------------------------------------------------------------
-BOOL WriteWindowMetafile( SvStream& rStream, const GDIMetaFile& rMTF )
+sal_Bool WriteWindowMetafile( SvStream& rStream, const GDIMetaFile& rMTF )
{
return WMFWriter().WriteWMF( rMTF, rStream, NULL );
}
// -----------------------------------------------------------------------------
-BOOL WriteWindowMetafileBits( SvStream& rStream, const GDIMetaFile& rMTF )
+sal_Bool WriteWindowMetafileBits( SvStream& rStream, const GDIMetaFile& rMTF )
{
- return WMFWriter().WriteWMF( rMTF, rStream, NULL, FALSE );
+ return WMFWriter().WriteWMF( rMTF, rStream, NULL, sal_False );
}
diff --git a/svtools/source/filter.vcl/wmf/wmfwr.cxx b/svtools/source/filter.vcl/wmf/wmfwr.cxx
index 4dff9732c7d0..36b84316271b 100644
--- a/svtools/source/filter.vcl/wmf/wmfwr.cxx
+++ b/svtools/source/filter.vcl/wmf/wmfwr.cxx
@@ -281,7 +281,7 @@ void WMFWriter::MayCallback()
{
if ( xStatusIndicator.is() )
{
- ULONG nPercent;
+ sal_uLong nPercent;
// Wir gehen mal einfach so davon aus, dass 16386 Actions einer Bitmap entsprechen
// (in der Regel wird ein Metafile entweder nur Actions oder einige Bitmaps und fast
@@ -302,7 +302,7 @@ void WMFWriter::MayCallback()
void WMFWriter::CountActionsAndBitmaps( const GDIMetaFile & rMTF )
{
- ULONG nAction, nActionCount;
+ sal_uLong nAction, nActionCount;
nActionCount = rMTF.GetActionCount();
@@ -370,7 +370,7 @@ void WMFWriter::WriteRectangle(const Rectangle & rRect)
void WMFWriter::WriteColor(const Color & rColor)
{
- *pWMF << (BYTE) rColor.GetRed() << (BYTE) rColor.GetGreen() << (BYTE) rColor.GetBlue() << (BYTE) 0;
+ *pWMF << (sal_uInt8) rColor.GetRed() << (sal_uInt8) rColor.GetGreen() << (sal_uInt8) rColor.GetBlue() << (sal_uInt8) 0;
}
@@ -384,12 +384,12 @@ void WMFWriter::WriteRecordHeader(sal_uInt32 nSizeWords, sal_uInt16 nType)
void WMFWriter::UpdateRecordHeader()
{
- ULONG nPos;
+ sal_uLong nPos;
sal_uInt32 nSize;
nPos=pWMF->Tell(); nSize=nPos-nActRecordPos;
if ((nSize & 1)!=0) {
- *pWMF << (BYTE)0;
+ *pWMF << (sal_uInt8)0;
nPos++; nSize++;
}
nSize/=2;
@@ -422,19 +422,19 @@ void WMFWriter::WMFRecord_CreateBrushIndirect(const Color& rColor)
WriteRecordHeader(0x00000007,W_META_CREATEBRUSHINDIRECT);
if( rColor==Color(COL_TRANSPARENT) )
- *pWMF << (UINT16) W_BS_HOLLOW;
+ *pWMF << (sal_uInt16) W_BS_HOLLOW;
else
- *pWMF << (UINT16) W_BS_SOLID;
+ *pWMF << (sal_uInt16) W_BS_SOLID;
WriteColor( rColor );
- *pWMF << (UINT16) 0;
+ *pWMF << (sal_uInt16) 0;
}
void WMFWriter::WMFRecord_CreateFontIndirect(const Font & rFont)
{
- USHORT nWeight,i;
- BYTE nPitchFamily;
+ sal_uInt16 nWeight,i;
+ sal_uInt8 nPitchFamily;
WriteRecordHeader(0x00000000,W_META_CREATEFONTINDIRECT);
WriteHeightWidth(Size(rFont.GetSize().Width(),-rFont.GetSize().Height()));
@@ -455,9 +455,9 @@ void WMFWriter::WMFRecord_CreateFontIndirect(const Font & rFont)
}
*pWMF << nWeight;
- if (rFont.GetItalic()==ITALIC_NONE) *pWMF << (BYTE)0; else *pWMF << (BYTE)1;
- if (rFont.GetUnderline()==UNDERLINE_NONE) *pWMF << (BYTE)0; else *pWMF << (BYTE)1;
- if (rFont.GetStrikeout()==STRIKEOUT_NONE) *pWMF << (BYTE)0; else *pWMF << (BYTE)1;
+ if (rFont.GetItalic()==ITALIC_NONE) *pWMF << (sal_uInt8)0; else *pWMF << (sal_uInt8)1;
+ if (rFont.GetUnderline()==UNDERLINE_NONE) *pWMF << (sal_uInt8)0; else *pWMF << (sal_uInt8)1;
+ if (rFont.GetStrikeout()==STRIKEOUT_NONE) *pWMF << (sal_uInt8)0; else *pWMF << (sal_uInt8)1;
CharSet eFontNameEncoding = rFont.GetCharSet();
sal_uInt8 nCharSet = rtl_getBestWindowsCharsetFromTextEncoding( eFontNameEncoding );
@@ -467,7 +467,7 @@ void WMFWriter::WMFRecord_CreateFontIndirect(const Font & rFont)
nCharSet = W_ANSI_CHARSET;
*pWMF << nCharSet;
- *pWMF << (BYTE)0 << (BYTE)0 << (BYTE)0;
+ *pWMF << (sal_uInt8)0 << (sal_uInt8)0 << (sal_uInt8)0;
switch (rFont.GetPitch()) {
case PITCH_FIXED: nPitchFamily=W_FIXED_PITCH; break;
@@ -496,7 +496,7 @@ void WMFWriter::WMFRecord_CreateFontIndirect(const Font & rFont)
void WMFWriter::WMFRecord_CreatePenIndirect(const Color& rColor, const LineInfo& rLineInfo )
{
WriteRecordHeader(0x00000008,W_META_CREATEPENINDIRECT);
- USHORT nStyle = rColor == Color( COL_TRANSPARENT ) ? W_PS_NULL : W_PS_SOLID;
+ sal_uInt16 nStyle = rColor == Color( COL_TRANSPARENT ) ? W_PS_NULL : W_PS_SOLID;
switch( rLineInfo.GetStyle() )
{
case LINE_DASH :
@@ -529,7 +529,7 @@ void WMFWriter::WMFRecord_CreatePenIndirect(const Color& rColor, const LineInfo&
WriteColor( rColor );
}
-void WMFWriter::WMFRecord_DeleteObject(USHORT nObjectHandle)
+void WMFWriter::WMFRecord_DeleteObject(sal_uInt16 nObjectHandle)
{
WriteRecordHeader(0x00000004,W_META_DELETEOBJECT);
*pWMF << nObjectHandle;
@@ -750,7 +750,7 @@ void WMFWriter::WMFRecord_Pie(const Rectangle & rRect, const Point & rStartPt, c
void WMFWriter::WMFRecord_Polygon(const Polygon & rPoly)
{
- USHORT nSize,i;
+ sal_uInt16 nSize,i;
Polygon aSimplePoly;
if ( rPoly.HasFlags() )
@@ -758,7 +758,7 @@ void WMFWriter::WMFRecord_Polygon(const Polygon & rPoly)
else
aSimplePoly = rPoly;
nSize = aSimplePoly.GetSize();
- WriteRecordHeader(((ULONG)nSize)*2+4,W_META_POLYGON);
+ WriteRecordHeader(((sal_uLong)nSize)*2+4,W_META_POLYGON);
*pWMF << nSize;
for (i=0; i<nSize; i++) WritePointXY(aSimplePoly.GetPoint(i));
}
@@ -766,14 +766,14 @@ void WMFWriter::WMFRecord_Polygon(const Polygon & rPoly)
void WMFWriter::WMFRecord_PolyLine(const Polygon & rPoly)
{
- USHORT nSize,i;
+ sal_uInt16 nSize,i;
Polygon aSimplePoly;
if ( rPoly.HasFlags() )
rPoly.AdaptiveSubdivide( aSimplePoly );
else
aSimplePoly = rPoly;
nSize=aSimplePoly.GetSize();
- WriteRecordHeader(((ULONG)nSize)*2+4,W_META_POLYLINE);
+ WriteRecordHeader(((sal_uLong)nSize)*2+4,W_META_POLYLINE);
*pWMF << nSize;
for (i=0; i<nSize; i++) WritePointXY(aSimplePoly.GetPoint(i));
}
@@ -782,7 +782,7 @@ void WMFWriter::WMFRecord_PolyLine(const Polygon & rPoly)
void WMFWriter::WMFRecord_PolyPolygon(const PolyPolygon & rPolyPoly)
{
const Polygon * pPoly;
- USHORT nCount,nSize,i,j;
+ sal_uInt16 nCount,nSize,i,j;
nCount=rPolyPoly.Count();
PolyPolygon aSimplePolyPoly( rPolyPoly );
@@ -797,7 +797,7 @@ void WMFWriter::WMFRecord_PolyPolygon(const PolyPolygon & rPolyPoly)
}
WriteRecordHeader(0,W_META_POLYPOLYGON);
*pWMF << nCount;
- for (i=0; i<nCount; i++) *pWMF << ((USHORT)(aSimplePolyPoly.GetObject(i).GetSize()));
+ for (i=0; i<nCount; i++) *pWMF << ((sal_uInt16)(aSimplePolyPoly.GetObject(i).GetSize()));
for (i=0; i<nCount; i++) {
pPoly=&(aSimplePolyPoly.GetObject(i));
nSize=pPoly->GetSize();
@@ -835,7 +835,7 @@ void WMFWriter::WMFRecord_SaveDC()
}
-void WMFWriter::WMFRecord_SelectObject(USHORT nObjectHandle)
+void WMFWriter::WMFRecord_SelectObject(sal_uInt16 nObjectHandle)
{
WriteRecordHeader(0x00000004,W_META_SELECTOBJECT);
*pWMF << nObjectHandle;
@@ -849,17 +849,17 @@ void WMFWriter::WMFRecord_SetBkColor(const Color & rColor)
}
-void WMFWriter::WMFRecord_SetBkMode(BOOL bTransparent)
+void WMFWriter::WMFRecord_SetBkMode(sal_Bool bTransparent)
{
WriteRecordHeader(0x00000004,W_META_SETBKMODE);
- if (bTransparent==TRUE) *pWMF << (USHORT)W_TRANSPARENT;
- else *pWMF << (USHORT)W_OPAQUE;
+ if (bTransparent==sal_True) *pWMF << (sal_uInt16)W_TRANSPARENT;
+ else *pWMF << (sal_uInt16)W_OPAQUE;
}
void WMFWriter::WMFRecord_SetStretchBltMode()
{
WriteRecordHeader( 0x00000004, W_META_SETSTRETCHBLTMODE );
- *pWMF << (USHORT) 3; // STRETCH_DELETESCANS
+ *pWMF << (sal_uInt16) 3; // STRETCH_DELETESCANS
}
void WMFWriter::WMFRecord_SetPixel(const Point & rPoint, const Color & rColor)
@@ -872,7 +872,7 @@ void WMFWriter::WMFRecord_SetPixel(const Point & rPoint, const Color & rColor)
void WMFWriter::WMFRecord_SetROP2(RasterOp eROP)
{
- USHORT nROP2;
+ sal_uInt16 nROP2;
switch (eROP) {
case ROP_INVERT: nROP2=W_R2_NOT; break;
@@ -884,9 +884,9 @@ void WMFWriter::WMFRecord_SetROP2(RasterOp eROP)
}
-void WMFWriter::WMFRecord_SetTextAlign(FontAlign eFontAlign, UINT32 eHorTextAlign)
+void WMFWriter::WMFRecord_SetTextAlign(FontAlign eFontAlign, sal_uInt32 eHorTextAlign)
{
- USHORT nAlign;
+ sal_uInt16 nAlign;
switch (eFontAlign) {
case ALIGN_TOP: nAlign=W_TA_TOP; break;
@@ -925,7 +925,7 @@ void WMFWriter::WMFRecord_SetWindowOrg(const Point & rPoint)
void WMFWriter::WMFRecord_StretchDIB( const Point & rPoint, const Size & rSize,
const Bitmap & rBitmap, sal_uInt32 nROP )
{
- ULONG nPosAnf,nPosEnd;
+ sal_uLong nPosAnf,nPosEnd;
nActBitmapPercent=50;
MayCallback();
@@ -985,14 +985,14 @@ void WMFWriter::WMFRecord_TextOut(const Point & rPoint, const String & rStr)
void WMFWriter::TrueTextOut(const Point & rPoint, const ByteString& rString)
{
- USHORT nLen,i;
+ sal_uInt16 nLen,i;
WriteRecordHeader(0,W_META_TEXTOUT);
nLen=rString.Len();
*pWMF << nLen;
for ( i = 0; i < nLen; i++ )
- *pWMF << (BYTE)rString.GetChar( i );
- if ((nLen&1)!=0) *pWMF << (BYTE)0;
+ *pWMF << (sal_uInt8)rString.GetChar( i );
+ if ((nLen&1)!=0) *pWMF << (sal_uInt8)0;
WritePointYX(rPoint);
UpdateRecordHeader();
}
@@ -1010,30 +1010,30 @@ void WMFWriter::WMFRecord_IntersectClipRect( const Rectangle& rRect )
}
-USHORT WMFWriter::AllocHandle()
+sal_uInt16 WMFWriter::AllocHandle()
{
- USHORT i;
+ sal_uInt16 i;
for (i=0; i<MAXOBJECTHANDLES; i++) {
- if (bHandleAllocated[i]==FALSE) {
- bHandleAllocated[i]=TRUE;
+ if (bHandleAllocated[i]==sal_False) {
+ bHandleAllocated[i]=sal_True;
return i;
}
}
- bStatus=FALSE;
+ bStatus=sal_False;
return 0xffff;
}
-void WMFWriter::FreeHandle(USHORT nObjectHandle)
+void WMFWriter::FreeHandle(sal_uInt16 nObjectHandle)
{
- if (nObjectHandle<MAXOBJECTHANDLES) bHandleAllocated[nObjectHandle]=FALSE;
+ if (nObjectHandle<MAXOBJECTHANDLES) bHandleAllocated[nObjectHandle]=sal_False;
}
void WMFWriter::CreateSelectDeletePen( const Color& rColor, const LineInfo& rLineInfo )
{
- USHORT nOldHandle;
+ sal_uInt16 nOldHandle;
nOldHandle=nDstPenHandle;
nDstPenHandle=AllocHandle();
@@ -1048,7 +1048,7 @@ void WMFWriter::CreateSelectDeletePen( const Color& rColor, const LineInfo& rLin
void WMFWriter::CreateSelectDeleteFont(const Font & rFont)
{
- USHORT nOldHandle;
+ sal_uInt16 nOldHandle;
nOldHandle=nDstFontHandle;
nDstFontHandle=AllocHandle();
@@ -1063,7 +1063,7 @@ void WMFWriter::CreateSelectDeleteFont(const Font & rFont)
void WMFWriter::CreateSelectDeleteBrush(const Color& rColor)
{
- USHORT nOldHandle;
+ sal_uInt16 nOldHandle;
nOldHandle=nDstBrushHandle;
nDstBrushHandle=AllocHandle();
@@ -1095,7 +1095,7 @@ void WMFWriter::SetLineAndFillAttr()
CreateSelectDeleteBrush( aDstFillColor );
}
if ( bDstIsClipping != bSrcIsClipping ||
- (bSrcIsClipping==TRUE && aDstClipRegion!=aSrcClipRegion)) {
+ (bSrcIsClipping==sal_True && aDstClipRegion!=aSrcClipRegion)) {
bDstIsClipping=bSrcIsClipping;
aDstClipRegion=aSrcClipRegion;
}
@@ -1180,7 +1180,7 @@ void WMFWriter::HandleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx:
void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
{
- ULONG nA, nACount;
+ sal_uLong nA, nACount;
MetaAction* pMA;
if( bStatus )
@@ -1698,8 +1698,8 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
const MetaEPSAction* pA = (const MetaEPSAction*)pMA;
const GDIMetaFile aGDIMetaFile( pA->GetSubstitute() );
- INT32 nCount = aGDIMetaFile.GetActionCount();
- for ( INT32 i = 0; i < nCount; i++ )
+ sal_Int32 nCount = aGDIMetaFile.GetActionCount();
+ for ( sal_Int32 i = 0; i < nCount; i++ )
{
const MetaAction* pMetaAct = aGDIMetaFile.GetAction( i );
if ( pMetaAct->GetType() == META_BMPSCALE_ACTION )
@@ -1802,9 +1802,9 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
MayCallback();
if (pWMF->GetError())
- bStatus=FALSE;
+ bStatus=sal_False;
- if(bStatus==FALSE)
+ if(bStatus==sal_False)
break;
}
}
@@ -1812,13 +1812,13 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
// ------------------------------------------------------------------------
-void WMFWriter::WriteHeader( const GDIMetaFile &, BOOL bPlaceable )
+void WMFWriter::WriteHeader( const GDIMetaFile &, sal_Bool bPlaceable )
{
if( bPlaceable )
{
- USHORT nCheckSum, nValue;
+ sal_uInt16 nCheckSum, nValue;
Size aSize( pVirDev->LogicToLogic(Size(1,1),MapMode(MAP_INCH), aTargetMapMode) );
- USHORT nUnitsPerInch = (USHORT) ( ( aSize.Width() + aSize.Height() ) >> 1 );
+ sal_uInt16 nUnitsPerInch = (sal_uInt16) ( ( aSize.Width() + aSize.Height() ) >> 1 );
nCheckSum=0;
nValue=0xcdd7; nCheckSum^=nValue; *pWMF << nValue;
@@ -1826,8 +1826,8 @@ void WMFWriter::WriteHeader( const GDIMetaFile &, BOOL bPlaceable )
nValue=0x0000; nCheckSum^=nValue; *pWMF << nValue;
nValue=0x0000; nCheckSum^=nValue; *pWMF << nValue;
nValue=0x0000; nCheckSum^=nValue; *pWMF << nValue;
- nValue=(USHORT) aTargetSize.Width(); nCheckSum^=nValue; *pWMF << nValue;
- nValue=(USHORT) aTargetSize.Height(); nCheckSum^=nValue; *pWMF << nValue;
+ nValue=(sal_uInt16) aTargetSize.Width(); nCheckSum^=nValue; *pWMF << nValue;
+ nValue=(sal_uInt16) aTargetSize.Height(); nCheckSum^=nValue; *pWMF << nValue;
nValue=nUnitsPerInch; nCheckSum^=nValue; *pWMF << nValue;
nValue=0x0000; nCheckSum^=nValue; *pWMF << nValue;
nValue=0x0000; nCheckSum^=nValue; *pWMF << nValue;
@@ -1848,13 +1848,13 @@ void WMFWriter::WriteHeader( const GDIMetaFile &, BOOL bPlaceable )
void WMFWriter::UpdateHeader()
{
- ULONG nPos;
+ sal_uLong nPos;
sal_uInt32 nFileSize;
nPos=pWMF->Tell(); // Endposition = Gesammtgroesse der Datei
nFileSize=nPos-nMetafileHeaderPos; // Groesse des 1. Headers abziehen
if ((nFileSize&1)!=0) { // ggf. auf ganze Worte aufrunden
- *pWMF << (BYTE)0;
+ *pWMF << (sal_uInt8)0;
nPos++;
nFileSize++;
}
@@ -1868,13 +1868,13 @@ void WMFWriter::UpdateHeader()
// ------------------------------------------------------------------------
-BOOL WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream,
- FilterConfigItem* pFConfigItem, BOOL bPlaceable )
+sal_Bool WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream,
+ FilterConfigItem* pFConfigItem, sal_Bool bPlaceable )
{
WMFWriterAttrStackMember * pAt;
- bEmbedEMF = TRUE;
- bStatus=TRUE;
+ bEmbedEMF = sal_True;
+ bStatus=sal_True;
pConvert = 0;
pVirDev = new VirtualDevice;
@@ -1921,8 +1921,8 @@ BOOL WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream,
pAttrStack=NULL;
- for (USHORT i=0; i<MAXOBJECTHANDLES; i++)
- bHandleAllocated[i]=FALSE;
+ for (sal_uInt16 i=0; i<MAXOBJECTHANDLES; i++)
+ bHandleAllocated[i]=sal_False;
nDstPenHandle=0xffff;
nDstFontHandle=0xffff;
@@ -1941,7 +1941,7 @@ BOOL WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream,
WriteEmbeddedEMF( rMTF );
WMFRecord_SetWindowOrg(Point(0,0));
WMFRecord_SetWindowExt(rMTF.GetPrefSize());
- WMFRecord_SetBkMode( TRUE );
+ WMFRecord_SetBkMode( sal_True );
eDstROP2 = eSrcRasterOp = ROP_OVERPAINT;
WMFRecord_SetROP2(eDstROP2);
@@ -1954,7 +1954,7 @@ BOOL WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream,
CreateSelectDeleteBrush( aDstFillColor );
aDstClipRegion = aSrcClipRegion = Region();
- bDstIsClipping = bSrcIsClipping = FALSE;
+ bDstIsClipping = bSrcIsClipping = sal_False;
Font aFont;
aFont.SetCharSet( GetExtendedTextEncoding( gsl_getSystemTextEncoding() ) );
@@ -1994,11 +1994,11 @@ BOOL WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream,
// ------------------------------------------------------------------------
-USHORT WMFWriter::CalcSaveTargetMapMode(MapMode& rMapMode,
+sal_uInt16 WMFWriter::CalcSaveTargetMapMode(MapMode& rMapMode,
const Size& rPrefSize)
{
Fraction aDivFrac(2, 1);
- USHORT nDivisor = 1;
+ sal_uInt16 nDivisor = 1;
Size aSize = pVirDev->LogicToLogic( rPrefSize, aSrcMapMode, rMapMode );
diff --git a/svtools/source/filter.vcl/wmf/wmfwr.hxx b/svtools/source/filter.vcl/wmf/wmfwr.hxx
index 9fe698b22c2e..c5830b3bab8f 100644
--- a/svtools/source/filter.vcl/wmf/wmfwr.hxx
+++ b/svtools/source/filter.vcl/wmf/wmfwr.hxx
@@ -69,9 +69,9 @@ class WMFWriter
{
private:
- BOOL bStatus;
+ sal_Bool bStatus;
- ULONG nLastPercent; // Mit welcher Zahl pCallback zuletzt aufgerufen wurde.
+ sal_uLong nLastPercent; // Mit welcher Zahl pCallback zuletzt aufgerufen wurde.
FilterConfigItem* pFilterConfigItem;
com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator;
@@ -81,11 +81,11 @@ private:
StarSymbolToMSMultiFont *pConvert;
MapMode aTargetMapMode;
Size aTargetSize;
- USHORT nTargetDivisor;
+ sal_uInt16 nTargetDivisor;
- ULONG nMetafileHeaderPos;
+ sal_uLong nMetafileHeaderPos;
sal_uInt32 nMaxRecordSize; // in Worten
- ULONG nActRecordPos;
+ sal_uLong nActRecordPos;
// Aktuelle Attribute im Quell-Metafile:
Color aSrcLineColor;
@@ -96,11 +96,11 @@ private:
FontAlign eSrcTextAlign;
Font aSrcFont;
MapMode aSrcMapMode;
- BOOL bSrcIsClipping;
+ sal_Bool bSrcIsClipping;
Region aSrcClipRegion;
WMFWriterAttrStackMember * pAttrStack;
- UINT32 eSrcHorTextAlign;
+ sal_uInt32 eSrcHorTextAlign;
// Aktuelle Attribute im Ziel-Metafile:
Color aDstLineColor;
@@ -111,28 +111,28 @@ private:
FontAlign eDstTextAlign;
Font aDstFont;
- UINT32 eDstHorTextAlign;
+ sal_uInt32 eDstHorTextAlign;
- BOOL bDstIsClipping; // ???: derzeit unberuecksichtigt
+ sal_Bool bDstIsClipping; // ???: derzeit unberuecksichtigt
Region aDstClipRegion; // ???: derzeit unberuecksichtigt
- BOOL bHandleAllocated[MAXOBJECTHANDLES]; // Welche Handles vergeben sind
- USHORT nDstPenHandle,nDstFontHandle,nDstBrushHandle; // Welche Handles die jeweiligen
+ sal_Bool bHandleAllocated[MAXOBJECTHANDLES]; // Welche Handles vergeben sind
+ sal_uInt16 nDstPenHandle,nDstFontHandle,nDstBrushHandle; // Welche Handles die jeweiligen
// Selected-Objects besitzen
// 0xffff = keines:
// Damit nicht bei jeder Operation alle Attribute verglichen werden muessen:
- ULONG nNumberOfActions; // Anzahl der Actions im GDIMetafile
- ULONG nNumberOfBitmaps; // Anzahl der Bitmaps
- ULONG nWrittenActions; // Anzahl der bereits verarbeiteten Actions beim Schreiben der Orders
- ULONG nWrittenBitmaps; // Anzahl der bereits geschriebenen Bitmaps
- ULONG nActBitmapPercent; // Wieviel Prozent die naechste Bitmap schon geschrieben ist.
+ sal_uLong nNumberOfActions; // Anzahl der Actions im GDIMetafile
+ sal_uLong nNumberOfBitmaps; // Anzahl der Bitmaps
+ sal_uLong nWrittenActions; // Anzahl der bereits verarbeiteten Actions beim Schreiben der Orders
+ sal_uLong nWrittenBitmaps; // Anzahl der bereits geschriebenen Bitmaps
+ sal_uLong nActBitmapPercent; // Wieviel Prozent die naechste Bitmap schon geschrieben ist.
- BOOL bEmbedEMF; // optionally embedd EMF data into WMF
+ sal_Bool bEmbedEMF; // optionally embedd EMF data into WMF
void MayCallback();
// Berechnet anhand der obigen 5 Parameter eine Prozentzahl
- // und macht dann ggf. einen Callback. Setzt bStatus auf FALSE wenn User abbrechen
+ // und macht dann ggf. einen Callback. Setzt bStatus auf sal_False wenn User abbrechen
// moechte.
void CountActionsAndBitmaps(const GDIMetaFile & rMTF);
@@ -154,14 +154,14 @@ private:
void UpdateRecordHeader();
// berichtig die Groesse des Records nach dem Schreiben der Parameter, wenn
// nSizeWords bei Aufruf von WriteRecordHeader(..) unbekannt war.
- // fuegt ggf. noch ein BYTE 0 ein damit Anzahl Bytes immer gerade.
+ // fuegt ggf. noch ein sal_uInt8 0 ein damit Anzahl Bytes immer gerade.
void WMFRecord_Arc(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt);
void WMFRecord_Chord(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt);
void WMFRecord_CreateBrushIndirect(const Color& rColor);
void WMFRecord_CreateFontIndirect(const Font & rFont);
void WMFRecord_CreatePenIndirect(const Color& rColor, const LineInfo& rLineInfo );
- void WMFRecord_DeleteObject(USHORT nObjectHandle);
+ void WMFRecord_DeleteObject(sal_uInt16 nObjectHandle);
void WMFRecord_Ellipse(const Rectangle & rRect);
void WMFRecord_Escape( sal_uInt32 nEsc, sal_uInt32 nLen, const sal_Int8* pData );
sal_Bool WMFRecord_Escape_Unicode( const Point& rPoint, const String& rStr, const sal_Int32 * pDXAry );
@@ -180,13 +180,13 @@ private:
void WMFRecord_RestoreDC();
void WMFRecord_RoundRect(const Rectangle & rRect, long nHorzRound, long nVertRound);
void WMFRecord_SaveDC();
- void WMFRecord_SelectObject(USHORT nObjectHandle);
+ void WMFRecord_SelectObject(sal_uInt16 nObjectHandle);
void WMFRecord_SetBkColor(const Color & rColor);
- void WMFRecord_SetBkMode(BOOL bTransparent);
+ void WMFRecord_SetBkMode(sal_Bool bTransparent);
void WMFRecord_SetStretchBltMode();
void WMFRecord_SetPixel(const Point & rPoint, const Color & rColor);
void WMFRecord_SetROP2(RasterOp eROP);
- void WMFRecord_SetTextAlign(FontAlign eFontAlign, UINT32 eHorTextAlign);
+ void WMFRecord_SetTextAlign(FontAlign eFontAlign, sal_uInt32 eHorTextAlign);
void WMFRecord_SetTextColor(const Color & rColor);
void WMFRecord_SetWindowExt(const Size & rSize);
void WMFRecord_SetWindowOrg(const Point & rPoint);
@@ -195,8 +195,8 @@ private:
void WMFRecord_EndOfFile();
void WMFRecord_IntersectClipRect( const Rectangle& rRect);
- USHORT AllocHandle();
- void FreeHandle(USHORT nObjectHandle);
+ sal_uInt16 AllocHandle();
+ void FreeHandle(sal_uInt16 nObjectHandle);
void CreateSelectDeletePen( const Color& rColor, const LineInfo& rLineInfo );
void CreateSelectDeleteFont(const Font & rFont);
void CreateSelectDeleteBrush(const Color& rColor);
@@ -207,7 +207,7 @@ private:
void HandleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon);
void WriteRecords(const GDIMetaFile & rMTF);
- void WriteHeader(const GDIMetaFile & rMTF, BOOL bPlaceable);
+ void WriteHeader(const GDIMetaFile & rMTF, sal_Bool bPlaceable);
void UpdateHeader();
void WriteEmbeddedEMF( const GDIMetaFile& rMTF );
@@ -217,13 +217,13 @@ private:
sal_uInt32 nRecCounts,
sal_uInt16 nCheckSum );
- USHORT CalcSaveTargetMapMode(MapMode& rMapMode, const Size& rPrefSize);
+ sal_uInt16 CalcSaveTargetMapMode(MapMode& rMapMode, const Size& rPrefSize);
public:
WMFWriter() {}
- BOOL WriteWMF(const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pFilterConfigItem, BOOL bPlaceable=TRUE);
+ sal_Bool WriteWMF(const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pFilterConfigItem, sal_Bool bPlaceable=sal_True);
};
#endif
diff --git a/svtools/source/graphic/descriptor.cxx b/svtools/source/graphic/descriptor.cxx
index 5db73e6cc2f3..6c808baa169d 100644
--- a/svtools/source/graphic/descriptor.cxx
+++ b/svtools/source/graphic/descriptor.cxx
@@ -457,7 +457,7 @@ void GraphicDescriptor::_getPropertyValues( const comphelper::PropertyMapEntry**
case( UNOGRAPHIC_BITSPERPIXEL ):
{
- USHORT nBitsPerPixel = 0;
+ sal_uInt16 nBitsPerPixel = 0;
if( mpGraphic )
{
diff --git a/svtools/source/graphic/descriptor.hxx b/svtools/source/graphic/descriptor.hxx
index bed7c64c0411..2a8c06723eb6 100644
--- a/svtools/source/graphic/descriptor.hxx
+++ b/svtools/source/graphic/descriptor.hxx
@@ -123,7 +123,7 @@ private:
::rtl::OUString maMimeType;
Size maSizePixel;
Size maSize100thMM;
- USHORT mnBitsPerPixel;
+ sal_uInt16 mnBitsPerPixel;
bool mbTransparent;
bool mbAlpha;
bool mbAnimated;
diff --git a/svtools/source/graphic/grfattr.cxx b/svtools/source/graphic/grfattr.cxx
index 757be42a104c..68c0ea9ae4a7 100644
--- a/svtools/source/graphic/grfattr.cxx
+++ b/svtools/source/graphic/grfattr.cxx
@@ -48,7 +48,7 @@ GraphicAttr::GraphicAttr() :
mnRPercent ( 0 ),
mnGPercent ( 0 ),
mnBPercent ( 0 ),
- mbInvert ( FALSE ),
+ mbInvert ( sal_False ),
mcTransparency ( 0 ),
meDrawMode ( GRAPHICDRAWMODE_STANDARD )
{
@@ -62,7 +62,7 @@ GraphicAttr::~GraphicAttr()
// ------------------------------------------------------------------------
-BOOL GraphicAttr::operator==( const GraphicAttr& rAttr ) const
+sal_Bool GraphicAttr::operator==( const GraphicAttr& rAttr ) const
{
return( ( mfGamma == rAttr.mfGamma ) &&
( mnMirrFlags == rAttr.mnMirrFlags ) &&
@@ -87,7 +87,7 @@ SvStream& operator>>( SvStream& rIStm, GraphicAttr& rAttr )
{
VersionCompat aCompat( rIStm, STREAM_READ );
sal_uInt32 nTmp32;
- UINT16 nTmp16;
+ sal_uInt16 nTmp16;
rIStm >> nTmp32 >> nTmp32 >> rAttr.mfGamma >> rAttr.mnMirrFlags >> rAttr.mnRotate10;
rIStm >> rAttr.mnContPercent >> rAttr.mnLumPercent >> rAttr.mnRPercent >> rAttr.mnGPercent >> rAttr.mnBPercent;
@@ -111,7 +111,7 @@ SvStream& operator<<( SvStream& rOStm, const GraphicAttr& rAttr )
rOStm << nTmp32 << nTmp32 << rAttr.mfGamma << rAttr.mnMirrFlags << rAttr.mnRotate10;
rOStm << rAttr.mnContPercent << rAttr.mnLumPercent << rAttr.mnRPercent << rAttr.mnGPercent << rAttr.mnBPercent;
- rOStm << rAttr.mbInvert << rAttr.mcTransparency << (UINT16) rAttr.meDrawMode;
+ rOStm << rAttr.mbInvert << rAttr.mcTransparency << (sal_uInt16) rAttr.meDrawMode;
rOStm << rAttr.mnLeftCrop << rAttr.mnTopCrop << rAttr.mnRightCrop << rAttr.mnBottomCrop;
return rOStm;
diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx
index 41240c95d113..cd8125a6cc79 100644
--- a/svtools/source/graphic/grfcache.cxx
+++ b/svtools/source/graphic/grfcache.cxx
@@ -70,14 +70,14 @@ public:
GraphicID( const GraphicObject& rObj );
~GraphicID() {}
- BOOL operator==( const GraphicID& rID ) const
+ sal_Bool operator==( const GraphicID& rID ) const
{
return( rID.mnID1 == mnID1 && rID.mnID2 == mnID2 &&
rID.mnID3 == mnID3 && rID.mnID4 == mnID4 );
}
ByteString GetIDString() const;
- BOOL IsEmpty() const { return( 0 == mnID4 ); }
+ sal_Bool IsEmpty() const { return( 0 == mnID4 ); }
};
// -----------------------------------------------------------------------------
@@ -86,7 +86,7 @@ GraphicID::GraphicID( const GraphicObject& rObj )
{
const Graphic& rGraphic = rObj.GetGraphic();
- mnID1 = ( (ULONG) rGraphic.GetType() ) << 28;
+ mnID1 = ( (sal_uLong) rGraphic.GetType() ) << 28;
switch( rGraphic.GetType() )
{
@@ -105,7 +105,7 @@ GraphicID::GraphicID( const GraphicObject& rObj )
{
const BitmapEx aBmpEx( rGraphic.GetBitmapEx() );
- mnID1 |= ( ( ( (ULONG) aBmpEx.GetTransparentType() << 8 ) | ( aBmpEx.IsAlpha() ? 1 : 0 ) ) & 0x0fffffff );
+ mnID1 |= ( ( ( (sal_uLong) aBmpEx.GetTransparentType() << 8 ) | ( aBmpEx.IsAlpha() ? 1 : 0 ) ) & 0x0fffffff );
mnID2 = aBmpEx.GetSizePixel().Width();
mnID3 = aBmpEx.GetSizePixel().Height();
mnID4 = rGraphic.GetChecksum();
@@ -167,10 +167,10 @@ private:
BitmapEx* mpBmpEx;
GDIMetaFile* mpMtf;
Animation* mpAnimation;
- BOOL mbSwappedAll;
+ sal_Bool mbSwappedAll;
- BOOL ImplInit( const GraphicObject& rObj );
- BOOL ImplMatches( const GraphicObject& rObj ) const { return( GraphicID( rObj ) == maID ); }
+ sal_Bool ImplInit( const GraphicObject& rObj );
+ sal_Bool ImplMatches( const GraphicObject& rObj ) const { return( GraphicID( rObj ) == maID ); }
void ImplFillSubstitute( Graphic& rSubstitute );
public:
@@ -181,13 +181,13 @@ public:
const GraphicID& GetID() const { return maID; }
void AddGraphicObjectReference( const GraphicObject& rObj, Graphic& rSubstitute );
- BOOL ReleaseGraphicObjectReference( const GraphicObject& rObj );
- ULONG GetGraphicObjectReferenceCount() { return maGraphicObjectList.Count(); }
- BOOL HasGraphicObjectReference( const GraphicObject& rObj );
+ sal_Bool ReleaseGraphicObjectReference( const GraphicObject& rObj );
+ sal_uLong GetGraphicObjectReferenceCount() { return maGraphicObjectList.Count(); }
+ sal_Bool HasGraphicObjectReference( const GraphicObject& rObj );
void TryToSwapIn();
void GraphicObjectWasSwappedOut( const GraphicObject& rObj );
- BOOL FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute );
+ sal_Bool FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute );
void GraphicObjectWasSwappedIn( const GraphicObject& rObj );
};
@@ -216,9 +216,9 @@ GraphicCacheEntry::~GraphicCacheEntry()
// -----------------------------------------------------------------------------
-BOOL GraphicCacheEntry::ImplInit( const GraphicObject& rObj )
+sal_Bool GraphicCacheEntry::ImplInit( const GraphicObject& rObj )
{
- BOOL bRet;
+ sal_Bool bRet;
if( !rObj.IsSwappedOut() )
{
@@ -260,10 +260,10 @@ BOOL GraphicCacheEntry::ImplInit( const GraphicObject& rObj )
else
maGfxLink = GfxLink();
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
@@ -277,9 +277,9 @@ void GraphicCacheEntry::ImplFillSubstitute( Graphic& rSubstitute )
const MapMode aPrefMapMode( rSubstitute.GetPrefMapMode() );
const Link aAnimationNotifyHdl( rSubstitute.GetAnimationNotifyHdl() );
const String aDocFileName( rSubstitute.GetDocFileName() );
- const ULONG nDocFilePos = rSubstitute.GetDocFilePos();
+ const sal_uLong nDocFilePos = rSubstitute.GetDocFilePos();
const GraphicType eOldType = rSubstitute.GetType();
- const BOOL bDefaultType = ( rSubstitute.GetType() == GRAPHIC_DEFAULT );
+ const sal_Bool bDefaultType = ( rSubstitute.GetType() == GRAPHIC_DEFAULT );
if( rSubstitute.IsLink() && ( GFX_LINK_TYPE_NONE == maGfxLink.GetType() ) )
maGfxLink = rSubstitute.GetLink();
@@ -321,16 +321,16 @@ void GraphicCacheEntry::AddGraphicObjectReference( const GraphicObject& rObj, Gr
// -----------------------------------------------------------------------------
-BOOL GraphicCacheEntry::ReleaseGraphicObjectReference( const GraphicObject& rObj )
+sal_Bool GraphicCacheEntry::ReleaseGraphicObjectReference( const GraphicObject& rObj )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
for( void* pObj = maGraphicObjectList.First(); !bRet && pObj; pObj = maGraphicObjectList.Next() )
{
if( &rObj == (GraphicObject*) pObj )
{
maGraphicObjectList.Remove( pObj );
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -339,13 +339,13 @@ BOOL GraphicCacheEntry::ReleaseGraphicObjectReference( const GraphicObject& rObj
// -----------------------------------------------------------------------------
-BOOL GraphicCacheEntry::HasGraphicObjectReference( const GraphicObject& rObj )
+sal_Bool GraphicCacheEntry::HasGraphicObjectReference( const GraphicObject& rObj )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
for( void* pObj = maGraphicObjectList.First(); !bRet && pObj; pObj = maGraphicObjectList.Next() )
if( &rObj == (GraphicObject*) pObj )
- bRet = TRUE;
+ bRet = sal_True;
return bRet;
}
@@ -362,11 +362,11 @@ void GraphicCacheEntry::TryToSwapIn()
void GraphicCacheEntry::GraphicObjectWasSwappedOut( const GraphicObject& /*rObj*/ )
{
- mbSwappedAll = TRUE;
+ mbSwappedAll = sal_True;
for( void* pObj = maGraphicObjectList.First(); mbSwappedAll && pObj; pObj = maGraphicObjectList.Next() )
if( !( (GraphicObject*) pObj )->IsSwappedOut() )
- mbSwappedAll = FALSE;
+ mbSwappedAll = sal_False;
if( mbSwappedAll )
{
@@ -378,17 +378,17 @@ void GraphicCacheEntry::GraphicObjectWasSwappedOut( const GraphicObject& /*rObj*
// -----------------------------------------------------------------------------
-BOOL GraphicCacheEntry::FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute )
+sal_Bool GraphicCacheEntry::FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute )
{
- BOOL bRet;
+ sal_Bool bRet;
if( !mbSwappedAll && rObj.IsSwappedOut() )
{
ImplFillSubstitute( rSubstitute );
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
@@ -415,13 +415,13 @@ private:
BitmapEx* mpBmpEx;
GraphicAttr maAttr;
Size maOutSizePix;
- ULONG mnCacheSize;
- ULONG mnOutDevDrawMode;
- USHORT mnOutDevBitCount;
+ sal_uLong mnCacheSize;
+ sal_uLong mnOutDevDrawMode;
+ sal_uInt16 mnOutDevBitCount;
public:
- static ULONG GetNeededSize( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+ static sal_uLong GetNeededSize( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const GraphicObject& rObj, const GraphicAttr& rAttr );
public:
@@ -457,15 +457,15 @@ public:
const GraphicAttr& GetAttr() const { return maAttr; }
const Size& GetOutputSizePixel() const { return maOutSizePix; }
- ULONG GetCacheSize() const { return mnCacheSize; }
+ sal_uLong GetCacheSize() const { return mnCacheSize; }
const GraphicCacheEntry* GetReferencedCacheEntry() const { return mpRefCacheEntry; }
- ULONG GetOutDevDrawMode() const { return mnOutDevDrawMode; }
- USHORT GetOutDevBitCount() const { return mnOutDevBitCount; }
+ sal_uLong GetOutDevDrawMode() const { return mnOutDevDrawMode; }
+ sal_uInt16 GetOutDevBitCount() const { return mnOutDevBitCount; }
void SetReleaseTime( const ::vos::TTimeValue& rReleaseTime ) { maReleaseTime = rReleaseTime; }
const ::vos::TTimeValue& GetReleaseTime() const { return maReleaseTime; }
- BOOL Matches( OutputDevice* pOut, const Point& /*rPtPixel*/, const Size& rSzPixel,
+ sal_Bool Matches( OutputDevice* pOut, const Point& /*rPtPixel*/, const Size& rSzPixel,
const GraphicCacheEntry* pCacheEntry, const GraphicAttr& rAttr ) const
{
// #i46805# Additional match
@@ -486,12 +486,12 @@ public:
// -----------------------------------------------------------------------------
-ULONG GraphicDisplayCacheEntry::GetNeededSize( OutputDevice* pOut, const Point& /*rPt*/, const Size& rSz,
+sal_uLong GraphicDisplayCacheEntry::GetNeededSize( OutputDevice* pOut, const Point& /*rPt*/, const Size& rSz,
const GraphicObject& rObj, const GraphicAttr& rAttr )
{
const Graphic& rGraphic = rObj.GetGraphic();
const GraphicType eType = rGraphic.GetType();
- ULONG nNeededSize;
+ sal_uLong nNeededSize;
if( GRAPHIC_BITMAP == eType )
{
@@ -560,7 +560,7 @@ void GraphicDisplayCacheEntry::Draw( OutputDevice* pOut, const Point& rPt, const
// - GraphicCache -
// -----------------------
-GraphicCache::GraphicCache( GraphicManager& rMgr, ULONG nDisplayCacheSize, ULONG nMaxObjDisplayCacheSize ) :
+GraphicCache::GraphicCache( GraphicManager& rMgr, sal_uLong nDisplayCacheSize, sal_uLong nMaxObjDisplayCacheSize ) :
mrMgr ( rMgr ),
mnReleaseTimeoutSeconds ( 0UL ),
mnMaxDisplaySize ( nDisplayCacheSize ),
@@ -585,7 +585,7 @@ GraphicCache::~GraphicCache()
void GraphicCache::AddGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute,
const ByteString* pID, const GraphicObject* pCopyObj )
{
- BOOL bInserted = FALSE;
+ sal_Bool bInserted = sal_False;
if( !rObj.IsSwappedOut() &&
( pID || ( pCopyObj && ( pCopyObj->GetType() != GRAPHIC_NONE ) ) || ( rObj.GetType() != GRAPHIC_NONE ) ) )
@@ -599,7 +599,7 @@ void GraphicCache::AddGraphicObject( const GraphicObject& rObj, Graphic& rSubsti
if( pEntry->HasGraphicObjectReference( *pCopyObj ) )
{
pEntry->AddGraphicObjectReference( rObj, rSubstitute );
- bInserted = TRUE;
+ bInserted = sal_True;
}
else
{
@@ -640,14 +640,14 @@ void GraphicCache::AddGraphicObject( const GraphicObject& rObj, Graphic& rSubsti
if( rID.GetIDString() == *pID )
{
pEntry->AddGraphicObjectReference( rObj, rSubstitute );
- bInserted = TRUE;
+ bInserted = sal_True;
}
}
if( !bInserted )
{
maGraphicCache.Insert( new GraphicCacheEntry( rObj ), LIST_APPEND );
- bInserted = TRUE;
+ bInserted = sal_True;
}
}
}
@@ -656,7 +656,7 @@ void GraphicCache::AddGraphicObject( const GraphicObject& rObj, Graphic& rSubsti
if( rEntryID == *apID )
{
pEntry->AddGraphicObjectReference( rObj, rSubstitute );
- bInserted = TRUE;
+ bInserted = sal_True;
}
}
@@ -676,7 +676,7 @@ void GraphicCache::ReleaseGraphicObject( const GraphicObject& rObj )
{
// Release cached object
GraphicCacheEntry* pEntry = (GraphicCacheEntry*) maGraphicCache.First();
- BOOL bRemoved = FALSE;
+ sal_Bool bRemoved = sal_False;
while( !bRemoved && pEntry )
{
@@ -729,12 +729,12 @@ void GraphicCache::GraphicObjectWasSwappedOut( const GraphicObject& rObj )
// -----------------------------------------------------------------------------
-BOOL GraphicCache::FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute )
+sal_Bool GraphicCache::FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute )
{
GraphicCacheEntry* pEntry = ImplGetCacheEntry( rObj );
if( !pEntry )
- return FALSE;
+ return sal_False;
return pEntry->FillSwappedGraphicObject( rObj, rSubstitute );
}
@@ -759,7 +759,7 @@ void GraphicCache::GraphicObjectWasSwappedIn( const GraphicObject& rObj )
// -----------------------------------------------------------------------------
-void GraphicCache::SetMaxDisplayCacheSize( ULONG nNewCacheSize )
+void GraphicCache::SetMaxDisplayCacheSize( sal_uLong nNewCacheSize )
{
mnMaxDisplaySize = nNewCacheSize;
@@ -769,9 +769,9 @@ void GraphicCache::SetMaxDisplayCacheSize( ULONG nNewCacheSize )
// -----------------------------------------------------------------------------
-void GraphicCache::SetMaxObjDisplayCacheSize( ULONG nNewMaxObjSize, BOOL bDestroyGreaterCached )
+void GraphicCache::SetMaxObjDisplayCacheSize( sal_uLong nNewMaxObjSize, sal_Bool bDestroyGreaterCached )
{
- const BOOL bDestroy = ( bDestroyGreaterCached && ( nNewMaxObjSize < mnMaxObjDisplaySize ) );
+ const sal_Bool bDestroy = ( bDestroyGreaterCached && ( nNewMaxObjSize < mnMaxObjDisplaySize ) );
mnMaxObjDisplaySize = Min( nNewMaxObjSize, mnMaxDisplaySize );
@@ -796,7 +796,7 @@ void GraphicCache::SetMaxObjDisplayCacheSize( ULONG nNewMaxObjSize, BOOL bDestro
// -----------------------------------------------------------------------------
-void GraphicCache::SetCacheTimeout( ULONG nTimeoutSeconds )
+void GraphicCache::SetCacheTimeout( sal_uLong nTimeoutSeconds )
{
if( mnReleaseTimeoutSeconds != nTimeoutSeconds )
{
@@ -830,7 +830,7 @@ void GraphicCache::ClearDisplayCache()
// -----------------------------------------------------------------------------
-BOOL GraphicCache::IsDisplayCacheable( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+sal_Bool GraphicCache::IsDisplayCacheable( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const GraphicObject& rObj, const GraphicAttr& rAttr ) const
{
return( GraphicDisplayCacheEntry::GetNeededSize( pOut, rPt, rSz, rObj, rAttr ) <=
@@ -839,20 +839,20 @@ BOOL GraphicCache::IsDisplayCacheable( OutputDevice* pOut, const Point& rPt, con
// -----------------------------------------------------------------------------
-BOOL GraphicCache::IsInDisplayCache( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+sal_Bool GraphicCache::IsInDisplayCache( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const GraphicObject& rObj, const GraphicAttr& rAttr ) const
{
const Point aPtPixel( pOut->LogicToPixel( rPt ) );
const Size aSzPixel( pOut->LogicToPixel( rSz ) );
const GraphicCacheEntry* pCacheEntry = ( (GraphicCache*) this )->ImplGetCacheEntry( rObj );
//GraphicDisplayCacheEntry* pDisplayEntry = (GraphicDisplayCacheEntry*) ( (GraphicCache*) this )->maDisplayCache.First(); // -Wall removed ....
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
if( pCacheEntry )
{
for( long i = 0, nCount = maDisplayCache.Count(); !bFound && ( i < nCount ); i++ )
if( ( (GraphicDisplayCacheEntry*) maDisplayCache.GetObject( i ) )->Matches( pOut, aPtPixel, aSzPixel, pCacheEntry, rAttr ) )
- bFound = TRUE;
+ bFound = sal_True;
}
return bFound;
@@ -880,12 +880,12 @@ ByteString GraphicCache::GetUniqueID( const GraphicObject& rObj ) const
// -----------------------------------------------------------------------------
-BOOL GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+sal_Bool GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const GraphicObject& rObj, const GraphicAttr& rAttr,
const BitmapEx& rBmpEx )
{
- const ULONG nNeededSize = GraphicDisplayCacheEntry::GetNeededSize( pOut, rPt, rSz, rObj, rAttr );
- BOOL bRet = FALSE;
+ const sal_uLong nNeededSize = GraphicDisplayCacheEntry::GetNeededSize( pOut, rPt, rSz, rObj, rAttr );
+ sal_Bool bRet = sal_False;
if( nNeededSize <= GetMaxObjDisplayCacheSize() )
{
@@ -906,7 +906,7 @@ BOOL GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt,
maDisplayCache.Insert( pNewEntry, LIST_APPEND );
mnUsedDisplaySize += pNewEntry->GetCacheSize();
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -914,12 +914,12 @@ BOOL GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt,
// -----------------------------------------------------------------------------
-BOOL GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+sal_Bool GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const GraphicObject& rObj, const GraphicAttr& rAttr,
const GDIMetaFile& rMtf )
{
- const ULONG nNeededSize = GraphicDisplayCacheEntry::GetNeededSize( pOut, rPt, rSz, rObj, rAttr );
- BOOL bRet = FALSE;
+ const sal_uLong nNeededSize = GraphicDisplayCacheEntry::GetNeededSize( pOut, rPt, rSz, rObj, rAttr );
+ sal_Bool bRet = sal_False;
if( nNeededSize <= GetMaxObjDisplayCacheSize() )
{
@@ -940,7 +940,7 @@ BOOL GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt,
maDisplayCache.Insert( pNewEntry, LIST_APPEND );
mnUsedDisplaySize += pNewEntry->GetCacheSize();
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -948,14 +948,14 @@ BOOL GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt,
// -----------------------------------------------------------------------------
-BOOL GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+sal_Bool GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const GraphicObject& rObj, const GraphicAttr& rAttr )
{
const Point aPtPixel( pOut->LogicToPixel( rPt ) );
const Size aSzPixel( pOut->LogicToPixel( rSz ) );
const GraphicCacheEntry* pCacheEntry = ImplGetCacheEntry( rObj );
GraphicDisplayCacheEntry* pDisplayCacheEntry = (GraphicDisplayCacheEntry*) maDisplayCache.First();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
while( !bRet && pDisplayCacheEntry )
{
@@ -973,7 +973,7 @@ BOOL GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, co
}
pDisplayCacheEntry->SetReleaseTime( aReleaseTime );
- bRet = TRUE;
+ bRet = sal_True;
}
else
pDisplayCacheEntry = (GraphicDisplayCacheEntry*) maDisplayCache.Next();
@@ -987,9 +987,9 @@ BOOL GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, co
// -----------------------------------------------------------------------------
-BOOL GraphicCache::ImplFreeDisplayCacheSpace( ULONG nSizeToFree )
+sal_Bool GraphicCache::ImplFreeDisplayCacheSpace( sal_uLong nSizeToFree )
{
- ULONG nFreedSize = 0UL;
+ sal_uLong nFreedSize = 0UL;
if( nSizeToFree )
{
diff --git a/svtools/source/graphic/grfcache.hxx b/svtools/source/graphic/grfcache.hxx
index 55309a00827d..0885667aa2b7 100644
--- a/svtools/source/graphic/grfcache.hxx
+++ b/svtools/source/graphic/grfcache.hxx
@@ -47,12 +47,12 @@ private:
Timer maReleaseTimer;
List maGraphicCache;
List maDisplayCache;
- ULONG mnReleaseTimeoutSeconds;
- ULONG mnMaxDisplaySize;
- ULONG mnMaxObjDisplaySize;
- ULONG mnUsedDisplaySize;
+ sal_uLong mnReleaseTimeoutSeconds;
+ sal_uLong mnMaxDisplaySize;
+ sal_uLong mnMaxObjDisplaySize;
+ sal_uLong mnUsedDisplaySize;
- BOOL ImplFreeDisplayCacheSpace( ULONG nSizeToFree );
+ sal_Bool ImplFreeDisplayCacheSpace( sal_uLong nSizeToFree );
GraphicCacheEntry* ImplGetCacheEntry( const GraphicObject& rObj );
@@ -61,8 +61,8 @@ private:
public:
GraphicCache( GraphicManager& rMgr,
- ULONG nDisplayCacheSize = 10000000UL,
- ULONG nMaxObjDisplayCacheSize = 2400000UL );
+ sal_uLong nDisplayCacheSize = 10000000UL,
+ sal_uLong nMaxObjDisplayCacheSize = 2400000UL );
~GraphicCache();
public:
@@ -72,37 +72,37 @@ public:
void ReleaseGraphicObject( const GraphicObject& rObj );
void GraphicObjectWasSwappedOut( const GraphicObject& rObj );
- BOOL FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute );
+ sal_Bool FillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute );
void GraphicObjectWasSwappedIn( const GraphicObject& rObj );
ByteString GetUniqueID( const GraphicObject& rObj ) const;
public:
- void SetMaxDisplayCacheSize( ULONG nNewCacheSize );
- ULONG GetMaxDisplayCacheSize() const { return mnMaxDisplaySize; };
+ void SetMaxDisplayCacheSize( sal_uLong nNewCacheSize );
+ sal_uLong GetMaxDisplayCacheSize() const { return mnMaxDisplaySize; };
- void SetMaxObjDisplayCacheSize( ULONG nNewMaxObjSize, BOOL bDestroyGreaterCached = FALSE );
- ULONG GetMaxObjDisplayCacheSize() const { return mnMaxObjDisplaySize; }
+ void SetMaxObjDisplayCacheSize( sal_uLong nNewMaxObjSize, sal_Bool bDestroyGreaterCached = sal_False );
+ sal_uLong GetMaxObjDisplayCacheSize() const { return mnMaxObjDisplaySize; }
- ULONG GetUsedDisplayCacheSize() const { return mnUsedDisplaySize; }
- ULONG GetFreeDisplayCacheSize() const { return( mnMaxDisplaySize - mnUsedDisplaySize ); }
+ sal_uLong GetUsedDisplayCacheSize() const { return mnUsedDisplaySize; }
+ sal_uLong GetFreeDisplayCacheSize() const { return( mnMaxDisplaySize - mnUsedDisplaySize ); }
- void SetCacheTimeout( ULONG nTimeoutSeconds );
- ULONG GetCacheTimeout() const { return mnReleaseTimeoutSeconds; }
+ void SetCacheTimeout( sal_uLong nTimeoutSeconds );
+ sal_uLong GetCacheTimeout() const { return mnReleaseTimeoutSeconds; }
void ClearDisplayCache();
- BOOL IsDisplayCacheable( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+ sal_Bool IsDisplayCacheable( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const GraphicObject& rObj, const GraphicAttr& rAttr ) const;
- BOOL IsInDisplayCache( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+ sal_Bool IsInDisplayCache( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const GraphicObject& rObj, const GraphicAttr& rAttr ) const;
- BOOL CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+ sal_Bool CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const GraphicObject& rObj, const GraphicAttr& rAttr,
const BitmapEx& rBmpEx );
- BOOL CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+ sal_Bool CreateDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const GraphicObject& rObj, const GraphicAttr& rAttr,
const GDIMetaFile& rMtf );
- BOOL DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+ sal_Bool DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const GraphicObject& rObj, const GraphicAttr& rAttr );
};
diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index 221354cc6665..77a582e5ae20 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -174,9 +174,9 @@ void GraphicObject::ImplConstruct()
mpSwapOutTimer = NULL;
mpSimpleCache = NULL;
mnAnimationLoopCount = 0;
- mbAutoSwapped = FALSE;
- mbIsInSwapIn = FALSE;
- mbIsInSwapOut = FALSE;
+ mbAutoSwapped = sal_False;
+ mbIsInSwapIn = sal_False;
+ mbIsInSwapOut = sal_False;
}
// -----------------------------------------------------------------------------
@@ -198,7 +198,7 @@ void GraphicObject::ImplAssignGraphicData()
mbEPS = ( rMtf.GetActionCount() >= 1 ) && ( META_EPS_ACTION == rMtf.GetAction( 0 )->GetType() );
}
else
- mbEPS = FALSE;
+ mbEPS = sal_False;
}
// -----------------------------------------------------------------------------
@@ -247,13 +247,13 @@ void GraphicObject::ImplAutoSwapIn()
if( IsSwappedOut() )
{
if( mpMgr && mpMgr->ImplFillSwappedGraphicObject( *this, maGraphic ) )
- mbAutoSwapped = FALSE;
+ mbAutoSwapped = sal_False;
else
{
- mbIsInSwapIn = TRUE;
+ mbIsInSwapIn = sal_True;
if( maGraphic.SwapIn() )
- mbAutoSwapped = FALSE;
+ mbAutoSwapped = sal_False;
else
{
SvStream* pStream = GetSwapStream();
@@ -296,7 +296,7 @@ void GraphicObject::ImplAutoSwapIn()
}
}
- mbIsInSwapIn = FALSE;
+ mbIsInSwapIn = sal_False;
if( !mbAutoSwapped && mpMgr )
mpMgr->ImplGraphicObjectWasSwappedIn( *this );
@@ -305,15 +305,15 @@ void GraphicObject::ImplAutoSwapIn()
}
// -----------------------------------------------------------------------------
-BOOL GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rSz, const GraphicAttr* pAttr,
- PolyPolygon& rClipPolyPoly, BOOL& bRectClipRegion ) const
+sal_Bool GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rSz, const GraphicAttr* pAttr,
+ PolyPolygon& rClipPolyPoly, sal_Bool& bRectClipRegion ) const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( GetType() != GRAPHIC_NONE )
{
Polygon aClipPoly( Rectangle( rPt, rSz ) );
- const USHORT nRot10 = pAttr->GetRotation() % 3600;
+ const sal_uInt16 nRot10 = pAttr->GetRotation() % 3600;
const Point aOldOrigin( rPt );
// --> OD 2005-09-30 #i54875# - It's not needed to get the graphic again.
// const Graphic& rGraphic = GetGraphic();
@@ -327,10 +327,10 @@ BOOL GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rSz
if( nRot10 )
{
aClipPoly.Rotate( rPt, nRot10 );
- bRectClipRegion = FALSE;
+ bRectClipRegion = sal_False;
}
else
- bRectClipRegion = TRUE;
+ bRectClipRegion = sal_True;
rClipPolyPoly = aClipPoly;
@@ -379,7 +379,7 @@ BOOL GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rSz
rPt = aOriginPoly[ 0 ];
}
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -404,7 +404,7 @@ GraphicObject& GraphicObject::operator=( const GraphicObject& rGraphicObj )
mpLink = rGraphicObj.mpLink ? new String( *rGraphicObj.mpLink ) : NULL;
mpUserData = rGraphicObj.mpUserData ? new String( *rGraphicObj.mpUserData ) : NULL;
ImplAssignGraphicData();
- mbAutoSwapped = FALSE;
+ mbAutoSwapped = sal_False;
mpMgr = rGraphicObj.mpMgr;
mpMgr->ImplRegisterObj( *this, maGraphic, NULL, &rGraphicObj );
@@ -415,7 +415,7 @@ GraphicObject& GraphicObject::operator=( const GraphicObject& rGraphicObj )
// -----------------------------------------------------------------------------
-BOOL GraphicObject::operator==( const GraphicObject& rGraphicObj ) const
+sal_Bool GraphicObject::operator==( const GraphicObject& rGraphicObj ) const
{
return( ( rGraphicObj.maGraphic == maGraphic ) &&
( rGraphicObj.maAttr == maAttr ) &&
@@ -460,7 +460,7 @@ ByteString GraphicObject::GetUniqueID() const
// -----------------------------------------------------------------------------
-ULONG GraphicObject::GetChecksum() const
+sal_uLong GraphicObject::GetChecksum() const
{
return( ( maGraphic.IsSupportedGraphic() && !maGraphic.IsSwapOut() ) ? maGraphic.GetChecksum() : 0 );
}
@@ -475,7 +475,7 @@ SvStream* GraphicObject::GetSwapStream() const
// -----------------------------------------------------------------------------
// !!! to be removed
-ULONG GraphicObject::GetReleaseFromCache() const
+sal_uLong GraphicObject::GetReleaseFromCache() const
{
return 0;
}
@@ -553,7 +553,7 @@ void GraphicObject::SetSwapStreamHdl()
// -----------------------------------------------------------------------------
-void GraphicObject::SetSwapStreamHdl( const Link& rHdl, const ULONG nSwapOutTimeout )
+void GraphicObject::SetSwapStreamHdl( const Link& rHdl, const sal_uLong nSwapOutTimeout )
{
delete mpSwapStreamHdl, mpSwapStreamHdl = new Link( rHdl );
@@ -614,10 +614,10 @@ void GraphicObject::SetGraphicManager( const GraphicManager& rMgr )
// -----------------------------------------------------------------------------
-BOOL GraphicObject::IsCached( OutputDevice* pOut, const Point& rPt, const Size& rSz,
- const GraphicAttr* pAttr, ULONG nFlags ) const
+sal_Bool GraphicObject::IsCached( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+ const GraphicAttr* pAttr, sal_uLong nFlags ) const
{
- BOOL bRet;
+ sal_Bool bRet;
if( nFlags & GRFMGR_DRAW_CACHED )
{
@@ -630,13 +630,13 @@ BOOL GraphicObject::IsCached( OutputDevice* pOut, const Point& rPt, const Size&
if ( pAttr->IsCropped() )
{
PolyPolygon aClipPolyPoly;
- BOOL bRectClip;
+ sal_Bool bRectClip;
ImplGetCropParams( pOut, aPt, aSz, pAttr, aClipPolyPoly, bRectClip );
}
bRet = mpMgr->IsInCache( pOut, aPt, aSz, *this, ( pAttr ? *pAttr : GetAttr() ) );
}
else
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
@@ -665,16 +665,16 @@ List* GraphicObject::GetAnimationInfoList() const
// -----------------------------------------------------------------------------
-BOOL GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
- const GraphicAttr* pAttr, ULONG nFlags )
+sal_Bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+ const GraphicAttr* pAttr, sal_uLong nFlags )
{
GraphicAttr aAttr( pAttr ? *pAttr : GetAttr() );
Point aPt( rPt );
Size aSz( rSz );
const sal_uInt32 nOldDrawMode = pOut->GetDrawMode();
- BOOL bCropped = aAttr.IsCropped();
- BOOL bCached = FALSE;
- BOOL bRet;
+ sal_Bool bCropped = aAttr.IsCropped();
+ sal_Bool bCached = sal_False;
+ sal_Bool bRet;
// #i29534# Provide output rects for PDF writer
Rectangle aCropRect;
@@ -701,8 +701,8 @@ BOOL GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
if( bCropped )
{
PolyPolygon aClipPolyPoly;
- BOOL bRectClip;
- const BOOL bCrop = ImplGetCropParams( pOut, aPt, aSz, &aAttr, aClipPolyPoly, bRectClip );
+ sal_Bool bRectClip;
+ const sal_Bool bCrop = ImplGetCropParams( pOut, aPt, aSz, &aAttr, aClipPolyPoly, bRectClip );
pOut->Push( PUSH_CLIPREGION );
@@ -743,10 +743,10 @@ BOOL GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
}
// --> OD 2010-01-04 #i105243#
-BOOL GraphicObject::DrawWithPDFHandling( OutputDevice& rOutDev,
+sal_Bool GraphicObject::DrawWithPDFHandling( OutputDevice& rOutDev,
const Point& rPt, const Size& rSz,
const GraphicAttr* pGrfAttr,
- const ULONG nFlags )
+ const sal_uLong nFlags )
{
const GraphicAttr aGrfAttr( pGrfAttr ? *pGrfAttr : GetAttr() );
@@ -773,8 +773,8 @@ BOOL GraphicObject::DrawWithPDFHandling( OutputDevice& rOutDev,
if( aGrfAttr.IsCropped() )
{
PolyPolygon aClipPolyPoly;
- BOOL bRectClip;
- const BOOL bCrop = ImplGetCropParams( &rOutDev,
+ sal_Bool bRectClip;
+ const sal_Bool bCrop = ImplGetCropParams( &rOutDev,
aPt, aSz,
&aGrfAttr,
aClipPolyPoly,
@@ -789,7 +789,7 @@ BOOL GraphicObject::DrawWithPDFHandling( OutputDevice& rOutDev,
}
}
- BOOL bRet = Draw( &rOutDev, rPt, rSz, &aGrfAttr, nFlags );
+ sal_Bool bRet = Draw( &rOutDev, rPt, rSz, &aGrfAttr, nFlags );
// Notify PDF writer about linked graphic (if any)
if( bWritingPdfLinkedGraphic )
@@ -806,11 +806,11 @@ BOOL GraphicObject::DrawWithPDFHandling( OutputDevice& rOutDev,
// -----------------------------------------------------------------------------
-BOOL GraphicObject::DrawTiled( OutputDevice* pOut, const Rectangle& rArea, const Size& rSize,
- const Size& rOffset, const GraphicAttr* pAttr, ULONG nFlags, int nTileCacheSize1D )
+sal_Bool GraphicObject::DrawTiled( OutputDevice* pOut, const Rectangle& rArea, const Size& rSize,
+ const Size& rOffset, const GraphicAttr* pAttr, sal_uLong nFlags, int nTileCacheSize1D )
{
if( pOut == NULL || rSize.Width() == 0 || rSize.Height() == 0 )
- return FALSE;
+ return sal_False;
const MapMode aOutMapMode( pOut->GetMapMode() );
const MapMode aMapMode( aOutMapMode.GetMapUnit(), Point(), aOutMapMode.GetScaleX(), aOutMapMode.GetScaleY() );
@@ -830,11 +830,11 @@ BOOL GraphicObject::DrawTiled( OutputDevice* pOut, const Rectangle& rArea, const
// -----------------------------------------------------------------------------
-BOOL GraphicObject::StartAnimation( OutputDevice* pOut, const Point& rPt, const Size& rSz,
- long nExtraData, const GraphicAttr* pAttr, ULONG /*nFlags*/,
+sal_Bool GraphicObject::StartAnimation( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+ long nExtraData, const GraphicAttr* pAttr, sal_uLong /*nFlags*/,
OutputDevice* pFirstFrameOutDev )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
GetGraphic();
@@ -846,13 +846,13 @@ BOOL GraphicObject::StartAnimation( OutputDevice* pOut, const Point& rPt, const
{
Point aPt( rPt );
Size aSz( rSz );
- BOOL bCropped = aAttr.IsCropped();
+ sal_Bool bCropped = aAttr.IsCropped();
if( bCropped )
{
PolyPolygon aClipPolyPoly;
- BOOL bRectClip;
- const BOOL bCrop = ImplGetCropParams( pOut, aPt, aSz, &aAttr, aClipPolyPoly, bRectClip );
+ sal_Bool bRectClip;
+ const sal_Bool bCrop = ImplGetCropParams( pOut, aPt, aSz, &aAttr, aClipPolyPoly, bRectClip );
pOut->Push( PUSH_CLIPREGION );
@@ -879,7 +879,7 @@ BOOL GraphicObject::StartAnimation( OutputDevice* pOut, const Point& rPt, const
if( bCropped )
pOut->Pop();
- bRet = TRUE;
+ bRet = sal_True;
}
else
bRet = Draw( pOut, rPt, rSz, &aAttr, GRFMGR_DRAW_STANDARD );
@@ -916,7 +916,7 @@ void GraphicObject::SetGraphic( const Graphic& rGraphic, const GraphicObject* pC
mpSwapOutTimer->Stop();
maGraphic = rGraphic;
- mbAutoSwapped = FALSE;
+ mbAutoSwapped = sal_False;
ImplAssignGraphicData();
delete mpLink, mpLink = NULL;
delete mpSimpleCache, mpSimpleCache = NULL;
@@ -1042,7 +1042,7 @@ Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMo
// #105641# Also crop animations
if( aTransGraphic.IsAnimated() )
{
- USHORT nFrame;
+ sal_uInt16 nFrame;
Animation aAnim( aTransGraphic.GetAnimation() );
for( nFrame=0; nFrame<aAnim.Count(); ++nFrame )
@@ -1059,7 +1059,7 @@ Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMo
// cropping affects this frame, apply it then
// do _not_ apply enlargement, this is done below
ImplTransformBitmap( aAnimBmp.aBmpEx, rAttr, Size(), Size(),
- aCropRectRel, rDestSize, FALSE );
+ aCropRectRel, rDestSize, sal_False );
aAnim.Replace( aAnimBmp, nFrame );
}
@@ -1106,7 +1106,7 @@ Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMo
BitmapEx aBmpEx( aTransGraphic.GetBitmapEx() );
ImplTransformBitmap( aBmpEx, rAttr, aCropLeftTop, aCropRightBottom,
- aCropRect, rDestSize, TRUE );
+ aCropRect, rDestSize, sal_True );
aTransGraphic = aBmpEx;
}
@@ -1188,9 +1188,9 @@ void GraphicObject::ResetAnimationLoopCount()
// -----------------------------------------------------------------------------
-BOOL GraphicObject::SwapOut()
+sal_Bool GraphicObject::SwapOut()
{
- BOOL bRet = ( !mbAutoSwapped ? maGraphic.SwapOut() : FALSE );
+ sal_Bool bRet = ( !mbAutoSwapped ? maGraphic.SwapOut() : sal_False );
if( bRet && mpMgr )
mpMgr->ImplGraphicObjectWasSwappedOut( *this );
@@ -1200,9 +1200,9 @@ BOOL GraphicObject::SwapOut()
// -----------------------------------------------------------------------------
-BOOL GraphicObject::SwapOut( SvStream* pOStm )
+sal_Bool GraphicObject::SwapOut( SvStream* pOStm )
{
- BOOL bRet = ( !mbAutoSwapped ? maGraphic.SwapOut( pOStm ) : FALSE );
+ sal_Bool bRet = ( !mbAutoSwapped ? maGraphic.SwapOut( pOStm ) : sal_False );
if( bRet && mpMgr )
mpMgr->ImplGraphicObjectWasSwappedOut( *this );
@@ -1212,17 +1212,17 @@ BOOL GraphicObject::SwapOut( SvStream* pOStm )
// -----------------------------------------------------------------------------
-BOOL GraphicObject::SwapIn()
+sal_Bool GraphicObject::SwapIn()
{
- BOOL bRet;
+ sal_Bool bRet;
if( mbAutoSwapped )
{
ImplAutoSwapIn();
- bRet = TRUE;
+ bRet = sal_True;
}
else if( mpMgr && mpMgr->ImplFillSwappedGraphicObject( *this, maGraphic ) )
- bRet = TRUE;
+ bRet = sal_True;
else
{
bRet = maGraphic.SwapIn();
@@ -1239,17 +1239,17 @@ BOOL GraphicObject::SwapIn()
// -----------------------------------------------------------------------------
-BOOL GraphicObject::SwapIn( SvStream* pIStm )
+sal_Bool GraphicObject::SwapIn( SvStream* pIStm )
{
- BOOL bRet;
+ sal_Bool bRet;
if( mbAutoSwapped )
{
ImplAutoSwapIn();
- bRet = TRUE;
+ bRet = sal_True;
}
else if( mpMgr && mpMgr->ImplFillSwappedGraphicObject( *this, maGraphic ) )
- bRet = TRUE;
+ bRet = sal_True;
else
{
bRet = maGraphic.SwapIn( pIStm );
@@ -1270,7 +1270,7 @@ void GraphicObject::SetSwapState()
{
if( !IsSwappedOut() )
{
- mbAutoSwapped = TRUE;
+ mbAutoSwapped = sal_True;
if( mpMgr )
mpMgr->ImplGraphicObjectWasSwappedOut( *this );
@@ -1283,7 +1283,7 @@ IMPL_LINK( GraphicObject, ImplAutoSwapOutHdl, void*, EMPTYARG )
{
if( !IsSwappedOut() )
{
- mbIsInSwapOut = TRUE;
+ mbIsInSwapOut = sal_True;
SvStream* pStream = GetSwapStream();
@@ -1303,7 +1303,7 @@ IMPL_LINK( GraphicObject, ImplAutoSwapOutHdl, void*, EMPTYARG )
}
}
- mbIsInSwapOut = FALSE;
+ mbIsInSwapOut = sal_False;
}
if( mpSwapOutTimer )
@@ -1320,7 +1320,7 @@ SvStream& operator>>( SvStream& rIStm, GraphicObject& rGraphicObj )
Graphic aGraphic;
GraphicAttr aAttr;
ByteString aLink;
- BOOL bLink;
+ sal_Bool bLink;
rIStm >> aGraphic >> aAttr >> bLink;
@@ -1345,7 +1345,7 @@ SvStream& operator>>( SvStream& rIStm, GraphicObject& rGraphicObj )
SvStream& operator<<( SvStream& rOStm, const GraphicObject& rGraphicObj )
{
VersionCompat aCompat( rOStm, STREAM_WRITE, 1 );
- const BOOL bLink = rGraphicObj.HasLink();
+ const sal_Bool bLink = rGraphicObj.HasLink();
rOStm << rGraphicObj.GetGraphic() << rGraphicObj.GetAttr() << bLink;
diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx
index 7e1255aabc56..9c86c7e44130 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -47,7 +47,7 @@
// -----------
#define MAX_PRINTER_EXT 1024
-#define MAP( cVal0, cVal1, nFrac ) ((BYTE)((((long)(cVal0)<<20L)+nFrac*((long)(cVal1)-(cVal0)))>>20L))
+#define MAP( cVal0, cVal1, nFrac ) ((sal_uInt8)((((long)(cVal0)<<20L)+nFrac*((long)(cVal1)-(cVal0)))>>20L))
#define WATERMARK_LUM_OFFSET 50
#define WATERMARK_CON_OFFSET -70
@@ -113,7 +113,7 @@ BitmapEx muckWithBitmap( const BitmapEx& rBmpEx,
// - GraphicManager -
// ------------------
-GraphicManager::GraphicManager( ULONG nCacheSize, ULONG nMaxObjCacheSize ) :
+GraphicManager::GraphicManager( sal_uLong nCacheSize, sal_uLong nMaxObjCacheSize ) :
mpCache( new GraphicCache( *this, nCacheSize, nMaxObjCacheSize ) )
{
}
@@ -130,56 +130,56 @@ GraphicManager::~GraphicManager()
// -----------------------------------------------------------------------------
-void GraphicManager::SetMaxCacheSize( ULONG nNewCacheSize )
+void GraphicManager::SetMaxCacheSize( sal_uLong nNewCacheSize )
{
mpCache->SetMaxDisplayCacheSize( nNewCacheSize );
}
// -----------------------------------------------------------------------------
-ULONG GraphicManager::GetMaxCacheSize() const
+sal_uLong GraphicManager::GetMaxCacheSize() const
{
return mpCache->GetMaxDisplayCacheSize();
}
// -----------------------------------------------------------------------------
-void GraphicManager::SetMaxObjCacheSize( ULONG nNewMaxObjSize, BOOL bDestroyGreaterCached )
+void GraphicManager::SetMaxObjCacheSize( sal_uLong nNewMaxObjSize, sal_Bool bDestroyGreaterCached )
{
mpCache->SetMaxObjDisplayCacheSize( nNewMaxObjSize, bDestroyGreaterCached );
}
// -----------------------------------------------------------------------------
-ULONG GraphicManager::GetMaxObjCacheSize() const
+sal_uLong GraphicManager::GetMaxObjCacheSize() const
{
return mpCache->GetMaxObjDisplayCacheSize();
}
// -----------------------------------------------------------------------------
-ULONG GraphicManager::GetUsedCacheSize() const
+sal_uLong GraphicManager::GetUsedCacheSize() const
{
return mpCache->GetUsedDisplayCacheSize();
}
// -----------------------------------------------------------------------------
-ULONG GraphicManager::GetFreeCacheSize() const
+sal_uLong GraphicManager::GetFreeCacheSize() const
{
return mpCache->GetFreeDisplayCacheSize();
}
// -----------------------------------------------------------------------------
-void GraphicManager::SetCacheTimeout( ULONG nTimeoutSeconds )
+void GraphicManager::SetCacheTimeout( sal_uLong nTimeoutSeconds )
{
mpCache->SetCacheTimeout( nTimeoutSeconds );
}
// -----------------------------------------------------------------------------
-ULONG GraphicManager::GetCacheTimeout() const
+sal_uLong GraphicManager::GetCacheTimeout() const
{
return mpCache->GetCacheTimeout();
}
@@ -200,7 +200,7 @@ void GraphicManager::ReleaseFromCache( const GraphicObject& /*rObj*/ )
// -----------------------------------------------------------------------------
-BOOL GraphicManager::IsInCache( OutputDevice* pOut, const Point& rPt,
+sal_Bool GraphicManager::IsInCache( OutputDevice* pOut, const Point& rPt,
const Size& rSz, const GraphicObject& rObj,
const GraphicAttr& rAttr ) const
{
@@ -209,15 +209,15 @@ BOOL GraphicManager::IsInCache( OutputDevice* pOut, const Point& rPt,
// -----------------------------------------------------------------------------
-BOOL GraphicManager::DrawObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
+sal_Bool GraphicManager::DrawObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
GraphicObject& rObj, const GraphicAttr& rAttr,
- const ULONG nFlags, BOOL& rCached )
+ const sal_uLong nFlags, sal_Bool& rCached )
{
Point aPt( rPt );
Size aSz( rSz );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
- rCached = FALSE;
+ rCached = sal_False;
if( ( rObj.GetType() == GRAPHIC_BITMAP ) || ( rObj.GetType() == GRAPHIC_GDIMETAFILE ) )
{
@@ -235,7 +235,7 @@ BOOL GraphicManager::DrawObj( OutputDevice* pOut, const Point& rPt, const Size&
if( aGraphic.IsSupportedGraphic() )
{
- const USHORT nRot10 = rAttr.GetRotation() % 3600;
+ const sal_uInt16 nRot10 = rAttr.GetRotation() % 3600;
if( nRot10 )
{
@@ -250,7 +250,7 @@ BOOL GraphicManager::DrawObj( OutputDevice* pOut, const Point& rPt, const Size&
aGraphic.Draw( pOut, aPt, aSz );
}
- bRet = TRUE;
+ bRet = sal_True;
}
if( !bRet )
@@ -259,7 +259,7 @@ BOOL GraphicManager::DrawObj( OutputDevice* pOut, const Point& rPt, const Size&
if( !mpCache->DrawDisplayCacheObj( pOut, aPt, aSz, rObj, rAttr ) )
bRet = ImplDraw( pOut, aPt, aSz, rObj, rAttr, nFlags, rCached );
else
- bRet = rCached = TRUE;
+ bRet = rCached = sal_True;
}
}
@@ -299,7 +299,7 @@ ByteString GraphicManager::ImplGetUniqueID( const GraphicObject& rObj ) const
// -----------------------------------------------------------------------------
-BOOL GraphicManager::ImplFillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute )
+sal_Bool GraphicManager::ImplFillSwappedGraphicObject( const GraphicObject& rObj, Graphic& rSubstitute )
{
return( mpCache->FillSwappedGraphicObject( rObj, rSubstitute ) );
}
@@ -313,13 +313,13 @@ void GraphicManager::ImplGraphicObjectWasSwappedIn( const GraphicObject& rObj )
// -----------------------------------------------------------------------------
-BOOL GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt,
+sal_Bool GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt,
const Size& rSz, GraphicObject& rObj,
const GraphicAttr& rAttr,
- const ULONG nFlags, BOOL& rCached )
+ const sal_uLong nFlags, sal_Bool& rCached )
{
const Graphic& rGraphic = rObj.GetGraphic();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( rGraphic.IsSupportedGraphic() && !rGraphic.IsSwapOut() )
{
@@ -337,7 +337,7 @@ BOOL GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt,
if( ImplCreateOutput( pOut, rPt, rSz, aSrcBmpEx, rAttr, nFlags, &aDstBmpEx ) )
{
rCached = mpCache->CreateDisplayCacheObj( pOut, rPt, rSz, rObj, rAttr, aDstBmpEx );
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -365,13 +365,13 @@ BOOL GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt,
if( ImplCreateOutput( pOut, rPt, rSz, aContainedBmpEx, rAttr, nFlags, &aDstBmpEx ) )
{
rCached = mpCache->CreateDisplayCacheObj( pOut, rPt, rSz, rObj, rAttr, aDstBmpEx );
- bRet = TRUE;
+ bRet = sal_True;
}
}
else
{
rCached = mpCache->CreateDisplayCacheObj( pOut, rPt, rSz, rObj, rAttr, aDstMtf );
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -383,7 +383,7 @@ BOOL GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt,
if( aGraphic.IsSupportedGraphic() )
{
aGraphic.Draw( pOut, rPt, rSz );
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -394,16 +394,16 @@ BOOL GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt,
// -----------------------------------------------------------------------------
-BOOL GraphicManager::ImplCreateOutput( OutputDevice* pOut,
+sal_Bool GraphicManager::ImplCreateOutput( OutputDevice* pOut,
const Point& rPt, const Size& rSz,
const BitmapEx& rBmpEx, const GraphicAttr& rAttr,
- const ULONG nFlags, BitmapEx* pBmpEx )
+ const sal_uLong nFlags, BitmapEx* pBmpEx )
{
- USHORT nRot10 = rAttr.GetRotation() % 3600;
+ sal_uInt16 nRot10 = rAttr.GetRotation() % 3600;
Point aOutPtPix;
Size aOutSzPix;
Size aUnrotatedSzPix( pOut->LogicToPixel( rSz ) );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( nRot10 )
{
@@ -438,8 +438,8 @@ BOOL GraphicManager::ImplCreateOutput( OutputDevice* pOut,
long* pMapFY = new long[ nNewH ];
long nStartX = -1, nStartY = -1, nEndX = -1, nEndY = -1;
long nX, nY, nTmp, nTmpX, nTmpY;
- BOOL bHMirr = ( rAttr.GetMirrorFlags() & BMP_MIRROR_HORZ ) != 0;
- BOOL bVMirr = ( rAttr.GetMirrorFlags() & BMP_MIRROR_VERT ) != 0;
+ sal_Bool bHMirr = ( rAttr.GetMirrorFlags() & BMP_MIRROR_HORZ ) != 0;
+ sal_Bool bVMirr = ( rAttr.GetMirrorFlags() & BMP_MIRROR_VERT ) != 0;
if( nFlags & GRFMGR_DRAW_BILINEAR )
{
@@ -541,7 +541,7 @@ BOOL GraphicManager::ImplCreateOutput( OutputDevice* pOut,
// do transformation
if( nStartX >= 0L )
{
- const BOOL bSimple = ( 1 == nW || 1 == nH );
+ const sal_Bool bSimple = ( 1 == nW || 1 == nH );
if( nRot10 )
{
@@ -570,7 +570,7 @@ BOOL GraphicManager::ImplCreateOutput( OutputDevice* pOut,
aOutPt = pOut->PixelToLogic( aOutPtPix );
aOutSz = pOut->PixelToLogic( aOutSzPix );
aOutBmpEx = aBmpEx;
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
@@ -624,10 +624,10 @@ BOOL GraphicManager::ImplCreateOutput( OutputDevice* pOut,
// -----------------------------------------------------------------------------
-BOOL GraphicManager::ImplCreateOutput( OutputDevice* pOut,
+sal_Bool GraphicManager::ImplCreateOutput( OutputDevice* pOut,
const Point& rPt, const Size& rSz,
const GDIMetaFile& rMtf, const GraphicAttr& rAttr,
- const ULONG /*nFlags*/, GDIMetaFile& rOutMtf, BitmapEx& rOutBmpEx )
+ const sal_uLong /*nFlags*/, GDIMetaFile& rOutMtf, BitmapEx& rOutBmpEx )
{
const Size aNewSize( rMtf.GetPrefSize() );
@@ -919,12 +919,12 @@ BOOL GraphicManager::ImplCreateOutput( OutputDevice* pOut,
rOutBmpEx = BitmapEx();
}
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------------
-BOOL GraphicManager::ImplCreateScaled( const BitmapEx& rBmpEx,
+sal_Bool GraphicManager::ImplCreateScaled( const BitmapEx& rBmpEx,
long* pMapIX, long* pMapFX, long* pMapIY, long* pMapFY,
long nStartX, long nEndX, long nStartY, long nEndY,
BitmapEx& rOutBmpEx )
@@ -938,8 +938,8 @@ BOOL GraphicManager::ImplCreateScaled( const BitmapEx& rBmpEx,
const long nDstH = nEndY - nStartY + 1L;
long nX, nY, nTmpX, nTmpY, nTmpFX, nTmpFY;
long nXDst, nYDst;
- BYTE cR0, cG0, cB0, cR1, cG1, cB1;
- BOOL bRet = FALSE;
+ sal_uInt8 cR0, cG0, cB0, cR1, cG1, cB1;
+ sal_Bool bRet = sal_False;
DBG_ASSERT( aBmp.GetSizePixel() == rBmpEx.GetSizePixel(),
"GraphicManager::ImplCreateScaled(): bmp size inconsistent" );
@@ -1117,7 +1117,7 @@ BOOL GraphicManager::ImplCreateScaled( const BitmapEx& rBmpEx,
}
aOutBmp.ReleaseAccess( pWAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
aBmp.ReleaseAccess( pAcc );
@@ -1125,7 +1125,7 @@ BOOL GraphicManager::ImplCreateScaled( const BitmapEx& rBmpEx,
if( bRet && rBmpEx.IsTransparent() )
{
- bRet = FALSE;
+ bRet = sal_False;
if( rBmpEx.IsAlpha() )
{
@@ -1198,7 +1198,7 @@ BOOL GraphicManager::ImplCreateScaled( const BitmapEx& rBmpEx,
}
aOutAlpha.ReleaseAccess( pWAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
aAlpha.ReleaseAccess( pAcc );
@@ -1277,7 +1277,7 @@ BOOL GraphicManager::ImplCreateScaled( const BitmapEx& rBmpEx,
{
for( nX = 0L; nX < nDstW; nX++ )
{
- if( pAcc->GetPaletteColor( (BYTE) pAcc->GetPixel( pMapLY[ nY ], pMapLX[ nX ] ) ) == aB )
+ if( pAcc->GetPaletteColor( (sal_uInt8) pAcc->GetPixel( pMapLY[ nY ], pMapLX[ nX ] ) ) == aB )
pWAcc->SetPixel( nY, nX, aWB );
else
pWAcc->SetPixel( nY, nX, aWW );
@@ -1302,7 +1302,7 @@ BOOL GraphicManager::ImplCreateScaled( const BitmapEx& rBmpEx,
delete[] pMapLX;
delete[] pMapLY;
aOutMsk.ReleaseAccess( pWAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
aMsk.ReleaseAccess( pAcc );
@@ -1323,8 +1323,8 @@ BOOL GraphicManager::ImplCreateScaled( const BitmapEx& rBmpEx,
// -----------------------------------------------------------------------------
-BOOL GraphicManager::ImplCreateRotatedScaled( const BitmapEx& rBmpEx,
- USHORT nRot10, const Size& /*rOutSzPix*/, const Size& rUnrotatedSzPix,
+sal_Bool GraphicManager::ImplCreateRotatedScaled( const BitmapEx& rBmpEx,
+ sal_uInt16 nRot10, const Size& /*rOutSzPix*/, const Size& rUnrotatedSzPix,
long* pMapIX, long* pMapFX, long* pMapIY, long* pMapFY,
long nStartX, long nEndX, long nStartY, long nEndY,
BitmapEx& rOutBmpEx )
@@ -1347,8 +1347,8 @@ BOOL GraphicManager::ImplCreateRotatedScaled( const BitmapEx& rBmpEx,
long* pCosY = new long[ nDstH ];
long* pSinY = new long[ nDstH ];
long nX, nY, nTmpX, nTmpY, nTmpFX, nTmpFY, nUnRotX, nUnRotY, nSinY, nCosY;
- BYTE cR0, cG0, cB0, cR1, cG1, cB1;
- BOOL bRet = FALSE;
+ sal_uInt8 cR0, cG0, cB0, cR1, cG1, cB1;
+ sal_Bool bRet = sal_False;
// create horizontal mapping table
for( nX = 0L, nTmpX = aNewBound.Left() + nStartX; nX < nDstW; nX++ )
@@ -1453,7 +1453,7 @@ BOOL GraphicManager::ImplCreateRotatedScaled( const BitmapEx& rBmpEx,
}
aOutBmp.ReleaseAccess( pWAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
aBmp.ReleaseAccess( pAcc );
@@ -1462,7 +1462,7 @@ BOOL GraphicManager::ImplCreateRotatedScaled( const BitmapEx& rBmpEx,
// mask processing
if( bRet && ( rBmpEx.IsTransparent() || ( nRot10 != 900 && nRot10 != 1800 && nRot10 != 2700 ) ) )
{
- bRet = FALSE;
+ bRet = sal_False;
if( rBmpEx.IsAlpha() )
{
@@ -1553,7 +1553,7 @@ BOOL GraphicManager::ImplCreateRotatedScaled( const BitmapEx& rBmpEx,
}
aOutAlpha.ReleaseAccess( pWAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
aAlpha.ReleaseAccess( pAcc );
@@ -1626,7 +1626,7 @@ BOOL GraphicManager::ImplCreateRotatedScaled( const BitmapEx& rBmpEx,
if( pMAcc )
aMsk.ReleaseAccess( pMAcc );
- bRet = TRUE;
+ bRet = sal_True;
}
aOutMsk.ReleaseAccess( pWAcc );
@@ -1652,7 +1652,7 @@ BOOL GraphicManager::ImplCreateRotatedScaled( const BitmapEx& rBmpEx,
// -----------------------------------------------------------------------------
-void GraphicManager::ImplAdjust( BitmapEx& rBmpEx, const GraphicAttr& rAttr, ULONG nAdjustmentFlags )
+void GraphicManager::ImplAdjust( BitmapEx& rBmpEx, const GraphicAttr& rAttr, sal_uLong nAdjustmentFlags )
{
GraphicAttr aAttr( rAttr );
@@ -1700,7 +1700,7 @@ void GraphicManager::ImplAdjust( BitmapEx& rBmpEx, const GraphicAttr& rAttr, ULO
if( ( nAdjustmentFlags & ADJUSTMENT_TRANSPARENCY ) && aAttr.IsTransparent() )
{
AlphaMask aAlpha;
- BYTE cTrans = aAttr.GetTransparency();
+ sal_uInt8 cTrans = aAttr.GetTransparency();
if( !rBmpEx.IsTransparent() )
aAlpha = AlphaMask( rBmpEx.GetSizePixel(), &cTrans );
@@ -1716,7 +1716,7 @@ void GraphicManager::ImplAdjust( BitmapEx& rBmpEx, const GraphicAttr& rAttr, ULO
if( pA )
{
- ULONG nTrans = cTrans, nNewTrans;
+ sal_uLong nTrans = cTrans, nNewTrans;
const long nWidth = pA->Width(), nHeight = pA->Height();
if( pA->GetScanlineFormat() == BMP_FORMAT_8BIT_PAL )
@@ -1728,7 +1728,7 @@ void GraphicManager::ImplAdjust( BitmapEx& rBmpEx, const GraphicAttr& rAttr, ULO
for( long nX = 0; nX < nWidth; nX++ )
{
nNewTrans = nTrans + *pAScan;
- *pAScan++ = (BYTE) ( ( nNewTrans & 0xffffff00 ) ? 255 : nNewTrans );
+ *pAScan++ = (sal_uInt8) ( ( nNewTrans & 0xffffff00 ) ? 255 : nNewTrans );
}
}
}
@@ -1741,7 +1741,7 @@ void GraphicManager::ImplAdjust( BitmapEx& rBmpEx, const GraphicAttr& rAttr, ULO
for( long nX = 0; nX < nWidth; nX++ )
{
nNewTrans = nTrans + pA->GetPixel( nY, nX ).GetIndex();
- aAlphaValue.SetIndex( (BYTE) ( ( nNewTrans & 0xffffff00 ) ? 255 : nNewTrans ) );
+ aAlphaValue.SetIndex( (sal_uInt8) ( ( nNewTrans & 0xffffff00 ) ? 255 : nNewTrans ) );
pA->SetPixel( nY, nX, aAlphaValue );
}
}
@@ -1757,7 +1757,7 @@ void GraphicManager::ImplAdjust( BitmapEx& rBmpEx, const GraphicAttr& rAttr, ULO
// -----------------------------------------------------------------------------
-void GraphicManager::ImplAdjust( GDIMetaFile& rMtf, const GraphicAttr& rAttr, ULONG nAdjustmentFlags )
+void GraphicManager::ImplAdjust( GDIMetaFile& rMtf, const GraphicAttr& rAttr, sal_uLong nAdjustmentFlags )
{
GraphicAttr aAttr( rAttr );
@@ -1810,7 +1810,7 @@ void GraphicManager::ImplAdjust( GDIMetaFile& rMtf, const GraphicAttr& rAttr, UL
// -----------------------------------------------------------------------------
-void GraphicManager::ImplAdjust( Animation& rAnimation, const GraphicAttr& rAttr, ULONG nAdjustmentFlags )
+void GraphicManager::ImplAdjust( Animation& rAnimation, const GraphicAttr& rAttr, sal_uLong nAdjustmentFlags )
{
GraphicAttr aAttr( rAttr );
@@ -1866,7 +1866,7 @@ void GraphicManager::ImplAdjust( Animation& rAnimation, const GraphicAttr& rAttr
void GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const GDIMetaFile& rMtf, const GraphicAttr& rAttr )
{
- USHORT nRot10 = rAttr.GetRotation() % 3600;
+ sal_uInt16 nRot10 = rAttr.GetRotation() % 3600;
Point aOutPt( rPt );
Size aOutSz( rSz );
@@ -1924,7 +1924,7 @@ struct ImplTileInfo
bool GraphicObject::ImplRenderTempTile( VirtualDevice& rVDev, int nExponent,
int nNumTilesX, int nNumTilesY,
const Size& rTileSizePixel,
- const GraphicAttr* pAttr, ULONG nFlags )
+ const GraphicAttr* pAttr, sal_uLong nFlags )
{
if( nExponent <= 1 )
return false;
@@ -1944,8 +1944,8 @@ bool GraphicObject::ImplRenderTempTile( VirtualDevice& rVDev, int nExponent,
// #105229# Switch off mapping (converting to logic and back to
// pixel might cause roundoff errors)
- BOOL bOldMap( rVDev.IsMapModeEnabled() );
- rVDev.EnableMapMode( FALSE );
+ sal_Bool bOldMap( rVDev.IsMapModeEnabled() );
+ rVDev.EnableMapMode( sal_False );
bool bRet( ImplRenderTileRecursive( rVDev, nExponent, nMSBFactor, nNumTilesX, nNumTilesY,
nNumTilesX, nNumTilesY, rTileSizePixel, pAttr, nFlags, aTileInfo ) );
@@ -1968,7 +1968,7 @@ bool GraphicObject::ImplRenderTileRecursive( VirtualDevice& rVDev, int nExponent
int nNumOrigTilesX, int nNumOrigTilesY,
int nRemainderTilesX, int nRemainderTilesY,
const Size& rTileSizePixel, const GraphicAttr* pAttr,
- ULONG nFlags, ImplTileInfo& rTileInfo )
+ sal_uLong nFlags, ImplTileInfo& rTileInfo )
{
// gets loaded with our tile bitmap
GraphicObject aTmpGraphic;
@@ -2143,7 +2143,7 @@ bool GraphicObject::ImplRenderTileRecursive( VirtualDevice& rVDev, int nExponent
// -----------------------------------------------------------------------------
bool GraphicObject::ImplDrawTiled( OutputDevice* pOut, const Rectangle& rArea, const Size& rSizePixel,
- const Size& rOffset, const GraphicAttr* pAttr, ULONG nFlags, int nTileCacheSize1D )
+ const Size& rOffset, const GraphicAttr* pAttr, sal_uLong nFlags, int nTileCacheSize1D )
{
// how many tiles to generate per recursion step
enum{ SubdivisionExponent=2 };
@@ -2254,7 +2254,7 @@ bool GraphicObject::ImplDrawTiled( OutputDevice* pOut, const Rectangle& rArea, c
bool GraphicObject::ImplDrawTiled( OutputDevice& rOut, const Point& rPosPixel,
int nNumTilesX, int nNumTilesY,
- const Size& rTileSizePixel, const GraphicAttr* pAttr, ULONG nFlags )
+ const Size& rTileSizePixel, const GraphicAttr* pAttr, sal_uLong nFlags )
{
Point aCurrPos( rPosPixel );
Size aTileSizeLogic( rOut.PixelToLogic( rTileSizePixel ) );
@@ -2262,14 +2262,14 @@ bool GraphicObject::ImplDrawTiled( OutputDevice& rOut, const Point& rPosPixel,
// #107607# Use logical coordinates for metafile playing, too
bool bDrawInPixel( rOut.GetConnectMetaFile() == NULL && GRAPHIC_BITMAP == GetType() );
- BOOL bRet( FALSE );
+ sal_Bool bRet( sal_False );
// #105229# Switch off mapping (converting to logic and back to
// pixel might cause roundoff errors)
- BOOL bOldMap( rOut.IsMapModeEnabled() );
+ sal_Bool bOldMap( rOut.IsMapModeEnabled() );
if( bDrawInPixel )
- rOut.EnableMapMode( FALSE );
+ rOut.EnableMapMode( sal_False );
for( nY=0; nY < nNumTilesY; ++nY )
{
@@ -2308,7 +2308,7 @@ void GraphicObject::ImplTransformBitmap( BitmapEx& rBmpEx,
const Size& rCropRightBottom,
const Rectangle& rCropRect,
const Size& rDstSize,
- BOOL bEnlarge ) const
+ sal_Bool bEnlarge ) const
{
// #107947# Extracted from svdograf.cxx
diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx
index f1674dcd7d4a..5645f7ee9ddf 100644
--- a/svtools/source/graphic/provider.cxx
+++ b/svtools/source/graphic/provider.cxx
@@ -337,7 +337,7 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadResource( const :
if( 0 < nImageId )
{
- const Image aImage( aImageList.GetImage( sal::static_int_cast< USHORT >(nImageId) ) );
+ const Image aImage( aImageList.GetImage( sal::static_int_cast< sal_uInt16 >(nImageId) ) );
aBmpEx = aImage.GetBitmapEx();
}
else
diff --git a/svtools/source/hatchwindow/ipwin.cxx b/svtools/source/hatchwindow/ipwin.cxx
index 1beae4a54355..65db0f444faa 100644
--- a/svtools/source/hatchwindow/ipwin.cxx
+++ b/svtools/source/hatchwindow/ipwin.cxx
@@ -43,7 +43,7 @@
SvResizeHelper::SvResizeHelper()
: aBorder( 5, 5 )
, nGrab( -1 )
- , bResizeable( TRUE )
+ , bResizeable( sal_True )
{
}
@@ -127,7 +127,7 @@ void SvResizeHelper::Draw( OutputDevice * pDev )
Rectangle aMoveRects[ 4 ];
FillMoveRectsPixel( aMoveRects );
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < 4; i++ )
pDev->DrawRect( aMoveRects[ i ] );
if( bResizeable )
@@ -151,7 +151,7 @@ void SvResizeHelper::InvalidateBorder( Window * pWin )
{
Rectangle aMoveRects[ 4 ];
FillMoveRectsPixel( aMoveRects );
- for( USHORT i = 0; i < 4; i++ )
+ for( sal_uInt16 i = 0; i < 4; i++ )
pWin->Invalidate( aMoveRects[ i ] );
}
@@ -160,7 +160,7 @@ void SvResizeHelper::InvalidateBorder( Window * pWin )
|*
|* Beschreibung
*************************************************************************/
-BOOL SvResizeHelper::SelectBegin( Window * pWin, const Point & rPos )
+sal_Bool SvResizeHelper::SelectBegin( Window * pWin, const Point & rPos )
{
if( -1 == nGrab )
{
@@ -169,10 +169,10 @@ BOOL SvResizeHelper::SelectBegin( Window * pWin, const Point & rPos )
{
aSelPos = rPos; // Start-Position merken
pWin->CaptureMouse();
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -188,14 +188,14 @@ short SvResizeHelper::SelectMove( Window * pWin, const Point & rPos )
{
Rectangle aRects[ 8 ];
FillHandleRectsPixel( aRects );
- for( USHORT i = 0; i < 8; i++ )
+ for( sal_uInt16 i = 0; i < 8; i++ )
if( aRects[ i ].IsInside( rPos ) )
return i;
}
// Move-Rect ueberlappen Handles
Rectangle aMoveRects[ 4 ];
FillMoveRectsPixel( aMoveRects );
- for( USHORT i = 0; i < 4; i++ )
+ for( sal_uInt16 i = 0; i < 4; i++ )
if( aMoveRects[ i ].IsInside( rPos ) )
return 8;
}
@@ -420,7 +420,7 @@ void SvResizeHelper::ValidateRect( Rectangle & rValidate ) const
|*
|* Beschreibung
*************************************************************************/
-BOOL SvResizeHelper::SelectRelease( Window * pWin, const Point & rPos,
+sal_Bool SvResizeHelper::SelectRelease( Window * pWin, const Point & rPos,
Rectangle & rOutPosSize )
{
if( -1 != nGrab )
@@ -430,9 +430,9 @@ BOOL SvResizeHelper::SelectRelease( Window * pWin, const Point & rPos,
nGrab = -1;
pWin->ReleaseMouse();
pWin->HideTracking();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -631,7 +631,7 @@ long SvResizeWindow::Notify( NotifyEvent& rEvt )
{
if ( rEvt.GetType() == EVENT_LOSEFOCUS && m_bActive )
{
- BOOL bHasFocus = HasChildPathFocus(TRUE);
+ sal_Bool bHasFocus = HasChildPathFocus(sal_True);
if ( !bHasFocus )
{
m_bActive = sal_False;
diff --git a/svtools/source/hatchwindow/ipwin.hxx b/svtools/source/hatchwindow/ipwin.hxx
index 4c7cb6d88d36..1c58bc5b7178 100644
--- a/svtools/source/hatchwindow/ipwin.hxx
+++ b/svtools/source/hatchwindow/ipwin.hxx
@@ -40,11 +40,11 @@ class SvResizeHelper
Rectangle aOuter;
short nGrab; // -1 kein Grab, 0 - 7, 8 = Move, siehe FillHandle...
Point aSelPos;
- BOOL bResizeable;
+ sal_Bool bResizeable;
public:
SvResizeHelper();
- void SetResizeable( BOOL b ) { bResizeable = b; }
+ void SetResizeable( sal_Bool b ) { bResizeable = b; }
short GetGrab() const { return nGrab; }
void SetBorderPixel( const Size & rBorderP )
{ aBorder = rBorderP; }
@@ -67,12 +67,12 @@ public:
void FillMoveRectsPixel( Rectangle aRects[ 4 ] ) const;
void Draw( OutputDevice * );
void InvalidateBorder( Window * );
- BOOL SelectBegin( Window *, const Point & rPos );
+ sal_Bool SelectBegin( Window *, const Point & rPos );
short SelectMove( Window * pWin, const Point & rPos );
Point GetTrackPosPixel( const Rectangle & rRect ) const;
Rectangle GetTrackRectPixel( const Point & rTrackPos ) const;
void ValidateRect( Rectangle & rValidate ) const;
- BOOL SelectRelease( Window *, const Point & rPos, Rectangle & rOutPosSize );
+ sal_Bool SelectRelease( Window *, const Point & rPos, Rectangle & rOutPosSize );
void Release( Window * pWin );
};
diff --git a/svtools/source/inc/gifread.hxx b/svtools/source/inc/gifread.hxx
index de4c6935ef67..89e6c8e0df4b 100644
--- a/svtools/source/inc/gifread.hxx
+++ b/svtools/source/inc/gifread.hxx
@@ -88,41 +88,41 @@ class GIFReader : public GraphicReader
long nLastPos;
sal_uInt32 nLogWidth100;
sal_uInt32 nLogHeight100;
- USHORT nTimer;
- USHORT nGlobalWidth; // maximale Bildbreite aus Header
- USHORT nGlobalHeight; // maximale Bildhoehe aus Header
- USHORT nImageWidth; // maximale Bildbreite aus Header
- USHORT nImageHeight; // maximale Bildhoehe aus Header
- USHORT nImagePosX;
- USHORT nImagePosY;
- USHORT nImageX; // maximale Bildbreite aus Header
- USHORT nImageY; // maximale Bildhoehe aus Header
- USHORT nLastImageY;
- USHORT nLastInterCount;
- USHORT nLoops;
+ sal_uInt16 nTimer;
+ sal_uInt16 nGlobalWidth; // maximale Bildbreite aus Header
+ sal_uInt16 nGlobalHeight; // maximale Bildhoehe aus Header
+ sal_uInt16 nImageWidth; // maximale Bildbreite aus Header
+ sal_uInt16 nImageHeight; // maximale Bildhoehe aus Header
+ sal_uInt16 nImagePosX;
+ sal_uInt16 nImagePosY;
+ sal_uInt16 nImageX; // maximale Bildbreite aus Header
+ sal_uInt16 nImageY; // maximale Bildhoehe aus Header
+ sal_uInt16 nLastImageY;
+ sal_uInt16 nLastInterCount;
+ sal_uInt16 nLoops;
GIFAction eActAction;
- BOOL bStatus;
- BOOL bGCTransparent; // Ob das Bild Transparent ist, wenn ja:
- BOOL bInterlaced;
- BOOL bOverreadBlock;
- BOOL bImGraphicReady;
- BOOL bGlobalPalette;
- BYTE nBackgroundColor; // Hintergrundfarbe
- BYTE nGCTransparentIndex; // Pixel von diesem Index sind durchsichtig
- BYTE nGCDisposalMethod; // 'Disposal Method' (siehe GIF-Doku)
- BYTE cTransIndex1;
- BYTE cNonTransIndex1;
-
- void ReadPaletteEntries( BitmapPalette* pPal, ULONG nCount );
+ sal_Bool bStatus;
+ sal_Bool bGCTransparent; // Ob das Bild Transparent ist, wenn ja:
+ sal_Bool bInterlaced;
+ sal_Bool bOverreadBlock;
+ sal_Bool bImGraphicReady;
+ sal_Bool bGlobalPalette;
+ sal_uInt8 nBackgroundColor; // Hintergrundfarbe
+ sal_uInt8 nGCTransparentIndex; // Pixel von diesem Index sind durchsichtig
+ sal_uInt8 nGCDisposalMethod; // 'Disposal Method' (siehe GIF-Doku)
+ sal_uInt8 cTransIndex1;
+ sal_uInt8 cNonTransIndex1;
+
+ void ReadPaletteEntries( BitmapPalette* pPal, sal_uLong nCount );
void ClearImageExtensions();
- BOOL CreateBitmaps( long nWidth, long nHeight, BitmapPalette* pPal, BOOL bWatchForBackgroundColor );
- BOOL ReadGlobalHeader();
- BOOL ReadExtension();
- BOOL ReadLocalHeader();
- ULONG ReadNextBlock();
- void FillImages( HPBYTE pBytes, ULONG nCount );
+ sal_Bool CreateBitmaps( long nWidth, long nHeight, BitmapPalette* pPal, sal_Bool bWatchForBackgroundColor );
+ sal_Bool ReadGlobalHeader();
+ sal_Bool ReadExtension();
+ sal_Bool ReadLocalHeader();
+ sal_uLong ReadNextBlock();
+ void FillImages( HPBYTE pBytes, sal_uLong nCount );
void CreateNewBitmaps();
- BOOL ProcessGIF();
+ sal_Bool ProcessGIF();
public:
@@ -139,6 +139,6 @@ public:
// - ImportGIF -
// -------------
- BOOL ImportGIF( SvStream& rStream, Graphic& rGraphic );
+ sal_Bool ImportGIF( SvStream& rStream, Graphic& rGraphic );
#endif // _GIFREAD_HXX
diff --git a/svtools/source/inc/jpeg.hxx b/svtools/source/inc/jpeg.hxx
index 9923190c5e21..0d8db406132a 100644
--- a/svtools/source/inc/jpeg.hxx
+++ b/svtools/source/inc/jpeg.hxx
@@ -93,8 +93,8 @@ class JPEGWriter
SvStream& rOStm;
Bitmap aBmp;
BitmapReadAccess* pAcc;
- BYTE* pBuffer;
- BOOL bNative;
+ sal_uInt8* pBuffer;
+ sal_Bool bNative;
sal_Bool bGreys;
sal_Int32 nQuality;
@@ -111,7 +111,7 @@ public:
bool* pExportWasGrey = NULL );
~JPEGWriter() {};
- BOOL Write( const Graphic& rGraphic );
+ sal_Bool Write( const Graphic& rGraphic );
};
#endif // _JPEGPRIVATE
@@ -120,9 +120,9 @@ public:
// - Import/ExportJPEG -
// ---------------------
-BOOL ImportJPEG( SvStream& rStream, Graphic& rGraphic, void* pCallerData, sal_Int32 nImportFlags );
+sal_Bool ImportJPEG( SvStream& rStream, Graphic& rGraphic, void* pCallerData, sal_Int32 nImportFlags );
-BOOL ExportJPEG( SvStream& rStream,
+sal_Bool ExportJPEG( SvStream& rStream,
const Graphic& rGraphic,
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData,
bool* pExportWasGrey = NULL
diff --git a/svtools/source/inc/msgrd.hxx b/svtools/source/inc/msgrd.hxx
index 2d3dcccb1244..21c0460a1c0b 100644
--- a/svtools/source/inc/msgrd.hxx
+++ b/svtools/source/inc/msgrd.hxx
@@ -29,9 +29,9 @@
#define _MSGRD_HXX
-BOOL ConvertMSGToGDIMetaFile( SvStream & rMSG, GDIMetaFile & rGDIMetaFile,
- BOOL(*pCallback)(void *, USHORT), void * pCallerData,
- ULONG nMinPercent, ULONG nMaxPercent);
+sal_Bool ConvertMSGToGDIMetaFile( SvStream & rMSG, GDIMetaFile & rGDIMetaFile,
+ sal_Bool(*pCallback)(void *, sal_uInt16), void * pCallerData,
+ sal_uLong nMinPercent, sal_uLong nMaxPercent);
#endif // _MSGRD_HXX
diff --git a/svtools/source/inc/msgwr.hxx b/svtools/source/inc/msgwr.hxx
index 7e72e98c124c..d133031673e7 100644
--- a/svtools/source/inc/msgwr.hxx
+++ b/svtools/source/inc/msgwr.hxx
@@ -29,9 +29,9 @@
#define _MSGWR_HXX
-BOOL ConvertGraphicToMSG(const Graphic & rGraphic, SvStream & rTargetStream,
- BOOL(*pCallback)(void *, USHORT), void * pCallerData,
- ULONG nMinPercent, ULONG nMaxPercent);
+sal_Bool ConvertGraphicToMSG(const Graphic & rGraphic, SvStream & rTargetStream,
+ sal_Bool(*pCallback)(void *, sal_uInt16), void * pCallerData,
+ sal_uLong nMinPercent, sal_uLong nMaxPercent);
#endif // _MSGWR_HXX
diff --git a/svtools/source/inc/property.hxx b/svtools/source/inc/property.hxx
index 689da1faf140..aa9a721fa292 100644
--- a/svtools/source/inc/property.hxx
+++ b/svtools/source/inc/property.hxx
@@ -85,13 +85,13 @@ public:
virtual SvXPropertyCtrListener* GetSvXPropertyCtrListener()=0;
virtual void SetProperty(const String &rString)=0;
virtual String GetProperty()const=0;
- virtual BOOL HasList()=0;
+ virtual sal_Bool HasList()=0;
virtual void ClearList()=0;
virtual void InsertEntry( const String& rString,
- USHORT nPos = LISTBOX_APPEND )=0;
+ sal_uInt16 nPos = LISTBOX_APPEND )=0;
virtual void SetCtrSize(const Size& rSize)=0;
- virtual void SetLocked(BOOL bLocked=TRUE)=0;
+ virtual void SetLocked(sal_Bool bLocked=sal_True)=0;
virtual void SetMyName(const String &rString)=0;
virtual String GetMyName()const=0;
@@ -135,13 +135,13 @@ public:
virtual void SetProperty(const String &rString);
virtual String GetProperty()const;
- virtual BOOL HasList();
+ virtual sal_Bool HasList();
virtual void ClearList();
virtual void InsertEntry( const String& rString,
- USHORT nPos = LISTBOX_APPEND );
+ sal_uInt16 nPos = LISTBOX_APPEND );
virtual void SetCtrSize(const Size& rSize);
- virtual void SetLocked(BOOL bLocked=TRUE);
+ virtual void SetLocked(sal_Bool bLocked=sal_True);
virtual void SetMyName(const String &rString);
virtual String GetMyName()const;
@@ -178,13 +178,13 @@ public:
virtual void SetProperty(const String &rString);
virtual String GetProperty()const;
- virtual BOOL HasList();
+ virtual sal_Bool HasList();
virtual void ClearList();
virtual void InsertEntry( const String& rString,
- USHORT nPos = LISTBOX_APPEND );
+ sal_uInt16 nPos = LISTBOX_APPEND );
virtual void SetCtrSize(const Size& rSize);
- virtual void SetLocked(BOOL bLocked=TRUE);
+ virtual void SetLocked(sal_Bool bLocked=sal_True);
virtual void SetMyName(const String &rString);
virtual String GetMyName()const;
@@ -220,13 +220,13 @@ public:
virtual void SetProperty(const String &rString);
virtual String GetProperty()const;
- virtual BOOL HasList();
+ virtual sal_Bool HasList();
virtual void ClearList();
virtual void InsertEntry( const String& rString,
- USHORT nPos = LISTBOX_APPEND );
+ sal_uInt16 nPos = LISTBOX_APPEND );
virtual void SetCtrSize(const Size& rSize);
- virtual void SetLocked(BOOL bLocked=TRUE);
+ virtual void SetLocked(sal_Bool bLocked=sal_True);
virtual void SetMyName(const String &rString);
virtual String GetMyName()const;
@@ -241,14 +241,14 @@ class SvPropertyLine : public Control
{
private:
FixedText aName;
- USHORT nNameWidth;
- BOOL bNeedsRepaint;
+ sal_uInt16 nNameWidth;
+ sal_Bool bNeedsRepaint;
SvXPropertyControl* pSvXPropertyControl;
PushButton aXButton;
- BOOL bIsLocked;
- BOOL bHasXButton;
- BOOL bIsHyperlink;
+ sal_Bool bIsLocked;
+ sal_Bool bHasXButton;
+ sal_Bool bIsHyperlink;
eKindOfControl eKindOfCtr;
protected:
@@ -260,8 +260,8 @@ public:
SvPropertyLine( Window* pParent,
const ResId& rResId );
- BOOL NeedsRepaint();
- void SetNeedsRepaint(BOOL bFlag);
+ sal_Bool NeedsRepaint();
+ void SetNeedsRepaint(sal_Bool bFlag);
void SetSvXPropertyControl(SvXPropertyControl*);
SvXPropertyControl* GetSvXPropertyControl();
@@ -270,16 +270,16 @@ public:
void SetName(const String& rString );
String GetName() const;
- void SetNameWidth(USHORT);
+ void SetNameWidth(sal_uInt16);
void ShowXButton();
void HideXButton();
- BOOL IsVisibleXButton();
- void ShowAsHyperLink(BOOL nFlag=TRUE);
- BOOL IsShownAsHyperlink();
+ sal_Bool IsVisibleXButton();
+ void ShowAsHyperLink(sal_Bool nFlag=sal_True);
+ sal_Bool IsShownAsHyperlink();
- void Locked(BOOL nFlag=TRUE);
- BOOL IsLineLocked();
+ void Locked(sal_Bool nFlag=sal_True);
+ sal_Bool IsLineLocked();
void SetClickHdl(const Link&);
@@ -294,9 +294,9 @@ public:
String aValue;
SvStrings theValues; // ???
- BOOL bHasVisibleXButton;
- BOOL bIsHyperLink;
- BOOL bIsLocked;
+ sal_Bool bHasVisibleXButton;
+ sal_Bool bIsHyperLink;
+ sal_Bool bIsLocked;
void* pDataPtr;
SvXPropertyControl* pControl;
};
@@ -378,9 +378,9 @@ private:
ScrollBar aVScroll;
SvPropLineArray PLineArray;
SvPropertyDataControl* pPropDataControl;
- USHORT nRowHeight;
- BOOL bUpdate;
- USHORT nTheNameSize;
+ sal_uInt16 nRowHeight;
+ sal_Bool bUpdate;
+ sal_uInt16 nTheNameSize;
long nYOffset;
DECL_LINK( ScrollHdl,ScrollBar*);
@@ -405,7 +405,7 @@ public:
~SvListBoxForProperties();
- virtual USHORT CalcVisibleLines();
+ virtual sal_uInt16 CalcVisibleLines();
virtual void EnableUpdate();
virtual void DisableUpdate();
@@ -413,19 +413,19 @@ public:
virtual void Clear();
- virtual USHORT InsertEntry( const SvPropertyData&, USHORT nPos = LISTBOX_APPEND );
+ virtual sal_uInt16 InsertEntry( const SvPropertyData&, sal_uInt16 nPos = LISTBOX_APPEND );
- virtual void ChangeEntry( const SvPropertyData&, USHORT nPos);
+ virtual void ChangeEntry( const SvPropertyData&, sal_uInt16 nPos);
- virtual USHORT AppendEntry( const SvPropertyData&);
+ virtual sal_uInt16 AppendEntry( const SvPropertyData&);
virtual void SetPropertyValue( const String & rEntryName, const String & rValue );
- virtual void SetFirstVisibleEntry(USHORT nPos);
- virtual USHORT GetFirstVisibleEntry();
+ virtual void SetFirstVisibleEntry(sal_uInt16 nPos);
+ virtual sal_uInt16 GetFirstVisibleEntry();
- virtual void SetSelectedEntry(USHORT nPos);
- virtual USHORT GetSelectedEntry();
+ virtual void SetSelectedEntry(sal_uInt16 nPos);
+ virtual sal_uInt16 GetSelectedEntry();
};
class SvTabPageForProperties: public TabPage
@@ -450,7 +450,7 @@ class SvBasicPropertyDataControl: public SvPropertyDataControl
{
private:
- BOOL bCorrectness;
+ sal_Bool bCorrectness;
String aEntryName;
String aEntryProperty;
String aCorrectProperty;
@@ -481,7 +481,7 @@ public:
virtual void LinkClicked(const String& aName,
void* pData);
- virtual void SetIsCorrect(BOOL nFlag);
+ virtual void SetIsCorrect(sal_Bool nFlag);
//virtual String GetTheCorrectProperty()const;
virtual void SetTheCorrectProperty(const String& aName);
@@ -521,30 +521,30 @@ public:
~SvPropertyBox();
- virtual USHORT CalcVisibleLines();
+ virtual sal_uInt16 CalcVisibleLines();
virtual void EnableUpdate(); // auch IDL?
virtual void DisableUpdate(); // auch IDL?
// AB: Hier beginnt das 'offizielle' Interface, das in IDL uebernommen werden soll
virtual void SetController(SvPropertyDataControl *);
- virtual USHORT AppendPage( const String & r );
- virtual void SetPage( USHORT );
- virtual USHORT GetCurPage();
+ virtual sal_uInt16 AppendPage( const String & r );
+ virtual void SetPage( sal_uInt16 );
+ virtual sal_uInt16 GetCurPage();
virtual void ClearAll();
virtual void ClearTable();
virtual void SetPropertyValue( const String & rEntryName, const String & rValue );
- virtual USHORT InsertEntry( const SvPropertyData&, USHORT nPos = LISTBOX_APPEND );
- virtual void ChangeEntry( const SvPropertyData&, USHORT nPos);
- virtual USHORT AppendEntry( const SvPropertyData&);
+ virtual sal_uInt16 InsertEntry( const SvPropertyData&, sal_uInt16 nPos = LISTBOX_APPEND );
+ virtual void ChangeEntry( const SvPropertyData&, sal_uInt16 nPos);
+ virtual sal_uInt16 AppendEntry( const SvPropertyData&);
- virtual void SetFirstVisibleEntry(USHORT nPos);
- virtual USHORT GetFirstVisibleEntry();
+ virtual void SetFirstVisibleEntry(sal_uInt16 nPos);
+ virtual sal_uInt16 GetFirstVisibleEntry();
- virtual void SetSelectedEntry(USHORT nPos);
- virtual USHORT GetSelectedEntry();
+ virtual void SetSelectedEntry(sal_uInt16 nPos);
+ virtual sal_uInt16 GetSelectedEntry();
};
@@ -556,8 +556,8 @@ private:
SvBasicPropertyDataControl aBaProDatCtr;
OKButton anOk;
CancelButton aCancel;
- USHORT nCount;
- USHORT nClickCount;
+ sal_uInt16 nCount;
+ sal_uInt16 nClickCount;
SvPropertyData aProperty;
SvPropertyBox aPropListBox;
diff --git a/svtools/source/inc/sgfbram.hxx b/svtools/source/inc/sgfbram.hxx
index 2acab5445a8c..aa4ed5836606 100644
--- a/svtools/source/inc/sgfbram.hxx
+++ b/svtools/source/inc/sgfbram.hxx
@@ -40,11 +40,11 @@
#define SgfDontKnow 255 /* Unbekannt oder kein SGF/SGV */
// Konstanten fr SgfHeader.SwGrCol
-#define SgfBlckWhit 1 /* Schwarz/Weiá Bild Ä¿ SimpVector, */
-#define SgfGrayscal 2 /* Bild mit Graustufen ³ StarDraw und */
+#define SgfBlckWhit 1 /* Schwarz/Wei?Bild Ä¿ SimpVector, */
+#define SgfGrayscal 2 /* Bild mit Graustufen ?StarDraw und */
#define Sgf16Colors 3 /* Farbbild (16 Farben) ÄÙ Bit Image */
#define SgfVectFarb 4 /* Farben fr Linien verwenden Ä¿ */
-#define SgfVectGray 5 /* Graustufen fr Linien verwenden ³ Nur fr */
+#define SgfVectGray 5 /* Graustufen fr Linien verwenden ?Nur fr */
#define SgfVectWdth 6 /* Strichst„rken fr Linien verwenden ÄÙ SimpVector */
@@ -52,35 +52,35 @@
class SgfHeader
{
public:
- UINT16 Magic;
- UINT16 Version;
- UINT16 Typ;
- UINT16 Xsize;
- UINT16 Ysize;
- INT16 Xoffs;
- INT16 Yoffs;
- UINT16 Planes; // Layer
- UINT16 SwGrCol;
+ sal_uInt16 Magic;
+ sal_uInt16 Version;
+ sal_uInt16 Typ;
+ sal_uInt16 Xsize;
+ sal_uInt16 Ysize;
+ sal_Int16 Xoffs;
+ sal_Int16 Yoffs;
+ sal_uInt16 Planes; // Layer
+ sal_uInt16 SwGrCol;
char Autor[10];
char Programm[10];
- UINT16 OfsLo,OfsHi; // DWord-Allignment ist notwendig (38 mod 4 =2) !
+ sal_uInt16 OfsLo,OfsHi; // DWord-Allignment ist notwendig (38 mod 4 =2) !
- UINT32 GetOffset();
+ sal_uInt32 GetOffset();
friend SvStream& operator>>(SvStream& rIStream, SgfHeader& rHead);
- BOOL ChkMagic();
+ sal_Bool ChkMagic();
};
#define SgfEntrySize 22
class SgfEntry
{
public:
- UINT16 Typ;
- UINT16 iFrei;
- UINT16 lFreiLo,lFreiHi;
+ sal_uInt16 Typ;
+ sal_uInt16 iFrei;
+ sal_uInt16 lFreiLo,lFreiHi;
char cFrei[10];
- UINT16 OfsLo,OfsHi; // DWord-Allignment ist notwendig (18 mod 4 =2) !
+ sal_uInt16 OfsLo,OfsHi; // DWord-Allignment ist notwendig (18 mod 4 =2) !
- UINT32 GetOffset();
+ sal_uInt32 GetOffset();
friend SvStream& operator>>(SvStream& rIStream, SgfEntry& rEntr);
};
@@ -88,10 +88,10 @@ public:
class SgfVector
{
public:
- UINT16 Flag;
- INT16 x;
- INT16 y;
- UINT16 OfsLo,OfsHi; // DWord-Allignment ist notwendig (6 mod 4 =2) !
+ sal_uInt16 Flag;
+ sal_Int16 x;
+ sal_Int16 y;
+ sal_uInt16 OfsLo,OfsHi; // DWord-Allignment ist notwendig (6 mod 4 =2) !
friend SvStream& operator>>(SvStream& rIStream, SgfVector& rEntr);
};
@@ -102,7 +102,7 @@ extern long SgfVectXmul;
extern long SgfVectYmul;
extern long SgfVectXdiv;
extern long SgfVectYdiv;
-extern BOOL SgfVectScal;
+extern sal_Bool SgfVectScal;
////////////////////////////////////////////////////////////////////////////////////////////////////
// Windows BMP /////////////////////////////////////////////////////////////////////////////////////
@@ -112,15 +112,15 @@ extern BOOL SgfVectScal;
class BmpFileHeader
{
public:
- UINT16 Typ; // = "BM"
- UINT16 SizeLo,SizeHi; // Filesize in Bytes
- UINT16 Reserve1; // Reserviert
- UINT16 Reserve2; // Reserviert
- UINT16 OfsLo,OfsHi; // Offset?
-
- void SetSize(UINT32 Size);
- void SetOfs(UINT32 Size);
- UINT32 GetOfs();
+ sal_uInt16 Typ; // = "BM"
+ sal_uInt16 SizeLo,SizeHi; // Filesize in Bytes
+ sal_uInt16 Reserve1; // Reserviert
+ sal_uInt16 Reserve2; // Reserviert
+ sal_uInt16 OfsLo,OfsHi; // Offset?
+
+ void SetSize(sal_uInt32 Size);
+ void SetOfs(sal_uInt32 Size);
+ sal_uInt32 GetOfs();
friend SvStream& operator<<(SvStream& rOStream, BmpFileHeader& rHead);
};
@@ -128,17 +128,17 @@ public:
class BmpInfoHeader
{
public:
- UINT32 Size; // GrӇe des BmpInfoHeaders
- INT32 Width; // Breite in Pixel
- INT32 Hight; // H”he in Pixel
- UINT16 Planes; // Anzahl der Planes (immer 1)
- UINT16 PixBits; // Anzahl der Bit je Pixel (1,4,8,oder 24)
- UINT32 Compress; // Datenkompression
- UINT32 ImgSize; // GrӇe der Images in Bytes. Ohne Kompression ist auch 0 erlaubt.
- INT32 xDpmm; // Dot per Meter (0 ist erlaubt)
- INT32 yDpmm; // Dot per Meter (0 ist erlaubt)
- UINT32 ColUsed; // Anzahl der verwendeten Farben (0=alle)
- UINT32 ColMust; // Anzahl der wichtigen Farben (0=alle)
+ sal_uInt32 Size; // GrӇe des BmpInfoHeaders
+ sal_Int32 Width; // Breite in Pixel
+ sal_Int32 Hight; // H”he in Pixel
+ sal_uInt16 Planes; // Anzahl der Planes (immer 1)
+ sal_uInt16 PixBits; // Anzahl der Bit je Pixel (1,4,8,oder 24)
+ sal_uInt32 Compress; // Datenkompression
+ sal_uInt32 ImgSize; // GrӇe der Images in Bytes. Ohne Kompression ist auch 0 erlaubt.
+ sal_Int32 xDpmm; // Dot per Meter (0 ist erlaubt)
+ sal_Int32 yDpmm; // Dot per Meter (0 ist erlaubt)
+ sal_uInt32 ColUsed; // Anzahl der verwendeten Farben (0=alle)
+ sal_uInt32 ColMust; // Anzahl der wichtigen Farben (0=alle)
friend SvStream& operator<<(SvStream& rOStream, BmpInfoHeader& rHead);
};
@@ -146,12 +146,12 @@ public:
#define RGBQuadSize 4
class RGBQuad {
private:
- BYTE Red;
- BYTE Grn;
- BYTE Blu;
- BYTE Fil;
+ sal_uInt8 Red;
+ sal_uInt8 Grn;
+ sal_uInt8 Blu;
+ sal_uInt8 Fil;
public:
- RGBQuad(BYTE R, BYTE G, BYTE B) { Red=R; Grn=G; Blu=B; Fil=0; }
+ RGBQuad(sal_uInt8 R, sal_uInt8 G, sal_uInt8 B) { Red=R; Grn=G; Blu=B; Fil=0; }
};
#endif //_SGFBRAM_HXX
diff --git a/svtools/source/inc/sgffilt.hxx b/svtools/source/inc/sgffilt.hxx
index 1c75917b8f73..28d48fe13820 100644
--- a/svtools/source/inc/sgffilt.hxx
+++ b/svtools/source/inc/sgffilt.hxx
@@ -29,10 +29,10 @@
#define _SGFFILT_HXX
#include <tools/urlobj.hxx>
-BYTE CheckSgfTyp(SvStream& rInp, USHORT& nVersion);
-BOOL SgfBMapFilter(SvStream& rInp, SvStream& rOut);
-BOOL SgfVectFilter(SvStream& rInp, GDIMetaFile& rMtf);
-BOOL SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath );
+sal_uInt8 CheckSgfTyp(SvStream& rInp, sal_uInt16& nVersion);
+sal_Bool SgfBMapFilter(SvStream& rInp, SvStream& rOut);
+sal_Bool SgfVectFilter(SvStream& rInp, GDIMetaFile& rMtf);
+sal_Bool SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath );
// Konstanten fr CheckSgfTyp()
#define SGF_BITIMAGE 1 /* Bitmap */
diff --git a/svtools/source/inc/sgvmain.hxx b/svtools/source/inc/sgvmain.hxx
index 6f69908865c5..3006a23f5f10 100644
--- a/svtools/source/inc/sgvmain.hxx
+++ b/svtools/source/inc/sgvmain.hxx
@@ -36,8 +36,8 @@
#define UCHAR unsigned char
struct PointType {
- INT16 x;
- INT16 y;
+ sal_Int16 x;
+ sal_Int16 y;
};
#define SgfDpmm 40
@@ -45,7 +45,7 @@ struct PointType {
#define DtHdSize 256
class DtHdType {
public:
- BYTE Reserved[256];
+ sal_uInt8 Reserved[256];
friend SvStream& operator>>(SvStream& rIStream, DtHdType& rDtHd);
friend void DtHdOverSeek(SvStream& rInp);
};
@@ -53,30 +53,30 @@ public:
struct Seitenformat {
PointType Size; // 0.00mm...819.175mm (Papiergr��e)
- INT16 RandL; // links Rand auf
- INT16 RandR; // rechts dem Papier
- INT16 RandO; // oben Rand auf
- INT16 RandU; // unten dem Papier
- BYTE PColor; // Future Use
- BYTE PIntens; // erst recht Future use
-// BOOL BorderClip; // Objekte am Rand abschneiden (Schummel wg. Allignment unter NT)
+ sal_Int16 RandL; // links Rand auf
+ sal_Int16 RandR; // rechts dem Papier
+ sal_Int16 RandO; // oben Rand auf
+ sal_Int16 RandU; // unten dem Papier
+ sal_uInt8 PColor; // Future Use
+ sal_uInt8 PIntens; // erst recht Future use
+// sal_Bool BorderClip; // Objekte am Rand abschneiden (Schummel wg. Allignment unter NT)
};
#define PageSize 146
class PageType {
public:
- UINT32 Next; // N�chste Seite
- UINT32 nList; // Objektdaten, erster Record
- UINT32 ListEnd; // Objektdaten, letzter Record
+ sal_uInt32 Next; // N�chste Seite
+ sal_uInt32 nList; // Objektdaten, erster Record
+ sal_uInt32 ListEnd; // Objektdaten, letzter Record
Seitenformat Paper; // Papierdaten
- BOOL BorderClip; // Objekte am Rand abschneiden (Schummel wg. Allignment unter NT)
- BYTE StdPg; // welche Standardseite einblenden ?
+ sal_Bool BorderClip; // Objekte am Rand abschneiden (Schummel wg. Allignment unter NT)
+ sal_uInt8 StdPg; // welche Standardseite einblenden ?
PointType U; // Nullpunkt
- INT16 HlpLnH[20]; // Hilfslinien
- INT16 HlpLnV[20];
- BYTE LnAnzH;
- BYTE LnAnzV;
+ sal_Int16 HlpLnH[20]; // Hilfslinien
+ sal_Int16 HlpLnV[20];
+ sal_uInt8 LnAnzH;
+ sal_uInt8 LnAnzV;
UCHAR PgName[32]; // Seitenname
friend SvStream& operator>>(SvStream& rIStream, PageType& rPage);
};
@@ -86,21 +86,21 @@ enum ObjArtType {ObjStrk,ObjRect,ObjPoly,ObjCirc,ObjSpln,
ObjText,ObjGrup,ObjBmap,ObjVirt,ObjTxtX,ObjMaxi};
struct ObjLineType {
- BYTE LFarbe; // [Index]
- BYTE LBFarbe; // [Index]
- BYTE LIntens; // [%]
- BYTE LMuster; // [Index] inkl. Transparenz
- INT16 LMSize; // [Koeffizient/100]
- INT16 LDicke; // Strichst�rke
+ sal_uInt8 LFarbe; // [Index]
+ sal_uInt8 LBFarbe; // [Index]
+ sal_uInt8 LIntens; // [%]
+ sal_uInt8 LMuster; // [Index] inkl. Transparenz
+ sal_Int16 LMSize; // [Koeffizient/100]
+ sal_Int16 LDicke; // Strichst�rke
};
struct ObjAreaType {
- BYTE FFarbe; // [Index]
- BYTE FBFarbe; // [Index]
- BYTE FIntens; // [%]
- BYTE FDummy1; //
- INT16 FDummy2; //
- UINT16 FMuster; // [Index] inkl. Invers, Transparenz
+ sal_uInt8 FFarbe; // [Index]
+ sal_uInt8 FBFarbe; // [Index]
+ sal_uInt8 FIntens; // [%]
+ sal_uInt8 FDummy1; //
+ sal_Int16 FDummy2; //
+ sal_uInt16 FMuster; // [Index] inkl. Invers, Transparenz
};
#define ObjTextTypeSize 64
@@ -108,24 +108,24 @@ class ObjTextType {
public:
ObjLineType L; // Text-Outline (future)
ObjAreaType F; // Text innen
- UINT16 FontLo,FontHi;// z.B. 92500 (CG Times), zweigeteilt wegen DWordAllign in TextType.
- UINT16 Grad; // 0.5..32767.5 Pt - bei 1000 Pt sollte aber schlu� sein
- UINT16 Breite; // 1..65535% bitte nicht mehr als 500%
- BYTE Justify; // 2 Bit Vert (Hi), 3 Bit Hor (Lo)
- BYTE Kapit; // 1..255%
- UINT16 Schnitt; // 8 Flags
- UINT16 LnFeed; // 1..32767% vom max. Schriftgrad der Zeile
- UINT16 Slant; // Kursivwinkel 0.00..89.99� default 15.00� doppelt Breit angesehen)
- BYTE ZAbst; // Zeichenabstand 0..255% (0=auf der Stelle; 100=normal; 200=Zeichen wird als
- INT8 ChrVPos; // Zeichen V-Position default 0= on Baseline, 10= 5Pt drunter (-64..63�)
+ sal_uInt16 FontLo,FontHi;// z.B. 92500 (CG Times), zweigeteilt wegen DWordAllign in TextType.
+ sal_uInt16 Grad; // 0.5..32767.5 Pt - bei 1000 Pt sollte aber schlu� sein
+ sal_uInt16 Breite; // 1..65535% bitte nicht mehr als 500%
+ sal_uInt8 Justify; // 2 Bit Vert (Hi), 3 Bit Hor (Lo)
+ sal_uInt8 Kapit; // 1..255%
+ sal_uInt16 Schnitt; // 8 Flags
+ sal_uInt16 LnFeed; // 1..32767% vom max. Schriftgrad der Zeile
+ sal_uInt16 Slant; // Kursivwinkel 0.00..89.99� default 15.00� doppelt Breit angesehen)
+ sal_uInt8 ZAbst; // Zeichenabstand 0..255% (0=auf der Stelle; 100=normal; 200=Zeichen wird als
+ sal_sChar ChrVPos; // Zeichen V-Position default 0= on Baseline, 10= 5Pt drunter (-64..63�)
ObjLineType ShdL; // Schatten-Outline (neu 2.0)
ObjAreaType ShdF; // Schatten-innen (neu 2.0)
PointType ShdVers; // Schattenversatz Max.300.00%
- BOOL ShdAbs; // True-> Schattenversatz ist absolut statt relativ zum Schriftgrad
- BOOL NoSpc; // True-> kein Zwischenraum (f�r BackArea)
+ sal_Bool ShdAbs; // True-> Schattenversatz ist absolut statt relativ zum Schriftgrad
+ sal_Bool NoSpc; // True-> kein Zwischenraum (f�r BackArea)
ObjAreaType BackF; // Hintergrundfl�che
- UINT32 GetFont();
- void SetFont(UINT32 FontID);
+ sal_uInt32 GetFont();
+ void SetFont(sal_uInt32 FontID);
};
class Obj0Type { // SuperClass f�r Apple-VMT
@@ -137,16 +137,16 @@ public:
#define ObjkSize 20 /* eigentlich 21. Wg. Allignment ist Flags jedoch verschoben worden*/
class ObjkType: public Obj0Type { // Grundkomponenten aller Stardraw-Objekte
public:
- UINT32 Last;
- UINT32 Next;
- UINT16 MemSize; // in Bytes
+ sal_uInt32 Last;
+ sal_uInt32 Next;
+ sal_uInt16 MemSize; // in Bytes
PointType ObjMin; // XY-Minimum des Objekts
PointType ObjMax; // XY-Maximum des Objekts
- BYTE Art;
- BYTE Layer;
-// BYTE Flags; // (Schummel f�r Allignment unter NT)
+ sal_uInt8 Art;
+ sal_uInt8 Layer;
+// sal_uInt8 Flags; // (Schummel f�r Allignment unter NT)
friend SvStream& operator>>(SvStream& rIStream, ObjkType& rObjk);
- friend BOOL ObjOverSeek(SvStream& rInp, ObjkType& rObjk);
+ friend sal_Bool ObjOverSeek(SvStream& rInp, ObjkType& rObjk);
virtual void Draw(OutputDevice& rOut);
};
@@ -154,8 +154,8 @@ public:
#define StrkSize 38
class StrkType: public ObjkType {
public:
- BYTE Flags; // (Schummel f�r Allignment unter NT)
- BYTE LEnden; // Linienenden
+ sal_uInt8 Flags; // (Schummel f�r Allignment unter NT)
+ sal_uInt8 LEnden; // Linienenden
ObjLineType L;
PointType Pos1; // Anfangspunkt
PointType Pos2; // Endpunkt
@@ -167,15 +167,15 @@ public:
#define RectSize 52
class RectType: public ObjkType {
public:
- BYTE Flags; // (Schummel f�r Allignment unter NT)
- BYTE Reserve;
+ sal_uInt8 Flags; // (Schummel f�r Allignment unter NT)
+ sal_uInt8 Reserve;
ObjLineType L;
ObjAreaType F;
PointType Pos1; // LO-Ecke = Bezugspunkt
PointType Pos2; // R-Ecke
- INT16 Radius; // Eckenradius
- UINT16 DrehWink; // 315...<45
- UINT16 Slant; // >270...<90
+ sal_Int16 Radius; // Eckenradius
+ sal_uInt16 DrehWink; // 315...<45
+ sal_uInt16 Slant; // >270...<90
friend SvStream& operator>>(SvStream& rIStream, RectType& rRect);
virtual void Draw(OutputDevice& rOut);
};
@@ -184,13 +184,13 @@ public:
#define PolySize 44
class PolyType: public ObjkType { // identisch mit Spline !
public:
- BYTE Flags; // (Schummel f�r Allignment unter NT)
- BYTE LEnden; // nur f�r Polyline
+ sal_uInt8 Flags; // (Schummel f�r Allignment unter NT)
+ sal_uInt8 LEnden; // nur f�r Polyline
ObjLineType L;
ObjAreaType F; // nicht f�r Polyline
- BYTE nPoints;
- BYTE Reserve;
- UINT32 SD_EckP; // Zeiger auf die Eckpunkte (StarDraw)
+ sal_uInt8 nPoints;
+ sal_uInt8 Reserve;
+ sal_uInt32 SD_EckP; // Zeiger auf die Eckpunkte (StarDraw)
PointType* EckP; // Zeiger auf die Eckpunkte (StarView (wird nicht von Disk gelesen!))
friend SvStream& operator>>(SvStream& rIStream, PolyType& rPoly);
virtual void Draw(OutputDevice& rOut);
@@ -201,13 +201,13 @@ public:
#define SplnSize 44
class SplnType: public ObjkType { // identisch mit Poly !
public:
- BYTE Flags; // (Schummel f�r Allignment unter NT)
- BYTE LEnden; // nur f�r nSpline
+ sal_uInt8 Flags; // (Schummel f�r Allignment unter NT)
+ sal_uInt8 LEnden; // nur f�r nSpline
ObjLineType L;
ObjAreaType F; // nicht f�r nSpline
- BYTE nPoints;
- BYTE Reserve;
- UINT32 SD_EckP; // Zeiger auf die Eckpunkte (StarDraw)
+ sal_uInt8 nPoints;
+ sal_uInt8 Reserve;
+ sal_uInt32 SD_EckP; // Zeiger auf die Eckpunkte (StarDraw)
PointType* EckP; // Zeiger auf die Eckpunkte (StarView (wird nicht von Disk gelesen!))
friend SvStream& operator>>(SvStream& rIStream, SplnType& rSpln);
virtual void Draw(OutputDevice& rOut);
@@ -218,15 +218,15 @@ public:
#define CircSize 52
class CircType: public ObjkType {
public:
- BYTE Flags; // (Schummel f�r Allignment unter NT)
- BYTE LEnden; // nur Bogen (Kr & El)
+ sal_uInt8 Flags; // (Schummel f�r Allignment unter NT)
+ sal_uInt8 LEnden; // nur Bogen (Kr & El)
ObjLineType L;
ObjAreaType F; // nicht f�r Bogen (Kr & El)
PointType Center; // Mittelpunkt
PointType Radius; // Radius
- UINT16 DrehWink; // nur Ellipse
- UINT16 StartWink; // � nicht f�r Vollkreis
- UINT16 RelWink; // � und Vollellipse
+ sal_uInt16 DrehWink; // nur Ellipse
+ sal_uInt16 StartWink; // � nicht f�r Vollkreis
+ sal_uInt16 RelWink; // � und Vollellipse
friend SvStream& operator>>(SvStream& rIStream, CircType& rCirc);
virtual void Draw(OutputDevice& rOut);
};
@@ -239,19 +239,19 @@ public:
#define TextSize 116
class TextType: public ObjkType {
public:
- BYTE Flags; // (Schummel f�r Allignment unter NT)
- BYTE Reserve; // f�r Word Allign
+ sal_uInt8 Flags; // (Schummel f�r Allignment unter NT)
+ sal_uInt8 Reserve; // f�r Word Allign
ObjTextType T; // 64 Bytes << DWord-Allign bei FontID erforderlich
PointType Pos1; // Bezugspunkt (ObenLinks)
PointType Pos2; // (untenRechts)
- INT16 TopOfs; // Von Oberkante bis Textbegin (future f�r vJustify)
- UINT16 DrehWink; // 0...<360
- UINT16 BoxSlant; // >270...<90 (nur Box)
- UINT16 BufSize; // Gr��e von Buf f�r Load, Save, Copy und so
- UINT16 BufLo,BufHi;// (UCHAR*) Zeiger auf den Textbuffer << ShortArr, weil sonst DWord-Allign erforderlich
- UINT16 ExtLo,ExtHi;// (Ptr) Text �ber mehrere Rahmen << ShortArr, weil sonst DWord-Allign erforderlich
+ sal_Int16 TopOfs; // Von Oberkante bis Textbegin (future f�r vJustify)
+ sal_uInt16 DrehWink; // 0...<360
+ sal_uInt16 BoxSlant; // >270...<90 (nur Box)
+ sal_uInt16 BufSize; // Gr��e von Buf f�r Load, Save, Copy und so
+ sal_uInt16 BufLo,BufHi;// (UCHAR*) Zeiger auf den Textbuffer << ShortArr, weil sonst DWord-Allign erforderlich
+ sal_uInt16 ExtLo,ExtHi;// (Ptr) Text �ber mehrere Rahmen << ShortArr, weil sonst DWord-Allign erforderlich
PointType FitSize; // Ursprungsgr��e f�r Fit2Size
- INT16 FitBreit; // Breite zum formatieren bei Fit2Size
+ sal_Int16 FitBreit; // Breite zum formatieren bei Fit2Size
UCHAR* Buffer; // Diese Variable wird nicht durch Lesen von Disk gef�llt, sondern explizit!
friend SvStream& operator>>(SvStream& rIStream, TextType& rText);
virtual void Draw(OutputDevice& rOut);
@@ -268,21 +268,21 @@ enum GrafStat {NoGraf,Pic,Pcx,Hpgl,Img,Msp,Tiff,Dxf,Lot,Usr,Sgf};
#define BmapSize 132
class BmapType: public ObjkType {
public:
- BYTE Flags; // (Schummel f�r Allignment unter NT)
- BYTE Reserve;
+ sal_uInt8 Flags; // (Schummel f�r Allignment unter NT)
+ sal_uInt8 Reserve;
ObjAreaType F; // Farbe und Muster der 1-Plane Bitmap
PointType Pos1;
PointType Pos2;
- UINT16 DrehWink; // 315...<45 (Future)
- UINT16 Slant; // >270...<90 (Future)
+ sal_uInt16 DrehWink; // 315...<45 (Future)
+ sal_uInt16 Slant; // >270...<90 (Future)
UCHAR Filename[80]; // Pfad
PointType PixSize; // Gr��e in Pixel (0 bei Vektor)
GrafStat Format; // siehe GpmDef.Pas
- BYTE nPlanes; // Anzahl der Bitplanes (0 bei Vektor)
- BOOL RawOut; // als Raw ausgeben ?
- BOOL InvOut; // invertiert ausgeben ?
- BOOL LightOut; // aufhellen? (SD20)
- BYTE GrfFlg; // (SD20) 0=nSGF 1=Pcx 2=Hpgl 4=Raw $FF=Undef(f�r Fix in DrawBmp)
+ sal_uInt8 nPlanes; // Anzahl der Bitplanes (0 bei Vektor)
+ sal_Bool RawOut; // als Raw ausgeben ?
+ sal_Bool InvOut; // invertiert ausgeben ?
+ sal_Bool LightOut; // aufhellen? (SD20)
+ sal_uInt8 GrfFlg; // (SD20) 0=nSGF 1=Pcx 2=Hpgl 4=Raw $FF=Undef(f�r Fix in DrawBmp)
INetURLObject aFltPath; // F�r GraphicFilter
friend SvStream& operator>>(SvStream& rIStream, BmapType& rBmap);
@@ -294,13 +294,13 @@ public:
#define GrupSize 48
class GrupType: public ObjkType {
public:
- BYTE Flags; // (Schummel f�r Allignment unter NT)
+ sal_uInt8 Flags; // (Schummel f�r Allignment unter NT)
UCHAR Name[13]; // Name der Gruppe
- UINT16 SbLo,SbHi; // (Ptr) Gruppenliste << ShortArr, weil sonst DWord Allign erforderlich
- UINT16 UpLo,UpHi; // (Ptr) Vaterliste << ShortArr, weil sonst DWord Allign erforderlich
- UINT16 ChartSize; // Speicherbedarf der Diagrammstruktur Struktur
- UINT32 ChartPtr; // Diagrammstruktur
- UINT32 GetSubPtr(); // hier nur zum Checken, ob Sublist evtl. leer ist.
+ sal_uInt16 SbLo,SbHi; // (Ptr) Gruppenliste << ShortArr, weil sonst DWord Allign erforderlich
+ sal_uInt16 UpLo,UpHi; // (Ptr) Vaterliste << ShortArr, weil sonst DWord Allign erforderlich
+ sal_uInt16 ChartSize; // Speicherbedarf der Diagrammstruktur Struktur
+ sal_uInt32 ChartPtr; // Diagrammstruktur
+ sal_uInt32 GetSubPtr(); // hier nur zum Checken, ob Sublist evtl. leer ist.
friend SvStream& operator>>(SvStream& rIStream, GrupType& rGrup);
// virtual void Draw(OutputDevice& rOut);
};
@@ -308,26 +308,26 @@ public:
void SetLine(ObjLineType& rLine, OutputDevice& rOut);
void SetArea(ObjAreaType& rArea, OutputDevice& rOut);
-Color Sgv2SvFarbe(BYTE nFrb1, BYTE nFrb2, BYTE nInts);
-void RotatePoint(PointType& P, INT16 cx, INT16 cy, double sn, double cs);
-void RotatePoint(Point& P, INT16 cx, INT16 cy, double sn, double cs);
-INT16 iMulDiv(INT16 a, INT16 Mul, INT16 Div);
-UINT16 MulDiv(UINT16 a, UINT16 Mul, UINT16 Div);
+Color Sgv2SvFarbe(sal_uInt8 nFrb1, sal_uInt8 nFrb2, sal_uInt8 nInts);
+void RotatePoint(PointType& P, sal_Int16 cx, sal_Int16 cy, double sn, double cs);
+void RotatePoint(Point& P, sal_Int16 cx, sal_Int16 cy, double sn, double cs);
+sal_Int16 iMulDiv(sal_Int16 a, sal_Int16 Mul, sal_Int16 Div);
+sal_uInt16 MulDiv(sal_uInt16 a, sal_uInt16 Mul, sal_uInt16 Div);
class SgfFontOne {
public:
SgfFontOne* Next; // Zeiger f�r Listenverkettung
- UINT32 IFID;
- BOOL Bold;
- BOOL Ital;
- BOOL Sans;
- BOOL Serf;
- BOOL Fixd;
+ sal_uInt32 IFID;
+ sal_Bool Bold;
+ sal_Bool Ital;
+ sal_Bool Sans;
+ sal_Bool Serf;
+ sal_Bool Fixd;
FontFamily SVFamil;
CharSet SVChSet;
String SVFName; // z.B. "Times New Roman" = 15 Chars
- USHORT SVWidth; // Durchschnittliche Zeichenbreite in %
+ sal_uInt16 SVWidth; // Durchschnittliche Zeichenbreite in %
SgfFontOne();
void ReadOne( ByteString& ID, ByteString& Dsc);
};
@@ -337,15 +337,15 @@ public:
String FNam; // vollst�ndiger Filename des Inifiles
SgfFontOne* pList; // Listenanfang
SgfFontOne* Last; // Listenende
- UINT32 LastID; // f�r schnelleren Zugriff bei Wiederholungen
+ sal_uInt32 LastID; // f�r schnelleren Zugriff bei Wiederholungen
SgfFontOne* LastLn; // f�r schnelleren Zugriff bei Wiederholungen
- BOOL Tried;
+ sal_Bool Tried;
SgfFontLst();
~SgfFontLst();
void AssignFN(const String& rFName);
void ReadList();
void RausList();
- SgfFontOne* GetFontDesc(UINT32 ID);
+ SgfFontOne* GetFontDesc(sal_uInt32 ID);
};
#endif //_SGVMAIN_HXX
diff --git a/svtools/source/inc/sgvspln.hxx b/svtools/source/inc/sgvspln.hxx
index 29df09247f22..3bb7ea85374b 100644
--- a/svtools/source/inc/sgvspln.hxx
+++ b/svtools/source/inc/sgvspln.hxx
@@ -38,7 +38,7 @@
|* Polygons werden als Sttzstellen angenommen.
|* n liefert die Anzahl der Teilpolynome.
|* Ist die Berechnung fehlerfrei verlaufen, so
-|* liefert die Funktion TRUE. Nur in diesem Fall
+|* liefert die Funktion sal_True. Nur in diesem Fall
|* ist Speicher fr die Koeffizientenarrays
|* allokiert, der dann sp„ter vom Aufrufer mittels
|* delete freizugeben ist.
@@ -47,7 +47,7 @@
|*
*************************************************************************/
-BOOL CalcSpline(Polygon& rPoly, BOOL Periodic, USHORT& n,
+sal_Bool CalcSpline(Polygon& rPoly, sal_Bool Periodic, sal_uInt16& n,
double*& ax, double*& ay, double*& bx, double*& by,
double*& cx, double*& cy, double*& dx, double*& dy, double*& T);
@@ -58,9 +58,9 @@ BOOL CalcSpline(Polygon& rPoly, BOOL Periodic, USHORT& n,
|* Beschreibung Konvertiert einen parametrichen kubischen
|* Polynomspline Spline (natrlich oder periodisch)
|* in ein angen„hertes Polygon.
-|* Die Funktion liefert FALSE, wenn ein Fehler bei
+|* Die Funktion liefert sal_False, wenn ein Fehler bei
|* der Koeffizientenberechnung aufgetreten ist oder
-|* das Polygon zu groá wird (>PolyMax=16380). Im 1.
+|* das Polygon zu gro?wird (>PolyMax=16380). Im 1.
|* Fall hat das Polygon 0, im 2. Fall PolyMax Punkte.
|* Um Koordinatenberl„ufe zu vermeiden werden diese
|* auf +/-32000 begrenzt.
@@ -68,6 +68,6 @@ BOOL CalcSpline(Polygon& rPoly, BOOL Periodic, USHORT& n,
|* Letzte Aenderung JOE 23.06.93
|*
*************************************************************************/
-BOOL Spline2Poly(Polygon& rSpln, BOOL Periodic, Polygon& rPoly);
+sal_Bool Spline2Poly(Polygon& rSpln, sal_Bool Periodic, Polygon& rPoly);
#endif //_SGVSPLN_HXX
diff --git a/svtools/source/inc/svimpbox.hxx b/svtools/source/inc/svimpbox.hxx
index f9e4ee6951fb..d90329afb28d 100644
--- a/svtools/source/inc/svimpbox.hxx
+++ b/svtools/source/inc/svimpbox.hxx
@@ -64,9 +64,9 @@ public:
void BeginDrag();
void CreateAnchor();
void DestroyAnchor();
- BOOL SetCursorAtPoint( const Point& rPoint,
- BOOL bDontSelectAtCursor=FALSE );
- BOOL IsSelectionAtPoint( const Point& rPoint );
+ sal_Bool SetCursorAtPoint( const Point& rPoint,
+ sal_Bool bDontSelectAtCursor=sal_False );
+ sal_Bool IsSelectionAtPoint( const Point& rPoint );
void DeselectAtPoint( const Point& rPoint );
void DeselectAll();
};
@@ -147,22 +147,22 @@ private:
long nNodeBmpWidth;
long nNextVerVisSize;
long nMostRight;
- ULONG nVisibleCount; // Anzahl Zeilen im Control
- ULONG nCurUserEvent; //-1 == kein Userevent amn Laufen
+ sal_uLong nVisibleCount; // Anzahl Zeilen im Control
+ sal_uLong nCurUserEvent; //-1 == kein Userevent amn Laufen
short nHorSBarHeight, nVerSBarWidth;
- USHORT nFlags;
- USHORT nCurTabPos;
+ sal_uInt16 nFlags;
+ sal_uInt16 nCurTabPos;
WinBits m_nStyle;
ExtendedWinBits nExtendedWinBits;
- BOOL bSimpleTravel : 1; // ist TRUE bei SINGLE_SELECTION
- BOOL bUpdateMode : 1;
- BOOL bInVScrollHdl : 1;
- BOOL bAsyncBeginDrag : 1;
- BOOL bSubLstOpRet : 1; // open/close sublist with return/enter, defaulted with FALSE
- BOOL bSubLstOpLR : 1; // open/close sublist with cursor left/right, defaulted with FALSE
- BOOL bContextMenuHandling : 1;
- BOOL bIsCellFocusEnabled : 1;
+ sal_Bool bSimpleTravel : 1; // ist sal_True bei SINGLE_SELECTION
+ sal_Bool bUpdateMode : 1;
+ sal_Bool bInVScrollHdl : 1;
+ sal_Bool bAsyncBeginDrag : 1;
+ sal_Bool bSubLstOpRet : 1; // open/close sublist with return/enter, defaulted with sal_False
+ sal_Bool bSubLstOpLR : 1; // open/close sublist with cursor left/right, defaulted with sal_False
+ sal_Bool bContextMenuHandling : 1;
+ sal_Bool bIsCellFocusEnabled : 1;
sal_Bool bAreChildrenTransient;
@@ -186,16 +186,16 @@ private:
void ShowVerSBar();
// setzt Thumb auf FirstEntryToDraw
void SyncVerThumb();
- BOOL IsLineVisible( long nY ) const;
+ sal_Bool IsLineVisible( long nY ) const;
long GetEntryLine( SvLBoxEntry* pEntry ) const;
void FillView();
void CursorDown();
void CursorUp();
void KeyLeftRight( long nDiff );
- void PageDown( USHORT nDelta );
- void PageUp( USHORT nDelta );
+ void PageDown( sal_uInt16 nDelta );
+ void PageUp( sal_uInt16 nDelta );
- void SetCursor( SvLBoxEntry* pEntry, BOOL bForceNoSelect = FALSE );
+ void SetCursor( SvLBoxEntry* pEntry, sal_Bool bForceNoSelect = sal_False );
void DrawNet();
@@ -209,39 +209,39 @@ private:
// Selection-Engine
SvLBoxEntry* MakePointVisible( const Point& rPoint,
- BOOL bNotifyScroll=TRUE );
+ sal_Bool bNotifyScroll=sal_True );
void SetAnchorSelection( SvLBoxEntry* pOld,
SvLBoxEntry* pNewCursor );
void BeginDrag();
- BOOL ButtonDownCheckCtrl( const MouseEvent& rMEvt,
+ sal_Bool ButtonDownCheckCtrl( const MouseEvent& rMEvt,
SvLBoxEntry* pEntry, long nY );
- BOOL MouseMoveCheckCtrl( const MouseEvent& rMEvt,
+ sal_Bool MouseMoveCheckCtrl( const MouseEvent& rMEvt,
SvLBoxEntry* pEntry );
- BOOL ButtonUpCheckCtrl( const MouseEvent& rMEvt );
- BOOL ButtonDownCheckExpand( const MouseEvent&,
+ sal_Bool ButtonUpCheckCtrl( const MouseEvent& rMEvt );
+ sal_Bool ButtonDownCheckExpand( const MouseEvent&,
SvLBoxEntry*,long nY );
- void PositionScrollBars( Size& rOSize, USHORT nMask );
- USHORT AdjustScrollBars( Size& rSize );
+ void PositionScrollBars( Size& rOSize, sal_uInt16 nMask );
+ sal_uInt16 AdjustScrollBars( Size& rSize );
void BeginScroll();
void EndScroll();
- BOOL InScroll() const { return (BOOL)(nFlags & F_IN_SCROLLING)!=0;}
+ sal_Bool InScroll() const { return (sal_Bool)(nFlags & F_IN_SCROLLING)!=0;}
Rectangle GetVisibleArea() const;
- BOOL EntryReallyHit(SvLBoxEntry* pEntry,const Point& rPos,long nLine);
+ sal_Bool EntryReallyHit(SvLBoxEntry* pEntry,const Point& rPos,long nLine);
void InitScrollBarBox();
SvLBoxTab* NextTab( SvLBoxTab* );
- BOOL SetMostRight( SvLBoxEntry* pEntry );
+ sal_Bool SetMostRight( SvLBoxEntry* pEntry );
void FindMostRight( SvLBoxEntry* EntryToIgnore );
void FindMostRight( SvLBoxEntry* pParent, SvLBoxEntry* EntryToIgnore );
void FindMostRight_Impl( SvLBoxEntry* pParent,SvLBoxEntry* EntryToIgnore );
void NotifyTabsChanged();
- inline BOOL IsExpandable() const // if element at cursor can be expanded in general
+ inline sal_Bool IsExpandable() const // if element at cursor can be expanded in general
{ return pCursor->HasChilds() || pCursor->HasChildsOnDemand(); }
- inline BOOL IsNowExpandable() const // if element at cursor can be expanded at this moment
+ inline sal_Bool IsNowExpandable() const // if element at cursor can be expanded at this moment
{ return IsExpandable() && !pView->IsExpanded( pCursor ); }
static void implInitDefaultNodeImages();
@@ -280,40 +280,40 @@ public:
void EntryExpanded( SvLBoxEntry* pEntry );
void EntryCollapsed( SvLBoxEntry* pEntry );
void CollapsingEntry( SvLBoxEntry* pEntry );
- void EntrySelected( SvLBoxEntry*, BOOL bSelect );
+ void EntrySelected( SvLBoxEntry*, sal_Bool bSelect );
void Paint( const Rectangle& rRect );
void RepaintSelectionItems();
void MouseButtonDown( const MouseEvent& );
void MouseButtonUp( const MouseEvent& );
void MouseMove( const MouseEvent&);
- BOOL KeyInput( const KeyEvent& );
+ sal_Bool KeyInput( const KeyEvent& );
void Resize();
void GetFocus();
void LoseFocus();
void UpdateAll(
- BOOL bInvalidateCompleteView= TRUE,
- BOOL bUpdateVerSBar = TRUE );
+ sal_Bool bInvalidateCompleteView= sal_True,
+ sal_Bool bUpdateVerSBar = sal_True );
void SetEntryHeight( short nHeight );
void PaintEntry( SvLBoxEntry* pEntry );
void InvalidateEntry( SvLBoxEntry* );
void RecalcFocusRect();
- inline void SelectEntry( SvLBoxEntry* pEntry, BOOL bSelect );
+ inline void SelectEntry( SvLBoxEntry* pEntry, sal_Bool bSelect );
void SetDragDropMode( DragDropMode eDDMode );
void SetSelectionMode( SelectionMode eSelMode );
- void SetAddMode( BOOL ) { aSelEng.AddAlways(FALSE); }
- BOOL IsAddMode() const { return aSelEng.IsAlwaysAdding(); }
+ void SetAddMode( sal_Bool ) { aSelEng.AddAlways(sal_False); }
+ sal_Bool IsAddMode() const { return aSelEng.IsAlwaysAdding(); }
SvLBoxEntry* GetCurrentEntry() const { return pCursor; }
- BOOL IsEntryInView( SvLBoxEntry* ) const;
+ sal_Bool IsEntryInView( SvLBoxEntry* ) const;
SvLBoxEntry* GetEntry( const Point& rPos ) const;
// gibt letzten Eintrag zurueck, falls Pos unter letztem Eintrag
SvLBoxEntry* GetClickedEntry( const Point& ) const;
SvLBoxEntry* GetCurEntry() const { return pCursor; }
void SetCurEntry( SvLBoxEntry* );
Point GetEntryPosition( SvLBoxEntry* ) const;
- void MakeVisible( SvLBoxEntry* pEntry, BOOL bMoveToTop=FALSE );
+ void MakeVisible( SvLBoxEntry* pEntry, sal_Bool bMoveToTop=sal_False );
void PaintDDCursor( SvLBoxEntry* );
@@ -338,38 +338,38 @@ public:
static const Image& GetDefaultCollapsedNodeImage( BmpColorMode _eMode = BMP_COLOR_NORMAL );
const Size& GetOutputSize() const { return aOutputSize;}
- void KeyUp( BOOL bPageUp, BOOL bNotifyScroll = TRUE );
- void KeyDown( BOOL bPageDown, BOOL bNotifyScroll = TRUE );
+ void KeyUp( sal_Bool bPageUp, sal_Bool bNotifyScroll = sal_True );
+ void KeyDown( sal_Bool bPageDown, sal_Bool bNotifyScroll = sal_True );
void Command( const CommandEvent& rCEvt );
void Invalidate();
void DestroyAnchor() { pAnchor=0; aSelEng.Reset(); }
- void SelAllDestrAnch( BOOL bSelect,
- BOOL bDestroyAnchor = TRUE,
- BOOL bSingleSelToo = FALSE );
- void ShowCursor( BOOL bShow );
+ void SelAllDestrAnch( sal_Bool bSelect,
+ sal_Bool bDestroyAnchor = sal_True,
+ sal_Bool bSingleSelToo = sal_False );
+ void ShowCursor( sal_Bool bShow );
- BOOL RequestHelp( const HelpEvent& rHEvt );
+ sal_Bool RequestHelp( const HelpEvent& rHEvt );
void EndSelection();
- BOOL IsNodeButton( const Point& rPosPixel, SvLBoxEntry* pEntry ) const;
+ sal_Bool IsNodeButton( const Point& rPosPixel, SvLBoxEntry* pEntry ) const;
void RepaintScrollBars();
- void EnableAsyncDrag( BOOL b) { bAsyncBeginDrag = b; }
- void SetUpdateMode( BOOL );
- void SetUpdateModeFast( BOOL );
- BOOL GetUpdateMode() const { return bUpdateMode; }
+ void EnableAsyncDrag( sal_Bool b) { bAsyncBeginDrag = b; }
+ void SetUpdateMode( sal_Bool );
+ void SetUpdateModeFast( sal_Bool );
+ sal_Bool GetUpdateMode() const { return bUpdateMode; }
Rectangle GetClipRegionRect() const;
- BOOL HasHorScrollBar() const { return aHorSBar.IsVisible(); }
+ sal_Bool HasHorScrollBar() const { return aHorSBar.IsVisible(); }
void ShowFocusRect( const SvLBoxEntry* pEntry );
void SetTabBar( TabBar* pTabBar );
void CancelPendingEdit();
- void CallEventListeners( ULONG nEvent, void* pData = NULL );
+ void CallEventListeners( sal_uLong nEvent, void* pData = NULL );
/** Enables, that one cell of a tablistbox entry can be focused */
- inline BOOL IsCellFocusEnabled() const { return bIsCellFocusEnabled; }
- inline void EnableCellFocus() { bIsCellFocusEnabled = TRUE; }
- bool SetCurrentTabPos( USHORT _nNewPos );
- inline USHORT GetCurrentTabPos() const { return nCurTabPos; }
+ inline sal_Bool IsCellFocusEnabled() const { return bIsCellFocusEnabled; }
+ inline void EnableCellFocus() { bIsCellFocusEnabled = sal_True; }
+ bool SetCurrentTabPos( sal_uInt16 _nNewPos );
+ inline sal_uInt16 GetCurrentTabPos() const { return nCurTabPos; }
bool IsSelectable( const SvLBoxEntry* pEntry );
};
@@ -457,11 +457,11 @@ inline void SvImpLBox::PaintEntry( SvLBoxEntry* pEntry )
pView->PaintEntry( pEntry, nY );
}
-inline BOOL SvImpLBox::IsLineVisible( long nY ) const
+inline sal_Bool SvImpLBox::IsLineVisible( long nY ) const
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
if ( nY < 0 || nY >= aOutputSize.Height() )
- bRet = FALSE;
+ bRet = sal_False;
return bRet;
}
diff --git a/svtools/source/inc/svimpicn.hxx b/svtools/source/inc/svimpicn.hxx
index 7d5c2b1b41e3..b516ca9bfe25 100644
--- a/svtools/source/inc/svimpicn.hxx
+++ b/svtools/source/inc/svimpicn.hxx
@@ -103,8 +103,8 @@ class SvImpIconView
long nMaxBmpHeight;
long nMaxTextWidth;
long nMaxBoundHeight; // Hoehe des hoechsten BoundRects
- ULONG nFlags;
- ULONG nCurUserEvent;
+ sal_uLong nFlags;
+ sal_uLong nCurUserEvent;
SvLBoxEntry* pCurParent;
SvLBoxEntry* pCursor;
SvLBoxEntry* pNextCursor; // wird in MovingEntry gesetzt und ist
@@ -115,12 +115,12 @@ class SvImpIconView
VirtualDevice* pDDTempDev;
SvIconViewTextMode eTextMode;
- BOOL bMustRecalcBoundingRects;
+ sal_Bool bMustRecalcBoundingRects;
void CheckAllSizes();
void CheckSizes( SvLBoxEntry* pEntry,
const SvIcnVwDataEntry* pViewData = 0 );
- void ShowCursor( BOOL bShow );
+ void ShowCursor( sal_Bool bShow );
void SetNextEntryPos(const Point& rPos);
Point FindNextEntryPos( const Size& rBoundSize );
@@ -137,7 +137,7 @@ class SvImpIconView
void AdjustScrollBars();
void PositionScrollBars( long nRealWidth, long nRealHeight );
void CalcDocPos( Point& aMousePos );
- BOOL GetResizeRect( Rectangle& );
+ sal_Bool GetResizeRect( Rectangle& );
void PaintResizeRect( const Rectangle& );
SvLBoxEntry* GetNewCursor();
void ToggleSelection( SvLBoxEntry* );
@@ -160,8 +160,8 @@ class SvImpIconView
SvIconViewTextMode GetEntryTextModeSmart( const SvLBoxEntry* pEntry,
const SvIcnVwDataEntry* pViewData ) const;
- BOOL CheckVerScrollBar();
- BOOL CheckHorScrollBar();
+ sal_Bool CheckVerScrollBar();
+ sal_Bool CheckHorScrollBar();
void CancelUserEvent();
public:
@@ -169,7 +169,7 @@ public:
SvImpIconView( SvIconView* pView, SvLBoxTreeList*, WinBits nWinStyle );
~SvImpIconView();
- void Clear( BOOL bInCtor = FALSE );
+ void Clear( sal_Bool bInCtor = sal_False );
void SetStyle( const WinBits i_nWinStyle );
void SetModel( SvLBoxTreeList* pTree, SvLBoxEntry* pParent )
{ pModel = pTree; SetCurParent(pParent); }
@@ -184,14 +184,14 @@ public:
void EntryExpanded( SvLBoxEntry* pEntry );
void EntryCollapsed( SvLBoxEntry* pEntry );
void CollapsingEntry( SvLBoxEntry* pEntry );
- void EntrySelected( SvLBoxEntry*, BOOL bSelect );
+ void EntrySelected( SvLBoxEntry*, sal_Bool bSelect );
void Paint( const Rectangle& rRect );
void RepaintSelectionItems();
void MouseButtonDown( const MouseEvent& );
void MouseButtonUp( const MouseEvent& );
void MouseMove( const MouseEvent&);
- BOOL KeyInput( const KeyEvent& );
+ sal_Bool KeyInput( const KeyEvent& );
void Resize();
void GetFocus();
void LoseFocus();
@@ -201,8 +201,8 @@ public:
void PaintEntry( SvLBoxEntry*, const Point&,
SvIcnVwDataEntry* pViewData = 0, OutputDevice* pOut = 0);
void SetEntryPosition( SvLBoxEntry* pEntry, const Point& rPos,
- BOOL bAdjustRow = FALSE,
- BOOL bCheckScrollBars = FALSE );
+ sal_Bool bAdjustRow = sal_False,
+ sal_Bool bCheckScrollBars = sal_False );
void InvalidateEntry( SvLBoxEntry* );
void ViewDataInitialized( SvLBoxEntry* pEntry );
SvLBoxItem* GetItem( SvLBoxEntry*, const Point& rAbsPos );
@@ -217,7 +217,7 @@ public:
SvLBoxEntry* GetCurEntry() const { return pCursor; }
void SetCursor( SvLBoxEntry* );
- BOOL IsEntryInView( SvLBoxEntry* );
+ sal_Bool IsEntryInView( SvLBoxEntry* );
SvLBoxEntry* GetEntry( const Point& rDocPos );
SvLBoxEntry* GetNextEntry( const Point& rDocPos, SvLBoxEntry* pCurEntry );
SvLBoxEntry* GetPrevEntry( const Point& rDocPos, SvLBoxEntry* pCurEntry );
@@ -237,7 +237,7 @@ public:
SvIcnVwDataEntry* pViewData=0 );
Rectangle CalcTextRect( SvLBoxEntry*, SvLBoxString* pItem = 0,
const Point* pPos = 0,
- BOOL bForInplaceEdit = FALSE,
+ sal_Bool bForInplaceEdit = sal_False,
SvIcnVwDataEntry* pViewData = 0 );
long CalcBoundingWidth( SvLBoxEntry*, const SvIcnVwDataEntry* pViewData = 0) const;
@@ -254,22 +254,22 @@ public:
SvIcnVwDataEntry* pViewData=0);
void InvalidateBoundingRect( SvLBoxEntry* );
void InvalidateBoundingRect( Rectangle& rRect ) { rRect.Right() = LONG_MAX; }
- BOOL IsBoundingRectValid( const Rectangle& rRect ) const { return (BOOL)( rRect.Right() != LONG_MAX ); }
+ sal_Bool IsBoundingRectValid( const Rectangle& rRect ) const { return (sal_Bool)( rRect.Right() != LONG_MAX ); }
- void PaintEmphasis( const Rectangle&, BOOL bSelected,
- BOOL bCursored, OutputDevice* pOut = 0 );
+ void PaintEmphasis( const Rectangle&, sal_Bool bSelected,
+ sal_Bool bCursored, OutputDevice* pOut = 0 );
void PaintItem( const Rectangle& rRect, SvLBoxItem* pItem,
- SvLBoxEntry* pEntry, USHORT nPaintFlags, OutputDevice* pOut = 0 );
- // berechnet alle BoundingRects neu, wenn bMustRecalcBoundingRects == TRUE
+ SvLBoxEntry* pEntry, sal_uInt16 nPaintFlags, OutputDevice* pOut = 0 );
+ // berechnet alle BoundingRects neu, wenn bMustRecalcBoundingRects == sal_True
void CheckBoundingRects() { if (bMustRecalcBoundingRects) RecalcAllBoundingRects(); }
// berechnet alle invalidierten BoundingRects neu
void UpdateBoundingRects();
- void ShowTargetEmphasis( SvLBoxEntry* pEntry, BOOL bShow );
+ void ShowTargetEmphasis( SvLBoxEntry* pEntry, sal_Bool bShow );
SvLBoxEntry* GetDropTarget( const Point& rPosPixel );
- BOOL NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos );
- BOOL NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos );
+ sal_Bool NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos );
+ sal_Bool NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos );
void WriteDragServerInfo( const Point&, SvLBoxDDInfo* );
void ReadDragServerInfo( const Point&, SvLBoxDDInfo* );
@@ -277,9 +277,9 @@ public:
void SetCurParent( SvLBoxEntry* pNewParent );
SvLBoxEntry* GetCurParent() const { return pCurParent; }
- USHORT GetSelectionCount() const;
+ sal_uInt16 GetSelectionCount() const;
void SetGrid( long nDX, long nDY );
- void Scroll( long nDeltaX, long nDeltaY, BOOL bScrollBar = FALSE );
+ void Scroll( long nDeltaX, long nDeltaY, sal_Bool bScrollBar = sal_False );
const Size& GetItemSize( SvIconView* pView, SvLBoxEntry*, SvLBoxItem*,
const SvIcnVwDataEntry* pViewData = 0 ) const;
void PrepareCommandEvent( const Point& rPt );
@@ -290,18 +290,18 @@ public:
SvLBoxEntry* mpViewData;
- BOOL IsOver( SvPtrarr* pSelectedRectList, const Rectangle& rEntryBoundRect ) const;
- void SelectRect( const Rectangle&, BOOL bAdd = TRUE,
+ sal_Bool IsOver( SvPtrarr* pSelectedRectList, const Rectangle& rEntryBoundRect ) const;
+ void SelectRect( const Rectangle&, sal_Bool bAdd = sal_True,
SvPtrarr* pOtherRects = 0,
short nOffs = SELRECT_BORDER_OFFS );
void DrawSelectionRect( const Rectangle& );
void HideSelectionRect();
void CalcScrollOffsets( const Point& rRefPosPixel,
- long& rX, long& rY, BOOL bDragDrop = FALSE,
- USHORT nBorderWidth = 10 );
+ long& rX, long& rY, sal_Bool bDragDrop = sal_False,
+ sal_uInt16 nBorderWidth = 10 );
void EndTracking();
- BOOL IsTextHit( SvLBoxEntry* pEntry, const Point& rDocPos );
- void MakeVisible( const Rectangle& rDocPos,BOOL bInScrollBarEvent=FALSE);
+ sal_Bool IsTextHit( SvLBoxEntry* pEntry, const Point& rDocPos );
+ void MakeVisible( const Rectangle& rDocPos,sal_Bool bInScrollBarEvent=sal_False);
void AdjustAtGrid( SvLBoxEntry* pStart = 0 );
void SetTextMode( SvIconViewTextMode, SvLBoxEntry* pEntry = 0 );
SvIconViewTextMode GetTextMode( const SvLBoxEntry* pEntry = 0,
diff --git a/svtools/source/inc/xbmread.hxx b/svtools/source/inc/xbmread.hxx
index aab52eeffa63..5d6db03f73a7 100644
--- a/svtools/source/inc/xbmread.hxx
+++ b/svtools/source/inc/xbmread.hxx
@@ -69,13 +69,13 @@ class XBMReader : public GraphicReader
long nLastPos;
long nWidth;
long nHeight;
- BOOL bStatus;
+ sal_Bool bStatus;
void InitTable();
ByteString FindTokenLine( SvStream* pInStm, const char* pTok1,
const char* pTok2 = NULL, const char* pTok3 = NULL );
long ParseDefine( const sal_Char* pDefine );
- BOOL ParseData( SvStream* pInStm, const ByteString& aLastLine, XBMFormat eFormat );
+ sal_Bool ParseData( SvStream* pInStm, const ByteString& aLastLine, XBMFormat eFormat );
public:
@@ -92,6 +92,6 @@ public:
// - ImportXBM -
// -------------
-BOOL ImportXBM( SvStream& rStream, Graphic& rGraphic );
+sal_Bool ImportXBM( SvStream& rStream, Graphic& rGraphic );
#endif // _XBMREAD_HXX
diff --git a/svtools/source/inc/xpmread.hxx b/svtools/source/inc/xpmread.hxx
index 29edd15a3b1c..aea09db7596e 100644
--- a/svtools/source/inc/xpmread.hxx
+++ b/svtools/source/inc/xpmread.hxx
@@ -83,35 +83,35 @@ private:
BitmapWriteAccess* mpMaskAcc;
long mnLastPos;
- ULONG mnWidth;
- ULONG mnHeight;
- ULONG mnColors;
- ULONG mnCpp; // characters per pix
- BOOL mbTransparent;
- BOOL mbStatus;
- ULONG mnStatus;
- ULONG mnIdentifier;
- BYTE mcThisByte;
- BYTE mcLastByte;
- ULONG mnTempAvail;
- BYTE* mpTempBuf;
- BYTE* mpTempPtr;
- BYTE* mpFastColorTable;
- BYTE* mpColMap;
- ULONG mnStringSize;
- BYTE* mpStringBuf;
- ULONG mnParaSize;
- BYTE* mpPara;
-
- BOOL ImplGetString( void );
- BOOL ImplGetColor( ULONG );
- BOOL ImplGetScanLine( ULONG );
- BOOL ImplGetColSub( BYTE* );
- BOOL ImplGetColKey( BYTE );
- void ImplGetRGBHex( BYTE*, ULONG );
- BOOL ImplGetPara( ULONG numb );
- BOOL ImplCompare( BYTE*, BYTE*, ULONG, ULONG nmode = XPMCASENONSENSITIVE );
- ULONG ImplGetULONG( ULONG nPara );
+ sal_uLong mnWidth;
+ sal_uLong mnHeight;
+ sal_uLong mnColors;
+ sal_uLong mnCpp; // characters per pix
+ sal_Bool mbTransparent;
+ sal_Bool mbStatus;
+ sal_uLong mnStatus;
+ sal_uLong mnIdentifier;
+ sal_uInt8 mcThisByte;
+ sal_uInt8 mcLastByte;
+ sal_uLong mnTempAvail;
+ sal_uInt8* mpTempBuf;
+ sal_uInt8* mpTempPtr;
+ sal_uInt8* mpFastColorTable;
+ sal_uInt8* mpColMap;
+ sal_uLong mnStringSize;
+ sal_uInt8* mpStringBuf;
+ sal_uLong mnParaSize;
+ sal_uInt8* mpPara;
+
+ sal_Bool ImplGetString( void );
+ sal_Bool ImplGetColor( sal_uLong );
+ sal_Bool ImplGetScanLine( sal_uLong );
+ sal_Bool ImplGetColSub( sal_uInt8* );
+ sal_Bool ImplGetColKey( sal_uInt8 );
+ void ImplGetRGBHex( sal_uInt8*, sal_uLong );
+ sal_Bool ImplGetPara( sal_uLong numb );
+ sal_Bool ImplCompare( sal_uInt8*, sal_uInt8*, sal_uLong, sal_uLong nmode = XPMCASENONSENSITIVE );
+ sal_uLong ImplGetULONG( sal_uLong nPara );
public:
XPMReader( SvStream& rStm );
@@ -126,6 +126,6 @@ public:
// - ImportXPM -
// -------------
-BOOL ImportXPM( SvStream& rStream, Graphic& rGraphic );
+sal_Bool ImportXPM( SvStream& rStream, Graphic& rGraphic );
#endif // _XPMREAD_HXX
diff --git a/svtools/source/java/javainteractionhandler.cxx b/svtools/source/java/javainteractionhandler.cxx
index a7420dbc388f..1b236a1e4bee 100644
--- a/svtools/source/java/javainteractionhandler.cxx
+++ b/svtools/source/java/javainteractionhandler.cxx
@@ -137,7 +137,7 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque
com::sun::star::java::RestartRequiredException e5;
// Try to recover the Exception type in the any and
// react accordingly.
- USHORT nResult = RET_CANCEL;
+ sal_uInt16 nResult = RET_CANCEL;
::rtl::OUString aParameter;
if ( anyExc >>= e1 )
diff --git a/svtools/source/misc/acceleratorexecute.cxx b/svtools/source/misc/acceleratorexecute.cxx
index b89f30997950..59df22b580c6 100644
--- a/svtools/source/misc/acceleratorexecute.cxx
+++ b/svtools/source/misc/acceleratorexecute.cxx
@@ -286,7 +286,7 @@ KeyCode AcceleratorExecute::st_AWTKey2VCLKey(const css::awt::KeyEvent& aAWTKey)
sal_Bool bMod1 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD1 ) == css::awt::KeyModifier::MOD1 );
sal_Bool bMod2 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD2 ) == css::awt::KeyModifier::MOD2 );
sal_Bool bMod3 = ((aAWTKey.Modifiers & css::awt::KeyModifier::MOD3 ) == css::awt::KeyModifier::MOD3 );
- USHORT nKey = (USHORT)aAWTKey.KeyCode;
+ sal_uInt16 nKey = (sal_uInt16)aAWTKey.KeyCode;
return KeyCode(nKey, bShift, bMod1, bMod2, bMod3);
}
diff --git a/svtools/source/misc/cliplistener.cxx b/svtools/source/misc/cliplistener.cxx
index a4e13be1d884..266950f10697 100644
--- a/svtools/source/misc/cliplistener.cxx
+++ b/svtools/source/misc/cliplistener.cxx
@@ -68,7 +68,7 @@ void SAL_CALL TransferableClipboardListener::changedContents(
}
}
-void TransferableClipboardListener::AddRemoveListener( Window* pWin, BOOL bAdd )
+void TransferableClipboardListener::AddRemoveListener( Window* pWin, sal_Bool bAdd )
{
try
{
diff --git a/svtools/source/misc/ehdl.cxx b/svtools/source/misc/ehdl.cxx
index 5e20e2197fb7..a8af73419271 100644
--- a/svtools/source/misc/ehdl.cxx
+++ b/svtools/source/misc/ehdl.cxx
@@ -47,9 +47,9 @@
//=========================================================================
-static USHORT aWndFunc(
+static sal_uInt16 aWndFunc(
Window *pWin, // Parent des Dialoges
- USHORT nFlags,
+ sal_uInt16 nFlags,
const String &rErr, // Fehlertext
const String &rAction) // Actiontext
@@ -132,7 +132,7 @@ static USHORT aWndFunc(
}
}
- USHORT nRet = RET_CANCEL;
+ sal_uInt16 nRet = RET_CANCEL;
switch ( pBox->Execute() )
{
case RET_OK:
@@ -160,7 +160,7 @@ static USHORT aWndFunc(
//-------------------------------------------------------------------------
-SfxErrorHandler::SfxErrorHandler(USHORT nIdP, ULONG lStartP, ULONG lEndP, ResMgr *pMgrP) :
+SfxErrorHandler::SfxErrorHandler(sal_uInt16 nIdP, sal_uLong lStartP, sal_uLong lEndP, ResMgr *pMgrP) :
lStart(lStartP), lEnd(lEndP), nId(nIdP), pMgr(pMgrP), pFreeMgr( NULL )
@@ -183,8 +183,8 @@ SfxErrorHandler::~SfxErrorHandler()
//-------------------------------------------------------------------------
-BOOL SfxErrorHandler::CreateString(
- const ErrorInfo *pErr, String &rStr, USHORT& nFlags) const
+sal_Bool SfxErrorHandler::CreateString(
+ const ErrorInfo *pErr, String &rStr, sal_uInt16& nFlags) const
/* [Beschreibung]
@@ -193,9 +193,9 @@ BOOL SfxErrorHandler::CreateString(
*/
{
- ULONG nErrCode = pErr->GetErrorCode() & ERRCODE_ERROR_MASK;
+ sal_uLong nErrCode = pErr->GetErrorCode() & ERRCODE_ERROR_MASK;
if( nErrCode>=lEnd || nErrCode<=lStart )
- return FALSE;
+ return sal_False;
MessageInfo *pMsgInfo=PTR_CAST(MessageInfo,pErr);
if(pMsgInfo)
{
@@ -209,7 +209,7 @@ BOOL SfxErrorHandler::CreateString(
break;
i = i + pMsgInfo->GetMessageArg().Len();
}
- return TRUE;
+ return sal_True;
}
}
else if(GetErrorString(nErrCode, rStr, nFlags))
@@ -229,10 +229,10 @@ BOOL SfxErrorHandler::CreateString(
TwoStringErrorInfo * pTwoStringInfo = PTR_CAST(TwoStringErrorInfo,
pErr);
if (pTwoStringInfo)
- for (USHORT i = 0; i < rStr.Len();)
+ for (sal_uInt16 i = 0; i < rStr.Len();)
{
- USHORT nArg1Pos = rStr.Search(String::CreateFromAscii( "$(ARG1)" ), i);
- USHORT nArg2Pos = rStr.Search(String::CreateFromAscii( "$(ARG2)" ), i);
+ sal_uInt16 nArg1Pos = rStr.Search(String::CreateFromAscii( "$(ARG1)" ), i);
+ sal_uInt16 nArg2Pos = rStr.Search(String::CreateFromAscii( "$(ARG2)" ), i);
if (nArg1Pos < nArg2Pos)
{
rStr.Replace(nArg1Pos, 7, pTwoStringInfo->GetArg1());
@@ -246,9 +246,9 @@ BOOL SfxErrorHandler::CreateString(
else break;
}
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//-------------------------------------------------------------------------
@@ -263,9 +263,9 @@ class ResString: public String
*/
{
- USHORT nFlags;
+ sal_uInt16 nFlags;
public:
- USHORT GetFlags() const {return nFlags;}
+ sal_uInt16 GetFlags() const {return nFlags;}
const String & GetString() const {return *this;}
ResString( ResId &rId);
};
@@ -273,14 +273,14 @@ class ResString: public String
//-------------------------------------------------------------------------
ResString::ResString(ResId & rId):
- String(rId.SetAutoRelease(FALSE)),
+ String(rId.SetAutoRelease(sal_False)),
nFlags(0)
{
ResMgr * pResMgr = rId.GetResMgr();
// String ctor temporarily sets global ResManager
if (pResMgr->GetRemainSize())
- nFlags = USHORT(pResMgr->ReadShort());
- rId.SetAutoRelease(TRUE);
+ nFlags = sal_uInt16(pResMgr->ReadShort());
+ rId.SetAutoRelease(sal_True);
pResMgr->PopContext();
}
@@ -297,18 +297,18 @@ struct ErrorResource_Impl : private Resource
ResId aResId;
- ErrorResource_Impl(ResId& rErrIdP, USHORT nId)
+ ErrorResource_Impl(ResId& rErrIdP, sal_uInt16 nId)
: Resource(rErrIdP),aResId(nId,*rErrIdP.GetResMgr()){}
~ErrorResource_Impl() { FreeResource(); }
operator ResString(){ return ResString( aResId ); }
- operator BOOL(){return IsAvailableRes(aResId.SetRT(RSC_STRING));}
+ operator sal_Bool(){return IsAvailableRes(aResId.SetRT(RSC_STRING));}
};
-BOOL SfxErrorHandler::GetClassString(ULONG lClassId, String &rStr) const
+sal_Bool SfxErrorHandler::GetClassString(sal_uLong lClassId, String &rStr) const
/* [Beschreibung]
@@ -318,17 +318,17 @@ BOOL SfxErrorHandler::GetClassString(ULONG lClassId, String &rStr) const
*/
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
com::sun::star::lang::Locale aLocale( Application::GetSettings().GetUILocale() );
ResMgr* pResMgr = ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(ofa), aLocale );
if( pResMgr )
{
ResId aId(RID_ERRHDL, *pResMgr );
- ErrorResource_Impl aEr(aId, (USHORT)lClassId);
+ ErrorResource_Impl aEr(aId, (sal_uInt16)lClassId);
if(aEr)
{
rStr=((ResString)aEr).GetString();
- bRet = TRUE;
+ bRet = sal_True;
}
}
delete pResMgr;
@@ -337,8 +337,8 @@ BOOL SfxErrorHandler::GetClassString(ULONG lClassId, String &rStr) const
//-------------------------------------------------------------------------
-BOOL SfxErrorHandler::GetMessageString(
- ULONG lErrId, String &rStr, USHORT &nFlags) const
+sal_Bool SfxErrorHandler::GetMessageString(
+ sal_uLong lErrId, String &rStr, sal_uInt16 &nFlags) const
/* [Beschreibung]
@@ -347,18 +347,18 @@ BOOL SfxErrorHandler::GetMessageString(
*/
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
ResId *pResId= new ResId(nId, *pMgr);
- ErrorResource_Impl aEr(*pResId, (USHORT)lErrId);
+ ErrorResource_Impl aEr(*pResId, (sal_uInt16)lErrId);
if(aEr)
{
ResString aErrorString(aEr);
- USHORT nResFlags = aErrorString.GetFlags();
+ sal_uInt16 nResFlags = aErrorString.GetFlags();
if( nResFlags )
nFlags=aErrorString.GetFlags();
rStr = aErrorString.GetString();
- bRet = TRUE;
+ bRet = sal_True;
}
delete pResId;
@@ -367,8 +367,8 @@ BOOL SfxErrorHandler::GetMessageString(
//-------------------------------------------------------------------------
-BOOL SfxErrorHandler::GetErrorString(
- ULONG lErrId, String &rStr, USHORT &nFlags) const
+sal_Bool SfxErrorHandler::GetErrorString(
+ sal_uLong lErrId, String &rStr, sal_uInt16 &nFlags) const
/* [Beschreibung]
Erzeugt den Fehlerstring fuer den eigentlichen Fehler ohne
@@ -379,25 +379,25 @@ BOOL SfxErrorHandler::GetErrorString(
{
vos:: OGuard aGuard( Application::GetSolarMutex() );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
rStr=String(SvtResId(RID_ERRHDL_CLASS));
ResId aResId(nId, *pMgr);
{
- ErrorResource_Impl aEr(aResId, (USHORT)lErrId);
+ ErrorResource_Impl aEr(aResId, (sal_uInt16)lErrId);
if(aEr)
{
ResString aErrorString(aEr);
- USHORT nResFlags = aErrorString.GetFlags();
+ sal_uInt16 nResFlags = aErrorString.GetFlags();
if ( nResFlags )
nFlags = nResFlags;
rStr.SearchAndReplace(
String::CreateFromAscii("$(ERROR)"), aErrorString.GetString());
- bRet = TRUE;
+ bRet = sal_True;
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
if( bRet )
@@ -416,7 +416,7 @@ BOOL SfxErrorHandler::GetErrorString(
//-------------------------------------------------------------------------
SfxErrorContext::SfxErrorContext(
- USHORT nCtxIdP, Window *pWindow, USHORT nResIdP, ResMgr *pMgrP)
+ sal_uInt16 nCtxIdP, Window *pWindow, sal_uInt16 nResIdP, ResMgr *pMgrP)
: ErrorContext(pWindow), nCtxId(nCtxIdP), nResId(nResIdP), pMgr(pMgrP)
{
if( nResId==USHRT_MAX )
@@ -426,8 +426,8 @@ SfxErrorContext::SfxErrorContext(
//-------------------------------------------------------------------------
SfxErrorContext::SfxErrorContext(
- USHORT nCtxIdP, const String &aArg1P, Window *pWindow,
- USHORT nResIdP, ResMgr *pMgrP)
+ sal_uInt16 nCtxIdP, const String &aArg1P, Window *pWindow,
+ sal_uInt16 nResIdP, ResMgr *pMgrP)
: ErrorContext(pWindow), nCtxId(nCtxIdP), nResId(nResIdP), pMgr(pMgrP),
aArg1(aArg1P)
{
@@ -437,7 +437,7 @@ SfxErrorContext::SfxErrorContext(
//-------------------------------------------------------------------------
-BOOL SfxErrorContext::GetString(ULONG nErrId, String &rStr)
+sal_Bool SfxErrorContext::GetString(sal_uLong nErrId, String &rStr)
/* [Beschreibung]
@@ -473,7 +473,7 @@ BOOL SfxErrorContext::GetString(ULONG nErrId, String &rStr)
if ( bRet )
{
- USHORT nId = ( nErrId & ERRCODE_WARNING_MASK ) ? ERRCTX_WARNING : ERRCTX_ERROR;
+ sal_uInt16 nId = ( nErrId & ERRCODE_WARNING_MASK ) ? ERRCTX_WARNING : ERRCTX_ERROR;
ResId aSfxResId( RID_ERRCTX, *pMgr );
ErrorResource_Impl aEr( aSfxResId, nId );
rStr.SearchAndReplace( String::CreateFromAscii( "$(ERR)" ), ( (ResString)aEr ).GetString() );
diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index a96067f95186..239e9dcfa665 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -245,7 +245,7 @@ struct EmbeddedObjectRef_Impl
Graphic* pGraphic;
Graphic* pHCGraphic;
sal_Int64 nViewAspect;
- BOOL bIsLocked;
+ sal_Bool bIsLocked;
sal_Bool bNeedUpdate;
// #i104867#
@@ -260,7 +260,7 @@ void EmbeddedObjectRef::Construct_Impl()
mpImp->pGraphic = 0;
mpImp->pHCGraphic = 0;
mpImp->nViewAspect = embed::Aspects::MSOLE_CONTENT;
- mpImp->bIsLocked = FALSE;
+ mpImp->bIsLocked = sal_False;
mpImp->bNeedUpdate = sal_False;
mpImp->mnGraphicVersion = 0;
mpImp->aDefaultSizeForChart_In_100TH_MM = awt::Size(8000,7000);
@@ -398,7 +398,7 @@ void EmbeddedObjectRef::Clear()
}
mpImp->pContainer = 0;
- mpImp->bIsLocked = FALSE;
+ mpImp->bIsLocked = sal_False;
mpImp->bNeedUpdate = sal_False;
}
@@ -440,17 +440,17 @@ void EmbeddedObjectRef::SetViewAspect( sal_Int64 nAspect )
mpImp->nViewAspect = nAspect;
}
-void EmbeddedObjectRef::Lock( BOOL bLock )
+void EmbeddedObjectRef::Lock( sal_Bool bLock )
{
mpImp->bIsLocked = bLock;
}
-BOOL EmbeddedObjectRef::IsLocked() const
+sal_Bool EmbeddedObjectRef::IsLocked() const
{
return mpImp->bIsLocked;
}
-void EmbeddedObjectRef::GetReplacement( BOOL bUpdate )
+void EmbeddedObjectRef::GetReplacement( sal_Bool bUpdate )
{
if ( bUpdate )
{
@@ -489,7 +489,7 @@ Graphic* EmbeddedObjectRef::GetGraphic( ::rtl::OUString* pMediaType ) const
// bNeedUpdate will be set to false while retrieving new replacement
const_cast < EmbeddedObjectRef* >(this)->GetReplacement( sal_True );
else if ( !mpImp->pGraphic )
- const_cast < EmbeddedObjectRef* >(this)->GetReplacement( FALSE );
+ const_cast < EmbeddedObjectRef* >(this)->GetReplacement( sal_False );
if ( mpImp->pGraphic && pMediaType )
*pMediaType = mpImp->aMediaType;
@@ -669,7 +669,7 @@ void EmbeddedObjectRef::SetGraphic( const Graphic& rGraphic, const ::rtl::OUStri
mpImp->bNeedUpdate = sal_False;
}
-SvStream* EmbeddedObjectRef::GetGraphicStream( BOOL bUpdate ) const
+SvStream* EmbeddedObjectRef::GetGraphicStream( sal_Bool bUpdate ) const
{
RTL_LOGFILE_CONTEXT( aLog, "svtools (mv76033) svt::EmbeddedObjectRef::GetGraphicStream" );
DBG_ASSERT( bUpdate || mpImp->pContainer, "Can't retrieve current graphic!" );
@@ -723,7 +723,7 @@ void EmbeddedObjectRef::DrawPaintReplacement( const Rectangle &rRect, const Stri
MapMode aMM( MAP_APPFONT );
Size aAppFontSz = pOut->LogicToLogic( Size( 0, 8 ), &aMM, NULL );
Font aFnt( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "Helvetica" ) ), aAppFontSz );
- aFnt.SetTransparent( TRUE );
+ aFnt.SetTransparent( sal_True );
aFnt.SetColor( Color( COL_LIGHTRED ) );
aFnt.SetWeight( WEIGHT_BOLD );
aFnt.SetFamily( FAMILY_SWISS );
@@ -735,14 +735,14 @@ void EmbeddedObjectRef::DrawPaintReplacement( const Rectangle &rRect, const Stri
Point aPt;
// Nun den Text so skalieren, dass er in das Rect passt.
// Wir fangen mit der Defaultsize an und gehen 1-AppFont runter
- for( USHORT i = 8; i > 2; i-- )
+ for( sal_uInt16 i = 8; i > 2; i-- )
{
aPt.X() = (rRect.GetWidth() - pOut->GetTextWidth( rText )) / 2;
aPt.Y() = (rRect.GetHeight() - pOut->GetTextHeight()) / 2;
- BOOL bTiny = FALSE;
- if( aPt.X() < 0 ) bTiny = TRUE, aPt.X() = 0;
- if( aPt.Y() < 0 ) bTiny = TRUE, aPt.Y() = 0;
+ sal_Bool bTiny = sal_False;
+ if( aPt.X() < 0 ) bTiny = sal_True, aPt.X() = 0;
+ if( aPt.Y() < 0 ) bTiny = sal_True, aPt.Y() = 0;
if( bTiny )
{
// heruntergehen bei kleinen Bildern
@@ -804,8 +804,8 @@ void EmbeddedObjectRef::DrawShading( const Rectangle &rRect, OutputDevice *pOut
aPixSize.Width() -= 1;
aPixSize.Height() -= 1;
Point aPixViewPos = pOut->LogicToPixel( rRect.TopLeft() );
- INT32 nMax = aPixSize.Width() + aPixSize.Height();
- for( INT32 i = 5; i < nMax; i += 5 )
+ sal_Int32 nMax = aPixSize.Width() + aPixSize.Height();
+ for( sal_Int32 i = 5; i < nMax; i += 5 )
{
Point a1( aPixViewPos ), a2( aPixViewPos );
if( i > aPixSize.Width() )
@@ -824,15 +824,15 @@ void EmbeddedObjectRef::DrawShading( const Rectangle &rRect, OutputDevice *pOut
}
-BOOL EmbeddedObjectRef::TryRunningState()
+sal_Bool EmbeddedObjectRef::TryRunningState()
{
return TryRunningState( mxObj );
}
-BOOL EmbeddedObjectRef::TryRunningState( const uno::Reference < embed::XEmbeddedObject >& xEmbObj )
+sal_Bool EmbeddedObjectRef::TryRunningState( const uno::Reference < embed::XEmbeddedObject >& xEmbObj )
{
if ( !xEmbObj.is() )
- return FALSE;
+ return sal_False;
try
{
@@ -841,10 +841,10 @@ BOOL EmbeddedObjectRef::TryRunningState( const uno::Reference < embed::XEmbedded
}
catch ( uno::Exception& )
{
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
void EmbeddedObjectRef::SetGraphicToContainer( const Graphic& rGraphic,
@@ -907,7 +907,7 @@ void EmbeddedObjectRef::UpdateReplacementOnDemand()
}
}
-BOOL EmbeddedObjectRef::IsChart() const
+sal_Bool EmbeddedObjectRef::IsChart() const
{
//todo maybe for 3.0:
//if the changes work good for chart
diff --git a/svtools/source/misc/embedtransfer.cxx b/svtools/source/misc/embedtransfer.cxx
index e49cf0ab62cf..451eee04d814 100644
--- a/svtools/source/misc/embedtransfer.cxx
+++ b/svtools/source/misc/embedtransfer.cxx
@@ -110,21 +110,21 @@ sal_Bool SvEmbedTransferHelper::GetData( const ::com::sun::star::datatransfer::D
// TODO/LATER: Propbably the graphic should be copied here as well
// currently it is handled by the applications
utl::TempFile aTmp;
- aTmp.EnableKillingFile( TRUE );
+ aTmp.EnableKillingFile( sal_True );
uno::Reference < embed::XEmbedPersist > xPers( m_xObj, uno::UNO_QUERY );
if ( xPers.is() )
{
uno::Reference < embed::XStorage > xStg = comphelper::OStorageHelper::GetTemporaryStorage();
::rtl::OUString aName = ::rtl::OUString::createFromAscii("Dummy");
SvStream* pStream = NULL;
- BOOL bDeleteStream = FALSE;
+ sal_Bool bDeleteStream = sal_False;
uno::Sequence < beans::PropertyValue > aEmpty;
xPers->storeToEntry( xStg, aName, aEmpty, aEmpty );
if ( xStg->isStreamElement( aName ) )
{
uno::Reference < io::XStream > xStm = xStg->cloneStreamElement( aName );
pStream = utl::UcbStreamHelper::CreateStream( xStm );
- bDeleteStream = TRUE;
+ bDeleteStream = sal_True;
}
else
{
@@ -251,6 +251,6 @@ void SvEmbedTransferHelper::FillTransferableObjectDescriptor( TransferableObject
rDesc.maSize = OutputDevice::LogicToLogic( aSize, aMapMode, MapMode( MAP_100TH_MM ) );
rDesc.maDragStartPos = Point();
rDesc.maDisplayName = String();
- rDesc.mbCanLink = FALSE;
+ rDesc.mbCanLink = sal_False;
}
diff --git a/svtools/source/misc/helpagentwindow.cxx b/svtools/source/misc/helpagentwindow.cxx
index a909c2f77ca9..a270e8b68bf9 100644
--- a/svtools/source/misc/helpagentwindow.cxx
+++ b/svtools/source/misc/helpagentwindow.cxx
@@ -99,7 +99,7 @@ namespace svt
m_aPreferredSize.Height() += aSize.Height() - aOutputSize.Height();
SetPointer(Pointer(POINTER_REFHAND));
- AlwaysEnableInput( TRUE, TRUE );
+ AlwaysEnableInput( sal_True, sal_True );
// unique id for the testtool
SetUniqueId( HID_HELPAGENT_WINDOW );
diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx
index 4dbd132b9dc8..0fa861281196 100644
--- a/svtools/source/misc/imagemgr.cxx
+++ b/svtools/source/misc/imagemgr.cxx
@@ -56,160 +56,160 @@
// globals *******************************************************************
-#define NO_INDEX ((USHORT)0xFFFF)
+#define NO_INDEX ((sal_uInt16)0xFFFF)
#define CONTENT_HELPER ::utl::UCBContentHelper
#define ASCII_STRING(s) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(s) )
struct SvtExtensionResIdMapping_Impl
{
const char* _pExt;
- BOOL _bExt;
- USHORT _nStrId;
- USHORT _nImgId;
+ sal_Bool _bExt;
+ sal_uInt16 _nStrId;
+ sal_uInt16 _nImgId;
};
static SvtExtensionResIdMapping_Impl __READONLY_DATA ExtensionMap_Impl[] =
{
- { "awk", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
- { "bas", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
- { "bat", TRUE, STR_DESCRIPTION_BATCHFILE, 0 },
- { "bmk", FALSE, STR_DESCRIPTION_BOOKMARKFILE, 0 },
- { "bmp", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_BITMAP },
- { "c", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
- { "cfg", FALSE, STR_DESCRIPTION_CFGFILE, 0 },
- { "cmd", TRUE, STR_DESCRIPTION_BATCHFILE, 0 },
- { "cob", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
- { "com", TRUE, STR_DESCRIPTION_APPLICATION, 0 },
- { "cxx", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
- { "dbf", TRUE, STR_DESCRIPTION_DATABASE_TABLE, IMG_TABLE },
- { "def", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
- { "dll", TRUE, STR_DESCRIPTION_SYSFILE, 0 },
- { "doc", FALSE, STR_DESCRIPTION_WORD_DOC, IMG_WRITER },
- { "dot", FALSE, STR_DESCRIPTION_WORD_DOC, IMG_WRITERTEMPLATE },
- { "docx", FALSE, STR_DESCRIPTION_WORD_DOC, IMG_WRITER },
- { "dxf", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_DXF },
- { "exe", TRUE, STR_DESCRIPTION_APPLICATION, 0 },
- { "gif", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_GIF },
- { "h", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
- { "hlp", FALSE, STR_DESCRIPTION_HELP_DOC, 0 },
- { "hrc", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
- { "htm", FALSE, STR_DESCRIPTION_HTMLFILE, IMG_HTML },
- { "html", FALSE, STR_DESCRIPTION_HTMLFILE, IMG_HTML },
- { "asp", FALSE, STR_DESCRIPTION_HTMLFILE, IMG_HTML },
- { "hxx", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
- { "ini", FALSE, STR_DESCRIPTION_CFGFILE, 0 },
- { "java", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
- { "jpeg", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_JPG },
- { "jpg", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_JPG },
- { "lha", TRUE, STR_DESCRIPTION_ARCHIVFILE, 0 },
+ { "awk", sal_True, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "bas", sal_True, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "bat", sal_True, STR_DESCRIPTION_BATCHFILE, 0 },
+ { "bmk", sal_False, STR_DESCRIPTION_BOOKMARKFILE, 0 },
+ { "bmp", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_BITMAP },
+ { "c", sal_True, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "cfg", sal_False, STR_DESCRIPTION_CFGFILE, 0 },
+ { "cmd", sal_True, STR_DESCRIPTION_BATCHFILE, 0 },
+ { "cob", sal_True, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "com", sal_True, STR_DESCRIPTION_APPLICATION, 0 },
+ { "cxx", sal_True, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "dbf", sal_True, STR_DESCRIPTION_DATABASE_TABLE, IMG_TABLE },
+ { "def", sal_True, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "dll", sal_True, STR_DESCRIPTION_SYSFILE, 0 },
+ { "doc", sal_False, STR_DESCRIPTION_WORD_DOC, IMG_WRITER },
+ { "dot", sal_False, STR_DESCRIPTION_WORD_DOC, IMG_WRITERTEMPLATE },
+ { "docx", sal_False, STR_DESCRIPTION_WORD_DOC, IMG_WRITER },
+ { "dxf", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_DXF },
+ { "exe", sal_True, STR_DESCRIPTION_APPLICATION, 0 },
+ { "gif", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_GIF },
+ { "h", sal_True, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "hlp", sal_False, STR_DESCRIPTION_HELP_DOC, 0 },
+ { "hrc", sal_True, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "htm", sal_False, STR_DESCRIPTION_HTMLFILE, IMG_HTML },
+ { "html", sal_False, STR_DESCRIPTION_HTMLFILE, IMG_HTML },
+ { "asp", sal_False, STR_DESCRIPTION_HTMLFILE, IMG_HTML },
+ { "hxx", sal_True, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "ini", sal_False, STR_DESCRIPTION_CFGFILE, 0 },
+ { "java", sal_True, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "jpeg", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_JPG },
+ { "jpg", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_JPG },
+ { "lha", sal_True, STR_DESCRIPTION_ARCHIVFILE, 0 },
#ifdef WNT
- { "lnk", FALSE, 0, 0 },
+ { "lnk", sal_False, 0, 0 },
#endif
- { "log", TRUE, STR_DESCRIPTION_LOGFILE, 0 },
- { "lst", TRUE, STR_DESCRIPTION_LOGFILE, 0 },
- { "met", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_MET },
- { "mml", FALSE, STR_DESCRIPTION_MATHML_DOC, IMG_MATH },
- { "mod", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
- { "odb", FALSE, STR_DESCRIPTION_OO_DATABASE_DOC, IMG_OO_DATABASE_DOC },
- { "odg", FALSE, STR_DESCRIPTION_OO_DRAW_DOC, IMG_OO_DRAW_DOC },
- { "odf", FALSE, STR_DESCRIPTION_OO_MATH_DOC, IMG_OO_MATH_DOC },
- { "odm", FALSE, STR_DESCRIPTION_OO_GLOBAL_DOC, IMG_OO_GLOBAL_DOC },
- { "odp", FALSE, STR_DESCRIPTION_OO_IMPRESS_DOC, IMG_OO_IMPRESS_DOC },
- { "ods", FALSE, STR_DESCRIPTION_OO_CALC_DOC, IMG_OO_CALC_DOC },
- { "odt", FALSE, STR_DESCRIPTION_OO_WRITER_DOC, IMG_OO_WRITER_DOC },
- { "otg", FALSE, STR_DESCRIPTION_OO_DRAW_TEMPLATE, IMG_OO_DRAW_TEMPLATE },
- { "otp", FALSE, STR_DESCRIPTION_OO_IMPRESS_TEMPLATE, IMG_OO_IMPRESS_TEMPLATE },
- { "ots", FALSE, STR_DESCRIPTION_OO_CALC_TEMPLATE, IMG_OO_CALC_TEMPLATE },
- { "ott", FALSE, STR_DESCRIPTION_OO_WRITER_TEMPLATE, IMG_OO_WRITER_TEMPLATE },
- { "pas", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
- { "pcd", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_PCD },
- { "pct", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_PCT },
- { "pcx", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_PCX },
- { "pl", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
- { "png", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_PNG },
- { "rar", TRUE, STR_DESCRIPTION_ARCHIVFILE, 0 },
- { "rtf", FALSE, STR_DESCRIPTION_WORD_DOC, IMG_WRITER },
- { "sbl", FALSE, 0, 0 },
- { "sch", FALSE, 0, 0 },
- { "sda", FALSE, STR_DESCRIPTION_SDRAW_DOC, IMG_DRAW },
- { "sdb", FALSE, STR_DESCRIPTION_SDATABASE_DOC, IMG_DATABASE },
- { "sdc", FALSE, STR_DESCRIPTION_SCALC_DOC, IMG_CALC },
- { "sdd", FALSE, STR_DESCRIPTION_SIMPRESS_DOC, IMG_IMPRESS },
- { "sdp", FALSE, STR_DESCRIPTION_SIMPRESS_DOC, 0 },
- { "sds", FALSE, STR_DESCRIPTION_SCHART_DOC, 0 },
- { "sdw", FALSE, STR_DESCRIPTION_SWRITER_DOC, IMG_WRITER },
- { "sga", FALSE, 0, 0 },
- { "sgf", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_SGF },
- { "sgl", FALSE, STR_DESCRIPTION_GLOBALDOC, IMG_GLOBAL_DOC },
- { "sgv", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_SGV },
- { "shtml", FALSE, STR_DESCRIPTION_HTMLFILE, IMG_HTML },
- { "sim", FALSE, STR_DESCRIPTION_SIMAGE_DOC, IMG_SIM },
- { "smf", FALSE, STR_DESCRIPTION_SMATH_DOC, IMG_MATH },
- { "src", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
- { "svh", FALSE, STR_DESCRIPTION_HELP_DOC, 0 },
- { "svm", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_SVM },
- { "stc", FALSE, STR_DESCRIPTION_CALC_TEMPLATE, IMG_CALCTEMPLATE },
- { "std", FALSE, STR_DESCRIPTION_DRAW_TEMPLATE, IMG_DRAWTEMPLATE },
- { "sti", FALSE, STR_DESCRIPTION_IMPRESS_TEMPLATE, IMG_IMPRESSTEMPLATE },
- { "stw", FALSE, STR_DESCRIPTION_WRITER_TEMPLATE, IMG_WRITERTEMPLATE },
- { "sxc", FALSE, STR_DESCRIPTION_SXCALC_DOC, IMG_CALC },
- { "sxd", FALSE, STR_DESCRIPTION_SXDRAW_DOC, IMG_DRAW },
- { "sxg", FALSE, STR_DESCRIPTION_SXGLOBAL_DOC, IMG_GLOBAL_DOC },
- { "sxi", FALSE, STR_DESCRIPTION_SXIMPRESS_DOC, IMG_IMPRESS },
- { "sxm", FALSE, STR_DESCRIPTION_SXMATH_DOC, IMG_MATH },
- { "sxs", FALSE, STR_DESCRIPTION_SXCHART_DOC, 0 },
- { "sxw", FALSE, STR_DESCRIPTION_SXWRITER_DOC, IMG_WRITER },
- { "sys", TRUE, STR_DESCRIPTION_SYSFILE, 0 },
- { "tif", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_TIFF },
- { "tiff", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_TIFF },
- { "txt", FALSE, STR_DESCRIPTION_TEXTFILE, IMG_TEXTFILE },
- { "url", FALSE, STR_DESCRIPTION_LINK, 0 },
- { "vor", FALSE, STR_DESCRIPTION_SOFFICE_TEMPLATE_DOC, IMG_WRITERTEMPLATE },
- { "vxd", TRUE, STR_DESCRIPTION_SYSFILE, 0 },
- { "wmf", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_WMF },
- { "xls", FALSE, STR_DESCRIPTION_EXCEL_DOC, IMG_CALC },
- { "xlt", FALSE, STR_DESCRIPTION_EXCEL_TEMPLATE_DOC, IMG_CALCTEMPLATE },
- { "xlsx", FALSE, STR_DESCRIPTION_EXCEL_DOC, IMG_CALC },
- { "uu", TRUE, STR_DESCRIPTION_ARCHIVFILE, 0 },
- { "uue", TRUE, STR_DESCRIPTION_ARCHIVFILE, 0 },
- { "z", TRUE, STR_DESCRIPTION_ARCHIVFILE, 0 },
- { "zip", TRUE, STR_DESCRIPTION_ARCHIVFILE, 0 },
- { "zoo", TRUE, STR_DESCRIPTION_ARCHIVFILE, 0 },
- { "gz", TRUE, STR_DESCRIPTION_ARCHIVFILE, 0 },
- { "ppt", FALSE, STR_DESCRIPTION_POWERPOINT, IMG_IMPRESS },
- { "pot", FALSE, STR_DESCRIPTION_POWERPOINT_TEMPLATE, IMG_IMPRESSTEMPLATE },
- { "pps", FALSE, STR_DESCRIPTION_POWERPOINT_SHOW, IMG_IMPRESS },
- { "pptx", FALSE, STR_DESCRIPTION_POWERPOINT, IMG_IMPRESS },
- { "oxt", FALSE, STR_DESCRIPTION_EXTENSION, IMG_EXTENSION },
- { 0, FALSE, 0, 0 }
+ { "log", sal_True, STR_DESCRIPTION_LOGFILE, 0 },
+ { "lst", sal_True, STR_DESCRIPTION_LOGFILE, 0 },
+ { "met", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_MET },
+ { "mml", sal_False, STR_DESCRIPTION_MATHML_DOC, IMG_MATH },
+ { "mod", sal_True, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "odb", sal_False, STR_DESCRIPTION_OO_DATABASE_DOC, IMG_OO_DATABASE_DOC },
+ { "odg", sal_False, STR_DESCRIPTION_OO_DRAW_DOC, IMG_OO_DRAW_DOC },
+ { "odf", sal_False, STR_DESCRIPTION_OO_MATH_DOC, IMG_OO_MATH_DOC },
+ { "odm", sal_False, STR_DESCRIPTION_OO_GLOBAL_DOC, IMG_OO_GLOBAL_DOC },
+ { "odp", sal_False, STR_DESCRIPTION_OO_IMPRESS_DOC, IMG_OO_IMPRESS_DOC },
+ { "ods", sal_False, STR_DESCRIPTION_OO_CALC_DOC, IMG_OO_CALC_DOC },
+ { "odt", sal_False, STR_DESCRIPTION_OO_WRITER_DOC, IMG_OO_WRITER_DOC },
+ { "otg", sal_False, STR_DESCRIPTION_OO_DRAW_TEMPLATE, IMG_OO_DRAW_TEMPLATE },
+ { "otp", sal_False, STR_DESCRIPTION_OO_IMPRESS_TEMPLATE, IMG_OO_IMPRESS_TEMPLATE },
+ { "ots", sal_False, STR_DESCRIPTION_OO_CALC_TEMPLATE, IMG_OO_CALC_TEMPLATE },
+ { "ott", sal_False, STR_DESCRIPTION_OO_WRITER_TEMPLATE, IMG_OO_WRITER_TEMPLATE },
+ { "pas", sal_True, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "pcd", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_PCD },
+ { "pct", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_PCT },
+ { "pcx", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_PCX },
+ { "pl", sal_True, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "png", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_PNG },
+ { "rar", sal_True, STR_DESCRIPTION_ARCHIVFILE, 0 },
+ { "rtf", sal_False, STR_DESCRIPTION_WORD_DOC, IMG_WRITER },
+ { "sbl", sal_False, 0, 0 },
+ { "sch", sal_False, 0, 0 },
+ { "sda", sal_False, STR_DESCRIPTION_SDRAW_DOC, IMG_DRAW },
+ { "sdb", sal_False, STR_DESCRIPTION_SDATABASE_DOC, IMG_DATABASE },
+ { "sdc", sal_False, STR_DESCRIPTION_SCALC_DOC, IMG_CALC },
+ { "sdd", sal_False, STR_DESCRIPTION_SIMPRESS_DOC, IMG_IMPRESS },
+ { "sdp", sal_False, STR_DESCRIPTION_SIMPRESS_DOC, 0 },
+ { "sds", sal_False, STR_DESCRIPTION_SCHART_DOC, 0 },
+ { "sdw", sal_False, STR_DESCRIPTION_SWRITER_DOC, IMG_WRITER },
+ { "sga", sal_False, 0, 0 },
+ { "sgf", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_SGF },
+ { "sgl", sal_False, STR_DESCRIPTION_GLOBALDOC, IMG_GLOBAL_DOC },
+ { "sgv", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_SGV },
+ { "shtml", sal_False, STR_DESCRIPTION_HTMLFILE, IMG_HTML },
+ { "sim", sal_False, STR_DESCRIPTION_SIMAGE_DOC, IMG_SIM },
+ { "smf", sal_False, STR_DESCRIPTION_SMATH_DOC, IMG_MATH },
+ { "src", sal_True, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "svh", sal_False, STR_DESCRIPTION_HELP_DOC, 0 },
+ { "svm", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_SVM },
+ { "stc", sal_False, STR_DESCRIPTION_CALC_TEMPLATE, IMG_CALCTEMPLATE },
+ { "std", sal_False, STR_DESCRIPTION_DRAW_TEMPLATE, IMG_DRAWTEMPLATE },
+ { "sti", sal_False, STR_DESCRIPTION_IMPRESS_TEMPLATE, IMG_IMPRESSTEMPLATE },
+ { "stw", sal_False, STR_DESCRIPTION_WRITER_TEMPLATE, IMG_WRITERTEMPLATE },
+ { "sxc", sal_False, STR_DESCRIPTION_SXCALC_DOC, IMG_CALC },
+ { "sxd", sal_False, STR_DESCRIPTION_SXDRAW_DOC, IMG_DRAW },
+ { "sxg", sal_False, STR_DESCRIPTION_SXGLOBAL_DOC, IMG_GLOBAL_DOC },
+ { "sxi", sal_False, STR_DESCRIPTION_SXIMPRESS_DOC, IMG_IMPRESS },
+ { "sxm", sal_False, STR_DESCRIPTION_SXMATH_DOC, IMG_MATH },
+ { "sxs", sal_False, STR_DESCRIPTION_SXCHART_DOC, 0 },
+ { "sxw", sal_False, STR_DESCRIPTION_SXWRITER_DOC, IMG_WRITER },
+ { "sys", sal_True, STR_DESCRIPTION_SYSFILE, 0 },
+ { "tif", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_TIFF },
+ { "tiff", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_TIFF },
+ { "txt", sal_False, STR_DESCRIPTION_TEXTFILE, IMG_TEXTFILE },
+ { "url", sal_False, STR_DESCRIPTION_LINK, 0 },
+ { "vor", sal_False, STR_DESCRIPTION_SOFFICE_TEMPLATE_DOC, IMG_WRITERTEMPLATE },
+ { "vxd", sal_True, STR_DESCRIPTION_SYSFILE, 0 },
+ { "wmf", sal_True, STR_DESCRIPTION_GRAPHIC_DOC, IMG_WMF },
+ { "xls", sal_False, STR_DESCRIPTION_EXCEL_DOC, IMG_CALC },
+ { "xlt", sal_False, STR_DESCRIPTION_EXCEL_TEMPLATE_DOC, IMG_CALCTEMPLATE },
+ { "xlsx", sal_False, STR_DESCRIPTION_EXCEL_DOC, IMG_CALC },
+ { "uu", sal_True, STR_DESCRIPTION_ARCHIVFILE, 0 },
+ { "uue", sal_True, STR_DESCRIPTION_ARCHIVFILE, 0 },
+ { "z", sal_True, STR_DESCRIPTION_ARCHIVFILE, 0 },
+ { "zip", sal_True, STR_DESCRIPTION_ARCHIVFILE, 0 },
+ { "zoo", sal_True, STR_DESCRIPTION_ARCHIVFILE, 0 },
+ { "gz", sal_True, STR_DESCRIPTION_ARCHIVFILE, 0 },
+ { "ppt", sal_False, STR_DESCRIPTION_POWERPOINT, IMG_IMPRESS },
+ { "pot", sal_False, STR_DESCRIPTION_POWERPOINT_TEMPLATE, IMG_IMPRESSTEMPLATE },
+ { "pps", sal_False, STR_DESCRIPTION_POWERPOINT_SHOW, IMG_IMPRESS },
+ { "pptx", sal_False, STR_DESCRIPTION_POWERPOINT, IMG_IMPRESS },
+ { "oxt", sal_False, STR_DESCRIPTION_EXTENSION, IMG_EXTENSION },
+ { 0, sal_False, 0, 0 }
};
#ifdef OS2
SvtExtensionResIdMapping_Impl Mappings[] =
{
- {"StarWriter 4.0", FALSE,STR_DESCRIPTION_SWRITER_DOC, IMG_WRITER},
- {"StarWriter 3.0", FALSE,STR_DESCRIPTION_SWRITER_DOC, IMG_WRITER},
- {"StarCalc 4.0", FALSE,STR_DESCRIPTION_SCALC_DOC, IMG_CALC},
- {"StarCalc 3.0", FALSE,STR_DESCRIPTION_SCALC_DOC, IMG_CALC},
- {"StarImpress 4.0", FALSE,STR_DESCRIPTION_SIMPRESS_DOC,IMG_IMPRESS},
- {"StarDraw 4.0", FALSE,STR_DESCRIPTION_SDRAW_DOC, IMG_DRAW},
- {"StarDraw 3.0", FALSE,STR_DESCRIPTION_SDRAW_DOC, IMG_DRAW},
- {"StarChart 3.0", FALSE,STR_DESCRIPTION_SCHART_DOC, IMG_CHART},
- {"StarChart 4.0", FALSE,STR_DESCRIPTION_SCHART_DOC, IMG_CHART},
- {"Bitmap", FALSE,STR_DESCRIPTION_GRAPHIC_DOC, IMG_BITMAP},
- {"AutoCAD", FALSE,STR_DESCRIPTION_GRAPHIC_DOC, IMG_SIM},
- {"Gif-File", FALSE,STR_DESCRIPTION_GRAPHIC_DOC, IMG_GIF},
- {"JPEG-File", FALSE,STR_DESCRIPTION_GRAPHIC_DOC, IMG_JPG},
- {"Metafile ", FALSE,STR_DESCRIPTION_GRAPHIC_DOC, IMG_SIM},
- {"Photo-CD ", FALSE,STR_DESCRIPTION_GRAPHIC_DOC, IMG_PCD},
- {"Mac Pict", FALSE,STR_DESCRIPTION_GRAPHIC_DOC, IMG_PCT},
- {"PCX-File ", FALSE,STR_DESCRIPTION_GRAPHIC_DOC, IMG_PCX},
- {"PNG-File", FALSE,STR_DESCRIPTION_GRAPHIC_DOC, IMG_SIM},
- {"SV-Metafile", FALSE,STR_DESCRIPTION_GRAPHIC_DOC, IMG_SIM},
- {"TIFF-File", FALSE,STR_DESCRIPTION_GRAPHIC_DOC, IMG_TIFF},
- {"MS-Metafile", FALSE,STR_DESCRIPTION_GRAPHIC_DOC, IMG_WMF},
- {"XBM-File", FALSE,STR_DESCRIPTION_GRAPHIC_DOC, IMG_BITMAP},
- {"UniformResourceLocator", FALSE,STR_DESCRIPTION_LINK, IMG_URL},
+ {"StarWriter 4.0", sal_False,STR_DESCRIPTION_SWRITER_DOC, IMG_WRITER},
+ {"StarWriter 3.0", sal_False,STR_DESCRIPTION_SWRITER_DOC, IMG_WRITER},
+ {"StarCalc 4.0", sal_False,STR_DESCRIPTION_SCALC_DOC, IMG_CALC},
+ {"StarCalc 3.0", sal_False,STR_DESCRIPTION_SCALC_DOC, IMG_CALC},
+ {"StarImpress 4.0", sal_False,STR_DESCRIPTION_SIMPRESS_DOC,IMG_IMPRESS},
+ {"StarDraw 4.0", sal_False,STR_DESCRIPTION_SDRAW_DOC, IMG_DRAW},
+ {"StarDraw 3.0", sal_False,STR_DESCRIPTION_SDRAW_DOC, IMG_DRAW},
+ {"StarChart 3.0", sal_False,STR_DESCRIPTION_SCHART_DOC, IMG_CHART},
+ {"StarChart 4.0", sal_False,STR_DESCRIPTION_SCHART_DOC, IMG_CHART},
+ {"Bitmap", sal_False,STR_DESCRIPTION_GRAPHIC_DOC, IMG_BITMAP},
+ {"AutoCAD", sal_False,STR_DESCRIPTION_GRAPHIC_DOC, IMG_SIM},
+ {"Gif-File", sal_False,STR_DESCRIPTION_GRAPHIC_DOC, IMG_GIF},
+ {"JPEG-File", sal_False,STR_DESCRIPTION_GRAPHIC_DOC, IMG_JPG},
+ {"Metafile ", sal_False,STR_DESCRIPTION_GRAPHIC_DOC, IMG_SIM},
+ {"Photo-CD ", sal_False,STR_DESCRIPTION_GRAPHIC_DOC, IMG_PCD},
+ {"Mac Pict", sal_False,STR_DESCRIPTION_GRAPHIC_DOC, IMG_PCT},
+ {"PCX-File ", sal_False,STR_DESCRIPTION_GRAPHIC_DOC, IMG_PCX},
+ {"PNG-File", sal_False,STR_DESCRIPTION_GRAPHIC_DOC, IMG_SIM},
+ {"SV-Metafile", sal_False,STR_DESCRIPTION_GRAPHIC_DOC, IMG_SIM},
+ {"TIFF-File", sal_False,STR_DESCRIPTION_GRAPHIC_DOC, IMG_TIFF},
+ {"MS-Metafile", sal_False,STR_DESCRIPTION_GRAPHIC_DOC, IMG_WMF},
+ {"XBM-File", sal_False,STR_DESCRIPTION_GRAPHIC_DOC, IMG_BITMAP},
+ {"UniformResourceLocator", sal_False,STR_DESCRIPTION_LINK, IMG_URL},
{NULL, 0}
};
#endif
@@ -245,7 +245,7 @@ static String GetImageExtensionByFactory_Impl( const String& rURL )
if ( aPath.Len() )
{
- USHORT nIndex = 0;
+ sal_uInt16 nIndex = 0;
while ( Fac2ExtMap_Impl[ nIndex ]._pFactory )
{
if ( aPath.EqualsAscii( Fac2ExtMap_Impl[ nIndex ]._pFactory ) )
@@ -303,12 +303,12 @@ static String GetImageExtensionByFactory_Impl( const String& rURL )
return aExtension;
}
-static USHORT GetIndexOfExtension_Impl( const String& rExtension )
+static sal_uInt16 GetIndexOfExtension_Impl( const String& rExtension )
{
- USHORT nRet = NO_INDEX;
+ sal_uInt16 nRet = NO_INDEX;
if ( rExtension.Len() )
{
- USHORT nIndex = 0;
+ sal_uInt16 nIndex = 0;
String aExt = rExtension;
aExt.ToLowerAscii();
while ( ExtensionMap_Impl[ nIndex ]._pExt )
@@ -325,12 +325,12 @@ static USHORT GetIndexOfExtension_Impl( const String& rExtension )
return nRet;
}
-static USHORT GetImageId_Impl( const String& rExtension )
+static sal_uInt16 GetImageId_Impl( const String& rExtension )
{
- USHORT nImage = IMG_FILE;
+ sal_uInt16 nImage = IMG_FILE;
if ( rExtension.Len() != NO_INDEX )
{
- USHORT nIndex = GetIndexOfExtension_Impl( rExtension );
+ sal_uInt16 nIndex = GetIndexOfExtension_Impl( rExtension );
if ( nIndex != NO_INDEX )
{
nImage = ExtensionMap_Impl[ nIndex ]._nImgId;
@@ -366,9 +366,9 @@ static sal_Bool GetVolumeProperties_Impl( ::ucbhelper::Content& rContent, svtool
return bRet;
}
-static USHORT GetFolderImageId_Impl( const String& rURL )
+static sal_uInt16 GetFolderImageId_Impl( const String& rURL )
{
- USHORT nRet = IMG_FOLDER;
+ sal_uInt16 nRet = IMG_FOLDER;
::svtools::VolumeInfo aVolumeInfo;
try
{
@@ -396,12 +396,12 @@ static USHORT GetFolderImageId_Impl( const String& rURL )
return nRet;
}
-static USHORT GetImageId_Impl( const INetURLObject& rObject, sal_Bool bDetectFolder )
+static sal_uInt16 GetImageId_Impl( const INetURLObject& rObject, sal_Bool bDetectFolder )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aTimeLog, "svtools", "hb93813", "SvFileInformationManager::GetImageId_Impl()" );
String aExt, sURL = rObject.GetMainURL( INetURLObject::NO_DECODE );
- USHORT nImage = IMG_FILE;
+ sal_uInt16 nImage = IMG_FILE;
if ( rObject.GetProtocol() == INET_PROT_PRIVATE )
{
@@ -416,7 +416,7 @@ static USHORT GetImageId_Impl( const INetURLObject& rObject, sal_Bool bDetectFol
return nImage;
}
else if ( aType == String( RTL_CONSTASCII_STRINGPARAM("image") ) )
- nImage = (USHORT)aURLPath.GetToken( 1, INET_PATH_TOKEN ).ToInt32();
+ nImage = (sal_uInt16)aURLPath.GetToken( 1, INET_PATH_TOKEN ).ToInt32();
}
else
{
@@ -424,7 +424,7 @@ static USHORT GetImageId_Impl( const INetURLObject& rObject, sal_Bool bDetectFol
if ( aExt.EqualsAscii( "vor" ) )
{
SotStorageRef aStorage = new SotStorage( sURL, STREAM_STD_READ );
- USHORT nId = IMG_WRITERTEMPLATE;
+ sal_uInt16 nId = IMG_WRITERTEMPLATE;
if ( !aStorage->GetError() )
{
SvGlobalName aGlobalName = aStorage->GetClassName();
@@ -453,13 +453,13 @@ static USHORT GetImageId_Impl( const INetURLObject& rObject, sal_Bool bDetectFol
return nImage;
}
-static USHORT GetDescriptionId_Impl( const String& rExtension, sal_Bool& rbShowExt )
+static sal_uInt16 GetDescriptionId_Impl( const String& rExtension, sal_Bool& rbShowExt )
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
if ( rExtension.Len() != NO_INDEX )
{
- USHORT nIndex = GetIndexOfExtension_Impl( rExtension );
+ sal_uInt16 nIndex = GetIndexOfExtension_Impl( rExtension );
if ( nIndex != NO_INDEX )
{
nId = ExtensionMap_Impl[ nIndex ]._nStrId;
@@ -472,7 +472,7 @@ static USHORT GetDescriptionId_Impl( const String& rExtension, sal_Bool& rbShowE
static String GetDescriptionByFactory_Impl( const String& rFactory )
{
- USHORT nResId = 0;
+ sal_uInt16 nResId = 0;
if ( rFactory.EqualsIgnoreCaseAscii( "swriter", 0, 7 ) )
nResId = STR_DESCRIPTION_FACTORY_WRITER;
else if ( rFactory.EqualsIgnoreCaseAscii( "scalc", 0, 5 ) )
@@ -499,9 +499,9 @@ static String GetDescriptionByFactory_Impl( const String& rFactory )
return aRet;
}
-static USHORT GetFolderDescriptionId_Impl( const String& rURL )
+static sal_uInt16 GetFolderDescriptionId_Impl( const String& rURL )
{
- USHORT nRet = STR_DESCRIPTION_FOLDER;
+ sal_uInt16 nRet = STR_DESCRIPTION_FOLDER;
svtools::VolumeInfo aVolumeInfo;
try
{
@@ -529,6 +529,7 @@ static USHORT GetFolderDescriptionId_Impl( const String& rURL )
return nRet;
}
+/*
static ResMgr* GetIsoResMgr_Impl()
{
static ResMgr* pIsoResMgr = NULL;
@@ -550,7 +551,7 @@ static ResMgr* GetIsoResMgr_Impl()
return pIsoResMgr;
}
-static ImageList* CreateImageList_Impl( USHORT nResId )
+static ImageList* CreateImageList_Impl( sal_uInt16 nResId )
{
ImageList* pList = NULL;
ResMgr* pResMgr = GetIsoResMgr_Impl();
@@ -564,7 +565,7 @@ static ImageList* CreateImageList_Impl( USHORT nResId )
return pList;
}
-static Image GetOfficeImageFromList_Impl( USHORT nImageId, BOOL bBig, BOOL bHighContrast )
+static Image GetOfficeImageFromList_Impl( sal_uInt16 nImageId, sal_Bool bBig, sal_Bool bHighContrast )
{
ImageList* pList = NULL;
@@ -572,7 +573,7 @@ static Image GetOfficeImageFromList_Impl( USHORT nImageId, BOOL bBig, BOOL bHigh
static ImageList* _pBigOfficeImgList = NULL;
static ImageList* _pSmallHCOfficeImgList = NULL;
static ImageList* _pBigHCOfficeImgList = NULL;
- static ULONG nStyle = Application::GetSettings().GetStyleSettings().GetSymbolsStyle();
+ static sal_uLong nStyle = Application::GetSettings().GetStyleSettings().GetSymbolsStyle();
// If the style has been changed, throw away our cache of the older images
if ( nStyle != Application::GetSettings().GetStyleSettings().GetSymbolsStyle() )
@@ -585,11 +586,11 @@ static Image GetOfficeImageFromList_Impl( USHORT nImageId, BOOL bBig, BOOL bHigh
}
// #i21242# MT: For B&W we need the HC Image and must transform.
- // bHiContrast is TRUE for all dark backgrounds, but we need HC Images for HC White also,
+ // bHiContrast is sal_True for all dark backgrounds, but we need HC Images for HC White also,
// so we can't rely on bHighContrast.
- BOOL bBlackAndWhite = Application::GetSettings().GetStyleSettings().IsHighContrastBlackAndWhite();
+ sal_Bool bBlackAndWhite = Application::GetSettings().GetStyleSettings().IsHighContrastBlackAndWhite();
if ( bBlackAndWhite )
- bHighContrast = TRUE;
+ bHighContrast = sal_True;
if ( bBig )
@@ -638,8 +639,9 @@ static Image GetOfficeImageFromList_Impl( USHORT nImageId, BOOL bBig, BOOL bHigh
return aImage;
}
+*/
-static Image GetImageFromList_Impl( USHORT nImageId, BOOL bBig, BOOL bHighContrast )
+static Image GetImageFromList_Impl( sal_uInt16 nImageId, sal_Bool bBig, sal_Bool bHighContrast )
{
if ( !bBig && IMG_FOLDER == nImageId && !bHighContrast )
// return our new small folder image (256 colors)
@@ -651,7 +653,7 @@ static Image GetImageFromList_Impl( USHORT nImageId, BOOL bBig, BOOL bHighContra
static ImageList* _pBigImageList = NULL;
static ImageList* _pSmallHCImageList = NULL;
static ImageList* _pBigHCImageList = NULL;
- static ULONG nStyle = Application::GetSettings().GetStyleSettings().GetSymbolsStyle();
+ static sal_uLong nStyle = Application::GetSettings().GetStyleSettings().GetSymbolsStyle();
// If the style has been changed, throw away our cache of the older images
if ( nStyle != Application::GetSettings().GetStyleSettings().GetSymbolsStyle() )
@@ -697,7 +699,8 @@ static Image GetImageFromList_Impl( USHORT nImageId, BOOL bBig, BOOL bHighContra
if ( pList->HasImageAtPos( nImageId ) )
return pList->GetImage( nImageId );
else
- return GetOfficeImageFromList_Impl( nImageId, bBig, bHighContrast );
+ return Image();
+ //return GetOfficeImageFromList_Impl( nImageId, bBig, bHighContrast );
}
//****************************************************************************
@@ -724,7 +727,7 @@ String SvFileInformationManager::GetDescription_Impl( const INetURLObject& rObje
String sDescription;
String sExtension( rObject.getExtension() ), sURL( rObject.GetMainURL( INetURLObject::NO_DECODE ) );
- USHORT nResId = 0;
+ sal_uInt16 nResId = 0;
sal_Bool bShowExt = sal_False, bDetected = sal_False, bOnlyFile = sal_False;
sal_Bool bFolder = bDetectFolder ? CONTENT_HELPER::IsFolder( sURL ) : sal_False;
if ( !bFolder )
@@ -790,41 +793,41 @@ String SvFileInformationManager::GetDescription_Impl( const INetURLObject& rObje
Image SvFileInformationManager::GetImage( const INetURLObject& rObject, sal_Bool bBig )
{
- return GetImage( rObject, bBig, FALSE );
+ return GetImage( rObject, bBig, sal_False );
}
Image SvFileInformationManager::GetFileImage( const INetURLObject& rObject, sal_Bool bBig )
{
- return GetFileImage( rObject, bBig, FALSE );
+ return GetFileImage( rObject, bBig, sal_False );
}
Image SvFileInformationManager::GetImageNoDefault( const INetURLObject& rObject, sal_Bool bBig )
{
- return GetImageNoDefault( rObject, bBig, FALSE );
+ return GetImageNoDefault( rObject, bBig, sal_False );
}
Image SvFileInformationManager::GetFolderImage( const svtools::VolumeInfo& rInfo, sal_Bool bBig )
{
- return GetFolderImage( rInfo, bBig, FALSE );
+ return GetFolderImage( rInfo, bBig, sal_False );
}
Image SvFileInformationManager::GetImage( const INetURLObject& rObject, sal_Bool bBig, sal_Bool bHighContrast )
{
- USHORT nImage = GetImageId_Impl( rObject, sal_True );
+ sal_uInt16 nImage = GetImageId_Impl( rObject, sal_True );
DBG_ASSERT( nImage, "invalid ImageId" );
return GetImageFromList_Impl( nImage, bBig, bHighContrast );
}
Image SvFileInformationManager::GetFileImage( const INetURLObject& rObject, sal_Bool bBig, sal_Bool bHighContrast )
{
- USHORT nImage = GetImageId_Impl( rObject, sal_False );
+ sal_uInt16 nImage = GetImageId_Impl( rObject, sal_False );
DBG_ASSERT( nImage, "invalid ImageId" );
return GetImageFromList_Impl( nImage, bBig, bHighContrast );
}
Image SvFileInformationManager::GetImageNoDefault( const INetURLObject& rObject, sal_Bool bBig, sal_Bool bHighContrast )
{
- USHORT nImage = GetImageId_Impl( rObject, sal_True );
+ sal_uInt16 nImage = GetImageId_Impl( rObject, sal_True );
DBG_ASSERT( nImage, "invalid ImageId" );
if ( nImage == IMG_FILE )
@@ -835,7 +838,7 @@ Image SvFileInformationManager::GetImageNoDefault( const INetURLObject& rObject,
Image SvFileInformationManager::GetFolderImage( const svtools::VolumeInfo& rInfo, sal_Bool bBig, sal_Bool bHighContrast )
{
- USHORT nImage = IMG_FOLDER;
+ sal_uInt16 nImage = IMG_FOLDER;
DBG_ASSERT( nImage, "invalid ImageId" );
if ( rInfo.m_bIsRemote )
@@ -862,7 +865,7 @@ String SvFileInformationManager::GetFileDescription( const INetURLObject& rObjec
String SvFileInformationManager::GetFolderDescription( const svtools::VolumeInfo& rInfo )
{
- USHORT nResId = STR_DESCRIPTION_FOLDER;
+ sal_uInt16 nResId = STR_DESCRIPTION_FOLDER;
if ( rInfo.m_bIsRemote )
nResId = STR_DESCRIPTION_REMOTE_VOLUME;
else if ( rInfo.m_bIsFloppy )
diff --git a/svtools/source/misc/imagemgr.src b/svtools/source/misc/imagemgr.src
index 03e68b3b30b7..d00a8717f709 100644
--- a/svtools/source/misc/imagemgr.src
+++ b/svtools/source/misc/imagemgr.src
@@ -32,6 +32,21 @@
// images ********************************************************************
#define X_IMAGE_LIST \
+ IMG_IMPRESS ; \
+ IMG_CALC ; \
+ IMG_CALCTEMPLATE ; \
+ IMG_CHART ; \
+ IMG_IMPRESSTEMPLATE ; \
+ IMG_HTML ; \
+ IMG_MATH ; \
+ IMG_WRITER ; \
+ IMG_WRITERTEMPLATE ; \
+ IMG_MACROLIB ; \
+ IMG_GLOBAL_DOC ; \
+ IMG_DRAW ; \
+ IMG_DRAWTEMPLATE ; \
+ IMG_NEWFROMTEMPLATE ; \
+ IMG_DATABASE; \
IMG_WORKPLACE ; \
IMG_BITMAP ; \
IMG_EXCEL ; \
@@ -111,7 +126,7 @@ ImageList RID_SVTOOLS_IMAGELIST_BIG
};
IdCount =
{
- 68 ;
+ 83 ;
};
};
@@ -125,7 +140,7 @@ ImageList RID_SVTOOLS_IMAGELIST_SMALL
};
IdCount =
{
- 68;
+ 83;
};
};
@@ -139,7 +154,7 @@ ImageList RID_SVTOOLS_IMAGELIST_BIG_HIGHCONTRAST
};
IdCount =
{
- 68 ;
+ 83 ;
};
};
@@ -153,7 +168,7 @@ ImageList RID_SVTOOLS_IMAGELIST_SMALL_HIGHCONTRAST
};
IdCount =
{
- 68;
+ 83;
};
};
diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx
index 4378e0acd234..425eb0ac8481 100644
--- a/svtools/source/misc/imap.cxx
+++ b/svtools/source/misc/imap.cxx
@@ -52,7 +52,7 @@ DBG_NAME( ImageMap )
/******************************************************************************/
-UINT16 IMapObject::nActualTextEncoding = (UINT16) RTL_TEXTENCODING_DONTKNOW;
+sal_uInt16 IMapObject::nActualTextEncoding = (sal_uInt16) RTL_TEXTENCODING_DONTKNOW;
/******************************************************************************/
@@ -64,7 +64,7 @@ IMapObject::IMapObject()
}
IMapObject::IMapObject( const String& rURL, const String& rAltText, const String& rDesc,
- const String& rTarget, const String& rName, BOOL bURLActive )
+ const String& rTarget, const String& rName, sal_Bool bURLActive )
: aURL( rURL )
, aAltText( rAltText )
, aDesc( rDesc )
@@ -82,7 +82,7 @@ IMapObject::IMapObject( const String& rURL, const String& rAltText, const String
|*
\******************************************************************************/
-UINT16 IMapObject::GetVersion() const
+sal_uInt16 IMapObject::GetVersion() const
{
return IMAP_OBJ_VERSION;
}
@@ -101,7 +101,7 @@ void IMapObject::Write( SvStream& rOStm, const String& rBaseURL ) const
rOStm << GetType();
rOStm << GetVersion();
- rOStm << ( (UINT16) eEncoding );
+ rOStm << ( (sal_uInt16) eEncoding );
const ByteString aRelURL = ByteString( String(URIHelper::simpleNormalizedMakeRelative( rBaseURL, aURL )), eEncoding );
rOStm.WriteByteString( aRelURL );
@@ -192,7 +192,7 @@ Point IMapObject::GetLogPoint( const Point& rPixelPoint )
|*
\******************************************************************************/
-BOOL IMapObject::IsEqual( const IMapObject& rEqObj )
+sal_Bool IMapObject::IsEqual( const IMapObject& rEqObj )
{
return ( ( aURL == rEqObj.aURL ) &&
( aAltText == rEqObj.aAltText ) &&
@@ -213,8 +213,8 @@ IMapRectangleObject::IMapRectangleObject( const Rectangle& rRect,
const String& rDesc,
const String& rTarget,
const String& rName,
- BOOL bURLActive,
- BOOL bPixelCoords ) :
+ sal_Bool bURLActive,
+ sal_Bool bPixelCoords ) :
IMapObject ( rURL, rAltText, rDesc, rTarget, rName, bURLActive )
{
ImpConstruct( rRect, bPixelCoords );
@@ -227,7 +227,7 @@ IMapRectangleObject::IMapRectangleObject( const Rectangle& rRect,
|*
\******************************************************************************/
-void IMapRectangleObject::ImpConstruct( const Rectangle& rRect, BOOL bPixel )
+void IMapRectangleObject::ImpConstruct( const Rectangle& rRect, sal_Bool bPixel )
{
if ( bPixel )
aRect = Application::GetDefaultDevice()->PixelToLogic( rRect, MapMode( MAP_100TH_MM ) );
@@ -266,7 +266,7 @@ void IMapRectangleObject::ReadIMapObject( SvStream& rIStm )
|*
\******************************************************************************/
-UINT16 IMapRectangleObject::GetType() const
+sal_uInt16 IMapRectangleObject::GetType() const
{
return IMAP_OBJ_RECTANGLE;
}
@@ -278,7 +278,7 @@ UINT16 IMapRectangleObject::GetType() const
|*
\******************************************************************************/
-BOOL IMapRectangleObject::IsHit( const Point& rPoint ) const
+sal_Bool IMapRectangleObject::IsHit( const Point& rPoint ) const
{
return aRect.IsInside( rPoint );
}
@@ -290,7 +290,7 @@ BOOL IMapRectangleObject::IsHit( const Point& rPoint ) const
|*
\******************************************************************************/
-Rectangle IMapRectangleObject::GetRectangle( BOOL bPixelCoords ) const
+Rectangle IMapRectangleObject::GetRectangle( sal_Bool bPixelCoords ) const
{
Rectangle aNewRect;
@@ -330,7 +330,7 @@ void IMapRectangleObject::Scale( const Fraction& rFracX, const Fraction& rFracY
|*
\******************************************************************************/
-BOOL IMapRectangleObject::IsEqual( const IMapRectangleObject& rEqObj )
+sal_Bool IMapRectangleObject::IsEqual( const IMapRectangleObject& rEqObj )
{
return ( IMapObject::IsEqual( rEqObj ) && ( aRect == rEqObj.aRect ) );
}
@@ -340,14 +340,14 @@ BOOL IMapRectangleObject::IsEqual( const IMapRectangleObject& rEqObj )
/******************************************************************************/
/******************************************************************************/
-IMapCircleObject::IMapCircleObject( const Point& rCenter, ULONG nCircleRadius,
+IMapCircleObject::IMapCircleObject( const Point& rCenter, sal_uLong nCircleRadius,
const String& rURL,
const String& rAltText,
const String& rDesc,
const String& rTarget,
const String& rName,
- BOOL bURLActive,
- BOOL bPixelCoords ) :
+ sal_Bool bURLActive,
+ sal_Bool bPixelCoords ) :
IMapObject ( rURL, rAltText, rDesc, rTarget, rName, bURLActive )
{
ImpConstruct( rCenter, nCircleRadius, bPixelCoords );
@@ -360,7 +360,7 @@ IMapCircleObject::IMapCircleObject( const Point& rCenter, ULONG nCircleRadius,
|*
\******************************************************************************/
-void IMapCircleObject::ImpConstruct( const Point& rCenter, ULONG nRad, BOOL bPixel )
+void IMapCircleObject::ImpConstruct( const Point& rCenter, sal_uLong nRad, sal_Bool bPixel )
{
if ( bPixel )
{
@@ -385,7 +385,7 @@ void IMapCircleObject::ImpConstruct( const Point& rCenter, ULONG nRad, BOOL bPix
void IMapCircleObject::WriteIMapObject( SvStream& rOStm ) const
{
- UINT32 nTmp = nRadius;
+ sal_uInt32 nTmp = nRadius;
rOStm << aCenter;
rOStm << nTmp;
@@ -400,7 +400,7 @@ void IMapCircleObject::WriteIMapObject( SvStream& rOStm ) const
void IMapCircleObject::ReadIMapObject( SvStream& rIStm )
{
- UINT32 nTmp;
+ sal_uInt32 nTmp;
rIStm >> aCenter;
rIStm >> nTmp;
@@ -415,7 +415,7 @@ void IMapCircleObject::ReadIMapObject( SvStream& rIStm )
|*
\******************************************************************************/
-UINT16 IMapCircleObject::GetType() const
+sal_uInt16 IMapCircleObject::GetType() const
{
return IMAP_OBJ_CIRCLE;
}
@@ -427,15 +427,15 @@ UINT16 IMapCircleObject::GetType() const
|*
\******************************************************************************/
-BOOL IMapCircleObject::IsHit( const Point& rPoint ) const
+sal_Bool IMapCircleObject::IsHit( const Point& rPoint ) const
{
const Point aPoint( aCenter - rPoint );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
- if ( (ULONG) sqrt( (double) aPoint.X() * aPoint.X() +
+ if ( (sal_uLong) sqrt( (double) aPoint.X() * aPoint.X() +
aPoint.Y() * aPoint.Y() ) <= nRadius )
{
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -448,7 +448,7 @@ BOOL IMapCircleObject::IsHit( const Point& rPoint ) const
|*
\******************************************************************************/
-Point IMapCircleObject::GetCenter( BOOL bPixelCoords ) const
+Point IMapCircleObject::GetCenter( sal_Bool bPixelCoords ) const
{
Point aNewPoint;
@@ -467,9 +467,9 @@ Point IMapCircleObject::GetCenter( BOOL bPixelCoords ) const
|*
\******************************************************************************/
-ULONG IMapCircleObject::GetRadius( BOOL bPixelCoords ) const
+sal_uLong IMapCircleObject::GetRadius( sal_Bool bPixelCoords ) const
{
- ULONG nNewRadius;
+ sal_uLong nNewRadius;
if ( bPixelCoords )
nNewRadius = Application::GetDefaultDevice()->LogicToPixel( Size( nRadius, 0 ), MapMode( MAP_100TH_MM ) ).Width();
@@ -523,7 +523,7 @@ void IMapCircleObject::Scale( const Fraction& rFracX, const Fraction& rFracY )
|*
\******************************************************************************/
-BOOL IMapCircleObject::IsEqual( const IMapCircleObject& rEqObj )
+sal_Bool IMapCircleObject::IsEqual( const IMapCircleObject& rEqObj )
{
return ( IMapObject::IsEqual( rEqObj ) &&
( aCenter == rEqObj.aCenter ) &&
@@ -540,10 +540,10 @@ IMapPolygonObject::IMapPolygonObject( const Polygon& rPoly,
const String& rDesc,
const String& rTarget,
const String& rName,
- BOOL bURLActive,
- BOOL bPixelCoords ) :
+ sal_Bool bURLActive,
+ sal_Bool bPixelCoords ) :
IMapObject ( rURL, rAltText, rDesc, rTarget, rName, bURLActive ),
- bEllipse ( FALSE )
+ bEllipse ( sal_False )
{
ImpConstruct( rPoly, bPixelCoords );
}
@@ -555,7 +555,7 @@ IMapPolygonObject::IMapPolygonObject( const Polygon& rPoly,
|*
\******************************************************************************/
-void IMapPolygonObject::ImpConstruct( const Polygon& rPoly, BOOL bPixel )
+void IMapPolygonObject::ImpConstruct( const Polygon& rPoly, sal_Bool bPixel )
{
if ( bPixel )
aPoly = Application::GetDefaultDevice()->PixelToLogic( rPoly, MapMode( MAP_100TH_MM ) );
@@ -603,7 +603,7 @@ void IMapPolygonObject::ReadIMapObject( SvStream& rIStm )
|*
\******************************************************************************/
-UINT16 IMapPolygonObject::GetType() const
+sal_uInt16 IMapPolygonObject::GetType() const
{
return IMAP_OBJ_POLYGON;
}
@@ -615,7 +615,7 @@ UINT16 IMapPolygonObject::GetType() const
|*
\******************************************************************************/
-BOOL IMapPolygonObject::IsHit( const Point& rPoint ) const
+sal_Bool IMapPolygonObject::IsHit( const Point& rPoint ) const
{
return aPoly.IsInside( rPoint );
}
@@ -627,7 +627,7 @@ BOOL IMapPolygonObject::IsHit( const Point& rPoint ) const
|*
\******************************************************************************/
-Polygon IMapPolygonObject::GetPolygon( BOOL bPixelCoords ) const
+Polygon IMapPolygonObject::GetPolygon( sal_Bool bPixelCoords ) const
{
Polygon aNewPoly;
@@ -650,7 +650,7 @@ void IMapPolygonObject::SetExtraEllipse( const Rectangle& rEllipse )
{
if ( aPoly.GetSize() )
{
- bEllipse = TRUE;
+ bEllipse = sal_True;
aEllipse = rEllipse;
}
}
@@ -664,9 +664,9 @@ void IMapPolygonObject::SetExtraEllipse( const Rectangle& rEllipse )
void IMapPolygonObject::Scale( const Fraction& rFracX, const Fraction& rFracY )
{
- USHORT nCount = aPoly.GetSize();
+ sal_uInt16 nCount = aPoly.GetSize();
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
Point aScaledPt( aPoly[ i ] );
@@ -700,30 +700,30 @@ void IMapPolygonObject::Scale( const Fraction& rFracX, const Fraction& rFracY )
|*
\******************************************************************************/
-BOOL IMapPolygonObject::IsEqual( const IMapPolygonObject& rEqObj )
+sal_Bool IMapPolygonObject::IsEqual( const IMapPolygonObject& rEqObj )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( IMapObject::IsEqual( rEqObj ) )
{
const Polygon& rEqPoly = rEqObj.aPoly;
- const USHORT nCount = aPoly.GetSize();
- const USHORT nEqCount = rEqPoly.GetSize();
- BOOL bDifferent = FALSE;
+ const sal_uInt16 nCount = aPoly.GetSize();
+ const sal_uInt16 nEqCount = rEqPoly.GetSize();
+ sal_Bool bDifferent = sal_False;
if ( nCount == nEqCount )
{
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
if ( aPoly[ i ] != rEqPoly[ i ] )
{
- bDifferent = TRUE;
+ bDifferent = sal_True;
break;
}
}
if ( !bDifferent )
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -758,9 +758,9 @@ ImageMap::ImageMap( const ImageMap& rImageMap )
{
DBG_CTOR( ImageMap, NULL );
- USHORT nCount = rImageMap.GetIMapObjectCount();
+ sal_uInt16 nCount = rImageMap.GetIMapObjectCount();
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
IMapObject* pCopyObj = rImageMap.GetIMapObject( i );
@@ -831,11 +831,11 @@ void ImageMap::ClearImageMap()
ImageMap& ImageMap::operator=( const ImageMap& rImageMap )
{
- USHORT nCount = rImageMap.GetIMapObjectCount();
+ sal_uInt16 nCount = rImageMap.GetIMapObjectCount();
ClearImageMap();
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
IMapObject* pCopyObj = rImageMap.GetIMapObject( i );
@@ -870,17 +870,17 @@ ImageMap& ImageMap::operator=( const ImageMap& rImageMap )
|*
\******************************************************************************/
-BOOL ImageMap::operator==( const ImageMap& rImageMap )
+sal_Bool ImageMap::operator==( const ImageMap& rImageMap )
{
- const USHORT nCount = (USHORT) maList.Count();
- const USHORT nEqCount = rImageMap.GetIMapObjectCount();
- BOOL bRet = FALSE;
+ const sal_uInt16 nCount = (sal_uInt16) maList.Count();
+ const sal_uInt16 nEqCount = rImageMap.GetIMapObjectCount();
+ sal_Bool bRet = sal_False;
if ( nCount == nEqCount )
{
- BOOL bDifferent = ( aName != rImageMap.aName );
+ sal_Bool bDifferent = ( aName != rImageMap.aName );
- for ( USHORT i = 0; ( i < nCount ) && !bDifferent; i++ )
+ for ( sal_uInt16 i = 0; ( i < nCount ) && !bDifferent; i++ )
{
IMapObject* pObj = (IMapObject*) maList.GetObject( i );
IMapObject* pEqObj = rImageMap.GetIMapObject( i );
@@ -892,21 +892,21 @@ BOOL ImageMap::operator==( const ImageMap& rImageMap )
case( IMAP_OBJ_RECTANGLE ):
{
if ( !( (IMapRectangleObject*) pObj )->IsEqual( *(IMapRectangleObject*) pEqObj ) )
- bDifferent = TRUE;
+ bDifferent = sal_True;
}
break;
case( IMAP_OBJ_CIRCLE ):
{
if ( !( (IMapCircleObject*) pObj )->IsEqual( *(IMapCircleObject*) pEqObj ) )
- bDifferent = TRUE;
+ bDifferent = sal_True;
}
break;
case( IMAP_OBJ_POLYGON ):
{
if ( !( (IMapPolygonObject*) pObj )->IsEqual( *(IMapPolygonObject*) pEqObj ) )
- bDifferent = TRUE;
+ bDifferent = sal_True;
}
break;
@@ -915,11 +915,11 @@ BOOL ImageMap::operator==( const ImageMap& rImageMap )
}
}
else
- bDifferent = TRUE;
+ bDifferent = sal_True;
}
if ( !bDifferent )
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -932,7 +932,7 @@ BOOL ImageMap::operator==( const ImageMap& rImageMap )
|*
\******************************************************************************/
-BOOL ImageMap::operator!=( const ImageMap& rImageMap )
+sal_Bool ImageMap::operator!=( const ImageMap& rImageMap )
{
return !( *this == rImageMap );
}
@@ -944,7 +944,7 @@ BOOL ImageMap::operator!=( const ImageMap& rImageMap )
|*
\******************************************************************************/
-UINT16 ImageMap::GetVersion() const
+sal_uInt16 ImageMap::GetVersion() const
{
return IMAGE_MAP_VERSION;
}
@@ -987,7 +987,7 @@ void ImageMap::InsertIMapObject( const IMapObject& rIMapObject )
IMapObject* ImageMap::GetHitIMapObject( const Size& rTotalSize,
const Size& rDisplaySize,
const Point& rRelHitPoint,
- ULONG nFlags )
+ sal_uLong nFlags )
{
Point aRelPoint( rTotalSize.Width() * rRelHitPoint.X() / rDisplaySize.Width(),
rTotalSize.Height() * rRelHitPoint.Y() / rDisplaySize.Height() );
@@ -1026,9 +1026,9 @@ IMapObject* ImageMap::GetHitIMapObject( const Size& rTotalSize,
Rectangle ImageMap::GetBoundRect() const
{
Rectangle aBoundRect;
- ULONG nCount = maList.Count();
+ sal_uLong nCount = maList.Count();
- for ( ULONG i = 0; i < nCount; i++ )
+ for ( sal_uLong i = 0; i < nCount; i++ )
aBoundRect.Union( ( (IMapObject*) maList.GetObject( i ) )->GetBoundRect() );
return aBoundRect;
@@ -1043,9 +1043,9 @@ Rectangle ImageMap::GetBoundRect() const
void ImageMap::Scale( const Fraction& rFracX, const Fraction& rFracY )
{
- USHORT nCount = (USHORT) maList.Count();
+ sal_uInt16 nCount = (sal_uInt16) maList.Count();
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
IMapObject* pObj = GetIMapObject( i );
@@ -1079,9 +1079,9 @@ void ImageMap::Scale( const Fraction& rFracX, const Fraction& rFracY )
void ImageMap::ImpWriteImageMap( SvStream& rOStm, const String& rBaseURL ) const
{
IMapObject* pObj;
- USHORT nCount = (USHORT) maList.Count();
+ sal_uInt16 nCount = (sal_uInt16) maList.Count();
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
pObj = (IMapObject*) maList.GetObject( i );
pObj->Write( rOStm, rBaseURL );
@@ -1095,12 +1095,12 @@ void ImageMap::ImpWriteImageMap( SvStream& rOStm, const String& rBaseURL ) const
|*
\******************************************************************************/
-void ImageMap::ImpReadImageMap( SvStream& rIStm, USHORT nCount, const String& rBaseURL )
+void ImageMap::ImpReadImageMap( SvStream& rIStm, sal_uInt16 nCount, const String& rBaseURL )
{
// neue Objekte einlesen
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
- UINT16 nType;
+ sal_uInt16 nType;
rIStm >> nType;
rIStm.SeekRel( -2 );
@@ -1149,8 +1149,8 @@ void ImageMap::Write( SvStream& rOStm, const String& rBaseURL ) const
IMapCompat* pCompat;
String aImageName( GetName() );
String aDummy;
- USHORT nOldFormat = rOStm.GetNumberFormatInt();
- UINT16 nCount = (UINT16) GetIMapObjectCount();
+ sal_uInt16 nOldFormat = rOStm.GetNumberFormatInt();
+ sal_uInt16 nCount = (sal_uInt16) GetIMapObjectCount();
const rtl_TextEncoding eEncoding = gsl_getSystemTextEncoding();
rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
@@ -1185,8 +1185,8 @@ void ImageMap::Read( SvStream& rIStm, const String& rBaseURL )
{
ByteString aString;
char cMagic[6];
- USHORT nOldFormat = rIStm.GetNumberFormatInt();
- UINT16 nCount;
+ sal_uInt16 nOldFormat = rIStm.GetNumberFormatInt();
+ sal_uInt16 nCount;
rIStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
rIStm.Read( cMagic, sizeof( cMagic ) );
diff --git a/svtools/source/misc/imap2.cxx b/svtools/source/misc/imap2.cxx
index 587a31d4f098..dedfb22532cb 100644
--- a/svtools/source/misc/imap2.cxx
+++ b/svtools/source/misc/imap2.cxx
@@ -212,9 +212,9 @@ void IMapCircleObject::WriteNCSA( SvStream& rOStm, const String& rBaseURL ) cons
void IMapPolygonObject::WriteCERN( SvStream& rOStm, const String& rBaseURL ) const
{
ByteString aStr( "polygon " );
- const USHORT nCount = aPoly.GetSize();
+ const sal_uInt16 nCount = aPoly.GetSize();
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
AppendCERNCoords( aPoly[ i ], aStr );
AppendCERNURL( aStr, rBaseURL );
@@ -232,11 +232,11 @@ void IMapPolygonObject::WriteCERN( SvStream& rOStm, const String& rBaseURL ) co
void IMapPolygonObject::WriteNCSA( SvStream& rOStm, const String& rBaseURL ) const
{
ByteString aStr( "poly " );
- const USHORT nCount = Min( aPoly.GetSize(), (USHORT) 100 );
+ const sal_uInt16 nCount = Min( aPoly.GetSize(), (sal_uInt16) 100 );
AppendNCSAURL( aStr, rBaseURL );
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
AppendNCSACoords( aPoly[ i ], aStr );
rOStm.WriteLine( aStr );
@@ -253,7 +253,7 @@ void IMapPolygonObject::WriteNCSA( SvStream& rOStm, const String& rBaseURL ) co
|*
\******************************************************************************/
-void ImageMap::Write( SvStream& rOStm, ULONG nFormat, const String& rBaseURL ) const
+void ImageMap::Write( SvStream& rOStm, sal_uLong nFormat, const String& rBaseURL ) const
{
switch( nFormat )
{
@@ -276,9 +276,9 @@ void ImageMap::Write( SvStream& rOStm, ULONG nFormat, const String& rBaseURL ) c
void ImageMap::ImpWriteCERN( SvStream& rOStm, const String& rBaseURL ) const
{
IMapObject* pObj;
- USHORT nCount = (USHORT) maList.Count();
+ sal_uInt16 nCount = (sal_uInt16) maList.Count();
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
pObj = GetIMapObject( i );
@@ -312,9 +312,9 @@ void ImageMap::ImpWriteCERN( SvStream& rOStm, const String& rBaseURL ) const
void ImageMap::ImpWriteNCSA( SvStream& rOStm, const String& rBaseURL ) const
{
IMapObject* pObj;
- USHORT nCount = (USHORT) maList.Count();
+ sal_uInt16 nCount = (sal_uInt16) maList.Count();
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
{
pObj = GetIMapObject( i );
@@ -345,9 +345,9 @@ void ImageMap::ImpWriteNCSA( SvStream& rOStm, const String& rBaseURL ) const
|*
\******************************************************************************/
-ULONG ImageMap::Read( SvStream& rIStm, ULONG nFormat, const String& rBaseURL )
+sal_uLong ImageMap::Read( SvStream& rIStm, sal_uLong nFormat, const String& rBaseURL )
{
- ULONG nRet = IMAP_ERR_FORMAT;
+ sal_uLong nRet = IMAP_ERR_FORMAT;
if ( nFormat == IMAP_FORMAT_DETECT )
nFormat = ImpDetectFormat( rIStm );
@@ -375,7 +375,7 @@ ULONG ImageMap::Read( SvStream& rIStm, ULONG nFormat, const String& rBaseURL )
|*
\******************************************************************************/
-ULONG ImageMap::ImpReadCERN( SvStream& rIStm, const String& rBaseURL )
+sal_uLong ImageMap::ImpReadCERN( SvStream& rIStm, const String& rBaseURL )
{
ByteString aStr;
@@ -438,11 +438,11 @@ void ImageMap::ImpReadCERNLine( const ByteString& rLine, const String& rBaseURL
}
else if ( ( aToken == "polygon" ) || ( aToken == "poly" ) )
{
- const USHORT nCount = aStr.GetTokenCount( '(' ) - 1;
+ const sal_uInt16 nCount = aStr.GetTokenCount( '(' ) - 1;
Polygon aPoly( nCount );
String aURL;
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
aPoly[ i ] = ImpReadCERNCoords( &pStr );
aURL = ImpReadCERNURL( &pStr, rBaseURL );
@@ -553,7 +553,7 @@ String ImageMap::ImpReadCERNURL( const char** ppStr, const String& rBaseURL )
|*
\******************************************************************************/
-ULONG ImageMap::ImpReadNCSA( SvStream& rIStm, const String& rBaseURL )
+sal_uLong ImageMap::ImpReadNCSA( SvStream& rIStm, const String& rBaseURL )
{
ByteString aStr;
@@ -618,11 +618,11 @@ void ImageMap::ImpReadNCSALine( const ByteString& rLine, const String& rBaseURL
}
else if ( aToken == "poly" )
{
- const USHORT nCount = aStr.GetTokenCount( ',' ) - 1;
+ const sal_uInt16 nCount = aStr.GetTokenCount( ',' ) - 1;
const String aURL( ImpReadNCSAURL( &pStr, rBaseURL ) );
Polygon aPoly( nCount );
- for ( USHORT i = 0; i < nCount; i++ )
+ for ( sal_uInt16 i = 0; i < nCount; i++ )
aPoly[ i ] = ImpReadNCSACoords( &pStr );
IMapPolygonObject* pObj = new IMapPolygonObject( aPoly, aURL, String(), String(), String(), String() );
@@ -708,10 +708,10 @@ Point ImageMap::ImpReadNCSACoords( const char** ppStr )
|*
\******************************************************************************/
-ULONG ImageMap::ImpDetectFormat( SvStream& rIStm )
+sal_uLong ImageMap::ImpDetectFormat( SvStream& rIStm )
{
- ULONG nPos = rIStm.Tell();
- ULONG nRet = IMAP_FORMAT_BIN;
+ sal_uLong nPos = rIStm.Tell();
+ sal_uLong nRet = IMAP_FORMAT_BIN;
char cMagic[6];
rIStm.Read( cMagic, sizeof( cMagic ) );
diff --git a/svtools/source/misc/imap3.cxx b/svtools/source/misc/imap3.cxx
index 76763ae422f2..49d5f4c5984e 100644
--- a/svtools/source/misc/imap3.cxx
+++ b/svtools/source/misc/imap3.cxx
@@ -40,7 +40,7 @@
|*
\******************************************************************************/
-IMapCompat::IMapCompat( SvStream& rStm, const USHORT nStreamMode ) :
+IMapCompat::IMapCompat( SvStream& rStm, const sal_uInt16 nStreamMode ) :
pRWStm ( &rStm ),
nStmMode ( nStreamMode )
{
@@ -56,7 +56,7 @@ IMapCompat::IMapCompat( SvStream& rStm, const USHORT nStreamMode ) :
}
else
{
- UINT32 nTotalSizeTmp;
+ sal_uInt32 nTotalSizeTmp;
*pRWStm >> nTotalSizeTmp;
nTotalSize = nTotalSizeTmp;
nCompatPos = pRWStm->Tell();
@@ -77,15 +77,15 @@ IMapCompat::~IMapCompat()
{
if ( nStmMode == STREAM_WRITE )
{
- const ULONG nEndPos = pRWStm->Tell();
+ const sal_uLong nEndPos = pRWStm->Tell();
pRWStm->Seek( nCompatPos );
- *pRWStm << (UINT32) ( nEndPos - nTotalSize );
+ *pRWStm << (sal_uInt32) ( nEndPos - nTotalSize );
pRWStm->Seek( nEndPos );
}
else
{
- const ULONG nReadSize = pRWStm->Tell() - nCompatPos;
+ const sal_uLong nReadSize = pRWStm->Tell() - nCompatPos;
if ( nTotalSize > nReadSize )
pRWStm->SeekRel( nTotalSize - nReadSize );
diff --git a/svtools/source/misc/itemdel.cxx b/svtools/source/misc/itemdel.cxx
index a161571daae7..676ae5383e63 100644
--- a/svtools/source/misc/itemdel.cxx
+++ b/svtools/source/misc/itemdel.cxx
@@ -124,7 +124,7 @@ void DeleteOnIdleItems()
= ImpSvtData::GetSvtData().pItemDesruptList;
if ( rpList )
{
- USHORT n;
+ sal_uInt16 n;
while ( 0 != ( n = rpList->Count() ) )
// Remove ist implizit im Dtor
delete rpList->GetObject( n-1 );
diff --git a/svtools/source/misc/langtab.cxx b/svtools/source/misc/langtab.cxx
index d1ff94572a99..61d397afbec9 100644..100755
--- a/svtools/source/misc/langtab.cxx
+++ b/svtools/source/misc/langtab.cxx
@@ -51,7 +51,7 @@ using namespace ::com::sun::star;
SVT_DLLPUBLIC const String ApplyLreOrRleEmbedding( const String &rText )
{
- const USHORT nLen = rText.Len();
+ const sal_uInt16 nLen = rText.Len();
if (nLen == 0)
return String();
@@ -77,7 +77,7 @@ SVT_DLLPUBLIC const String ApplyLreOrRleEmbedding( const String &rText )
// Thus we can avoid to check every character of the text.
bool bFound = false;
bool bIsRtlText = false;
- for (USHORT i = 0; i < nLen && !bFound; ++i)
+ for (sal_uInt16 i = 0; i < nLen && !bFound; ++i)
{
sal_Int16 nDirection = rCharClass.getCharacterDirection( rText, i );
switch (nDirection)
diff --git a/svtools/source/misc/svtdata.cxx b/svtools/source/misc/svtdata.cxx
index 495929bd89dc..f4d959ec8793 100644
--- a/svtools/source/misc/svtdata.cxx
+++ b/svtools/source/misc/svtdata.cxx
@@ -71,8 +71,8 @@ ImpSvtData & ImpSvtData::GetSvtData()
return *static_cast<ImpSvtData *>(*pAppData);
}
-SvtResId::SvtResId(USHORT nId, const ::com::sun::star::lang::Locale aLocale):
+SvtResId::SvtResId(sal_uInt16 nId, const ::com::sun::star::lang::Locale aLocale):
ResId(nId, *ImpSvtData::GetSvtData().GetResMgr(aLocale)) {}
-SvtResId::SvtResId(USHORT nId): ResId(nId, *ImpSvtData::GetSvtData().GetResMgr()) {}
+SvtResId::SvtResId(sal_uInt16 nId): ResId(nId, *ImpSvtData::GetSvtData().GetResMgr()) {}
diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx
index a6c3617b50a7..3c118445c6f4 100644
--- a/svtools/source/misc/templatefoldercache.cxx
+++ b/svtools/source/misc/templatefoldercache.cxx
@@ -116,8 +116,8 @@ namespace svt
//=====================================================================
struct TemplateContent;
typedef ::std::vector< ::vos::ORef< TemplateContent > > TemplateFolderContent;
- typedef TemplateFolderContent::const_iterator ConstFolderIterator;
- typedef TemplateFolderContent::iterator FolderIterator;
+ typedef TemplateFolderContent::const_iterator ConstFolderIterator;
+ typedef TemplateFolderContent::iterator FolderIterator;
/** a struct describing one content in one of the template dirs (or at least it's relevant aspects)
*/
@@ -706,15 +706,18 @@ namespace svt
m_aCurrentState.swap( aTemplateFolderContent );
// the template directories from the config
- String aDirs = SvtPathOptions().GetTemplatePath();
+ const SvtPathOptions aPathOptions;
+ String aDirs = aPathOptions.GetTemplatePath();
sal_uInt16 nDirs = aDirs.GetTokenCount( ';' );
m_aCurrentState.reserve( nDirs );
// loop through all the root-level template folders
for ( sal_uInt16 i=0; i<nDirs; ++i)
{
+ String sTemplatePath( aDirs.GetToken( i, ';' ) );
+ sTemplatePath = aPathOptions.ExpandMacros( sTemplatePath );
// create a new entry
- m_aCurrentState.push_back( new TemplateContent( INetURLObject( aDirs.GetToken( i, ';' ) ) ) );
+ m_aCurrentState.push_back( new TemplateContent( INetURLObject( sTemplatePath ) ) );
TemplateFolderContent::iterator aCurrentRoot = m_aCurrentState.end();
--aCurrentRoot;
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index 4e245ca50520..fcd519398c8e 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/transfer.cxx
@@ -432,7 +432,7 @@ Any SAL_CALL TransferableHelper::getTransferData( const DataFlavor& rFlavor ) th
SvMemoryStream aDstStm( 65535, 65535 );
// taking wmf without file header
- if ( ConvertGDIMetaFileToWMF( aMtf, aDstStm, NULL, FALSE ) )
+ if ( ConvertGDIMetaFileToWMF( aMtf, aDstStm, NULL, sal_False ) )
{
maAny <<= ( aSeq = Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( aDstStm.GetData() ),
aDstStm.Seek( STREAM_SEEK_TO_END ) ) );
@@ -936,7 +936,7 @@ sal_Bool TransferableHelper::SetINetBookmark( const INetBookmark& rBmk,
rFDesc1.dwFlags = FD_LINKUI;
ByteString aStr( rBmk.GetDescription(), eSysCSet );
- for( USHORT nChar = 0; nChar < aStr.Len(); ++nChar )
+ for( sal_uInt16 nChar = 0; nChar < aStr.Len(); ++nChar )
if( strchr( "\\/:*?\"<>|", aStr.GetChar( nChar ) ) )
aStr.Erase( nChar--, 1 );
@@ -1844,7 +1844,7 @@ sal_Bool TransferableDataHelper::GetGDIMetaFile( const DataFlavor& rFlavor, GDIM
if( GraphicConverter::Import( *xStm, aGraphic ) == ERRCODE_NONE )
{
rMtf = aGraphic.GetGDIMetaFile();
- bRet = TRUE;
+ bRet = sal_True;
}
}
@@ -1858,7 +1858,7 @@ sal_Bool TransferableDataHelper::GetGDIMetaFile( const DataFlavor& rFlavor, GDIM
if( GraphicConverter::Import( *xStm, aGraphic ) == ERRCODE_NONE )
{
rMtf = aGraphic.GetGDIMetaFile();
- bRet = TRUE;
+ bRet = sal_True;
}
}
diff --git a/svtools/source/misc/transfer2.cxx b/svtools/source/misc/transfer2.cxx
index ea1b0174465e..841ac4d38135 100644
--- a/svtools/source/misc/transfer2.cxx
+++ b/svtools/source/misc/transfer2.cxx
@@ -434,7 +434,7 @@ sal_Bool TransferDataContainer::GetData( const
TDataCntnrEntryList::iterator aIter( pImpl->aFmtList.begin() ),
aEnd( pImpl->aFmtList.end() );
sal_Bool bFnd = sal_False;
- ULONG nFmtId = SotExchange::GetFormat( rFlavor );
+ sal_uLong nFmtId = SotExchange::GetFormat( rFlavor );
// test first the list
for( ; aIter != aEnd; ++aIter )
@@ -500,8 +500,8 @@ void TransferDataContainer::CopyINetBookmark( const INetBookmark& rBkmk )
// -----------------------------------------------------------------------------
-void TransferDataContainer::CopyAnyData( ULONG nFormatId,
- const sal_Char* pData, ULONG nLen )
+void TransferDataContainer::CopyAnyData( sal_uLong nFormatId,
+ const sal_Char* pData, sal_uLong nLen )
{
if( nLen )
{
@@ -518,7 +518,7 @@ void TransferDataContainer::CopyAnyData( ULONG nFormatId,
// -----------------------------------------------------------------------------
-void TransferDataContainer::CopyByteString( ULONG nFormatId,
+void TransferDataContainer::CopyByteString( sal_uLong nFormatId,
const ByteString& rStr )
{
CopyAnyData( nFormatId, rStr.GetBuffer(), rStr.Len() );
@@ -568,7 +568,7 @@ void TransferDataContainer::CopyGraphic( const Graphic& rGrf )
// -----------------------------------------------------------------------------
-void TransferDataContainer::CopyString( USHORT nFmt, const String& rStr )
+void TransferDataContainer::CopyString( sal_uInt16 nFmt, const String& rStr )
{
if( rStr.Len() )
{
@@ -590,7 +590,7 @@ void TransferDataContainer::CopyString( const String& rStr )
// -----------------------------------------------------------------------------
-void TransferDataContainer::CopyAny( USHORT nFmt,
+void TransferDataContainer::CopyAny( sal_uInt16 nFmt,
const ::com::sun::star::uno::Any& rAny )
{
TDataCntnrEntry_Impl aEntry;
diff --git a/svtools/source/misc/unitconv.cxx b/svtools/source/misc/unitconv.cxx
index 612bcb4f0221..fa92a6ecb0be 100644
--- a/svtools/source/misc/unitconv.cxx
+++ b/svtools/source/misc/unitconv.cxx
@@ -37,7 +37,7 @@
// -----------------------------------------------------------------------
-void SetFieldUnit( MetricField& rField, FieldUnit eUnit, BOOL bAll )
+void SetFieldUnit( MetricField& rField, FieldUnit eUnit, sal_Bool bAll )
{
sal_Int64 nFirst = rField.Denormalize( rField.GetFirst( FUNIT_TWIP ) );
sal_Int64 nLast = rField.Denormalize( rField.GetLast( FUNIT_TWIP ) );
@@ -94,7 +94,7 @@ void SetFieldUnit( MetricField& rField, FieldUnit eUnit, BOOL bAll )
// -----------------------------------------------------------------------
-void SetFieldUnit( MetricBox& rBox, FieldUnit eUnit, BOOL bAll )
+void SetFieldUnit( MetricBox& rBox, FieldUnit eUnit, sal_Bool bAll )
{
sal_Int64 nMin = rBox.Denormalize( rBox.GetMin( FUNIT_TWIP ) );
sal_Int64 nMax = rBox.Denormalize( rBox.GetMax( FUNIT_TWIP ) );
@@ -350,7 +350,7 @@ long ConvertValueToUnit( long nVal, SfxMapUnit eUnit )
// -----------------------------------------------------------------------
-long CalcToPoint( long nIn, SfxMapUnit eUnit, USHORT nFaktor )
+long CalcToPoint( long nIn, SfxMapUnit eUnit, sal_uInt16 nFaktor )
{
DBG_ASSERT( eUnit == SFX_MAPUNIT_TWIP ||
eUnit == SFX_MAPUNIT_100TH_MM ||
@@ -722,8 +722,8 @@ long TransformMetric( long nVal, FieldUnit aOld, FieldUnit aNew )
return nVal;
}
- USHORT nOld = 0;
- USHORT nNew = 0;
+ sal_uInt16 nOld = 0;
+ sal_uInt16 nNew = 0;
switch ( aOld )
{
diff --git a/svtools/source/misc/xwindowitem.cxx b/svtools/source/misc/xwindowitem.cxx
index a382d8293617..3f499dca0a96 100755..100644
--- a/svtools/source/misc/xwindowitem.cxx
+++ b/svtools/source/misc/xwindowitem.cxx
@@ -46,7 +46,7 @@ XWindowItem::XWindowItem() :
}
-XWindowItem::XWindowItem( USHORT nWhichId, Window * pWin ) :
+XWindowItem::XWindowItem( sal_uInt16 nWhichId, Window * pWin ) :
SfxPoolItem( nWhichId )
{
if (pWin)
@@ -58,7 +58,7 @@ XWindowItem::XWindowItem( USHORT nWhichId, Window * pWin ) :
}
-XWindowItem::XWindowItem( USHORT nWhichId, uno::Reference< awt::XWindow > & rxWin ) :
+XWindowItem::XWindowItem( sal_uInt16 nWhichId, uno::Reference< awt::XWindow > & rxWin ) :
SfxPoolItem( nWhichId ),
m_xWin( rxWin )
{
diff --git a/svtools/source/plugapp/ttprops.cxx b/svtools/source/plugapp/ttprops.cxx
index 2ae41a4c50c1..d80f643cff71 100644
--- a/svtools/source/plugapp/ttprops.cxx
+++ b/svtools/source/plugapp/ttprops.cxx
@@ -34,7 +34,7 @@
TYPEINIT1( TTProperties, ApplicationProperty )
-BOOL TTProperties::RequestProperty( USHORT nRequest )
+sal_Bool TTProperties::RequestProperty( sal_uInt16 nRequest )
{
if ( (( nRequest & TT_PR_ONCE ) == 0) || (nDonePRs & (nRequest & 0x0ff)) == 0 )
{
@@ -43,17 +43,17 @@ BOOL TTProperties::RequestProperty( USHORT nRequest )
GetpApp()->Property( *this );
return nActualPR == 0;
}
- return TRUE;
+ return sal_True;
}
-BOOL TTProperties::GetSlots()
+sal_Bool TTProperties::GetSlots()
{
RequestProperty( TT_PR_SLOTS );
return HasSlots();
}
-USHORT TTProperties::ExecuteFunction( USHORT nSID, SfxPoolItem** ppArgs, USHORT nMode )
+sal_uInt16 TTProperties::ExecuteFunction( sal_uInt16 nSID, SfxPoolItem** ppArgs, sal_uInt16 nMode )
{
mnSID = nSID;
mppArgs = ppArgs;
@@ -63,16 +63,16 @@ USHORT TTProperties::ExecuteFunction( USHORT nSID, SfxPoolItem** ppArgs, USHORT
return nActualPR;
}
-BOOL TTProperties::Img( Bitmap *pBmp )
+sal_Bool TTProperties::Img( Bitmap *pBmp )
{
- BOOL bRet;
+ sal_Bool bRet;
mpBmp = pBmp;
bRet = RequestProperty( TT_PR_IMG );
mpBmp = NULL;
return bRet;
}
-SvtResId TTProperties::GetSvtResId( USHORT nId )
+SvtResId TTProperties::GetSvtResId( sal_uInt16 nId )
{
return SvtResId( nId );
}
diff --git a/svtools/source/productregistration/registrationdlg.cxx b/svtools/source/productregistration/registrationdlg.cxx
index 460cedb060d1..7cface187915 100644
--- a/svtools/source/productregistration/registrationdlg.cxx
+++ b/svtools/source/productregistration/registrationdlg.cxx
@@ -117,7 +117,7 @@ namespace svt
FreeResource();
- m_aNow.Check( TRUE );
+ m_aNow.Check( sal_True );
}
//--------------------------------------------------------------------
diff --git a/svtools/source/svhtml/htmlkywd.cxx b/svtools/source/svhtml/htmlkywd.cxx
index e966ccb2b5f6..2c949c1a6c4e 100644
--- a/svtools/source/svhtml/htmlkywd.cxx
+++ b/svtools/source/svhtml/htmlkywd.cxx
@@ -49,7 +49,7 @@ struct HTML_TokenEntry
};
// Flag: RTF-Token Tabelle wurde schon sortiert
-static int __FAR_DATA bSortKeyWords = FALSE;
+static int __FAR_DATA bSortKeyWords = sal_False;
static HTML_TokenEntry __FAR_DATA aHTMLTokenTab[] = {
{{OOO_STRING_SVTOOLS_HTML_area}, HTML_AREA}, // Netscape 2.0
@@ -244,7 +244,7 @@ int GetHTMLToken( const String& rName )
sizeof( aHTMLTokenTab ) / sizeof( HTML_TokenEntry ),
sizeof( HTML_TokenEntry ),
HTMLKeyCompare );
- bSortKeyWords = TRUE;
+ bSortKeyWords = sal_True;
}
int nRet = 0;
@@ -279,7 +279,7 @@ struct HTML_CharEntry
};
// Flag: RTF-Token Tabelle wurde schon sortiert
-static int __FAR_DATA bSortCharKeyWords = FALSE;
+static int __FAR_DATA bSortCharKeyWords = sal_False;
static HTML_CharEntry __FAR_DATA aHTMLCharNameTab[] = {
{{OOO_STRING_SVTOOLS_HTML_C_lt}, 60},
@@ -599,7 +599,7 @@ sal_Unicode GetHTMLCharName( const String& rName )
sizeof( aHTMLCharNameTab ) / sizeof( HTML_CharEntry ),
sizeof( HTML_CharEntry ),
HTMLCharNameCompare );
- bSortCharKeyWords = TRUE;
+ bSortCharKeyWords = sal_True;
}
sal_Unicode cRet = 0;
@@ -620,7 +620,7 @@ sal_Unicode GetHTMLCharName( const String& rName )
/* */
// Flag: Optionen-Tabelle wurde schon sortiert
-static int __FAR_DATA bSortOptionKeyWords = FALSE;
+static int __FAR_DATA bSortOptionKeyWords = sal_False;
static HTML_TokenEntry __FAR_DATA aHTMLOptionTab[] = {
@@ -832,7 +832,7 @@ int GetHTMLOption( const String& rName )
sizeof( aHTMLOptionTab ) / sizeof( HTML_TokenEntry ),
sizeof( HTML_TokenEntry ),
HTMLKeyCompare );
- bSortOptionKeyWords = TRUE;
+ bSortOptionKeyWords = sal_True;
}
int nRet = HTML_O_UNKNOWN;
@@ -860,10 +860,10 @@ struct HTML_ColorEntry
const sal_Char* sName;
const String *pUName;
};
- ULONG nColor;
+ sal_uLong nColor;
};
-static int __FAR_DATA bSortColorKeyWords = FALSE;
+static int __FAR_DATA bSortColorKeyWords = sal_False;
#define HTML_NO_COLOR 0xffffffffUL
@@ -1052,7 +1052,7 @@ static int
}
-ULONG GetHTMLColor( const String& rName )
+sal_uLong GetHTMLColor( const String& rName )
{
if( !bSortColorKeyWords )
{
@@ -1060,10 +1060,10 @@ ULONG GetHTMLColor( const String& rName )
sizeof( aHTMLColorNameTab ) / sizeof( HTML_ColorEntry ),
sizeof( HTML_ColorEntry ),
HTMLColorNameCompare );
- bSortColorKeyWords = TRUE;
+ bSortColorKeyWords = sal_True;
}
- ULONG nRet = ULONG_MAX;
+ sal_uLong nRet = ULONG_MAX;
void* pFound;
HTML_ColorEntry aSrch;
aSrch.pUName = &rName;
diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx
index 33b8fd91a29f..6fa096937e7b 100644
--- a/svtools/source/svhtml/htmlout.cxx
+++ b/svtools/source/svhtml/htmlout.cxx
@@ -528,7 +528,7 @@ void HTMLOutFuncs::ConvertStringToHTML( const String& rSrc,
}
SvStream& HTMLOutFuncs::Out_AsciiTag( SvStream& rStream, const sal_Char *pStr,
- BOOL bOn, rtl_TextEncoding )
+ sal_Bool bOn, rtl_TextEncoding )
{
sal_Char sStt[3] = "</";
if( bOn )
@@ -569,7 +569,7 @@ SvStream& HTMLOutFuncs::FlushToAscii( SvStream& rStream,
return rStream;
}
-SvStream& HTMLOutFuncs::Out_Hex( SvStream& rStream, ULONG nHex, BYTE nLen,
+SvStream& HTMLOutFuncs::Out_Hex( SvStream& rStream, sal_uLong nHex, sal_uInt8 nLen,
rtl_TextEncoding )
{ // in einen Stream aus
sal_Char aNToABuf[] = "0000000000000000";
@@ -580,7 +580,7 @@ SvStream& HTMLOutFuncs::Out_Hex( SvStream& rStream, ULONG nHex, BYTE nLen,
// Pointer an das Bufferende setzen
sal_Char *pStr = aNToABuf + (sizeof(aNToABuf)-1);
- for( BYTE n = 0; n < nLen; ++n )
+ for( sal_uInt8 n = 0; n < nLen; ++n )
{
*(--pStr) = (sal_Char)(nHex & 0xf ) + 48;
if( *pStr > '9' )
@@ -615,7 +615,7 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream,
const ImageMap& rIMap,
const String& rName,
const HTMLOutEvent *pEventTable,
- BOOL bOutStarBasic,
+ sal_Bool bOutStarBasic,
const sal_Char *pDelim,
const sal_Char *pIndentArea,
const sal_Char *pIndentMap,
@@ -640,7 +640,7 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream,
Out_String( rStream, rOutName, eDestEnc, pNonConvertableChars );
rStream << "\">";
- for( USHORT i=0U; i<rIMap.GetIMapObjectCount(); i++ )
+ for( sal_uInt16 i=0U; i<rIMap.GetIMapObjectCount(); i++ )
{
const IMapObject* pObj = rIMap.GetIMapObject( i );
DBG_ASSERT( pObj, "Wo ist das ImageMap-Object?" );
@@ -683,7 +683,7 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream,
(const IMapPolygonObject *)pObj;
pShape= OOO_STRING_SVTOOLS_HTML_SH_poly;
Polygon aPoly( pPolyObj->GetPolygon() );
- USHORT nCount = aPoly.GetSize();
+ sal_uInt16 nCount = aPoly.GetSize();
if( nCount>0 )
{
const Point& rPoint = aPoly[0];
@@ -691,7 +691,7 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream,
ByteString::CreateFromInt32(rPoint.X())) += ',')
+= ByteString::CreateFromInt32(rPoint.Y());
}
- for( USHORT j=1; j<nCount; j++ )
+ for( sal_uInt16 j=1; j<nCount; j++ )
{
const Point& rPoint = aPoly[j];
(((aCoords += ',')
@@ -771,7 +771,7 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream,
rStream << pDelim;
if( pIndentMap )
rStream << pIndentMap;
- Out_AsciiTag( rStream, OOO_STRING_SVTOOLS_HTML_map, FALSE );
+ Out_AsciiTag( rStream, OOO_STRING_SVTOOLS_HTML_map, sal_False );
return rStream;
}
@@ -885,7 +885,7 @@ SvStream& HTMLOutFuncs::OutScript( SvStream& rStrm,
}
}
- HTMLOutFuncs::Out_AsciiTag( rStrm, OOO_STRING_SVTOOLS_HTML_script, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rStrm, OOO_STRING_SVTOOLS_HTML_script, sal_False );
return rStrm;
}
@@ -894,11 +894,11 @@ SvStream& HTMLOutFuncs::OutScript( SvStream& rStrm,
SvStream& HTMLOutFuncs::Out_Events( SvStream& rStrm,
const SvxMacroTableDtor& rMacroTable,
const HTMLOutEvent *pEventTable,
- BOOL bOutStarBasic,
+ sal_Bool bOutStarBasic,
rtl_TextEncoding eDestEnc,
String *pNonConvertableChars )
{
- USHORT i=0;
+ sal_uInt16 i=0;
while( pEventTable[i].pBasicName || pEventTable[i].pJavaName )
{
const SvxMacro *pMacro =
@@ -927,8 +927,8 @@ SvStream& HTMLOutFuncs::Out_Events( SvStream& rStrm,
}
ByteString& HTMLOutFuncs::CreateTableDataOptionsValNum( ByteString& aStrTD,
- BOOL bValue,
- double fVal, ULONG nFormat, SvNumberFormatter& rFormatter,
+ sal_Bool bValue,
+ double fVal, sal_uLong nFormat, SvNumberFormatter& rFormatter,
rtl_TextEncoding eDestEnc, String* pNonConvertableChars )
{
if ( bValue )
@@ -965,16 +965,16 @@ ByteString& HTMLOutFuncs::CreateTableDataOptionsValNum( ByteString& aStrTD,
return aStrTD;
}
-BOOL HTMLOutFuncs::PrivateURLToInternalImg( String& rURL )
+sal_Bool HTMLOutFuncs::PrivateURLToInternalImg( String& rURL )
{
if( rURL.Len() > 14UL &&
rURL.CompareToAscii( OOO_STRING_SVTOOLS_HTML_private_image, 14UL ) == COMPARE_EQUAL )
{
rURL.Erase( 0UL, 14UL );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
diff --git a/svtools/source/svhtml/htmlsupp.cxx b/svtools/source/svhtml/htmlsupp.cxx
index 9227690c2995..4b92214d7827 100644
--- a/svtools/source/svhtml/htmlsupp.cxx
+++ b/svtools/source/svhtml/htmlsupp.cxx
@@ -56,7 +56,7 @@ static HTMLOptionEnum __READONLY_DATA aScriptLangOptEnums[] =
{ 0, 0 }
};
-BOOL HTMLParser::ParseScriptOptions( String& rLangString, const String& rBaseURL,
+sal_Bool HTMLParser::ParseScriptOptions( String& rLangString, const String& rBaseURL,
HTMLScriptLanguage& rLang,
String& rSrc,
String& rLibrary,
@@ -70,7 +70,7 @@ BOOL HTMLParser::ParseScriptOptions( String& rLangString, const String& rBaseURL
rLibrary.Erase();
rModule.Erase();
- for( USHORT i = pScriptOptions->Count(); i; )
+ for( sal_uInt16 i = pScriptOptions->Count(); i; )
{
const HTMLOption *pOption = (*pScriptOptions)[ --i ];
switch( pOption->GetToken() )
@@ -78,7 +78,7 @@ BOOL HTMLParser::ParseScriptOptions( String& rLangString, const String& rBaseURL
case HTML_O_LANGUAGE:
{
rLangString = pOption->GetString();
- USHORT nLang;
+ sal_uInt16 nLang;
if( pOption->GetEnum( nLang, aScriptLangOptEnums ) )
rLang = (HTMLScriptLanguage)nLang;
else
@@ -99,10 +99,10 @@ BOOL HTMLParser::ParseScriptOptions( String& rLangString, const String& rBaseURL
}
}
- return TRUE;
+ return sal_True;
}
-void HTMLParser::RemoveSGMLComment( String &rString, BOOL bFull )
+void HTMLParser::RemoveSGMLComment( String &rString, sal_Bool bFull )
{
sal_Unicode c = 0;
while( rString.Len() &&
diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx
index 28df35a4bb2a..b31f7285b15c 100644
--- a/svtools/source/svhtml/parhtml.cxx
+++ b/svtools/source/svhtml/parhtml.cxx
@@ -114,9 +114,9 @@ SV_IMPL_PTRARR(HTMLOptions,HTMLOptionPtr)
/* */
-USHORT HTMLOption::GetEnum( const HTMLOptionEnum *pOptEnums, USHORT nDflt ) const
+sal_uInt16 HTMLOption::GetEnum( const HTMLOptionEnum *pOptEnums, sal_uInt16 nDflt ) const
{
- USHORT nValue = nDflt;
+ sal_uInt16 nValue = nDflt;
while( pOptEnums->pName )
if( aValue.EqualsIgnoreCaseAscii( pOptEnums->pName ) )
@@ -130,7 +130,7 @@ USHORT HTMLOption::GetEnum( const HTMLOptionEnum *pOptEnums, USHORT nDflt ) cons
return nValue;
}
-BOOL HTMLOption::GetEnum( USHORT &rEnum, const HTMLOptionEnum *pOptEnums ) const
+sal_Bool HTMLOption::GetEnum( sal_uInt16 &rEnum, const HTMLOptionEnum *pOptEnums ) const
{
while( pOptEnums->pName )
{
@@ -147,7 +147,7 @@ BOOL HTMLOption::GetEnum( USHORT &rEnum, const HTMLOptionEnum *pOptEnums ) const
return (pName != 0);
}
-HTMLOption::HTMLOption( USHORT nTok, const String& rToken,
+HTMLOption::HTMLOption( sal_uInt16 nTok, const String& rToken,
const String& rValue )
: aValue(rValue)
, aToken(rToken)
@@ -171,7 +171,7 @@ sal_uInt32 HTMLOption::GetNumber() const
return nTmp >= 0 ? (sal_uInt32)nTmp : 0;
}
-INT32 HTMLOption::GetSNumber() const
+sal_Int32 HTMLOption::GetSNumber() const
{
DBG_ASSERT( (nToken>=HTML_OPTION_NUMBER_START && nToken<HTML_OPTION_NUMBER_END) ||
(nToken>=HTML_OPTION_CONTEXT_START && nToken<HTML_OPTION_CONTEXT_END),
@@ -181,7 +181,7 @@ INT32 HTMLOption::GetSNumber() const
return aTmp.ToInt32();
}
-void HTMLOption::GetNumbers( SvULongs &rLongs, BOOL bSpaceDelim ) const
+void HTMLOption::GetNumbers( SvULongs &rLongs, sal_Bool bSpaceDelim ) const
{
if( rLongs.Count() )
rLongs.Remove( 0, rLongs.Count() );
@@ -190,8 +190,8 @@ void HTMLOption::GetNumbers( SvULongs &rLongs, BOOL bSpaceDelim ) const
{
// das ist ein sehr stark vereinfachter Scanner. Er sucht einfach
// alle Tiffern aus dem String
- BOOL bInNum = FALSE;
- ULONG nNum = 0;
+ sal_Bool bInNum = sal_False;
+ sal_uLong nNum = 0;
for( xub_StrLen i=0; i<aValue.Len(); i++ )
{
register sal_Unicode c = aValue.GetChar( i );
@@ -199,12 +199,12 @@ void HTMLOption::GetNumbers( SvULongs &rLongs, BOOL bSpaceDelim ) const
{
nNum *= 10;
nNum += (c - '0');
- bInNum = TRUE;
+ bInNum = sal_True;
}
else if( bInNum )
{
rLongs.Insert( nNum, rLongs.Count() );
- bInNum = FALSE;
+ bInNum = sal_False;
nNum = 0;
}
}
@@ -227,7 +227,7 @@ void HTMLOption::GetNumbers( SvULongs &rLongs, BOOL bSpaceDelim ) const
nPos++;
if( nPos==aValue.Len() )
- rLongs.Insert( ULONG(0), rLongs.Count() );
+ rLongs.Insert( sal_uLong(0), rLongs.Count() );
else
{
xub_StrLen nEnd = aValue.Search( (sal_Unicode)',', nPos );
@@ -258,7 +258,7 @@ void HTMLOption::GetColor( Color& rColor ) const
String aTmp( aValue );
aTmp.ToUpperAscii();
- ULONG nColor = ULONG_MAX;
+ sal_uLong nColor = ULONG_MAX;
if( '#'!=aTmp.GetChar( 0 ) )
nColor = GetHTMLColor( aTmp );
@@ -288,9 +288,9 @@ void HTMLOption::GetColor( Color& rColor ) const
}
}
- rColor.SetRed( (BYTE)((nColor & 0x00ff0000) >> 16) );
- rColor.SetGreen( (BYTE)((nColor & 0x0000ff00) >> 8));
- rColor.SetBlue( (BYTE)(nColor & 0x000000ff) );
+ rColor.SetRed( (sal_uInt8)((nColor & 0x00ff0000) >> 16) );
+ rColor.SetGreen( (sal_uInt8)((nColor & 0x0000ff00) >> 8));
+ rColor.SetBlue( (sal_uInt8)(nColor & 0x000000ff) );
}
HTMLInputType HTMLOption::GetInputType() const
@@ -320,8 +320,8 @@ HTMLParser::HTMLParser( SvStream& rIn, int bReadNewDoc )
bReadListing = bReadXMP = bReadPRE = bReadTextArea =
bReadScript = bReadStyle =
bEndTokenFound = bIsInBody = bReadNextChar =
- bReadComment = FALSE;
- bIsInHeader = TRUE;
+ bReadComment = sal_False;
+ bIsInHeader = sal_True;
pOptions = new HTMLOptions;
}
@@ -339,7 +339,7 @@ SvParserState __EXPORT HTMLParser::CallParser()
SaveState( 0 );
nPre_LinePos = 0;
- bPre_IgnoreNewPara = FALSE;
+ bPre_IgnoreNewPara = sal_False;
AddRef();
Continue( 0 );
@@ -378,24 +378,24 @@ int HTMLParser::FilterToken( int nToken )
break; // nicht verschicken
case HTML_HEAD_OFF:
- bIsInBody = TRUE;
+ bIsInBody = sal_True;
case HTML_HEAD_ON:
bIsInHeader = HTML_HEAD_ON == nToken;
break;
case HTML_BODY_ON:
case HTML_FRAMESET_ON:
- bIsInHeader = FALSE;
+ bIsInHeader = sal_False;
bIsInBody = HTML_BODY_ON == nToken;
break;
case HTML_BODY_OFF:
- bIsInBody = bReadPRE = bReadListing = bReadXMP = FALSE;
+ bIsInBody = bReadPRE = bReadListing = bReadXMP = sal_False;
break;
case HTML_HTML_OFF:
nToken = 0;
- bReadPRE = bReadListing = bReadXMP = FALSE;
+ bReadPRE = bReadListing = bReadXMP = sal_False;
break; // HTML_ON wurde auch nicht verschickt !
case HTML_PREFORMTXT_ON:
@@ -448,23 +448,23 @@ int HTMLParser::FilterToken( int nToken )
int HTMLParser::ScanText( const sal_Unicode cBreak )
{
::rtl::OUStringBuffer sTmpBuffer( MAX_LEN );
- int bWeiter = TRUE;
- int bEqSignFound = FALSE;
+ int bWeiter = sal_True;
+ int bEqSignFound = sal_False;
sal_Unicode cQuote = 0U;
while( bWeiter && IsParserWorking() )
{
- int bNextCh = TRUE;
+ int bNextCh = sal_True;
switch( nNextCh )
{
case '&':
- bEqSignFound = FALSE;
+ bEqSignFound = sal_False;
if( bReadXMP )
sTmpBuffer.append( (sal_Unicode)'&' );
else
{
- ULONG nStreamPos = rInput.Tell();
- ULONG nLinePos = GetLinePos();
+ sal_uLong nStreamPos = rInput.Tell();
+ sal_uLong nLinePos = GetLinePos();
sal_Unicode cChar = 0U;
if( '#' == (nNextCh = GetNextChar()) )
@@ -545,7 +545,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
if( 0U == cChar && ';' != nNextCh )
{
DBG_ASSERT( rInput.Tell() - nStreamPos ==
- (ULONG)(nPos+1L)*GetCharSize(),
+ (sal_uLong)(nPos+1L)*GetCharSize(),
"UTF-8 geht hier schief" );
for( xub_StrLen i=nPos-1L; i>1L; i-- )
{
@@ -575,10 +575,10 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
// rInput.SeekRel( -(long)(++nPos*GetCharSize()) );
// nlLinePos -= nPos;
DBG_ASSERT( rInput.Tell()-nStreamPos ==
- (ULONG)(nPos+1)*GetCharSize(),
+ (sal_uLong)(nPos+1)*GetCharSize(),
"Falsche Stream-Position" );
DBG_ASSERT( nlLinePos-nLinePos ==
- (ULONG)(nPos+1),
+ (sal_uLong)(nPos+1),
"Falsche Zeilen-Position" );
rInput.Seek( nStreamPos );
nlLinePos = nLinePos;
@@ -620,10 +620,10 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
// rInput.SeekRel( -(long)(++nPos*GetCharSize()) );
// nlLinePos -= nPos;
DBG_ASSERT( rInput.Tell()-nStreamPos ==
- (ULONG)(nPos+1)*GetCharSize(),
+ (sal_uLong)(nPos+1)*GetCharSize(),
"Falsche Stream-Position" );
DBG_ASSERT( nlLinePos-nLinePos ==
- (ULONG)(nPos+1),
+ (sal_uLong)(nPos+1),
"Falsche Zeilen-Position" );
rInput.Seek( nStreamPos );
nlLinePos = nLinePos;
@@ -655,7 +655,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
else if( IsParserWorking() )
{
sTmpBuffer.append( (sal_Unicode)'&' );
- bNextCh = FALSE;
+ bNextCh = sal_False;
break;
}
@@ -692,15 +692,15 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
rInput.Seek( nStreamPos-(sal_uInt32)GetCharSize() );
nlLinePos = nLinePos-1;
ClearTxtConvContext();
- bReadNextChar = TRUE;
+ bReadNextChar = sal_True;
}
- bNextCh = FALSE;
+ bNextCh = sal_False;
}
}
break;
case '=':
if( '>'==cBreak && !cQuote )
- bEqSignFound = TRUE;
+ bEqSignFound = sal_True;
sTmpBuffer.append( nNextCh );
break;
@@ -725,7 +725,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
cQuote = 0U;
}
sTmpBuffer.append( nNextCh );
- bEqSignFound = FALSE;
+ bEqSignFound = sal_False;
break;
case sal_Unicode(EOF):
@@ -735,7 +735,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
// abc&auml;<EOF> nicht angezeigt, also lassen wir das in Zukunft.
// if( '>' != cBreak )
// eState = SVPAR_ACCEPTED;
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
else
{
@@ -744,11 +744,11 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
break;
case '<':
- bEqSignFound = FALSE;
+ bEqSignFound = sal_False;
if( '>'==cBreak )
sTmpBuffer.append( nNextCh );
else
- bWeiter = FALSE; // Abbrechen, String zusammen
+ bWeiter = sal_False; // Abbrechen, String zusammen
break;
case '\f':
@@ -760,7 +760,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
else
{
// sonst wird es ein eigenes Token
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
break;
@@ -774,7 +774,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
}
else if( bReadListing || bReadXMP || bReadPRE || bReadTextArea )
{
- bWeiter = FALSE;
+ bWeiter = sal_False;
break;
}
// Bug 18984: CR-LF -> Blank
@@ -784,7 +784,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
if( '\t'==nNextCh && bReadPRE && '>'!=cBreak )
{
// In <PRE>: Tabs nach oben durchreichen
- bWeiter = FALSE;
+ bWeiter = sal_False;
break;
}
// kein break
@@ -821,15 +821,15 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
} while ( ' ' == nNextCh || '\t' == nNextCh ||
'\r' == nNextCh || '\n' == nNextCh ||
'\x0b' == nNextCh );
- bNextCh = FALSE;
+ bNextCh = sal_False;
}
break;
default:
- bEqSignFound = FALSE;
+ bEqSignFound = sal_False;
if( (nNextCh==cBreak && !cQuote) ||
- (ULONG(aToken.Len()) + MAX_LEN) > ULONG(STRING_MAXLEN & ~1 ))
- bWeiter = FALSE;
+ (sal_uLong(aToken.Len()) + MAX_LEN) > sal_uLong(STRING_MAXLEN & ~1 ))
+ bWeiter = sal_False;
else
{
do {
@@ -838,8 +838,8 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
if( MAX_LEN == sTmpBuffer.getLength() )
{
aToken += String(sTmpBuffer.makeStringAndClear());
- if( (ULONG(aToken.Len()) + MAX_LEN) >
- ULONG(STRING_MAXLEN & ~1 ) )
+ if( (sal_uLong(aToken.Len()) + MAX_LEN) >
+ sal_uLong(STRING_MAXLEN & ~1 ) )
{
nNextCh = GetNextChar();
return HTML_TEXTTOKEN;
@@ -854,7 +854,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
return HTML_TEXTTOKEN;
}
} while( HTML_ISALPHA( nNextCh ) || HTML_ISDIGIT( nNextCh ) );
- bNextCh = FALSE;
+ bNextCh = sal_False;
}
}
@@ -879,21 +879,21 @@ int HTMLParser::_GetNextRawToken()
{
// beim letzten Aufruf haben wir das End-Token bereits gefunden,
// deshalb muessen wir es nicht noch einmal suchen
- bReadScript = FALSE;
- bReadStyle = FALSE;
+ bReadScript = sal_False;
+ bReadStyle = sal_False;
aEndToken.Erase();
- bEndTokenFound = FALSE;
+ bEndTokenFound = sal_False;
return 0;
}
// per default geben wir HTML_RAWDATA zurueck
- int bWeiter = TRUE;
+ int bWeiter = sal_True;
int nToken = HTML_RAWDATA;
SaveState( 0 );
while( bWeiter && IsParserWorking() )
{
- int bNextCh = TRUE;
+ int bNextCh = sal_True;
switch( nNextCh )
{
case '<':
@@ -904,15 +904,15 @@ int HTMLParser::_GetNextRawToken()
aToken += String(sTmpBuffer.makeStringAndClear());
// und die Position im Stream merken
- ULONG nStreamPos = rInput.Tell();
- ULONG nLineNr = GetLineNr();
- ULONG nLinePos = GetLinePos();
+ sal_uLong nStreamPos = rInput.Tell();
+ sal_uLong nLineNr = GetLineNr();
+ sal_uLong nLinePos = GetLinePos();
// Start eines End-Token?
- int bOffState = FALSE;
+ int bOffState = sal_False;
if( '/' == (nNextCh = GetNextChar()) )
{
- bOffState = TRUE;
+ bOffState = sal_True;
nNextCh = GetNextChar();
}
else if( '!' == nNextCh )
@@ -933,7 +933,7 @@ int HTMLParser::_GetNextRawToken()
sal::static_int_cast< xub_StrLen >(
sTmpBuffer.getLength()) );
aTok.ToUpperAscii();
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
if( bReadScript || aEndToken.Len() )
{
if( !bReadComment )
@@ -941,7 +941,7 @@ int HTMLParser::_GetNextRawToken()
if( aTok.CompareToAscii( OOO_STRING_SVTOOLS_HTML_comment, 3 )
== COMPARE_EQUAL )
{
- bReadComment = TRUE;
+ bReadComment = sal_True;
}
else
{
@@ -958,7 +958,7 @@ int HTMLParser::_GetNextRawToken()
aTok.Copy( aTok.Len()-2 ).EqualsAscii( "--" ) )
{
// hier ist ein Kommentar der Art <!-----> zuende
- bReadComment = FALSE;
+ bReadComment = sal_False;
}
}
else
@@ -981,15 +981,15 @@ int HTMLParser::_GetNextRawToken()
// bisher gelesenen String zurueckgeben und dnach normal
// weitermachen
- bWeiter = FALSE;
+ bWeiter = sal_False;
// nToken==0 heisst, dass _GetNextToken gleich weiterliest
if( !aToken.Len() && (bReadStyle || bReadScript) )
{
// wir koennen sofort die Umgebung beeden und
// das End-Token parsen
- bReadScript = FALSE;
- bReadStyle = FALSE;
+ bReadScript = sal_False;
+ bReadStyle = sal_False;
aEndToken.Erase();
nToken = 0;
}
@@ -998,7 +998,7 @@ int HTMLParser::_GetNextRawToken()
// wir muessen bReadScript/bReadStyle noch am
// Leben lassen und koennen erst beim naechsten
// mal das End-Token Parsen
- bEndTokenFound = TRUE;
+ bEndTokenFound = sal_True;
}
// jetzt fahren wir im Stream auf das '<' zurueck
@@ -1018,7 +1018,7 @@ int HTMLParser::_GetNextRawToken()
if( bOffState )
aToken += (sal_Unicode)'/';
- bNextCh = FALSE;
+ bNextCh = sal_False;
}
}
break;
@@ -1026,11 +1026,11 @@ int HTMLParser::_GetNextRawToken()
sTmpBuffer.append( nNextCh );
if( bReadComment )
{
- BOOL bTwoMinus = FALSE;
+ sal_Bool bTwoMinus = sal_False;
nNextCh = GetNextChar();
while( '-' == nNextCh && IsParserWorking() )
{
- bTwoMinus = TRUE;
+ bTwoMinus = sal_True;
if( MAX_LEN == sTmpBuffer.getLength() )
aToken += String(sTmpBuffer.makeStringAndClear());
@@ -1039,9 +1039,9 @@ int HTMLParser::_GetNextRawToken()
}
if( '>' == nNextCh && IsParserWorking() && bTwoMinus )
- bReadComment = FALSE;
+ bReadComment = sal_False;
- bNextCh = FALSE;
+ bNextCh = sal_False;
}
break;
@@ -1050,27 +1050,27 @@ int HTMLParser::_GetNextRawToken()
nNextCh = GetNextChar();
if( nNextCh=='\n' )
nNextCh = GetNextChar();
- bWeiter = FALSE;
+ bWeiter = sal_False;
break;
case '\n':
// \n beendet das aktuelle Text-Token (auch wenn es leer ist)
nNextCh = GetNextChar();
- bWeiter = FALSE;
+ bWeiter = sal_False;
break;
case sal_Unicode(EOF):
// eof beendet das aktuelle Text-Token und tut so, als ob
// ein End-Token gelesen wurde
if( rInput.IsEof() )
{
- bWeiter = FALSE;
+ bWeiter = sal_False;
if( aToken.Len() || sTmpBuffer.getLength() )
{
- bEndTokenFound = TRUE;
+ bEndTokenFound = sal_True;
}
else
{
- bReadScript = FALSE;
- bReadStyle = FALSE;
+ bReadScript = sal_False;
+ bReadStyle = sal_False;
aEndToken.Erase();
nToken = 0;
}
@@ -1112,7 +1112,7 @@ int __EXPORT HTMLParser::_GetNextToken()
if( !IsParserWorking() ) // wenn schon Fehler, dann nicht weiter!
return 0;
- BOOL bReadNextCharSave = bReadNextChar;
+ sal_Bool bReadNextCharSave = bReadNextChar;
if( bReadNextChar )
{
DBG_ASSERT( !bEndTokenFound,
@@ -1120,7 +1120,7 @@ int __EXPORT HTMLParser::_GetNextToken()
nNextCh = GetNextChar();
if( !IsParserWorking() ) // wenn schon Fehler, dann nicht weiter!
return 0;
- bReadNextChar = FALSE;
+ bReadNextChar = sal_False;
}
if( bReadScript || bReadStyle || aEndToken.Len() )
@@ -1131,19 +1131,19 @@ int __EXPORT HTMLParser::_GetNextToken()
}
do {
- int bNextCh = TRUE;
+ int bNextCh = sal_True;
switch( nNextCh )
{
case '<':
{
- ULONG nStreamPos = rInput.Tell();
- ULONG nLineNr = GetLineNr();
- ULONG nLinePos = GetLinePos();
+ sal_uLong nStreamPos = rInput.Tell();
+ sal_uLong nLineNr = GetLineNr();
+ sal_uLong nLinePos = GetLinePos();
- int bOffState = FALSE;
+ int bOffState = sal_False;
if( '/' == (nNextCh = GetNextChar()) )
{
- bOffState = TRUE;
+ bOffState = sal_True;
nNextCh = GetNextChar();
}
if( HTML_ISALPHA( nNextCh ) || '!'==nNextCh ) // fix #26984#
@@ -1203,12 +1203,12 @@ int __EXPORT HTMLParser::_GetNextToken()
aToken = sSaveToken;
if( '>'!=nNextCh )
aToken += (sal_Unicode)' ';
- ULONG nCStreamPos = 0;
- ULONG nCLineNr = 0;
- ULONG nCLinePos = 0;
+ sal_uLong nCStreamPos = 0;
+ sal_uLong nCLineNr = 0;
+ sal_uLong nCLinePos = 0;
xub_StrLen nCStrLen = 0;
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
// bis zum schliessenden --> lesen. wenn keins gefunden
// wurde beim der ersten > wieder aufsetzen
while( !bDone && !rInput.IsEof() && IsParserWorking() )
@@ -1265,7 +1265,7 @@ int __EXPORT HTMLParser::_GetNextToken()
aToken = '<';
nRet = HTML_TEXTTOKEN;
nNextCh = GetNextChar();
- bNextCh = FALSE;
+ bNextCh = sal_False;
break;
}
}
@@ -1290,7 +1290,7 @@ int __EXPORT HTMLParser::_GetNextToken()
aToken = '<';
nRet = HTML_TEXTTOKEN;
nNextCh = GetNextChar();
- bNextCh = FALSE;
+ bNextCh = sal_False;
break;
}
if( SVPAR_PENDING == eState )
@@ -1301,10 +1301,10 @@ int __EXPORT HTMLParser::_GetNextToken()
{
nRet = HTML_UNKNOWNCONTROL_ON;
- ULONG nCStreamPos = rInput.Tell();
- ULONG nCLineNr = GetLineNr(), nCLinePos = GetLinePos();
+ sal_uLong nCStreamPos = rInput.Tell();
+ sal_uLong nCLineNr = GetLineNr(), nCLinePos = GetLinePos();
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
// bis zum schliessenden %> lesen. wenn keins gefunden
// wurde beim der ersten > wieder aufsetzen
while( !bDone && !rInput.IsEof() && IsParserWorking() )
@@ -1337,7 +1337,7 @@ int __EXPORT HTMLParser::_GetNextToken()
{
aToken = '<';
nRet = HTML_TEXTTOKEN;
- bNextCh = FALSE;
+ bNextCh = sal_False;
break;
}
}
@@ -1348,32 +1348,32 @@ int __EXPORT HTMLParser::_GetNextToken()
switch( nRet )
{
case HTML_TEXTAREA_ON:
- bReadTextArea = TRUE;
+ bReadTextArea = sal_True;
break;
case HTML_TEXTAREA_OFF:
- bReadTextArea = FALSE;
+ bReadTextArea = sal_False;
break;
case HTML_SCRIPT_ON:
if( !bReadTextArea )
- bReadScript = TRUE;
+ bReadScript = sal_True;
break;
case HTML_SCRIPT_OFF:
if( !bReadTextArea )
{
- bReadScript = FALSE;
+ bReadScript = sal_False;
// JavaScript kann den Stream veraendern
// also muss das letzte Zeichen nochmals
// gelesen werden
- bReadNextChar = TRUE;
- bNextCh = FALSE;
+ bReadNextChar = sal_True;
+ bNextCh = sal_False;
}
break;
case HTML_STYLE_ON:
- bReadStyle = TRUE;
+ bReadStyle = sal_True;
break;
case HTML_STYLE_OFF:
- bReadStyle = FALSE;
+ bReadStyle = sal_False;
break;
}
@@ -1407,7 +1407,7 @@ int __EXPORT HTMLParser::_GetNextToken()
if( ( '\n' != nNextCh || '\r' != c ) &&
( '\r' != nNextCh || '\n' != c ) )
{
- bNextCh = FALSE;
+ bNextCh = sal_False;
nNextCh = c;
}
nRet = HTML_NEWPARA;
@@ -1434,7 +1434,7 @@ scan_text:
if( !bNextCh && eState == SVPAR_PENDING )
{
eState = SVPAR_WORKING;
- bReadNextChar = TRUE;
+ bReadNextChar = sal_True;
}
break;
@@ -1445,7 +1445,7 @@ scan_text:
nNextCh = GetNextChar();
if( SVPAR_PENDING == eState && nRet && HTML_TEXTTOKEN != nRet )
{
- bReadNextChar = TRUE;
+ bReadNextChar = sal_True;
eState = SVPAR_WORKING;
}
}
@@ -1462,15 +1462,15 @@ void HTMLParser::UnescapeToken()
{
xub_StrLen nPos=0;
- BOOL bEscape = FALSE;
+ sal_Bool bEscape = sal_False;
while( nPos < aToken.Len() )
{
- BOOL bOldEscape = bEscape;
- bEscape = FALSE;
+ sal_Bool bOldEscape = bEscape;
+ bEscape = sal_False;
if( '\\'==aToken.GetChar(nPos) && !bOldEscape )
{
aToken.Erase( nPos, 1 );
- bEscape = TRUE;
+ bEscape = sal_True;
}
else
{
@@ -1480,7 +1480,7 @@ void HTMLParser::UnescapeToken()
}
// hole die Optionen
-const HTMLOptions *HTMLParser::GetOptions( USHORT *pNoConvertToken ) const
+const HTMLOptions *HTMLParser::GetOptions( sal_uInt16 *pNoConvertToken ) const
{
// wenn die Option fuer das aktuelle Token schon einmal
// geholt wurden, geben wir sie noch einmal zurueck
@@ -1518,7 +1518,7 @@ const HTMLOptions *HTMLParser::GetOptions( USHORT *pNoConvertToken ) const
nToken = GetHTMLOption( sNameUpperCase ); // der Name ist fertig
DBG_ASSERTWARNING( nToken!=HTML_O_UNKNOWN,
"GetOption: unbekannte HTML-Option" );
- BOOL bStripCRLF = (nToken < HTML_OPTION_SCRIPT_START ||
+ sal_Bool bStripCRLF = (nToken < HTML_OPTION_SCRIPT_START ||
nToken >= HTML_OPTION_SCRIPT_END) &&
(!pNoConvertToken || nToken != *pNoConvertToken);
@@ -1545,12 +1545,12 @@ const HTMLOptions *HTMLParser::GetOptions( USHORT *pNoConvertToken ) const
{
sal_Unicode cEnd = cChar;
nPos++; nStt++;
- BOOL bDone = FALSE;
- BOOL bEscape = FALSE;
+ sal_Bool bDone = sal_False;
+ sal_Bool bEscape = sal_False;
while( nPos < aToken.Len() && !bDone )
{
- BOOL bOldEscape = bEscape;
- bEscape = FALSE;
+ sal_Bool bOldEscape = bEscape;
+ bEscape = sal_False;
cChar = aToken.GetChar(nPos);
switch( cChar )
{
@@ -1569,7 +1569,7 @@ const HTMLOptions *HTMLParser::GetOptions( USHORT *pNoConvertToken ) const
else
{
((String &)aToken).Erase( nPos, 1 );
- bEscape = TRUE;
+ bEscape = sal_True;
}
break;
case '"':
@@ -1590,12 +1590,12 @@ const HTMLOptions *HTMLParser::GetOptions( USHORT *pNoConvertToken ) const
{
// hier sind wir etwas laxer als der
// Standard und erlauben alles druckbare
- BOOL bEscape = FALSE;
- BOOL bDone = FALSE;
+ sal_Bool bEscape = sal_False;
+ sal_Bool bDone = sal_False;
while( nPos < aToken.Len() && !bDone )
{
- BOOL bOldEscape = bEscape;
- bEscape = FALSE;
+ sal_Bool bOldEscape = bEscape;
+ bEscape = sal_False;
sal_Unicode c = aToken.GetChar(nPos);
switch( c )
{
@@ -1608,7 +1608,7 @@ const HTMLOptions *HTMLParser::GetOptions( USHORT *pNoConvertToken ) const
case '\t':
case '\r':
case '\n':
- bDone = TRUE;
+ bDone = sal_True;
break;
case '\\':
@@ -1619,7 +1619,7 @@ const HTMLOptions *HTMLParser::GetOptions( USHORT *pNoConvertToken ) const
else
{
((String &)aToken).Erase( nPos, 1 );
- bEscape = TRUE;
+ bEscape = sal_True;
}
break;
@@ -1627,7 +1627,7 @@ const HTMLOptions *HTMLParser::GetOptions( USHORT *pNoConvertToken ) const
if( HTML_ISPRINTABLE( c ) )
nPos++, nLen++;
else
- bDone = TRUE;
+ bDone = sal_True;
break;
}
}
@@ -1832,7 +1832,7 @@ int HTMLParser::FilterPRE( int nToken )
break;
}
- bPre_IgnoreNewPara = FALSE;
+ bPre_IgnoreNewPara = sal_False;
return nToken;
}
@@ -1873,7 +1873,7 @@ int HTMLParser::FilterXMP( int nToken )
break;
}
- bPre_IgnoreNewPara = FALSE;
+ bPre_IgnoreNewPara = sal_False;
return nToken;
}
@@ -1901,13 +1901,13 @@ int HTMLParser::FilterListing( int nToken )
break;
}
- bPre_IgnoreNewPara = FALSE;
+ bPre_IgnoreNewPara = sal_False;
return nToken;
}
FASTBOOL HTMLParser::IsHTMLFormat( const sal_Char* pHeader,
- BOOL bSwitchToUCS2,
+ sal_Bool bSwitchToUCS2,
rtl_TextEncoding eEnc )
{
// Einer der folgenden regulaeren Ausdrucke muss sich auf den String
@@ -1921,14 +1921,14 @@ FASTBOOL HTMLParser::IsHTMLFormat( const sal_Char* pHeader,
// ensprechen muss
ByteString sCmp;
- BOOL bUCS2B = FALSE;
+ sal_Bool bUCS2B = sal_False;
if( bSwitchToUCS2 )
{
if( 0xfeU == (sal_uChar)pHeader[0] &&
0xffU == (sal_uChar)pHeader[1] )
{
eEnc = RTL_TEXTENCODING_UCS2;
- bUCS2B = TRUE;
+ bUCS2B = sal_True;
}
else if( 0xffU == (sal_uChar)pHeader[0] &&
0xfeU == (sal_uChar)pHeader[1] )
@@ -1946,7 +1946,7 @@ FASTBOOL HTMLParser::IsHTMLFormat( const sal_Char* pHeader,
)
{
if( 0xfe == (sal_uChar)pHeader[0] )
- bUCS2B = TRUE;
+ bUCS2B = sal_True;
xub_StrLen nLen;
for( nLen = 2;
@@ -1979,7 +1979,7 @@ FASTBOOL HTMLParser::IsHTMLFormat( const sal_Char* pHeader,
// Ein HTML-Dokument muss in der ersten Zeile ein '<' besitzen
xub_StrLen nStart = sCmp.Search( '<' );
if( STRING_NOTFOUND == nStart )
- return FALSE;
+ return sal_False;
nStart++;
// danach duerfen beliebige andere Zeichen bis zu einem blank oder
@@ -1994,7 +1994,7 @@ FASTBOOL HTMLParser::IsHTMLFormat( const sal_Char* pHeader,
// wenn das Dokeument hinter dem < aufhoert ist es wohl kein HTML
if( nPos==nStart )
- return FALSE;
+ return sal_False;
// die Zeichenkette nach dem '<' muss ausserdem ein bekanntes
// HTML Token sein. Damit die Ausgabe eines DOS-dir-Befehls nicht
@@ -2003,30 +2003,30 @@ FASTBOOL HTMLParser::IsHTMLFormat( const sal_Char* pHeader,
String sTest( sCmp.Copy( nStart, nPos-nStart ), RTL_TEXTENCODING_ASCII_US );
int nTok = GetHTMLToken( sTest );
if( 0 != nTok && HTML_DIRLIST_ON != nTok )
- return TRUE;
+ return sal_True;
// oder es handelt sich um ein "<!" ganz am Anfang der Datei (fix #27092#)
if( nStart == 1 && '!' == sCmp.GetChar( 1 ) )
- return TRUE;
+ return sal_True;
// oder wir finden irgendwo ein <HTML> in den ersten 80 Zeichen
nStart = sCmp.Search( OOO_STRING_SVTOOLS_HTML_html );
if( nStart!=STRING_NOTFOUND &&
nStart>0 && '<'==sCmp.GetChar(nStart-1) &&
nStart+4 < sCmp.Len() && '>'==sCmp.GetChar(nStart+4) )
- return TRUE;
+ return sal_True;
// sonst ist es wohl doch eher kein HTML-Dokument
- return FALSE;
+ return sal_False;
}
-BOOL HTMLParser::InternalImgToPrivateURL( String& rURL )
+sal_Bool HTMLParser::InternalImgToPrivateURL( String& rURL )
{
if( rURL.Len() < 19 || 'i' != rURL.GetChar(0) ||
rURL.CompareToAscii( OOO_STRING_SVTOOLS_HTML_internal_gopher, 9 ) != COMPARE_EQUAL )
- return FALSE;
+ return sal_False;
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
if( rURL.CompareToAscii( OOO_STRING_SVTOOLS_HTML_internal_gopher,16) == COMPARE_EQUAL )
{
@@ -2147,10 +2147,10 @@ bool HTMLParser::ParseMetaOptionsImpl(
rtl_TextEncoding& o_rEnc )
{
String aName, aContent;
- USHORT nAction = HTML_META_NONE;
+ sal_uInt16 nAction = HTML_META_NONE;
bool bHTTPEquiv = false, bChanged = false;
- for ( USHORT i = i_pOptions->Count(); i; )
+ for ( sal_uInt16 i = i_pOptions->Count(); i; )
{
const HTMLOption *pOption = (*i_pOptions)[ --i ];
switch ( pOption->GetToken() )
@@ -2236,8 +2236,8 @@ bool HTMLParser::ParseMetaOptionsImpl(
if ( i_xDocProps.is() && aContent.Len() &&
aContent.GetTokenCount() == 2 )
{
- Date aDate( (ULONG)aContent.GetToken(0).ToInt32() );
- Time aTime( (ULONG)aContent.GetToken(1).ToInt32() );
+ Date aDate( (sal_uLong)aContent.GetToken(0).ToInt32() );
+ Time aTime( (sal_uLong)aContent.GetToken(1).ToInt32() );
DateTime aDateTime( aDate, aTime );
::util::DateTime uDT(aDateTime.Get100Sec(),
aDateTime.GetSec(), aDateTime.GetMin(),
@@ -2293,7 +2293,7 @@ bool HTMLParser::ParseMetaOptions(
const uno::Reference<document::XDocumentProperties> & i_xDocProps,
SvKeyValueIterator *i_pHeader )
{
- USHORT nContentOption = HTML_O_CONTENT;
+ sal_uInt16 nContentOption = HTML_O_CONTENT;
rtl_TextEncoding eEnc = RTL_TEXTENCODING_DONTKNOW;
bool bRet = ParseMetaOptionsImpl( i_xDocProps, i_pHeader,
@@ -2301,7 +2301,7 @@ bool HTMLParser::ParseMetaOptions(
eEnc );
// If the encoding is set by a META tag, it may only overwrite the
- // current encoding if both, the current and the new encoding, are 1-BYTE
+ // current encoding if both, the current and the new encoding, are 1-sal_uInt8
// encodings. Everything else cannot lead to reasonable results.
if (RTL_TEXTENCODING_DONTKNOW != eEnc &&
rtl_isOctetTextEncoding( eEnc ) &&
@@ -2340,7 +2340,7 @@ rtl_TextEncoding HTMLParser::GetEncodingByHttpHeader( SvKeyValueIterator *pHTTPH
if( pHTTPHeader )
{
SvKeyValue aKV;
- for( BOOL bCont = pHTTPHeader->GetFirst( aKV ); bCont;
+ for( sal_Bool bCont = pHTTPHeader->GetFirst( aKV ); bCont;
bCont = pHTTPHeader->GetNext( aKV ) )
{
if( aKV.GetKey().EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_META_content_type ) )
@@ -2355,15 +2355,15 @@ rtl_TextEncoding HTMLParser::GetEncodingByHttpHeader( SvKeyValueIterator *pHTTPH
return eRet;
}
-BOOL HTMLParser::SetEncodingByHTTPHeader(
+sal_Bool HTMLParser::SetEncodingByHTTPHeader(
SvKeyValueIterator *pHTTPHeader )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
rtl_TextEncoding eEnc = HTMLParser::GetEncodingByHttpHeader( pHTTPHeader );
if(RTL_TEXTENCODING_DONTKNOW != eEnc)
{
SetSrcEncoding( eEnc );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
diff --git a/svtools/source/svrtf/parrtf.cxx b/svtools/source/svrtf/parrtf.cxx
index 7e29dbc4598f..bd08a32942bf 100644
--- a/svtools/source/svrtf/parrtf.cxx
+++ b/svtools/source/svrtf/parrtf.cxx
@@ -44,7 +44,7 @@ const int MAX_TOKEN_LEN = 128;
#define RTF_ISDIGIT( c ) (c >= '0' && c <= '9')
#define RTF_ISALPHA( c ) ( (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') )
-SvRTFParser::SvRTFParser( SvStream& rIn, BYTE nStackSize )
+SvRTFParser::SvRTFParser( SvStream& rIn, sal_uInt8 nStackSize )
: SvParser( rIn, nStackSize ),
eUNICodeSet( RTL_TEXTENCODING_MS_1252 ), // default ist ANSI-CodeSet
nUCharOverread( 1 )
@@ -170,7 +170,7 @@ int SvRTFParser::_GetNextToken()
case RTF_UC:
if( 0 <= nTokenValue )
{
- nUCharOverread = (BYTE)nTokenValue;
+ nUCharOverread = (sal_uInt8)nTokenValue;
#if 1
//cmc: other ifdef breaks #i3584
aParserStates.top().
@@ -208,7 +208,7 @@ int SvRTFParser::_GetNextToken()
// overread the next n "RTF" characters. This
// can be also \{, \}, \'88
- for( BYTE m = 0; m < nUCharOverread; ++m )
+ for( sal_uInt8 m = 0; m < nUCharOverread; ++m )
{
sal_Unicode cAnsi = nNextCh;
while( 0xD == cAnsi )
@@ -437,7 +437,7 @@ void SvRTFParser::ScanText( const sal_Unicode cBreak )
// overread the next n "RTF" characters. This
// can be also \{, \}, \'88
- for( BYTE m = 0; m < nUCharOverread; ++m )
+ for( sal_uInt8 m = 0; m < nUCharOverread; ++m )
{
sal_Unicode cAnsi = nNextCh;
while( 0xD == cAnsi )
diff --git a/svtools/source/svrtf/rtfkeywd.cxx b/svtools/source/svrtf/rtfkeywd.cxx
index 7422961c6881..ac10c3982b6e 100644
--- a/svtools/source/svrtf/rtfkeywd.cxx
+++ b/svtools/source/svrtf/rtfkeywd.cxx
@@ -49,7 +49,7 @@ struct RTF_TokenEntry
};
// Flag: RTF-Token Tabelle wurde schon sortiert
-static int __FAR_DATA bSortKeyWords = FALSE;
+static int __FAR_DATA bSortKeyWords = sal_False;
static RTF_TokenEntry __FAR_DATA aRTFTokenTab[] = {
{{OOO_STRING_SVTOOLS_RTF_IGNORE}, RTF_IGNOREFLAG},
@@ -1228,7 +1228,7 @@ int GetRTFToken( const String& rSearch )
sizeof( aRTFTokenTab ) / sizeof( RTF_TokenEntry ),
sizeof( RTF_TokenEntry ),
RTFKeyCompare );
- bSortKeyWords = TRUE;
+ bSortKeyWords = sal_True;
}
int nRet = 0;
diff --git a/svtools/source/svrtf/rtfout.cxx b/svtools/source/svrtf/rtfout.cxx
index 670abfaf4b0c..2f00fd896168 100644
--- a/svtools/source/svrtf/rtfout.cxx
+++ b/svtools/source/svrtf/rtfout.cxx
@@ -45,7 +45,7 @@ const sal_Char __FAR_DATA RTFOutFuncs::sNewLine[] = "\015\012";
SvStream& RTFOutFuncs::Out_Char(SvStream& rStream, sal_Unicode c,
- int *pUCMode, rtl_TextEncoding eDestEnc, BOOL bWriteHelpFile)
+ int *pUCMode, rtl_TextEncoding eDestEnc, sal_Bool bWriteHelpFile)
{
const sal_Char* pStr = 0;
switch (c)
@@ -164,7 +164,7 @@ SvStream& RTFOutFuncs::Out_Char(SvStream& rStream, sal_Unicode c,
}
SvStream& RTFOutFuncs::Out_String( SvStream& rStream, const String& rStr,
- rtl_TextEncoding eDestEnc, BOOL bWriteHelpFile)
+ rtl_TextEncoding eDestEnc, sal_Bool bWriteHelpFile)
{
int nUCMode = 1;
for (xub_StrLen n = 0; n < rStr.Len(); ++n)
@@ -175,7 +175,7 @@ SvStream& RTFOutFuncs::Out_String( SvStream& rStream, const String& rStr,
}
SvStream& RTFOutFuncs::Out_Fontname(SvStream& rStream, const String& rStr,
- rtl_TextEncoding eDestEnc, BOOL bWriteHelpFile)
+ rtl_TextEncoding eDestEnc, sal_Bool bWriteHelpFile)
{
//Fontnames in word have a quirk in that \uc and usage of ansi replacement
//chars after a \u don't work and in wordpad \u doesn't work, so we are
@@ -185,7 +185,7 @@ SvStream& RTFOutFuncs::Out_Fontname(SvStream& rStream, const String& rStr,
return rStream;
}
-SvStream& RTFOutFuncs::Out_Hex( SvStream& rStream, ULONG nHex, BYTE nLen )
+SvStream& RTFOutFuncs::Out_Hex( SvStream& rStream, sal_uLong nHex, sal_uInt8 nLen )
{
sal_Char aNToABuf[] = "0000000000000000";
@@ -195,7 +195,7 @@ SvStream& RTFOutFuncs::Out_Hex( SvStream& rStream, ULONG nHex, BYTE nLen )
// Pointer an das Bufferende setzen
sal_Char* pStr = aNToABuf + (sizeof(aNToABuf)-1);
- for( BYTE n = 0; n < nLen; ++n )
+ for( sal_uInt8 n = 0; n < nLen; ++n )
{
*(--pStr) = (sal_Char)(nHex & 0xf ) + 48;
if( *pStr > '9' )
diff --git a/svtools/source/svrtf/svparser.cxx b/svtools/source/svrtf/svparser.cxx
index 53b7ee497754..fee520714493 100644
--- a/svtools/source/svrtf/svparser.cxx
+++ b/svtools/source/svrtf/svparser.cxx
@@ -50,11 +50,11 @@
struct SvParser_Impl
{
String aToken; // gescanntes Token
- ULONG nFilePos; // akt. Position im Stream
- ULONG nlLineNr; // akt. Zeilen Nummer
- ULONG nlLinePos; // akt. Spalten Nummer
+ sal_uLong nFilePos; // akt. Position im Stream
+ sal_uLong nlLineNr; // akt. Zeilen Nummer
+ sal_uLong nlLinePos; // akt. Spalten Nummer
long nTokenValue; // zusaetzlicher Wert (RTF)
- BOOL bTokenHasValue; // indicates whether nTokenValue is valid
+ sal_Bool bTokenHasValue; // indicates whether nTokenValue is valid
int nToken; // akt. Token
sal_Unicode nNextCh; // akt. Zeichen
@@ -77,7 +77,7 @@ struct SvParser_Impl
// Konstruktor
-SvParser::SvParser( SvStream& rIn, BYTE nStackSize )
+SvParser::SvParser( SvStream& rIn, sal_uInt8 nStackSize )
: rInput( rIn )
, nlLineNr( 1 )
, nlLinePos( 1 )
@@ -86,11 +86,11 @@ SvParser::SvParser( SvStream& rIn, BYTE nStackSize )
, bTokenHasValue( false )
, eState( SVPAR_NOTSTARTED )
, eSrcEnc( RTL_TEXTENCODING_DONTKNOW )
- , bDownloadingFile( FALSE )
+ , bDownloadingFile( sal_False )
, nTokenStackSize( nStackSize )
, nTokenStackPos( 0 )
{
- bUCS2BSrcEnc = bSwitchToUCS2 = FALSE;
+ bUCS2BSrcEnc = bSwitchToUCS2 = sal_False;
eState = SVPAR_NOTSTARTED;
if( nTokenStackSize < 3 )
nTokenStackSize = 3;
@@ -191,11 +191,11 @@ sal_Unicode SvParser::GetNextChar()
// When reading muliple bytes, we don't have to care about the file
// position when we run inti the pending state. The file position is
// maintained by SaveState/RestoreState.
- BOOL bErr;
+ sal_Bool bErr;
if( bSwitchToUCS2 && 0 == rInput.Tell() )
{
sal_uChar c1, c2;
- BOOL bSeekBack = TRUE;
+ sal_Bool bSeekBack = sal_True;
rInput >> c1;
bErr = rInput.IsEof() || rInput.GetError();
@@ -210,14 +210,14 @@ sal_Unicode SvParser::GetNextChar()
if( 0xfe == c1 && 0xff == c2 )
{
eSrcEnc = RTL_TEXTENCODING_UCS2;
- bUCS2BSrcEnc = TRUE;
- bSeekBack = FALSE;
+ bUCS2BSrcEnc = sal_True;
+ bSeekBack = sal_False;
}
else if( 0xff == c1 && 0xfe == c2 )
{
eSrcEnc = RTL_TEXTENCODING_UCS2;
- bUCS2BSrcEnc = FALSE;
- bSeekBack = FALSE;
+ bUCS2BSrcEnc = sal_False;
+ bSeekBack = sal_False;
}
}
}
@@ -225,7 +225,7 @@ sal_Unicode SvParser::GetNextChar()
if( bSeekBack )
rInput.Seek( 0 );
- bSwitchToUCS2 = FALSE;
+ bSwitchToUCS2 = sal_False;
}
nNextChPos = rInput.Tell();
@@ -480,7 +480,7 @@ int SvParser::SkipToken( short nCnt ) // n Tokens zurueck "skippen"
nTmp = 0;
else if( nTmp > nTokenStackSize )
nTmp = nTokenStackSize;
- nTokenStackPos = BYTE(nTmp);
+ nTokenStackPos = sal_uInt8(nTmp);
// und die Werte zurueck
aToken = pTokenStackPos->sToken;
@@ -492,15 +492,15 @@ int SvParser::SkipToken( short nCnt ) // n Tokens zurueck "skippen"
SvParser::TokenStackType* SvParser::GetStackPtr( short nCnt )
{
- BYTE nAktPos = BYTE(pTokenStackPos - pTokenStack );
+ sal_uInt8 nAktPos = sal_uInt8(pTokenStackPos - pTokenStack );
if( nCnt > 0 )
{
if( nCnt >= nTokenStackSize )
nCnt = (nTokenStackSize-1);
if( nAktPos + nCnt < nTokenStackSize )
- nAktPos = sal::static_int_cast< BYTE >(nAktPos + nCnt);
+ nAktPos = sal::static_int_cast< sal_uInt8 >(nAktPos + nCnt);
else
- nAktPos = sal::static_int_cast< BYTE >(
+ nAktPos = sal::static_int_cast< sal_uInt8 >(
nAktPos + (nCnt - nTokenStackSize));
}
else if( nCnt < 0 )
@@ -508,9 +508,9 @@ SvParser::TokenStackType* SvParser::GetStackPtr( short nCnt )
if( -nCnt >= nTokenStackSize )
nCnt = -nTokenStackSize+1;
if( -nCnt <= nAktPos )
- nAktPos = sal::static_int_cast< BYTE >(nAktPos + nCnt);
+ nAktPos = sal::static_int_cast< sal_uInt8 >(nAktPos + nCnt);
else
- nAktPos = sal::static_int_cast< BYTE >(
+ nAktPos = sal::static_int_cast< sal_uInt8 >(
nAktPos + (nCnt + nTokenStackSize));
}
return pTokenStack + nAktPos;
@@ -574,32 +574,32 @@ void SvParser::Continue( int )
}
void SvParser::BuildWhichTbl( SvUShorts &rWhichMap,
- USHORT *pWhichIds,
- USHORT nWhichIds )
+ sal_uInt16 *pWhichIds,
+ sal_uInt16 nWhichIds )
{
- USHORT aNewRange[2];
+ sal_uInt16 aNewRange[2];
- for( USHORT nCnt = 0; nCnt < nWhichIds; ++nCnt, ++pWhichIds )
+ for( sal_uInt16 nCnt = 0; nCnt < nWhichIds; ++nCnt, ++pWhichIds )
if( *pWhichIds )
{
aNewRange[0] = aNewRange[1] = *pWhichIds;
- BOOL bIns = TRUE;
+ sal_Bool bIns = sal_True;
// Position suchen
- for ( USHORT nOfs = 0; rWhichMap[nOfs]; nOfs += 2 )
+ for ( sal_uInt16 nOfs = 0; rWhichMap[nOfs]; nOfs += 2 )
{
if( *pWhichIds < rWhichMap[nOfs] - 1 )
{
// neuen Range davor
rWhichMap.Insert( aNewRange, 2, nOfs );
- bIns = FALSE;
+ bIns = sal_False;
break;
}
else if( *pWhichIds == rWhichMap[nOfs] - 1 )
{
// diesen Range nach unten erweitern
rWhichMap[nOfs] = *pWhichIds;
- bIns = FALSE;
+ bIns = sal_False;
break;
}
else if( *pWhichIds == rWhichMap[nOfs+1] + 1 )
@@ -613,7 +613,7 @@ void SvParser::BuildWhichTbl( SvUShorts &rWhichMap,
else
// diesen Range nach oben erweitern
rWhichMap[nOfs+1] = *pWhichIds;
- bIns = FALSE;
+ bIns = sal_False;
break;
}
}
@@ -691,7 +691,7 @@ SvKeyValueIterator::~SvKeyValueIterator (void)
/*
* GetFirst.
*/
-BOOL SvKeyValueIterator::GetFirst (SvKeyValue &rKeyVal)
+sal_Bool SvKeyValueIterator::GetFirst (SvKeyValue &rKeyVal)
{
m_nPos = m_pList->Count();
return GetNext (rKeyVal);
@@ -700,17 +700,17 @@ BOOL SvKeyValueIterator::GetFirst (SvKeyValue &rKeyVal)
/*
* GetNext.
*/
-BOOL SvKeyValueIterator::GetNext (SvKeyValue &rKeyVal)
+sal_Bool SvKeyValueIterator::GetNext (SvKeyValue &rKeyVal)
{
if (m_nPos > 0)
{
rKeyVal = *m_pList->GetObject(--m_nPos);
- return TRUE;
+ return sal_True;
}
else
{
// Nothing to do.
- return FALSE;
+ return sal_False;
}
}
diff --git a/svtools/source/table/defaultinputhandler.cxx b/svtools/source/table/defaultinputhandler.cxx
index f6a58ad17efe..133575fdf8cf 100644
--- a/svtools/source/table/defaultinputhandler.cxx
+++ b/svtools/source/table/defaultinputhandler.cxx
@@ -137,12 +137,12 @@ namespace svt { namespace table
bool bHandled = false;
const KeyCode& rKeyCode = rKEvt.GetKeyCode();
- USHORT nKeyCode = rKeyCode.GetCode();
+ sal_uInt16 nKeyCode = rKeyCode.GetCode();
struct _ActionMapEntry
{
- USHORT nKeyCode;
- USHORT nKeyModifier;
+ sal_uInt16 nKeyCode;
+ sal_uInt16 nKeyModifier;
TableControlAction eAction;
}
static aKnownActions[] = {
diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx
index 8e5bd181a583..5fb61a9f385e 100644
--- a/svtools/source/table/gridtablerenderer.cxx
+++ b/svtools/source/table/gridtablerenderer.cxx
@@ -113,8 +113,8 @@ namespace svt { namespace table
_rDevice.SetTextColor(m_pImpl->rModel.getTextColor());
else
_rDevice.SetTextColor(_rStyle.GetFieldTextColor());
- ULONG nHorFlag = TEXT_DRAW_LEFT;
- ULONG nVerFlag = TEXT_DRAW_TOP;
+ sal_uLong nHorFlag = TEXT_DRAW_LEFT;
+ sal_uLong nVerFlag = TEXT_DRAW_TOP;
if(m_pImpl->rModel.getVerticalAlign() == 1)
nVerFlag = TEXT_DRAW_VCENTER;
else if(m_pImpl->rModel.getVerticalAlign() == 2)
@@ -207,8 +207,8 @@ namespace svt { namespace table
_rDevice.SetTextColor(m_pImpl->rModel.getTextColor());
else
_rDevice.SetTextColor(_rStyle.GetFieldTextColor());
- ULONG nHorFlag = TEXT_DRAW_LEFT;
- ULONG nVerFlag = TEXT_DRAW_TOP;
+ sal_uLong nHorFlag = TEXT_DRAW_LEFT;
+ sal_uLong nVerFlag = TEXT_DRAW_TOP;
if(m_pImpl->rModel.getVerticalAlign() == 1)
nVerFlag = TEXT_DRAW_VCENTER;
else if(m_pImpl->rModel.getVerticalAlign() == 2)
@@ -342,8 +342,8 @@ namespace svt { namespace table
_rDevice.SetTextColor(m_pImpl->rModel.getTextColor());
else
_rDevice.SetTextColor(_rStyle.GetFieldTextColor());
- ULONG nHorFlag = TEXT_DRAW_LEFT;
- ULONG nVerFlag = TEXT_DRAW_TOP;
+ sal_uLong nHorFlag = TEXT_DRAW_LEFT;
+ sal_uLong nVerFlag = TEXT_DRAW_TOP;
if(m_pImpl->rModel.getVerticalAlign() == 1)
nVerFlag = TEXT_DRAW_VCENTER;
else if(m_pImpl->rModel.getVerticalAlign() == 2)
diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx
index 33c80e642118..d6122e7917a0 100644
--- a/svtools/source/table/tablecontrol.cxx
+++ b/svtools/source/table/tablecontrol.cxx
@@ -285,7 +285,7 @@ namespace svt { namespace table
Reference<XAccessible> TableControl::CreateAccessibleControl( sal_Int32 _nIndex )
{
(void)_nIndex;
- DBG_ASSERT( FALSE, "TableControl::CreateAccessibleControl: to be overwritten!" );
+ DBG_ASSERT( sal_False, "TableControl::CreateAccessibleControl: to be overwritten!" );
return NULL;
}
::rtl::OUString TableControl::GetAccessibleObjectName( AccessibleTableControlObjType eObjType, sal_Int32 _nRow, sal_Int32 _nCol) const
@@ -455,7 +455,7 @@ void TableControl::GrabFocus()
Control::GrabFocus();
}
// -----------------------------------------------------------------------------
-Reference< XAccessible > TableControl::GetAccessible( BOOL bCreate )
+Reference< XAccessible > TableControl::GetAccessible( sal_Bool bCreate )
{
return Control::GetAccessible( bCreate );
}
@@ -564,13 +564,13 @@ void TableControl::commitGridControlEvent( sal_Int16 _nEventId, const Any& _rNew
m_pAccessTable->m_pAccessible->commitEvent( _nEventId, _rNewValue, _rOldValue);
}
// -----------------------------------------------------------------------------
-Rectangle TableControl::calcHeaderRect(sal_Bool _bIsColumnBar,BOOL _bOnScreen)
+Rectangle TableControl::calcHeaderRect(sal_Bool _bIsColumnBar,sal_Bool _bOnScreen)
{
(void)_bOnScreen;
return m_pImpl->calcHeaderRect(_bIsColumnBar);
}
// -----------------------------------------------------------------------------
-Rectangle TableControl::calcTableRect(BOOL _bOnScreen)
+Rectangle TableControl::calcTableRect(sal_Bool _bOnScreen)
{
(void)_bOnScreen;
return m_pImpl->calcTableRect();
diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx
index 6c58cb530330..4c109529244d 100644
--- a/svtools/source/table/tablecontrol_impl.cxx
+++ b/svtools/source/table/tablecontrol_impl.cxx
@@ -704,7 +704,7 @@ namespace svt { namespace table
}
//................................................................
- void lcl_setButtonRepeat( Window& _rWindow, ULONG _nDelay )
+ void lcl_setButtonRepeat( Window& _rWindow, sal_uLong _nDelay )
{
AllSettings aSettings = _rWindow.GetSettings();
MouseSettings aMouseSettings = aSettings.GetMouseSettings();
@@ -712,7 +712,7 @@ namespace svt { namespace table
aMouseSettings.SetButtonRepeat( _nDelay );
aSettings.SetMouseSettings( aMouseSettings );
- _rWindow.SetSettings( aSettings, TRUE );
+ _rWindow.SetSettings( aSettings, sal_True );
}
//................................................................
@@ -1379,7 +1379,7 @@ namespace svt { namespace table
invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells);
}
}
- m_pSelEngine->SetAnchor(TRUE);
+ m_pSelEngine->SetAnchor(sal_True);
m_nAnchor = m_nCurRow;
ensureVisible(m_nCurColumn, m_nCurRow, false);
m_rAntiImpl.selectionChanged(true);
@@ -1464,7 +1464,7 @@ namespace svt { namespace table
invalidateSelectedRegion(m_nCurRow, m_nCurRow, rCells);
}
}
- m_pSelEngine->SetAnchor(TRUE);
+ m_pSelEngine->SetAnchor(sal_True);
m_nAnchor = m_nCurRow;
ensureVisible(m_nCurColumn, m_nCurRow, false);
m_rAntiImpl.selectionChanged(true);
@@ -1492,7 +1492,7 @@ namespace svt { namespace table
}
m_nCurRow = 0;
m_nAnchor = m_nCurRow;
- m_pSelEngine->SetAnchor(TRUE);
+ m_pSelEngine->SetAnchor(sal_True);
ensureVisible(m_nCurColumn, 0, false);
m_rAntiImpl.selectionChanged(true);
bSuccess = true;
@@ -1517,7 +1517,7 @@ namespace svt { namespace table
}
m_nCurRow = m_nRowCount-1;
m_nAnchor = m_nCurRow;
- m_pSelEngine->SetAnchor(TRUE);
+ m_pSelEngine->SetAnchor(sal_True);
ensureVisible(m_nCurColumn, m_nRowCount-1, false);
m_rAntiImpl.selectionChanged(true);
bSuccess = true;
@@ -1912,7 +1912,7 @@ namespace svt { namespace table
return m_pVScroll;
}
//-------------------------------------------------------------------------------
- BOOL TableControl_Impl::isRowSelected(const ::std::vector<RowPos>& selectedRows, RowPos current)
+ sal_Bool TableControl_Impl::isRowSelected(const ::std::vector<RowPos>& selectedRows, RowPos current)
{
return ::std::find(selectedRows.begin(),selectedRows.end(),current) != selectedRows.end();
}
@@ -2246,19 +2246,19 @@ namespace svt { namespace table
m_pTableControl->m_nAnchor = -1;
}
//-------------------------------------------------------------------------------
- BOOL TableFunctionSet::SetCursorAtPoint(const Point& rPoint, BOOL bDontSelectAtCursor)
+ sal_Bool TableFunctionSet::SetCursorAtPoint(const Point& rPoint, sal_Bool bDontSelectAtCursor)
{
- BOOL bHandled = FALSE;
+ sal_Bool bHandled = sal_False;
Rectangle rCells;
//curRow is the row where the mouse click happened, m_nCurRow is the last selected row, before the mouse click
RowPos curRow = m_pTableControl->getCurrentRow(rPoint);
if(curRow == -2)
- return FALSE;
+ return sal_False;
if( bDontSelectAtCursor )
{
if(m_pTableControl->m_nRowSelected.size()>1)
- m_pTableControl->m_pSelEngine->AddAlways(TRUE);
- bHandled = TRUE;
+ m_pTableControl->m_pSelEngine->AddAlways(sal_True);
+ bHandled = sal_True;
}
else if(m_pTableControl->m_nAnchor == m_pTableControl->m_nCurRow)
{
@@ -2293,7 +2293,7 @@ namespace svt { namespace table
m_pTableControl->m_nAnchor--;
}
m_pTableControl->invalidateSelectedRegion(m_pTableControl->m_nCurRow, curRow, rCells);
- bHandled = TRUE;
+ bHandled = sal_True;
}
//no region selected
else
@@ -2315,20 +2315,20 @@ namespace svt { namespace table
}
}
if(m_pTableControl->m_nRowSelected.size()>1 && m_pTableControl->m_pSelEngine->GetSelectionMode()!=SINGLE_SELECTION)
- m_pTableControl->m_pSelEngine->AddAlways(TRUE);
+ m_pTableControl->m_pSelEngine->AddAlways(sal_True);
m_pTableControl->invalidateSelectedRegion(curRow, curRow, rCells);
- bHandled = TRUE;
+ bHandled = sal_True;
}
m_pTableControl->m_nCurRow = curRow;
m_pTableControl->ensureVisible(m_pTableControl->m_nCurColumn,m_pTableControl->m_nCurRow,false);
return bHandled;
}
//-------------------------------------------------------------------------------
- BOOL TableFunctionSet::IsSelectionAtPoint( const Point& rPoint )
+ sal_Bool TableFunctionSet::IsSelectionAtPoint( const Point& rPoint )
{
- m_pTableControl->m_pSelEngine->AddAlways(FALSE);
+ m_pTableControl->m_pSelEngine->AddAlways(sal_False);
if(m_pTableControl->m_nRowSelected.empty())
- return FALSE;
+ return sal_False;
else
{
RowPos curRow = m_pTableControl->getCurrentRow(rPoint);
diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx
index 053766d92841..c0604be15cdb 100644
--- a/svtools/source/table/tablecontrol_impl.hxx
+++ b/svtools/source/table/tablecontrol_impl.hxx
@@ -190,7 +190,7 @@ namespace svt { namespace table
void setCursorAtCurrentCell(const Point& rPoint);
/** checks whether the vector with the selected rows contains the current row*/
- BOOL isRowSelected(const ::std::vector<RowPos>& selectedRows, RowPos current);
+ sal_Bool isRowSelected(const ::std::vector<RowPos>& selectedRows, RowPos current);
bool isRowSelected(RowPos current);
/** returns the position of the current row in the selection vector */
@@ -344,8 +344,8 @@ namespace svt { namespace table
virtual void BeginDrag();
virtual void CreateAnchor();
virtual void DestroyAnchor();
- virtual BOOL SetCursorAtPoint(const Point& rPoint, BOOL bDontSelectAtCursor);
- virtual BOOL IsSelectionAtPoint( const Point& rPoint );
+ virtual sal_Bool SetCursorAtPoint(const Point& rPoint, sal_Bool bDontSelectAtCursor);
+ virtual sal_Bool IsSelectionAtPoint( const Point& rPoint );
virtual void DeselectAtPoint( const Point& rPoint );
virtual void DeselectAll();
};
diff --git a/svtools/source/toolpanel/drawerlayouter.cxx b/svtools/source/toolpanel/drawerlayouter.cxx
index 7fc7d05ea0c9..4de76107fd20 100644
--- a/svtools/source/toolpanel/drawerlayouter.cxx
+++ b/svtools/source/toolpanel/drawerlayouter.cxx
@@ -147,10 +147,10 @@ namespace svt
const PToolPanelDrawer pDrawer( m_aDrawers[ i_nChildIndex ] );
- Reference< XAccessible > xItemAccessible = pDrawer->GetAccessible( FALSE );
+ Reference< XAccessible > xItemAccessible = pDrawer->GetAccessible( sal_False );
if ( !xItemAccessible.is() )
{
- xItemAccessible = pDrawer->GetAccessible( TRUE );
+ xItemAccessible = pDrawer->GetAccessible( sal_True );
ENSURE_OR_RETURN( xItemAccessible.is(), "illegal accessible provided by the drawer implementation!", NULL );
OSL_VERIFY( ::comphelper::OAccessibleImplementationAccess::setAccessibleParent( xItemAccessible->getAccessibleContext(),
i_rParentAccessible ) );
diff --git a/svtools/source/toolpanel/paneltabbar.cxx b/svtools/source/toolpanel/paneltabbar.cxx
index 23067d3ee5d0..7888039d8c57 100755
--- a/svtools/source/toolpanel/paneltabbar.cxx
+++ b/svtools/source/toolpanel/paneltabbar.cxx
@@ -168,8 +168,8 @@ namespace svt
aSelectionRect,
( bHovered || bFocused ) ? ( bActive ? 1 : 2 ) : 0 /* hilight */,
bActive /* check */,
- TRUE /* border */,
- FALSE /* ext border only */,
+ sal_True /* border */,
+ sal_False /* ext border only */,
0 /* corner radius */,
NULL,
NULL
@@ -685,7 +685,7 @@ namespace svt
Font aFont( m_rTabBar.GetFont() );
aFont.SetOrientation( 2700 );
- aFont.SetVertical( TRUE );
+ aFont.SetVertical( sal_True );
m_rTabBar.SetFont( aFont );
aTextPos.X() += aTextSize.Height();
@@ -787,7 +787,7 @@ namespace svt
return;
}
- m_rTabBar.SetUpdateMode( FALSE );
+ m_rTabBar.SetUpdateMode( sal_False );
// the aligned bounding and content rect
const Rectangle aActualBounds = m_aNormalizer.getTransformed( aNormalizedBounds, m_eTabAlignment );
@@ -805,7 +805,7 @@ namespace svt
// render item "foreground" layer
m_pRenderer->postRenderItem( m_rTabBar, aActualBounds, nItemFlags );
- m_rTabBar.SetUpdateMode( TRUE );
+ m_rTabBar.SetUpdateMode( sal_True );
}
//------------------------------------------------------------------------------------------------------------------
@@ -1338,9 +1338,9 @@ namespace svt
}
//------------------------------------------------------------------------------------------------------------------
- Reference< XWindowPeer > PanelTabBar::GetComponentInterface( BOOL i_bCreate )
+ Reference< XWindowPeer > PanelTabBar::GetComponentInterface( sal_Bool i_bCreate )
{
- Reference< XWindowPeer > xWindowPeer( Control::GetComponentInterface( FALSE ) );
+ Reference< XWindowPeer > xWindowPeer( Control::GetComponentInterface( sal_False ) );
if ( !xWindowPeer.is() && i_bCreate )
{
xWindowPeer.set( new PanelTabBarPeer( *this ) );
diff --git a/svtools/source/toolpanel/tablayouter.cxx b/svtools/source/toolpanel/tablayouter.cxx
index f68bbc1bbd0f..e93fc9fc1357 100755
--- a/svtools/source/toolpanel/tablayouter.cxx
+++ b/svtools/source/toolpanel/tablayouter.cxx
@@ -254,7 +254,7 @@ namespace svt
if ( lcl_checkDisposed( *m_pData ) )
return NULL;
- return m_pData->pTabBar->GetAccessible( TRUE );
+ return m_pData->pTabBar->GetAccessible( sal_True );
}
//........................................................................
diff --git a/svtools/source/toolpanel/toolpaneldeck.cxx b/svtools/source/toolpanel/toolpaneldeck.cxx
index e157090bbf0e..ae69b85dfecd 100755
--- a/svtools/source/toolpanel/toolpaneldeck.cxx
+++ b/svtools/source/toolpanel/toolpaneldeck.cxx
@@ -544,9 +544,9 @@ namespace svt
}
//--------------------------------------------------------------------
- Reference< XWindowPeer > ToolPanelDeck::GetComponentInterface( BOOL i_bCreate )
+ Reference< XWindowPeer > ToolPanelDeck::GetComponentInterface( sal_Bool i_bCreate )
{
- Reference< XWindowPeer > xWindowPeer( Control::GetComponentInterface( FALSE ) );
+ Reference< XWindowPeer > xWindowPeer( Control::GetComponentInterface( sal_False ) );
if ( !xWindowPeer.is() && i_bCreate )
{
xWindowPeer.set( new ToolPanelDeckPeer( *this ) );
diff --git a/svtools/source/toolpanel/toolpaneldrawer.cxx b/svtools/source/toolpanel/toolpaneldrawer.cxx
index 851556bc7874..1e7f2358a125 100644
--- a/svtools/source/toolpanel/toolpaneldrawer.cxx
+++ b/svtools/source/toolpanel/toolpaneldrawer.cxx
@@ -57,7 +57,7 @@ namespace svt
:Window( &i_rParent )
,m_rDrawer( i_rParent )
{
- SetMouseTransparent( TRUE );
+ SetMouseTransparent( sal_True );
Show();
SetAccessibleRole( AccessibleRole::LABEL );
}
@@ -85,7 +85,7 @@ namespace svt
,m_bFocused( false )
,m_bExpanded( false )
{
- EnableMapMode( FALSE );
+ EnableMapMode( sal_False );
SetBackground( Wallpaper() );
SetPointer( POINTER_REFHAND );
@@ -162,7 +162,7 @@ namespace svt
Image ToolPanelDrawer::impl_getExpansionIndicator() const
{
const bool bHighContrastMode( GetSettings().GetStyleSettings().GetHighContrastMode() != 0 );
- USHORT nResourceId = 0;
+ sal_uInt16 nResourceId = 0;
if ( m_bExpanded )
if ( bHighContrastMode )
nResourceId = IMG_TRIANGLE_DOWN_HC;
@@ -177,9 +177,9 @@ namespace svt
}
//------------------------------------------------------------------------------------------------------------------
- USHORT ToolPanelDrawer::impl_getTextStyle() const
+ sal_uInt16 ToolPanelDrawer::impl_getTextStyle() const
{
- const USHORT nBasicStyle = TEXT_DRAW_LEFT
+ const sal_uInt16 nBasicStyle = TEXT_DRAW_LEFT
| TEXT_DRAW_TOP
| TEXT_DRAW_WORDBREAK;
@@ -212,7 +212,7 @@ namespace svt
{
const Rectangle aTextPixelBox( m_pPaintDevice->LogicToPixel( i_rTextBox ) );
- m_pPaintDevice->EnableMapMode( FALSE );
+ m_pPaintDevice->EnableMapMode( sal_False );
m_pPaintDevice->SetFillColor();
Rectangle aBox( i_rTextBox );
@@ -229,7 +229,7 @@ namespace svt
m_pPaintDevice->SetLineColor( COL_BLACK );
m_pPaintDevice->DrawPolyLine( Polygon( aTextPixelBox ), aDottedStyle );
- m_pPaintDevice->EnableMapMode( FALSE );
+ m_pPaintDevice->EnableMapMode( sal_False );
}
else
HideFocus();
@@ -306,9 +306,9 @@ namespace svt
}
//------------------------------------------------------------------------------------------------------------------
- Reference< XWindowPeer > ToolPanelDrawer::GetComponentInterface( BOOL i_bCreate )
+ Reference< XWindowPeer > ToolPanelDrawer::GetComponentInterface( sal_Bool i_bCreate )
{
- Reference< XWindowPeer > xWindowPeer( Window::GetComponentInterface( FALSE ) );
+ Reference< XWindowPeer > xWindowPeer( Window::GetComponentInterface( sal_False ) );
if ( !xWindowPeer.is() && i_bCreate )
{
xWindowPeer.set( new ToolPanelDrawerPeer() );
diff --git a/svtools/source/toolpanel/toolpaneldrawer.hxx b/svtools/source/toolpanel/toolpaneldrawer.hxx
index a465a0a6c9e1..4baf49dd17c9 100644
--- a/svtools/source/toolpanel/toolpaneldrawer.hxx
+++ b/svtools/source/toolpanel/toolpaneldrawer.hxx
@@ -86,13 +86,13 @@ namespace svt
virtual void MouseButtonDown( const MouseEvent& i_rMouseEvent );
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >
- GetComponentInterface( BOOL i_bCreate );
+ GetComponentInterface( sal_Bool i_bCreate );
private:
Rectangle impl_calcTextBoundingBox() const;
Rectangle impl_calcTitleBarBox( const Rectangle& i_rTextBox ) const;
void impl_paintBackground( const Rectangle& i_rTitleBarBox );
- USHORT impl_getTextStyle() const;
+ sal_uInt16 impl_getTextStyle() const;
void impl_paintFocusIndicator( const Rectangle& i_rTextBox );
Rectangle impl_paintExpansionIndicator( const Rectangle& i_rTextBox );
Image impl_getExpansionIndicator() const;
diff --git a/svtools/source/uno/addrtempuno.cxx b/svtools/source/uno/addrtempuno.cxx
index 3ccf83a224f8..706afe09202f 100644
--- a/svtools/source/uno/addrtempuno.cxx
+++ b/svtools/source/uno/addrtempuno.cxx
@@ -29,7 +29,7 @@
#include "precompiled_svtools.hxx"
#include "svtools/genericunodialog.hxx"
#include <svtools/addresstemplate.hxx>
-#include <cppuhelper/extract.hxx>
+#include <comphelper/extract.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <comphelper/property.hxx>
#include <com/sun/star/sdbc/XDataSource.hpp>
diff --git a/svtools/source/uno/generictoolboxcontroller.cxx b/svtools/source/uno/generictoolboxcontroller.cxx
index a58d9b784cca..33ec21a189f8 100644
--- a/svtools/source/uno/generictoolboxcontroller.cxx
+++ b/svtools/source/uno/generictoolboxcontroller.cxx
@@ -70,7 +70,7 @@ struct ExecuteInfo
GenericToolboxController::GenericToolboxController( const Reference< XMultiServiceFactory >& rServiceManager,
const Reference< XFrame >& rFrame,
ToolBox* pToolbox,
- USHORT nID,
+ sal_uInt16 nID,
const ::rtl::OUString& aCommand ) :
svt::ToolboxController( rServiceManager, rFrame, aCommand )
, m_pToolbox( pToolbox )
@@ -157,7 +157,7 @@ throw ( RuntimeException )
{
m_pToolbox->EnableItem( m_nID, Event.IsEnabled );
- USHORT nItemBits = m_pToolbox->GetItemBits( m_nID );
+ sal_uInt16 nItemBits = m_pToolbox->GetItemBits( m_nID );
nItemBits &= ~TIB_CHECKABLE;
TriState eTri = STATE_NOCHECK;
diff --git a/svtools/source/uno/genericunodialog.cxx b/svtools/source/uno/genericunodialog.cxx
index a7ece1acc369..a1fdc7840a55 100644
--- a/svtools/source/uno/genericunodialog.cxx
+++ b/svtools/source/uno/genericunodialog.cxx
@@ -34,7 +34,7 @@
#include <com/sun/star/ucb/AlreadyInitializedException.hpp>
#include <toolkit/awt/vclxwindow.hxx>
-#include <cppuhelper/extract.hxx>
+#include <comphelper/extract.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <comphelper/property.hxx>
#include <osl/diagnose.h>
diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx
index 9e4c522dc8c4..254dbae12f68 100644
--- a/svtools/source/uno/toolboxcontroller.cxx
+++ b/svtools/source/uno/toolboxcontroller.cxx
@@ -846,7 +846,7 @@ void ToolboxController::enable( bool bEnable )
sal_uInt16 nItemId = 0;
if( getToolboxId( nItemId, &pToolBox ) )
{
- pToolBox->EnableItem( nItemId, bEnable ? TRUE : FALSE );
+ pToolBox->EnableItem( nItemId, bEnable ? sal_True : sal_False );
}
}
diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx
index f37d5f80ed68..d6809635e5e5 100644
--- a/svtools/source/uno/treecontrolpeer.cxx
+++ b/svtools/source/uno/treecontrolpeer.cxx
@@ -81,7 +81,7 @@ public:
class ImplGraphicItem : public SvLBoxBmp
{
public:
- ImplGraphicItem( SvLBoxEntry* pEntry, USHORT nFlags, Image& aImage ) : SvLBoxBmp( pEntry, nFlags, aImage ) {}
+ ImplGraphicItem( SvLBoxEntry* pEntry, sal_uInt16 nFlags, Image& aImage ) : SvLBoxBmp( pEntry, nFlags, aImage ) {}
OUString msGraphicURL;
};
@@ -91,7 +91,7 @@ public:
class ImplContextGraphicItem : public SvLBoxContextBmp
{
public:
- ImplContextGraphicItem( SvLBoxEntry* pEntry,USHORT nFlags,Image& rI1,Image& rI2, USHORT nEntryFlagsBmp1)
+ ImplContextGraphicItem( SvLBoxEntry* pEntry,sal_uInt16 nFlags,Image& rI1,Image& rI2, sal_uInt16 nEntryFlagsBmp1)
: SvLBoxContextBmp( pEntry, nFlags, rI1, rI2, nEntryFlagsBmp1 ) {}
OUString msExpandedGraphicURL;
@@ -106,12 +106,12 @@ public:
UnoTreeListBoxImpl( TreeControlPeer* pPeer, Window* pParent, WinBits nWinStyle );
~UnoTreeListBoxImpl();
- sal_uInt32 insert( SvLBoxEntry* pEntry,SvLBoxEntry* pParent,ULONG nPos=LIST_APPEND );
+ sal_uInt32 insert( SvLBoxEntry* pEntry,SvLBoxEntry* pParent,sal_uLong nPos=LIST_APPEND );
virtual void RequestingChilds( SvLBoxEntry* pParent );
- virtual BOOL EditingEntry( SvLBoxEntry* pEntry, Selection& );
- virtual BOOL EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText );
+ virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& );
+ virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText );
DECL_LINK( OnSelectionChangeHdl, UnoTreeListBoxImpl* );
DECL_LINK( OnExpandingHdl, UnoTreeListBoxImpl* );
@@ -129,7 +129,7 @@ public:
UnoTreeListItem( SvLBoxEntry* );
UnoTreeListItem();
virtual ~UnoTreeListItem();
- virtual USHORT IsA();
+ virtual sal_uInt16 IsA();
void InitViewData( SvLBox*,SvLBoxEntry*,SvViewDataItem* );
OUString GetText() const;
void SetText( const OUString& rText );
@@ -137,7 +137,7 @@ public:
void SetImage( const Image& rImage );
OUString GetGraphicURL() const;
void SetGraphicURL( const OUString& rGraphicURL );
- void Paint( const Point&, SvLBox& rDev, USHORT nFlags,SvLBoxEntry* );
+ void Paint( const Point&, SvLBox& rDev, sal_uInt16 nFlags,SvLBoxEntry* );
SvLBoxItem* Create() const;
void Clone( SvLBoxItem* pSource );
@@ -259,7 +259,7 @@ void TreeControlPeer::SetWindow( Window* pWindow )
// --------------------------------------------------------------------
-UnoTreeListEntry* TreeControlPeer::createEntry( const Reference< XTreeNode >& xNode, UnoTreeListEntry* pParent, ULONG nPos /* = LIST_APPEND */ )
+UnoTreeListEntry* TreeControlPeer::createEntry( const Reference< XTreeNode >& xNode, UnoTreeListEntry* pParent, sal_uLong nPos /* = LIST_APPEND */ )
{
UnoTreeListEntry* pEntry = 0;
if( mpTreeImpl )
@@ -326,9 +326,9 @@ bool TreeControlPeer::updateEntry( UnoTreeListEntry* pEntry )
}
}
- if( (pEntry->mxNode->hasChildrenOnDemand() == sal_True) != (pEntry->HasChildsOnDemand() == TRUE) )
+ if( (pEntry->mxNode->hasChildrenOnDemand() == sal_True) != (pEntry->HasChildsOnDemand() == sal_True) )
{
- pEntry->EnableChildsOnDemand( pEntry->mxNode->hasChildrenOnDemand() ? TRUE : FALSE );
+ pEntry->EnableChildsOnDemand( pEntry->mxNode->hasChildrenOnDemand() ? sal_True : sal_False );
bChanged = true;
}
@@ -530,14 +530,14 @@ void TreeControlPeer::ChangeNodesSelection( const Any& rSelection, bool bSelect,
}
if( bSetSelection )
- rTree.SelectAll( FALSE );
+ rTree.SelectAll( sal_False );
if( pNodes && nCount )
{
while( nCount-- )
{
UnoTreeListEntry* pEntry = getEntry( *pNodes++ );
- rTree.Select( pEntry, bSelect ? TRUE : FALSE );
+ rTree.Select( pEntry, bSelect ? sal_True : sal_False );
}
}
}
@@ -563,7 +563,7 @@ Any SAL_CALL TreeControlPeer::getSelection() throw (RuntimeException)
Any aRet;
- ULONG nSelectionCount = rTree.GetSelectionCount();
+ sal_uLong nSelectionCount = rTree.GetSelectionCount();
if( nSelectionCount == 1 )
{
UnoTreeListEntry* pEntry = dynamic_cast< UnoTreeListEntry* >( rTree.FirstSelected() );
@@ -625,7 +625,7 @@ void SAL_CALL TreeControlPeer::removeSelection( const Any& rSelection ) throw (I
void SAL_CALL TreeControlPeer::clearSelection() throw (RuntimeException)
{
::vos::OGuard aGuard( GetMutex() );
- getTreeListBoxOrThrow().SelectAll( FALSE );
+ getTreeListBoxOrThrow().SelectAll( sal_False );
}
// -------------------------------------------------------------------
@@ -891,7 +891,7 @@ Reference< XTreeNode > SAL_CALL TreeControlPeer::getNodeForLocation( sal_Int32 x
Reference< XTreeNode > xNode;
const Point aPos( x, y );
- UnoTreeListEntry* pEntry = dynamic_cast< UnoTreeListEntry* >( rTree.GetEntry( aPos, TRUE ) );
+ UnoTreeListEntry* pEntry = dynamic_cast< UnoTreeListEntry* >( rTree.GetEntry( aPos, sal_True ) );
if( pEntry )
xNode = pEntry->mxNode;
@@ -909,7 +909,7 @@ Reference< XTreeNode > SAL_CALL TreeControlPeer::getClosestNodeForLocation( sal_
Reference< XTreeNode > xNode;
const Point aPos( x, y );
- UnoTreeListEntry* pEntry = dynamic_cast< UnoTreeListEntry* >( rTree.GetEntry( aPos, TRUE ) );
+ UnoTreeListEntry* pEntry = dynamic_cast< UnoTreeListEntry* >( rTree.GetEntry( aPos, sal_True ) );
if( pEntry )
xNode = pEntry->mxNode;
@@ -948,7 +948,7 @@ sal_Bool SAL_CALL TreeControlPeer::stopEditing() throw (RuntimeException)
UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow();
if( rTree.IsEditingActive() )
{
- rTree.EndEditing(FALSE);
+ rTree.EndEditing(sal_False);
return sal_True;
}
else
@@ -964,7 +964,7 @@ void SAL_CALL TreeControlPeer::cancelEditing( ) throw (RuntimeException)
::vos::OGuard aGuard( GetMutex() );
UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow();
- rTree.EndEditing(FALSE);
+ rTree.EndEditing(sal_False);
}
// -------------------------------------------------------------------
@@ -1104,7 +1104,7 @@ void TreeControlPeer::updateNode( UnoTreeListBoxImpl& rTree, const Reference< XT
{
Reference< XTreeNode > xParentNode( xNode->getParent() );
UnoTreeListEntry* pParentEntry = 0;
- ULONG nChild = LIST_APPEND;
+ sal_uLong nChild = LIST_APPEND;
if( xParentNode.is() )
{
@@ -1371,7 +1371,7 @@ void TreeControlPeer::setProperty( const ::rtl::OUString& PropertyName, const An
{
sal_Bool bEnabled = false;
if( aValue >>= bEnabled )
- rTree.EnableInplaceEditing( bEnabled ? TRUE : FALSE );
+ rTree.EnableInplaceEditing( bEnabled ? sal_True : sal_False );
break;
}
case BASEPROPERTY_TREE_INVOKESSTOPNODEEDITING:
@@ -1581,7 +1581,7 @@ IMPL_LINK(UnoTreeListBoxImpl, OnExpandedHdl, UnoTreeListBoxImpl*, EMPTYARG )
// --------------------------------------------------------------------
-sal_uInt32 UnoTreeListBoxImpl::insert( SvLBoxEntry* pEntry,SvLBoxEntry* pParent,ULONG nPos )
+sal_uInt32 UnoTreeListBoxImpl::insert( SvLBoxEntry* pEntry,SvLBoxEntry* pParent,sal_uLong nPos )
{
if( pParent )
return SvTreeListBox::Insert( pEntry, pParent, nPos );
@@ -1600,14 +1600,14 @@ void UnoTreeListBoxImpl::RequestingChilds( SvLBoxEntry* pParent )
// --------------------------------------------------------------------
-BOOL UnoTreeListBoxImpl::EditingEntry( SvLBoxEntry* pEntry, Selection& )
+sal_Bool UnoTreeListBoxImpl::EditingEntry( SvLBoxEntry* pEntry, Selection& )
{
return mxPeer.is() ? mxPeer->onEditingEntry( dynamic_cast< UnoTreeListEntry* >( pEntry ) ) : false;
}
// --------------------------------------------------------------------
-BOOL UnoTreeListBoxImpl::EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText )
+sal_Bool UnoTreeListBoxImpl::EditedEntry( SvLBoxEntry* pEntry, const XubString& rNewText )
{
return mxPeer.is() ? mxPeer->onEditedEntry( dynamic_cast< UnoTreeListEntry* >( pEntry ), rNewText ) : false;
}
@@ -1636,14 +1636,14 @@ UnoTreeListItem::~UnoTreeListItem()
// --------------------------------------------------------------------
-USHORT UnoTreeListItem::IsA()
+sal_uInt16 UnoTreeListItem::IsA()
{
return 0;
}
// --------------------------------------------------------------------
-void UnoTreeListItem::Paint( const Point& rPos, SvLBox& rDev, USHORT /* nFlags */, SvLBoxEntry* _pEntry)
+void UnoTreeListItem::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 /* nFlags */, SvLBoxEntry* _pEntry)
{
Point aPos( rPos );
if( _pEntry )
diff --git a/svtools/source/uno/treecontrolpeer.hxx b/svtools/source/uno/treecontrolpeer.hxx
index 336830804a6f..66ab96c60ff1 100644
--- a/svtools/source/uno/treecontrolpeer.hxx
+++ b/svtools/source/uno/treecontrolpeer.hxx
@@ -129,7 +129,7 @@ private:
void fillTree( UnoTreeListBoxImpl& rTree, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeDataModel >& xDataModel );
void addNode( UnoTreeListBoxImpl& rTree, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode >& xNode, UnoTreeListEntry* pParentEntry );
- UnoTreeListEntry* createEntry( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode >& xNode, UnoTreeListEntry* pParent, ULONG nPos = LIST_APPEND );
+ UnoTreeListEntry* createEntry( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode >& xNode, UnoTreeListEntry* pParent, sal_uLong nPos = LIST_APPEND );
bool updateEntry( UnoTreeListEntry* pEntry );
void updateTree( const ::com::sun::star::awt::tree::TreeDataModelEvent& rEvent, bool bRecursive );
diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx
index 9ff37fbc2af4..a60a210e8fa7 100644
--- a/svtools/source/uno/unoiface.cxx
+++ b/svtools/source/uno/unoiface.cxx
@@ -121,7 +121,7 @@ SAL_DLLPUBLIC_EXPORT Window* CreateWindow( VCLXWindow** ppNewComp, const ::com::
pWindow = new CalendarField( pParent, nWinBits);
static_cast<CalendarField*>(pWindow)->EnableToday();
static_cast<CalendarField*>(pWindow)->EnableNone();
- static_cast<CalendarField*>(pWindow)->EnableEmptyFieldValue( TRUE );
+ static_cast<CalendarField*>(pWindow)->EnableEmptyFieldValue( sal_True );
*ppNewComp = new SVTXDateField;
((VCLXFormattedSpinField*)*ppNewComp)->SetFormatter( (FormatterBase*)(DateField*)pWindow );
}
@@ -838,7 +838,7 @@ void SVTXFormattedField::SetWindow( Window* _pWindow )
{
VCLXSpinField::SetWindow(_pWindow);
if (GetFormattedField())
- GetFormattedField()->SetAutoColor(TRUE);
+ GetFormattedField()->SetAutoColor(sal_True);
}
// --------------------------------------------------------------------------------------
@@ -1650,7 +1650,7 @@ void SVTXRoadmap::ImplSetNewImage()
{
OSL_PRECOND( GetWindow(), "SVTXRoadmap::ImplSetNewImage: window is required to be not-NULL!" );
::svt::ORoadmap* pButton = static_cast< ::svt::ORoadmap* >( GetWindow() );
- pButton->SetRoadmapBitmap( GetBitmap() );
+ pButton->SetRoadmapBitmap( GetImage().GetBitmapEx() );
}
void SVTXRoadmap::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds )
@@ -2134,7 +2134,7 @@ void VCLXProgressBar::ImplUpdateValue()
}
// set progressbar value
- pProgressBar->SetValue( (USHORT) nPercent );
+ pProgressBar->SetValue( (sal_uInt16) nPercent );
}
}
diff --git a/svtools/source/uno/unoimap.cxx b/svtools/source/uno/unoimap.cxx
index 97482ed9d540..e6a7626b8f4a 100644
--- a/svtools/source/uno/unoimap.cxx
+++ b/svtools/source/uno/unoimap.cxx
@@ -92,7 +92,7 @@ class SvUnoImageMapObject : public OWeakAggObject,
public XUnoTunnel
{
public:
- SvUnoImageMapObject( UINT16 nType, const SvEventDescription* pSupportedMacroItems );
+ SvUnoImageMapObject( sal_uInt16 nType, const SvEventDescription* pSupportedMacroItems );
SvUnoImageMapObject( const IMapObject& rMapObject, const SvEventDescription* pSupportedMacroItems );
virtual ~SvUnoImageMapObject() throw();
@@ -125,10 +125,10 @@ public:
virtual Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw( RuntimeException );
private:
- static PropertySetInfo* createPropertySetInfo( UINT16 nType );
+ static PropertySetInfo* createPropertySetInfo( sal_uInt16 nType );
- UINT16 mnType;
+ sal_uInt16 mnType;
::rtl::OUString maURL;
::rtl::OUString maAltText;
@@ -144,7 +144,7 @@ private:
UNO3_GETIMPLEMENTATION_IMPL( SvUnoImageMapObject );
-PropertySetInfo* SvUnoImageMapObject::createPropertySetInfo( UINT16 nType )
+PropertySetInfo* SvUnoImageMapObject::createPropertySetInfo( sal_uInt16 nType )
{
switch( nType )
{
@@ -201,7 +201,7 @@ PropertySetInfo* SvUnoImageMapObject::createPropertySetInfo( UINT16 nType )
}
}
-SvUnoImageMapObject::SvUnoImageMapObject( UINT16 nType, const SvEventDescription* pSupportedMacroItems )
+SvUnoImageMapObject::SvUnoImageMapObject( sal_uInt16 nType, const SvEventDescription* pSupportedMacroItems )
: PropertySetHelper( createPropertySetInfo( nType ) ),
mnType( nType )
, mbIsActive( true )
@@ -249,11 +249,11 @@ SvUnoImageMapObject::SvUnoImageMapObject( const IMapObject& rMapObject, const Sv
{
const Polygon aPoly( ((IMapPolygonObject*)&rMapObject)->GetPolygon(sal_False) );
- const USHORT nCount = aPoly.GetSize();
+ const sal_uInt16 nCount = aPoly.GetSize();
maPolygon.realloc( nCount );
awt::Point* pPoints = maPolygon.getArray();
- for( USHORT nPoint = 0; nPoint < nCount; nPoint++ )
+ for( sal_uInt16 nPoint = 0; nPoint < nCount; nPoint++ )
{
const Point& rPoint = aPoly.GetPoint( nPoint );
pPoints->X = rPoint.X();
@@ -605,8 +605,8 @@ SvUnoImageMap::SvUnoImageMap( const ImageMap& rMap, const SvEventDescription* pS
{
maName = rMap.GetName();
- const UINT16 nCount = rMap.GetIMapObjectCount();
- for( UINT16 nPos = 0; nPos < nCount; nPos++ )
+ const sal_uInt16 nCount = rMap.GetIMapObjectCount();
+ for( sal_uInt16 nPos = 0; nPos < nCount; nPos++ )
{
IMapObject* pMapObject = rMap.GetIMapObject( nPos );
SvUnoImageMapObject* pUnoObj = new SvUnoImageMapObject( *pMapObject, pSupportedMacroItems );
diff --git a/svtools/source/uno/wizard/wizardpagecontroller.cxx b/svtools/source/uno/wizard/wizardpagecontroller.cxx
index d6f7029b477c..6bc01c76da4a 100644
--- a/svtools/source/uno/wizard/wizardpagecontroller.cxx
+++ b/svtools/source/uno/wizard/wizardpagecontroller.cxx
@@ -75,7 +75,7 @@ namespace svt { namespace uno
try
{
m_xWizardPage.set( m_xController->createPage(
- Reference< XWindow >( i_rParent.GetComponentInterface( TRUE ), UNO_QUERY_THROW ),
+ Reference< XWindow >( i_rParent.GetComponentInterface( sal_True ), UNO_QUERY_THROW ),
m_nPageId
), UNO_SET_THROW );
diff --git a/svtools/source/urlobj/inetimg.cxx b/svtools/source/urlobj/inetimg.cxx
index 695f3993d8b8..87ff86afa7fc 100644
--- a/svtools/source/urlobj/inetimg.cxx
+++ b/svtools/source/urlobj/inetimg.cxx
@@ -35,7 +35,7 @@
#define TOKEN_SEPARATOR '\001'
-sal_Bool INetImage::Write( SvStream& rOStm, ULONG nFormat ) const
+sal_Bool INetImage::Write( SvStream& rOStm, sal_uLong nFormat ) const
{
sal_Bool bRet = sal_False;
switch( nFormat )
@@ -65,7 +65,7 @@ sal_Bool INetImage::Write( SvStream& rOStm, ULONG nFormat ) const
return bRet;
}
-sal_Bool INetImage::Read( SvStream& rIStm, ULONG nFormat )
+sal_Bool INetImage::Read( SvStream& rIStm, sal_uLong nFormat )
{
sal_Bool bRet = sal_False;
switch( nFormat )
@@ -92,12 +92,12 @@ sal_Bool INetImage::Read( SvStream& rIStm, ULONG nFormat )
/*
--> structure size MUST - alignment of 4!
int iSize; // size of all data, including variable length strings
- BOOL bIsMap; // For server side maps
- INT32 iWidth; // Fixed size data correspond to fields in LO_ImageDataStruct
- INT32 iHeight; // and EDT_ImageData
- INT32 iHSpace;
- INT32 iVSpace;
- INT32 iBorder;
+ sal_Bool bIsMap; // For server side maps
+ sal_Int32 iWidth; // Fixed size data correspond to fields in LO_ImageDataStruct
+ sal_Int32 iHeight; // and EDT_ImageData
+ sal_Int32 iHSpace;
+ sal_Int32 iVSpace;
+ sal_Int32 iBorder;
int iLowResOffset; // Offsets into string_data. If 0, string is NULL (not used)
int iAltOffset; // (alternate text?)
int iAnchorOffset; // HREF in image
@@ -109,12 +109,12 @@ sal_Bool INetImage::Read( SvStream& rIStm, ULONG nFormat )
ByteString sData;
nFilePos = rIStm.Tell();
- // skip over iSize (int), bIsMao ( BOOL ) alignment of 4 !!!!
+ // skip over iSize (int), bIsMao ( sal_Bool ) alignment of 4 !!!!
rIStm.SeekRel( 8 );
rIStm >> nVal; aSizePixel.Width() = nVal;
rIStm >> nVal; aSizePixel.Height() = nVal;
// skip over iHSpace, iVSpace, iBorder, iLowResOffset
- rIStm.SeekRel( 3 * sizeof( INT32 ) + sizeof( int ) );
+ rIStm.SeekRel( 3 * sizeof( sal_Int32 ) + sizeof( int ) );
rIStm >> nAltOffset;
rIStm >> nAnchorOffset;
// skip over iExtraHTML_Offset
diff --git a/svtools/workben/browser.cxx b/svtools/workben/browser.cxx
index 2f4f120a276b..f69eaa76e401 100644
--- a/svtools/workben/browser.cxx
+++ b/svtools/workben/browser.cxx
@@ -112,14 +112,14 @@ class Browser: public BrowseBox
friend class AppWindow;
DataList aRows;
- BOOL bInverse;
+ sal_Bool bInverse;
Edit* pEdit;
protected:
virtual long GetRowCount() const;
- virtual BOOL SeekRow( long nRow );
+ virtual sal_Bool SeekRow( long nRow );
virtual void PaintField( OutputDevice& rDev, const Rectangle& rRect,
- USHORT nColumnId ) const;
+ sal_uInt16 nColumnId ) const;
virtual void Select();
virtual void DoubleClick();
@@ -128,7 +128,7 @@ protected:
virtual void EndScroll();
virtual void Command( const CommandEvent &eEvt );
- virtual BOOL StartDragging( Pointer& rMovePtr,
+ virtual sal_Bool StartDragging( Pointer& rMovePtr,
Pointer& rCopyPtr );
virtual void EndDragging( const DropAction &rAction );
virtual void MouseButtonDown( const BrowserMouseEvent &rEvt );
@@ -137,7 +137,7 @@ public:
Browser( AppWindow* pParent, BrowserMode eMode );
~Browser();
- void SetInverseSelection( BOOL bInverseSel )
+ void SetInverseSelection( sal_Bool bInverseSel )
{ bInverse = bInverseSel; }
};
@@ -151,7 +151,7 @@ class AppWindow: public WorkWindow
Browser aBrowser;
BrowserMode eCurMode;
FloatingWindow *pEventView;
- ULONG nNewRowNo;
+ sal_uLong nNewRowNo;
private:
DECL_LINK( Modify, void * );
@@ -341,7 +341,7 @@ BrowserMode BrowseModeDialog::GetMode() const
Browser::Browser( AppWindow* pParent, BrowserMode eMode ):
BrowseBox( pParent, WinBits(WB_DRAG), eMode ),
- bInverse(FALSE),
+ bInverse(sal_False),
pEdit( 0 )
{
for ( long n = 0; n < 100; ++n )
@@ -369,11 +369,11 @@ Browser::~Browser()
//------------------------------------------------------------------
-BOOL Browser::StartDragging( Pointer& rMovePtr, Pointer& rCopyPtr )
+sal_Bool Browser::StartDragging( Pointer& rMovePtr, Pointer& rCopyPtr )
{
rMovePtr = Pointer( POINTER_MOVEDATA );
rCopyPtr = Pointer( POINTER_COPYDATA );
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------
@@ -469,9 +469,9 @@ void Browser::CursorMoved()
aEvent += String( ":", RTL_TEXTENCODING_IBM_850 );
aEvent += String( GetCurColumnId() );
( (AppWindow*) GetParent() )->Event( aEvent );
- if ( IsFieldVisible( GetCurRow(), GetCurColumnId(), TRUE ) )
+ if ( IsFieldVisible( GetCurRow(), GetCurColumnId(), sal_True ) )
( (AppWindow*) GetParent() )->Event( String( "completely visible", RTL_TEXTENCODING_IBM_850 ) );
- else if ( IsFieldVisible( 1, GetCurColumnId(), FALSE) )
+ else if ( IsFieldVisible( 1, GetCurColumnId(), sal_False) )
( (AppWindow*) GetParent() )->Event( String( "partly visible", RTL_TEXTENCODING_IBM_850 ) );
else
( (AppWindow*) GetParent() )->Event( String( "not visible", RTL_TEXTENCODING_IBM_850 ) );
@@ -488,20 +488,20 @@ long Browser::GetRowCount() const
//------------------------------------------------------------------
-BOOL Browser::SeekRow( long nRow )
+sal_Bool Browser::SeekRow( long nRow )
{
if ( nRow >= 0 && nRow < (long) aRows.Count() )
{
aRows.Seek(nRow);
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
//------------------------------------------------------------------
void Browser::PaintField( OutputDevice& rDev, const Rectangle& rRect,
- USHORT nColumnId ) const
+ sal_uInt16 nColumnId ) const
{
rDev.SetClipRegion( rRect );
String aText( aRows.GetCurObject() );
@@ -583,7 +583,7 @@ IMPL_LINK_INLINE_START( AppWindow, Modify, void *, pCaller )
aBrowser.GoToRow( pEdit->GetText().ToInt32() );
aBrowser.GrabFocus();
- return TRUE;
+ return sal_True;
}
IMPL_LINK_INLINE_END( AppWindow, Modify, void *, pCaller )
@@ -591,7 +591,7 @@ IMPL_LINK_INLINE_END( AppWindow, Modify, void *, pCaller )
IMPL_LINK( AppWindow, MenuSelect, Menu *, pMenu )
{
- ULONG nPos;
+ sal_uLong nPos;
switch ( pMenu->GetCurItemId() )
{
@@ -726,7 +726,7 @@ IMPL_LINK( AppWindow, MenuSelect, Menu *, pMenu )
case MID_INVERSE:
{
- BOOL bChecked = pMenu->IsItemChecked( MID_INVERSE );
+ sal_Bool bChecked = pMenu->IsItemChecked( MID_INVERSE );
pMenu->CheckItem( MID_INVERSE, !bChecked );
aBrowser.SetInverseSelection( !bChecked );
break;
@@ -739,14 +739,14 @@ IMPL_LINK( AppWindow, MenuSelect, Menu *, pMenu )
case MID_STARMONEY_1:
{
nPos = aBrowser.GetCurRow();
- aBrowser.SelectRow( nPos + 1, TRUE );
+ aBrowser.SelectRow( nPos + 1, sal_True );
aBrowser.aRows.Remove( nPos );
aBrowser.RowRemoved( nPos );
break;
}
}
- return TRUE;
+ return sal_True;
}
//------------------------------------------------------------------
diff --git a/svtools/workben/stest.cxx b/svtools/workben/stest.cxx
index 85b7013663da..ca6c8a757734 100644
--- a/svtools/workben/stest.cxx
+++ b/svtools/workben/stest.cxx
@@ -124,15 +124,15 @@ IMPL_LINK( SearchWindow, ClickHdl, Button *, pButton )
/* InfoBox( this, String( "T: " ) + sText +
String( "\nS: " ) + sSrch ).Execute();
*/
- BOOL bRet = FALSE;
- USHORT nStt = 0, nEnd = sText.Len();
+ sal_Bool bRet = sal_False;
+ sal_uInt16 nStt = 0, nEnd = sText.Len();
{
aParam.SetSrchStr( sSrch );
SearchText aSrchText( aParam, GetpApp()->GetAppInternational() );
bRet = aSrchText.SearchFrwrd( sText, &nStt, &nEnd );
-// BOOL SearchBkwrd( const String &rStr, USHORT* pStart, USHORT* pEnde );
+// sal_Bool SearchBkwrd( const String &rStr, sal_uInt16* pStart, sal_uInt16* pEnde );
}
String sFound( "gefunden" );
diff --git a/svtools/workben/svdem.cxx b/svtools/workben/svdem.cxx
index fd40d3d645fa..fe3afcc20ea5 100644
--- a/svtools/workben/svdem.cxx
+++ b/svtools/workben/svdem.cxx
@@ -78,7 +78,7 @@ public:
ShowBitmap( Window* pParent, const Bitmap& rBmp );
virtual void Paint( const Rectangle& );
- virtual BOOL Close();
+ virtual sal_Bool Close();
};
// -----------------------------------------------------------------------
@@ -282,11 +282,11 @@ void ShowBitmap::Paint( const Rectangle& )
// -----------------------------------------------------------------------
-BOOL ShowBitmap::Close()
+sal_Bool ShowBitmap::Close()
{
Hide();
delete this;
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -352,8 +352,8 @@ MyFontDialog::MyFontDialog( Window* pParent ) :
{
pList = NULL;
- aFontBox.EnableWYSIWYG( TRUE );
- aFontBox.EnableSymbols( TRUE );
+ aFontBox.EnableWYSIWYG( sal_True );
+ aFontBox.EnableSymbols( sal_True );
aFontBox.SetPosSizePixel( Point( 10, 10 ), Size( 140, 140 ) );
aFontBox.SetSelectHdl( LINK( this, MyFontDialog, SelectFont ) );
aFontBox.SetLoseFocusHdl( LINK( this, MyFontDialog, SelectFont ) );
@@ -421,7 +421,7 @@ MyFontDialog::MyFontDialog( Window* pParent ) :
{
aColorBox.SetPosSizePixel( Point( 15, 305 ), Size( 130, 100 ) );
aColorBox.SetSelectHdl( LINK( this, MyFontDialog, AttrHdl ) );
- aColorBox.SetUpdateMode( FALSE );
+ aColorBox.SetUpdateMode( sal_False );
aColorBox.InsertEntry( Color( COL_BLACK ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Black" ) ) );
aColorBox.InsertEntry( Color( COL_BLUE ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Blue" ) ) );
aColorBox.InsertEntry( Color( COL_GREEN ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Green" ) ) );
@@ -438,7 +438,7 @@ MyFontDialog::MyFontDialog( Window* pParent ) :
aColorBox.InsertEntry( Color( COL_LIGHTMAGENTA ), XubString( RTL_CONSTASCII_USTRINGPARAM( "LightMagenta" ) ) );
aColorBox.InsertEntry( Color( COL_YELLOW ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Yellow" ) ) );
aColorBox.InsertEntry( Color( COL_WHITE ), XubString( RTL_CONSTASCII_USTRINGPARAM( "White" ) ) );
- aColorBox.SetUpdateMode( TRUE );
+ aColorBox.SetUpdateMode( sal_True );
aColorBox.Show();
}
@@ -515,7 +515,7 @@ void MyFontDialog::SetAttr()
aFont.SetShadow( aShadowBox.IsChecked() );
aFont.SetOutline( aOutlineBox.IsChecked() );
aFont.SetOrientation( aLineOrientSlider.GetOrientation() );
- aFont.SetTransparent( TRUE );
+ aFont.SetTransparent( sal_True );
aMapText.SetText( pList->GetFontMapText( aFont ) );
aShowFont.SetFont( aFont );
}
@@ -545,12 +545,12 @@ long MyTabBar::DeactivatePage()
QueryBox aQueryBox( this, WB_YES_NO | WB_DEF_YES,
XubString( RTL_CONSTASCII_USTRINGPARAM( "Deactivate" ) ) );
if ( aQueryBox.Execute() == RET_YES )
- return TRUE;
+ return sal_True;
else
- return FALSE;
+ return sal_False;
}
else
- return TRUE;
+ return sal_True;
}
// -----------------------------------------------------------------------
@@ -601,8 +601,8 @@ MyCalendar::MyCalendar( Window* pParent ) :
uno::Sequence< i18n::CalendarItem> xItems = rCal.getDays();
const i18n::CalendarItem* pArr = xItems.getArray();
for ( sal_Int16 i = 0; i < nDays; i++ )
- aWeekStartMenu.InsertItem( 10+(USHORT)i, pArr[i].FullName, MIB_AUTOCHECK | MIB_RADIOCHECK );
- aWeekStartMenu.CheckItem( 10+(USHORT)rCal.getFirstDayOfWeek() );
+ aWeekStartMenu.InsertItem( 10+(sal_uInt16)i, pArr[i].FullName, MIB_AUTOCHECK | MIB_RADIOCHECK );
+ aWeekStartMenu.CheckItem( 10+(sal_uInt16)rCal.getFirstDayOfWeek() );
aWeekCountMenu.InsertItem( 20, XubString( RTL_CONSTASCII_USTRINGPARAM( "~1. Januar" ) ), MIB_AUTOCHECK | MIB_RADIOCHECK );
aWeekCountMenu.InsertItem( 21, XubString( RTL_CONSTASCII_USTRINGPARAM( "~2 days" ) ), MIB_AUTOCHECK | MIB_RADIOCHECK );
aWeekCountMenu.InsertItem( 22, XubString( RTL_CONSTASCII_USTRINGPARAM( "~3 days" ) ), MIB_AUTOCHECK | MIB_RADIOCHECK );
@@ -610,8 +610,8 @@ MyCalendar::MyCalendar( Window* pParent ) :
aWeekCountMenu.InsertItem( 24, XubString( RTL_CONSTASCII_USTRINGPARAM( "~5 days" ) ), MIB_AUTOCHECK | MIB_RADIOCHECK );
aWeekCountMenu.InsertItem( 25, XubString( RTL_CONSTASCII_USTRINGPARAM( "~6 days" ) ), MIB_AUTOCHECK | MIB_RADIOCHECK );
aWeekCountMenu.InsertItem( 26, XubString( RTL_CONSTASCII_USTRINGPARAM( "Erste ~volle Woche" ) ), MIB_AUTOCHECK | MIB_RADIOCHECK );
- //was: one of 0, 1, 2; aWeekCountMenu.CheckItem( 20+(USHORT)rIntn.GetWeekCountStart() );
- aWeekCountMenu.CheckItem( 20+(USHORT)rCal.getMinimumNumberOfDaysForFirstWeek() );
+ //was: one of 0, 1, 2; aWeekCountMenu.CheckItem( 20+(sal_uInt16)rIntn.GetWeekCountStart() );
+ aWeekCountMenu.CheckItem( 20+(sal_uInt16)rCal.getMinimumNumberOfDaysForFirstWeek() );
aMenuBar.SetSelectHdl( LINK( this, MyCalendar, MenuSelectHdl ) );
SetMenuBar( &aMenuBar );
@@ -646,7 +646,7 @@ MyCalendar::~MyCalendar()
IMPL_LINK( MyCalendar, RequestDateInfoHdl, Calendar*, EMPTYARG )
{
- USHORT nRequestYear = aCalendar.GetRequestYear();
+ sal_uInt16 nRequestYear = aCalendar.GetRequestYear();
if ( (nRequestYear >= 1954) && (nRequestYear <= 1989) )
aCalendar.AddDateInfo( Date( 17, 6, nRequestYear ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Tag der deutschen Einheit" ) ), &aHolidayColor, NULL );
else if ( nRequestYear >= 1990 )
@@ -669,7 +669,7 @@ IMPL_LINK( MyCalendar, DoubleClickHdl, Calendar*, EMPTYARG )
IMPL_LINK( MyCalendar, MenuSelectHdl, Menu*, pMenu )
{
- USHORT nItemId = pMenu->GetCurItemId();
+ sal_uInt16 nItemId = pMenu->GetCurItemId();
if ( (nItemId >= 10) && (nItemId <= 19) )
aCalendar.SetWeekStart( nItemId-10 );
@@ -750,7 +750,7 @@ MyWin::MyWin( Window* pParent, WinBits aWinStyle ) :
{
aColorList.SetPosSizePixel( Point( 10, nY ), Size( 130, 180 ) );
- aColorList.SetUpdateMode( FALSE );
+ aColorList.SetUpdateMode( sal_False );
aColorList.InsertEntry( Color( COL_BLACK ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Black" ) ) );
aColorList.InsertEntry( Color( COL_BLUE ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Blue" ) ) );
aColorList.InsertEntry( Color( COL_GREEN ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Green" ) ) );
@@ -767,7 +767,7 @@ MyWin::MyWin( Window* pParent, WinBits aWinStyle ) :
aColorList.InsertEntry( Color( COL_LIGHTMAGENTA ), XubString( RTL_CONSTASCII_USTRINGPARAM( "LightMagenta" ) ) );
aColorList.InsertEntry( Color( COL_YELLOW ), XubString( RTL_CONSTASCII_USTRINGPARAM( "Yellow" ) ) );
aColorList.InsertEntry( Color( COL_WHITE ), XubString( RTL_CONSTASCII_USTRINGPARAM( "White" ) ) );
- aColorList.SetUpdateMode( TRUE );
+ aColorList.SetUpdateMode( sal_True );
aColorList.SetSelectHdl( LINK( this, MyWin, SelectHdl ) );
aColorList.Show();
}
@@ -818,7 +818,7 @@ MyWin::MyWin( Window* pParent, WinBits aWinStyle ) :
}
{
- aCalendarField.EnableEmptyFieldValue( TRUE );
+ aCalendarField.EnableEmptyFieldValue( sal_True );
aCalendarField.SetCalendarStyle( aCalendarField.GetCalendarStyle() | WB_RANGESELECT );
aCalendarField.SetSelectHdl( LINK( this, MyWin, CalSelectHdl ) );
// aCalendarField.SetDate( Date() );
@@ -968,7 +968,7 @@ IMPL_LINK( MyWin, SelectHdl, Window*, pCtrl )
}
else if ( pCtrl == &aValueSet )
{
- USHORT nId = aValueSet.GetSelectItemId();
+ sal_uInt16 nId = aValueSet.GetSelectItemId();
if ( nId > 8 )
{
Color aColor = aValueSet.GetItemColor( nId );
@@ -977,10 +977,10 @@ IMPL_LINK( MyWin, SelectHdl, Window*, pCtrl )
}
else if ( pCtrl == &aHeadBar )
{
- USHORT nCurItemId = aHeadBar.GetCurItemId();
- for ( USHORT i = 0; i < aHeadBar.GetItemCount(); i++ )
+ sal_uInt16 nCurItemId = aHeadBar.GetCurItemId();
+ for ( sal_uInt16 i = 0; i < aHeadBar.GetItemCount(); i++ )
{
- USHORT nItemId = aHeadBar.GetItemId( i );
+ sal_uInt16 nItemId = aHeadBar.GetItemId( i );
HeaderBarItemBits nBits = aHeadBar.GetItemBits( nItemId );
if ( nItemId == nCurItemId )
{
@@ -1072,9 +1072,9 @@ void MyWin::KeyInput( const KeyEvent& rKEvt )
{
if ( rKEvt.GetKeyCode().GetCode() == KEY_P )
{
- for ( USHORT i = 0; i <= 130; i += 2 )
+ for ( sal_uInt16 i = 0; i <= 130; i += 2 )
{
- for ( USHORT j = 0; j < 6000; j++ )
+ for ( sal_uInt16 j = 0; j < 6000; j++ )
{
aPrgsBar.SetValue( i );
Application::Reschedule();
diff --git a/svtools/workben/toolpanel/toolpaneltest.cxx b/svtools/workben/toolpanel/toolpaneltest.cxx
index 6542fe826587..d7656b105fc9 100755
--- a/svtools/workben/toolpanel/toolpaneltest.cxx
+++ b/svtools/workben/toolpanel/toolpaneltest.cxx
@@ -605,13 +605,13 @@ void OptionsWindow::Resize()
//-----------------------------------------------------------------------------
void OptionsWindow::PanelInserted( const PToolPanel& i_pPanel, const size_t i_nPosition )
{
- m_aPanelList.InsertEntry( i_pPanel->GetDisplayName(), i_pPanel->GetImage(), USHORT( i_nPosition ) );
+ m_aPanelList.InsertEntry( i_pPanel->GetDisplayName(), i_pPanel->GetImage(), sal_uInt16( i_nPosition ) );
}
//-----------------------------------------------------------------------------
void OptionsWindow::PanelRemoved( const size_t i_nPosition )
{
- m_aPanelList.RemoveEntry( USHORT( i_nPosition ) );
+ m_aPanelList.RemoveEntry( sal_uInt16( i_nPosition ) );
impl_updateRemoveButton();
}
@@ -623,7 +623,7 @@ void OptionsWindow::ActivePanelChanged( const ::boost::optional< size_t >& i_rOl
if ( !i_rNewActive )
m_aPanelList.SetNoSelection();
else
- m_aPanelList.SelectEntryPos( USHORT( *i_rNewActive ) );
+ m_aPanelList.SelectEntryPos( sal_uInt16( *i_rNewActive ) );
}
//-----------------------------------------------------------------------------
diff --git a/svtools/workben/urange.cxx b/svtools/workben/urange.cxx
index aa5eba3d5543..089724966f48 100644
--- a/svtools/workben/urange.cxx
+++ b/svtools/workben/urange.cxx
@@ -34,7 +34,7 @@
#include <sfxitems.hxx>
#endif
-USHORT nValues1[] = {340,472,482,4288,4374,4890,5026,5356,5724,6130,6186,6666,9222,9764,9908,
+sal_uInt16 nValues1[] = {340,472,482,4288,4374,4890,5026,5356,5724,6130,6186,6666,9222,9764,9908,
10110,11302,11748,11946,12298,12344,12642,12958,13076,13410,13496,14462,
14480,14592,16292,16788,17102,17792,17844,18182,18396,18522,18974,19292,
19630,20336,21808,21972,22382,23568,25156,26978,27158,27730,28014,28280,
@@ -44,7 +44,7 @@ USHORT nValues1[] = {340,472,482,4288,4374,4890,5026,5356,5724,6130,6186,6666,92
57045,59243,59833,59859,59951,60361,61387,62453,62703,63155,63517,63621,
63895,0};
-USHORT nValues2[] = {2362,3100,3286,3548,4056,4224,5058,5198,5398,5990,6910,7034,7046,8574,8762,
+sal_uInt16 nValues2[] = {2362,3100,3286,3548,4056,4224,5058,5198,5398,5990,6910,7034,7046,8574,8762,
9360,9494,9720,11432,12900,12946,13626,13844,14344,15028,16306,16494,16972,
17340,17504,17610,18270,18506,19832,19962,20356,20792,21146,21270,21722,
22486,22752,23554,24148,24210,24910,25006,25500,26464,26952,27216,28394,
@@ -70,8 +70,8 @@ static String MakeString_Impl( SfxUShortRanges& aRanges )
{
String aStr;
- USHORT nPos = 0;
- const USHORT* pRanges = ( const USHORT*)aRanges;
+ sal_uInt16 nPos = 0;
+ const sal_uInt16* pRanges = ( const sal_uInt16*)aRanges;
while( pRanges[ nPos ] != 0 )
{